head 1.72; access; symbols netbsd-10-0-RC6:1.71 netbsd-10-0-RC5:1.71 netbsd-10-0-RC4:1.71 netbsd-10-0-RC3:1.71 netbsd-10-0-RC2:1.71 netbsd-10-0-RC1:1.71 netbsd-10:1.71.0.2 netbsd-10-base:1.71 netbsd-9-3-RELEASE:1.69 cjep_sun2x-base1:1.70 cjep_sun2x:1.70.0.4 cjep_sun2x-base:1.70 cjep_staticlib_x-base1:1.70 netbsd-9-2-RELEASE:1.69 cjep_staticlib_x:1.70.0.2 cjep_staticlib_x-base:1.70 netbsd-9-1-RELEASE:1.69 phil-wifi-20200421:1.69 phil-wifi-20200411:1.69 is-mlppp:1.69.0.30 is-mlppp-base:1.69 phil-wifi-20200406:1.69 netbsd-8-2-RELEASE:1.69 netbsd-9-0-RELEASE:1.69 netbsd-9-0-RC2:1.69 netbsd-9-0-RC1:1.69 phil-wifi-20191119:1.69 netbsd-9:1.69.0.28 netbsd-9-base:1.69 phil-wifi-20190609:1.69 netbsd-8-1-RELEASE:1.69 netbsd-8-1-RC1:1.69 pgoyette-compat-merge-20190127:1.69 pgoyette-compat-20190127:1.69 pgoyette-compat-20190118:1.69 pgoyette-compat-1226:1.69 pgoyette-compat-1126:1.69 pgoyette-compat-1020:1.69 pgoyette-compat-0930:1.69 pgoyette-compat-0906:1.69 netbsd-7-2-RELEASE:1.69 pgoyette-compat-0728:1.69 netbsd-8-0-RELEASE:1.69 phil-wifi:1.69.0.26 phil-wifi-base:1.69 pgoyette-compat-0625:1.69 netbsd-8-0-RC2:1.69 pgoyette-compat-0521:1.69 pgoyette-compat-0502:1.69 pgoyette-compat-0422:1.69 netbsd-8-0-RC1:1.69 pgoyette-compat-0415:1.69 pgoyette-compat-0407:1.69 pgoyette-compat-0330:1.69 pgoyette-compat-0322:1.69 pgoyette-compat-0315:1.69 netbsd-7-1-2-RELEASE:1.69 pgoyette-compat:1.69.0.24 pgoyette-compat-base:1.69 netbsd-7-1-1-RELEASE:1.69 matt-nb8-mediatek:1.69.0.22 matt-nb8-mediatek-base:1.69 perseant-stdc-iso10646:1.69.0.20 perseant-stdc-iso10646-base:1.69 netbsd-8:1.69.0.18 netbsd-8-base:1.69 prg-localcount2-base3:1.69 prg-localcount2-base2:1.69 prg-localcount2-base1:1.69 prg-localcount2:1.69.0.16 prg-localcount2-base:1.69 pgoyette-localcount-20170426:1.69 bouyer-socketcan-base1:1.69 pgoyette-localcount-20170320:1.69 netbsd-7-1:1.69.0.14 netbsd-7-1-RELEASE:1.69 netbsd-7-1-RC2:1.69 netbsd-7-nhusb-base-20170116:1.69 bouyer-socketcan:1.69.0.12 bouyer-socketcan-base:1.69 pgoyette-localcount-20170107:1.69 netbsd-7-1-RC1:1.69 pgoyette-localcount-20161104:1.69 netbsd-7-0-2-RELEASE:1.69 localcount-20160914:1.69 netbsd-7-nhusb:1.69.0.10 netbsd-7-nhusb-base:1.69 pgoyette-localcount-20160806:1.69 pgoyette-localcount-20160726:1.69 pgoyette-localcount:1.69.0.8 pgoyette-localcount-base:1.69 netbsd-7-0-1-RELEASE:1.69 netbsd-7-0:1.69.0.6 netbsd-7-0-RELEASE:1.69 netbsd-7-0-RC3:1.69 netbsd-7-0-RC2:1.69 netbsd-7-0-RC1:1.69 netbsd-5-2-3-RELEASE:1.60.4.1 netbsd-5-1-5-RELEASE:1.60.14.1 netbsd-6-0-6-RELEASE:1.64.8.1 netbsd-6-1-5-RELEASE:1.64.8.1 netbsd-7:1.69.0.4 netbsd-7-base:1.69 yamt-pagecache-base9:1.69 yamt-pagecache-tag8:1.64.6.1 netbsd-6-1-4-RELEASE:1.64.8.1 netbsd-6-0-5-RELEASE:1.64.8.1 tls-earlyentropy:1.69.0.2 tls-earlyentropy-base:1.69 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.69 riastradh-drm2-base3:1.69 netbsd-6-1-3-RELEASE:1.64.8.1 netbsd-6-0-4-RELEASE:1.64.8.1 netbsd-5-2-2-RELEASE:1.60.4.1 netbsd-5-1-4-RELEASE:1.60.14.1 netbsd-6-1-2-RELEASE:1.64.8.1 netbsd-6-0-3-RELEASE:1.64.8.1 netbsd-5-2-1-RELEASE:1.60.4.1 netbsd-5-1-3-RELEASE:1.60.14.1 netbsd-6-1-1-RELEASE:1.64.8.1 riastradh-drm2-base2:1.68 riastradh-drm2-base1:1.68 riastradh-drm2:1.68.0.2 riastradh-drm2-base:1.68 netbsd-6-1:1.64.8.1.0.6 netbsd-6-0-2-RELEASE:1.64.8.1 netbsd-6-1-RELEASE:1.64.8.1 netbsd-6-1-RC4:1.64.8.1 netbsd-6-1-RC3:1.64.8.1 agc-symver:1.65.0.6 agc-symver-base:1.65 netbsd-6-1-RC2:1.64.8.1 netbsd-6-1-RC1:1.64.8.1 yamt-pagecache-base8:1.65 netbsd-5-2:1.60.4.1.0.2 netbsd-6-0-1-RELEASE:1.64.8.1 yamt-pagecache-base7:1.65 netbsd-5-2-RELEASE:1.60.4.1 netbsd-5-2-RC1:1.60.4.1 matt-nb6-plus-nbase:1.64.8.1 yamt-pagecache-base6:1.65 netbsd-6-0:1.64.8.1.0.4 netbsd-6-0-RELEASE:1.64.8.1 netbsd-6-0-RC2:1.64.8.1 tls-maxphys:1.65.0.2 tls-maxphys-base:1.69 matt-nb6-plus:1.64.8.1.0.2 matt-nb6-plus-base:1.64.8.1 netbsd-6-0-RC1:1.64.8.1 yamt-pagecache-base5:1.65 yamt-pagecache-base4:1.65 netbsd-6:1.64.0.8 netbsd-6-base:1.64 netbsd-5-1-2-RELEASE:1.60.14.1 netbsd-5-1-1-RELEASE:1.60.14.1 yamt-pagecache-base3:1.64 yamt-pagecache-base2:1.64 yamt-pagecache:1.64.0.6 yamt-pagecache-base:1.64 cherry-xenmp:1.64.0.4 cherry-xenmp-base:1.64 uebayasi-xip-base7:1.64 bouyer-quota2-nbase:1.64 bouyer-quota2:1.64.0.2 bouyer-quota2-base:1.64 matt-mips64-premerge-20101231:1.64 matt-nb5-mips64-premerge-20101231:1.60 matt-nb5-pq3:1.60.0.16 matt-nb5-pq3-base:1.60 netbsd-5-1:1.60.0.14 uebayasi-xip-base6:1.64 uebayasi-xip-base5:1.64 netbsd-5-1-RELEASE:1.60 uebayasi-xip-base4:1.64 uebayasi-xip-base3:1.64 netbsd-5-1-RC4:1.60 matt-nb5-mips64-k15:1.60 uebayasi-xip-base2:1.64 netbsd-5-1-RC3:1.60 netbsd-5-1-RC2:1.60 uebayasi-xip-base1:1.63 netbsd-5-1-RC1:1.60 uebayasi-xip:1.62.0.2 uebayasi-xip-base:1.62 netbsd-5-0-2-RELEASE:1.60 matt-nb5-mips64-premerge-20091211:1.60 matt-premerge-20091211:1.62 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.60 matt-nb4-mips64-k7-u2a-k9b:1.60 matt-nb5-mips64-u1-k1-k5:1.60 matt-nb5-mips64:1.60.0.12 netbsd-5-0-1-RELEASE:1.60 jym-xensuspend-nbase:1.61 netbsd-5-0:1.60.0.10 netbsd-5-0-RELEASE:1.60 netbsd-5-0-RC4:1.60 libbind-6-0rc1:1.1.1.7 netbsd-5-0-RC3:1.60 netbsd-5-0-RC2:1.60 jym-xensuspend:1.60.0.8 jym-xensuspend-base:1.61 netbsd-5-0-RC1:1.60 christos-time_t-nbase:1.60 christos-time_t:1.60.0.6 christos-time_t-base:1.60 netbsd-5:1.60.0.4 netbsd-5-base:1.60 matt-mips64-base2:1.60 matt-mips64:1.59.0.16 netbsd-4-0-1-RELEASE:1.55.2.1 wrstuden-revivesa-base-3:1.60 wrstuden-revivesa-base-2:1.60 wrstuden-fixsa-newbase:1.55.2.1 wrstuden-revivesa-base-1:1.60 simonb-wapbl-nbase:1.60 yamt-pf42-base4:1.59 simonb-wapbl:1.59.0.14 simonb-wapbl-base:1.60 yamt-pf42-base3:1.59 hpcarm-cleanup-nbase:1.59 yamt-pf42-baseX:1.59 yamt-pf42-base2:1.59 wrstuden-revivesa:1.59.0.12 wrstuden-revivesa-base:1.60 yamt-pf42:1.59.0.10 yamt-pf42-base:1.59 keiichi-mipv6:1.59.0.8 keiichi-mipv6-base:1.59 matt-armv6-nbase:1.59 matt-armv6-prevmlocking:1.59 wrstuden-fixsa-base-1:1.55.2.1 netbsd-4-0:1.55.2.1.0.2 netbsd-4-0-RELEASE:1.55.2.1 cube-autoconf:1.59.0.6 cube-autoconf-base:1.59 netbsd-4-0-RC5:1.55.2.1 netbsd-4-0-RC4:1.55.2.1 netbsd-4-0-RC3:1.55.2.1 netbsd-4-0-RC2:1.55.2.1 netbsd-4-0-RC1:1.55.2.1 matt-armv6:1.59.0.4 matt-armv6-base:1.59 matt-mips64-base:1.59 hpcarm-cleanup:1.59.0.2 hpcarm-cleanup-base:1.59 netbsd-3-1-1-RELEASE:1.48.2.2 netbsd-3-0-3-RELEASE:1.48.2.2 wrstuden-fixsa:1.55.0.4 wrstuden-fixsa-base:1.55.2.1 bind-9-4-0:1.1.1.6 bind-9-4-0-rc2:1.1.1.5 abandoned-netbsd-4-base:1.54 abandoned-netbsd-4:1.54.0.2 netbsd-3-1:1.48.2.2.0.4 netbsd-3-1-RELEASE:1.48.2.2 netbsd-3-0-2-RELEASE:1.48.2.2 netbsd-3-1-RC4:1.48.2.2 netbsd-3-1-RC3:1.48.2.2 netbsd-3-1-RC2:1.48.2.2 netbsd-3-1-RC1:1.48.2.2 netbsd-4:1.55.0.2 netbsd-4-base:1.55 netbsd-3-0-1-RELEASE:1.48.2.2 netbsd-3-0:1.48.2.2.0.2 netbsd-3-0-RELEASE:1.48.2.2 netbsd-3-0-RC6:1.48.2.2 netbsd-3-0-RC5:1.48.2.2 netbsd-3-0-RC4:1.48.2.2 netbsd-3-0-RC3:1.48.2.2 netbsd-3-0-RC2:1.48.2.2 netbsd-3-0-RC1:1.48.2.2 netbsd-2-0-3-RELEASE:1.34.2.1 netbsd-2-1:1.34.2.1.2.2.0.2 netbsd-2-1-RELEASE:1.34.2.1.2.2 netbsd-2-1-RC6:1.34.2.1.2.2 netbsd-2-1-RC5:1.34.2.1.2.2 netbsd-2-1-RC4:1.34.2.1.2.2 netbsd-2-1-RC3:1.34.2.1.2.2 netbsd-2-1-RC2:1.34.2.1.2.2 netbsd-2-1-RC1:1.34.2.1.2.2 netbsd-2-0-2-RELEASE:1.34.2.1 netbsd-3:1.48.0.2 netbsd-3-base:1.48 netbsd-2-0-1-RELEASE:1.34.2.1 netbsd-2:1.34.2.1.0.2 netbsd-2-base:1.34.2.1 netbsd-2-0-RELEASE:1.34.2.1 netbsd-2-0-RC5:1.34.2.1 bind-9-3-0:1.1.1.4 netbsd-2-0-RC4:1.34.2.1 netbsd-2-0-RC3:1.34.2.1 netbsd-2-0-RC2:1.34.2.1 netbsd-2-0-RC1:1.34.2.1 netbsd-2-0:1.34.0.2 netbsd-2-0-base:1.34 netbsd-1-6-PATCH002-RELEASE:1.25.2.2 netbsd-1-6-PATCH002:1.25.2.2 netbsd-1-6-PATCH002-RC4:1.25.2.2 netbsd-1-6-PATCH002-RC3:1.25.2.2 netbsd-1-6-PATCH002-RC2:1.25.2.2 netbsd-1-6-PATCH002-RC1:1.25.2.2 netbsd-1-6-PATCH001:1.25.2.2 netbsd-1-6-PATCH001-RELEASE:1.25.2.2 netbsd-1-6-PATCH001-RC3:1.25.2.2 netbsd-1-6-PATCH001-RC2:1.25.2.2 netbsd-1-6-PATCH001-RC1:1.25.2.2 nathanw_sa_before_merge:1.28 nathanw_sa_end:1.20.2.4 fvdl_fs64_base:1.27 nathanw_sa_base:1.28 netbsd-1-6-RELEASE:1.25.2.2 netbsd-1-6-RC3:1.25.2.2 netbsd-1-6-RC2:1.25.2.2 netbsd-1-6-RC1:1.25.2.1 netbsd-1-6:1.25.0.2 netbsd-1-6-base:1.25 netbsd-1-5-PATCH003:1.18.2.3 netbsd-1-5-PATCH002:1.18.2.3 netbsd-1-5-PATCH001:1.18.2.3 nathanw_sa:1.20.0.2 netbsd-1-5-RELEASE:1.18.2.2 netbsd-1-5-BETA2:1.18.2.2 netbsd-1-5-BETA:1.18.2.2 netbsd-1-4-PATCH003:1.11 netbsd-1-5-ALPHA2:1.18.2.2 netbsd-1-5:1.18.0.2 netbsd-1-5-base:1.18 minoura-xpg4dl:1.17.0.2 minoura-xpg4dl-base:1.17 netbsd-1-4-PATCH002:1.11 wrstuden-devbsize-19991221:1.15 wrstuden-devbsize:1.13.0.4 wrstuden-devbsize-base:1.15 comdex-fall-1999:1.13.0.2 comdex-fall-1999-base:1.13 netbsd-1-4-PATCH001:1.11 netbsd-1-4-RELEASE:1.11 netbsd-1-4:1.11.0.2 netbsd-1-4-base:1.11 netbsd-1-3-PATCH003:1.8 netbsd-1-3-PATCH003-CANDIDATE2:1.8 netbsd-1-3-PATCH003-CANDIDATE1:1.8 netbsd-1-3-PATCH003-CANDIDATE0:1.8 netbsd-1-3-PATCH002:1.8 netbsd-1-3-PATCH001:1.8 lite-2:1.1.1.3 CSRG:1.1.1 netbsd-1-3-RELEASE:1.8 netbsd-1-3-BETA:1.8 netbsd-1-3:1.8.0.2 netbsd-1-3-base:1.8 v4_9_5_P1:1.1.1.2 ISC:1.1.1 netbsd-1-2-PATCH001:1.6 nsswitch:1.6.0.2 netbsd-1-2-RELEASE:1.6 netbsd-1-2-BETA:1.6 netbsd-1-2-base:1.6 netbsd-1-2:1.6.0.4 netbsd-1-1-PATCH001:1.5 netbsd-1-1-RELEASE:1.5 netbsd-1-1:1.5.0.2 netbsd-1-1-base:1.5 netbsd-1-0-PATCH06:1.3 netbsd-1-0-PATCH05:1.3 netbsd-1-0-PATCH04:1.3 netbsd-1-0-PATCH03:1.3 netbsd-1-0-PATCH02:1.3 netbsd-1-0-PATCH1:1.3 netbsd-1-0-PATCH0:1.3 netbsd-1-0-RELEASE:1.3 netbsd-1-0:1.3.0.2 netbsd-1-0-base:1.3 netbsd-0-9-RELEASE:1.1.1.1 netbsd-0-9-BETA:1.1.1.1 netbsd-0-9-ALPHA2:1.1.1.1 netbsd-0-9-ALPHA:1.1.1.1 netbsd-0-9:1.1.1.1.0.2 netbsd-0-9-base:1.1.1.1 netbsd-0-8:1.1.1.1 netbsd-alpha-1:1.1.1.1 patchkit-0-2-2:1.1.1.1 WFJ-386bsd-01:1.1.1.1 WFJ-920714:1.1.1; locks; strict; comment @ * @; 1.72 date 2024.02.16.11.13.59; author jkoshy; state Exp; branches; next 1.71; commitid ftjKQ692taLthEYE; 1.71 date 2021.08.09.20.49.08; author andvar; state Exp; branches; next 1.70; commitid DVtnVgF9HMHM3l4D; 1.70 date 2020.06.04.11.21.16; author nia; state Exp; branches; next 1.69; commitid aSAmxo3tNctoMTaC; 1.69 date 2013.08.19.07.18.42; author christos; state Exp; branches; next 1.68; commitid zRs42l1HoUxsb22x; 1.68 date 2013.05.04.00.37.47; author riz; state Exp; branches; next 1.67; 1.67 date 2013.05.03.19.34.13; author christos; state Exp; branches; next 1.66; 1.66 date 2013.04.27.21.22.05; author joerg; state Exp; branches; next 1.65; 1.65 date 2012.03.17.21.57.48; author christos; state Exp; branches 1.65.2.1; next 1.64; 1.64 date 2010.05.05.17.12.29; author christos; state Exp; branches 1.64.6.1 1.64.8.1; next 1.63; 1.63 date 2010.04.25.00.54.45; author joerg; state Exp; branches; next 1.62; 1.62 date 2009.10.02.02.45.29; author tsarna; state Exp; branches 1.62.2.1; next 1.61; 1.61 date 2009.04.12.17.07.33; author christos; state Exp; branches; next 1.60; 1.60 date 2008.06.21.20.12.49; author christos; state Exp; branches 1.60.4.1 1.60.6.1 1.60.8.1 1.60.10.1 1.60.14.1; next 1.59; 1.59 date 2007.05.10.17.45.50; author christos; state Exp; branches 1.59.12.1 1.59.14.1; next 1.58; 1.58 date 2007.03.30.19.57.16; author ghen; state Exp; branches; next 1.57; 1.57 date 2007.01.28.01.48.03; author christos; state Exp; branches; next 1.56; 1.56 date 2007.01.27.21.25.23; author christos; state Exp; branches; next 1.55; 1.55 date 2006.11.24.19.46.58; author christos; state Exp; branches 1.55.2.1 1.55.4.1; next 1.54; 1.54 date 2006.07.27.18.29.01; author christos; state Exp; branches; next 1.53; 1.53 date 2006.02.17.15.55.01; author ginsbach; state Exp; branches; next 1.52; 1.52 date 2006.01.24.17.08.58; author christos; state Exp; branches; next 1.51; 1.51 date 2005.04.18.19.39.45; author kleink; state Exp; branches; next 1.50; 1.50 date 2005.03.21.13.30.50; author kleink; state Exp; branches; next 1.49; 1.49 date 2005.03.17.10.16.14; author kleink; state Exp; branches; next 1.48; 1.48 date 2005.02.03.04.39.32; author perry; state Exp; branches 1.48.2.1; next 1.47; 1.47 date 2004.11.16.06.00.51; author itojun; state Exp; branches; next 1.46; 1.46 date 2004.11.07.01.48.01; author christos; state Exp; branches; next 1.45; 1.45 date 2004.08.17.04.24.16; author jmc; state Exp; branches; next 1.44; 1.44 date 2004.08.17.02.29.56; author ginsbach; state Exp; branches; next 1.43; 1.43 date 2004.08.11.16.13.00; author drochner; state Exp; branches; next 1.42; 1.42 date 2004.05.25.14.49.38; author christos; state Exp; branches; next 1.41; 1.41 date 2004.05.25.13.55.48; author christos; state Exp; branches; next 1.40; 1.40 date 2004.05.24.12.34.28; author yamt; state Exp; branches; next 1.39; 1.39 date 2004.05.21.02.14.39; author christos; state Exp; branches; next 1.38; 1.38 date 2004.05.08.18.55.23; author kleink; state Exp; branches; next 1.37; 1.37 date 2004.05.08.18.52.15; author kleink; state Exp; branches; next 1.36; 1.36 date 2004.04.14.04.37.59; author itojun; state Exp; branches; next 1.35; 1.35 date 2004.04.14.04.37.06; author itojun; state Exp; branches; next 1.34; 1.34 date 2004.03.20.18.22.22; author christos; state Exp; branches 1.34.2.1; next 1.33; 1.33 date 2004.02.23.16.05.19; author christos; state Exp; branches; next 1.32; 1.32 date 2004.02.19.19.30.30; author christos; state Exp; branches; next 1.31; 1.31 date 2003.08.07.09.44.10; author agc; state Exp; branches; next 1.30; 1.30 date 2003.05.05.14.20.03; author bjh21; state Exp; branches; next 1.29; 1.29 date 2003.04.28.23.16.14; author bjh21; state Exp; branches; next 1.28; 1.28 date 2003.01.06.13.26.25; author wiz; state Exp; branches; next 1.27; 1.27 date 2002.08.26.13.38.19; author itojun; state Exp; branches; next 1.26; 1.26 date 2002.05.22.09.42.37; author kleink; state Exp; branches; next 1.25; 1.25 date 2002.05.14.14.35.36; author kleink; state Exp; branches 1.25.2.1; next 1.24; 1.24 date 2002.05.14.14.31.05; author kleink; state Exp; branches; next 1.23; 1.23 date 2002.05.14.13.45.13; author kleink; state Exp; branches; next 1.22; 1.22 date 2002.05.10.22.02.11; author kleink; state Exp; branches; next 1.21; 1.21 date 2001.04.26.12.55.31; author kleink; state Exp; branches; next 1.20; 1.20 date 2000.07.30.06.33.18; author lukem; state Exp; branches 1.20.2.1; next 1.19; 1.19 date 2000.07.28.09.38.15; author kleink; state Exp; branches; next 1.18; 1.18 date 2000.06.04.08.51.23; author itojun; state Exp; branches 1.18.2.1; next 1.17; 1.17 date 2000.02.09.12.25.07; author itojun; state Exp; branches 1.17.2.1; next 1.16; 1.16 date 2000.01.05.14.40.14; author mjl; state Exp; branches; next 1.15; 1.15 date 99.12.20.06.48.11; author itojun; state Exp; branches; next 1.14; 1.14 date 99.12.12.10.49.37; author itojun; state Exp; branches; next 1.13; 1.13 date 99.07.03.13.25.21; author kleink; state Exp; branches 1.13.4.1; next 1.12; 1.12 date 99.07.01.18.15.41; author itojun; state Exp; branches; next 1.11; 1.11 date 98.05.10.17.32.39; author kleink; state Exp; branches; next 1.10; 1.10 date 98.02.03.04.20.36; author perry; state Exp; branches; next 1.9; 1.9 date 98.02.02.21.07.35; author perry; state Exp; branches; next 1.8; 1.8 date 97.10.13.09.26.06; author lukem; state Exp; branches; next 1.7; 1.7 date 97.04.13.09.26.21; author mrg; state Exp; branches; next 1.6; 1.6 date 96.02.02.15.29.01; author mrg; state Exp; branches; next 1.5; 1.5 date 95.07.03.22.59.12; author jtc; state Exp; branches; next 1.4; 1.4 date 94.10.26.00.56.09; author cgd; state Exp; branches; next 1.3; 1.3 date 94.04.07.06.58.29; author deraadt; state Exp; branches; next 1.2; 1.2 date 93.08.01.18.44.45; author mycroft; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.65.2.1 date 2013.06.23.06.28.49; author tls; state Exp; branches; next 1.65.2.2; commitid OnlO1cBgtQRcIHUw; 1.65.2.2 date 2014.08.20.00.02.05; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.64.6.1 date 2012.04.17.00.05.10; author yamt; state Exp; branches; next 1.64.6.2; 1.64.6.2 date 2014.05.22.11.36.35; author yamt; state Exp; branches; next ; commitid OndjEcbQZzO4KwBx; 1.64.8.1 date 2012.06.03.21.41.34; author jdc; state Exp; branches; next ; 1.62.2.1 date 2010.04.30.14.36.17; author uebayasi; state Exp; branches; next 1.62.2.2; 1.62.2.2 date 2010.08.17.06.40.01; author uebayasi; state Exp; branches; next ; 1.60.4.1 date 2011.01.06.21.42.46; author riz; state Exp; branches; next ; 1.60.6.1 date 2008.06.21.20.12.49; author christos; state dead; branches; next 1.60.6.2; 1.60.6.2 date 2008.06.21.20.12.50; author christos; state Exp; branches; next ; 1.60.8.1 date 2009.05.13.19.18.19; author jym; state Exp; branches; next ; 1.60.10.1 date 2011.01.10.00.42.15; author riz; state Exp; branches; next ; 1.60.14.1 date 2011.01.09.20.43.27; author riz; state Exp; branches; next ; 1.59.12.1 date 2008.06.23.04.29.29; author wrstuden; state Exp; branches; next ; 1.59.14.1 date 2008.06.27.13.47.37; author simonb; state Exp; branches; next ; 1.55.2.1 date 2007.05.17.21.25.10; author jdc; state Exp; branches 1.55.2.1.2.1; next 1.55.2.2; 1.55.2.2 date 2011.01.23.21.47.49; author bouyer; state Exp; branches; next ; 1.55.2.1.2.1 date 2011.01.23.21.52.32; author bouyer; state Exp; branches; next ; 1.55.4.1 date 2007.06.03.17.25.51; author wrstuden; state Exp; branches; next ; 1.48.2.1 date 2005.03.21.23.07.15; author tron; state Exp; branches; next 1.48.2.2; 1.48.2.2 date 2005.04.21.16.59.28; author tron; state Exp; branches; next ; 1.34.2.1 date 2004.09.11.11.52.52; author he; state Exp; branches 1.34.2.1.2.1; next ; 1.34.2.1.2.1 date 2005.05.24.23.39.44; author riz; state Exp; branches; next 1.34.2.1.2.2; 1.34.2.1.2.2 date 2005.07.05.18.34.32; author riz; state Exp; branches; next ; 1.25.2.1 date 2002.05.25.18.18.55; author thorpej; state Exp; branches; next 1.25.2.2; 1.25.2.2 date 2002.08.27.09.29.24; author lukem; state Exp; branches; next ; 1.20.2.1 date 2001.10.08.20.13.45; author nathanw; state Exp; branches; next 1.20.2.2; 1.20.2.2 date 2002.06.21.18.17.08; author nathanw; state Exp; branches; next 1.20.2.3; 1.20.2.3 date 2002.08.27.23.52.36; author nathanw; state Exp; branches; next 1.20.2.4; 1.20.2.4 date 2003.01.08.20.53.38; author thorpej; state Exp; branches; next ; 1.18.2.1 date 2000.07.30.06.29.13; author lukem; state Exp; branches; next 1.18.2.2; 1.18.2.2 date 2000.07.30.06.31.53; author lukem; state Exp; branches; next 1.18.2.3; 1.18.2.3 date 2001.05.01.10.28.45; author he; state Exp; branches; next 1.18.2.4; 1.18.2.4 date 2002.09.04.00.34.49; author itojun; state Exp; branches; next ; 1.17.2.1 date 2000.06.23.15.45.57; author minoura; state Exp; branches; next ; 1.13.4.1 date 99.12.27.18.29.22; author wrstuden; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 97.04.13.09.14.31; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 98.02.02.07.22.50; author perry; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2004.11.07.01.33.17; author christos; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2007.01.27.19.49.26; author christos; state Exp; branches; next 1.1.1.6; 1.1.1.6 date 2007.03.30.19.48.20; author ghen; state Exp; branches; next 1.1.1.7; 1.1.1.7 date 2009.04.12.16.06.26; author christos; state Exp; branches; next ; desc @@ 1.72 log @Note that the NI_WITHSCOPEID flag is obsolete. @ text @/* $NetBSD: netdb.h,v 1.71 2021/08/09 20:49:08 andvar Exp $ */ /* * ++Copyright++ 1980, 1983, 1988, 1993 * - * Copyright (c) 1980, 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by WIDE Project and * its contributors. * 4. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * --Copyright-- */ /* * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp */ #ifndef _NETDB_H_ #define _NETDB_H_ #include #include #include #include #include /* * Data types */ #ifndef socklen_t typedef __socklen_t socklen_t; #define socklen_t __socklen_t #endif #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif #if defined(_NETBSD_SOURCE) #ifndef _PATH_HEQUIV #define _PATH_HEQUIV "/etc/hosts.equiv" #endif #ifndef _PATH_HOSTS #define _PATH_HOSTS "/etc/hosts" #endif #ifndef _PATH_NETWORKS #define _PATH_NETWORKS "/etc/networks" #endif #ifndef _PATH_PROTOCOLS #define _PATH_PROTOCOLS "/etc/protocols" #endif #ifndef _PATH_SERVICES #define _PATH_SERVICES "/etc/services" #endif #ifndef _PATH_SERVICES_CDB #define _PATH_SERVICES_CDB "/var/db/services.cdb" #endif #ifndef _PATH_SERVICES_DB #define _PATH_SERVICES_DB "/var/db/services.db" #endif #endif __BEGIN_DECLS extern int h_errno; extern int * __h_errno(void); #ifdef _REENTRANT #define h_errno (*__h_errno()) #endif __END_DECLS /*% * Structures returned by network data base library. All addresses are * supplied in host order, and returned in network order (suitable for * use in system calls). */ struct hostent { char *h_name; /*%< official name of host */ char **h_aliases; /*%< alias list */ int h_addrtype; /*%< host address type */ int h_length; /*%< length of address */ char **h_addr_list; /*%< list of addresses from name server */ #define h_addr h_addr_list[0] /*%< address, for backward compatibility */ }; /*% * Assumption here is that a network number * fits in an unsigned long -- probably a poor one. */ struct netent { char *n_name; /*%< official name of net */ char **n_aliases; /*%< alias list */ int n_addrtype; /*%< net address type */ #if defined(__sparc__) && defined(_LP64) int __n_pad0; /* ABI compatibility */ #endif uint32_t n_net; /*%< network # */ #if defined(__alpha__) int __n_pad0; /* ABI compatibility */ #endif }; struct servent { char *s_name; /*%< official service name */ char **s_aliases; /*%< alias list */ int s_port; /*%< port # */ char *s_proto; /*%< protocol to use */ }; struct protoent { char *p_name; /*%< official protocol name */ char **p_aliases; /*%< alias list */ int p_proto; /*%< protocol # */ }; /* * Note: ai_addrlen used to be a size_t, per RFC 2553. * In XNS5.2, and subsequently in POSIX-2001 and * draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t. * To accommodate for this while preserving binary compatibility with the * old interface, we prepend or append 32 bits of padding, depending on * the (LP64) architecture's endianness. * * This should be deleted the next time the libc major number is * incremented. */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) struct addrinfo { int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ int ai_family; /*%< PF_xxx */ int ai_socktype; /*%< SOCK_xxx */ int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ #if defined(__sparc__) && defined(_LP64) int __ai_pad0; /* ABI compatibility */ #endif socklen_t ai_addrlen; /*%< length of ai_addr */ #if defined(__alpha__) int __ai_pad0; /* ABI compatibility */ #endif char *ai_canonname; /*%< canonical name for hostname */ struct sockaddr *ai_addr; /*%< binary address */ struct addrinfo *ai_next; /*%< next structure in linked list */ }; #endif /*% * Error return codes from gethostbyname() and gethostbyaddr() * (left in extern int h_errno). */ #if defined(_NETBSD_SOURCE) #define NETDB_INTERNAL -1 /*%< see errno */ #define NETDB_SUCCESS 0 /*%< no problem */ #endif #define NO_ADDRESS NO_DATA /* no address, look for MX record */ #define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ #define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /*%< Valid name, no data record of requested type */ #if defined(_NETBSD_SOURCE) #define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ #endif /* * Error return codes from getaddrinfo() */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) #define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ #define EAI_AGAIN 2 /*%< temporary failure in name resolution */ #define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ #define EAI_FAIL 4 /*%< non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /*%< ai_family not supported */ #define EAI_MEMORY 6 /*%< memory allocation failure */ #define EAI_NODATA 7 /*%< no address associated with hostname */ #define EAI_NONAME 8 /*%< hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ #define EAI_SYSTEM 11 /*%< system error returned in errno */ #define EAI_BADHINTS 12 /* invalid value for hints */ #define EAI_PROTOCOL 13 /* resolved protocol is unknown */ #define EAI_OVERFLOW 14 /* argument buffer overflow */ #define EAI_MAX 15 #endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */ /*% * Flag values for getaddrinfo() */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) #define AI_PASSIVE 0x00000001 /* get address to use bind() */ #define AI_CANONNAME 0x00000002 /* fill ai_canonname */ #define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ #define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */ #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ /* valid flags for addrinfo (not a standard def, apps should not use it) */ #ifdef _NETBSD_SOURCE #define AI_SRV 0x00000800 /* do _srv lookups */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG | AI_SRV) #else #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG) #endif #endif #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) /*% * Constants for getnameinfo() */ #if defined(_NETBSD_SOURCE) #define NI_MAXHOST 1025 #define NI_MAXSERV 32 #endif /*% * Flag values for getnameinfo() */ #define NI_NOFQDN 0x00000001 #define NI_NUMERICHOST 0x00000002 #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 #define NI_WITHSCOPEID 0x00000020 /* Obsolete. */ #define NI_NUMERICSCOPE 0x00000040 /*% * Scope delimit character */ #if defined(_NETBSD_SOURCE) #define SCOPE_DELIMITER '%' #endif #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */ __BEGIN_DECLS void endhostent(void); void endnetent(void); void endprotoent(void); void endservent(void); #if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \ defined(_NETBSD_SOURCE) #if 0 /* we do not ship this */ void freehostent(struct hostent *); #endif #endif struct hostent *gethostbyaddr(const void *, socklen_t, int); struct hostent *gethostbyname(const char *); #if defined(_NETBSD_SOURCE) struct hostent *gethostbyname2(const char *, int); #endif struct hostent *gethostent(void); struct netent *getnetbyaddr(uint32_t, int); struct netent *getnetbyname(const char *); struct netent *getnetent(void); struct protoent *getprotobyname(const char *); struct protoent *getprotobynumber(int); struct protoent *getprotoent(void); struct servent *getservbyname(const char *, const char *); struct servent *getservbyport(int, const char *); struct servent *getservent(void); #if defined(_NETBSD_SOURCE) void herror(const char *); const char *hstrerror(int); #endif void sethostent(int); #if defined(_NETBSD_SOURCE) /* void sethostfile(const char *); */ #endif void setnetent(int); void setprotoent(int); void setservent(int); #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) int getaddrinfo(const char * __restrict, const char * __restrict, const struct addrinfo * __restrict, struct addrinfo ** __restrict); int getnameinfo(const struct sockaddr * __restrict, socklen_t, char * __restrict, socklen_t, char * __restrict, socklen_t, int); struct addrinfo *allocaddrinfo(socklen_t); void freeaddrinfo(struct addrinfo *); const char *gai_strerror(int); #endif __END_DECLS #endif /* !_NETDB_H_ */ @ 1.71 log @fix various typos in compatibility, mainly in comments. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.70 2020/06/04 11:21:16 nia Exp $ */ d299 1 a299 1 #define NI_WITHSCOPEID 0x00000020 @ 1.70 log @Remove bogus tests for 64-bit i386 and SuperH @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.69 2013/08/19 07:18:42 christos Exp $ */ d154 1 a154 1 #define h_addr h_addr_list[0] /*%< address, for backward compatiblity */ @ 1.69 log @fix gethostbyaddr prototype per TOG. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.68 2013/05/04 00:37:47 riz Exp $ */ d165 1 a165 2 #if (defined(__sparc__) && defined(_LP64)) || \ (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN)) d169 1 a169 2 #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \ (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN)) d209 1 a209 1 #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) @ 1.68 log @Add missing #endif (Hi, Christos!) @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.67 2013/05/03 19:34:13 christos Exp $ */ d323 1 a323 1 struct hostent *gethostbyaddr(const char *, socklen_t, int); @ 1.67 log @PR/25827, PR/32373: addr AI_SRV @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.66 2013/04/27 21:22:05 joerg Exp $ */ d281 1 @ 1.66 log @machine/ansi.h is included by sys/ansi.h. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.65 2012/03/17 21:57:48 christos Exp $ */ d269 1 d271 6 a279 1 #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ @ 1.65 log @Add AI_ADDRCONFIG @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ d93 1 a93 1 #include a95 1 #include @ 1.65.2.1 log @resync from head @ text @d1 1 a1 1 /* $NetBSD$ */ d93 1 a93 1 #include d96 1 a269 1 #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ a270 6 #ifdef _NETBSD_SOURCE #define AI_SRV 0x00000800 /* do _srv lookups */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG | AI_SRV) #else d274 1 a274 1 #endif @ 1.65.2.2 log @Rebase to HEAD as of a few days ago. @ text @d323 1 a323 1 struct hostent *gethostbyaddr(const void *, socklen_t, int); @ 1.64 log @PR/43258: Hauke Fath: remove duplicate setservent declaration @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.63 2010/04/25 00:54:45 joerg Exp $ */ d272 3 a274 1 (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV) @ 1.64.8.1 log @Pull up revisions: src/lib/libc/net/getaddrinfo.c revision 1.98 - 1.100 src/include/netdb.h revision 1.65 (requested by khorben in ticket #278). Add AI_ADDRCONFIG, which makes getaddrinfo() return only address with families that are already configured in the system. PR 46206: fix programmed SIGSEGV more work is needed as tests seem to indicate that name resolution now does no seem to work (firefox reports Server not found) thanks to Ryo ONODERA for testing. PR pkg/46206 re-establish fqdn lookup when AI_ADDRCONFIG is used in hints AI_ADDRCONFIG led to fqdn lookup being skipped as the systems didn't configure any PF_UNSPEC addresses - check was too strict here. Thnaks to Ryo ONODERA for testing. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ d272 1 a272 3 (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG) #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ @ 1.64.6.1 log @sync with head @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ d272 1 a272 3 (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG) #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ @ 1.64.6.2 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64.6.1 2012/04/17 00:05:10 yamt Exp $ */ d93 1 a93 1 #include d96 1 a269 1 #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ a270 6 #ifdef _NETBSD_SOURCE #define AI_SRV 0x00000800 /* do _srv lookups */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG | AI_SRV) #else d274 1 a274 1 #endif d317 1 a317 1 struct hostent *gethostbyaddr(const void *, socklen_t, int); @ 1.63 log @Add the constant database reader (cdbr(3)) and writer ((cdbw(3)). They implement a space efficent write-once database with fast access path. Switch the services(5) database to use cdb. The size of the database file decreases from 2.1MB disk space to 307KB. Access performance is about the same if setservent(0) is used and about an order of magnitude faster otherwise. services_mkdb defaults to the new format, but can optionally create the old db(3) format as well for statically linked legacy applications. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.62 2009/10/02 02:45:29 tsarna Exp $ */ d340 1 a342 1 void setservent(int); a352 1 void setservent(int); @ 1.62 log @Introduce allocaddrinfo(3) to make writing getaddrinfo() nss plugins easier. Discussed on tech-net. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.61 2009/04/12 17:07:33 christos Exp $ */ d128 3 @ 1.62.2.1 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD$ */ a127 3 #ifndef _PATH_SERVICES_CDB #define _PATH_SERVICES_CDB "/var/db/services.cdb" #endif @ 1.62.2.2 log @Sync with HEAD. @ text @a339 1 void setservent(int); d342 1 d353 1 @ 1.61 log @merge libbind @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.1.1.7 2009/04/12 16:06:26 christos Exp $ */ d346 1 @ 1.60 log @sync with bind-9-5-0 @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.59 2007/05/10 17:45:50 christos Exp $ */ d87 1 a87 1 * Id: netdb.h,v 1.21.288.1 2008/02/28 05:46:12 marka Exp d135 1 a135 1 extern int * __h_errno __P((void)); @ 1.60.6.1 log @file netdb.h was added on branch christos-time_t on 2008-06-21 20:12:50 +0000 @ text @d1 352 @ 1.60.6.2 log @sync with bind-9-5-0 @ text @a0 352 /* $NetBSD: netdb.h,v 1.60 2008/06/21 20:12:49 christos Exp $ */ /* * ++Copyright++ 1980, 1983, 1988, 1993 * - * Copyright (c) 1980, 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by WIDE Project and * its contributors. * 4. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * --Copyright-- */ /* * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * Id: netdb.h,v 1.21.288.1 2008/02/28 05:46:12 marka Exp */ #ifndef _NETDB_H_ #define _NETDB_H_ #include #include #include #include #include #include /* * Data types */ #ifndef socklen_t typedef __socklen_t socklen_t; #define socklen_t __socklen_t #endif #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif #if defined(_NETBSD_SOURCE) #ifndef _PATH_HEQUIV #define _PATH_HEQUIV "/etc/hosts.equiv" #endif #ifndef _PATH_HOSTS #define _PATH_HOSTS "/etc/hosts" #endif #ifndef _PATH_NETWORKS #define _PATH_NETWORKS "/etc/networks" #endif #ifndef _PATH_PROTOCOLS #define _PATH_PROTOCOLS "/etc/protocols" #endif #ifndef _PATH_SERVICES #define _PATH_SERVICES "/etc/services" #endif #ifndef _PATH_SERVICES_DB #define _PATH_SERVICES_DB "/var/db/services.db" #endif #endif __BEGIN_DECLS extern int h_errno; extern int * __h_errno __P((void)); #ifdef _REENTRANT #define h_errno (*__h_errno()) #endif __END_DECLS /*% * Structures returned by network data base library. All addresses are * supplied in host order, and returned in network order (suitable for * use in system calls). */ struct hostent { char *h_name; /*%< official name of host */ char **h_aliases; /*%< alias list */ int h_addrtype; /*%< host address type */ int h_length; /*%< length of address */ char **h_addr_list; /*%< list of addresses from name server */ #define h_addr h_addr_list[0] /*%< address, for backward compatiblity */ }; /*% * Assumption here is that a network number * fits in an unsigned long -- probably a poor one. */ struct netent { char *n_name; /*%< official name of net */ char **n_aliases; /*%< alias list */ int n_addrtype; /*%< net address type */ #if (defined(__sparc__) && defined(_LP64)) || \ (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN)) int __n_pad0; /* ABI compatibility */ #endif uint32_t n_net; /*%< network # */ #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \ (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN)) int __n_pad0; /* ABI compatibility */ #endif }; struct servent { char *s_name; /*%< official service name */ char **s_aliases; /*%< alias list */ int s_port; /*%< port # */ char *s_proto; /*%< protocol to use */ }; struct protoent { char *p_name; /*%< official protocol name */ char **p_aliases; /*%< alias list */ int p_proto; /*%< protocol # */ }; /* * Note: ai_addrlen used to be a size_t, per RFC 2553. * In XNS5.2, and subsequently in POSIX-2001 and * draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t. * To accommodate for this while preserving binary compatibility with the * old interface, we prepend or append 32 bits of padding, depending on * the (LP64) architecture's endianness. * * This should be deleted the next time the libc major number is * incremented. */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) struct addrinfo { int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ int ai_family; /*%< PF_xxx */ int ai_socktype; /*%< SOCK_xxx */ int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ #if defined(__sparc__) && defined(_LP64) int __ai_pad0; /* ABI compatibility */ #endif socklen_t ai_addrlen; /*%< length of ai_addr */ #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) int __ai_pad0; /* ABI compatibility */ #endif char *ai_canonname; /*%< canonical name for hostname */ struct sockaddr *ai_addr; /*%< binary address */ struct addrinfo *ai_next; /*%< next structure in linked list */ }; #endif /*% * Error return codes from gethostbyname() and gethostbyaddr() * (left in extern int h_errno). */ #if defined(_NETBSD_SOURCE) #define NETDB_INTERNAL -1 /*%< see errno */ #define NETDB_SUCCESS 0 /*%< no problem */ #endif #define NO_ADDRESS NO_DATA /* no address, look for MX record */ #define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ #define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /*%< Valid name, no data record of requested type */ #if defined(_NETBSD_SOURCE) #define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ #endif /* * Error return codes from getaddrinfo() */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) #define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ #define EAI_AGAIN 2 /*%< temporary failure in name resolution */ #define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ #define EAI_FAIL 4 /*%< non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /*%< ai_family not supported */ #define EAI_MEMORY 6 /*%< memory allocation failure */ #define EAI_NODATA 7 /*%< no address associated with hostname */ #define EAI_NONAME 8 /*%< hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ #define EAI_SYSTEM 11 /*%< system error returned in errno */ #define EAI_BADHINTS 12 /* invalid value for hints */ #define EAI_PROTOCOL 13 /* resolved protocol is unknown */ #define EAI_OVERFLOW 14 /* argument buffer overflow */ #define EAI_MAX 15 #endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */ /*% * Flag values for getaddrinfo() */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) #define AI_PASSIVE 0x00000001 /* get address to use bind() */ #define AI_CANONNAME 0x00000002 /* fill ai_canonname */ #define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ #define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */ /* valid flags for addrinfo (not a standard def, apps should not use it) */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV) #endif #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) /*% * Constants for getnameinfo() */ #if defined(_NETBSD_SOURCE) #define NI_MAXHOST 1025 #define NI_MAXSERV 32 #endif /*% * Flag values for getnameinfo() */ #define NI_NOFQDN 0x00000001 #define NI_NUMERICHOST 0x00000002 #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 #define NI_WITHSCOPEID 0x00000020 #define NI_NUMERICSCOPE 0x00000040 /*% * Scope delimit character */ #if defined(_NETBSD_SOURCE) #define SCOPE_DELIMITER '%' #endif #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */ __BEGIN_DECLS void endhostent(void); void endnetent(void); void endprotoent(void); void endservent(void); #if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \ defined(_NETBSD_SOURCE) #if 0 /* we do not ship this */ void freehostent(struct hostent *); #endif #endif struct hostent *gethostbyaddr(const char *, socklen_t, int); struct hostent *gethostbyname(const char *); #if defined(_NETBSD_SOURCE) struct hostent *gethostbyname2(const char *, int); #endif struct hostent *gethostent(void); struct netent *getnetbyaddr(uint32_t, int); struct netent *getnetbyname(const char *); struct netent *getnetent(void); struct protoent *getprotobyname(const char *); struct protoent *getprotobynumber(int); struct protoent *getprotoent(void); struct servent *getservbyname(const char *, const char *); struct servent *getservbyport(int, const char *); struct servent *getservent(void); #if defined(_NETBSD_SOURCE) void herror(const char *); const char *hstrerror(int); #endif void sethostent(int); #if defined(_NETBSD_SOURCE) /* void sethostfile(const char *); */ #endif void setnetent(int); void setprotoent(int); #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ defined(_NETBSD_SOURCE) void setservent(int); int getaddrinfo(const char * __restrict, const char * __restrict, const struct addrinfo * __restrict, struct addrinfo ** __restrict); int getnameinfo(const struct sockaddr * __restrict, socklen_t, char * __restrict, socklen_t, char * __restrict, socklen_t, int); void freeaddrinfo(struct addrinfo *); const char *gai_strerror(int); #endif void setservent(int); __END_DECLS #endif /* !_NETDB_H_ */ @ 1.60.10.1 log @Apply patches (requested by spz in ticket #1517): Update bind to 9.7.2-P3. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ d87 1 a87 1 * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp a127 3 #ifndef _PATH_SERVICES_CDB #define _PATH_SERVICES_CDB "/var/db/services.cdb" #endif d135 1 a135 1 extern int * __h_errno(void); a336 1 void setservent(int); d339 1 a345 1 struct addrinfo *allocaddrinfo(socklen_t); d349 1 @ 1.60.14.1 log @Apply patches (requested by spz in ticket #1517): Update bind to 9.7.2-P3. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ d87 1 a87 1 * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp a127 3 #ifndef _PATH_SERVICES_CDB #define _PATH_SERVICES_CDB "/var/db/services.cdb" #endif d135 1 a135 1 extern int * __h_errno(void); a336 1 void setservent(int); d339 1 a345 1 struct addrinfo *allocaddrinfo(socklen_t); d349 1 @ 1.60.4.1 log @Apply patches (requested by spz in ticket #1517): Update bind to 9.7.2-P3. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ d87 1 a87 1 * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp a127 3 #ifndef _PATH_SERVICES_CDB #define _PATH_SERVICES_CDB "/var/db/services.cdb" #endif d135 1 a135 1 extern int * __h_errno(void); a336 1 void setservent(int); d339 1 a345 1 struct addrinfo *allocaddrinfo(socklen_t); d349 1 @ 1.60.8.1 log @Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.61 2009/04/12 17:07:33 christos Exp $ */ d87 1 a87 1 * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp d135 1 a135 1 extern int * __h_errno(void); @ 1.59 log @Move .db files for services and netgroup to /var/db per gimpy's request. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.58 2007/03/30 19:57:16 ghen Exp $ */ d4 2 d87 1 a87 1 * Id: netdb.h,v 1.15.18.6 2006/10/02 01:23:09 marka Exp d135 4 d290 1 @ 1.59.14.1 log @Sync with head. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.60 2008/06/21 20:12:49 christos Exp $ */ a3 2 * ++Copyright++ 1980, 1983, 1988, 1993 * - d85 1 a85 1 * Id: netdb.h,v 1.21.288.1 2008/02/28 05:46:12 marka Exp a132 4 extern int * __h_errno __P((void)); #ifdef _REENTRANT #define h_errno (*__h_errno()) #endif a283 1 #define NI_WITHSCOPEID 0x00000020 @ 1.59.12.1 log @Sync w/ -current. 34 merge conflicts to follow. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.59 2007/05/10 17:45:50 christos Exp $ */ a3 2 * ++Copyright++ 1980, 1983, 1988, 1993 * - d85 1 a85 1 * Id: netdb.h,v 1.21.288.1 2008/02/28 05:46:12 marka Exp a132 4 extern int * __h_errno __P((void)); #ifdef _REENTRANT #define h_errno (*__h_errno()) #endif a283 1 #define NI_WITHSCOPEID 0x00000020 @ 1.58 log @Resolve conflicts. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.1.1.6 2007/03/30 19:48:20 ghen Exp $ */ d127 1 a127 1 #define _PATH_SERVICES_DB "/etc/services.db" @ 1.57 log @another merge botch. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.56 2007/01/27 21:25:23 christos Exp $ */ @ 1.56 log @Merge back all our changes. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.55 2006/11/24 19:46:58 christos Exp $ */ d200 1 a200 1 in t __ai_pad0; /* ABI compatibility */ d206 1 a207 1 char *ai_canonname; /*%< canonical name for hostname */ @ 1.55 log @fix spelling of accommodate; from Zapher. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.54 2006/07/27 18:29:01 christos Exp $ */ d85 1 a85 1 * Id: netdb.h,v 1.12.2.1.4.4 2004/03/16 02:19:19 marka Exp d135 1 a135 1 /* d141 6 a146 6 char *h_name; /* official name of host */ char **h_aliases; /* alias list */ int h_addrtype; /* host address type */ int h_length; /* length of address */ char **h_addr_list; /* list of addresses from name server */ #define h_addr h_addr_list[0] /* address, for backward compatibility */ d149 1 a149 1 /* d154 3 a156 3 char *n_name; /* official name of net */ char **n_aliases; /* alias list */ int n_addrtype; /* net address type */ d161 1 a161 1 uint32_t n_net; /* network # */ d169 4 a172 4 char *s_name; /* official service name */ char **s_aliases; /* alias list */ int s_port; /* port # */ char *s_proto; /* protocol to use */ d176 3 a178 3 char *p_name; /* official protocol name */ char **p_aliases; /* alias list */ int p_proto; /* protocol # */ d195 4 a198 4 int ai_flags; /* AI_xxx */ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ d200 1 a200 1 int __ai_pad0; /* ABI compatibility */ d202 1 a202 1 socklen_t ai_addrlen; /* length of ai_addr */ d204 1 a204 1 int __ai_pad0; /* ABI compatbility */ d206 3 a208 3 char *ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ d212 1 a212 1 /* d218 2 a219 2 #define NETDB_INTERNAL -1 /* see errno */ #define NETDB_SUCCESS 0 /* no problem */ d221 5 a225 4 #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /* Valid name, no data record of requested type */ d227 1 a227 1 #define NO_ADDRESS NO_DATA /* no address, look for MX record */ d235 11 a245 11 #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #define EAI_AGAIN 2 /* temporary failure in name resolution */ #define EAI_BADFLAGS 3 /* invalid value for ai_flags */ #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /* ai_family not supported */ #define EAI_MEMORY 6 /* memory allocation failure */ #define EAI_NODATA 7 /* no address associated with hostname */ #define EAI_NONAME 8 /* hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /* servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /* ai_socktype not supported */ #define EAI_SYSTEM 11 /* system error returned in errno */ d252 1 a252 1 /* d268 1 a268 1 /* d276 1 a276 1 /* d286 1 a286 1 /* @ 1.55.4.1 log @Catch up with now-somewhat-dated netbsd-4. These changes took longer than expected for me to actually get around to merging. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.55.2.1 2007/05/17 21:25:10 jdc Exp $ */ d85 1 a85 1 * Id: netdb.h,v 1.15.18.6 2006/10/02 01:23:09 marka Exp d127 1 a127 1 #define _PATH_SERVICES_DB "/var/db/services.db" d135 1 a135 1 /*% d141 6 a146 6 char *h_name; /*%< official name of host */ char **h_aliases; /*%< alias list */ int h_addrtype; /*%< host address type */ int h_length; /*%< length of address */ char **h_addr_list; /*%< list of addresses from name server */ #define h_addr h_addr_list[0] /*%< address, for backward compatiblity */ d149 1 a149 1 /*% d154 3 a156 3 char *n_name; /*%< official name of net */ char **n_aliases; /*%< alias list */ int n_addrtype; /*%< net address type */ d161 1 a161 1 uint32_t n_net; /*%< network # */ d169 4 a172 4 char *s_name; /*%< official service name */ char **s_aliases; /*%< alias list */ int s_port; /*%< port # */ char *s_proto; /*%< protocol to use */ d176 3 a178 3 char *p_name; /*%< official protocol name */ char **p_aliases; /*%< alias list */ int p_proto; /*%< protocol # */ d195 4 a198 4 int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ int ai_family; /*%< PF_xxx */ int ai_socktype; /*%< SOCK_xxx */ int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ d200 1 a200 1 int __ai_pad0; /* ABI compatibility */ d202 1 a202 1 socklen_t ai_addrlen; /*%< length of ai_addr */ d204 1 a204 1 int __ai_pad0; /* ABI compatibility */ d206 3 a208 3 char *ai_canonname; /*%< canonical name for hostname */ struct sockaddr *ai_addr; /*%< binary address */ struct addrinfo *ai_next; /*%< next structure in linked list */ d212 1 a212 1 /*% d218 2 a219 2 #define NETDB_INTERNAL -1 /*%< see errno */ #define NETDB_SUCCESS 0 /*%< no problem */ d221 5 a226 6 #define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ #define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /*%< Valid name, no data record of requested type */ #if defined(_NETBSD_SOURCE) #define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ d234 11 a244 11 #define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ #define EAI_AGAIN 2 /*%< temporary failure in name resolution */ #define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ #define EAI_FAIL 4 /*%< non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /*%< ai_family not supported */ #define EAI_MEMORY 6 /*%< memory allocation failure */ #define EAI_NODATA 7 /*%< no address associated with hostname */ #define EAI_NONAME 8 /*%< hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ #define EAI_SYSTEM 11 /*%< system error returned in errno */ d251 1 a251 1 /*% d267 1 a267 1 /*% d275 1 a275 1 /*% d285 1 a285 1 /*% @ 1.55.2.1 log @Add missing BIND 9.4.x include file and library changes (requested by tron in ticket #662). @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.59 2007/05/10 17:45:50 christos Exp $ */ d85 1 a85 1 * Id: netdb.h,v 1.15.18.6 2006/10/02 01:23:09 marka Exp d127 1 a127 1 #define _PATH_SERVICES_DB "/var/db/services.db" d135 1 a135 1 /*% d141 6 a146 6 char *h_name; /*%< official name of host */ char **h_aliases; /*%< alias list */ int h_addrtype; /*%< host address type */ int h_length; /*%< length of address */ char **h_addr_list; /*%< list of addresses from name server */ #define h_addr h_addr_list[0] /*%< address, for backward compatiblity */ d149 1 a149 1 /*% d154 3 a156 3 char *n_name; /*%< official name of net */ char **n_aliases; /*%< alias list */ int n_addrtype; /*%< net address type */ d161 1 a161 1 uint32_t n_net; /*%< network # */ d169 4 a172 4 char *s_name; /*%< official service name */ char **s_aliases; /*%< alias list */ int s_port; /*%< port # */ char *s_proto; /*%< protocol to use */ d176 3 a178 3 char *p_name; /*%< official protocol name */ char **p_aliases; /*%< alias list */ int p_proto; /*%< protocol # */ d195 4 a198 4 int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ int ai_family; /*%< PF_xxx */ int ai_socktype; /*%< SOCK_xxx */ int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ d200 1 a200 1 int __ai_pad0; /* ABI compatibility */ d202 1 a202 1 socklen_t ai_addrlen; /*%< length of ai_addr */ d204 1 a204 1 int __ai_pad0; /* ABI compatibility */ d206 3 a208 3 char *ai_canonname; /*%< canonical name for hostname */ struct sockaddr *ai_addr; /*%< binary address */ struct addrinfo *ai_next; /*%< next structure in linked list */ d212 1 a212 1 /*% d218 2 a219 2 #define NETDB_INTERNAL -1 /*%< see errno */ #define NETDB_SUCCESS 0 /*%< no problem */ d221 5 a226 6 #define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ #define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /*%< Valid name, no data record of requested type */ #if defined(_NETBSD_SOURCE) #define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ d234 11 a244 11 #define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ #define EAI_AGAIN 2 /*%< temporary failure in name resolution */ #define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ #define EAI_FAIL 4 /*%< non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /*%< ai_family not supported */ #define EAI_MEMORY 6 /*%< memory allocation failure */ #define EAI_NODATA 7 /*%< no address associated with hostname */ #define EAI_NONAME 8 /*%< hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ #define EAI_SYSTEM 11 /*%< system error returned in errno */ d251 1 a251 1 /*% d267 1 a267 1 /*% d275 1 a275 1 /*% d285 1 a285 1 /*% @ 1.55.2.1.2.1 log @Apply patch, requested by spz in ticket 1413: dist/bind/ patch include/resolv.h patch include/arpa/nameser.h: patch lib/libc/include/isc/assertions.h: patch lib/libc/include/isc/eventlib.h patch lib/libc/isc/assertions.c: patch lib/libc/nameser/ns_parse.c patch lib/libc/resolv/herror.c: patch lib/libc/resolv/res_init.c patch lib/libc/resolv/res_mkquery.c: patch lib/libc/resolv/res_query.c patch lib/libc/resolv/res_send.c: patch usr.sbin/bind/Makefile.inc patch usr.sbin/bind/include/config.h: patch usr.sbin/bind/include/dns/code.h: patch usr.sbin/bind/include/dns/enumclass.h: patch usr.sbin/bind/include/dns/enumtype.h: patch usr.sbin/bind/include/dns/rdatastruct.h: patch usr.sbin/bind/include/isc/platform.h: patch usr.sbin/bind/include/lwres/netdb.h: patch usr.sbin/bind/include/lwres/platform.h: patch usr.sbin/bind/libisc/Makefile: patch lib/libc/inet/inet_addr.c new file Update bind to 9.4-ESV-R4, latest version of the 9.4 line. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.55.2.1 2007/05/17 21:25:10 jdc Exp $ */ a283 1 #define NI_WITHSCOPEID 0x00000020 @ 1.55.2.2 log @Apply patch, requested by spz in ticket 1413: dist/bind/ patch include/resolv.h patch include/arpa/nameser.h: patch lib/libc/include/isc/assertions.h: patch lib/libc/include/isc/eventlib.h patch lib/libc/isc/assertions.c: patch lib/libc/nameser/ns_parse.c patch lib/libc/resolv/herror.c: patch lib/libc/resolv/res_init.c patch lib/libc/resolv/res_mkquery.c: patch lib/libc/resolv/res_query.c patch lib/libc/resolv/res_send.c: patch usr.sbin/bind/Makefile.inc patch usr.sbin/bind/include/config.h: patch usr.sbin/bind/include/dns/code.h: patch usr.sbin/bind/include/dns/enumclass.h: patch usr.sbin/bind/include/dns/enumtype.h: patch usr.sbin/bind/include/dns/rdatastruct.h: patch usr.sbin/bind/include/isc/platform.h: patch usr.sbin/bind/include/lwres/netdb.h: patch usr.sbin/bind/include/lwres/platform.h: patch usr.sbin/bind/libisc/Makefile: patch lib/libc/inet/inet_addr.c new file Update bind to 9.4-ESV-R4, latest version of the 9.4 line. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.55.2.1 2007/05/17 21:25:10 jdc Exp $ */ a283 1 #define NI_WITHSCOPEID 0x00000020 @ 1.54 log @add services.db @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.53 2006/02/17 15:55:01 ginsbach Exp $ */ d185 1 a185 1 * To accomodate for this while preserving binary compatibility with the @ 1.53 log @Add EAI_OVERFLOW as specified in RFC3493, POSIX and XPG6. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.52 2006/01/24 17:08:58 christos Exp $ */ d126 3 @ 1.52 log @PR/32614: Yves-Emmanuel JUTARD: Typing error in some comment ;-) @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.51 2005/04/18 19:39:45 kleink Exp $ */ d242 4 a245 3 #define EAI_BADHINTS 12 #define EAI_PROTOCOL 13 #define EAI_MAX 14 @ 1.51 log @Move the (at this time private) get{proto,serv}ent_r() prototypes and data structures into the libc sources until the interface gets redone. Approved by christos. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.50 2005/03/21 13:30:50 kleink Exp $ */ d143 1 a143 1 #define h_addr h_addr_list[0] /* address, for backward compatiblity */ d219 1 a219 1 #define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ @ 1.50 log @Add restrict qualifiers to getaddrinfo() and getnameinfo() arguments. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.49 2005/03/17 10:16:14 kleink Exp $ */ a337 40 #if defined(_NETBSD_SOURCE) && defined(_LIBC) struct protoent_data { FILE *fp; struct protoent proto; char **aliases; size_t maxaliases; int stayopen; char *line; void *dummy; }; struct protoent *getprotoent_r(struct protoent *, struct protoent_data *); struct protoent *getprotobyname_r(const char *, struct protoent *, struct protoent_data *); struct protoent *getprotobynumber_r(int, struct protoent *, struct protoent_data *); void setprotoent_r(int, struct protoent_data *); void endprotoent_r(struct protoent_data *); struct servent_data { FILE *fp; struct servent serv; char **aliases; size_t maxaliases; int stayopen; char *line; void *dummy; }; struct servent *getservent_r(struct servent *, struct servent_data *); struct servent *getservbyname_r(const char *, const char *, struct servent *, struct servent_data *); struct servent *getservbyport_r(int, const char *, struct servent *, struct servent_data *); void setservent_r(int, struct servent_data *); void endservent_r(struct servent_data *); #endif /* _NETBSD_SOURCE && _LIBC */ @ 1.49 log @Remove already #if 0'ed getipnode*() prototypes and related definitions; we are not going to ship those. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.48 2005/02/03 04:39:32 perry Exp $ */ d328 6 a333 4 int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **); int getnameinfo(const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, int); @ 1.48 log @de-__P -- the hack is long since useless. Discussed with christos, matt, kleink, others. Approved by christos. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.47 2004/11/16 06:00:51 itojun Exp $ */ a258 10 #if 0 /* * Flag values for getipnodebyname() */ #define AI_V4MAPPED 0x00000008 #define AI_ALL 0x00000010 #define AI_ADDRCONFIG 0x00000020 #define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG) #endif a305 7 #if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \ defined(_NETBSD_SOURCE) #if 0 /* we do not ship these */ struct hostent *getipnodebyaddr(const void *, size_t, int, int *); struct hostent *getipnodebyname(const char *, int, int, int *); #endif #endif @ 1.48.2.1 log @Pull up revision 1.50 (requested by kleink in ticket #40): Add restrict qualifiers to getaddrinfo() and getnameinfo() arguments. @ text @d1 1 a1 1 /* $NetBSD$ */ d345 4 a348 6 int getaddrinfo(const char * __restrict, const char * __restrict, const struct addrinfo * __restrict, struct addrinfo ** __restrict); int getnameinfo(const struct sockaddr * __restrict, socklen_t, char * __restrict, socklen_t, char * __restrict, socklen_t, int); @ 1.48.2.2 log @Pull up revision 1.51 (requested by kleink in ticket #172): Move the (at this time private) get{proto,serv}ent_r() prototypes and data structures into the libc sources until the interface gets redone. Approved by christos. @ text @d355 40 @ 1.47 log @remove NI_WITHSCOPEID @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.46 2004/11/07 01:48:01 christos Exp $ */ d300 4 a303 4 void endhostent __P((void)); void endnetent __P((void)); void endprotoent __P((void)); void endservent __P((void)); d307 1 a307 1 void freehostent __P((struct hostent *)); d310 2 a311 2 struct hostent *gethostbyaddr __P((const char *, socklen_t, int)); struct hostent *gethostbyname __P((const char *)); d313 1 a313 1 struct hostent *gethostbyname2 __P((const char *, int)); d315 1 a315 1 struct hostent *gethostent __P((void)); d319 2 a320 2 struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *)); struct hostent *getipnodebyname __P((const char *, int, int, int *)); d323 9 a331 9 struct netent *getnetbyaddr __P((uint32_t, int)); struct netent *getnetbyname __P((const char *)); struct netent *getnetent __P((void)); struct protoent *getprotobyname __P((const char *)); struct protoent *getprotobynumber __P((int)); struct protoent *getprotoent __P((void)); struct servent *getservbyname __P((const char *, const char *)); struct servent *getservbyport __P((int, const char *)); struct servent *getservent __P((void)); d333 2 a334 2 void herror __P((const char *)); const char *hstrerror __P((int)); d336 1 a336 1 void sethostent __P((int)); d338 1 a338 1 /* void sethostfile __P((const char *)); */ d340 2 a341 2 void setnetent __P((int)); void setprotoent __P((int)); d344 7 a350 7 void setservent __P((int)); int getaddrinfo __P((const char *, const char *, const struct addrinfo *, struct addrinfo **)); int getnameinfo __P((const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, int)); void freeaddrinfo __P((struct addrinfo *)); const char *gai_strerror __P((int)); d352 1 a352 1 void setservent __P((int)); d366 7 a372 7 struct protoent *getprotoent_r __P((struct protoent *, struct protoent_data *)); struct protoent *getprotobyname_r __P((const char *, struct protoent *, struct protoent_data *)); struct protoent *getprotobynumber_r __P((int, struct protoent *, struct protoent_data *)); void setprotoent_r __P((int, struct protoent_data *)); void endprotoent_r __P((struct protoent_data *)); d384 7 a390 7 struct servent *getservent_r __P((struct servent *, struct servent_data *)); struct servent *getservbyname_r __P((const char *, const char *, struct servent *, struct servent_data *)); struct servent *getservbyport_r __P((int, const char *, struct servent *, struct servent_data *)); void setservent_r __P((int, struct servent_data *)); void endservent_r __P((struct servent_data *)); @ 1.46 log @Resolve conflicts. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.1.1.4 2004/11/07 01:33:17 christos Exp $ */ a288 3 #if defined(_NETBSD_SOURCE) #define NI_WITHSCOPEID 0x00000020 #endif @ 1.45 log @Fix proto for gethostent to match reality (takes void args) @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.44 2004/08/17 02:29:56 ginsbach Exp $ */ @ 1.44 log @Restore gethostent() as a supported interface. Yes, it maybe obsolete but it is specified by IEEE Std 1003.1, 2004 Edition (POSIX) and the X/Open standards (Issue 6 and XNS 5.2). * revert change removing gethostent() from gethostbyname(3) man page * delete kruft from gethnamaddr.c leaving only gethostent() as a wrapper around _gethtent(). * revert recent changes to + restore gethostent() prototype + restore freehostent() prototype; handle similar to non-shipped getipnodby*() prototypes + use correct XOPEN_SOURCE version (520 not 500) for freeaddrinfo() prototype; interface specified by XNS5.2 not XNS5 Reviewd by and . @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.43 2004/08/11 16:13:00 drochner Exp $ */ d318 1 a318 1 struct hostent *gethostent __P((const char *, int)); @ 1.43 log @Delete prototypes for gethostent() and freehostent(); there functions don't exist in libc. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.42 2004/05/25 14:49:38 christos Exp $ */ d307 6 d318 1 @ 1.42 log @notyet is in the users namespace as pointed out by klaus. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.41 2004/05/25 13:55:48 christos Exp $ */ a306 4 #if (_XOPEN_SOURCE - 0) >= 500 && (_XOPEN_SOURCE - 0) < 600 || \ defined(_NETBSD_SOURCE) void freehostent __P((struct hostent *)); #endif a311 1 struct hostent *gethostent __P((void)); @ 1.41 log @we don't implement getipnode*(), so don't define their flags for now. It confuses some software (ntpd). @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.40 2004/05/24 12:34:28 yamt Exp $ */ d260 1 a260 1 #ifdef notyet @ 1.40 log @remove a duplicated prototype of getprotoent_r. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.39 2004/05/21 02:14:39 christos Exp $ */ d260 1 d269 1 @ 1.39 log @Import selected changes from bind9. Follow the copyright structure there. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.38 2004/05/08 18:55:23 kleink Exp $ */ a369 1 struct protoent *getprotoent_r __P((struct protoent *, struct protoent_data *)); @ 1.38 log @* __sparc64__ -> __sparc__ && _LP64, * add a comment on the purpose of __ai_pad0. Both suggested by mrg. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.37 2004/05/08 18:52:15 kleink Exp $ */ a3 29 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /*- a29 3 * * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * Id: netdb.h,v 4.9.1.2 1993/05/17 09:59:01 vixie Exp d32 1 a32 1 * d39 1 a39 1 * d49 31 d83 5 d89 1 a89 1 #define _NETDB_H_ a96 1 d102 1 a102 1 #define socklen_t __socklen_t d111 1 d113 2 d116 2 d119 2 d122 2 d126 1 d128 1 d130 1 d143 1 a143 1 #define h_addr h_addr_list[0] /* address, for backward compatibility */ d219 1 a219 1 #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ d259 8 d288 1 a288 1 #define NI_WITHSCOPEID 0x00000020 /*KAME extension*/ d290 1 d296 1 a296 1 #define SCOPE_DELIMITER '%' /*KAME extension*/ d343 1 d349 1 a349 1 char *gai_strerror __P((int)); @ 1.37 log @struct netnet.n_net used to be an unsigned long integer. In XNS5, and subsequently in POSIX-2001 it was changed to socklen_t. To accomodate for this while preserving binary compatibility with the old interface, prepend or append 32 bits of padding, depending on the (LP64 data model) architecture's endianness. Fixes PR standards/21411 from Ben Harris. This should be deleted the next time the libc major number is incremented. Also, update getnetbyaddr(3)'s `net' argument accordingly. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.36 2004/04/14 04:37:59 itojun Exp $ */ d181 2 a182 2 #if defined(__sparc64__) int __ai_pad0; d186 1 a186 1 int __ai_pad0; @ 1.36 log @fix comment (there could be more than 3 AI_xxx) @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.35 2004/04/14 04:37:06 itojun Exp $ */ d88 1 d139 9 a147 1 unsigned long n_net; /* network # XXX */ d298 1 a298 1 struct netent *getnetbyaddr __P((unsigned long, int)); @ 1.35 log @implement AI_NUMERICSERV (as defined in RFC3493) @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.34 2004/03/20 18:22:22 christos Exp $ */ d168 1 a168 1 int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ @ 1.34 log @Do not expose the current implementation of the serv*_r proto*_r functions, since this is not how we will implement them when we do. From discussions with Brian Ginsbach and Soda-san. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.33 2004/02/23 16:05:19 christos Exp $ */ d230 5 a234 3 #define AI_NUMERICHOST 0x00000004 /* prevent name resolution */ /* valid flags for addrinfo */ #define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST) @ 1.34.2.1 log @Pull up revisions 1.43-1.45 (requested by ginsbach in ticket #834): Restore gethostent() as a supported interface. Yes, it may be obsolete, but it is specified by IEEE Std 1003.1, 2004 Edition (POSIX) and the X/Open standards (Issue 66 and XNS 5.2). Here: remove freehostent() declaration, since that one is no longer in libc. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.34 2004/03/20 18:22:22 christos Exp $ */ d270 1 a270 1 #if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \ a271 1 #if 0 /* we do not ship this */ a273 1 #endif @ 1.34.2.1.2.1 log @Pull up revision 1.51 via patch (requested by kleink in ticket #1547): Instead of pulling in all of , just define wchar_t here. Addresses PR lib/29987. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.34.2.1 2004/09/11 11:52:52 he Exp $ */ a320 2 #include /* for FILE */ @ 1.34.2.1.2.2 log @Pull up revisions 1.37 - 1.38 (requested by kleink in ticket #2015): 1.37: struct netent.n_net used to be an unsigned long integer. In XNS5, and subsequently in POSIX-2001 it was changed to socklen_t. To accomodate for this while preserving binary compatibility with the old interface, prepend or append 32 bits of padding, depending on the (LP64 data model) architecture's endianness. Fixes PR standards/21411 from Ben Harris. This should be deleted the next time the libc major number is incremented. Also, update getnetbyaddr(3)'s `net' argument accordingly. 1.38: * __sparc64__ -> __sparc__ && _LP64, * add a comment on the purpose of __ai_pad0. Both suggested by mrg. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.34.2.1.2.1 2005/05/24 23:39:44 riz Exp $ */ a87 1 #include d138 1 a138 9 #if (defined(__sparc__) && defined(_LP64)) || \ (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN)) int __n_pad0; /* ABI compatibility */ #endif uint32_t n_net; /* network # */ #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \ (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN)) int __n_pad0; /* ABI compatibility */ #endif d172 2 a173 2 #if defined(__sparc__) && defined(_LP64) int __ai_pad0; /* ABI compatibility */ d177 1 a177 1 int __ai_pad0; /* ABI compatbility */ d289 1 a289 1 struct netent *getnetbyaddr __P((uint32_t, int)); @ 1.33 log @in servent and protent data: - add a dummy field for extensions. - add a line field to keep the current line buffer. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.32 2004/02/19 19:30:30 christos Exp $ */ d317 1 a317 1 #if defined(_NETBSD_SOURCE) d356 1 a356 1 #endif /* _NETBSD_SOURCE */ @ 1.32 log @protoent_r/servent_r @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.31 2003/08/07 09:44:10 agc Exp $ */ d325 2 d344 2 @ 1.31 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22270, verified by myself. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.30 2003/05/05 14:20:03 bjh21 Exp $ */ d316 37 @ 1.30 log @Header cleanup: * IPv6 functions are in POSIX-2001, so make them visible there. * freehostent(), getipnodebyaddr() and getipnodebyname() are _only_ in XNS5.2, so don't expose them to XSH6 or POSIX applications. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.29 2003/04/28 23:16:14 bjh21 Exp $ */ d44 1 a44 5 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors @ 1.29 log @Add a new feature-test macro, _NETBSD_SOURCE. If this is defined by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.28 2003/01/06 13:26:25 wiz Exp $ */ d169 2 a170 1 #if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE) d209 2 a210 1 #if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE) d225 1 a225 1 #endif /* (_XOPEN_SOURCE - 0) >= 520 || _NETBSD_SOURCE */ d230 2 a231 1 #if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE) d239 2 a240 1 #if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE) d267 1 a267 1 #endif /* (_XOPEN_SOURCE - 0) >= 520 || _NETBSD_SOURCE */ d274 2 a275 1 #if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) d284 2 a285 1 #if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE) d310 2 a311 1 #if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE) @ 1.28 log @compatibility, not compatiblity. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.27 2002/08/26 13:38:19 itojun Exp $ */ d94 1 d110 1 a110 1 #if !defined(_XOPEN_SOURCE) d169 1 a169 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d193 1 a193 1 #if !defined(_XOPEN_SOURCE) d201 1 a201 1 #if !defined(_XOPEN_SOURCE) d208 1 a208 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d223 1 a223 1 #endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE - 0) >= 520 */ d228 1 a228 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d236 1 a236 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d240 1 a240 1 #if !defined(_XOPEN_SOURCE) d253 1 a253 1 #if !defined(_XOPEN_SOURCE) d260 1 a260 1 #if !defined(_XOPEN_SOURCE) d263 1 a263 1 #endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE - 0) >= 520 */ d270 1 a270 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500 d275 1 a275 1 #if !defined(_XOPEN_SOURCE) d279 1 a279 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d294 1 a294 1 #if !defined(_XOPEN_SOURCE) d299 1 a299 1 #if !defined(_XOPEN_SOURCE) d304 1 a304 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 @ 1.27 log @remove unused/unsupported AI_xx. notified by PR 18072 @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.26 2002/05/22 09:42:37 kleink Exp $ */ d130 1 a130 1 #define h_addr h_addr_list[0] /* address, for backward compatiblity */ @ 1.26 log @Turn the flags argument to getnameinfo(3) back into an int (from unsigned int); this is consistent with RFC2553, the current draft-ietf-ipngwg- rfc2553bis-05 and the majority of deployed implementations. Also, there is an effort under way to have this changed back to int in XBD6/XSH6, XNS, and POSIX-2001 TC1. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.25 2002/05/14 14:35:36 kleink Exp $ */ a232 15 #endif #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 #define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ #endif #if !defined(_XOPEN_SOURCE) #define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ #endif #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ #define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */ #endif #if !defined(_XOPEN_SOURCE) /* special recommended flags for getipnodebyname */ #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) @ 1.25 log @More XNS5.2/POSIX-2001 alignment: change the flags argument to getnameinfo() from int to unsigned int. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.24 2002/05/14 14:31:05 kleink Exp $ */ d322 1 a322 1 socklen_t, char *, socklen_t, unsigned int)); @ 1.25.2.1 log @Resolve pullup-1-6 ticket #14 (itojun), original commit message: > Turn the flags argument to getnameinfo(3) back into an int (from unsigned > int); this is consistent with RFC2553, the current draft-ietf-ipngwg- > rfc2553bis-05 and the majority of deployed implementations. > > Also, there is an effort under way to have this changed back to int in > XBD6/XSH6, XNS, and POSIX-2001 TC1. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.26 2002/05/22 09:42:37 kleink Exp $ */ d322 1 a322 1 socklen_t, char *, socklen_t, int)); @ 1.25.2.2 log @Pull up revision 1.27 (requested by itojun in ticket #730): remove unused/unsupported AI_xx. notified by PR 18072 @ text @d1 1 a1 1 /* $NetBSD$ */ d233 15 @ 1.24 log @Align with XNS5.2/POSIX-2001: change hostlen and servlen arguments to getnameinfo() from size_t to socklen_t. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.23 2002/05/14 13:45:13 kleink Exp $ */ d322 1 a322 1 socklen_t, char *, socklen_t, int)); @ 1.23 log @struct addrinfo.ai_addrlen used to be a size_t, per RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and draft-ietf-ipngwg-rfc2553bis-02 it was changed to a socklen_t. To accomodate for this while preserving binary compatibility with the old interface, prepend or append 32 bits of padding, depending on the (LP64 data model) architecture's endianness. This should be deleted the next time the libc major number is incremented. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.22 2002/05/10 22:02:11 kleink Exp $ */ d322 1 a322 1 size_t, char *, size_t, int)); @ 1.22 log @Update several name space/feature protection tests to check for _XOPEN_SOURCE >= 520 (XNS 5.2), either rigging it for that version or replacing the (wrong) test for >= 500. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.21 2001/04/26 12:55:31 kleink Exp $ */ d92 1 d96 8 d157 11 d174 7 a180 1 size_t ai_addrlen; /* length of ai_addr */ a277 9 /* * Data types */ #include #ifndef socklen_t typedef __socklen_t socklen_t; #define socklen_t __socklen_t #endif @ 1.21 log @Change the `len' arguemtn to gethostbyaddr(3) from int to socklen_t in accordance with XNS5.2; fixes PR standards/12703. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.20 2000/07/30 06:33:18 lukem Exp $ */ d148 1 a148 1 #if !defined(_XOPEN_SOURCE) d181 1 a181 1 #if !defined(_XOPEN_SOURCE) d196 1 a196 1 #endif /* !_XOPEN_SOURCE */ d201 1 a201 1 #if !defined(_XOPEN_SOURCE) d209 1 a209 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500 d215 1 a215 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500 d218 2 d224 1 a224 1 #if !defined(_XOPEN_SOURCE) d228 1 d231 1 d241 1 d243 1 d248 1 d250 2 a251 1 #endif /* !_XOPEN_SOURCE */ d276 1 a276 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500 d301 1 a301 1 #if !defined(_XOPEN_SOURCE) @ 1.20 log @be consistent with #define usage @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.19 2000/07/28 09:38:15 kleink Exp $ */ d262 1 a262 1 struct hostent *gethostbyaddr __P((const char *, int, int)); @ 1.20.2.1 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.20 2000/07/30 06:33:18 lukem Exp $ */ d262 1 a262 1 struct hostent *gethostbyaddr __P((const char *, socklen_t, int)); @ 1.20.2.2 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.20.2.1 2001/10/08 20:13:45 nathanw Exp $ */ a91 1 #include a94 8 /* * Data types */ #ifndef socklen_t typedef __socklen_t socklen_t; #define socklen_t __socklen_t #endif d148 1 a148 12 /* * Note: ai_addrlen used to be a size_t, per RFC 2553. * In XNS5.2, and subsequently in POSIX-2001 and * draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t. * To accomodate for this while preserving binary compatibility with the * old interface, we prepend or append 32 bits of padding, depending on * the (LP64) architecture's endianness. * * This should be deleted the next time the libc major number is * incremented. */ #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d154 1 a154 7 #if defined(__sparc64__) int __ai_pad0; #endif socklen_t ai_addrlen; /* length of ai_addr */ #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) int __ai_pad0; #endif d181 1 a181 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d196 1 a196 1 #endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE - 0) >= 520 */ d201 1 a201 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d209 1 a209 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d215 1 a215 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 a217 2 #endif #if !defined(_XOPEN_SOURCE) d222 1 a222 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 a225 1 #if !defined(_XOPEN_SOURCE) a227 1 #endif a236 1 #if !defined(_XOPEN_SOURCE) a237 1 #endif a241 1 #if !defined(_XOPEN_SOURCE) d243 9 a252 1 #endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE - 0) >= 520 */ d268 1 a268 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d293 1 a293 1 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520 d297 1 a297 1 socklen_t, char *, socklen_t, int)); @ 1.20.2.3 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD$ */ d233 15 @ 1.20.2.4 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.20.2.3 2002/08/27 23:52:36 nathanw Exp $ */ d130 1 a130 1 #define h_addr h_addr_list[0] /* address, for backward compatibility */ @ 1.19 log @Avoid recursion with traditional cpp. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.18 2000/06/04 08:51:23 itojun Exp $ */ d193 3 a195 3 #define EAI_BADHINTS 12 #define EAI_PROTOCOL 13 #define EAI_MAX 14 d237 1 a237 1 #define NI_WITHSCOPEID 0x00000020 /*KAME extension*/ d242 1 a242 1 #define SCOPE_DELIMITER '%' /*KAME extension*/ @ 1.18 log @correct arg type for getnameinfo(3) for RFC2553 conformance. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.17 2000/02/09 12:25:07 itojun Exp $ */ d251 1 a251 1 #define socklen_t socklen_t @ 1.18.2.1 log @be consistent with #define usage @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.18 2000/06/04 08:51:23 itojun Exp $ */ d193 3 a195 3 #define EAI_BADHINTS 12 #define EAI_PROTOCOL 13 #define EAI_MAX 14 d237 1 a237 1 #define NI_WITHSCOPEID 0x00000020 /*KAME extension*/ d242 1 a242 1 #define SCOPE_DELIMITER '%' /*KAME extension*/ @ 1.18.2.2 log @revert previous (wrong branch )-: @ text @d193 3 a195 3 #define EAI_BADHINTS 12 #define EAI_PROTOCOL 13 #define EAI_MAX 14 d237 1 a237 1 #define NI_WITHSCOPEID 0x00000020 /*KAME extension*/ d242 1 a242 1 #define SCOPE_DELIMITER '%' /*KAME extension*/ @ 1.18.2.3 log @Pull up revision 1.19 (requested by kleink): Avoid traditional CPP recursion in definition of socklen_t. Fixes PR#12761. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.18.2.2 2000/07/30 06:31:53 lukem Exp $ */ d251 1 a251 1 #define socklen_t __socklen_t @ 1.18.2.4 log @pullup include/netdb.h 1.27 (itojun) remove unused/unsupported AI_xx. notified by PR 18072 @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.18.2.3 2001/05/01 10:28:45 he Exp $ */ d207 13 @ 1.17 log @revise extended scoped address format support. delimiter and the order is changed, based on discussion in ipngwg scoped address cabal. past code: fe80::1@@de0 now: de0%fe80::1 this will be in sync with next extended address format proposal (which should be final - I don't want to make this kind of change again). @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.16 2000/01/05 14:40:14 mjl Exp $ */ d245 9 d296 1 a296 1 int getnameinfo __P((const struct sockaddr *, size_t, char *, @ 1.17.2.1 log @Sync w/ netbsd-1-5-base. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.18 2000/06/04 08:51:23 itojun Exp $ */ a244 9 /* * Data types */ #include #ifndef socklen_t typedef __socklen_t socklen_t; #define socklen_t socklen_t #endif d287 1 a287 1 int getnameinfo __P((const struct sockaddr *, socklen_t, char *, @ 1.16 log @Correct typo in comment. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.15 1999/12/20 06:48:11 itojun Exp $ */ d242 1 a242 1 #define SCOPE_DELIMITER '@@' /*KAME extension*/ @ 1.15 log @hide functions that are not supplied. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.14 1999/12/12 10:49:37 itojun Exp $ */ d171 1 a171 1 #define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ @ 1.14 log @add #define for kame's extension to scoped IPv6 numeric address. (see draft-ietf-ipngwg-scopedaddr-format-00.txt) @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.13 1999/07/03 13:25:21 kleink Exp $ */ d260 1 d263 1 @ 1.13 log @* Since we actually only need size_t to be defined, nuke the previous inclusion of and define size_t via . * Various namespace protection issues, using XNS5.2 D2.0 as a reference. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.12 1999/07/01 18:15:41 itojun Exp $ */ d237 6 @ 1.13.4.1 log @Pull up to last week's -current. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.15 1999/12/20 06:48:11 itojun Exp $ */ a236 6 #define NI_WITHSCOPEID 0x00000020 /*KAME extension*/ /* * Scope delimit character */ #define SCOPE_DELIMITER '@@' /*KAME extension*/ a253 1 #if 0 /* we do not ship these */ a255 1 #endif @ 1.12 log @define IPv6 library functions and structures, as defined in RFC2292 and RFC2553. define internal state structure for IPv6-transport resolver. Commits for source code will follow. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.11 1998/05/10 17:32:39 kleink Exp $ */ d91 1 d93 1 a93 1 #include d95 4 a98 1 #include d148 1 d159 1 d181 1 d196 1 d201 1 d207 1 d209 1 d211 2 d214 2 d220 1 d222 1 d237 1 d244 1 d246 1 d253 1 d256 1 d276 1 d283 1 @ 1.11 log @* Remove the inclusion of ; the most common use for this was the MAXHOSTNAMELEN constant whose semantics are not intended for network database lookup operations, and which pollutes name space. * Per XSH98, provide symbols from . * Add various bits of name space protection. @ text @d1 30 a30 1 /* $NetBSD: netdb.h,v 1.10 1998/02/03 04:20:36 perry Exp $ */ d92 1 d144 11 d172 49 d226 1 d233 2 d254 6 @ 1.10 log @fix/restore Id @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.9 1998/02/02 21:07:35 perry Exp $ */ a61 1 #include d64 3 d72 1 d98 1 a98 1 unsigned long n_net; /* network # */ d119 1 d122 1 d127 1 d129 1 d138 1 d140 1 d151 1 d154 1 d156 1 d158 1 @ 1.9 log @merge lite-2 @ text @d1 1 a1 1 /* $NetBSD$ */ d36 1 a36 1 * $Id: netdb.h,v 4.9.1.2 1993/05/17 09:59:01 vixie Exp $ @ 1.8 log @rcsid fascism @ text @d1 3 a3 3 /* * ++Copyright++ 1980, 1983, 1988, 1993 * - d34 3 d39 1 a39 1 * d46 1 a46 1 * a58 5 /* * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * $NetBSD: netdb.h,v 1.7 1997/04/13 09:26:21 mrg Exp $ */ a62 3 #if (!defined(BSD)) || (BSD < 199306) # include #endif a149 14 /* This is nec'y to make this include file properly replace the sun version. */ #ifdef sun #ifdef __GNU_LIBRARY__ #include #else struct rpcent { char *r_name; /* name of server for this rpc program */ char **r_aliases; /* alias list */ int r_number; /* rpc program number */ }; struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); #endif /* __GNU_LIBRARY__ */ #endif /* sun */ @ 1.7 log @merge bind 4.9.5-P1. @ text @d58 1 a58 1 * $Id: netdb.h,v 8.7 1996/05/09 05:59:09 vixie Exp $ @ 1.6 log @update these for bind 4.9.3-p1. @ text @d58 1 a58 1 * $Id: netdb.h,v 8.6 1995/12/03 08:31:12 vixie Exp d138 1 a138 1 struct netent *getnetbyaddr __P((long, int)); /* u_long? */ @ 1.5 log @Declare h_error as suggested by PR #1065 and done by many other systems. @ text @d1 5 a5 5 /* $NetBSD: netdb.h,v 1.4 1994/10/26 00:56:09 cgd Exp $ */ /*- * Copyright (c) 1980, 1983, 1988 Regents of the University of California. * All rights reserved. d34 2 d37 22 a58 1 * @@(#)netdb.h 5.15 (Berkeley) 4/3/91 d64 6 d76 2 d94 1 a94 1 * fits in 32 bits -- probably a poor one. d121 2 a122 2 extern int h_errno; a128 2 #include d136 1 d148 1 a148 1 char *hstrerror __P((int)); d155 14 @ 1.4 log @new RCS ID format. @ text @d1 1 a1 1 /* $NetBSD$ */ d89 2 @ 1.3 log @new resolver. changes from 4.9.2 by , as well as a number of features and optimizations by myself. @ text @d1 2 d35 1 a35 2 * from: @@(#)netdb.h 5.15 (Berkeley) 4/3/91 * $Id: netdb.h,v 1.2 1993/08/01 18:44:45 mycroft Exp $ @ 1.2 log @Add RCS identifiers. @ text @d34 1 a34 1 * $Id: $ d103 2 a104 2 struct hostent *gethostbyname __P((char *)); struct hostent *gethostent __P((void)); d115 1 @ 1.1 log @Initial revision @ text @d33 2 a34 1 * @@(#)netdb.h 5.15 (Berkeley) 4/3/91 @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @BIND 4.9.5-P1 include bits @ text @d1 3 a3 5 /* * ++Copyright++ 1980, 1983, 1988, 1993 * - * Copyright (c) 1980, 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. a31 9 * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. d33 1 a33 15 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * --Copyright-- */ /* * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * $Id: netdb.h,v 8.7 1996/05/09 05:59:09 vixie Exp $ a38 6 #include #if (!defined(BSD)) || (BSD < 199306) # include #endif #include a44 2 extern int h_errno; d61 1 a61 1 * fits in an unsigned long -- probably a poor one. a87 2 #define NETDB_INTERNAL -1 /* see errno */ #define NETDB_SUCCESS 0 /* no problem */ d94 2 d102 3 a104 4 struct hostent *gethostbyname __P((const char *)); struct hostent *gethostbyname2 __P((const char *, int)); struct hostent *gethostent __P((void)); struct netent *getnetbyaddr __P((unsigned long, int)); a113 1 const char *hstrerror __P((int)); a119 14 /* This is nec'y to make this include file properly replace the sun version. */ #ifdef sun #ifdef __GNU_LIBRARY__ #include #else struct rpcent { char *r_name; /* name of server for this rpc program */ char **r_aliases; /* alias list */ int r_number; /* rpc program number */ }; struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); #endif /* __GNU_LIBRARY__ */ #endif /* sun */ @ 1.1.1.3 log @import lite-2 @ text @d1 3 a3 1 /*- a33 3 * * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * $Id: netdb.h,v 4.9.1.2 1993/05/17 09:59:01 vixie Exp $ d36 1 a36 1 * d43 1 a43 1 * d56 5 d64 6 d76 2 d121 2 a128 2 #include d136 1 d138 1 a138 1 struct netent *getnetbyaddr __P((long, int)); /* u_long? */ d148 1 a148 1 char *hstrerror __P((int)); d155 14 @ 1.1.1.4 log @Import again. @ text @d1 1 a1 5 /* $NetBSD: netdb.h,v 1.1.1.1 2004/05/17 23:44:41 christos Exp $ */ /* * ++Copyright++ 1980, 1983, 1988, 1993 * - d32 3 d37 1 a37 1 * d44 1 a44 1 * a53 31 * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by WIDE Project and * its contributors. * 4. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - a56 5 /* * @@(#)netdb.h 8.1 (Berkeley) 6/2/93 * Id: netdb.h,v 1.12.2.1.4.4 2004/03/16 02:19:19 marka Exp */ d60 1 a60 14 #include #include #if (!defined(BSD)) || (BSD < 199306) # include #endif #include #include #include #include #ifndef _PATH_HEQUIV #define _PATH_HEQUIV "/etc/hosts.equiv" #endif #ifndef _PATH_HOSTS a61 2 #endif #ifndef _PATH_NETWORKS a62 2 #endif #ifndef _PATH_PROTOCOLS a63 2 #endif #ifndef _PATH_SERVICES a64 14 #endif #if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) #define __h_errno __h_errno_location #endif __BEGIN_DECLS extern int * __h_errno __P((void)); __END_DECLS #if defined(_REENTRANT) || \ (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) #define h_errno (*__h_errno()) #else extern int h_errno; #endif a103 23 struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ #if defined(sun) && defined(_SOCKLEN_T) #ifdef __sparc9 int _ai_pad; #endif socklen_t ai_addrlen; #else size_t ai_addrlen; /* length of ai_addr */ #endif #ifdef __linux struct sockaddr *ai_addr; /* binary address */ char *ai_canonname; /* canonical name for hostname */ #else char *ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ #endif struct addrinfo *ai_next; /* next structure in linked list */ }; a108 2 #define NETDB_INTERNAL -1 /* see errno */ #define NETDB_SUCCESS 0 /* no problem */ d115 1 a115 125 /* * Error return codes from getaddrinfo() */ #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #define EAI_AGAIN 2 /* temporary failure in name resolution */ #define EAI_BADFLAGS 3 /* invalid value for ai_flags */ #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /* ai_family not supported */ #define EAI_MEMORY 6 /* memory allocation failure */ #define EAI_NODATA 7 /* no address associated with hostname */ #define EAI_NONAME 8 /* hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /* servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /* ai_socktype not supported */ #define EAI_SYSTEM 11 /* system error returned in errno */ #define EAI_BADHINTS 12 #define EAI_PROTOCOL 13 #define EAI_MAX 14 /* * Flag values for getaddrinfo() */ #define AI_PASSIVE 0x00000001 #define AI_CANONNAME 0x00000002 #define AI_NUMERICHOST 0x00000004 #define AI_MASK 0x00000007 /* * Flag values for getipnodebyname() */ #define AI_V4MAPPED 0x00000008 #define AI_ALL 0x00000010 #define AI_ADDRCONFIG 0x00000020 #define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG) /* * Constants for getnameinfo() */ #define NI_MAXHOST 1025 #define NI_MAXSERV 32 /* * Flag values for getnameinfo() */ #define NI_NOFQDN 0x00000001 #define NI_NUMERICHOST 0x00000002 #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 #define NI_WITHSCOPEID 0x00000020 #define NI_NUMERICSCOPE 0x00000040 /* * Scope delimit character */ #define SCOPE_DELIMITER '%' #ifdef _REENTRANT #if defined (__hpux) || defined(__osf__) || defined(_AIX) #define _MAXALIASES 35 #define _MAXLINELEN 1024 #define _MAXADDRS 35 #define _HOSTBUFSIZE (BUFSIZ + 1) struct hostent_data { struct in_addr host_addr; char *h_addr_ptrs[_MAXADDRS + 1]; char hostaddr[_MAXADDRS]; char hostbuf[_HOSTBUFSIZE]; char *host_aliases[_MAXALIASES]; char *host_addrs[2]; FILE *hostf; #ifdef __osf__ int svc_gethostflag; int svc_gethostbind; #endif #ifdef __hpux short _nsw_src; short _flags; char *current; int currentlen; #endif }; struct netent_data { FILE *net_fp; #ifdef __osf__ char line[_MAXLINELEN]; #endif #ifdef __hpux char line[_MAXLINELEN+1]; #endif char *net_aliases[_MAXALIASES]; #ifdef __osf__ int _net_stayopen; int svc_getnetflag; #endif #ifdef __hpux short _nsw_src; short _flags; char *current; int currentlen; #endif }; struct protoent_data { FILE *proto_fp; #ifdef __osf__ char line[1024]; #endif #ifdef __hpux char line[_MAXLINELEN+1]; #endif char *proto_aliases[_MAXALIASES]; #ifdef __osf__ int _proto_stayopen; int svc_getprotoflag; #endif #ifdef __hpux short _nsw_src; short _flags; char *current; int currentlen; #endif }; a116 22 struct servent_data { FILE *serv_fp; #ifdef __osf__ char line[_MAXLINELEN]; #endif #ifdef __hpux char line[_MAXLINELEN+1]; #endif char *serv_aliases[_MAXALIASES]; #ifdef __osf__ int _serv_stayopen; int svc_getservflag; #endif #ifdef __hpux short _nsw_src; short _flags; char *current; int currentlen; #endif }; #endif #endif a121 1 void freehostent __P((struct hostent *)); a123 1 struct hostent *gethostbyname2 __P((const char *, int)); d125 1 a125 3 struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *)); struct hostent *getipnodebyname __P((const char *, int, int, int *)); struct netent *getnetbyaddr __P((unsigned long, int)); d135 1 a135 1 const char *hstrerror __P((int)); a140 149 int getaddrinfo __P((const char *, const char *, const struct addrinfo *, struct addrinfo **)); int getnameinfo __P((const struct sockaddr *, size_t, char *, size_t, char *, size_t, int)); void freeaddrinfo __P((struct addrinfo *)); const char *gai_strerror __P((int)); struct hostent *getipnodebyname __P((const char *, int, int, int *)); struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *)); void freehostent __P((struct hostent *)); #ifdef __GLIBC__ int getnetgrent __P((/* const */ char **, /* const */ char **, /* const */ char **)); void setnetgrent __P((const char *)); void endnetgrent __P((void)); int innetgr __P((const char *, const char *, const char *, const char *)); #endif #ifdef _REENTRANT #if defined(__hpux) || defined(__osf__) || defined(_AIX) int gethostbyaddr_r __P((const char *, int, int, struct hostent *, struct hostent_data *)); int gethostbyname_r __P((const char *, struct hostent *, struct hostent_data *)); int gethostent_r __P((struct hostent *, struct hostent_data *)); #if defined(_AIX) void sethostent_r __P((int, struct hostent_data *)); #else int sethostent_r __P((int, struct hostent_data *)); #endif #if defined(__hpux) int endhostent_r __P((struct hostent_data *)); #else void endhostent_r __P((struct hostent_data *)); #endif #if defined(__hpux) || defined(__osf__) int getnetbyaddr_r __P((int, int, struct netent *, struct netent_data *)); #else int getnetbyaddr_r __P((long, int, struct netent *, struct netent_data *)); #endif int getnetbyname_r __P((const char *, struct netent *, struct netent_data *)); int getnetent_r __P((struct netent *, struct netent_data *)); int setnetent_r __P((int, struct netent_data *)); #ifdef __hpux int endnetent_r __P((struct netent_data *buffer)); #else void endnetent_r __P((struct netent_data *buffer)); #endif int getprotobyname_r __P((const char *, struct protoent *, struct protoent_data *)); int getprotobynumber_r __P((int, struct protoent *, struct protoent_data *)); int getprotoent_r __P((struct protoent *, struct protoent_data *)); int setprotoent_r __P((int, struct protoent_data *)); #ifdef __hpux int endprotoent_r __P((struct protoent_data *)); #else void endprotoent_r __P((struct protoent_data *)); #endif int getservbyname_r __P((const char *, const char *, struct servent *, struct servent_data *)); int getservbyport_r __P((int, const char *, struct servent *, struct servent_data *)); int getservent_r __P((struct servent *, struct servent_data *)); int setservent_r __P((int, struct servent_data *)); #ifdef __hpux int endservent_r __P((struct servent_data *)); #else void endservent_r __P((struct servent_data *)); #endif #else /* defined(sun) || defined(bsdi) */ #ifdef __GLIBC__ int gethostbyaddr_r __P((const char *, int, int, struct hostent *, char *, size_t, struct hostent **, int *)); int gethostbyname_r __P((const char *, struct hostent *, char *, size_t, struct hostent **, int *)); int gethostent_r __P((struct hostent *, char *, size_t, struct hostent **, int *)); #else struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *, char *, int, int *)); struct hostent *gethostbyname_r __P((const char *, struct hostent *, char *, int, int *)); struct hostent *gethostent_r __P((struct hostent *, char *, int, int *)); #endif void sethostent_r __P((int)); void endhostent_r __P((void)); #ifdef __GLIBC__ int getnetbyname_r __P((const char *, struct netent *, char *, size_t, struct netent **, int*)); int getnetbyaddr_r __P((unsigned long int, int, struct netent *, char *, size_t, struct netent **, int*)); int getnetent_r __P((struct netent *, char *, size_t, struct netent **, int*)); #else struct netent *getnetbyname_r __P((const char *, struct netent *, char *, int)); struct netent *getnetbyaddr_r __P((long, int, struct netent *, char *, int)); struct netent *getnetent_r __P((struct netent *, char *, int)); #endif void setnetent_r __P((int)); void endnetent_r __P((void)); #ifdef __GLIBC__ int getprotobyname_r __P((const char *, struct protoent *, char *, size_t, struct protoent **)); int getprotobynumber_r __P((int, struct protoent *, char *, size_t, struct protoent **)); int getprotoent_r __P((struct protoent *, char *, size_t, struct protoent **)); #else struct protoent *getprotobyname_r __P((const char *, struct protoent *, char *, int)); struct protoent *getprotobynumber_r __P((int, struct protoent *, char *, int)); struct protoent *getprotoent_r __P((struct protoent *, char *, int)); #endif void setprotoent_r __P((int)); void endprotoent_r __P((void)); #ifdef __GLIBC__ int getservbyname_r __P((const char *name, const char *, struct servent *, char *, size_t, struct servent **)); int getservbyport_r __P((int port, const char *, struct servent *, char *, size_t, struct servent **)); int getservent_r __P((struct servent *, char *, size_t, struct servent **)); #else struct servent *getservbyname_r __P((const char *name, const char *, struct servent *, char *, int)); struct servent *getservbyport_r __P((int port, const char *, struct servent *, char *, int)); struct servent *getservent_r __P((struct servent *, char *, int)); #endif void setservent_r __P((int)); void endservent_r __P((void)); #ifdef __GLIBC__ int getnetgrent_r __P((char **, char **, char **, char *, size_t)); #endif #endif #endif a142 14 /* This is nec'y to make this include file properly replace the sun version. */ #ifdef sun #ifdef __GNU_LIBRARY__ #include #else struct rpcent { char *r_name; /* name of server for this rpc program */ char **r_aliases; /* alias list */ int r_number; /* rpc program number */ }; struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); #endif /* __GNU_LIBRARY__ */ #endif /* sun */ @ 1.1.1.5 log @import files from bind-9-4-0-rc2 @ text @d1 2 d91 1 a91 1 * $Id: netdb.h,v 1.15.18.6 2006/10/02 01:23:09 marka Exp $ d136 1 a136 1 /*% d142 6 a147 6 char *h_name; /*%< official name of host */ char **h_aliases; /*%< alias list */ int h_addrtype; /*%< host address type */ int h_length; /*%< length of address */ char **h_addr_list; /*%< list of addresses from name server */ #define h_addr h_addr_list[0] /*%< address, for backward compatiblity */ d150 1 a150 1 /*% d155 4 a158 4 char *n_name; /*%< official name of net */ char **n_aliases; /*%< alias list */ int n_addrtype; /*%< net address type */ unsigned long n_net; /*%< network # */ d162 4 a165 4 char *s_name; /*%< official service name */ char **s_aliases; /*%< alias list */ int s_port; /*%< port # */ char *s_proto; /*%< protocol to use */ d169 3 a171 3 char *p_name; /*%< official protocol name */ char **p_aliases; /*%< alias list */ int p_proto; /*%< protocol # */ d175 4 a178 4 int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ int ai_family; /*%< PF_xxx */ int ai_socktype; /*%< SOCK_xxx */ int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ d180 1 a180 1 #ifdef __sparcv9 d185 1 a185 1 size_t ai_addrlen; /*%< length of ai_addr */ d188 2 a189 2 struct sockaddr *ai_addr; /*%< binary address */ char *ai_canonname; /*%< canonical name for hostname */ d191 2 a192 2 char *ai_canonname; /*%< canonical name for hostname */ struct sockaddr *ai_addr; /*%< binary address */ d194 1 a194 1 struct addrinfo *ai_next; /*%< next structure in linked list */ d197 1 a197 1 /*% d202 8 a209 7 #define NETDB_INTERNAL -1 /*%< see errno */ #define NETDB_SUCCESS 0 /*%< no problem */ #define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ #define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /*%< Valid name, no data record of requested type */ #define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ d213 11 a223 11 #define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ #define EAI_AGAIN 2 /*%< temporary failure in name resolution */ #define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ #define EAI_FAIL 4 /*%< non-recoverable failure in name resolution */ #define EAI_FAMILY 5 /*%< ai_family not supported */ #define EAI_MEMORY 6 /*%< memory allocation failure */ #define EAI_NODATA 7 /*%< no address associated with hostname */ #define EAI_NONAME 8 /*%< hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ #define EAI_SYSTEM 11 /*%< system error returned in errno */ d228 1 a228 1 /*% d236 1 a236 1 /*% d244 1 a244 1 /*% d250 1 a250 1 /*% d261 1 a261 1 /*% d296 1 a296 1 #if defined(__osf__) || defined(_AIX) a312 7 #ifdef _AIX int _net_stayopen; char *current; int currentlen; void *_net_reserv1; /* reserved for future use */ void *_net_reserv2; /* reserved for future use */ #endif a316 4 #ifdef _AIX int _proto_stayopen; char line[_MAXLINELEN]; #endif a333 6 #ifdef _AIX int currentlen; char *current; void *_proto_reserv1; /* reserved for future use */ void *_proto_reserv2; /* reserved for future use */ #endif d338 1 a338 1 #if defined(__osf__) || defined(_AIX) a354 7 #ifdef _AIX int _serv_stayopen; char *current; int currentlen; void *_serv_reserv1; /* reserved for future use */ void *_serv_reserv2; /* reserved for future use */ #endif a461 10 #ifdef _AIX int setnetgrent_r __P((const char *, void **)); void endnetgrent_r __P((void **)); /* * Note: AIX's netdb.h declares innetgr_r() as: * int innetgr_r(char *, char *, char *, char *, struct innetgr_data *); */ int innetgr_r __P((const char *, const char *, const char *, const char *)); #endif d464 1 a464 1 #if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) d481 1 a481 1 #if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) d497 1 a497 1 #if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) d513 1 a513 1 #if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) d543 3 a545 3 char *r_name; /*%< name of server for this rpc program */ char **r_aliases; /*%< alias list */ int r_number; /*%< rpc program number */ d550 1 a551 1 /*! \file */ @ 1.1.1.6 log @Import bind 9.4.0. @ text @a0 2 /* $NetBSD$ */ d89 1 a89 1 * Id: netdb.h,v 1.15.18.6 2006/10/02 01:23:09 marka Exp @ 1.1.1.7 log @import libbind include files. @ text @d1 1 a1 1 /* $NetBSD: netdb.h,v 1.1.1.1 2009/04/12 15:33:32 christos Exp $ */ d91 1 a91 1 * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp d127 1 a127 1 extern int * __h_errno(void); d382 36 a417 36 void endhostent(void); void endnetent(void); void endprotoent(void); void endservent(void); void freehostent(struct hostent *); struct hostent *gethostbyaddr(const char *, int, int); struct hostent *gethostbyname(const char *); struct hostent *gethostbyname2(const char *, int); struct hostent *gethostent(void); struct hostent *getipnodebyaddr(const void *, size_t, int, int *); struct hostent *getipnodebyname(const char *, int, int, int *); struct netent *getnetbyaddr(unsigned long, int); struct netent *getnetbyname(const char *); struct netent *getnetent(void); struct protoent *getprotobyname(const char *); struct protoent *getprotobynumber(int); struct protoent *getprotoent(void); struct servent *getservbyname(const char *, const char *); struct servent *getservbyport(int, const char *); struct servent *getservent(void); void herror(const char *); const char *hstrerror(int); void sethostent(int); /* void sethostfile(const char *); */ void setnetent(int); void setprotoent(int); void setservent(int); int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **); int getnameinfo(const struct sockaddr *, size_t, char *, size_t, char *, size_t, int); void freeaddrinfo(struct addrinfo *); const char *gai_strerror(int); struct hostent *getipnodebyname(const char *, int, int, int *); struct hostent *getipnodebyaddr(const void *, size_t, int, int *); void freehostent(struct hostent *); d419 6 a424 6 int getnetgrent(/* const */ char **, /* const */ char **, /* const */ char **); void setnetgrent(const char *); void endnetgrent(void); int innetgr(const char *, const char *, const char *, const char *); d429 5 a433 5 int gethostbyaddr_r(const char *, int, int, struct hostent *, struct hostent_data *); int gethostbyname_r(const char *, struct hostent *, struct hostent_data *); int gethostent_r(struct hostent *, struct hostent_data *); d435 1 a435 1 void sethostent_r(int, struct hostent_data *); d437 1 a437 1 int sethostent_r(int, struct hostent_data *); d440 1 a440 1 int endhostent_r(struct hostent_data *); d442 1 a442 1 void endhostent_r(struct hostent_data *); d446 2 a447 2 int getnetbyaddr_r(int, int, struct netent *, struct netent_data *); d449 2 a450 2 int getnetbyaddr_r(long, int, struct netent *, struct netent_data *); d452 4 a455 4 int getnetbyname_r(const char *, struct netent *, struct netent_data *); int getnetent_r(struct netent *, struct netent_data *); int setnetent_r(int, struct netent_data *); d457 1 a457 1 int endnetent_r(struct netent_data *buffer); d459 1 a459 1 void endnetent_r(struct netent_data *buffer); d462 6 a467 6 int getprotobyname_r(const char *, struct protoent *, struct protoent_data *); int getprotobynumber_r(int, struct protoent *, struct protoent_data *); int getprotoent_r(struct protoent *, struct protoent_data *); int setprotoent_r(int, struct protoent_data *); d469 1 a469 1 int endprotoent_r(struct protoent_data *); d471 1 a471 1 void endprotoent_r(struct protoent_data *); d474 6 a479 6 int getservbyname_r(const char *, const char *, struct servent *, struct servent_data *); int getservbyport_r(int, const char *, struct servent *, struct servent_data *); int getservent_r(struct servent *, struct servent_data *); int setservent_r(int, struct servent_data *); d481 1 a481 1 int endservent_r(struct servent_data *); d483 1 a483 1 void endservent_r(struct servent_data *); d486 2 a487 2 int setnetgrent_r(char *, void **); void endnetgrent_r(void **); d492 2 a493 2 int innetgr_r(const char *, const char *, const char *, const char *); d498 12 a509 12 int gethostbyaddr_r(const char *, int, int, struct hostent *, char *, size_t, struct hostent **, int *); int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *); int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *); #else struct hostent *gethostbyaddr_r(const char *, int, int, struct hostent *, char *, int, int *); struct hostent *gethostbyname_r(const char *, struct hostent *, char *, int, int *); struct hostent *gethostent_r(struct hostent *, char *, int, int *); d511 2 a512 2 void sethostent_r(int); void endhostent_r(void); d515 11 a525 11 int getnetbyname_r(const char *, struct netent *, char *, size_t, struct netent **, int*); int getnetbyaddr_r(unsigned long int, int, struct netent *, char *, size_t, struct netent **, int*); int getnetent_r(struct netent *, char *, size_t, struct netent **, int*); #else struct netent *getnetbyname_r(const char *, struct netent *, char *, int); struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int); struct netent *getnetent_r(struct netent *, char *, int); d527 2 a528 2 void setnetent_r(int); void endnetent_r(void); d531 11 a541 11 int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **); int getprotobynumber_r(int, struct protoent *, char *, size_t, struct protoent **); int getprotoent_r(struct protoent *, char *, size_t, struct protoent **); #else struct protoent *getprotobyname_r(const char *, struct protoent *, char *, int); struct protoent *getprotobynumber_r(int, struct protoent *, char *, int); struct protoent *getprotoent_r(struct protoent *, char *, int); d543 2 a544 2 void setprotoent_r(int); void endprotoent_r(void); d547 11 a557 11 int getservbyname_r(const char *name, const char *, struct servent *, char *, size_t, struct servent **); int getservbyport_r(int port, const char *, struct servent *, char *, size_t, struct servent **); int getservent_r(struct servent *, char *, size_t, struct servent **); #else struct servent *getservbyname_r(const char *name, const char *, struct servent *, char *, int); struct servent *getservbyport_r(int port, const char *, struct servent *, char *, int); struct servent *getservent_r(struct servent *, char *, int); d559 2 a560 2 void setservent_r(int); void endservent_r(void); d563 1 a563 1 int getnetgrent_r(char **, char **, char **, char *, size_t); d584 1 @