History log of /freebsd-head/lib/libc/net/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
792fd42d7804a39bbe85e54b87c2c18dc09dffe5 12-Aug-2019 kib <kib@FreeBSD.org> Increase YPMAXRECORD to 16M to be compatible with Linux.

Since YP protocol definition uses the constant to declare
variable-size opaque byte strings, the change should be binary
compatible with existing installations which do not expose keys or
values larger than 1024 bytes.

All uses of local variables with YPMAXRECORD sizes were removed to
avoid insane stack use. On the other hand, variables with static
lifetime should be fine and only result in increased VA use.

Glibc made same change, increasing the allowed length for keys and
values in YP to 16M, in 2013.

Reviewed by: markj
Discussed with: ian
Sponsored by: Mellanox Technologies
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D20900
ethostbynis.c
etnetbynis.c
etservent.c
834b83aa265f0110f4b93384831b9ee7861ba3a1 29-May-2019 pfg <pfg@FreeBSD.org> typo: suppported.
thdr.c
cda8035706041a99d8f6ec0fcba8ef672f2d4f0d 04-Apr-2019 rgrimes <rgrimes@FreeBSD.org> Use IN_foo() macros from sys/netinet/in.h inplace of handcrafted code

There are a few places that use hand crafted versions of the macros
from sys/netinet/in.h making it difficult to actually alter the
values in use by these macros. Correct that by replacing handcrafted
code with proper macro usage.

Reviewed by: karels, kristof
Approved by: bde (mentor)
MFC after: 3 weeks
Sponsored by: John Gilmore
Differential Revision: https://reviews.freebsd.org/D19317
etnameinfo.c
b3225cf1b57c57ed67a9e008ce8661cb69bb9638 02-Mar-2019 tuexen <tuexen@FreeBSD.org> Use correct buffer sizes in sctp_get[lp]addrs().

MFC after: 3 days
ctp_sys_calls.c
d9fad5273bd0a67d94336715d6f2dfe4120d1e38 10-Feb-2019 pluknet <pluknet@FreeBSD.org> Sync "struct addrinfo" declaration with netdb.h.

Notably, unlike in OpenBSD, which the man page was copied from,
ai_canonname and ai_addr come in different order.

PR: 225880
MFC after: 1 week
etaddrinfo.3
2c75604e5507b609d05403b97c343e35ecc5db63 23-Dec-2018 pfg <pfg@FreeBSD.org> gai_strerror() - Update string error messages according to RFC 3493.

Error messages in gai_strerror(3) vary largely among OSs.

For new software we largely replaced the obsoleted EAI_NONAME and
with EAI_NODATA but we never updated the corresponding message to better
match the intended use. We also have references to ai_flags and ai_family
which are not very descriptive for non-developer end users.

Bring new new error messages based on informational RFC 3493, which has
obsoleted RFC 2553, and make them consistent among the header adn
manpage.

MFC after: 1 month
Differentical Revision: D18630
ai_strerror.3
ai_strerror.c
ace2d9b55fd911f1e63820cadfe20158d1cab3b5 27-Nov-2018 des <des@FreeBSD.org> Style cleanup.
scachedcli.c
b2d9f288543486f398985b3b33034f362ee6969b 10-Nov-2018 trasz <trasz@FreeBSD.org> Don't call stat(2) on nsswitch.conf(5) every time nsdispatch(3)
and dependent functions (eg getpwname(3)) get called. This can
improve performance of binaries that perform a lot of name
lookups, such as gssd(8). It also matches documented behaviour
of Linux and Solaris.

The old code is left in place, should anyone need it, guarded
by #ifdef NS_REREAD_CONF.

Reviewed by: imp, bcr
MFC after: 2 weeks
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17934
sdispatch.c
bf79aaf374eff01790f95067f1af8597777862c7 15-Oct-2018 trasz <trasz@FreeBSD.org> Prevent flex(1) from generating calls to isatty(3) - and, in turn,
TIOCGETA ioctls - when parsing nsswitch.conf(5).

Reviewed by: imp, markj
Approved by: re (gjb)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17564
slexer.l
d03a843143f76432960ef84e5ec2fce068561ac3 15-Oct-2018 trasz <trasz@FreeBSD.org> Don't call dlopen(3) for built-in NSS types - "cache", "compat",
"dns", "files", "db", and "nis". It saves some path lookups during
binary startup.

Reviewed by: markj
Approved by: re (gjb, kib)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17557
sdispatch.3
sdispatch.c
e75acd8acc615c89a027bcc4577a1073f872ed92 17-Sep-2018 brd <brd@FreeBSD.org> Move hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/

This uses relative paths to make it more specific to avoid any potential
future problems with .PATH and leverages CONFS.

libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.

Approved by: re (gjb), will (mentor)
Differential Revision: https://reviews.freebsd.org/D17164
akefile.inc
osts
osts.equiv
etworks
sswitch.conf
rotocols
26c165ead9a64098315408d16c1186fe1f9cfb3c 13-Apr-2018 brooks <brooks@FreeBSD.org> Remove support for the Arcnet protocol.

While Arcnet has some continued deployment in industrial controls, the
lack of drivers for any of the PCI, USB, or PCIe NICs on the market
suggests such users aren't running FreeBSD.

Evidence in the PR database suggests that the cm(4) driver (our sole
Arcnet NIC) was broken in 5.0 and has not worked since.

PR: 182297
Reviewed by: jhibbits, vangyzen
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15057
etnameinfo.c
e95204c39d4192dc7b04ab35c21403ab8a948716 15-Mar-2018 hrs <hrs@FreeBSD.org> Make getnameinfo(3) salen requirement less strict and
document details of salen in getnameinfo(3) manual page.

getnameinfo(3) returned EAI_FAIL when salen was not equal to
the length corresponding to the value specified by sa->sa_family.
However, POSIX or RFC 3493 does not require it and RFC 4038
Sec.6.2.3 shows an example passing sizeof(struct sockaddr_storage)
to salen.

This change makes the requirement less strict by accepting
salen up to sizeof(struct sockaddr_storage). It also includes
two more changes: one is to fix return values because both SUSv4
and RFC 3493 require EAI_FAMILY when the address length is invalid,
another is to fix sa_len dependency in PF_LOCAL.

Pointed out by: Christophe Beauval
Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D14585
etnameinfo.3
etnameinfo.c
c92659280baa4f5efb81c89074f1cea55005a9bd 06-Jan-2018 imp <imp@FreeBSD.org> The source strings are from the password database which guarantees
that the data going into it is sane. Out of an abundance of caution,
limit the string copies to prevent an overflow.

CID: 1019035
cmd.c
156cfa4de4d38702c94d768a97915397d35eebc2 20-Dec-2017 ume <ume@FreeBSD.org> Don't ignore trailing spaces after numerical IP addresses.

PR: 224403
Reported by: Michael Kaufmann
Reviewed by: Michael Kaufmann
MFC after: 1 week
etaddrinfo.c
b036d1b0cd01625d4ece9bfafd4a8d47be3b5b37 13-Dec-2017 pfg <pfg@FreeBSD.org> SPDX: mostly fixes to previous changes.

Introduce the recently approved BSD-1-Clause and replace 0BSD which
never did fit well our use cases.
etifaddrs.c
f_indextoname.c
f_nameindex.c
f_nametoindex.c
9014a6e40c74437b39c10b33618d7dfbedea2362 25-Nov-2017 pfg <pfg@FreeBSD.org> libc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
ethostbynis.c
ethostnamadr.c
etifmaddrs.c
etnetbynis.c
etnetnamadr.c
etdb_private.h
scache.c
scachedcli.c
sdispatch.c
slexer.l
sparser.y
ss_backends.h
ss_compat.c
toh.c
ockatmark.c
ourcefilter.c
872b698bd4a1bfc0bf008c09228e6fd238809c75 20-Nov-2017 pfg <pfg@FreeBSD.org> General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
ai_strerror.c
etaddrinfo.c
ethostbydns.c
ethostbyht.c
etnameinfo.c
etnetbydns.c
etnetbyht.c
etproto.c
etprotoent.c
etprotoname.c
etservent.c
p6opt.c
inkaddr.c
ap_v4v6.c
ame6.c
cmd.c
cmdsh.c
ecv.c
thdr.c
ctp_sys_calls.c
end.c
ars.c
9da7bdde061c43b87cf9bb2852984b78e292b1e6 18-Nov-2017 pfg <pfg@FreeBSD.org> spdx: initial adoption of licensing ID tags.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes: yes
Differential Revision: https://reviews.freebsd.org/D13133
ther_addr.c
9eddd5d91f8af24f0ab72552adb0ff92094eaf1a 04-Oct-2017 bjk <bjk@FreeBSD.org> mdoc style: start new sentence on new line
ethostbyname.3
0540e9667e21c96249b8f148eea50ca2beb45068 04-Oct-2017 cy <cy@FreeBSD.org> Fix typo.

Reported by: se
ethostbyname.3
39ad51ea1e092913f15b0119e338884c9744282a 04-Oct-2017 cy <cy@FreeBSD.org> Clarify the wording describing the stayopen flag.

MFC after: 1 week
ethostbyname.3
e9167239034a1e475c3238f8d133ebf703424ee0 14-Sep-2017 kib <kib@FreeBSD.org> Silently handle freeaddrinfo(NULL) for compatibility with code which
works on other OSes. Also avoid unnecessary NULL check, free(NULL) is
valid.

Reviewed by: bjk (man page), hrs, hselasky, ume
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D12354
etaddrinfo.3
etaddrinfo.c
ad7b73352593c1b5420f7c2d966377a3d77531e5 11-Jul-2017 markj <markj@FreeBSD.org> Don't dlclose NSS modules from nss_atexit().

As hinted in the commit log message for r259042, this is unnecessary.
Moreover, as a result of that change we may invoke a DSO's atexit handler
after it has been unmapped.

Reviewed by: bdrewery, cem
MFC after: 1 week
Sponsored by: Dell EMC Isilon
sdispatch.c
8f0e46db3587e310749eb19d4fde3fc9eb484938 24-May-2017 trasz <trasz@FreeBSD.org> Don't end up manpage titles with a full stop.

MFC after: 2 weeks
ctp_bindx.3
ctp_getassocid.3
8b01db53744fc5816879e495c1a8a6ade55dd70b 23-May-2017 ngie <ngie@FreeBSD.org> sctp_send(3): start sentences on new lines

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
ctp_send.3
35c0325946946ac7b2b98a2a34d1de8a67e48d21 24-Apr-2017 brooks <brooks@FreeBSD.org> Remove the NATM framework including the en(4), fatm(4), hatm(4), and
patm(4) devices.

Maintaining an address family and framework has real costs when we make
infrastructure improvements. In the case of NATM we support no devices
manufactured in the last 20 years and some will not even work in modern
motherboards (some newer devices that patm(4) could be updated to
support apparently exist, but we do not currently have support).

With this change, support remains for some netgraph modules that don't
require NATM support code. It is unclear if all these should remain,
though ng_atmllc certainly stands alone.

Note well: FreeBSD 11 supports NATM and will continue to do so until at
least September 30, 2021. Improvements to the code in FreeBSD 11 are
certainly welcome.

Reviewed by: philip
Approved by: harti
etnameinfo.c
5b0d2af29a958c7a95c41ae43bc3999098b86d4b 12-Mar-2017 pfg <pfg@FreeBSD.org> libc: provide some bounds-checking through reallocarray(3).

reallocarray(3) is a non portable extension that originated in OpenBSD.
Given that it is already in FreeBSD's libc it is useful for the cases
where reallocation involves a multiplication.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9955
sdispatch.c
7e6cabd06e6caa6a02eeb86308dc0cb3f27e10da 28-Feb-2017 imp <imp@FreeBSD.org> Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
yteorder.3
ethostbydns.c
ethostbyht.c
ethostbyname.3
etipnodebyname.3
etnetbydns.c
etnetbyht.c
etnetent.3
etproto.c
etprotoent.3
etprotoent.c
etprotoname.c
etservent.3
etservent.c
net.3
net_net.3
inkaddr.3
inkaddr.c
ap_v4v6.c
sdispatch.3
cmd.3
cmd.c
cmdsh.3
ecv.c
esolver.3
end.c
e8b8b11bdd6ddf3679937fbd4978fe0235b2de3c 14-Feb-2017 markj <markj@FreeBSD.org> Fix indentation in nss_configure().

MFC after: 1 week
Sponsored by: Dell EMC Isilon
sdispatch.c
7723a4672fd05670ac21e74faf987b3f4dca8bfa 14-Feb-2017 markj <markj@FreeBSD.org> Register nss_atexit() before parsing nsswitch.conf for the first time.

NSS modules are loaded when nsswitch.conf is parsed and may register their
own atexit handlers with libc. nss_atexit() unloads any dynamically loaded
NSS modules, so it should run only after the modules' atexit handlers have
been invoked.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
sdispatch.c
3eaa694e96ba7fbdb63833293ae7fcb53d947ea0 02-Jan-2017 pfg <pfg@FreeBSD.org> Cleanup inelegant calloc(3) introduced in r310984.
etaddrinfo.c
a965ca9c353469a04fa7a549752950ad44bacdcb 31-Dec-2016 ngie <ngie@FreeBSD.org> Use calloc instead of malloc + memset(.., 0, ..)

MFC after: 1 week
etaddrinfo.c
e8fda789b862f937dab7d18a33b0a78a87e98f9f 07-Dec-2016 glebius <glebius@FreeBSD.org> Address regressions in SA-16:37.libc.

PR: 215105
Submitted by: <jtd2004a sbcglobal.net>
inkaddr.c
919f940b488ee9a16fb0aae4649e5f8d64774234 07-Dec-2016 tuexen <tuexen@FreeBSD.org> Fix a bug in sctp_sendmsgx(), where the sid provided by the user
was hot honored.

MFC after: 3 days
ctp_sys_calls.c
e7aed7dacb18c4f4b4568ec011a236861495a1c4 06-Dec-2016 glebius <glebius@FreeBSD.org> Fix possible buffer overflow(s) in link_ntoa(3).

A specially crafted sockaddr_dl argument can trigger a static buffer overflow
in the libc library, with possibility to rewrite with arbitrary data following
static buffers that belong to other library functions.

Reviewed by: kib
Security: FreeBSD-SA-16:37.libc
inkaddr.c
c55b7e416e60ea6fe7633001b3d60a93c32c1522 31-Aug-2016 ache <ache@FreeBSD.org> 'addrlen' does not matter when we need to find the first non-zero bit in
the byte from the left and 'addrlen' already counted in 'lim'.

PR: 212121
Submitted by: Herbie.Robinson@stratus.com
MFC after: 7 days
etaddrinfo.c
ame6.c
2907a6ce65fbb0507887a197a2f5b6b6049b5e2e 31-Aug-2016 ache <ache@FreeBSD.org> Apply the same qsort() usage fix as in r304911 getaddrinfo.c
qsort() can't be stabilized with just return(-1) alone.

MFC after: 3 days
ame6.c
ceacc6e98f2952c02ecd8f1fbcd339b8d4eefe5b 27-Aug-2016 ache <ache@FreeBSD.org> The formal behavior of qsort is unstable with regard to objects that
are equal. Unfortunately, RFC 3484 requires that otherwise equal objects
remain in the order supplied by the DNS server. The present code attempts
to deal with this by returning -1 for objects that are equal (i.e.,
returns that the first parameter is less then the second parameter).
Unfortunately, the qsort API does not state that the first parameter
passed in is in any particular position in the list.

PR: 212122
Submitted by: Herbie.Robinson@stratus.com
MFC after: 3 days
etaddrinfo.c
52cd198be4589cbf776b7f6fe62cf139624c15ab 18-Aug-2016 kevlo <kevlo@FreeBSD.org> Remove <sys/types.h> from the SYNOPSIS.
net_net.3
237cd762eb844be8e4ea85ab58e70f17141c8abc 16-Aug-2016 brooks <brooks@FreeBSD.org> Don't conflate enum nss_status return values values with int (NS_SUCCESS,
NS_RETURN) values.

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D6046
ss_compat.c
7455c7c12553d5839f14bf3265a36d836513d884 13-Aug-2016 ngie <ngie@FreeBSD.org> Initialize `ai` to NULL and test for `ai` with type-appropriate values

Depending on the address family and ai_flags containing AI_V4MAPPED,
it might not do a proper DNS lookup on the provided DNS address

Convert some `ai` boolean true/false checks to NULL/non-NULL while here.

MFC after: 1 week
PR: 211790
Reported by: Herbie.Robinson@stratus.com
Sponsored by: EMC / Isilon Storage Division
etaddrinfo.c
43835a137db2c11db762c613be4c1be506f8cfb8 28-Jul-2016 ed <ed@FreeBSD.org> Add NI_NUMERICSCOPE.

POSIX also declares NI_NUMERICSCOPE, which makes getnameinfo() return a
numerical scope identifier. The interesting thing is that support for
this is already present in code, but #ifdef disabled. Expose this
functionality by placing a definition for it in <netdb.h>.

While there, remove references to NI_WITHSCOPEID, as that got removed 11
years ago.
etnameinfo.3
etnameinfo.c
497997a69bd7f9e02dfcde3499989e514cb8459e 08-Jun-2016 ngie <ngie@FreeBSD.org> Revert r301707

getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and
I didn't verify that it worked before committing the change

MFC after: 1 week
X-MFC with: r301707
Pointyhat to: ngie
etnetbyht.c
294c1737c4d8903a3d2398191bb65f3b23506f60 08-Jun-2016 ngie <ngie@FreeBSD.org> Use NULL instead of `0` in _ht_getnetbyname(..)

- getnetent returns NULL on completion/error.
- .h_aliases is NULL terminated.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
etnetbyht.c
221174558526b2192a2b6d58ee66cd7a00b6f69a 16-May-2016 truckman <truckman@FreeBSD.org> Don't call free_addrselectpolicy(&policyhead) before policyhead has been
initialized.

Reported by: Coverity
CID: 1018727
ame6.c
4ab2fdcc3ac162feb65377a8114013affb1e6d14 10-May-2016 bapt <bapt@FreeBSD.org> Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard
ethostbydns.c
69669cbe99c92053594f595bbb8afd89c18a1892 30-Apr-2016 pfg <pfg@FreeBSD.org> libc: spelling fixes.

Mostly on comments.
etaddrinfo.c
ethostnamadr.c
etnetnamadr.c
ame6.c
scachedcli.c
es_config.h
f6bdba80cc348d97bf82fc4574c6d09020fdce13 20-Apr-2016 pfg <pfg@FreeBSD.org> Minor indentation issue.
p6opt.c
7ce919789adf84fa6f5faf5c751276f3544d0992 20-Apr-2016 pfg <pfg@FreeBSD.org> libc: use our roundup2/rounddown2() macros when param.h is available.

rounddown2 tends to produce longer lines than the original code but
still it makes the code more readable.
p6opt.c
ame6.c
f0171d33b464dee5ac308f1d13ede2ddd9d030a7 18-Apr-2016 avos <avos@FreeBSD.org> libc: do not include <sys/types.h> where <sys/param.h> was already included

According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
ase64.c
ther_addr.c
ui64.c
etaddrinfo.c
ethostbydns.c
etprotoent.c
etservent.c
esiod.c
p6opt.c
ap_v4v6.c
thdr.c
ourcefilter.c
282f928dc777faf3cee67a648bb770bbd54276d0 16-Apr-2016 pfg <pfg@FreeBSD.org> libc: make some more use of the nitems() macro.

We have an nitems() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Given that it is available already without adding additional
headers and other parts of libc already use it, extend a bit
more its use.
etaddrinfo.c
ame6.c
0ffec0d8f23ca9114cd0d0cfe501a5684b87ba56 11-Apr-2016 pfg <pfg@FreeBSD.org> libc: cleanup unnecessary semicolons.

Found with devel/coccinelle.
etservent.c
6e91d78151e10ed31c475cafe6a1e1f11950c1d9 10-Apr-2016 pfg <pfg@FreeBSD.org> libc: replace 0 with NULL for pointers.

While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

Reviewed by: bde (previous version - all new bugs are mine)
ase64.c
etifaddrs.c
etservent.c
cmd.c
991d92a87e83e1b02cebee9d52af4a783ab2c66b 26-Mar-2016 bdrewery <bdrewery@FreeBSD.org> Implement (ACFLAGS|CFLAGS|CXXFLAGS).SRC globally.

Sponsored by: EMC / Isilon Storage Division
akefile.inc
f47a3ea623c557f630291b361ce6e4cfb6583cf9 29-Feb-2016 trasz <trasz@FreeBSD.org> sendmsg(3) -> sendmsg(2)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
ctp_recvmsg.3
ctp_sendmsg.3
273b2d98ab2ca59155970f71a9edc9d7c79d0e68 27-Jan-2016 bdrewery <bdrewery@FreeBSD.org> Replace nslexer.l->nslexer.c custom rule with a -D CFLAG.

This avoids reproducing the lex logic which had dependencies set wrong
and used an intermediate file for modifying the YY_BUF_SIZE.

This has only been possible since flex 2.5.37 was imported in r250873,
which uses #ifndef YY_BUF_SIZE.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
akefile.inc
46307c6f50aa27e604086cfcd78d7ee2fc110f4b 27-Jan-2016 bdrewery <bdrewery@FreeBSD.org> nslexer.c does not depend on nsparser.h.

nslexer.o depends on nsparser.h, which is already added by bsd.lib.mk
and .depend.

This reverts r237402.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
akefile.inc
01ec5b07468c4eeb80addcdd5d813cb84fa698ea 24-Jan-2016 tuexen <tuexen@FreeBSD.org> sctp_sendx() needs to provide the assoc_id back.

MFC after: 3 days
ctp_sys_calls.c
082dc2cf03d114a3d2908246313b1786d01fee4d 24-Jan-2016 tuexen <tuexen@FreeBSD.org> sctp_sendv() needs to fill in the association id on return.

MFC after: 3 days
ctp_sys_calls.c
6e0a844f5977035a478412383687a45c81b301d8 25-Dec-2015 ume <ume@FreeBSD.org> Remove _gethostbynisname() and _gethostbynisaddr(). These functions
used to be called from getipnodebyname().

MFC after: 1 week
ethostbynis.c
etdb_private.h
d7802dffd4ee6ac735089a2386db94f2f89a5ebb 22-Dec-2015 ume <ume@FreeBSD.org> We don't need to use a temporary buffer, here.

MFC after: 1 week
ap_v4v6.c
5e0b3f1167b3511ce001af9ce6d5ffec64fbef24 21-Dec-2015 ume <ume@FreeBSD.org> Use _map_v4v6_address().

MFC after: 1 week
ame6.c
e93f3f0c71917233d6e21e3fd05e1520d2d84984 21-Dec-2015 ume <ume@FreeBSD.org> Simplify _map_v4v6_address().

Suggested by: hrs
MFC after: 1 week
ap_v4v6.c
17cf2dee7c4e8009b175da82f34d607b8097696b 21-Dec-2015 ume <ume@FreeBSD.org> If we end up following a CNAME chain that does not find
any data return that instead of internal error.

PR: 156684
Obtained from: NetBSD
MFC after: 1 week
etaddrinfo.c
0acd4707c2de0395810f64d41cb2462db1f8f5ee 20-Dec-2015 jilles <jilles@FreeBSD.org> libc: Use namespace.h in a few more files.

libc now no longer calls fstat(), socketpair() and wait(), only the
underscore-prefixed versions (_waitpid() instead of wait()).
cmdsh.c
33741c0d9ada9a85f36241592179ac7ca0b53436 20-Dec-2015 ume <ume@FreeBSD.org> addrinfo.ai_family is an address family, not a protocol family.

PR: 162434
MFC after: 1 week
etaddrinfo.3
207f69d62148253cffcc776c310c024dc2a3b6d1 18-Dec-2015 ume <ume@FreeBSD.org> Use _map_v4v6_address().

Suggested by: hrs
MFC after: 1 week
etaddrinfo.c
360683f7540313cc6eba3fc15a17d1911810ad8b 18-Dec-2015 ume <ume@FreeBSD.org> Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).

PR: 198092
MFC after: 1 week
etaddrinfo.3
etaddrinfo.c
2b36705452063b0e71d9d9ce3102c9c065f34fe1 12-Dec-2015 ume <ume@FreeBSD.org> RFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.
Since it breaks certain jail setup, we ignore just 127.0.0.1
instead of whole loopback address range.

PR: 192014
Reviewed by: hrs
MFC after: 1 week
etaddrinfo.c
f4f7ae3e2a6ea35712dbcc0a66a82e95cbb9b627 10-Dec-2015 ume <ume@FreeBSD.org> The calls to RES_SET_H_ERRNO() macro on error paths wind up
dereferencing an uninitialized res.

PR: 202142
Submitted by: Sean Boudreau
MFC after: 1 week
etaddrinfo.c
b687b6568b05675174c1d1df9588eb73a71d8c29 03-Nov-2015 hrs <hrs@FreeBSD.org> sdl->sdl_len in sockaddr_dl can be longer than
sizeof(struct sockaddr_dl).
etnameinfo.c
2fd2750b544183aa48cc1f2543446ef603d47f02 05-Oct-2015 jgh <jgh@FreeBSD.org> - address grammar

PR: 203440 (based on)
Submitted by: ceratv@rpi.edu
Approved by: wblock@ (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3813
etaddrinfo.3
a14f7a3926a1385132a88aa2368edb79e97e438e 03-Oct-2015 hrs <hrs@FreeBSD.org> - Move PF_LOCAL at the end of the array. PF_INET{,6} is used more often.

- Add SOCKTYPE_ANY to PF_LOCAL.

- Apply AI_CANONNAME to only AF_INET{,6}. It is not meaningful for the
other AFs.
etaddrinfo.c
6e42fc823f517f7e299a40b021d3ede6cc278a6b 20-Sep-2015 rodrigc <rodrigc@FreeBSD.org> Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
cmd.c
4dfb6c3572b83ea3e8bebf716589664f3f9067dd 20-Sep-2015 rodrigc <rodrigc@FreeBSD.org> Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
ethostbydns.c
etnetbydns.c
etservent.c
inkaddr.c
slexer.l
sparser.y
ecv.c
thdr.c
end.c
f7aca4b6732b0fec7e07f68e00a786539595cea1 20-Sep-2015 rodrigc <rodrigc@FreeBSD.org> Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.
ethostnamadr.c
etnetnamadr.c
etproto.c
ap_v4v6.c
etdb_private.h
5289640ead5ecd2ecf9af747d21eaeace28423f6 20-Sep-2015 rodrigc <rodrigc@FreeBSD.org> Add declarations to eliminate -Wmissing-prototypes warnings
ss_compat.c
fd3fe449bf2c62b6d6b48da4a79a96a3de2a4e38 20-Sep-2015 rodrigc <rodrigc@FreeBSD.org> Define _NS_PRIVATE to make declarations visible.
This eliminates -Wmissing-prototypes warnings.
scache.c
587e2d1829e97e387ee88d2a8d47dd6905f702dc 20-Sep-2015 rodrigc <rodrigc@FreeBSD.org> Add missing includes to eliminate -Wmissing-prototypes warnings
toh.c
ockatmark.c
a3fcca6713520dc0bf112298215886bcceed5a0f 20-Sep-2015 hrs <hrs@FreeBSD.org> Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):

- In a PF_LOCAL address, "hostname" must begins with '/' and "servname"
is always NULL. All of ai_flags are ignored.

- PF_UNSPEC matches PF_LOCAL. EAI_SERVICE is not returned to make
AF-independent programming easier; "servname" is always ignored
in PF_LOCAL. In practice, PF_INET* and PF_LOCAL are
mutually-exclusive because a hostname which begins with '/' is invalid
in PF_INET*. No domain name resolution is performed for a PF_LOCAL address.

Differential Revision: https://reviews.freebsd.org/D3634
etaddrinfo.3
etaddrinfo.c
etnameinfo.3
etnameinfo.c
b76aba50082143fbcb47fa56a6c70fbbb604965a 19-Sep-2015 jilles <jilles@FreeBSD.org> libc: Consistently call _ioctl() internally, not ioctl().
ockatmark.c
9701f78cf861e384fc384747619879acb0767a1c 10-Sep-2015 tuexen <tuexen@FreeBSD.org> Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.

PR: 166483
Discussed with: eadler@
MFC after: 4 weeks
f_nametoindex.c
0e29b6e367d93b2951cabcff2e2adff60a4629a4 09-Sep-2015 hrs <hrs@FreeBSD.org> - Fix SIGSEGV when sa == NULL. NULL check in getnameinfo_inet()
did not work as expected.

- Simplify afdl table lookup.

MFC after: 3 days
etnameinfo.c
fd2a8c5a253a3142b4a1f594c4cdcae51abadf69 02-Sep-2015 hrs <hrs@FreeBSD.org> - snprintf() returns at most size-1 of the chars printed into
the buffer. (n == hostlen) also means the buffer length was
too short.

- Use sdl->sdl_data only when (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0)
to prevent redundant output.
etnameinfo.c
065fd54760762a0e85395d99681087d3cbc943d5 01-Sep-2015 hrs <hrs@FreeBSD.org> Print sdl->sdl_data when sdl->sdl_nlen > 0 as link_ntoa(3) does.

MFC after: 1 week
etnameinfo.c
146b187d13b83615f02a68c038af82670588495f 29-Aug-2015 kib <kib@FreeBSD.org> Switch libc from using _sig{procmask,action,suspend} symbols, which
are aliases for the syscall stubs and are plt-interposed, to the
libc-private aliases of internally interposed sigprocmask() etc.

Since e.g. _sigaction is not interposed by libthr, calling signal()
removes thr_sighandler() from the handler slot etc. The result was
breaking signal semantic and rtld locking.

The added __libc_sigprocmask and other symbols are hidden, they are
not exported and cannot be called through PLT. The setjmp/longjmp
functions for x86 were changed to use direct calls, and since
PIC_PROLOGUE only needed for functional PLT indirection on i386, it is
removed as well.

The PowerPC bug of calling the syscall directly in the setjmp/longjmp
implementation is kept as is.

Reported by: Pete French <petefrench@ingresso.co.uk>
Tested by: Michiel Boland <boland37@xs4all.nl>
Reviewed by: jilles (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
cmd.c
5fe6d5bd0e708a60b671115491a2000548678db7 18-Aug-2015 delphij <delphij@FreeBSD.org> - ANSIfy
- Remove the redundant _PATH_RSH definition (paths.h at r96194);
- Use pid_t for PIDs
- Note that we are at the same level of OpenBSD's counterpart of
revision 1.7 (r94757).

No functional changes.

MFC after: 2 weeks
cmdsh.c
eedf79175aef6a1b2eee42a1498b5c87d36b4681 14-Jun-2015 tuexen <tuexen@FreeBSD.org> Fix name of a constant.

MFC after: 3 days
ctp_bindx.3
8ae6fa0eb6d5fbd0626127be3f6d2cd2b3d604f6 10-May-2015 jilles <jilles@FreeBSD.org> recv(),send(): Directly call interposing entry instead of going through PLT.

recv() and send()'s calls to recvfrom() and sendto() are much like
waitpid()'s call to wait4(), and likewise need not allow PLT interposing on
the called function.
ecv.c
end.c
f913520b81e2f284bbafb592b326fcfa61a3bcf6 23-Apr-2015 tuexen <tuexen@FreeBSD.org> A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF
flag.
Thanks to Valentin Nechayev for reporting the issue.

MFC after: 1 week
ctp_recvmsg.3
78d51c7b15fc92383c6c68b46966248bdaf2bf1a 06-Apr-2015 glebius <glebius@FreeBSD.org> Stop including if_var.h from userland.

Sponsored by: Nginx, Inc.
etaddrinfo.c
ame6.c
45b602753a780b31305aa4491bbcc104235142ad 28-Mar-2015 tuexen <tuexen@FreeBSD.org> Add an SCTP symbol which was missed in
https://svnweb.freebsd.org/base?view=revision&revision=169622
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783
Thanks to Jukka Ukkonen for reporting the bug and providing a fix.

MFC after: 3 days
ymbol.map
484c3b2b6145fa469df480c58203daeb3c1aa206 10-Mar-2015 tuexen <tuexen@FreeBSD.org> Add a SCTP socket option to limit the cwnd for each path.

MFC after: 1 month
ctp_sys_calls.c
3c61aa79bfcaf99762f556d9ed3d18ee8d756bf2 27-Feb-2015 pfg <pfg@FreeBSD.org> eui64_line(): plug memory leak.

CID: 978412
Reviewed by: brooks, delphij
CodeReview: https://reviews.freebsd.org/D1976
ui64.c
6f347e9b0e3f0d99b8c16185f1e2ef665ec62931 27-Feb-2015 pfg <pfg@FreeBSD.org> Hint out check for unsigned negative values.

On FreeBSD socklen_t is unsigned so the check negative len
in inet6_opt_append() is redundant and likely to be optimized
away by the compiler.

On other operating systems this is not necessarily so, and
in the future we may want to sign it so leave the check in
but place it in a secondary position as a subtle indication
that the bogus check is intentional.

Discussed with: rpaulo

CID: 1017783
p6opt.c
9031d3b270a85e5be8bf907b88c9c22e07ae31cc 21-Dec-2014 brueffer <brueffer@FreeBSD.org> Various mdoc fixes and a few EOL whitespace removals.

Found with: mandoc -Tlint
etaddrinfo.3
ctp_recvmsg.3
ctp_send.3
deb8e745f02c79a29ece940bfbd9953e467f0df6 17-Dec-2014 tuexen <tuexen@FreeBSD.org> Initilize the msg_flags field consistently in all code paths.

Reported by: Coverity
CID: 1018726
ctp_sys_calls.c
841f4ee642d7651bda2ed7355feaab8d2b170a22 10-Dec-2014 tuexen <tuexen@FreeBSD.org> Fix a typo reported by Lennart Grahl.

MFC after: 3 days
ctp_sys_calls.c
364f8a339bde9395cb0b747ec272f36cb97cfd0a 27-Nov-2014 emaste <emaste@FreeBSD.org> ANSIfy b64_pton
ase64.c
e206a51e9e281c23bf431f6771b382b03e355070 25-Nov-2014 emaste <emaste@FreeBSD.org> Fix b64_pton output buffer overrun test for exact-sized buffer

b64_pton would sometimes erroneously fail to decode a base64 string into
a precisely sized buffer. The overflow check was a little too greedy.

Reported by: Ted Unangst on freebsd-hackers@
Reviewed by: loos, trasz
Obtained from: OpenBSD
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1218
ase64.c
bab7e5af6b7923ca067c65ae5641bd1110853174 25-Nov-2014 pluknet <pluknet@FreeBSD.org> Fix ifa_data description.

PR: 176583
Discussed with: glebius
MFC after: 1 week
Sponsored by: Nginx, Inc.
etifaddrs.3
44c4e24d2a4d97b8eceb52ca454447cc19cfd42e 25-Nov-2014 des <des@FreeBSD.org> The fallback flag in nsdispatch prevents the fallback implementation of
getgroupmembership() from invoking the correct backend in the compat case.
Replace it with a nesting depth counter so it only blocks one level (the
first is the group -> group_compat translation, the second is the actual
backend). This is one of two bugs that break getgrouplist() in the compat
case, the second being that the backend's own getgroupmembership() method
is ignored. Unfortunately, that is not easily fixable without a redesign
of our nss implementation (which is also needed to implement the +@group
syntax in /etc/passwd).

PR: 190055
MFC after: 1 week
sdispatch.c
b5d711d3a6940afdd3615f7ffc2dcfa3faacd446 09-Nov-2014 melifaro <melifaro@FreeBSD.org> Renove faith(4) and faithd(8) from base. It looks like industry
have chosen different (and more traditional) stateless/statuful
NAT64 as translation mechanism. Last non-trivial commits to both
faith(4) and faithd(8) happened more than 12 years ago, so I assume
it is time to drop RFC3142 in FreeBSD.

No objections from: net@
etaddrinfo.c
etnameinfo.c
cd1fe572f5a5baf2f67e8cdba840135fdb9d3060 24-Oct-2014 markj <markj@FreeBSD.org> Eliminate conf_lock and instead rely on the NSS write lock to protect
NSS configuration state.

As a side effect, this fixes a race condition which can occur if multiple
threads call nsdispatch(3) concurrently before nsswitch.conf has been
parsed. Previously, the thread holding conf_lock could cause other threads
to return from nss_configure() before nsswitch.conf had been parsed, forcing
them to fall back to the default sources for their NSS methods.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D994
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
sdispatch.c
4feb6f37e37b7cf04c00e2f473133d2c84cbd98d 13-Aug-2014 tuexen <tuexen@FreeBSD.org> Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.

MFC after: 1 week
ctp_sys_calls.c
b57b7cb252a8bddd9637ed70561f04f0de62bd5c 12-Aug-2014 tuexen <tuexen@FreeBSD.org> Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
socket options. Add also a sysctl to control the support of ASCONF.

MFC after: 1 week
ctp_sys_calls.c
d8297941b6a88e44cc8cd865985d4fdc4ba65e05 07-Aug-2014 pfg <pfg@FreeBSD.org> Const-ify character string

Obtained from: Apple Inc. (Libc 997.90.3)
MFC after: 3 days
inkaddr.c
e7d5338a8e65c54966be29abef1484db617906bc 04-Aug-2014 tuexen <tuexen@FreeBSD.org> Add support for the SCTP_RECONFIG_SUPPORTED and the corresponding
sysctl controlling the negotiation of the RE-CONFIG extension.

MFC after: 3 days
ctp_sys_calls.c
ff18393ff054f8f8f4779a04e260ff6549b44e78 03-Aug-2014 tuexen <tuexen@FreeBSD.org> Add support for the SCTP_PKTDROP_SUPPORTED socket option and
the corresponding sysctl variable.
The default is off, since the specification is not an RFC yet.

MFC after: 1 week
ctp_sys_calls.c
fb7bbef5e1d2d7ae6d808c959da7532f744dcce3 03-Aug-2014 tuexen <tuexen@FreeBSD.org> Add SCTP socket option SCTP_NRSACK_SUPPORTED to control the
NRSACK extension. The default will still be off, since it
it not an RFC (yet).
Changing the sysctl name will be in a separate commit.

MFC after: 1 week
ctp_sys_calls.c
31e0173d95a4f399a9954eb9bb37a12f9ffb10de 02-Aug-2014 tuexen <tuexen@FreeBSD.org> Add support for the SCTP_PR_SUPPORTED socket option as specified in
http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies
Add also a sysctl controlling the default of the end-points.

MFC after: 1 week
ctp_sys_calls.c
9ad96316d8c114fb52afdf4415dcd8b21fa6d1ea 02-Aug-2014 tuexen <tuexen@FreeBSD.org> Cleanup the ECN configuration handling and provide an SCTP socket
option for controlling ECN on future associations and get the
status on current associations.
A simialar pattern will be used for controlling SCTP extensions in
upcoming commits.
ctp_sys_calls.c
582721cdc6d0709a9b4fe296e0461b73ef85b920 19-Jul-2014 pfg <pfg@FreeBSD.org> Clean r268867.

Proposed by: bde
ourcefilter.c
b52adc3cf784516c00d22e01d78cc3affddab3bd 19-Jul-2014 pfg <pfg@FreeBSD.org> Use unsigned optlen in getsourcefilter()

Sizes can not be negative and the functions that use it
expect an unsigned value anyways.

Obtained from: Apple (Libc-997.90.3)
MFC after: 1 week
ourcefilter.c
3b9fdabf1f3d959f83e5539d2ba59e4cc1680514 14-Jul-2014 jmmv <jmmv@FreeBSD.org> Make generation of nslexer.c more robust.

Ensure that lex errors fail the build instead of being silently ignored
due to the piped call. Also postpone the update of the nslexer.c file
until we are sure we have generated it properly.

These changes fix some very obscure build failures I encountered while
building FreeBSD within a chroot that did not have devfs mounted. The
specific errors looked like:

.../libc.so.7: undefined reference to `_nsyyerror'
.../libc.so.7: undefined reference to `_nsyyin'
.../libc.so.7: undefined reference to `_nsyylex'
.../libc.so.7: undefined reference to `_nsyylineno'
.../libc.so.7: undefined reference to `_nsyytext'

and were caused due to a mangled nslexer.c being linked into libc.
akefile.inc
3f3d5440052af17ce46dcf7bbd8342036f6eda8b 26-Jun-2014 ume <ume@FreeBSD.org> Fix build with WITHOUT_INET6.

Spotted by: bf
MFC after: 1 week
etaddrinfo.c
2faded8827e6345a39d1a4831f3d8661e29ea88c 26-Jun-2014 ume <ume@FreeBSD.org> - Exclude loopback address rather than loopback interface.
- style(9)

TODO: When AI_ADDRCONFIG is specified, getaddrinfo() can
be quite slow for system with many interfaces. We should
have some kernel sysctls to report IPv4/IPv6 status.

Spotted by: melifaro
MFC after: 1 week
etaddrinfo.c
1390d13ae69089142f6c6465dbb24438f295edee 23-Jun-2014 ume <ume@FreeBSD.org> Exclude IPv4 address from doing longest match.
It prevented DNS based load balancing.

MFC after: 1 week
etaddrinfo.c
2cd08a11727920dd3a50c8e766944630d3a7bf2b 23-Jun-2014 bapt <bapt@FreeBSD.org> use .Mt to mark up email addresses consistently (part4)

PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>
sdispatch.3
ourcefilter.3
baeebbcc2502a83d26b2d72e03ac1f69707c34a6 19-Jun-2014 ume <ume@FreeBSD.org> Use SOCK_CLOEXEC.

MFC after: 1 week
etaddrinfo.c
8563af2e9266f82ad70e6a89648288af739902d0 18-Jun-2014 ume <ume@FreeBSD.org> Retooling addrconfig() to exclude addresses on loopback interfaces
when looking for configured addresses.
This change is based upon the code from the submitter, and made
following changes:
- Exclude addresses assigned on interfaces which are down, like NetBSD
does.
- Exclude addresses assigned on interfaces which are ifdisabled.

PR: 190824
Submitted by: Justin McOmie
MFC after: 1 week
etaddrinfo.c
45fcb795ff06a8693c03048461d7be0b2d43627d 07-Apr-2014 kevlo <kevlo@FreeBSD.org> Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
Tested with vlc and a test suite [1].

[1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz

Reviewed by: jhb, glebius, adrian
etaddrinfo.c
2688b2b8a5002b6963d98e63bdda572263b02f31 05-Apr-2014 marcel <marcel@FreeBSD.org> Accept RFC 2292 option values so that RFC 2292 compliant programs that
are unaware of RFC 3542 can construct control messages.

The kernel disallows mixing RFC 2292 behaviour with RFC 3542 behaviour.
Only sockets that have specifically been marked as using the RFC 2292
API can use RFC 2292 specific options. This is all good and well, but
libc itself seems inconsistent with this.

The root cause of this inconsistency seems to relate to the definitions
of IPV6_HOPOPTS and IPV6_DSTOPTS. They are defined in RFC 2292 and re-used
in RFC 3542, yet have distinct values in the kernel. It's for this reason
that the kernel also has definitions for IPV6_2292HOPOPTS and
IPV6_2292DSTOPTS. Not so in libc.

For example: some program calls inet6_option_init() (defined by RFC 2292)
with the RFC 2292 defined IPV6_HOPOPTS and IPV6_DSTOPTS. Before RFC 3542,
this was translated to values of 22 and 23 (resp.) The libc implementation
correctly checks that only options IPV6_HOPOPTS and IPV6_DSTOPTS are given
(as per RFC 2292) but since these defines have taken on the values defined
by RFC 3542 (values 49 and 50 resp,) rejects the correct option values
(22 and 23) passed said program and returns -1.

The precisie fix is to have inet6_option_init() and friends only accept the
RFC 2292 defined IPV6_HOPOPTS & IPV6_DSTOPTS, but that breaks other code
(like mld6query(8)), which seem to not be aware of RFC 3542 and how it
hi-jacked the option names. So the best fix is to accept the options from
both.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week
p6opt.c
fac2f42fa33370c9e7d2636f6b9a2517c8f7a8c6 12-Mar-2014 jmmv <jmmv@FreeBSD.org> Make ether_line really report an error when all input is invalid.

The previous code failed to return an error condition when the whole input
was invalid due to improper handling of the sscanf return value. Actually,
this failure was properly being caught by a test in
tools/regression/lib/libc/net/test-ether.t but was not noticed because
these tests are never run. (On my way to fixing that ;-)

The fix applied here resembles the implementation of ether_line in NetBSD
modulo the setting of an errno value (which is not documented as an
expectation in the manpage anyway).
ther_addr.c
99c9726a00498d5292868949dc0fccf901914e8c 04-Mar-2014 marcel <marcel@FreeBSD.org> Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.

A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.

Obtained from: Juniper Networks, Inc.
akefile.inc
693a7c1ac21dbbd28b9932d38ced8f3cab8daa91 05-Feb-2014 eadler <eadler@FreeBSD.org> libc/net: fix a portability issue

* POSIX does not require socklen_t to be unsigned

Submitted by: bde
MFC After: 1 week (with r261454)
p6opt.c
7034cd98a43fb0ab11a0fd3d1779c16e22a5c383 04-Feb-2014 eadler <eadler@FreeBSD.org> libc/net: Fix some issues in inet6_opt_init() (from RFC 3542):

* The RFC says (in section 10.1) that only when extbuf is not NULL,
extlen shall be checked, so don't perform this check when NULL is
passed.

* socklen_t is unsigned, so checking extlen for less than zero is
not needed.

Submitted by: swildner@dragonflybsd.org
Reviewed by: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
Reviewed by: hrs
Obtained by: DragonFlyBSD
p6opt.c
47c52965eeacfb141118834c3ccc691a738bddcf 04-Jan-2014 tuexen <tuexen@FreeBSD.org> Fix several bugs in sctp_bindx():
* Set errno to EAFNOSUPPORT if an address is provided which is neither
AF_INET nor AF_INET6.
* Don't modify the arguments.
* Don't smash the stack when provided with a non-zero port.
* Handle the case correctly where the first address provided is
an IPv6 address.

MFC after: 3 days
ctp_sys_calls.c
0524de64dc4696dc224242ff99ae80a7c5658302 19-Sep-2013 tuexen <tuexen@FreeBSD.org> Remove an unused variable and fix a memory leak in sctp_connectx().

Approved by: re (gjb)
MFC after: 3 days
ctp_sys_calls.c
a0c0abfff1f209c44763018cdf616c7fe5f16640 06-Sep-2013 jilles <jilles@FreeBSD.org> libc: Use SOCK_CLOEXEC for various internal file descriptors.

This change avoids undesirably passing some internal file descriptors to a
process created (fork+exec) by another thread.

Kernel support for SOCK_CLOEXEC was added in r248534, March 19, 2013.
etaddrinfo.c
f_nametoindex.c
ame6.c
scachedcli.c
d2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7 23-Aug-2013 jilles <jilles@FreeBSD.org> libc: Make various internal file descriptors from fopen() close-on-exec.
ther_addr.c
ui64.c
etaddrinfo.c
ethostbyht.c
etnetbyht.c
etprotoent.c
etservent.c
esiod.c
sdispatch.c
cmd.c
76babb36d957f10bcef3a2dfcb50277bbb47ec59 18-Aug-2013 pjd <pjd@FreeBSD.org> Consistently use 'af' as an argument name for address family.
Now both gethostbyname2(3) and gethostbyaddr(3) use the same argument name.
The same argument name is also used in implementations of those functions.
ethostbyname.3
247743cbbaf231a82a50f74ca849e50b747d1401 09-Jul-2013 tuexen <tuexen@FreeBSD.org> Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
sctp_opt_info().

MFC after: 3 days
ctp_sys_calls.c
e20c3d7ebbf02da4feacb8eabcf0ea2dc2388844 09-Jul-2013 tuexen <tuexen@FreeBSD.org> Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
sctp_opt_info().

MFC after: 3 days
ctp_sys_calls.c
feae44327ca69ecd4b597a80db2ce822a7366c34 09-Jul-2013 hrs <hrs@FreeBSD.org> Update references.
etaddrinfo.3
etnameinfo.3
6d7e4bda619a0f4b6830347b67add508914609de 09-Jun-2013 jilles <jilles@FreeBSD.org> Make recv() and send() cancellation points, as required by POSIX.

Call the recvfrom() and sendto() functions overridden by libthr instead of
the _recvfrom() and _sendto() versions that are not cancellation points.
ecv.c
end.c
c454baff9f0252c9312a17add8baff2bf78bca9c 06-Jun-2013 emaste <emaste@FreeBSD.org> Switch to 2-clause license and standard text

Approved by: bms@
etifmaddrs.c
a6e9df7131150213cdd1e9831f4128c838437478 04-Jun-2013 joel <joel@FreeBSD.org> mdoc: convert .Fd to .In, which is much nicer.
etaddrinfo.3
etnameinfo.3
4cb7f1fd6f7638e16e52678307df1995d28cad40 03-Jun-2013 emaste <emaste@FreeBSD.org> Switch to 2-clause license

Approved by: bms@
etifmaddrs.c
92a0da36867a9ef454dba7615e47b87f08b653b6 29-May-2013 emaste <emaste@FreeBSD.org> Remove clause 3 and 4 from TNF licenses

Per the NetBSD Foundation statement
Third parties are encouraged to change the license on any files which
have a 4-clause license contributed to the NetBSD Foundation to a
2-clause license.
sdispatch.c
slexer.l
sparser.y
15a12aabf833df28191f498715412ac3ad6f7e3c 28-May-2013 emaste <emaste@FreeBSD.org> Remove the advertising clause from the Regents of the University of
California's license, per the letter dated July 22, 1999.
ame6.c
3f99d602fd34d31d81a72b93b9d218071ff11bf9 28-May-2013 emaste <emaste@FreeBSD.org> Remove the advertising clause from the Regents of the University of
California's license, per the letter dated July 22, 1999.
ctp_bindx.3
ctp_connectx.3
ctp_freepaddrs.3
ctp_getaddrlen.3
ctp_getassocid.3
ctp_getpaddrs.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
3e86f64f24209f517b379421f25658d8da32118e 21-May-2013 ed <ed@FreeBSD.org> Update manpages for r250887.

Remove the lists of unneeded header files.

Requested by: eadler
etifaddrs.3
etifmaddrs.3
eb004e0f1388470d70a4c8ffc653d593cc372887 03-May-2013 jkim <jkim@FreeBSD.org> Improve compatibility with recent flex from flex.sourceforge.net.
slexer.l
dc49969f25f515c25eeefd924182c537cd128335 10-Apr-2013 tuexen <tuexen@FreeBSD.org> Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

MFC after: 1 week
ctp_sys_calls.c
32c02d0b8968e57fd82707d32b8e6d2cad297ff2 13-Mar-2013 jilles <jilles@FreeBSD.org> libc: Avoid SIGPIPE when nscd closes the connection unexpectedly.

It is almost always a bug if nscd closes the connection unexpectedly but
programs should not be killed with SIGPIPE for it.

Reviewed by: bushman
Tested by: Jan Beich
MFC after: 1 week
scachedcli.c
8e06979521bda097831de11d70840a939c90a39b 14-Feb-2013 zeising <zeising@FreeBSD.org> Change examples to be consistent with what style(9) says.

Approved by: joel (mentor)
MFC After: 2 weeks
etaddrinfo.3
etnameinfo.3
8c2d2a90402ae26f92b5a1d928f307c9d7f75ac8 10-Feb-2013 tuexen <tuexen@FreeBSD.org> Improve code style. No functional change.

MFC after: 3 days
ctp_sys_calls.c
48d4ca6f43e841b9dc56825f68e423088aaa4dfe 10-Jan-2013 ume <ume@FreeBSD.org> Re-enable ip6addrctl support but only for IPv6 address.

Requested by: Ben Morrow <ben__at__morrow.me.uk>
MFC after: 1 week
ame6.c
3d32a931a1a2fa6cbcda4ecc497192795994945f 09-Jan-2013 ume <ume@FreeBSD.org> Disable destination address selection support of
getipnodebyname(1). RFC 2553 mentions IPv6 addresses
are returned 1st.

Spotted by: uqs
MFC after: 1 week
ame6.c
debae4f153b89e64c1376cb9fdb14cb6fb70fefc 19-Nov-2012 tuexen <tuexen@FreeBSD.org> Cleanup the code a bit, which improves the portability.
MFC after: 1 week
ctp_sys_calls.c
55b42c566aa34fe926dd40004d1a8f3ad15ed7dd 19-Nov-2012 tuexen <tuexen@FreeBSD.org> Fix the handling of mapped IPv6 addresses in sctp_connectx().

MFC after: 3 days
ctp_sys_calls.c
f2c2ff1baf52aee84f7261dd1c3b8687b02c1a66 16-Nov-2012 kevlo <kevlo@FreeBSD.org> - the preferred way to write a NULL pointer constant is with NULL
- whitespace nit

Reviewed by: glebius
etnetent.3
etprotoent.3
etservent.3
7d0528e7e8b8b3e83cd5bca8737945d73916a5f8 03-Nov-2012 tuexen <tuexen@FreeBSD.org> Fix errno in a couple of error cases.

MFC after: 3 days
ctp_sys_calls.c
3f7a414911a892c8c84206394eb643cbde706d20 22-Oct-2012 eadler <eadler@FreeBSD.org> remove duplicate semicolons where possible.

Approved by: cperciva
MFC after: 1 week
p6opt.c
c9ba4f7b25ec65c1aba9ca25cfd5978e43d00fba 18-Jul-2012 emax <emax@FreeBSD.org> Return zero from get_addrselectpolicy() when no source-address-selection
policy is installed.

MFC after: 1 week
etaddrinfo.c
a6e30f9565722c5df66277a5e22c7ea869c760d4 15-Jul-2012 jilles <jilles@FreeBSD.org> libc: Remove some unused strings from getaddrinfo().
etaddrinfo.c
e126d2ba10e82c928ea46fdbb1b3e74a25af9b95 21-Jun-2012 obrien <obrien@FreeBSD.org> Be explicit about the dependency on nsparser.h.
akefile.inc
92080af158d046c609ec13db339cdb6ca602e274 06-Jun-2012 dim <dim@FreeBSD.org> Fix two warnings about self-assignment in libc. These normally only
trigger with clang, when you either use -save-temps, or ccache.

Reported by: Sevan / Venture37 <venture37@gmail.com>
MFC after: 3 days
etaddrinfo.c
eabfe486a67f3292927ea0594d014f6d6337ad49 23-May-2012 tuexen <tuexen@FreeBSD.org> Update copyright date.

MFC after: 3 days
ctp_sys_calls.c
446228b9c8f7254d4433322a5f893f1fcb199b64 22-May-2012 kevlo <kevlo@FreeBSD.org> Add missing header needed by free()

Reported by: tinderbox
sparser.y
434c53cbc31ab5ad90ba5119cb80f658a52345a1 19-May-2012 marcel <marcel@FreeBSD.org> Use the LLINDEX macro to access the link-level I/F index. This makes
it possible to work with a different type for the sdl_index field --
it only requires a recompile.

Obtained from: Juniper Networks, Inc.
f_indextoname.c
f_nameindex.c
f_nametoindex.c
ourcefilter.c
7404b21e2daab075c921b26bf1d709d70531e1cf 13-May-2012 joel <joel@FreeBSD.org> mdoc: avoid unterminated quoted strings.
sdispatch.3
8670397617a81b2ecea7375cbd0af3c77821459b 11-May-2012 gjb <gjb@FreeBSD.org> General mdoc(7) and typo fixes.

PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
ctp_connectx.3
ctp_recvmsg.3
ourcefilter.3
6254db119165c3b3fe82b4e9345de0de255bf7b5 04-May-2012 tuexen <tuexen@FreeBSD.org> Remove debug output.

MFC after: 3 days
ctp_sys_calls.c
6eb12b42ba18698f1441188207485bf0d2414382 26-Apr-2012 tuexen <tuexen@FreeBSD.org> Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by
Konstantin Belousov.

MFC after: 1 week.
X-MFC with: r234715
ymbol.map
4e912ba0495f96dcd73b4ee7618902245a4ff6e9 26-Apr-2012 tuexen <tuexen@FreeBSD.org> Export symbols for sctp_sendv() and sctp_recvv().

MFC after: 1 week
ymbol.map
5083bfbeba3e9731cb26dfabdf697d41ad2cfcd1 15-Apr-2012 eadler <eadler@FreeBSD.org> When searching for uninitialized memory usage add ensure that the entire
struct is set to zero.

PR: bin/166483
Submitted by: Roy Marples <roy@marples.name>
Reviewed by: delphij
Approved by: cperciva
MFC after: 3 days
f_nametoindex.c
6dfa60e0bf7108729fa98dcc5d5a4f38a306ea03 02-Apr-2012 delphij <delphij@FreeBSD.org> Eliminate two cases of unwanted strncpy(). The name is not required
by the current code, and the results would get overwritten anyway
by subsequent memset().

Reviewed by: ume
MFC after: 1 month
etaddrinfo.c
ame6.c
1ef5fe44d364187e492b6a152c0176186161b44f 29-Mar-2012 eadler <eadler@FreeBSD.org> Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
ctp_bindx.3
ctp_connectx.3
ctp_freepaddrs.3
ctp_getaddrlen.3
ctp_getassocid.3
ctp_getpaddrs.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
ourcefilter.3
18cdef73e124780c9a41193ca63682fadd4420c6 27-Mar-2012 joel <joel@FreeBSD.org> Minor indentation and paragraph nits.
sdispatch.3
906214101c2afe043c4e6b86c05dad9039220a42 26-Mar-2012 joel <joel@FreeBSD.org> mdoc: correct .Bd/.Bl arguments.

Reviewed by: brueffer
etipnodebyname.3
39c40cce12eb24c548affde3ed07fe9647a175ba 25-Mar-2012 joel <joel@FreeBSD.org> Remove superfluous paragraph macro.
net_net.3
sdispatch.3
ctp_getassocid.3
6df7c12017311a4a831bd9ca82ba7b8f60ec6e62 19-Mar-2012 eadler <eadler@FreeBSD.org> draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR: docs/163771
Submitted by: phk
Reviewed by: If someone else reviewed your modification.
Approved by: cperciva
MFC after: 1 week
etnameinfo.3
23524b572c9490078007a68a1760546e22a8184d 12-Feb-2012 ed <ed@FreeBSD.org> Globally replace u_int*_t from (non-contributed) man pages.

The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after: 1 month
sdispatch.3
891142ea87ffcacbfa7af77556942c4350720c35 11-Feb-2012 bz <bz@FreeBSD.org> Switch getifaddrs(3) to the new API introduced in r231505. Also remove
conditional code parts not used by or applicable to FreeBSD.

The new implementation is supposed to be able to cope with changes to
the 'l' versions of the msghdr structs now used as well as to if_data
allowing future changes without breaking things.

This restores carp(4) config support in HEAD after r231504.

Reviewed by: glebius, brooks
MFC After: 3 months
etifaddrs.c
f55d6eed8c8bfbbc9c0a4422abfe0567efed9473 11-Feb-2012 bz <bz@FreeBSD.org> Backout changes from r228571. Remove if_data from struct ifa_msghdr again.
While this breaks carp on HEAD temporary, it restores the upgrade path from
stable, and head before 20111215.

Reviewed by: glebius, brooks
etifaddrs.c
507691dbd9aa5a7e9229bb26aa781572f120595c 08-Feb-2012 brooks <brooks@FreeBSD.org> eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and
ether_nota_r and do not use static variables so remove the note copied
from ethers.3 saying they do.

Reported by: bms
MFC after: 3 days
ui64.3
6ccd11eb82acf6a486f18617bb71ce7a4e6a3a50 07-Jan-2012 ume <ume@FreeBSD.org> Handle the internal scope address representation of the KAME IPv6
stack for the node-local multicast address.

Spotted by: Rainer Bredehorn <Bredehorn__at__gmx.de>
MFC after: 1 week
etaddrinfo.c
e7e5b53bf16ab3b35646f0580b36fa7d7afa9678 03-Jan-2012 ed <ed@FreeBSD.org> Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
ethostbynis.c
etnetbynis.c
6d6844d3db7a60700aba1a03b565183435faab20 23-Dec-2011 cperciva <cperciva@FreeBSD.org> Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]

Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by: so (cperciva)
Approved by: re (bz)
Security: FreeBSD-SA-11:06.bind
Security: FreeBSD-SA-11:07.chroot
Security: FreeBSD-SA-11:08.telnetd
Security: FreeBSD-SA-11:09.pam_ssh
Security: FreeBSD-SA-11:10.pam
sdispatch.c
04ff721cff67dd3e641289f950656b9dbd02d09f 17-Dec-2011 tuexen <tuexen@FreeBSD.org> Address warnings found by clang.

MFC after: 3 months.
ctp_sys_calls.c
27a36f6ac8242750daa092abd7180b10d16f4508 16-Dec-2011 glebius <glebius@FreeBSD.org> A major overhaul of the CARP implementation. The ip_carp.c was started
from scratch, copying needed functionality from the old implemenation
on demand, with a thorough review of all code. The main change is that
interface layer has been removed from the CARP. Now redundant addresses
are configured exactly on the interfaces, they run on.

The CARP configuration itself is, as before, configured and read via
SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or
SIOCAIFADDR_IN6 may now be configured to a particular virtual host id,
which makes the prefix redundant.

ifconfig(8) semantics has been changed too: now one doesn't need
to clone carpXX interface, he/she should directly configure a vhid
on a Ethernet interface.

To supply vhid data from the kernel to an application the getifaddrs(8)
function had been changed to pass ifam_data with each address. [1]

The new implementation definitely closes all PRs related to carp(4)
being an interface, and may close several others. It also allows
to run a single redundant IP per interface.

Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for
idea on using ifam_data and for several rounds of reviewing!

PR: kern/117000, kern/126945, kern/126714, kern/120130, kern/117448
Reviewed by: bz
Submitted by: bz [1]
etifaddrs.c
540bfb3294cc04aef78144ababcafcce86f6eaaa 15-Dec-2011 tuexen <tuexen@FreeBSD.org> Fix a bug where sctp_sendmdg() uses uninitialized memory.

MFC after: 3 days.
ctp_sys_calls.c
4de38879e5e0ffa7986549aa0beda02dce5e3438 20-Nov-2011 tuexen <tuexen@FreeBSD.org> Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

MFC after: 3 months.
ctp_sys_calls.c
1659a9762306f5fdb56bcae801a4318964aac1d9 07-Oct-2011 ed <ed@FreeBSD.org> Fix whitespace inconsistencies found in homegrown Symbol.maps.
ymbol.map
332805f36956171cd9de47f2bde7efa7ab6ea98e 08-Aug-2011 hrs <hrs@FreeBSD.org> Fix a pathname (s,netinet/if_ether.h,net/ethernet.h,).

PR: docs/159341
Submitted by: Garrett Cooper
Approved by: re (kib)
thers.3
f47c615e88590b29d88403fce2ef7e0e28e8ecb3 03-Aug-2011 tuexen <tuexen@FreeBSD.org> The result of a joint work between rrs@ and myself at the IETF:
* Decouple the path supervision using a separate HB timer per path.
* Add support for potentially failed state.
* Bring back RTO.min to 1 second.
* Accept packets on IP-addresses already announced via an ASCONF
* While there: do some cleanups.

Approved by: re@
MFC after: 2 months.
ctp_sys_calls.c
e3813fe2a979e875e0cd0fb49da98d50fbf25366 18-Jun-2011 tuexen <tuexen@FreeBSD.org> Document the latest changes to sctp_opt_info() in the code.
This makes sctp_opt_info() compiliant with the latest version
of the socket API ID.
ctp_opt_info.3
3bd2da3f30b7c9865079a72a9f38e2cd572feffd 17-Jun-2011 tuexen <tuexen@FreeBSD.org> Add SCTP_MAX_BURST support to sctp_opt_info().
This only applies to 9.0 and higher, since the type
of the values has changed since we introduced it.
So it can't be MFCed.
ctp_sys_calls.c
c0c8567b6cd0e9309e2f58371f869ce5c359cfe6 17-Jun-2011 tuexen <tuexen@FreeBSD.org> Update the list of supported socket options for sctp_opt_info().

MFC after: 1 month.
ctp_sys_calls.c
30391f29baccc63c33ab14e87503fc6763612f29 16-Jun-2011 tuexen <tuexen@FreeBSD.org> Fix two typos and remove redundant code.

MFC after: 1 month.
ctp_sys_calls.c
1c7060f746aa61b1e64ab5d7c28f505778df5341 16-Jun-2011 tuexen <tuexen@FreeBSD.org> * Fix the handling of addresses in sctp_sendv().
* Add support for SCTP_SENDV_NOINFO.
* Improve the error handling of sctp_sendv() and sctp_recv().

MFC after: 1 month
ctp_sys_calls.c
6339980d3779b2b1cd4459ca94ec77f42d5cc591 15-Jun-2011 tuexen <tuexen@FreeBSD.org> Add support for the newly added SCTP API.
In particular add support for:
* SCTP_SNDINFO, SCTP_PRINFO, SCTP_AUTHINFO, SCTP_DSTADDRV4, and
SCTP_DSTADDRV6 cmsgs.
* SCTP_NXTINFO and SCTP_RCVINFO cmgs.
* SCTP_EVENT, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO and SCTP_DEFAULT_SNDINFO
socket option.
* Special association ids (SCTP_FUTURE_ASSOC, ...)
* sctp_recvv() and sctp_sendv() functions.

MFC after: 1 month.
ctp_sys_calls.c
7ec44d66a6202d6f9bf5a7ef04ba108896f96bea 05-May-2011 tuexen <tuexen@FreeBSD.org> * Update copyright notice.
* Cleanup usage of iov's.
* Add support for SCTP_TIMEOUTS socketoption.
* Fix a bug in sctp_recvmsg(): return the msg_flags in case of an error.
* Fix a bug in the error handling of sctp_peeloff(): return the -1.
ctp_sys_calls.c
e98ca052817b88269f455435549761ccd0ee2e8a 08-Jan-2011 kib <kib@FreeBSD.org> Fix struct FILE * leak on error (in disabled by default hesiod support code).

Submitted by: henning petersen <henning.petersen t-online de>
PR: 153756
MFC after: 1 week
esiod.c
501752af9c2900d1e6903aa8598db800e97cdfc7 13-Oct-2010 rpaulo <rpaulo@FreeBSD.org> Clang related fixes:
* When calling syslog(), pass a format string.
* Define YY_NO_INPUT on nslexer.l

Submitted by: Norberto Lopes <nlopes.ml at gmail.com>
slexer.l
8ae3afcfad3d809ecc914f65e53a58e795268f62 08-Oct-2010 uqs <uqs@FreeBSD.org> mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd
etnetent.3
etprotoent.3
sdispatch.3
c14c65c26a7679c30028d9af7387a3b65f037908 05-Oct-2010 ume <ume@FreeBSD.org> When no protocol entry is found, getproto*_r(3) should
return zero.

Spotted by: Kostik Belousov <kostikbel__at__gmail.com>
MFC after: 2 weeks
etproto.c
etprotoent.c
etprotoname.c
3463cb623877fe005188a1a1c1cb63f103c6e05b 04-Oct-2010 ume <ume@FreeBSD.org> Clear errno for each method dispatch.

Spotted by: Kostik Belousov <kostikbel__at__gmail.com>
MFC after: 2 weeks
sdispatch.c
7adc5f91cff836324150e37db070cf854b475e73 11-Sep-2010 brucec <brucec@FreeBSD.org> Revert changes of 'assure' to 'ensure' made in r211936.

Approved by: rrs (mentor)
ctp_send.3
ctp_sendmsg.3
76d72447281953457a8a3a319fdc80070bc5152c 28-Aug-2010 brucec <brucec@FreeBSD.org> Fix incorrect usage of 'assure' and 'insure'.

Approved by: rrs (mentor)
thers.3
ui64.3
ctp_send.3
ctp_sendmsg.3
dd1fff9bcb93c49e02a04bb712ecc2695db0c218 16-Aug-2010 joel <joel@FreeBSD.org> Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages. Minor corrections by me.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
net6_rth_space.3
ctp_send.3
ctp_sendmsg.3
71b91f81994b2ce3af650cd94d9768671d5ffa8c 15-Aug-2010 ume <ume@FreeBSD.org> Correct the return code from _dns_gethostby*() to correspond
with h_errno.

Obtained from: NetBSD
MFC after: 2 weeks
ethostbydns.c
5fdaddea72f2485c5731c35f4288d3a1f38627d6 13-Aug-2010 ume <ume@FreeBSD.org> - When there is no room for returning the result, nss backend
have to return ERANGE and terminate with NS_RETURN.
- When gethostbyname_r(3) and the friends end with an error,
set errno to the value nss backend returns, and return errno
value.

PR: kern/131623
MFC after: 2 weeks
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
etproto.c
etprotoent.c
etprotoname.c
f4e8725880aad15a64790723505167159829163a 06-Aug-2010 joel <joel@FreeBSD.org> Fix typos and spelling mistakes.
ctp_recvmsg.3
ctp_sendmsg.3
52dbc8b6341deff28b6b725bc3e852826cdfdf8a 02-Aug-2010 joel <joel@FreeBSD.org> Spelling fixes.
ctp_getaddrlen.3
ctp_send.3
ctp_sendmsg.3
11ebe7c039dba8300e25b31bef6b05e09b75ac1e 07-Jul-2010 rrs <rrs@FreeBSD.org> If a user calls sctp_sendx() with a NULL
sinfo we will crash. Instead we should provide
our own temp structure to use internally.

MFC after: 1 month
ctp_sys_calls.c
d33b286554c298f108e3e84d632332893f5a4f54 05-Jul-2010 brucec <brucec@FreeBSD.org> Increment 'sa' at the end of the loop; otherwise, only the first
address ever gets checked.

Approved by: rrs (mentor)
MFC after: 1 month
ctp_sys_calls.c
a605c9b153aa0f0382c3f95a4ac748647ced988a 04-Jul-2010 brucec <brucec@FreeBSD.org> Use ISO C99 integer types instead of the BSD-specific u_int*_t.

Approved by: rrs (mentor)
ctp_recvmsg.3
ctp_send.3
ctp_sys_calls.c
4945d8d26d66a088d72189bf54f9678981e78766 11-Jun-2010 brucec <brucec@FreeBSD.org> sctp_recvmsg returns the number of bytes received, not sent.

Approved by: rrs (mentor)
MFC after: 1 month
ctp_recvmsg.3
eace2c4331fc82af21a87ccf5a818ad1e036679b 06-Apr-2010 ume <ume@FreeBSD.org> Use the stored length value instead of calculating it by strlen().
etservent.c
7915a506541b9b6b29c31dec9643b7da9649252c 04-Apr-2010 ume <ume@FreeBSD.org> Add capability to use a db version of services. It is enabled by
specifying `db' as source of service in /etc/nsswitch.conf.

MFC after: 2 weeks
etservent.c
sdispatch.3
6e468628cf2ea2fc37557d96be5e76436f206aed 04-Apr-2010 ume <ume@FreeBSD.org> Reduce duplicate code.

MFC after: 2 weeks
etservent.c
ad7b5cc594ec25c321fa7e493162a1e3e4985d7b 04-Apr-2010 ume <ume@FreeBSD.org> Treat '+' as special only when in compat mode, and simplify
the logic bit.

MFC after: 2 weeks
etservent.c
74ecc8e0c65300d46719c196619820b6d0d30e6f 04-Apr-2010 ume <ume@FreeBSD.org> Stop adding trailing '\n'. The servent_unpack() doesn't expect
lines terminated with '\n'.

MFC after: 2 weeks
etservent.c
c801976d1315cbf2f0b443e7850c19bcda1cf5ce 31-Jan-2010 brucec <brucec@FreeBSD.org> Remove extra semicolon.

Approved by: rrs (mentor)
ctp_sys_calls.c
b51b4f4d2bd4524c3a6383abffcde25ab26f3059 31-Jan-2010 brucec <brucec@FreeBSD.org> Fix typo of ENOTCONN.
Add missing RETURN VALUES section in sctp_opt_info(3).

Approved by: rrs (mentor)
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
197dc264ae5cd82f3d8857f7df3fc372afc9e758 12-Jan-2010 brueffer <brueffer@FreeBSD.org> Miscellaneous mdoc, spelling and inconsistency fixes.

PR: 142573, 142576 (mostly)
Submitted by: brucec
MFC after: 1 week
ctp_bindx.3
ctp_connectx.3
ctp_getaddrlen.3
ctp_getassocid.3
ctp_getpaddrs.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
6729ce6df0a2aaff5798f68f0005adf4b5271fca 28-Nov-2009 danger <danger@FreeBSD.org> - correct xref sections

PR: docs/140940
Submitted by: Bruce Cran <bruce@cran.org.uk>
MFC after: 1 week
ctp_send.3
ctp_sendmsg.3
803189ee1c7285f4c03317edb25bdff8329b9757 12-Nov-2009 ume <ume@FreeBSD.org> Add missing IEEE1394 support dropped during merge from NetBSD.
etnameinfo.c
2a2df770dc273d9bdd8106d636a25d85954fccd0 11-Nov-2009 ume <ume@FreeBSD.org> ANSIfy.

MFC after: 1 week
p6opt.c
a9dc4dbb6208ebff265d4470aa4d32abe2907222 09-Nov-2009 ume <ume@FreeBSD.org> Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.
ai_strerror.c
92c0e3160b71624802e910d64bea5e2fab069a2a 09-Sep-2009 phk <phk@FreeBSD.org> Revert r196976, now that <machine/param.h> behaves predictably.
etifaddrs.c
a1226dc97c499ad8698f23e65b453f1ef623dd9b 08-Sep-2009 phk <phk@FreeBSD.org> Add necessary include
etifaddrs.c
fb4a68cc3a982243575f41ccff8d3d019133027b 29-May-2009 delphij <delphij@FreeBSD.org> Document how to enable strict RFC 1034 enforcements.

PR: kern/129477
esolver.3
b186e91180da0abaa602da3390c0d96d447be697 27-May-2009 zml <zml@FreeBSD.org> Fix an issue when nss fallback routines are used in a multithreaded application.

Reviewed by: bushman
Approved by: dfr (mentor)
sdispatch.c
259233890b4d219eae5d3c18279442bf16535182 29-Apr-2009 bms <bms@FreeBSD.org> Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;
the kernel will return in msfr_nsrcs the number of source filters
in-mode for a given multicast group.
However, the filters themselves were never copied out, as the libc
function clobbers this field with zero, causing the kernel to assume
the provided vector of struct sockaddr_storage has zero length.
This bug would only affect users of SSM multicast, which is shimmed
in 7.x.
Picked up during mtest(8) refactoring.

MFC after: 1 day
ourcefilter.c
cb768e2631a7f373d03c4b3c7fb251e76badc6a7 29-Mar-2009 ume <ume@FreeBSD.org> Query DNS only once per an address family.

Obtained from: KAME
MFC after: 2 weeks
etaddrinfo.c
b9602dae34d92edee464230618658e3b11a8af61 25-Mar-2009 ume <ume@FreeBSD.org> Add support for SCTP to getaddrinfo(3).
Now, getaddrinfo(3) returns two SOCK_STREAMs, IPPROTO_TCP and
IPPROTO_SCTP. It confuses some programs. If getaddrinfo(3) returns
IPPROTO_SCTP when SOCK_STREAM is specified by hints.ai_socktype, at
least Apache doesn't work. So, I made getaddrinfo(3) to return
IPPROTO_SCTP with SOCK_STREAM only when IPPROTO_SCTP is specified
explicitly by hints.ai_protocol.

PR: bin/128167
Submitted by: Bruce Cran <bruce__at__cran.org.uk> (partly)
MFC after: 2 week
etaddrinfo.c
9572ca2bf0394e29842c57382b178f4506c4113b 24-Mar-2009 ume <ume@FreeBSD.org> getaddrinfo(3) should accept numeric when ai_socktype is not
specified in hint or hints is NULL.

PR: bin/51827
Submitted by: Mark Andrews <marka__at__isc.org>
MFC after: 1 week
etaddrinfo.c
0d63b902b49070196969d178db9f86a11c5fbd44 04-Mar-2009 bms <bms@FreeBSD.org> Considerably improve the wording of this man page.
ourcefilter.3
76de7f52e0a545afa35ce685cf3d8b716692b5a6 04-Mar-2009 bms <bms@FreeBSD.org> Update copyright.
ourcefilter.c
c968042e930fc2af3a53cd2312ac2d73d4d3db36 01-Mar-2009 delphij <delphij@FreeBSD.org> Add a missing .El.
cmd.3
185bd48df413b2f290b4b5ccd6fb5af7310ec8a3 08-Feb-2009 ume <ume@FreeBSD.org> Shutup warning for DNAME RR.

PR: bin/127591
Submitted by: "Eugene M. Kim" <20080111.freebsd.org__at__ab.ote.we.lv>
MFC after: 1 week
etaddrinfo.c
ethostbydns.c
b73b4a5b71b286f756045f937874d341a8645201 06-Jan-2009 danger <danger@FreeBSD.org> - forgot to bump a date
etaddrinfo.3
25a4ec32ad6b2ae7203c4d83b390f50df90e767c 06-Jan-2009 danger <danger@FreeBSD.org> catch up wtih r175955 by ume:

- the support of AI_ALL and AI_V4MAPPED has been completely removed.
etaddrinfo.3
ac00ba8d82ff1b7e9c4ef9dc181649c3d6c86411 14-Dec-2008 murray <murray@FreeBSD.org> Add an ENVIRONMENT section to note that the RSH variable can be set to
override the use of the rsh(1) program in rcmd(3).

PR: docs/51133
Obtained from: NetBSD, partially
MFC after: 3 weeks
cmd.3
7572ac62733575418a63680bbc3bada7beddf679 01-Jul-2008 danger <danger@FreeBSD.org> - AI_ALL and AI_V4MAPPED flags are currently not supported

PR: docs/120248
Submitted by: Heiko Wundram <wundram (a) beenic.net>
etaddrinfo.3
c57ec28c3faf101e34d2075c9380ee2044a07a54 02-May-2008 jhb <jhb@FreeBSD.org> Include libc_private.h for the declaration of __isthreaded instead of
relying on namespace pollution in stdio.h.

MFC after: 3 days
sdispatch.c
97fd4b42a14d99f693848bab0583a9608dad8332 03-Feb-2008 ume <ume@FreeBSD.org> Remove incomplete support of AI_ALL and AI_V4MAPPED.

Reported by: "Heiko Wundram (Beenic)" <wundram__at__beenic.net>
etaddrinfo.c
9d2bf43707db1e05e2754eb9fec419c55b009c43 17-Dec-2007 bushman <bushman@FreeBSD.org> Moved logging out of the nss_method_lookup() in order not to
flood logs with failed fallback method lookup attempts.
sdispatch.c
b02556dae5c4b2e396b5bee2c663fe38f28d369b 12-Dec-2007 bushman <bushman@FreeBSD.org> Implementing 'fallback' nsswitch source. 'fallback' source is used
when particular function can't be found in nsswitch-module. For
example, getgrouplist(3) will use module-supplied 'getgroupmembership'
function (which can work in an optimal way for such source as LDAP) and
will fall back to the stanard iterate-through-all-groups implementation
otherwise.

PR: ports/114655
Submitted by: Michael Hanselmann <freebsd AT hansmi DOT ch>
Reviewed by: brooks (mentor)
sdispatch.c
29de595612fccf2d40a55dbdebe3a68245cc798c 15-Nov-2007 ru <ru@FreeBSD.org> Fix bad rule and bad dependency for nsparser.h that can
cause the build to fail because y.tab.c can have a more
recent modification time than y.tab.h, and the bad rule
relied on the opposite.

(The last write to y.tab.c by yacc(1) happens after the
last write to y.tab.h, according to truss(1).)

Reported by: kensmith
akefile.inc
7d196f53c81a2be265901bf62c7314d2c6c2ca04 30-Oct-2007 keramida <keramida@FreeBSD.org> mdoc fix: remove extraneous empty line.

MFC after: 3 days
thers.3
325514ce7bd81d45244fa73cf28eb8c6d6a051d6 17-Oct-2007 tmclaugh <tmclaugh@FreeBSD.org> - Correctly define CACHED_SOCKET_PATH as /var/run/nscd after cached to
nscd renaming.

Approved by: mux
scache.c
a55c6d7befa8065900c87b663c46ad1be839f7dd 25-Sep-2007 brueffer <brueffer@FreeBSD.org> Assorted spelling, punctuation and mdoc fixes.

Approved by: re (blanket)
ctp_connectx.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
146ada068606d21f67e4f82830717bf2251ae4b1 20-Sep-2007 gabor <gabor@FreeBSD.org> - Fix description to say "receive" instead of "send"

PR: docs/115466
Submitted by: Bruce Cran <bruce@cran.org.uk>
Approved by: re (bmah)
ctp_recvmsg.3
9bcc40000ee4195062fc66b52351f692c4089c28 05-Sep-2007 jinmei <jinmei@FreeBSD.org> ensure the head entry of addrinfo chain has non-NULL ai_canonname to be
compliant with RFC3493.

PR: standards/114910
Approved by: ume (mentor)
Approved by: re
MFC after: 1 week
etaddrinfo.c
ce4c62aa34c29ce4db2699aaf8a9883661fc0781 31-Jul-2007 bushman <bushman@FreeBSD.org> - Getipnodebyname() and getipnodebyaddr() reimplemented through
gethostbyname() and gethostbyaddr() accordingly

Approved by: re (kensmith), brooks (mentor)
ame6.c
1db8ba247453b3da31775f1a39199179ca75bfb7 24-Jul-2007 rrs <rrs@FreeBSD.org> - take out a needless panic under invariants for sctp_output.c
- Fix addrs's error checking of sctp_sendx(3) when addrcnt is less than
SCTP_SMALL_IOVEC_SIZE
- re-add back inpcb_bind local address check bypass capability
- Fix it so sctp_opt_info is independant of assoc_id postion.
- Fix cookie life set to use MSEC_TO_TICKS() macro.
- asconf changes
o More comment changes/clarifications related to the old local address
"not" list which is now an explicit restricted list.

o Rename some functions for clarity:
- sctp_add/del_local_addr_assoc to xxx_local_addr_restricted()
- asconf related iterator functions to sctp_asconf_iterator_xxx()

o Fix bug when the same address is deleted and added (and removed from
the asconf queue) where the ifa is "freed" twice refcount wise,
possibly freeing it completely.

o Fix bug in output where the first ASCONF would not go out after the
last address is changed (e.g. only goes out when retransmitted).

o Fix bug where multiple ASCONFs can be bundled in the same packet with
the and with the same serial numbers.

o Fix asconf stcb iterator to not send ASCONF until after all work
queue entries have been processed.

o Change behavior so that when the last address is deleted (auto asconf
on a bound all endpoint) no action is taken until an address is
added; at that time, an ASCONF add+delete is sent (if the assoc
is still up).

o Fix local address counting so that address scoping is taken into
account.

o #ifdef SCTP_TIMER_BASED_ASCONF the old timer triggered sending
of ASCONF (after an RTO). The default now is to send
ASCONF immediately (except for the case of changing/deleting the
last usable address).
Approved by: re(ken smith)@freebsd.org
ctp_sys_calls.c
1e9af2c480a638933876e637c1f3b9f1b7bad3e9 14-Jul-2007 rrs <rrs@FreeBSD.org> - Modular congestion control, with RFC2581 being the default.
- CMT_PF states added (w/sysctl to turn the PF version on)
- sctp_input.c had a missing incr of cookie case when the
auth was bad. This meant a free was called without an
increment to refcnt, added increment like rest of code.
- There was a case, unlikely, when the scope of the destination
changed (this is a TSNH case). In that case, it would not free
the alloc'ed asoc (in sctp_input.c).
- When listed addresses found a colliding cookie/Init, then
the collided upon tcb was not unlocked in sctp_pcb.c
- Add error checking on arguments of sctp_sendx(3) to prevent it from
referencing a NULL pointer.
- Fix an error return of sctp_sendx(3), it was returing
ENOMEM not -1.
- Get assoc id was changed to use the sanctified socket api
method for getting a assoc id (PEER_ADDR_INFO instead of
PEER_ADDR_PARAMS).
- Fix it so a peeled off socket will get a proper error return
if it trys to send to a different address then it is connected to.
- Fix so that select_a_stream can avoid an endless loop that
could hang a caller.
- time_entered (state set time) was not being set in all cases
to the time we went established.
Approved by: re(ken smith)
ctp_sys_calls.c
f8312f9222b49f6467df6f56e5a451042117d0c6 04-Jul-2007 peter <peter@FreeBSD.org> Fix missing prototype warnings. (Compile errors with -Werror on)
When using namespace.h/un-namespace.h, you use _ versions of syscalls.
Change getsockopt() to _getsockopt() and same for setsockopt().

Approved by: re
ourcefilter.c
9915cae1cee2f3b9dc631b8bfa3ddb6125916568 02-Jul-2007 rrs <rrs@FreeBSD.org> - Removes some incorrect error returns (errno was being overriden in
one of the functions)
- Fixes the error return of sctp_get_opt, it was returning the errno not
-1.
Approved by: re@freebsd.org (Robert Watson)
Obtained from: Weongyo Jeong (weongyo.jeong@gmail.com)
ctp_sys_calls.c
1aac323b15290a9da6bf758b44d519f223143572 26-Jun-2007 mjacob <mjacob@FreeBSD.org> Add missing semi-colon.

Approved by: re (not really, but it's better to have things compile than not for right now. Sorry)
ctp_sys_calls.c
cb9da230d99b538fd3b5eb05b161de21bbb1ee5e 25-Jun-2007 rrs <rrs@FreeBSD.org> - Fix wrong error return (the errno was being returned and not placed
in errno) - Found by Weongyo Jeong
- Remove two extra un-needed memset() after calloc()'s - Found by
Weongyo Jeong
- Tightened up parameter requirement checking on input to
bindx/connectx per socket api spec.
Approved by: re@freebsd.org(Ken Smith)
ctp_sys_calls.c
689929ef2e024d9912f76db5d23e2e2aaa68e39a 22-Jun-2007 rrs <rrs@FreeBSD.org> - Fix incorrect error return on sctp_getaddrlen
- Fix a memory leak when a non v4/v6 address was passed in.
- Take out strange line that copy's back to the src array
incorrectly (corrupting the input array).

Approved by: re(bmah@freebsd.org)
Obtained from: Weongyo Jeong(weongyo.jeong@gmail.com)
ctp_sys_calls.c
0d5f902e7ade5d2975b4134ad4333927e85392d6 19-Jun-2007 brueffer <brueffer@FreeBSD.org> Clean up after previous commit: new sentence -> new line, no empty lines,
.Fa macro usage.

Approved by: re (blanket)
ctp_connectx.3
111a3746d58e45bbba302d5206c55bb96b8ff628 19-Jun-2007 rrs <rrs@FreeBSD.org> - Fix the signature of sctp_connectx to match the function and adds some
text about the last argument.
Approved by: re (bmah@freebsd.org)
ctp_connectx.3
0414524f6c1fd8f30bcce5d8652612eae18b5472 18-Jun-2007 brueffer <brueffer@FreeBSD.org> Major cleanup: mdoc macros, style, typos etc.
ctp_bindx.3
ctp_connectx.3
ctp_freepaddrs.3
ctp_getaddrlen.3
ctp_getassocid.3
ctp_getpaddrs.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
687b4ebc1a6ad4c42fd9c704edd2eeb36d700ba4 14-Jun-2007 delphij <delphij@FreeBSD.org> Require users to provide a length information for inet_ntoa_r,
this is common on other platforms.

Reported by: pointyhat via kris
net.3
2cfc9bf1c60f2275f93f3d3589b81a8bd49a88be 12-Jun-2007 ache <ache@FreeBSD.org> Fix yet another (make install) stopper with wrong sourcefilter.3 links
akefile.inc
21fc8c30740f2849938da4d8747505c39b851f49 12-Jun-2007 bms <bms@FreeBSD.org> Fix typo in filename from mismerged earlier rev of this file.
akefile.inc
720d6b85c6d2bf1972d57b0767c9a8aadbe92c57 12-Jun-2007 bms <bms@FreeBSD.org> Fix a typo which crept in from an earlier version of this file.
ourcefilter.c
9429c724308845e760382fbecbbe4598a4852386 12-Jun-2007 bms <bms@FreeBSD.org> Add missing userland support files from previous commit for the new
multicast source filter API functions.
ourcefilter.3
ourcefilter.c
ffd77d9ba5a1376d64ccbb2909a7179c05de81bc 12-Jun-2007 bms <bms@FreeBSD.org> Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
* IPv4 multicast socket processing is now moved out of ip_output.c
into a new module, in_mcast.c.
* The in_mcast.c module implements the IPv4 legacy any-source API in
terms of the protocol-independent source-specific API.
* Source filters are lazy allocated as the common case does not use them.
They are part of per inpcb state and are covered by the inpcb lock.
* struct ip_mreqn is now supported to allow applications to specify
multicast joins by interface index in the legacy IPv4 any-source API.
* In UDP, an incoming multicast datagram only requires that the source
port matches the 4-tuple if the socket was already bound by source port.
An unbound socket SHOULD be able to receive multicasts sent from an
ephemeral source port.
* The UDP socket multicast filter mode defaults to exclusive, that is,
sources present in the per-socket list will be blocked from delivery.
* The RFC 3678 userland functions have been added to libc: setsourcefilter,
getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
* Definitions for IGMPv3 are merged but not yet used.
* struct sockaddr_storage is now referenced from <netinet/in.h>. It
is therefore defined there if not already declared in the same way
as for the C99 types.
* The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
which are then interpreted as interface indexes) is now deprecated.
* A patch for the Rhyolite.com routed in the FreeBSD base system
is available in the -net archives. This only affects individuals
running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
* Make IPv6 detach path similar to IPv4's in code flow; functionally same.
* Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from: p4://bms_netdev
Submitted by: Wilbert de Graaf (original work)
Reviewed by: rwatson (locking), silence from fenner,
net@ (but with encouragement)
akefile.inc
ymbol.map
00f8f869d583e6b882bb62e264ccfbf15dfba7b6 11-Jun-2007 rrs <rrs@FreeBSD.org> - Validate incoming addresses and sizes for connectx and bindx.
- For non-sys call version pass the msg_flags.
ctp_sys_calls.c
0325fb6ca4e8ecfa891d252d9d442141ad32847b 11-Jun-2007 delphij <delphij@FreeBSD.org> Add inet_ntoa_r, a reentrant version of inet_ntoa. This is
available on a lot of platforms, as well as libkern for years.

Submitted by: "MQ"
akefile.inc
net.3
6d4725fe1d1b171928f9575a170ab2dd9c70a8ae 06-Jun-2007 remko <remko@FreeBSD.org> Document getaddrinfo(3)'s AI_ADDRCONFIG

PR: docs/78357
Submitted by: Matthias Andree <matthias dot andree at gmx dot de>
Patch by: asmodai
MFC after: 1 week
etaddrinfo.3
f291262336d4a47cf7043c797cd2e51604b61c70 31-May-2007 deischen <deischen@FreeBSD.org> Some libc symbol map cleanups.

net: endhostdnsent is named _endhostdnsent and is
private to netdb family of functions.

posix1e: acl_size.c has been never compiled in,
so there's no "acl_size".

rpc: "getnetid" is a static function.

stdtime: "gtime" is #ifdef'ed out in the source.

some symbols are specific only to some architectures,
e.g., ___tls_get_addr is only defined on i386.

__htonl, __htons, __ntohl and __ntohs are no longer
functions, they are now (internal) defines in
<machine/endian.h>.

Submitted by: ru
ymbol.map
4231e9d1dc77acce8049e3efdf3a60f0b09053c7 28-May-2007 rwatson <rwatson@FreeBSD.org> Precede symbol names consistently with tabs rather than spaces.
ymbol.map
ba9ece26117cf6e7d9b8ec5e3b406979a16fcbd9 25-May-2007 ru <ru@FreeBSD.org> Also fix the misspelling of hes_resolve().

Submitted by: Danny Braniss
ymbol.map
e483e0e1e318618102fdf248033aca2be1e07be0 24-May-2007 ru <ru@FreeBSD.org> hesiod_resolv -> hesiod_resolve

Submitted by: Danny Braniss
ymbol.map
9fa5f8882e8d83571f4941febbc56668cfcfc772 18-May-2007 jon <jon@FreeBSD.org> Move nss_compat symbols from r1.11 to private section of symbol map.

Suggested by: deischen
ymbol.map
9f6d75987a2517339e3b5401747167d1cbffba07 18-May-2007 jon <jon@FreeBSD.org> __nss_compat_* from net/nss_compat.c are needed by ports/net/nss_ldap, so export them.
ymbol.map
3127d2bb31e30b1d390602807027788a016c08bb 17-May-2007 jon <jon@FreeBSD.org> fix memory leak from reading nsswitch.conf

MFC after: 1 week
sdispatch.c
sparser.y
b024dc211e65f99728985fd040df4f3ebac72923 16-May-2007 rrs <rrs@FreeBSD.org> -Fix so getoptinfo() is in conformance with socket api (it
can be used on any read socketopt).
-Clean up of sendmsg call and make it conformant when no syscall
is available.
ctp_sys_calls.c
92bcfd1176a28069f3a7d0833d89d776ceeee187 16-May-2007 rrs <rrs@FreeBSD.org> Resolves symbols map so sctp_xxx() functions are included.
PR: 112704
Submitted by: kou@cozmixng.org
ymbol.map
12c13290f9dc6c18c0cd2391c6a5c582858b03f2 13-May-2007 rwatson <rwatson@FreeBSD.org> Add ether_aton_r and ether_ntoa_r to public symbol map for libc.

Pointed out by: deischen
ymbol.map
cff73a5a630828c597a9cb247aeae0cf468121b1 13-May-2007 rwatson <rwatson@FreeBSD.org> Add and document ether_ntoa_r() and ether_aton_r() functions, which accept
passed storage buffers rather than using static storage. Reimplement
ether_ntoa() and ether_aton() in terms of these functions. These variants
are thread-safe.
ther_addr.c
thers.3
37843b872cb130f72d74bfbfb56903b1c99e487e 13-May-2007 rwatson <rwatson@FreeBSD.org> Move to more conformant style(9) before making functional changes.
ther_addr.c
2a7306fdc570c474f76b95120a54af2235ed16da 29-Apr-2007 deischen <deischen@FreeBSD.org> Use C comments since we now preprocess these files with CPP.
ymbol.map
b79eceb7f37331e0724c1eb4b575b3b779b8a47b 19-Apr-2007 mtm <mtm@FreeBSD.org> Make inet6_rth_* family of functions more compliant with RFC3542:
1. CMSG_NXTHDR(mhdr, cmsg) is supposed to dereference cmsg and return
the next header in the chain. If cmsg is NULL it should return
the first header, behaving essentially like CMSG_FIRSTHDR().
2. inet6_rth_(space|init|add) should do basic checking on their input
to verify that the number of headers (segments) is
between 0 and 127 inclusive.

MFC-After: 1 month
thdr.c
4cb223184a79d34c2f19e794fe126be7560b97d9 21-Mar-2007 mlaier <mlaier@FreeBSD.org> Let people in on the magic of INET[6]_ADDRSTRLEN which comes quite handy in
combination with inet_ntop().

Reviewed by: trhodes "works for me"
net.3
bd8786ed778eb3e2e64f4bc1078d8653aa1a6d54 15-Mar-2007 rrs <rrs@FreeBSD.org> - Sysctl's move to seperate file
- moved away from ifn/ifa access to sctp_ifa/sctp_ifn
built and managed by the add-ip code.
- cleaned up add-ip code to use the iterator
- made iterator be a thread, which enables auto-asconf now.
- rewrote and cleaned up source address selection (also
made it use new structures).
- Fixed a couple of memory leaks.
- DACK now settable as to how many packets to delay as
well as time.
- connectx() to latest socket API, new associd arg.
- Fixed issue with revoking and loosing potential to
send when we inflate the flight size. We now inflate
the cwnd too and deflate it later when the revoked
chunk is sent or acked.
- Got rid of some temp debug code
- src addr selection moved to a common file (sctp_output.c)
- Support for simple VRF's (we have support for multi-vfr
via compile switch that is scrubbed from BSD but we won't
need multi-vrf until we first get VRF :-D)
- Rest of mib work for address information now done
- Limit number of addresses in INIT/INIT-ACK to
a #def (30).

Reviewed by: gnn
ctp_sys_calls.c
9dc2491bfede858913115a26217b4bfca8cd9d43 28-Feb-2007 bms <bms@FreeBSD.org> Document the AF_LINK extension which was imported from NetBSD.
etnameinfo.3
0738a9d791c7cf11ec35c5f1b495c0530c978447 28-Feb-2007 bms <bms@FreeBSD.org> Nuke ascii2addr() and addr2ascii(). They have no consumers anywhere
in FreeBSD, and originated from INRIA IPv6.

Stub out netstat reference to addr2ascii() I mistakenly introduced.
Update misleading man page sections.

Merge NetBSD's getnameinfo() AF_LINK extensions for a portable way to
print link-layer addresses given a sockaddr_dl(), minus the IEEE 1394
bits which don't map directly to our code.

Obtained from: NetBSD (getnameinfo.c)
Discussed on: current (March 2006)
akefile.inc
ymbol.map
ddr2ascii.3
ddr2ascii.c
scii2addr.c
etnameinfo.c
net.3
inkaddr.3
dfdc42503bbb9cdea45b5757e3b8c4b8bb321d32 26-Feb-2007 rrs <rrs@FreeBSD.org> Fix include declaration it was sys/sctp.h should be netinet/sctp.h,
reported by pluknet@gmail.com.
ctp_bindx.3
ctp_connectx.3
ctp_freepaddrs.3
ctp_getaddrlen.3
ctp_getassocid.3
ctp_getpaddrs.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
d7423f55fb05abcc2b60387b8b114f9d96b5e8bf 22-Feb-2007 rrs <rrs@FreeBSD.org> Fixes build breakage.. invalid type casts.. and invalid
type for size in one place.
ctp_sys_calls.c
ae6663525ac1c121369ed2987517cf2d29f6139a 22-Feb-2007 rrs <rrs@FreeBSD.org> First cut of the sctp man pages. Still need work.
akefile.inc
ctp_bindx.3
ctp_connectx.3
ctp_freepaddrs.3
ctp_getaddrlen.3
ctp_getassocid.3
ctp_getpaddrs.3
ctp_opt_info.3
ctp_recvmsg.3
ctp_send.3
ctp_sendmsg.3
5a82d0298943e1c4429659c6b6db3445d0ca3fc0 22-Feb-2007 rrs <rrs@FreeBSD.org> Fixes __FreeBSD__ being present (they should not)
and also trailing garbage on undef of magic numbers.
ctp_sys_calls.c
d35264cb57b02b22b1ef6f0e78e560a5cc007bde 22-Feb-2007 rrs <rrs@FreeBSD.org> Adds a performance improvement for when sctp_sendx is
called with only one address, we then can call the
generic system call. Also fixes some socket api
type issues and cleans up the "magic" numbers that
were being used in the code.

Reviewed by: gnn
ctp_sys_calls.c
df992b84fce88478648b3263f948f71d411bf625 22-Jan-2007 bms <bms@FreeBSD.org> Docuemnt exactly which functions access which NSS databases.

Point out that FreeBSD libc has compat stubs for GNU glibc NSS
modules which access NSDB_PASSWD/NSDB_GROUP, but not NSDB_HOSTS;
based on painful experience porting nss_mdns.

Reviewed by: ru
sdispatch.3
cd1f140ae4a14278c07e6788221df20328a3fe56 09-Jan-2007 imp <imp@FreeBSD.org> Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
yteorder.3
ethostbydns.c
ethostbyht.c
ethostbyname.3
etipnodebyname.3
etnetbydns.c
etnetbyht.c
etnetent.3
etproto.c
etprotoent.3
etprotoent.c
etprotoname.c
etservent.3
etservent.c
net.3
net_net.3
inkaddr.3
inkaddr.c
ap_v4v6.c
sdispatch.3
cmd.3
cmd.c
cmdsh.3
ecv.c
esolver.3
end.c
0ce5d91ed156f4cb86fc35607ac3a2a948c18eda 16-Dec-2006 rodrigc <rodrigc@FreeBSD.org> Consistently use a socklen_t type where required, and eliminate
GCC warning "dereferencing type-punned pointer will
break strict-aliasing rules".

Reviewed by: rrs
ctp_sys_calls.c
45136271b2d887a9a6bc40220d19459fdb083e7a 15-Dec-2006 rrs <rrs@FreeBSD.org> This adds the "system calls"
sctp_getaddrlen()
sctp_connectx()
sctp_bindx()
sctp_opt_info()
sctp_getpaddrs()
sctp_freepaddrs()
sctp_getladdrs()
sctp_freeladdrs()
sctp_sendmsg()
sctp_getassocid()
sctp_send()
sctp_sendx()
sctp_sendmsgx()
sctp_recvmsg()
sctp_peeloff()

Manual pages will be forthcoming (and the commit to porters-handbook)
akefile.inc
ctp_sys_calls.c
6c7489287679b434b86791746d54586a0a6befd4 04-Dec-2006 ume <ume@FreeBSD.org> Use _kevent() instead of kevent().

Requested by: nork
scachedcli.c
367bc6b8e0ccf1af12ccdfff7d83ef3ec5f6be9a 06-Nov-2006 cognet <cognet@FreeBSD.org> Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by: bde
akefile.inc
toh.c
20a2ef67d2c307e970657ffbb38b485f27d7a331 04-Nov-2006 lawrance <lawrance@FreeBSD.org> Document return values for res_query and res_search.
h_errno is not an extern int, just a macro providing an integer lvalue.

PR: doc/50573
Submitted by: Ronald F.Guilmette <rfg@monkeys.com>
Reviewed by: trhodes
MFC after: 3 days
ethostbyname.3
esolver.3
e80cd771cbf070c71d90d13bb7106e6872bac8ef 28-Oct-2006 ru <ru@FreeBSD.org> Add missing markup bits.

Submitted by: Emil Mikulic
net.3
f4eec080604271df405d4d00c6d540a253554b36 17-Sep-2006 ru <ru@FreeBSD.org> Markup fixes.
ai_strerror.3
ethostbyname.3
dfd296d48ee6985b72f99646a758768fc9b2c604 26-Jul-2006 yar <yar@FreeBSD.org> Respect MK_INET6_SUPPORT.
akefile.inc
082a928eacb8f601a18e18b1c8e3eeeeda799506 26-Jul-2006 yar <yar@FreeBSD.org> Fix build w/o INET6.

Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>
ame6.c
d2efba70b7af04253fc9f78e23e0049154402008 23-Jul-2006 ume <ume@FreeBSD.org> do not overload the port number on to the return value of
str2number(). this could result in an unexpected code path.

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
538856133aaf8d7ecd0dc6cd1f664f3c990c3aa6 23-Jul-2006 ume <ume@FreeBSD.org> stop use of mutex lock in ICMP lookup.

MFC after: 1 week
ame6.c
7169bc1ce5c9f644355c0c1da6f04a2cfdff6d26 22-Jul-2006 ume <ume@FreeBSD.org> remove obsolete comments.

MFC after: 3 days
etaddrinfo.c
636a28fc7515b76a295e7dbd13d3e2448831f7b8 21-Jul-2006 ume <ume@FreeBSD.org> simplification in explore_numeric: unified the post-process with
GET_AI and GET_PORT. Commented on an impossible case.

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
34bbbddd7edea08765b37576afc0456076006a6c 21-Jul-2006 ume <ume@FreeBSD.org> RFC3493 requires use of inet_aton for AF_INET.

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
9cc6e84d28d55e96dea517a0afa186cda673010f 21-Jul-2006 ume <ume@FreeBSD.org> clean-up: rewrote explore_null and explore_numeric without using sentinel.
we do not need it since we make (at most) a single addrinfo entry in these
cases.

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
cd6fe3744084e02ffd7e31613b881b8b2afb62ba 21-Jul-2006 ume <ume@FreeBSD.org> - draft-ietf-ipngwg-icmp-namelookups-09
- make it compilable

It still requires root privilege and is experimental.

Obtained from: KAME
MFC after: 1 week
ame6.c
01c3a07e52b5b014e2d422f4b85a0deee28bccc2 17-Jul-2006 stefanf <stefanf@FreeBSD.org> Use a prototype for res_init().

MFC after: 3 days
esolver.3
dce008dac9e1172bb4b955ae91cf29b2e8429dd2 21-May-2006 ume <ume@FreeBSD.org> Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
arch.

X-MFC after: never
ethostnamadr.c
c49929798600cc98625b30e672dfe77235791a07 21-May-2006 ume <ume@FreeBSD.org> Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short. This conforms to RFC3493, POSIX and XPG6.

Obtained from: NetBSD
ai_strerror.3
ai_strerror.c
etnameinfo.c
2103e7a60f93b5663802fad9b458412411640d7c 21-May-2006 ume <ume@FreeBSD.org> Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.

X-MFC after: never
akefile.inc
ymbol.map
es_mkupdate.c
es_update.c
ab3eacdf3106cb0b4027a6d928d9555815af0b48 12-May-2006 ume <ume@FreeBSD.org> Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:

http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html

gethostbyaddr_r() is changed as well.
It breaks ABI backward compatibility on 64 bit arch. So, we fix it
on 32 bit arch only for now.

Reported by: Rostislav Krasny <rosti.bsd@gmail.com>
ethostbydns.c
ethostbyht.c
ethostbyname.3
ethostbynis.c
ethostnamadr.c
etdb_private.h
90151bff3d423ce26ae4898fb406e1c64b4e5ff2 02-May-2006 ume <ume@FreeBSD.org> Fix alignment problem on AMD64.

Reported by: Pascal Hofstee <caelian__at__gmail.com>
Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Tested by: Pascal Hofstee <caelian__at__gmail.com>
scachedcli.c
86fb2d93f4ba2ea30dc3e9675795788558ac2207 30-Apr-2006 ume <ume@FreeBSD.org> `cache' couldn't co-exist with `compat'.

Submitted by: "Michael Bushkov" <bushman__at__rsu.ru>
sparser.y
e14f1c3b3b31e7f6c28cef5acc87f4c7373d288c 28-Apr-2006 ume <ume@FreeBSD.org> - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Sponsored by: Google Summer of Code 2005
akefile.inc
etaddrinfo.c
ethostnamadr.c
etnetnamadr.c
etproto.c
etprotoent.c
etprotoname.c
etservbyname.c
etservbyport.c
etservent.c
ame6.c
etdb_private.h
scache.c
scachedcli.c
sdispatch.c
b6bb84cf9e6c9d871a17bcf962cf63180af70e95 15-Apr-2006 ume <ume@FreeBSD.org> - make reentrant version of netdb functions glibc style API, and
expose them to outside of libc.
- make netdb functions NSS friendly.

Reviewed by: arch@ and current@ (no objection)
ymbol.map
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
etproto.c
etprotoent.c
etprotoname.c
etservbyname.c
etservbyport.c
etservent.c
etdb_private.h
5965562ffef852fa5b51c73adfd2fe5b75e16380 01-Apr-2006 ume <ume@FreeBSD.org> fix indent.
etaddrinfo.c
3a893e11a7a11a71f7c387d15943b98cb1d40797 30-Mar-2006 ume <ume@FreeBSD.org> Expose res_update and friends again. At least, ports/mail/spamilter
uses them.
Now, we have res_nupdate and res_nmkupdate as well, but they are
still based on our old resolver for binary backward compatibility.
So, they don't provide new features such as TSIG support.

Reported by: pointyhat via kris
ymbol.map
es_mkupdate.c
es_update.c
es_update.h
39501d50faab1ddba0eecc3f23503bce39d6769f 28-Mar-2006 ume <ume@FreeBSD.org> If the query choked with EDNS0, retry without EDNS0.

Obtained from: res_nquery() of BIND9.
etaddrinfo.c
869b9276a754a75358ae5603779668e87974c327 25-Mar-2006 ume <ume@FreeBSD.org> - Use ANSI C prototype.
- Remove trailing space.
etaddrinfo.c
etnameinfo.c
ame6.c
bf9a7919939ac869417c9254801036107b56da01 24-Mar-2006 ume <ume@FreeBSD.org> When res_nquerydomain() returns SERVFAIL, we should try next domain.
etaddrinfo.c
6d9b77bdc9d728b041508ab8e234289f080065cd 24-Mar-2006 ume <ume@FreeBSD.org> When res_send() fails, we should reserve an error code.
etaddrinfo.c
b09a8950a1301d97aef8e2975e34a3ba5bc451c3 21-Mar-2006 ume <ume@FreeBSD.org> Update the resolver in libc to BIND9's one.

Since, res_sendsigned(3) and the friends use MD5 functions, it is
hard to include them without having MD5 functions in libc. So,
res_sendsigned(3) is not merged into libc.

Since, res_update(3) in BIND9 is not binary compatible with our
res_update(3), res_update(3) is leaved as is, except some
necessary modifications.
The res_update(3) and the friends are not essential part of the
resolver. They are not defined in resolv.h but defined in
res_update.h separately in BIND9. Further, they are not called from
our tree. So, I hide them from our resolv.h, but leave them only
for binary backward compatibility (perhaps, no one calls them).

Since, struct __res_state_ext is not exposed in BIND9, I hide it
from our resolv.h. And, global variable _res_ext is removed. It
breaks binary backward compatibility. But, since it is not used from
outside of our libc, I think it is safe.

Reviewed by: arch@ (no objection)
akefile.inc
ymbol.map
etaddrinfo.c
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
error.c
net_addr.c
net_lnaof.c
net_makeaddr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
net_netof.c
net_network.c
net_ntoa.c
net_ntop.c
net_pton.c
ame6.c
etdb_private.h
s_name.c
s_netint.c
s_parse.c
s_print.c
s_ttl.c
sap_addr.c
es_comp.c
es_config.h
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_mkupdate.c
es_query.c
es_send.c
es_send_private.h
es_update.c
es_update.h
53d6233f744cffc5f29606f3a746783c571f7766 21-Mar-2006 delphij <delphij@FreeBSD.org> When we are doing initialization against q, use its own size, not
the size of q2. This should be a no-op because q and q2 are of
the same type.

Submitted by: Alexey Dobriyan <adobriyan gmail com>
etaddrinfo.c
388e590f951441f619cd32710dc151e0ac810a10 17-Mar-2006 ru <ru@FreeBSD.org> Reimplementation of world/kernel build options. For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
akefile.inc
bb2532ee3740d977038cbef8b5f8c9b0cc552dbd 13-Mar-2006 deischen <deischen@FreeBSD.org> ns_name_skip was recently redefined to __ns_name_skip
like the others in <include/arpa/nameser.h>.

Submitted by: ume
ymbol.map
a0f6b0f1d026a8f482a319443c75421f9d668c07 13-Mar-2006 deischen <deischen@FreeBSD.org> Add each directory's symbol map file to SYM_MAPS.
akefile.inc
138dd543577ce6140d439518ba00135e7f7ebdc5 13-Mar-2006 deischen <deischen@FreeBSD.org> Add symbol maps and initial symbol version definitions to libc.

Reviewed by: davidxu
ymbol.map
5e1521cce366a7a6191c532554259f6f85a9abfa 01-Mar-2006 ume <ume@FreeBSD.org> Handle the errors returned by res_querydomain() in same manner.

Reported by: yar
Tested by: yar, Rostislav Krasny <rosti.bsd__at__gmail.com>
MFC after: 1 week
etaddrinfo.c
es_query.c
2a2559a103e853552bf162079b75f0af0f21e574 27-Feb-2006 deischen <deischen@FreeBSD.org> Correct a comment.

Staticize two tables thare are not visible in <resolv.h>
and which are also local in Solaris' libresolv.

Remove two functions that are not referenced in libc nor
anywhere else I can find, not visible in <resolv.h> and
which are also local in Solaris libresolv.
es_comp.c
es_debug.c
es_send.c
a8acef0bfb8502573b7e11703dee9d7b7027497d 26-Feb-2006 ume <ume@FreeBSD.org> Sync inet_net_pton() and inet_net_ntop() with latest BIND9's includes
an IPv6 support.

PR: kern/93740
Submitted by: Rudolf Cejka <cejkar__at__fit.vutbr.cz>
Obtained from: BIND9
MFC after: 1 week
net_net.3
net_net_ntop.c
net_net_pton.c
d095cafa05f33d8230b4ad881605cb5ae8e8898d 24-Feb-2006 ume <ume@FreeBSD.org> - Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.

PR: bin/62139
Reported by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Tested by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from: BIND9 (with some modification)
MFC after: 1 week
etaddrinfo.c
es_query.c
f0442273f18d1493f7da5f6d6ba0782bbcee32c8 23-Nov-2005 ru <ru@FreeBSD.org> Fix inet6_opt_get_val() prototype.
net6_opt_init.3
11e07dda3098d413b7052b24dbcb7d51fc6dcfa6 23-Nov-2005 ru <ru@FreeBSD.org> Add missing includes.
f_indextoname.3
92c433a7228ece0d0ce208728d3edf155a3b3398 15-Nov-2005 ume <ume@FreeBSD.org> The KAME's getipnodebyaddr() code honor the MULTI_PTRS_ARE_ALIASES
define also, but res_config.h was not included into libc/net/name6.c.
So getipnodebyaddr() ignored the multiple PTRs.

PR: kern/88241
Submitted by: Dan Lukes <dan__at__obluda.cz>
MFC after: 3 days
ame6.c
bca82361aaefb3fe4b561e305d15cd9cfc5c59ec 20-Aug-2005 stefanf <stefanf@FreeBSD.org> Include <sys/types.h> and <limits.h> ourselves, don't assume they are included
through <pthread.h>.

gen/sem.c: Prerequisite for <_semaphore.h>
net/getprotoent.c: USHRT_MAX
net/getservent.c: USHRT_MAX
stdio/ungetwc.c: MB_LEN_MAX
stdio/vfwscanf.c: MB_LEN_MAX
etprotoent.c
etservent.c
5a523760659dee07f955efb61a4021045eddd231 06-Aug-2005 phk <phk@FreeBSD.org> Respect the YES_HESIOD build variable.
akefile.inc
ac7c9f771d24494ee3e2cb386d81d76f91fe2726 31-Jul-2005 keramida <keramida@FreeBSD.org> Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after: 1 week
Thanks to: Music band ``Chingon''
for keeping me company while searching for these.
net6_rth_space.3
ca8316b8dd70d583004789919db2eb8cc4720940 27-Jul-2005 ume <ume@FreeBSD.org> don't accept invalid form of an address like 1:2:3:4:5:6:7::8.

PR: bin/84106
Obtained from: BIND9
MFC after: 2 days
net_pton.c
72038f290ef394c35da425aabe4bd91dcaf48311 22-Jul-2005 ume <ume@FreeBSD.org> Remove padding for ABI compatibility of ai_addrlen member
from struct addrinfo. This change break ABI compatibility
on 64 bit arch.
etaddrinfo.c
9cfb6018bfa46e346267530be64ef2a282b11c85 19-Jul-2005 ume <ume@FreeBSD.org> refer RFC 3542 rather than RFC 2292bis.

Submitted by: Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from: KAME
p6opt.c
cmd.3
thdr.c
287a0ed11aa7008550de72471ca61149ffe8793b 19-Jul-2005 ume <ume@FreeBSD.org> fixed the validation code of routing header length in inet6_rth_getaddr().
reported by Delia Kecskemeti <delia.kecskemeti__at__windriver.com>

Submitted by: Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from: KAME
thdr.c
7cec11495247676e23c6a9186b2eeba3b5032c61 16-Jun-2005 ru <ru@FreeBSD.org> Markup fixes.

Approved by: re
ai_strerror.3
38fc91ca963def6ed6e416c706b47a96a211a4f6 15-Jun-2005 ru <ru@FreeBSD.org> Assorted markup fixes.

Approved by: re
etaddrinfo.3
etnameinfo.3
etnetent.3
net6_rth_space.3
a23214e059e07a8642c27d57c541ce60479d3d53 10-Jun-2005 nectar <nectar@FreeBSD.org> Remove rexecd(8), a server that implements a particularly insecure
method of executing commands remotely. There are no rexec clients in
the FreeBSD tree, and the client function rexec(3) is present only in
libcompat. It has been documented as "obsolete" since 4.3BSD, and its
use has been discouraged in the man page for over 10 years.
cmd.3
b1d9bded139c37a7b628a3e37456b27ef03617a2 03-Jun-2005 ume <ume@FreeBSD.org> reflect type change of n_net and getnetbyaddr(3).
etnetent.3
0d8a6fcf732984f217c6997539424b40833a93b4 03-Jun-2005 ume <ume@FreeBSD.org> - Remove padding for ABI compatibility of n_net member from struct
netent.
- Change 1st argument of getnetbyaddr() to an uint32_t on 64 bit
arch as well to confirm to POSIX-2001.

These changes break ABI compatibility on 64 bit arch.
There is similar padding issue for ai_addrlen of struct addrinfo.
However, it is leaved as is for now.

Discussed on: arch@, standards@ and current@
X-MFC after: never
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
282986422833cd4184586d08f2f9ec00f080444e 27-May-2005 ume <ume@FreeBSD.org> reduce cast.

MFC after: 1 week
ame6.c
7a6cd620d08df24bc7c27e2a13017a1f63f004b2 15-May-2005 ume <ume@FreeBSD.org> - The ai_addrlen of a struct addrinfo used to be a size_t, per
RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and RFC
3493, it was changed to a socklen_t. And, the n_net of a
struct netent used to be an unsigned long integer. In XNS5,
and subsequently in POSIX-2001, it was changed to an uint32_t.
To accomodate for this while preserving ABI compatibility with
the old interface, we need to prepend or append 32 bits of
padding, depending on the (LP64) architecture's endianness.
- Correct 1st argument of getnetbyaddr() to uint32_t on 32
bit arch. Stay as is on 64 bit arch for ABI backward
compatibility for now.

Reviewed by: das, peter
MFC after: 2 weeks
etaddrinfo.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
etdb_private.h
c138dacf0cfab71856dbdc3a17fafb8d56f55dca 14-May-2005 gnn <gnn@FreeBSD.org> Submitted by: Jinmei Tatuya, Hajimu Umemoto
Reviewed by: rwatson at freebsd dot org
Approved by: rwatson at freebsd dot org
MFC after: 1 week

Fix the matchlen() function so that it handles the IPv4 (AF_INET)
case correctly. Until now it has been treating IPv4 addresses
as if they were IPv6 which could lead to corruption errors.
etaddrinfo.c
ame6.c
f96b51e1fae5f83f6597c18a3d05214f9d5678e8 13-May-2005 ume <ume@FreeBSD.org> raise readability bit.
ame6.c
ae7adfdc3c468054bbf670f1db551970d9b34277 13-May-2005 ume <ume@FreeBSD.org> free ypbuf only when yp_match() succeed.
etaddrinfo.c
e33ba033454acbec171e04edba1395842e412b5c 13-May-2005 ume <ume@FreeBSD.org> NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
cmd.c
es_send.c
b29f166ec1a926b9f182fb42c1f6ce4a48c1f2ff 03-May-2005 ume <ume@FreeBSD.org> fix signed/unsigned comparison warnings.

Obtained from: NetBSD
etnameinfo.c
f7d29d45c87a6e997500bb06c93a04fa8cee3360 02-May-2005 ume <ume@FreeBSD.org> the 3rd argument of getsockname() should be socklen_t*.

Submitted by: stefanf
etaddrinfo.c
ame6.c
abf13089c33f3c09816343ac11016530731dbfec 01-May-2005 ume <ume@FreeBSD.org> oops, we don't need previous change.
ame6.c
006d6ec57b7df989aae7398015631e43649fae59 01-May-2005 ume <ume@FreeBSD.org> make it compilable without YP definition.
ame6.c
0adfc804de4b0f79c319eb0397d050f589b3d95b 01-May-2005 ume <ume@FreeBSD.org> don't see RES_USE_INET6 when called from getipnodeby*().
ethostbynis.c
eff8f31f8b0bffb36780a423c2307f514ac22269 30-Apr-2005 ume <ume@FreeBSD.org> oops, gethostbyaddr(3) must return h_addr as an IPv4-mapped
IPv6 address when RES_USE_INET6 was set, according to RFC 2133
section 6.2.
ethostbyht.c
ethostbynis.c
ethostnamadr.c
ebe4b8304d164a842cc96bcc863c9321a37f57ff 30-Apr-2005 ume <ume@FreeBSD.org> handling RES_USE_INET6 better.
ethostbynis.c
91b46d9bcd3b01ebee06a42d92d3095cd5288743 30-Apr-2005 ume <ume@FreeBSD.org> _ht_gethostbyaddr didn't handle RES_USE_INET6 correctly.
ethostbyht.c
7384d01d80905fb04664647a1b8741677745da0c 30-Apr-2005 ume <ume@FreeBSD.org> _gethostbynisname() didn't support RES_USE_INET6.
ethostbynis.c
1e5d47dc8ca25db110b85fa16f9caf196d07a62e 30-Apr-2005 ume <ume@FreeBSD.org> _ht_gethostbyname didn't handle RES_USE_INET6 correctly.
ethostbyht.c
5acac5def141d4709680819f06b1a8c4fb8c641a 29-Apr-2005 ume <ume@FreeBSD.org> - do validation check and IPv4-mapped IPv6 address handling before
any query.
- don't query against IPv6 link-local address.
- use IN6_IS_ADDR_V4{MAPPED,COMPAT} macros.
- use memcpy() instead of bcopy().

Inspired by: NetBSD
ethostbydns.c
ethostnamadr.c
a63da374584b9b7edef7e959555e8c7f6be46187 29-Apr-2005 ume <ume@FreeBSD.org> NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.
ethostbyht.c
ethostbynis.c
etnetbyht.c
etnetbynis.c
5e38b9f0d10c43d7261d6d30c5b8f68f3e413313 29-Apr-2005 ume <ume@FreeBSD.org> our get{addr,name}info() is considered thread-safe.
etaddrinfo.3
etnameinfo.3
3a568cbe4a3fb67af9a46789a00206482e9c8207 29-Apr-2005 ume <ume@FreeBSD.org> we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead.
ethostbydns.c
ethostbynis.c
d8dbaeb308e2bb88b0eebab250c74380781bee0a 28-Apr-2005 ume <ume@FreeBSD.org> sync _map_v4v6_host*() with bind9's. it treats align better bit.

Obtained from: BIND9
ethostbydns.c
ethostnamadr.c
ap_v4v6.c
etdb_private.h
412b7128e447d4c3ccd08e6a8115cd65c287dc28 28-Apr-2005 ume <ume@FreeBSD.org> we don't need mutex lock to call _gethostbynis*(), anymore.
etipnodebyname.3
ame6.c
b384ad94d82a804ef207d245503de1f7d151c499 28-Apr-2005 ume <ume@FreeBSD.org> make gethostby*() thread-safe.
ethostbydns.c
ethostbyht.c
ethostbyname.3
ethostbynis.c
ethostnamadr.c
etdb_private.h
f40143a00f8fc4b5f2ff3e33c4cb36e011f65b40 28-Apr-2005 ume <ume@FreeBSD.org> _gethostbynis{addr,name}() can handle an IPv6, now.
ame6.c
c2ee427f58870a57f71f4e20d3f83c4e6bdde733 28-Apr-2005 ume <ume@FreeBSD.org> make getnetby*() thread-safe.
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetent.3
etnetnamadr.c
etprotoent.c
etservent.c
etdb_private.h
1dcbf1fa6d10d13dbb22aa0e0ad569b2a28c7791 27-Apr-2005 ume <ume@FreeBSD.org> hide implementation specific internal functions from netdb.h.
it is needed to make get{host,net}by*() thread-safe.
ethostbydns.c
ethostbyht.c
ethostnamadr.c
etnetnamadr.c
ame6.c
etdb_private.h
6d6f9267f1415c07097fc5f4b8cc9bd1bfaefc60 26-Apr-2005 ume <ume@FreeBSD.org> our get{proto,serv}by*() use a thread-specific data space.
etprotoent.3
etservent.3
0d480fe6c9ba8a3cdeb081b48a37c03ee8a385bf 26-Apr-2005 ume <ume@FreeBSD.org> add IPv6 awareness for NIS query of gethostby*().

Inspired by: NetBSD
ethostbyname.3
ethostbynis.c
c5b4993c85e0d43326c139c8546a7620e37a6a41 25-Apr-2005 ume <ume@FreeBSD.org> ensure parsing numeric address before any host query.

Inspired by: NetBSD
ethostbydns.c
ethostnamadr.c
2b87c6fe2cb76ce1e483d8595ba45e46d2503f8a 25-Apr-2005 ume <ume@FreeBSD.org> remove unused variable.
ethostbydns.c
02df93e077f8ce629aecf120a2818da87e1ebc28 24-Apr-2005 ume <ume@FreeBSD.org> if last line didn't have trailing space, network address was also
treated as an alias.
etnetbyht.c
9af2b4271232977fe523e77ee8fd7b200a23e98f 19-Apr-2005 ume <ume@FreeBSD.org> - add getproto{byname,bynumber,ent}_r for internal use within libc.
- make getproto{byname,bynumber,ent} thread-safe.
etproto.c
etprotoent.c
etprotoname.c
etdb_private.h
6164476dea9f421c5fe3e050664d5ea7ff17cf7d 19-Apr-2005 ume <ume@FreeBSD.org> - nuke deprecated and unused getnodeby(3).
- remove unused variable.

Obtained from: KAME
ame6.c
6dfe72cfb93de2ed0bca56214d34e7154c93b420 18-Apr-2005 ume <ume@FreeBSD.org> rename the NIS related fields to have yp_ prefix.

Suggested by: delphij
etservbyname.c
etservbyport.c
etservent.c
etdb_private.h
3460f32839934dda4bd0da0981978701a43bfe2a 18-Apr-2005 delphij <delphij@FreeBSD.org> Do not check whether a pointer is NULL, since free(3) already takes care of
this case.

Reviewed by: ume
etservent.c
a524a21406ca0fdd3bb12a19a1e74d531e2c4e79 17-Apr-2005 delphij <delphij@FreeBSD.org> Fix build for !YP case.

BTW. Shall we change these fields to have yp_ prefix? That will make the
code easier to read.
etservent.c
04a684b00867c82cd1b39dd8ee860493675f6cb0 17-Apr-2005 ume <ume@FreeBSD.org> libc-internal interfaces should have two underscores in front
of their names.

Pointed out by: das
etservbyname.c
etservbyport.c
etservent.c
etdb_private.h
ba35b6aa7602967dbfeb53dc1e32ba1868bd3e98 17-Apr-2005 delphij <delphij@FreeBSD.org> Wrong working directory, sorry. The previous patch was what I have
seen in NetBSD's tree, and this one is what I have submitted for review.

Pointy hat to: me
etnameinfo.c
90a7ec34ec2cf5e36aeb76ff35c656f880659274 17-Apr-2005 delphij <delphij@FreeBSD.org> Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3). POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.

PR: standards/80008
Requested by: Xin Liu <lx@knight.6test.edu.cn>
Reviewed by: freebsd-standards (das)
MFC After: 2 weeks
etnameinfo.c
aedac4ef3ab03e1e1b44810db3827f38bf5f5289 15-Apr-2005 ume <ume@FreeBSD.org> Now, our getservbyname(3) is thread-safe. So, we don't need
to protect it with mutex lock.
etaddrinfo.c
0e0eae8d50404b8ab351262f4842141ecad7c8bf 15-Apr-2005 ume <ume@FreeBSD.org> - add getserv{byname,byport,ent}_r for internal use within libc.
- make getserv{byname,byport,ent} thread-safe.

Reviewed by: gnn
etservbyname.c
etservbyport.c
etservent.c
etdb_private.h
b8a79c699c2858b875020bba30ca8ced2a6e3ed1 15-Apr-2005 ume <ume@FreeBSD.org> hostalias() is not thread-safe. So, introduce _res_hostalias()
and use it.

Obtained from: BIND9
etaddrinfo.c
ethostbydns.c
es_query.c
61d715cfa6afc5f001cecf5d19b633d2686aba98 14-Apr-2005 ume <ume@FreeBSD.org> remove needless res_init() call.

Inspired by: NetBSD
etaddrinfo.c
1b9c36cc46d51f70af44b3a5e15adda1896c2cdf 09-Apr-2005 ume <ume@FreeBSD.org> unbreak build without YP defined.

Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
ame6.c
d1df2201c097db70f97e5d3b21f3ebd30420f024 08-Apr-2005 stefanf <stefanf@FreeBSD.org> Remove unused variables and assignments.
etifmaddrs.c
es_comp.c
es_mkupdate.c
aa9bf872c4504b84b35eb3aa05e438afe02d8b81 06-Apr-2005 ume <ume@FreeBSD.org> - we are no longer shareing any resources to be locked between
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
etaddrinfo.c
ame6.c
38e722e1a8f19290f5418aa31627d804b42d375a 06-Apr-2005 ume <ume@FreeBSD.org> separate gai_strerror(3) from getaddrinfo.c.

Requested by: phantom
akefile.inc
ai_strerror.c
etaddrinfo.c
b0c9c2a388749a17c7e53ec55d5cfc76fa1eefc2 05-Apr-2005 ume <ume@FreeBSD.org> make yp stuff re-entrant.

Obtained from: NetBSD
etaddrinfo.c
b24803b06b5183f62ba74bb0a23a8c3feee6245f 05-Apr-2005 ume <ume@FreeBSD.org> add missing mutex unlock.
ame6.c
cb0b5ed63aff6cf09fc501d2b6836d167f7d8422 04-Apr-2005 ume <ume@FreeBSD.org> make _files_getaddrinfo() re-entrant.

Obtained from: NetBSD
etaddrinfo.c
420c834c87f39381ad315d76581e34cf3946699b 02-Apr-2005 ume <ume@FreeBSD.org> nuke the logic for AF_UNSPEC and simplify. once, it was introduced
to improve getaddrinfo(3). but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
ame6.c
1ffec0c271bc669f20f01191a2a697c9b328557e 20-Mar-2005 simon <simon@FreeBSD.org> Add byteorder(9) to SEE ALSO.

MFC after: 3 days
yteorder.3
3681db07f45c679ccb04c45b3cd2c1d8b2a0aaf8 14-Feb-2005 stefanf <stefanf@FreeBSD.org> - Use socklen_t.
- No need for two instances of 'num'.
cmd.c
03a2de3818d3547af96f80c072688c6fdd6c6fe1 14-Feb-2005 stefanf <stefanf@FreeBSD.org> Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.
es_send.c
eb29a7bac4636e6bec3a03173f13a68d2f0c8446 14-Feb-2005 phantom <phantom@FreeBSD.org> . Convert return type of gai_strerror() to 'const char *' as POSIX requires.
. Convert ai_errlist[] to simple 'char *' array, and appropriately
optimize gai_strerror()
etaddrinfo.c
4548946acd47afa9ed8af3978827f3de56d9034e 14-Feb-2005 phantom <phantom@FreeBSD.org> EAI_ADDRFAMILY and EAI_NODATA are obsoleted, and not definined anymore,
so do not export these definitions via manual page
ai_strerror.3
1541af42f12f8570fb332516efee8f1e030c3e46 13-Feb-2005 ru <ru@FreeBSD.org> Expand *n't contractions.
net.3
esolver.3
114ea39c7630d67ce87bad1f4b336cd4e2389881 09-Feb-2005 ru <ru@FreeBSD.org> Fixed the misplaced $FreeBSD$.
etaddrinfo.3
etifaddrs.3
etnameinfo.3
net6_rth_space.3
sdispatch.3
306734fccba0ad99029639bf75481ce94e920f4a 28-Jan-2005 ume <ume@FreeBSD.org> use strdup().

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
bf4b229d7b3420a768242cff7f83ca949a3e4fb7 27-Jan-2005 ume <ume@FreeBSD.org> make _getipnodebyname_multi() static.
ame6.c
4a4e55c7dd46f4fec5bab18c86a18fbd287011d8 27-Jan-2005 ume <ume@FreeBSD.org> implement AI_NUMERICSERV (as defined in RFC3493).

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
1f1fe48dc9a77d0ec832c8d740c61402285c96a9 27-Jan-2005 ume <ume@FreeBSD.org> fill ai_canonname field for numeric hostname, by the given hostname.
follow new recommendation in RFC3493.

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
9958feca82f15583e0acf128dca02d928c8b8dee 27-Jan-2005 ume <ume@FreeBSD.org> query A RR before AAAA RR.

MFC after: 1 week
etaddrinfo.c
9797bcb293408b39a9ccf1af6d41f9297ce7bec3 24-Jan-2005 ru <ru@FreeBSD.org> Markup and grammar fixes.
net6_opt_init.3
net6_option_space.3
net6_rthdr_space.3
8c574cb51c013e011f03a8d5d1b379859ce99898 24-Jan-2005 gnn <gnn@FreeBSD.org> Update man pages to be in line with guidelines for IPv6 in FreeBSD.

FreeBSD currently implements the most up to date IPv6 APIs for
option and route header parsing. This checkin marks the older APIs
as deprecated and points the reader to the newer pages.

Reviewed by: Jun-ichiro Itojun
Approved by: rwatson (mentor)
net6_opt_init.3
net6_option_space.3
net6_rthdr_space.3
c51ffe001a7e6663ddb214b9dfe4e7f30e7f7220 24-Jan-2005 gnn <gnn@FreeBSD.org> Fix a dangling MKLINK from my last commit.

Approved by: rwatson (mentor)
akefile.inc
c6bc06c657d497ab7fa2d2422806fb933cd9f2fc 23-Jan-2005 gnn <gnn@FreeBSD.org> Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Reviewed by: Kame Project (including Itojun-san, Jinmei-san and Suzuki-san)
Approved by: Robert Watson (robert at freebsd dot org)
Obtained from: Kame Project and OpenBSD

Replace manual pages that may have violated the IETF's Copyright.

All come from the Kame tree.

Several were from OpenBSD except for ip6.4, and the inet6* pages which were
rewritten by me.

All of the text is new and drawn from reading the code and
documentation.
ai_strerror.3
etaddrinfo.3
etnameinfo.3
net6_opt_init.3
net6_option_space.3
net6_rth_space.3
net6_rthdr_space.3
2231fe9f4db6d8ee45e83d7302fae92714216478 23-Jan-2005 gnn <gnn@FreeBSD.org> Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Approved by: Robert Watson (robert at freebsd dot org)

Remove files in preparation for replacement with totally new versions
of the manual pages.

Update the Makefile to handle the new file to be added.
akefile.inc
etaddrinfo.3
etnameinfo.3
net6_opt_init.3
net6_option_space.3
net6_rth_space.3
net6_rthdr_space.3
ed72feddcb3cc58c18aff36f4227af3fb11facad 20-Jan-2005 ru <ru@FreeBSD.org> Sort sections.
thers.3
ui64.3
etaddrinfo.3
etifaddrs.3
etifmaddrs.3
etipnodebyname.3
etnameinfo.3
esiod.3
net6_opt_init.3
net6_option_space.3
net6_rth_space.3
net6_rthdr_space.3
cmdsh.3
esolver.3
d26afd541df23fb12a7967a6327bd1eafc184a85 15-Jan-2005 ru <ru@FreeBSD.org> Eliminate macro calls inside literal displays.
etprotoent.3
5384a04b6a249d3ae726868a4550a1ffb2d071a1 11-Jan-2005 ru <ru@FreeBSD.org> Scheduled mdoc(7) sweep.
ddr2ascii.3
742d1c9a2deef3e3a8c55e763a1e8c2e46b2becb 03-Jan-2005 sobomax <sobomax@FreeBSD.org> Don't ignore the last line of config file (/etc/hosts, /etc/services, etc)
which doesn't end in \n, since it may be very confusing. Also this should
increase consistency, since most other config files work just fine regardless
of the presence of traling \n in the last line.

MFC After: 2 weeks
etaddrinfo.c
ethostbyht.c
etnetbyht.c
etprotoent.c
etservent.c
769923c30855fa9b6c998f724a63adaf1e75c1b2 29-Dec-2004 trhodes <trhodes@FreeBSD.org> Various markup and spelling fixes.

PR: 75574
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> (original version)
net6_option_space.3
4b83c5852a5bcba28ed7ce5d13ff021642859772 13-Nov-2004 bz <bz@FreeBSD.org> Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks
cmd.c
ac8a3b40c227c80e3d3ed4d0f2330bfd03b81844 09-Oct-2004 maxim <maxim@FreeBSD.org> o Backout rev. 1.16, see 1.3 commit log for more info.

Requested by: bde

o Remove unneeded sys/types.h and netinet/in.h from the synopsis and
the example.
o We do have struct in_addr in arpa/inet.h, so no need for netinet/in.h.
o Mention where AF_* constants defined are.

Educated by: bde
ddr2ascii.3
53a9ecac892997d1d279f61c274e81af3b410626 29-Sep-2004 maxim <maxim@FreeBSD.org> Reflect the fact addr2ascii(3) and ascii2addr(3) need sys/socket.h
for AF_* constants.

Submitted by: Matthew George
MFC after: 2 weeks
ddr2ascii.3
ab6f621526c38ded9b2bfc54920e540d547ab919 09-Sep-2004 yar <yar@FreeBSD.org> Use the recently introduced RES_DFLRETRY parameter instead of a well-hidden
constant for the default number of retries.
es_init.c
43c8fe8c3ceac4330f91970d336d5d74ec4adfd7 06-Aug-2004 roam <roam@FreeBSD.org> Bump the document date, since the content changed today.

Discussed with: ru
etaddrinfo.3
etipnodebyname.3
etnameinfo.3
b63a21fa86bffa2d1b695c2c5712391c3374dfa2 06-Aug-2004 roam <roam@FreeBSD.org> Cross-reference getnameinfo(3), getaddrinfo(3), getipnodebyname(3) and
getipnodebyaddr(3).

PR: 54229
Submitted by: Samuel Tardieu <sam@inf.enst.fr>
MFC after: 2 weeks
etaddrinfo.3
etipnodebyname.3
etnameinfo.3
fc96a672a7a0b1968e7ace3d7393d759e113144a 21-Jul-2004 ume <ume@FreeBSD.org> now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int

Obtained from: KAME
ethostbydns.c
ame6.c
94c32e06a7d91c9f69cbd0412a801b576b682498 07-Jul-2004 ru <ru@FreeBSD.org> Markup nits.
ui64.3
408d450c6b824e2082587f0fdde36251dcbd51f3 05-Jul-2004 ru <ru@FreeBSD.org> Markup fixes.
etifmaddrs.3
net6_opt_init.3
net6_rth_space.3
57ce50860e81c55913c3e3d59255c73bef88ba12 03-Jul-2004 ru <ru@FreeBSD.org> Eliminate double whitespace.
inkaddr.3
01548ace1533487f9c0488f55112c9d8641f8184 02-Jul-2004 ru <ru@FreeBSD.org> Mechanically kill hard sentence breaks.
ddr2ascii.3
yteorder.3
ethostbyname.3
etifaddrs.3
etipnodebyname.3
etnetent.3
etprotoent.3
etservent.3
net.3
net6_opt_init.3
net6_rthdr_space.3
esolver.3
95168a499a3eaa1d9616c865b50f9f0923cd5bb8 30-Jun-2004 ru <ru@FreeBSD.org> Markup, grammar, and spelling fixes.
etipnodebyname.3
net.3
esolver.3
4104a7f84fd330bcd30c1c509f0026011e03780b 21-Jun-2004 mpp <mpp@FreeBSD.org> Spelling fixes.
net6_opt_init.3
net6_rth_space.3
12902610396d375c2ad19336c8722ddb771e5632 16-Jun-2004 ume <ume@FreeBSD.org> Rename variable name from `name' to `hostname'.
This is a corresponding change to bin/67994. I'll soon commit
bin/67994 into 4-STABLE. Actually, 5-CURRENT's getaddrinfo()
doesn't have the problem mentiond in bin/67994. However, it is
good to be in sync variable name with 4-STABLE and KAME.

PR: bin/67994
Submitted by: JINMEI Tatuya <jinmei@ocean.jinmei.org>
etaddrinfo.c
5ec68b5ea13249b6d8fc9647cdb8f03bc0f2b986 14-Jun-2004 bms <bms@FreeBSD.org> Date bump.

Requested by: krion
net.3
4561ab95f206bae868d6c3f59f5525582bf5ff1a 14-Jun-2004 bms <bms@FreeBSD.org> Document some return values.

PR: bin/22198
Submitted by: Nick Johnson (with cleanups)
net.3
9fe08d77b1f2f7b8812f8eaf61aa0b224b419fa6 02-Jun-2004 ume <ume@FreeBSD.org> use source address as a hint to determine destination address
by getipnodebyname().
ame6.c
38ea4501c076965dc3152b6d084d55880010288e 01-Jun-2004 brooks <brooks@FreeBSD.org> Add Aerospace Corporation copyrights to EUI64 support files.

Suggested by: marcel, imp
ui64.3
ui64.c
d5d90e314729317ee9cce434f3c548b3f4aaaf04 31-May-2004 ume <ume@FreeBSD.org> Treat IPv4 private address as global scope rather than site scope.
Though it breaks RFC 3484, without this change, dest addr selection
doesn't work well under NAT environment.
etaddrinfo.c
2e0618e0095c55d5b10a101b9bedcf0ba9d99a98 31-May-2004 ume <ume@FreeBSD.org> use source address as a hint to determine destination address.

Obtained from: KAME
etaddrinfo.c
5ae1bd47055bb0a8824b70db8ecac0a96fa662c1 26-May-2004 brooks <brooks@FreeBSD.org> Add support for an /etc/eui64 file modeled on /etc/ethers. The API is
modeled on ethers(3) except that all functions are thread-safe.

Reviewed by: simokawa
akefile.inc
ui64.3
ui64.c
a2a9798706fbd65b26aa9fbc8c2a8156f0aadb3b 21-Apr-2004 ru <ru@FreeBSD.org> Unbreak world.
es_query.c
9f92f4fef4573031fe2a609a08b9f0ed35424e36 21-Apr-2004 njl <njl@FreeBSD.org> MFdragonfly: resolver fix for timeouts on unqualified hostnames

res_search only incremented got_servfail for h_errno == TRY_AGAIN *AND*
hp->rcode == SERVFAIL. However, there are cases such as timeouts where
rcode is not always set to SERVFAIL. This leads to inconsistent nameserver
operation during multi-domain and truncated dot searches, especially during
booting when portions of the network are being brought up simultanious with
dns lookups.

This patch attempts to correct the problem by unconditionally terminating
the search if TRY_AGAIN is returned (after res_query has gone through all
retries and name servers) instead of trying other domain elements in the
domain seach path.

This patch should fix reported problems (which I can reproduce) with some
NFS mounts failing during boot. This occured because mount_nfs thought the
host name lookup returned a definitive failure using a non-dotted host name
when, in fact, it timed out on the first part (host.search.domain.name) and
got a definitive host-not-found response on the second part (host.).

Generally speaking, search path name server timeouts can exceed 60 seconds
per element and most machines which consistently timeout on earlier portions
of a search path are effectively non-operational due to the imposed delays.
It is more important for DNS lookups to return the proper error code then
to be able to recover a valid lookup in later portions of the search path
in these situations.

Obtained from: DragonFly
MFC after: 3 weeks
es_query.c
3e32cfd0f200adcc574356c352b2ada255a50303 06-Apr-2004 pb <pb@FreeBSD.org> Add a missing "*errp = h_errno" forgotten in rev 1.36.
ame6.c
f378d8f9dc55207e1dd012e16455be83d36149d3 05-Apr-2004 pb <pb@FreeBSD.org> Fix _dns_ghbyname() to return NS_TRYAGAIN instead of NS_NOTFOUND
on temporary nameserver failure. This is necessary to get
getipnodebyname(3) to correctly return h_errno=TRY_AGAIN instead
of HOST_NOT_FOUND.

Reviewed by: green, thomas
MFC after: 1 week
ame6.c
ebdf5cfddd596e2dc77d372b7914fcdcd0535688 01-Apr-2004 nectar <nectar@FreeBSD.org> The previous commit changed the behavior of nsdispatch() in the
case where an /etc/nsswitch.conf file was present, but could not
be opened (e.g. due to permissions). Previously, the open failure
condition was suppressed, and the built-in defaults were used. In
revision 1.11, however, propagated the open failure causing all
nsdispatch() invocations to return NS_UNAVAIL, and thus many APIs
including getpwnam and gethostbyname unconditionally failed.

This commit restores the previous behavior.

Pointy hat: nectar (+1 for obstinance; ache had to use clue bat)
Reported by: ache
sdispatch.c
7ec3e333012ba329299be5ca10738792b75cac89 30-Mar-2004 nectar <nectar@FreeBSD.org> When a dynamic NSS module is built and linked against a thread
library, it may pull in that thread library at run time. If the
process started out single-threaded, this could cause attempts to
release locks that do not exist. Guard against this possibility by
checking __isthreaded before invoking thread primitives.

A similar problem remains if the process is linked against one thread
library, but the NSS module is linked against another. This can only
be avoided by careful design of the NSS module.

Submitted by: Sean McNeil <sean@mcneil.com> (mostly; bugs are mine)
sdispatch.c
ss_compat.c
a52d3498dd4aaef64ef78f0b57a1adc9f2b9aff6 15-Mar-2004 des <des@FreeBSD.org> Don't try to pass off a struct sockaddr as a struct sockaddr_in when it
may in fact very well be a struct sockaddr_in6. Just use plain struct
sockaddr.

This brings us yet another step closer to a clean -O2 build.
es_send.c
2d02e7d4d41aeddec1497a445b0e1c8306a5827b 15-Mar-2004 des <des@FreeBSD.org> Make this compile with -O2. A proper fix would use a struct to represent
vectors, instead of requiring the caller to keep track of element size
and count and pass them in by reference.
sdispatch.c
243c5ae2b180b02045d0d1665480ca384c0bbc10 15-Mar-2004 des <des@FreeBSD.org> Whitespace nits.
sdispatch.c
0b0ae8e16e50fd60ad86f4f14ec05cfc50e7eae5 05-Mar-2004 markm <markm@FreeBSD.org> Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
ethostbydns.c
40452493ee2a89d18609e7a71f114981ff6a315a 25-Feb-2004 green <green@FreeBSD.org> Make the resolver(3) and many associated interfaces much more reentrant.
The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now
with what should be totally reentrant, and h_errno values will now
be preserved correctly, but this does not affect interfaces such as
gethostbyname(3) which are still mostly non-reentrant.

In all of these relevant functions, the thread-safety has been pushed
down as far as it seems possible right now. This means that operations
that are selected via nsdispatch(3) (i.e. files, yp, dns) are protected
still under global locks that getaddrinfo(3) defines, but where possible
the locking is greatly reduced. The most noticeable improvement is
that multiple DNS lookups can now be run at the same time, and this
shows major improvement in performance of DNS-lookup threaded programs,
and solves the "Mozilla tab serialization" problem.

No single-threaded applications need to be recompiled. Multi-threaded
applications that reference "_res" to change resolver(3) options will
need to be recompiled, and ones which reference "h_errno" will also
if they desire the correct h_errno values. If the applications already
understood that _res and h_errno were not thread-safe and had their own
locking, they will see no performance improvement but will not
actually break in any way.

Please note that when NSS modules are used, or when nsdispatch(3)
defaults to adding any lookups of its own to the individual libc
_nsdispatch() calls, those MUST be reentrant as well.
etaddrinfo.3
etaddrinfo.c
ethostbydns.c
ethostbyname.3
ethostbynis.c
etipnodebyname.3
error.c
ame6.c
es_init.c
es_send.c
es_send_private.h
esolver.3
b9b55438a38eb58235ca7040d7ff56be4ed7d9d2 20-Feb-2004 ume <ume@FreeBSD.org> add destination address selection support for getipnodebyname(3).
though getipnodebyname(3) is obsoleted api, some major applications
such as Mozilla are still using it. so, it will help ipv4 users.
ame6.c
d3296afe56fbe54528da95cf3826561b3fce2718 10-Feb-2004 cperciva <cperciva@FreeBSD.org> style cleanup: Remove duplicate $FreeBSD$ tags.

These files had tags at the start of the file
(incorrect, removed), and after the copyright
notices (correct).

Approved by: rwatson (mentor)
net6_rth_space.3
b377ec7a9a2093b8c3c6e8c28b306c8bc7094120 07-Feb-2004 ru <ru@FreeBSD.org> Unbreak world.
etnetbydns.c
3ebf28da6658db281ed46b93dbd2332f1d9c4256 07-Feb-2004 dds <dds@FreeBSD.org> getnetbyname fixes:
Do not choke on malformed network addresses.
Return n_name in static space, not on the function's stack.

MFC after: 1 week
etnetbydns.c
9b32167d5f7827194140898b20cd7754dc0592a2 09-Jan-2004 nectar <nectar@FreeBSD.org> It was reported that when using nss_ldap, getgrent(3) would behave
incorrectly when encountering `large' groups (many members and/or many
long member names). The reporter tracked this down to the glibc NSS
module compatibility code (nss_compat.c): it would prematurely record
that a NSS module was finished iterating through its database in some
cases.

Two aspects are corrected:

1. nss_compat.c recorded that a NSS module was finished iterating
whenever the module reported something other than SUCCESS. The
correct logic is to continue iteration when the module reports
either SUCCESS or RETURN. The __nss_compat_getgrent_r and
__nss_compat_getpwent_r routines are updated to reflect this.

2. An internal helper macro __nss_compat_result is used to map glibc
NSS status codes to BSD NSS status codes (e.g. NSS_STATUS_SUCCESS ->
NS_SUCCESS). It provided the obvious mapping.

When a NSS routine is called with a too-small buffer, the
convention in the BSD NSS code is to report RETURN. (This is used
to implement reentrant APIs such as getpwnam_r(3).) However, the
convention in glibc for this case is to set errno = ERANGE and
overload TRYAGAIN. __nss_compat_result is updated to handle this
case.

PR: bin/60287
Reported by: Lachlan O'Dea <odela01@ca.com>
ss_compat.c
cdff4028d6f5e91b9005820bd2cedda7d360fa4d 06-Jan-2004 nectar <nectar@FreeBSD.org> Work around a `warning: zero-length printf format string'.
es_send.c
93b87ff9b0c62b50781c5c64ceca2f2662fee9d2 07-Dec-2003 murray <murray@FreeBSD.org> Add support for timeout: and attempts: resolver options.

Submitted by: Paul Vixie <paul@vix.com> / ISC
MFC After: 1 week
es_init.c
47c129ab4445e4c2476772fd12576c58374dc7f0 14-Nov-2003 bms <bms@FreeBSD.org> Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function,
getifmaddrs(), is added to retrieve current multicast group memberships.

Reviewed by: harti
akefile.inc
etifmaddrs.3
etifmaddrs.c
bad03e121037dd04ec493301a153a5b95bf7840b 14-Nov-2003 ume <ume@FreeBSD.org> u_int8_t cannot carry a number greater than 255.

Reported by: nectar
p6opt.c
9bdda800efd96bc0c8377f7c423affd025bc1a9b 30-Oct-2003 ume <ume@FreeBSD.org> add destination address selection described in RFC3484.
in KAME implementation, even when no policy is installed
into kernel, getaddrinfo(3) sorts addresses. Since it
causes POLA violation, I modified to don't sort addresses
when no policy is installed into kernel,

Obtained from: KAME
etaddrinfo.c
72898b10e9954cd424e72cbd3cedfb0da9092219 25-Oct-2003 ume <ume@FreeBSD.org> according to RFC3542 10.5, the 5th argment of inet6_opt_next()
is not size_t but socklen_t.

Reported by: tinderbox
p6opt.c
bb36ba66842b19eb517eb65fd51c7c10df174976 24-Oct-2003 ume <ume@FreeBSD.org> oops, revert previous change to getaddrinfo.c. This is not related
to RFC3493. The previous change was related to RFC3484 (Default
Address Selection for IPv6), and it will come later.
etaddrinfo.c
881c4fa39150df7d0de2dae7ae808f6a73cb199a 24-Oct-2003 ume <ume@FreeBSD.org> Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis). Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from: KAME
akefile.inc
etaddrinfo.c
net6_opt_init.3
net6_rth_space.3
p6opt.c
thdr.c
a30fc1e90175e42cc0e6eb4055b414571c50d936 23-Oct-2003 ume <ume@FreeBSD.org> reorder functions to be in sync with KAME.
etaddrinfo.c
0bbe986bd73c2eec22bb91861453d3d7c16d6b09 23-Oct-2003 ume <ume@FreeBSD.org> EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493
(aka RFC2553bis). Now, getaddrinfo(3) returns EAI_NONAME
instead of EAI_NODATA. Our getaddrinfo(3) nor getnameinfo(3)
didn't use EAI_ADDRFAMILY.

Obtained from: KAME
etaddrinfo.3
etaddrinfo.c
78f757ea792b78a0927795400e65ff20cc9002e7 22-Oct-2003 ume <ume@FreeBSD.org> oops, gai_strerror must return default value when error code
isn't found in ai_errlist.
etaddrinfo.c
241d46a98895e0938c9155b3f511f5361cd6aff0 22-Oct-2003 ume <ume@FreeBSD.org> make ai_errlist struct. this is preparation for RFC3493
(EAI_NODATA is depricated).

Obtained from: KAME
etaddrinfo.c
bf741bc603a4e3d435392d831a2e8a401ed1d49e 21-Oct-2003 ume <ume@FreeBSD.org> stop use of NI_WITHSCOPEID. it was deprecated.

Obtained from: KAME
etnameinfo.3
d41e114b7c3c0b87596120ca5d836779f05f428e 15-Sep-2003 fenner <fenner@FreeBSD.org> From OpenBSD:
always widen the imputed netmask if it is narrower than the specified octets.
fixes a strange behaviour where inet_net_pton would always return 4 (bits)
for multicast addresses no matter how many octets were specified.

negotiated with Paul Vixie, original author of this function.

PR: standards/53151
Submitted by: Max Laier <max@love2party.net>
Optained from: OpenBSD
net_net_pton.c
93c02adbfdee5259708c436e90e56efdc7bb2f8a 15-Sep-2003 ume <ume@FreeBSD.org> Our getaddrinfo() and getnameinfo() are thread-safe but
some limitation.

Reported by: Marc G. Fournier <scrappy@hub.org>
etaddrinfo.3
etnameinfo.3
1edcd1b018b1c6b16090b99f84f1fa3300795d0b 10-Sep-2003 ru <ru@FreeBSD.org> mdoc(7): Properly mark C headers.
net6_option_space.3
net6_rthdr_space.3
esolver.3
1c23ef339bcd24785a7edbf6087f4e9c1054a22e 08-Sep-2003 ru <ru@FreeBSD.org> mdoc(7): Use the new feature of the .In macro.
ddr2ascii.3
thers.3
etaddrinfo.3
etifaddrs.3
etnameinfo.3
f_indextoname.3
esolver.3
1c6aeeb40b89803babba4fa4918658eff42c35e6 25-Jul-2003 mux <mux@FreeBSD.org> An u_int8_t can never be bigger than 255, so remove a useless check.

Spotted by: GCC
p6opt.c
5ac65c46e64b21cbadea9ac53fc4e019c8005e3e 19-Jun-2003 kris <kris@FreeBSD.org> Remove bogus non-reentrant "temporary" implementation of gethostbyaddr_r()
that has been here for 6 years and 9 months.

Reviewed by: deischen
MFC After: 1 week
ethostnamadr.c
019b3e7b40da4bdfb5d2ec605f3ea6153aba3c6c 08-Jun-2003 charnier <charnier@FreeBSD.org> .Xr -> .Lb for librairy. There is no manual page corresponding to .Xr.
ethostbyname.3
9bcac8799e0fa205ce0aab2815e1934c1c7fb3ad 22-May-2003 ru <ru@FreeBSD.org> Assorted mdoc(7) fixes.

Approved by: re (blanket)
sdispatch.3
5a893bc4659fe5e2d207be562d6802d6188de630 18-May-2003 ru <ru@FreeBSD.org> Fixed troff(1) and mdoc(7) warnings.

Approved by: re (blanket)
sdispatch.3
b9459b93990457e57a289323e1cab3e685ea9b5c 04-May-2003 deischen <deischen@FreeBSD.org> Replace use of a spinlock with a mutex.
etaddrinfo.c
ame6.c
0b64e1476ba01c6ba095af7d0623e93362281a12 01-May-2003 nectar <nectar@FreeBSD.org> Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
etaddrinfo.c
ethostbydns.c
etnameinfo.c
esiod.c
f_nametoindex.c
e69967f5348cec651f8806d25d2c59ac8ed8c2a2 29-Apr-2003 nectar <nectar@FreeBSD.org> `Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by: qpopper's interfering and buggy version of strlcpy
etaddrinfo.c
ethostbydns.c
etnameinfo.c
esiod.c
f_nametoindex.c
70e12ffd198118ffc58acaf761c79ea36905e29d 24-Apr-2003 nectar <nectar@FreeBSD.org> Don't complain about missing NSS methods when built statically. It is
annoying and not very useful.

Sponsored by: DARPA, Network Associates Laboratories
sdispatch.c
e24fc5cd2114be8185898edffd1ee3cef0ad2ebe 24-Apr-2003 nectar <nectar@FreeBSD.org> Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by
namespace.h.

Sponsored by: DARPA, Network Associates Laboratories
ethostnamadr.c
etnetnamadr.c
8b5edf7f5b6beed6c920f17eed905067eb649549 24-Apr-2003 nectar <nectar@FreeBSD.org> Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by
namespace.h.

Sponsored by: DARPA, Network Associates Laboratories
etaddrinfo.c
ame6.c
1b1f6bb4f50d42bbbb1291be0c60741c12f8201a 17-Apr-2003 nectar <nectar@FreeBSD.org> = Implement name service switch modules (NSS modules). NSS modules
may be built into libc (`static NSS modules') or dynamically loaded
via dlopen (`dynamic NSS modules'). Modules are loaded/initialized
at configuration time (i.e. when nsdispatch is called and nsswitch.conf
is read or re-read).

= Make the nsdispatch(3) core thread-safe.

= New status code for nsdispatch(3) `NS_RETURN', currently used to
signal ERANGE-type issues.

= syslog(3) problems, don't warn/err/abort.

= Try harder to avoid namespace pollution.

= Implement some shims to assist in porting NSS modules written for
the GNU C Library nsswitch interface.

Sponsored by: DARPA, Network Associates Laboratories
akefile.inc
sdispatch.3
sdispatch.c
slexer.l
sparser.y
ss_backends.h
ss_compat.c
243fd46542f78092dc8585f866ea40b7d08ca8fc 05-Mar-2003 peter <peter@FreeBSD.org> Remove NS and ISO stuff.
akefile.inc
so_addr.3
so_addr.c
s.3
s_addr.c
s_ntoa.c
3d9d7eb40860efd11b275e218ec14ce570b288b5 03-Mar-2003 obrien <obrien@FreeBSD.org> Restore vendor ID.
es_query.c
0d65b541d4b09e3c91112b5b2ffe0efa9a390a55 27-Feb-2003 nectar <nectar@FreeBSD.org> Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
etaddrinfo.c
etservent.c
sdispatch.c
slexer.l
cmdsh.c
e369901c4d167440aa02ef1987950bb77fba23c1 18-Feb-2003 nectar <nectar@FreeBSD.org> Whack 28 unused variables.
s_name.c
s_ttl.c
cmd.c
es_debug.c
es_mkupdate.c
832e8b7f9a7422b49453b7e389ec411d3037a50f 16-Feb-2003 nectar <nectar@FreeBSD.org> Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.

Reviewed by: /sbin/md5
f_nametoindex.c
ame6.c
es_query.c
670dc7ec9e1fcc81daf91cffc68795e303560b63 06-Feb-2003 charnier <charnier@FreeBSD.org> The .Fn function
ethostbyname.3
sdispatch.3
dde73f1de42ddfcd58d5aadeb1e13099afbe1471 05-Jan-2003 fenner <fenner@FreeBSD.org> Use in_addr_t for the right size of an IPv4 address, and copy into
an unaligned destination using bcopy instead of an assignment.

Submitted by: Hartmut Brandt <brandt@fokus.gmd.de>
PR: sparc64/46729
ethostbynis.c
d3367c5f5d3ddcc6824d8f41c4cf179f9a5588f8 01-Jan-2003 schweikh <schweikh@FreeBSD.org> Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
net_neta.c
s_name.c
fec6546e12b076c18d8f6ccef5737bc62ee319cc 27-Dec-2002 schweikh <schweikh@FreeBSD.org> english(4) police.
net6_option_space.3
sdispatch.3
51fe7c1a888747c57136cc34ec54a93a0487b745 19-Dec-2002 ru <ru@FreeBSD.org> mdoc(7) police: "The .Fa argument.".
ddr2ascii.3
etaddrinfo.3
ethostbyname.3
etnameinfo.3
etnetent.3
net6_option_space.3
net_net.3
cmdsh.3
esolver.3
ockatmark.3
863465c1ab2c58349d7f1f859822ef564e592280 18-Dec-2002 ru <ru@FreeBSD.org> mdoc(7) police: Fixed abuses of the .Ar and .Em macros.
thers.3
etipnodebyname.3
etnameinfo.3
esolver.3
8746d263e1451855025dc83dde5176cc9f1fbe3f 18-Dec-2002 ru <ru@FreeBSD.org> mdoc(7) police: "The .Fn function".
thers.3
etaddrinfo.3
ethostbyname.3
etipnodebyname.3
esiod.3
net6_option_space.3
net6_rthdr_space.3
so_addr.3
inkaddr.3
cmd.3
ockatmark.3
ad42bf1099736e6867da1bd271cff24448fb6946 14-Dec-2002 ru <ru@FreeBSD.org> mdoc(7) police: markup overhaul.
ockatmark.3
7435be9a24648e55d797b9c08512877965521e7a 13-Dec-2002 fenner <fenner@FreeBSD.org> Add an implementation of the POSIX.1 sockatmark(3).
akefile.inc
ockatmark.3
ockatmark.c
eb277a30c8a8cd5b744d69ec3e75517a666b2804 12-Dec-2002 trhodes <trhodes@FreeBSD.org> Fix the HISTORY to match reality. They were never MFC'ed to 4.X.

Submitted by: R. Imura <imura@ryu16.org>
Approved by: re (murray)
sdispatch.3
ea13b9803b8a849cb95aa4a9b15b1f007b9fd3b0 04-Dec-2002 ru <ru@FreeBSD.org> Consistently mark std(in|out|err) with .Dv, because that's how they
are marked up in stdio(3), and because they are defined expressions
of type "FILE *".

Approved by: re
cmd.3
cmdsh.3
3f859aa2ab91ed5a7f52ef2667cdd5d040bcbdf7 29-Nov-2002 ru <ru@FreeBSD.org> mdoc(7) police: formatting nits.

Approved by: re
cmd.3
cdeea51f465d7a6b284af099f17e8c09471975e5 28-Nov-2002 ume <ume@FreeBSD.org> try SIOCGIFINDEX 1st to be able to use network aliasing.

Submitted by: jlemon
Approved by: re
f_nametoindex.c
40e2359f4b10f61d80f4c8a2f6d4a3fc5c377d95 18-Nov-2002 ru <ru@FreeBSD.org> libc_r wasn't so tied to libc for 22 months.
akefile.inc
46eab906451692bc2ec684f548a8d6594c695446 26-Oct-2002 ume <ume@FreeBSD.org> query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.

MFC after: 5 days
ethostbydns.c
a6f6127838973ab13d349a94f2bb3fd5130c3bb3 25-Oct-2002 ume <ume@FreeBSD.org> - scopeid is u_int32_t
- strtoul pedant. pointed out by deraadt

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
1d4536a05986ebaee553e48748d0656d31e807a7 25-Oct-2002 ume <ume@FreeBSD.org> - kill strcpy
- port range check need to be done before htons. from deraadt
- %d/%u audit
- correct bad practice in the code - it uses two changing variables
to manage buffer (buf and buflen). we eliminate buflen and use
fixed point (ep) as the ending pointer.
- use snprintf, not sprintf
- pass correct name into q.name. from lukem@netbsd
- sync comment

Obtained from: KAME
MFC after: 1 week
etaddrinfo.c
ba20c3c6e30c3e8201fe1ef1b8efc9e7265cdb7d 23-Oct-2002 ume <ume@FreeBSD.org> query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.

Obtained from: KAME
MFC after: 1 week
ame6.c
7e81d9c8895c5a191873642d607ff2af18d95efb 06-Oct-2002 ume <ume@FreeBSD.org> Put giant locks due to make getaddrinfo(), getnameinfo()
and getipnodeby*() thread-safe.
Our res_*() is not thread-safe. So, we share lock between
getaddrinfo() and getipnodeby*(). Still, we cannot use
getaddrinfo() and getipnodeby*() in conjunction with other
functions which call res_*().

Requested by: many people
etaddrinfo.c
ame6.c
6448ec6d62b52795cd96af767b261ed044ee49e1 03-Oct-2002 ume <ume@FreeBSD.org> Allocate 64K recieve buffer for DNS responses.
Though res_query.c also defines and refers MAXPACKET, it is not
related to ansbuf. So, I didn't touch res_query.c.
ethostbydns.c
etnetbydns.c
86a758e51be945d9e690ee0802a21bf9a667b4e8 25-Sep-2002 mike <mike@FreeBSD.org> Use the standardized CHAR_BIT constant instead of NBBY in userland.
es_init.c
d3b3a2b79bf5041d94bae9d209539c01903e2ce8 19-Sep-2002 nectar <nectar@FreeBSD.org> Add forgotten newlines in debug messages.
etnetbydns.c
c18a6ce2421310c6a69d995d2d5530723691e50a 16-Sep-2002 ume <ume@FreeBSD.org> Allocate 64K recieve buffer for DNS responses.
ame6.c
9c29b6417765f0e8a1066883a28f74e1a7f08be2 15-Sep-2002 ume <ume@FreeBSD.org> Allocate 64K recieve buffer for DNS responses.
KAME did the modification only to _dns_getaddrinfo(). However,
it is not sufficient, and res_queryN() should be modified, too.
So, I did same modification to res_queryN().

Obtained from: KAME
etaddrinfo.c
b44001f0c35c71357de671925af59585fe44a345 15-Sep-2002 nectar <nectar@FreeBSD.org> Check for truncation in calls to res_send/res_query/res_search.
Fail when it is detected.
etaddrinfo.c
ethostbydns.c
etnetbydns.c
esiod.c
ame6.c
es_update.c
a0732e9360e7fd21a2175f288c2e3b56ed4c425a 15-Sep-2002 nectar <nectar@FreeBSD.org> Backout the increase of MAXPACKET from 1024 to 65536: it
broke pthreads.

Reported by: mbr, tjr
etaddrinfo.c
ethostbydns.c
etnetbydns.c
ame6.c
es_query.c
es_update.c
db96f2a540e24e5ed025d0861f755d6bb187dbec 14-Sep-2002 ume <ume@FreeBSD.org> Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.

Obtained from: KAME
es_mkquery.c
57c880964051d411ff6f58ea80ab93527222defb 13-Sep-2002 nectar <nectar@FreeBSD.org> When using res_send/res_query/res_search, the caller must either
insure enough space is available for the response, or be prepared
to resize the buffer and retry as necessary.

Do the conservative thing and make sure enough space is available.

Reviewed by: silence on freebsd-audit
etaddrinfo.c
ethostbydns.c
etnetbydns.c
ame6.c
es_query.c
es_update.c
cd5ca96599d24e7c9375719e86b16b5d3165e931 06-Sep-2002 tjr <tjr@FreeBSD.org> Style: One space between "restrict" qualifier and "*".
net.3
net_ntop.c
net_pton.c
4966efff7bc9071f04706819e62e1a291d22bcb2 25-Aug-2002 charnier <charnier@FreeBSD.org> Replace various spelling with FALLTHROUGH which is lint()able
s_addr.c
s_ntoa.c
5e4153d48642b1dc2e6996b5e1ac0b0cce56e76d 24-Aug-2002 jdp <jdp@FreeBSD.org> Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attempts
to fail needlessly if a reverse DNS lookup of the IP address didn't
come up with a hostname. As a comment in the code clearly stated,
the "damn hostname" was looked up only for the purpose of netgroup
matching. But if that lookup failed, the function bailed out
immediately even though in many cases netgroup matching would not
be used.

This change marks the hostname as unknown but continues. Where
netgroup matching is performed, an unknown hostname is handled
conservatively. I.e., for "+@netgroup" (accept) entries an unknown
hostname never matches, and for "-@netgroup" (reject) entries an
unknown hostname always matches.

In the lines affected (only), I also fixed a few bogus casts. There
are others, and in fact this entire file would be a good candidate
for a cleanup sweep.

Reviewed by: imp (wearing his flourescent yellow Security Team cap)
MFC after: 2 days
cmd.c
ee1c2cc721087a0b3e7657c05643ca6701aa2bfa 21-Aug-2002 pirzyk <pirzyk@FreeBSD.org> Fixed getaddrinfo to honor sortlist in /etc/resolv.conf

PR: bin/27939
Reviewed by: ru, sheldonh (about a year ago)
Obtained from: ume (via KAME, I think)
MFC after: 1 month
etaddrinfo.c
fe770f50bf1675781f47c1d056f4aa8468011596 15-Aug-2002 robert <robert@FreeBSD.org> - Fix a bug that wrote one char behind the end of the
supplied buffer in case the size of it was equal to
the number of characters the converted address consumed.
The bug occurred when converting an AF_INET address.
- Remove the SPRINTF macro and use sprintf instead.
- Do not do string formatting using sprintf(3) and a
temporary buffer which is copied when the supplied
buffer provides enough space. Instead, use snprintf(3)
and the real destination buffer, thus avoid the copy.

Reported by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1)
PR: misc/41289
net_ntop.c
62a0b60a38533bd73b089ce843f3bc3215a40e4f 15-Aug-2002 robert <robert@FreeBSD.org> Put each function argument on its own line to keep lines shorter
than 80 columns.
net.3
af770662f5873b76efc3233fab18400da9bded1d 14-Aug-2002 robert <robert@FreeBSD.org> -Add the restrict required by IEEE Std 1003.1-2001 in form
of our __restrict macro to the prototypes and function
definitions of inet_pton and inet_ntop.
- Use ANSI-C function argument lists.
- Adjust the prototypes in the manual page.
net.3
net_ntop.c
net_pton.c
6d9dd3b5574d9becec73ca0d8c3cbdb9df201c49 09-Aug-2002 ru <ru@FreeBSD.org> mdoc(7) police: laundry.
f_indextoname.3
08d325ca8181cf5c7b6a32d84f8c64dc5bc4cd67 02-Aug-2002 mux <mux@FreeBSD.org> Remove an #include <syslog.h>. It's already included conditionally
above, as it should be.

Submitted by: Olivier Houchard <cognet@ci0.org>
etaddrinfo.c
4b45c00ba2ff9582e2b76a588816500d11f09df7 25-Jul-2002 ume <ume@FreeBSD.org> sysctl(NET_RT_IFLIST) up to several (currently 5) times.
This will make the behavior robuster if many addresses are added
after the size estimation of storage at the first sysctl.

Reviewed by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
MFC after: 1 week
etifaddrs.c
11795efea74b7dfde0f7363cdcb4ae25d4cf7581 24-Jul-2002 ume <ume@FreeBSD.org> - ntohs() returns unsigned value.
- use strlcpy.
- snprintf can return negative value, so cope with it.
- tweak interface index on interface locals (ff01::/16).
- removed unused macros.
- removed a macro that uses only once (in a trivial context).
- explicitly say goodbye to ENI_xxx.
- constify struct afd.

Obtained from: KAME
MFC after: 1 week
etnameinfo.c
c95ccb75f4f6064deccbec4faf05791efe52dda1 15-Jul-2002 ume <ume@FreeBSD.org> Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex()
and if_freenameindex().

Obtained from: KAME
MFC after: 2 weeks
akefile.inc
f_indextoname.3
f_indextoname.c
f_nameindex.c
f_nametoindex.c
fname.c
4c9a1c63b41e96766db2828df5240a2b95b970f1 07-Jul-2002 robert <robert@FreeBSD.org> Fix syntax error which occurred when LIBC_SCCS was defined.
es_query.c
ddbac8e31144c1b1d9d8af4ec593f0024421bb0b 02-Jul-2002 ume <ume@FreeBSD.org> Make NI_WITHSCOPEID a default (always on), to synchronize
with recent 2553bis.

Obtained from: KAME
MFC after: 3 weeks
etnameinfo.c
c8f207f89f5cbbfd10791f54508afe1be8f5ea6e 26-Jun-2002 imp <imp@FreeBSD.org> Remove two lines that were cvs merged that shouldn't have been. This
fixes the build.

Reported by: dillon.
ame6.c
de4e8e7ae4d354a77e8b4d2a1eccc031b9094939 26-Jun-2002 imp <imp@FreeBSD.org> Remove two stray lines that snuck in the cvs merge
ethostbydns.c
etnetbydns.c
a5964e51a58cadcf3a7ec7cca6a845574f805ecd 26-Jun-2002 nectar <nectar@FreeBSD.org> Initialize a pointer that was left uninitialized with the previous
commit.
etnetbydns.c
8df35cae5920770f3ca2040b56aa6e1cdc468740 26-Jun-2002 imp <imp@FreeBSD.org> Include more robust checking of end of buffer that more completely
plugs the hole.
ethostbydns.c
etnetbydns.c
ap_v4v6.c
ame6.c
d36b92c7bb65d6b90c37a0e90f87624cf5d65856 26-Jun-2002 imp <imp@FreeBSD.org> Don't allow buffer overflow here either.
etnetbydns.c
3eb1b04697ca128ee0c868eb6faab8df35e91c13 26-Jun-2002 imp <imp@FreeBSD.org> Fix a minor last, minute issue that came in after I committed.

Noticed by: nectar
ethostbydns.c
2bbf857de4c4b712c707b817caa739ddfdd01207 26-Jun-2002 imp <imp@FreeBSD.org> Avoid remote buffer overflow on hostbuf[].

Submitted by: joost Pol <joost@pine.nl>
ethostbydns.c
ame6.c
5607249aab5415414339e3ccb355ba8a13d130e1 06-Jun-2002 sheldonh <sheldonh@FreeBSD.org> Correct FreeBSD release of first appearance in the HISTORY section
(5.0 -> 4.6).
cmdsh.3
1ee311b26d7122f860fe940db6ce46968981a9a3 28-May-2002 alfred <alfred@FreeBSD.org> Assume __STDC__, remove non-__STDC__ code.

Submitted by: keramida
sdispatch.c
759ec3782f05659ec9470c0a7dedb9f9a56b590a 11-May-2002 mike <mike@FreeBSD.org> Document that <netinet/in.h> can also provide prototypes. Change
wording related to standards conformance.
yteorder.3
553226e8e16639b00d61d81e0125330dbfb7eed8 19-Apr-2002 suz <suz@FreeBSD.org> just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.
(based on freebsd4-snap-20020128)

Reviewed by: ume
MFC after: 1 week
etaddrinfo.3
fname.c
net_addr.c
net_pton.c
thdr.c
ars.c
31dc2e2cc426590eef1626c19b77a7f4491f82e3 15-Apr-2002 ume <ume@FreeBSD.org> Add awareness of an IPv6.

MFC after: 1 week
cmdsh.c
1f91e941169397e0981867a123440df6dfb761ba 15-Apr-2002 nectar <nectar@FreeBSD.org> Quoting log message for OpenBSD rev 1.7:
``Tack on MagniComp (BSD) license since this originally came from rdist.''

Obtained from: OpenBSD
cmdsh.c
b2401764d7c899eeafa48efb3ab173dd9dcbd999 08-Apr-2002 ru <ru@FreeBSD.org> Fix style of ether_ntoa().
ther_addr.c
c711dcdf854f5027e7badfc1855bf52674952458 06-Apr-2002 ru <ru@FreeBSD.org> Polish previous revision.
ther_addr.c
930f8eb170d60eb03d65557875371344cefe4d1f 06-Apr-2002 dillon <dillon@FreeBSD.org> Fix ether_ntoa() to generate the %02x format people expect, instead of %x,
for the ethernet address.

MFC after: 1 day
ther_addr.c
121ff2ebbefbd54cbf42c50d7a823fb02d82b681 01-Apr-2002 ume <ume@FreeBSD.org> When _kevent() returns with errno = EINTR and timeout is not
exceeded, it should be falldown to next_ns.

MFC after: 1 week
es_send.c
b1189e893029fa8eae07107ca0873c65a9ea1fc7 22-Mar-2002 obrien <obrien@FreeBSD.org> Fix the style of the SCM ID's.
I believe have made all of libc .h's as consistent as possible.
es_config.h
d90536e35b89461c5dbefaae4921fd815b80aaf5 22-Mar-2002 obrien <obrien@FreeBSD.org> Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
ddr2ascii.c
scii2addr.c
ase64.c
etaddrinfo.c
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etifaddrs.c
etnameinfo.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
error.c
esiod.c
fname.c
net_addr.c
net_lnaof.c
net_makeaddr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
net_netof.c
net_network.c
net_ntoa.c
net_ntop.c
net_pton.c
p6opt.c
ap_v4v6.c
ame6.c
s_addr.c
s_name.c
s_netint.c
s_ntoa.c
s_parse.c
s_print.c
s_ttl.c
sap_addr.c
sdispatch.c
cmd.c
ecv.c
es_comp.c
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_mkupdate.c
es_query.c
es_send.c
es_update.c
thdr.c
end.c
ars.c
e2881f49cc545371650e022bf57db9fee6d9f8c9 22-Mar-2002 obrien <obrien@FreeBSD.org> Remove multi-line __P() usage.
etaddrinfo.c
etnameinfo.c
net_net_ntop.c
net_net_pton.c
net_ntop.c
ame6.c
cmd.c
3b73ce2319e249cf2795cf4b0d0c624134f01e77 21-Mar-2002 obrien <obrien@FreeBSD.org> Remove __P() usage.
etaddrinfo.c
ethostbydns.c
etnameinfo.c
etservent.c
esiod.c
net_pton.c
ame6.c
sdispatch.c
sparser.y
cmd.c
es_init.c
es_send.c
1196344bb37334ed0f8808056a53ca058758843c 21-Mar-2002 obrien <obrien@FreeBSD.org> Remove 'register' keyword.
ethostbydns.c
ethostbyht.c
ethostbynis.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etproto.c
etprotoent.c
etprotoname.c
etservbyname.c
etservbyport.c
etservent.c
error.c
net_addr.c
net_lnaof.c
net_netof.c
net_network.c
p6opt.c
so_addr.c
inkaddr.c
ame6.c
s_addr.c
s_ntoa.c
sap_addr.c
cmd.c
es_init.c
es_mkquery.c
es_query.c
thdr.c
fee9a30a85b09d3218b2ed1a11d7b4df0a5ecc8b 15-Mar-2002 obrien <obrien@FreeBSD.org> Remove trailing characters from #endif.
Actually this #endif is not needed, so remove leading characters also.
etservent.c
ad9d9dfa1a657215c696ed034df974e1982b236a 06-Mar-2002 eric <eric@FreeBSD.org> Add a carriage return to each function declaration, and make use of ID tag
macros.

MFC after: 1 day
ther_addr.c
bcee06d42c20a8ea0e6c6ffb8924e16e7e793c0f 18-Feb-2002 mike <mike@FreeBSD.org> o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on: alpha, i386
Reviewed by: bde, jake, tmm
etservent.c
s_addr.c
s_ntoa.c
0e8becc5468e6af73f6be77f7809fe144aa688b6 05-Feb-2002 alfred <alfred@FreeBSD.org> balance parens.

Submitted by: mbr
etaddrinfo.c
568956257500195a80a63ba67f283e98c05c43c1 05-Feb-2002 alfred <alfred@FreeBSD.org> Fix cc -Wall, fix rcsid warnings, add missing prototypes,
change prototypes to be the same as in the original sun tirpc code.
Remove ()P macro in a file where the mayority had ()P already removed.
Add them if the mayority use ()P macros.

Submitted by: mbr
Requested by: bde
etaddrinfo.c
02723a65d828f54266ac9a574df63c974a484928 01-Feb-2002 roam <roam@FreeBSD.org> Return ENONAME if getaddrinfo() is called with AI_NUMERICHOST
and the hostname given is not numeric.

PR: 34390
Submitted by: Serge van den Boom <svdb@stack.nl>
Approved by: silence from -net
MFC after: 1 month
etaddrinfo.c
7aa3bf6364a338ebe6de26349bcae887d1e8bba1 14-Jan-2002 ru <ru@FreeBSD.org> yp(4) -> yp(8).

PR: docs/30797
thers.3
ethostbyname.3
etnetent.3
32d91b30d9111333596a67421839d385fac08eb7 26-Dec-2001 ume <ume@FreeBSD.org> - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
- Don't connect datagram socket if RES_INSECURE1.
- Needed to implement IPv6 anycast UDP DNS queries as documented in
<draft-ietf-ipngwg-dns-discovery-03.txt>.

Obtained from: KAME
es_init.c
es_send.c
7d7100de9dcd333ceaac91a9654efbd0a184ed1a 08-Dec-2001 ru <ru@FreeBSD.org> Start using .St macro for POSIX.1-2001.
yteorder.3
20cacce16c233112fc71cb819fa0db765acba715 01-Dec-2001 mike <mike@FreeBSD.org> o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
_POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
__FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
<arpa/inet.h>.

Reviewed by: fenner
Partially submitted by: bde
net.3
net_ntop.c
73fc132b6c55bf3a46d4ebffee097c8c3d5c1332 29-Nov-2001 cjc <cjc@FreeBSD.org> Duh. Back out most of my previous commit. It was mostly covered in the
STANDARDS section of the page. Add one remark there about inet_pton(3)
only understanding decimal values (in contrast to inet_aton(3) and
friends who are happy with 0ac.020.25 for 172.16.0.25).

Caught by: ru
MFC after: 2 days
net.3
15d306084a1841d222472de6e9a54c232504f0e3 29-Nov-2001 cjc <cjc@FreeBSD.org> After the long explanaition of how the inet_* functions interpret
Internet addresses, point out that inet_pton(3) only understands
dotted quads with decimal values.

MFC after: 2 days
net.3
eb58f0f1a85857ed4be993a454e8aafed1b43b58 11-Nov-2001 bde <bde@FreeBSD.org> Fixed namespace pollution related to `err' in libc in the same way as for
`warn'. Now a whole 2 members of the err() family don't cause pollution.

This fixes world breakage in awk for NOSHARED worlds. contrib/awk/msg.c
has had its own version of err() for a long time, but this somehow
didn't cause problems until the update to awk-3.1.0.
sdispatch.c
slexer.l
77df879d01672311a2a01c358d16ea56027f3861 09-Nov-2001 ru <ru@FreeBSD.org> - Put missing prototype for rcmd() in <unistd.h>.
- Clean up the manpage.
- style(9) rcmdsh.c.

Committed from: BSDCon/EU 2k+1 terminal room
cmdsh.3
cmdsh.c
a53b61e772f8606cd8a338c0298ccd3691135569 07-Nov-2001 fenner <fenner@FreeBSD.org> Don't ignore unknown characters. The previous code treated a line like:

hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns

exactly the same as:

hosts: files dns

Recover from parse errors by looking for the end of a line; this
allows entries without errors to still be parsed even if there is
an erroneous entry earlier in the file.
slexer.l
sparser.y
af77ecc6756f2a8a3deefa094081fdd84bcd4009 23-Oct-2001 imp <imp@FreeBSD.org> Allow users to specify a command to use as remote command instead of
using rcmd directly. This has been in my tree for a long time, but we
may need to sync with OpenBSD before MFC.

Obtained from: openbsd
PR: 15830

MFC after: 2 months
akefile.inc
cmd.c
cmdsh.3
cmdsh.c
f8c01ba3e2f3a2fa18c54b073092e62c01979de5 17-Oct-2001 jlemon <jlemon@FreeBSD.org> Use the new SIOCGIFINDEX ioctl to efficiently map a name to an index.
If the syscall fails, fall back on the old method as a compatability
measure.
fname.c
168d2047b12dc658bd4e64f131f418f064c38ee3 10-Oct-2001 ru <ru@FreeBSD.org> getnetbyaddr() should be serviced by the "networks" database.
etnetnamadr.c
9a738c4dbef8eda9ade98ea160b9b5fa2a8e1b20 09-Oct-2001 mike <mike@FreeBSD.org> Don't mangle vendor ids to put them in __RCSID. Just ifdef all vendor
id cruft.

Submitted by: bde
net_ntoa.c
aebf871de59a562a14b033de866b42f4d197cc1e 04-Oct-2001 mike <mike@FreeBSD.org> Include <string.h> to prototype strcpy(3). While I'm here, make use
of the new RCSID macros.

MFC after: 3 days
net_ntoa.c
b348544a5d909bc8e3d79071162e855c0093eb0c 02-Oct-2001 ume <ume@FreeBSD.org> - cope with sa_len < sizeof(struct sockaddr).
From: Patrik Lindergren <patrik@datacom.nu>
- delint (pointer cast issue). from netbsd-current

Obtained from: KAME
MFC after: 1 week
etifaddrs.c
623da62a5a107f8c09ce13cac2352200842890c6 01-Oct-2001 ru <ru@FreeBSD.org> mdoc(7) police: Use the new .In macro for #include statements.
ddr2ascii.3
yteorder.3
thers.3
etaddrinfo.3
ethostbyname.3
etifaddrs.3
etipnodebyname.3
etnameinfo.3
etnetent.3
etprotoent.3
etservent.3
esiod.3
f_indextoname.3
net.3
net6_option_space.3
net6_rthdr_space.3
so_addr.3
inkaddr.3
s.3
sdispatch.3
cmd.3
esolver.3
da7d969a02af06eb75fb6c18fce16a6a188167e4 31-Aug-2001 ru <ru@FreeBSD.org> Add manpage for inet_net_ntop(3) and inet_net_pton(3).

Obtained from: NetBSD
akefile.inc
net.3
net_net.3
69224c0edd32d46efbcdb9ad329891e820f0898a 31-Aug-2001 ru <ru@FreeBSD.org> Use ``.Rv -std'' wherever possible.

Submitted by: yar
etifaddrs.3
a45063618a1d6723c7f698850318bdd8b65f27a0 30-Aug-2001 mike <mike@FreeBSD.org> o Remove some GCCisms in src/powerpc/include/endian.h.
o Unify <machine/endian.h>'s across all architectures.
o Make bswapXX() functions use a different spelling of u_int16_t and
friends to reduce namespace pollution. The bswapXX() functions
don't actually exist, but we'll probably import these at some
point. Atleast one driver (if_de) depends on bswapXX() for big
endian cases.
o Deprecate byteorder(3) prototypes from <sys/types.h>, these are
now prototyped indirectly in <arpa/inet.h>.
o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these
are now typedef'd in <arpa/inet.h>.
o Change byteorder(3) prototypes to use standards compliant uint32_t
(spelled __uint32_t to reduce namespace pollution).
o Document new preferred headers and standards compliance.

Discussed with: bde
PR: 29946
Reviewed by: bmilekic
yteorder.3
110fc843a0e59e68be1a9d8d1a4bb0bcb152872b 20-Aug-2001 kris <kris@FreeBSD.org> Mark some functions as __printflike() and/or taking const char * arguments
instead of char *.

MFC after: 2 weeks
ethostbydns.c
c82403ffa074580a4fb1c4115a32eb19196ac8e7 17-Aug-2001 ru <ru@FreeBSD.org> mdoc(7) police: collapse multiple spaces.
net.3
c6c3284428a344414f008cb3282ac57379228bf8 13-Aug-2001 ru <ru@FreeBSD.org> mdoc(7) police: s;BSD/OS;.Bsx; where appropriate.
etifaddrs.3
95ce4d2cdc59a8eb8cff5859ae0ba21451c4798d 13-Aug-2001 ru <ru@FreeBSD.org> Removed duplicate VCS ID tags, as per style(9).
ethostbynis.c
ethostnamadr.c
etnetbynis.c
2004f62eea1d7940b4d69e6d0a01ed9dea6c5255 11-Aug-2001 ume <ume@FreeBSD.org> Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4
is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in
_res.sort_list for backward compatibility. However, both sort_list's
are maintaind by just one index _res.nsort. So, when IPv6 address is
specified to sortlist, empty entry was created in _res.sort_list. It
broke sortlist facility of gethostbyname().
Discussed on users@jp.ipv6.org.
es_init.c
f858dca3dc130c98b635d3fc8e60adf8eed7f941 10-Aug-2001 ru <ru@FreeBSD.org> mdoc(7) police: join split punctuation to macro calls.
esolver.3
cac152301a43f148900fda9996229f20901ba6ba 08-Aug-2001 ru <ru@FreeBSD.org> Urge the reader to start using getaddrinfo(3) and getnameinfo(3)
protocol-independant functions that don't use static memory area.

Suggested by: nik
Liked by: ume, brian
ethostbyname.3
43457588767caedd16dbf19162de0a6a435dfeda 07-Aug-2001 ru <ru@FreeBSD.org> mdoc(7) police:

Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
ddr2ascii.3
etaddrinfo.3
etifaddrs.3
etipnodebyname.3
etnameinfo.3
f_indextoname.3
net6_option_space.3
net6_rthdr_space.3
815111597373d30225ba41fa23b22acbaa0a3403 31-Jul-2001 mp <mp@FreeBSD.org> Only pull in the MD files if they exist. This allows for progressive
implementation and compilation when bringing up a new architecture.
akefile.inc
38c4ca6c4e9993a1e93c34ef2fba4ee5595db917 16-Jul-2001 kris <kris@FreeBSD.org> Oops, commit the version which actually works

Obtained from: NetBSD
MFC After: 1 week
s_addr.c
698159c01a9d99382406a6521df5c5fd292b05ec 16-Jul-2001 kris <kris@FreeBSD.org> Avoid a compile-time format string warning

Obtained from: NetBSD
MFC After: 1 week
s_addr.c
a145482cf625d5f04072fd1d20b5c2062cbe8e47 15-Jul-2001 dd <dd@FreeBSD.org> Remove whitespace at EOL.
ddr2ascii.3
yteorder.3
thers.3
ethostbyname.3
etnetent.3
etprotoent.3
etservent.3
net.3
net6_option_space.3
so_addr.3
inkaddr.3
s.3
sdispatch.3
cmd.3
esolver.3
317b7d8e3734808e8ccbde18796cfcfe5a86084f 10-Jul-2001 ru <ru@FreeBSD.org> mdoc(7) police: removed HISTORY info from the .Os call.
yteorder.3
thers.3
ethostbyname.3
etnetent.3
etprotoent.3
etservent.3
net.3
inkaddr.3
s.3
cmd.3
esolver.3
8e095496f1e74f8bda69ee4a03e5ac0c0c1e4706 09-Jul-2001 tobez <tobez@FreeBSD.org> Document more resolver(3) routines: dn_skip() from resolv.h, and
ns_get16(), ns_get32(), ns_put16(), and ns_put32() from arpa/nameser.h.

Markup by: ru
OK'ed by: markm
akefile.inc
esolver.3
eaa6ee03b8ac1955cc60d99d119a22318d1baa61 09-Jul-2001 dd <dd@FreeBSD.org> mdoc(7) police: remove extraneous .Pp before and/or after .Sh.
thers.3
05e503d80a002e0af803afd602084de640ab2c39 06-Jul-2001 ru <ru@FreeBSD.org> mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).
etaddrinfo.3
etipnodebyname.3
a12e4a842e16bb29ceead8f0911c991e2cbd701b 04-Jul-2001 ru <ru@FreeBSD.org> mdoc(7) police: print some example text with literal font.
esolver.3
364df2ca4c5a5f54cb008109cefc506187073c29 23-Jun-2001 jlemon <jlemon@FreeBSD.org> Bring in fix from rev 1.32 that got lost during the conversion to kqueue.
This prevents an indefinte timeout in case the kevent call is interrupted
for some reason.

PR: 26665
MFC in: 2 weeks
es_send.c
32dc912febbf3960c47a0ebfd387977b2c78656b 10-Jun-2001 ume <ume@FreeBSD.org> Implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers. Need careful configuration
when enable it. (default config is not affected).
See manpage for details.

XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.

Obtained from: KAME/NetBSD
etaddrinfo.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
esolver.3
7371106319ee6baab240f2cf646447f5a02f6f44 07-Jun-2001 ru <ru@FreeBSD.org> s/format/byte order/ (for clarity).
net.3
a9673773a3dccdd8acdcba3b94a6ab647d085f2f 21-May-2001 ume <ume@FreeBSD.org> Correct error message of an example.

Obtained from: KAME
etaddrinfo.3
7fd8372d1b43b6ded8a4a90f64d72cbf01056c47 15-May-2001 ru <ru@FreeBSD.org> mdoc(7) police: sort xrefs.
ethostbyname.3
ebaec1dfe06f27da691611d6a198f5289db92d0c 08-May-2001 alex <alex@FreeBSD.org> gethostbyname2() can't do AF_INET6 lookups over NIS.
getaddrinfo(3) must be used.

Submitted by: ume
ethostbyname.3
24f0bef96808e6f10f39cf9e3c2621a83f78c8d6 27-Apr-2001 archie <archie@FreeBSD.org> Add getaddrinfo(3) to the "SEE ALSO" list.
ethostbyname.3
fe80a1fb97a193b04c1f861a96313a285211e002 18-Apr-2001 ru <ru@FreeBSD.org> mdoc(7) police: update referenced standard name.
net.3
922e3083ccc90b69264f72c32d897dfa6c0c2495 17-Apr-2001 kris <kris@FreeBSD.org> Correct a typo; prefered -> preferred.
s_addr.c
25ef23ac1cd91aa5fdc342b2889f86ee3ea73daa 27-Mar-2001 ru <ru@FreeBSD.org> MAN[1-9] -> MAN.
akefile.inc
aabe84d0cbca8d7eed5bd5b81cb33f80bca39a55 23-Mar-2001 ume <ume@FreeBSD.org> IPv4 address is not unsigned int. This change introduces in_addr_t.

PR: 9982
Adviced by: des
Reviewed by: -alpha and -net (no objection)
Obtained from: OpenBSD
net.3
net_addr.c
net_lnaof.c
net_makeaddr.c
net_neta.c
net_netof.c
net_network.c
97ef17ff72184bfbc39e0cd85f2d8633a9fdf8b9 17-Mar-2001 ume <ume@FreeBSD.org> Nuke non-standard EAI_RESNULL.
etaddrinfo.3
etaddrinfo.c
585c8d185e968e4fe013b63908d569484665df4e 13-Mar-2001 dd <dd@FreeBSD.org> Document the rest of the possible return codes.

PR: 25188
Approved by: nik
etaddrinfo.3
3a2d85776616d31a44d30dad435c30a03e984374 12-Mar-2001 ru <ru@FreeBSD.org> .St -p1003.1g -> .St -p1003.1g-2000.
etaddrinfo.3
etnameinfo.3
4de5335b361c5ce47477483c3d0aa85bb3e26bf0 05-Mar-2001 obrien <obrien@FreeBSD.org> Fix style that got corrupted.
etaddrinfo.c
52f5268f76ffdf96f3edc55b1a47a42e691a7265 05-Mar-2001 obrien <obrien@FreeBSD.org> Fix FreeBSD id style breakage from rev 1.17
etaddrinfo.c
f4325cbb8be5678f80d062f6b978366e9dcaa1e4 28-Feb-2001 ru <ru@FreeBSD.org> Eliminate mdocNG warnings caused by misplaced or extraneous macro calls.
sdispatch.3
f962d0dc9bf93bd17bba71c678864e50b6d118e2 28-Feb-2001 jlemon <jlemon@FreeBSD.org> Use the new EV_SET macro to insure that all fields in struct kevent
are correctly initialized before use. This should fix the problem
with DNS.

Pointy hat to: me
es_send.c
caabf4417ce3c552e54caa91f7185b748e267153 26-Feb-2001 ru <ru@FreeBSD.org> Use ``.St -p1003.1g''.
etaddrinfo.3
etnameinfo.3
4c1233433d4d46f6e4a755a79944ded2cc7e5420 19-Feb-2001 ume <ume@FreeBSD.org> Enable AI_ADDRCONFIG as a valid flag of getaddrinfo(3). Some
applications specify AI_ADDRCONFIG and fail to run under FreeBSD.
Latest mews is known. Now, getaddrinfo(3) behaves according to
AI_ADDRCONFIG.
etaddrinfo.c
bf66c2eda88095d4910d396920c45781fd19db78 15-Feb-2001 ume <ume@FreeBSD.org> Correct 2nd argument of getnameinfo(3) to socklen_t.

Reviewed by: itojun
etnameinfo.c
07f08bc93424b527a710219e1126dfc7c5de3a47 10-Feb-2001 ru <ru@FreeBSD.org> mdoc(7) police: polishing.
ethostbyname.3
677b714f57f1489dd0c1e6d930cbc41205ca7830 10-Feb-2001 nik <nik@FreeBSD.org> Improve language and code examples.

PR: docs/24961
Submmitted by: Tony Finch <dot@dotat.at>
etaddrinfo.3
c90a74625467e4820dd5d3ae10a6be8a81173e53 09-Feb-2001 nik <nik@FreeBSD.org> Describe the arguments to gethostbyaddr.

PR: docs/24225
Submitted by: Joakim Henriksson <jurduth@ludd.luth.se>
Patch from: ben
ethostbyname.3
5addfd60d6c939bd1a9b1cbf3a5b0f614fce79da 07-Feb-2001 ru <ru@FreeBSD.org> mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged. With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
so_addr.3
s.3
7dcfea0100bdd36891f50e5740f8a01da166b7a8 06-Feb-2001 asmodai <asmodai@FreeBSD.org> Fix typo: compatability -> compatibility.

Compatability is not an existing english word.

Add $FreeBSD$.
s_addr.c
e0a455e293ddcec3b00564c8d36a3e8e5bc4f09b 02-Feb-2001 nectar <nectar@FreeBSD.org> strcpy -> strlcpy paranoia

Submitted by: Mike Heffner <mheffner@vt.edu>
Reviewed by: freebsd-audit
esiod.c
8a6f8b5fe456b5b3a8f1d86173f81cfcae6cfe19 01-Feb-2001 ru <ru@FreeBSD.org> mdoc(7) police: split punctuation characters + misc fixes.
f_indextoname.3
net6_option_space.3
net6_rthdr_space.3
esolver.3
210c2f7b7c7c08019e0adf1627c8ab94d84e6f2a 26-Jan-2001 ume <ume@FreeBSD.org> s/err1/errx/.
http://X68000.startshop.co.jp/~68user/cgi-bin/wwwboard.cgi?log=1673

Obtained from: KAME
etaddrinfo.3
1635c221b7b2678beeeb2b5fa728edd7c8c3735b 24-Jan-2001 deischen <deischen@FreeBSD.org> Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions. If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
__sys_foo - actual system call
_foo - weak definition to __sys_foo
foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo. In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde). All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes. <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE. We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by: -arch
etaddrinfo.c
ethostbyht.c
ethostnamadr.c
etifaddrs.c
etnetbydns.c
etnetnamadr.c
error.c
ap_v4v6.c
ame6.c
cmd.c
ecv.c
es_mkupdate.c
es_send.c
es_update.c
end.c
0a221c5a509f281ceb3cfefc7ab373177376bb58 12-Jan-2001 ru <ru@FreeBSD.org> mdoc(7) police: Ft/Vt now accept punctuation-type arguments.
ethostbyname.3
f0c3b90bc8151c09769b3c38a408ca1cc9f81a06 12-Jan-2001 ru <ru@FreeBSD.org> man(7) -> mdoc(7).
esiod.3
e68548a9cc79e93cd770bd33d505fa2347aa5bf4 06-Jan-2001 alex <alex@FreeBSD.org> gethostbyname2() is able to lookup AF_INET6.

PR: 23823
Noticed by: Andrew Arensburger <arensb@ooblick.com>
ethostbyname.3
8ba41876884256f20dce333e0a239a8555ee2670 29-Dec-2000 ru <ru@FreeBSD.org> Prepare for mdoc(7)NG.
net.3
sdispatch.3
esolver.3
c23c39b3a4eb533f38c86ede46f098221735dffc 14-Dec-2000 ru <ru@FreeBSD.org> mdoc(7) police: removed history info from the .Os FreeBSD call.
thers.3
278161ed6c1aed1660f6f6de2c0fbe4b8e19a2f6 11-Dec-2000 ru <ru@FreeBSD.org> mdoc(7) police: use canonical form of .Dd macro.
etifaddrs.3
af22402f6ee1516e96ee23db9033fb445020d3eb 04-Dec-2000 ume <ume@FreeBSD.org> - __ivaliduser_sa() was introduced for forthcoming IPv6 support to lpd
- iruserok_sa() and __ivaliduser_af() were re-organized to use
__ivaliduser_sa()
- __icheckhost() was re-written to use getaddrinfo() instead of
getipnodebyname()
- better handling of multiple destination addresses in rcmd()

These changes were basically taken from KAME and changed to fit our
rcmd.c.

Obtained from: KAME
cmd.c
bdc5340b39fbc40a64feadf0d2fd65beca35a320 22-Nov-2000 ru <ru@FreeBSD.org> mdoc(7) police: Er macro usage cleanup.
cmd.3
f7a10404bccd5370cf494e1453a276bbf09b1143 20-Nov-2000 ru <ru@FreeBSD.org> mdoc(7) police: Nm -> Fn where appropriate.
etaddrinfo.3
net.3
55a23507010ea3eabe58edf611fdf921fabc3374 20-Nov-2000 ru <ru@FreeBSD.org> mdoc(7) police: use the new features of the Nm macro.
thers.3
a6f5d950d860b642619fd71c1efc1875f906cc17 10-Nov-2000 ru <ru@FreeBSD.org> Avoid use of direct troff requests in mdoc(7) manual pages.
etservent.3
8cfaee4a94cc83819c9faa826778851c2824a532 29-Oct-2000 sumikawa <sumikawa@FreeBSD.org> Fix memory leak.

Obtained from: KAME
es_init.c
19ead08f6975e4c1ef5c692fd42630eb001acb86 28-Oct-2000 ume <ume@FreeBSD.org> defined HAVE_IFM_DATA for (free|net|open)bsd

Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
Obtained from: KAME Project
etifaddrs.c
c88ea413c07f20d24c85e6cc328d709417ba7074 27-Oct-2000 ume <ume@FreeBSD.org> Make RES_OPTIONS=inet6 work.
Basically PR22196, but slightly modified.

PR: bin/22196
ethostnamadr.c
1fb33103fc5d61189bde8451a11f1ae9000c6e70 12-Oct-2000 jasone <jasone@FreeBSD.org> Fix pthread cancellation point propagation.
es_send.c
cd493b1404e173be5cf5eb898464e1f27cdb8538 30-Sep-2000 nectar <nectar@FreeBSD.org> Use issetugid instead of comparing get[ug]id and gete[ug]id.

Suggested by: Don Lewis <Don.Lewis@tsc.tdk.com>
esiod.c
b6189aae3275e10c2872ce44741ccac24324fbc8 29-Sep-2000 nectar <nectar@FreeBSD.org> Ignore HESIOD_CONFIG and HES_DOMAIN environmental variables for
set-user-ID and set-group-ID programs.

Suggested by: Danny Braniss <danny@cs.huji.ac.il>
esiod.c
311be79390dfb9acb3868ba02383bbff8ff8ef2d 25-Sep-2000 itojun <itojun@FreeBSD.org> off-by-1 error in string length validation
From: Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
etnameinfo.c
43658697fc12aaf2d206db5e0eb78b487590c260 12-Sep-2000 ps <ps@FreeBSD.org> Change from using poll(2) to kqueue/kevent when waiting for a DNS
response to return. This will stop processes waiting on DNS requests
from being woken up when a select collision occurs. This was tested
on mx1.FreeBSD.org (outgoing mail for the FreeBSD.org mailing
lists.)

Reviewed by: jlemon, peter
es_send.c
4b57274ae448998ee3e93a7657d5fa17e6496036 10-Sep-2000 nectar <nectar@FreeBSD.org> Set h_errno when an error is encountered.

PR: bin/21092
Submitted by: Alexander Kabaev <ak03@gte.com>
ethostbynis.c
5450aa20ea5485db8cd0174f05360cec6d0f66f3 07-Sep-2000 nectar <nectar@FreeBSD.org> Fix getipnodebyname(3) bug.

Submitted by: ume
ame6.c
748554442d0ac4467fdac2ce9d42006588fd4481 06-Sep-2000 nectar <nectar@FreeBSD.org> Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
. getgrent, getgrnam, getgrgid
. getpwent, getpwnam, getpwuid
. getusershell
. getaddrinfo
. gethostbyname, gethostbyname2, gethostbyaddr
. getnetbyname, getnetbyaddr
. getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc. rc.network has been modified
to warn that host.conf is no longer used at boot time. In addition, if
there is a host.conf but no nsswitch.conf, the latter is created at boot
time from the former.

Obtained from: NetBSD
akefile.inc
etaddrinfo.3
etaddrinfo.c
ethostbydns.c
ethostbyht.c
ethostbyname.3
ethostbynis.c
ethostnamadr.c
etipnodebyname.3
etnameinfo.3
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetent.3
etnetnamadr.c
esiod.3
esiod.c
ame6.c
sdispatch.3
sdispatch.c
slexer.l
sparser.y
ebbd43d98f524ff806b0fd99adad4122d98952b0 04-Sep-2000 peter <peter@FreeBSD.org> Yank out the NOPOLL conditionals. libc_r no longer needs it, and this
library depends on other things that come *way* later than poll() now
(sigset size changes in particular)
es_send.c
bd5034b9ae248b6c3c51192c515a92e4512906c1 22-Aug-2000 jhb <jhb@FreeBSD.org> The API change mentioned in the previous revision has been backed out, so
back out the corresponding documentation.

Noticed by: brian, ume
cmd.3
d4ba157d9f0f1b12ba582a82dcc12eea9f72f8d8 10-Aug-2000 ume <ume@FreeBSD.org> Don't retry connecting via the same medium.
I changed to close to original code before merging IPv6 support.
It seems having delay before another try is useless. However, I'm
not sure that delay means. So, I leave it as-is.

PR: bin/20515
cmd.c
3168f0a4f8b336d3f008cdfe3ad5b7ccdb71bb29 09-Aug-2000 itojun <itojun@FreeBSD.org> mention getipnodeby* and get{addr,name}info are not thread-safe. (sync with kame)
s/.Os KAME/.Os/
comment From: Greg Thompson
etaddrinfo.3
etipnodebyname.3
etnameinfo.3
f_indextoname.3
net6_option_space.3
net6_rthdr_space.3
6e408fc8c91301b28474ee57af3e3e0914ef9225 21-Jul-2000 jasone <jasone@FreeBSD.org> Use _close() instead of close() in addrconfig() to keep it from becoming a
potential cancellation point in libc_r.
etaddrinfo.c
54a296ab270d62a4d08ccdf0361fdd6d3a43f7da 20-Jul-2000 ume <ume@FreeBSD.org> Copy canonname for *ahost, into static buffer.

Obtained from: KAME Project
cmd.c
145f71945d245c592d771bd0138510d7bcb43f1a 20-Jul-2000 brian <brian@FreeBSD.org> Alocate rcmd{,_af}()'s *ahost argument using malloc() (well
strdup()) rather than pointing it at something that's free()d
(via freeaddrinfo(res)) before the function returns.

I appreciate that this is an API change, but it's the only way
(AFAIK) of doing this without breaking existing code that uses
rcmd{,_af}().

Pointed out by: phkmalloc
cmd.3
cmd.c
174b0abb778419b135794001f2dc68abaf345e67 19-Jul-2000 ume <ume@FreeBSD.org> To define A RR to root (.) is valid in DNS. So, h_name = "" shouldn't
be treated as NULL.

PR: bin/19816
Submitted by: Bill Fenner <fenner@research.att.com>
Reviewed by: Atsushi Onoe <onoe@sm.sony.co.jp>
ame6.c
97e87e17de4705b92440b9f3bfa830d17ef49ff6 18-Jul-2000 archie <archie@FreeBSD.org> Const'ify parameters to ethers(3) routines as appropriate.
ther_addr.c
thers.3
63c050d16ca6926933b42c7b93d2b09b9045b7b9 11-Jul-2000 peter <peter@FreeBSD.org> Try and fix the worst of some highly bogus malloc/free resource
management involving rcmd_af(), getaddrinfo(), freeaddrinfo(), etc.
We set *ahost to point to ai->canonname; and later free the ai-> stuff
and still leave the old pointers in *ahost to the freed data.
Perhaps the best way to deal with this is a static buffer or a static
strdup() that is freed on the next iteration or something. This gives
me headaches just thinking about this.

The new 'AJ' default for malloc() tripped this up.
cmd.c
363b5efd7aac1c44f8ca46456de96c58f07d65da 09-Jul-2000 itojun <itojun@FreeBSD.org> reject empty scopeid. use strtoul() for checking all-numericness of
portname. explicitly reject empty numeric portname.
sync with kame. based on comments from itohy@netbsd.org
etaddrinfo.c
44ab6a4c89ef91aa29d8a3b3e071ea1fda6b9f0e 05-Jul-2000 itojun <itojun@FreeBSD.org> sync with more recent kame tree.
- correct scoped notation separator (s/@/%/)
- include example and more references
etaddrinfo.3
etnameinfo.3
8d388020866f9b77f7906b4db0957cc970038e08 05-Jul-2000 itojun <itojun@FreeBSD.org> sync with latest kame.
- permit numeric scopeid, be more careful about buffer size

TODO: 2nd arg type should be socklen_t for RFC2553 conformance,
but due to include file dependency it is not a easy thing to do
(netdb.h does not have socklen_t)
etnameinfo.c
50e0123ddd812133b34fdd9ab98657d517842c8b 05-Jul-2000 itojun <itojun@FreeBSD.org> sync with kame.
- better return code. from enami@netbsd
- do not use "class" as variable name. C++ guy had trouble with it.
etaddrinfo.c
09cb0345854d08112b0c4c3e64c916884d617033 05-Jul-2000 itojun <itojun@FreeBSD.org> add getifaddrs(3) from bsdi. this is a magic function which lets you grab
interface addresses in a portable manner, without headache of SIOCGIFCONF
or sysctl. it is in bsdi/openbsd/netbsd already.
from kame tree (actually, mandatory for latest kame tree).
akefile.inc
etifaddrs.3
etifaddrs.c
412dc02ecf4a7a0521608fa1be249a3f5fd944f4 03-Jul-2000 kris <kris@FreeBSD.org> Previous commit broke the case of chained CNAME entries. Instead handle
the bogus case by being stricter about errors.

Submitted by: itojun
Obtained from: KAME
ame6.c
991a8601b5e75c8134dc66598d63ff2fc3454521 03-Jul-2000 kris <kris@FreeBSD.org> Fix a nasty bug which would leave the struct hostent incompletely filled out
when parsing certain DNS records during a reverse address resolution. Thus
when code tries to examine the returned host name, it dereferences a null
pointer :-(

Problem noticed by: ps
ame6.c
7743e6b8d993b6eacfeb5fda55117dcb76bdba9c 20-Jun-2000 ume <ume@FreeBSD.org> Don't call _getipnodebyname_multi(). It fixes the problem that
getaddrinfo() accidentally returns IPv4 mapped IPv6 address instead
of native IPv4 address.
Now, getaddinfo() is scoped address ready. You can put scoped
address within /etc/hosts.

Obtained from: KAME Project.
etaddrinfo.c
cf9d5ec1797dcd397de2af6e7b1fbfd360baf401 19-Jun-2000 ume <ume@FreeBSD.org> Re-commit DNS IPv6 transport support with fixes for IPv4 only
kernel and compatibility issue.

Obtained from: KAME Project
es_init.c
es_send.c
8b2d24b89aac6f857af2fb0e459c43f7e62ba537 14-Jun-2000 ume <ume@FreeBSD.org> Backout my previous commit.
Cannot resolve any host on IPv4 only kernel.

Reported by: ache
es_init.c
es_send.c
74d273c06d22b21c6b4f7efca5873b0724e1e88d 11-Jun-2000 ume <ume@FreeBSD.org> DNS IPv6 transport support.
It is nessesary for IPv6 only life.

Obtained from: KAME
es_init.c
es_send.c
710538e8a1f1a594ef64db4fe241ce6c77fc4926 31-May-2000 hoek <hoek@FreeBSD.org> Fix an mdoc-o, and english.
etnameinfo.3
961b97d43458f3c57241940cabebb3bedf7e4c00 26-May-2000 jake <jake@FreeBSD.org> Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by: msmith and others
ame6.c
d93fbc99166053b75c2eeb69b5cb603cfaf79ec0 23-May-2000 jake <jake@FreeBSD.org> Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by: phk
Reviewed by: phk
Approved by: mdodd
ame6.c
cbc680edb75a17388720cee18a9e0ad944d51ec9 12-May-2000 phantom <phantom@FreeBSD.org> . fix .Dt macro argument
. spell inet6_rthdr_reverse correctly
net6_rthdr_space.3
54431741280e7fae18ad77d8de1a1863da43b311 10-May-2000 sheldonh <sheldonh@FreeBSD.org> Supply only one author name per instance of %A, as per mdoc.samples(7).

PR: 18465
Submitted by: Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
cmd.3
e3ecba77a517c3b97ad2f25d948fb88fe06b0f10 10-May-2000 itojun <itojun@FreeBSD.org> correct possible security issue(s) in name resolution, due to use of
pre-4.9.7 BIND resolver code.
ftp://ftp.kame.net/pub/mail-list/snap-users/2348 for details.

Reviewed by: ume
ame6.c
a60a1ebfb4b1ca50a73a20a3781c810f189f601c 06-May-2000 phantom <phantom@FreeBSD.org> Use `Er' variable to define first column width in ERRORS section.
ddr2ascii.3
5401879e3bd853b0e590e68591180a72ffc016a8 21-Apr-2000 phantom <phantom@FreeBSD.org> Introduce ".Lb" macro to libc manpages.

More libraries manpages updates following.
ddr2ascii.3
yteorder.3
thers.3
etaddrinfo.3
ethostbyname.3
etipnodebyname.3
etnameinfo.3
etnetent.3
etprotoent.3
etservent.3
f_indextoname.3
net.3
net6_option_space.3
net6_rthdr_space.3
so_addr.3
inkaddr.3
s.3
cmd.3
esolver.3
8b8912f3ffaeeb9de2bb400275ac39c44808c755 20-Apr-2000 shin <shin@FreeBSD.org> Change getaddrinfo() resolve order
from
all AAAA trial, then all A trial
to
try AAAA and A for each trial

TODO: more fix for the case where IPv4 mapped IPv6 addr is disabled

Reviewed by: ume
etaddrinfo.c
ame6.c
8ab55710ca57591b2f1a2d1cb8e149a8a6496d99 26-Mar-2000 jlemon <jlemon@FreeBSD.org> Decrement the timeout being passed to poll() if poll was interrupted for
some reason. This will prevent an infinite loop if (say) a sigalarm is
being scheduled at a more frequent interval than the poll timeout.

PR: 2191, 8847, 10553
es_send.c
c5722a7dedc15b5137d6d92fdc303fd84bde73b8 23-Mar-2000 bde <bde@FreeBSD.org> Fixed missing #include of <sys/types.h> in synopsis.
Fixed spelling error in prototype for inet_option_space().
Fixed syntax error in prototype for inet6_option_alloc().
net6_option_space.3
fce3c66cc6741a319ee902543d1cd69b145c3985 23-Mar-2000 bde <bde@FreeBSD.org> Fixed missing #include of <sys/types.h> in synopsis.
net6_rthdr_space.3
c1a1c736a75b08b88b083b78e5ca96c026d8e20a 16-Mar-2000 bsd <bsd@FreeBSD.org> Back out that last commit, it may be insecure (pointed out by Warner
Losh).
cmd.c
bf05d34440bf23f33f292b6ea372b496706ef652 16-Mar-2000 bsd <bsd@FreeBSD.org> Slight adjustment to __ivaliduser() - don't ignore the last line in
the .rhosts file just because there is no ending linefeed.
cmd.c
859f9435c8481af36c26c6f8ed4be8952635325e 15-Mar-2000 jlemon <jlemon@FreeBSD.org> Fix uninitialized variable.

Submitted by: tanimura
ame6.c
602b08acfa43a3a2b7f9ca255f8d32ca7262c4f2 12-Mar-2000 shin <shin@FreeBSD.org> Merge from NetBSD. Addition of inet_ntop() and inet_pton() description.

Specified by: Robert Muir <rmuir@looksharp.net>

Obtained from: NetBSD
akefile.inc
net.3
12c8708cdb2fa8e7a2d5d5ffe85b4fbfd45f503c 12-Mar-2000 shin <shin@FreeBSD.org> Cosmetic fix. Re-order MLINKS for if_indextoname.3 and inet.3 as alphabetical
order.
akefile.inc
7fac48388642b73e784734dbd6986cb0e38dfca5 12-Mar-2000 shin <shin@FreeBSD.org> Correct MLINKS contents for rcmd.3, because it is obsolete due to
recent changes to rcmd.3.

links to iruserok_af.3, ruserok_af.3 are removed.
link to iruserok_sa.3 is added.
akefile.inc
4a9ac000d9e10ae3011edbe3a372741937ca4bd8 12-Mar-2000 shin <shin@FreeBSD.org> Import from KAME. Advanced API related function descriptions.

Obtained from: KAME project
akefile.inc
net6_option_space.3
net6_rthdr_space.3
53f4095f26ac25a0e53c381716b295d1b5ab3c1d 09-Mar-2000 jlemon <jlemon@FreeBSD.org> Add in IPV4 NIS support.

PR: 17290 (but not the same patch)
Approved by: jkh
ame6.c
62fa4ac2fe44d7266b5b22153255ac8fc00b6864 09-Mar-2000 shin <shin@FreeBSD.org> More grammer, wording, and mdoc fixes.

Submitted by: bde
Reviewed by: sheldonh
cmd.3
73d476cc6479c6344b1bd61ca4519254b46d544c 03-Mar-2000 shin <shin@FreeBSD.org> CMSG_XXX macros alignment fixes to follow RFC2292.

Approved by: jkh

Submitted by: Partly from tech@openbsd
Reviewed by: itojun
thdr.c
3d5c7f466df33f05bee79a5015a0fdbd4709f0d8 02-Mar-2000 shin <shin@FreeBSD.org> -Reflect function name change.
-Added more description.
-Many grammer fix.
-Fix hard sentence break.
-Many other man style fix.

Thanks for bde finding out the problem.
Thanks for sheldon for the patient and thorough review.
:-)

Submitted by: bde
Reviewed by: sheldonh
cmd.3
329223e6f229a55ee8fed800f358f30e994ed749 02-Mar-2000 sheldonh <sheldonh@FreeBSD.org> Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
thers.3
etnetent.3
98f78aba9d0830c72c8bc3a41299b63ac701f87d 19-Feb-2000 shin <shin@FreeBSD.org> Change IPv6 scoped addr format again based on recent standard discussion.
Sorry for the flapping, but no change will be done for 4.0 anymore.
Official standard will be published around April or later.
If different format would be adopted at that time, then support for
the new format will be added to the succeeding FreeBSD 4.x.

Approved by: jkh
etaddrinfo.c
etnameinfo.c
2471367d59092bab28bfec047f4d337ddaf0a516 16-Feb-2000 fenner <fenner@FreeBSD.org> Fix coredump in gethostbyaddr() when the returned answer is too large to
fit in the static buffer. This fix causes it to look like there is no
data available, which is also wrong but is better than dumping core.

PR: bin/10344
Reviewed by: billf
Approved by: jkh
ethostbydns.c
4d04714b75d40c923da221678a9e459e9a39c048 10-Feb-2000 shin <shin@FreeBSD.org> Add more dual stack consideration.

-Should not error return when rresvport_af() failed for one of dest
addrs resolved by getaddrinfo().
Should retry until all dest addr fail.

Approved by: jkh
cmd.c
bf70ca5c10ab771d51b44fdada006c5ec5515f04 10-Feb-2000 shin <shin@FreeBSD.org> Let getaddrinfo() and related functions supports traditional IPv4 format
(shortend format, etc)

Current KAME getaddrinfo() supports only d.d.d.d format IPv4
addr. But traditionally inet_aton() and etc support other formats.
(shortend format and octal/deciaml/hex format)
Aboud this,
-As far as the discussion on freebsd-current, many people
think traditional format should also be supported by getaddrinfo().
-X/Open spec requires getaddrinfo() also support those
traditional IPv4 format.
-RFC2553 say nothing about it.
-As the result of confirmation in ietf/ipng list, there is
no clear concensus yet, and the reply was, "RFC2553 update
and X/Open spec will be in sync"

So takeing these conditions into account, I think
getaddrinfo() should also support traditional IPv4 format.

Specified by: Marc Schneiders <marc@oldserver.demon.nl>
Approved by: jkh
etaddrinfo.c
ame6.c
05934f97678ef7d5925562d6cae001d60b9909bc 09-Feb-2000 shin <shin@FreeBSD.org> IPv6 scoped addr format is changed as recent KAME change.

KAME scoped addr format is changed recently.
before: addr@scope
now: scope%addr

Because the end of IPv6 numeric addr is tend to be truncated in
`netstat -rn ` output, so placing scope part at starting of addr
will be convenient.

Approved by: jkh

Obtained from: KAME project
etaddrinfo.c
etnameinfo.c
9742b65930b8abd4b6bb0418e50cbca5331b631d 01-Feb-2000 shin <shin@FreeBSD.org> sync iruserok() extension API with other BSDs

Some of rcmd related function is need to be updated to
support IPv6. Some of them are already updated as standard
document. But there is also several de-facto functions and
they are not listed in standard documents.
They are,

iruserok() (used by rlogind, rshd)
ruserok() (used by kerberos, etc)

KAME package updated those functions in original way.

iruserok_af()
ruserok_af()

But recently there was discussion on IETF IPng mailing
list about how to sync those API, and it is decided,

-Those function is not standard and not documented.
-But let BSDs sync their API as de-facto.

And after some discussion, it is announced that

-add update to iruserok() as iruserok_sa()
-no ruserok() API change(it is only updated internaly)

So I sync those API before 4.0 is released.
The changes are,
-prototype changes
-ruserok() internal update (use iruserok_sa() inside)
-removal of ruserok_af()
-change iruserok_af() as static functioin, and also prefix the name with __.
-add iruserok_sa() (Just call __iruserok_af() inside)
-adding flag AI_ALL to getipnodebyaddr() called from __icheckhost().
This is necessary to support IPv4 communication via AF_INET6 socket
could be correctly authenticated via iruserok_sa()
-irusreok_af() call is replaced to iruserok_sa() call
in rlogind, and rshd.

Approved by: jkh
cmd.c
8abe2a2d86ee5f72093b3feeabf05c9f6f963576 27-Jan-2000 jasone <jasone@FreeBSD.org> Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo(). In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate. In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by: deischen
etaddrinfo.c
ame6.c
cmd.c
es_send.c
3e351708f648fb4318d1198bfa917a4fa5dd2d8a 27-Jan-2000 shin <shin@FreeBSD.org> Allow reverse lookup for loopback addr.
This is merge from recent KAME fix to be more compliant with RFC2553.

Obtained from: KAME project
etnameinfo.c
5c7b071c6b03f13ba29a4a3bacec66311b25cfd2 26-Jan-2000 shin <shin@FreeBSD.org> Removed 3rd arg from bindresvport_sa() call, because the 3rd arg have been
already removed.

Specified by: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>
cmd.c
eb4463295ba6da7a5b6c1d94f38f7d52ef926c06 26-Jan-2000 shin <shin@FreeBSD.org> bindresvport related changes
-changed bindresvport2 to bindresvport_sa
-merged the man into bindresvport.3

All discussion between Jean-Luc Richier <Jean-Luc.Richier@imag.fr>,
Theo de Raadt <deraadt@cvs.openbsd.org>, itojun, is reflected to
this code. (Actually Theo de Raadt write the code simultaneously as the
discussion change.)
cmd.c
a67280b2ce3330fea1a0e36e05ae8291e599e6ec 26-Jan-2000 shin <shin@FreeBSD.org> Fix getaddrinfo() behaviour to be more compliant with RFC2553. Patches are
obtained from itojun.
-don't filter address families which are not supported by system at
FQDN resolving.
-don't do reverse lookup

I think I checked all lib and tools which use getaddrinfo() if
this change affect them.

Obtained from: KAME project
etaddrinfo.c
fc29f7bcf7236935ba5c171ea553ac7dca533e8c 25-Jan-2000 shin <shin@FreeBSD.org> several tcp apps IPv6 update
-inetd
-rshd
-rlogind
-telnetd
-rsh
-rlogin

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
akefile.inc
cmd.3
cmd.c
16085f42949d88bd0ba1801e6647b2c8777e30ba 13-Jan-2000 shin <shin@FreeBSD.org> libc rcmd update for IPv6.
A new function bindresvport2(), AF independent version of bindresvport()
is also added.

Reviewed by: sumikawa
Obtained from: KAME project
cmd.3
cmd.c
5f66665af16df2cae0f147df0466eeebfbc658c2 13-Jan-2000 shin <shin@FreeBSD.org> added IPv6 unspecified addr check for getipnodebyaddr.
ame6.c
773759d8c902912c077046a8f46836693f1efd30 13-Jan-2000 shin <shin@FreeBSD.org> added IPv4 mapped IPv6 addr consideration for getaddrinfo() reverse lookup case
etaddrinfo.c
75903038bc52105bc7479fe5f2b75f22f10c1c50 12-Jan-2000 jasone <jasone@FreeBSD.org> Add three-tier symbol naming in support of POSIX thread cancellation
points. For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep(). The arrows represent weak aliases. For
system calls, the pattern is _read() <-- _libc_read() <-- read().
etaddrinfo.c
ame6.c
cmd.c
es_send.c
95de817e06ecf4a915f539dc63bd1efce61c3ac4 05-Jan-2000 bde <bde@FreeBSD.org> Fixed missing include in synopsis.

Use long lines instead of lines split with backslash-newline in synopsis.
My synopsis checker doesn't understand backslash-newline.
etaddrinfo.3
etnameinfo.3
2652dfd127f17ed752f32fc61148acc7466fcb98 05-Jan-2000 bde <bde@FreeBSD.org> Fixed missing include in synopsis.
etipnodebyname.3
425c15d62c595f2d72c762761a0a2f2d77117e5a 28-Dec-1999 rwatson <rwatson@FreeBSD.org> Suppress vast quantities of unneeded warnings spewed by libc's gethostbydns
on encountering a real-world SIG record during a lookup of another type.

PR: bin/7352
Reviewed by: peter, eivind
ethostbydns.c
21448b46272429cd4260638c31ec239118e6fb02 28-Dec-1999 shin <shin@FreeBSD.org> Small bug fix and improvements
(1)added error check of if_nameindex() return value at getaddrinfo().
(2)print out more detailed information when getaddrinfo() error value
is EAI_SYSTEM.(in this case system error num is kept in errno)

(1) is Discovered by: jinmei@kame.net in KAME environment.
etaddrinfo.c
8c2ccb59caf882ac518eda1f570ea731d4466216 28-Dec-1999 shin <shin@FreeBSD.org> Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
akefile.inc
etaddrinfo.3
etaddrinfo.c
etipnodebyname.3
etnameinfo.3
etnameinfo.c
ame6.c
es_init.c
0e302599d7ce5999caeeae7b2a0fdd9c399df508 27-Dec-1999 peter <peter@FreeBSD.org> Make this compile with -Wall -Werror
net_addr.c
8f12d545257f871b46eca65b0e22016c402051af 23-Dec-1999 bde <bde@FreeBSD.org> Fixed missing includes in synopsis.
f_indextoname.3
985fda16e7b9a2ea19c0ce2acad334d015c8017f 16-Dec-1999 shin <shin@FreeBSD.org> KAME 4th patch
IPv6 specific library functions addition.
(getnameinfo(), getaddrinfo(), and IPv6 transport support is not yet)

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
akefile.inc
f_indextoname.3
fname.c
p6opt.c
thdr.c
ars.c
049d5796117bb710a45520ba1f1b2ca9996e3853 04-Nov-1999 ache <ache@FreeBSD.org> Add unsigned char cast to isalpha
ethostnamadr.c
etnetnamadr.c
7cff08527c03845203ebff80a4804022572ab3c5 04-Nov-1999 ache <ache@FreeBSD.org> Add unsigned char cast to is[x]digit
ethostbydns.c
cmd.c
dc0dd57e24f76d65287942f9b6af74c09129c2d4 04-Nov-1999 ache <ache@FreeBSD.org> unsigned char cast to ctype macros
cmd.c
96b246d3bd7690f28854662d3ebe0192eef115af 04-Nov-1999 ache <ache@FreeBSD.org> Add unsigned char cast to ctype macros arg
ase64.c
net_addr.c
net_network.c
es_debug.c
es_query.c
972efa99ba41f6eea3ee100f1595a762b6dde5cb 03-Nov-1999 green <green@FreeBSD.org> Fix a really lame buglet which broke with IPs of 34
(ERANGE...)
net_addr.c
3514435a4cae39cb637cc6e9bc524d3411bd9988 31-Oct-1999 green <green@FreeBSD.org> Allow whitespace termination. Internal use of /etc/resolv.conf relies
on this, and who knows what else would, too...
net_addr.c
5e58dc63ee1fb4790892c28641e9c19e421705de 31-Oct-1999 green <green@FreeBSD.org> This is the new inet_addr/inet_aton with proper error checking. This
should close all outstanding PRs on incorrect inet_aton behavior, and
since it has a decent parsing routine, doesn't allow some hysterically
working behavior.

PR: 13628
Submitted by: Adrian Chadd <adrian@FreeBSD.org>
net_addr.c
7c20265b6407851b2db8abe77704c32ea4eb5ddf 28-Sep-1999 peter <peter@FreeBSD.org> Back out my backout, it was already posix compliant. Any new fields are
required to be "announced" by a new bit in sa_flags to indicate the
program is aware of and has taken care of them. eg: SA_SIGINFO means
the program has used the sa_siginfo field (versus sa_handler).
es_send.c
123cfe878fae616dcc63174c6db44383b7e031e0 28-Sep-1999 peter <peter@FreeBSD.org> Fix previous commit. The standards specifically say: "The structure
sigaction, used to describe an action to be taken, is defined in the
header <signal.h> to include at least the following members:"
^^^^^^^^
A sigaction defined on stack with essentially random contents may have
just about anything underneath fields that the program doesn't know about.
It is not safe to delete the bzero.
es_send.c
971179f4cd40b802ce6d37b2c3f09cdee97fa8ac 28-Sep-1999 marcel <marcel@FreeBSD.org> Explicitly use sigemptyset to clear a sigset_t. Explicit
initialization of sa_flags allows us to lose the bzero.
es_send.c
33cff5565175963a0000a94d12661c26211a5c88 19-Sep-1999 phantom <phantom@FreeBSD.org> Fix typo

PR: docs/13814
Submitted by: Alex Vasylenko <lxv@mix.nest.org>
ethostbyname.3
76f0c923fe4b2a1616453876611dc76b4f6b5355 28-Aug-1999 peter <peter@FreeBSD.org> $Id$ -> $FreeBSD$
akefile.inc
ddr2ascii.3
ase64.c
yteorder.3
ther_addr.c
thers.3
ethostbydns.c
ethostbyht.c
ethostbyname.3
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetent.3
etnetnamadr.c
etprotoent.3
etservent.3
error.c
net.3
net_addr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
net_ntop.c
net_pton.c
so_addr.3
inkaddr.3
ap_v4v6.c
s.3
s_name.c
s_netint.c
s_parse.c
s_print.c
s_ttl.c
sap_addr.c
cmd.3
es_comp.c
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_mkupdate.c
es_query.c
es_send.c
es_update.c
esolver.3
f7a8bc4c04b17d06349e0d2590c2830dcf98666b 12-Jul-1999 nik <nik@FreeBSD.org> Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde
ddr2ascii.3
yteorder.3
etnetent.3
etprotoent.3
so_addr.3
esolver.3
1149f9c0c03c2747fd7d1216884ec8694768b9e7 07-Jun-1999 dt <dt@FreeBSD.org> Ensure that host_addr (which is returned in struct hostent::h_addr_list[0])
is aligned so that pointer to it can be safely casted to struct in_addr *.
ethostbyht.c
800c3a618af55e4e9843329ab84410dd3d8c2f05 04-Jun-1999 peter <peter@FreeBSD.org> Change an internal variable from "class" to "ns_class" for C++'s benefit.
Apparently BIND-8.2.1 uses ns_class.

Submitted by: John Plevyak <jplevyak@inktomi.com>
s_parse.c
95c4306434ef7b5bf3420250e5957362cd559e6d 02-Mar-1999 ghelmer <ghelmer@FreeBSD.org> Mention that getservbyport requires its port parameter to be in
network byte order.

PR: docs/9376
etservent.3
95c394b70edc1f3edc419d56b785b9bc25754d9b 12-Feb-1999 alex <alex@FreeBSD.org> Removed occurrences of consecutive repeated words (such as "the the").
thers.3
esolver.3
bd8ffb71c5dc0f7945db6f568d6014e7ab9d3392 25-Jan-1999 gallatin <gallatin@FreeBSD.org> gethostbyname2() was broken for lookups via NIS on FreeBSD/alpha
due to _gethostbynis() setting h.h_length to sizeof(u_long), which
works out to 8 on alphas. And 8!= NS_INADDRSZ.
ethostbynis.c
46dbddcd3c3bfdaed8d10343de0fbcfe9fa26192 05-Oct-1998 dfr <dfr@FreeBSD.org> 64bit portability fixes.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
cmd.c
ae94780f2c8e1233446d074d2e8d208edc6bdf28 14-Sep-1998 imp <imp@FreeBSD.org> o use strncpy safely
o Only allow options and domain name to be set when we aren't running
setuid.

Obtained from: OpenBSD
es_init.c
bf8ea8d3a710dfc5162591b386fb01dc0158ed55 02-Sep-1998 jdp <jdp@FreeBSD.org> Implement the weak aliases for private entry points in the inet_*
and res_* modules in a way that works for ELF. I moved the aliases
out of res_stubs.c and into the individual modules where the entry
points are defined. Weak aliases don't work in ELF unless that is
the case. (Actually, I'm surprised it worked for a.out.)

This should fix the undefined "inet_addr" and related symbols in
various applications that fail to include <arpa/inet.h> or
<resolv.h> as they are supposed to do.
akefile.inc
net_addr.c
net_lnaof.c
net_makeaddr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
net_netof.c
net_network.c
net_ntoa.c
net_ntop.c
net_pton.c
sap_addr.c
es_comp.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
es_stubs.c
cfef94c8ca2347c78a745676fe6061eb1f172be7 03-Aug-1998 bde <bde@FreeBSD.org> Fixed bitrot in prototypes in synopsis.
esolver.3
53e5892174c34c39d6d81db0c3263e2bb4c25dbb 30-Jun-1998 bde <bde@FreeBSD.org> Fixed printf format errors.
s_ntoa.c
7321b44b39b5b8d73378f7c295c2508f5d73a09a 14-Jun-1998 peter <peter@FreeBSD.org> Don't compile in the use of poll() when building libc_r. This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.
es_send.c
9492d9f3a276bb1ce288f7f1242f55ba381fb5d8 11-Jun-1998 peter <peter@FreeBSD.org> Update the resolver parts to bind-8.1.2 level. I have not touched the
getXXXXbyYYYY() interfaces yet.

Obtained from: diff relative to bind-8.1.2 sources
akefile.inc
ase64.c
error.c
net_net_pton.c
net_network.c
net_ntoa.c
net_ntop.c
net_pton.c
s_name.c
s_netint.c
s_parse.c
s_print.c
s_ttl.c
sap_addr.c
es_comp.c
es_config.h
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_mkupdate.c
es_query.c
es_send.c
es_stubs.c
es_update.c
0d7d76d9824e92ac3e2d5c95c38338e47b940aad 06-Jun-1998 jkoshy <jkoshy@FreeBSD.org> Spelling corrections.

PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>
ddr2ascii.3
ethostbyname.3
da6a2015e3efa30106a86237106de455d889dc3a 02-May-1998 peter <peter@FreeBSD.org> Resolve some unexpected differences when comparing with the 2.2 version.
One bug was relatively harmless (select's timeout had an uninitialized
tv_usec), the other I'm not so sure.. (neglected to catch select returns
less than zero). Both of these were irrelevant on kernels with poll().
es_send.c
119bf1955726447fe80a4419229bf6ca6a606026 02-May-1998 peter <peter@FreeBSD.org> Update libc dns code to 4.9.7-T1B level. This involved chopping out large
chunks of res_comp.c and replacing it with chunks of bind-8.1.1's resolver
code. (There are no interface changes though)
The other parts are better bounds checking related.
ethostbydns.c
es_comp.c
es_send.c
57517b42e5107bad4ffedfa65b82b880fac1c21e 23-Mar-1998 bde <bde@FreeBSD.org> (Ab)use .Vt instead of .Fd for a variable declaration.
ethostbyname.3
79fc0e555519ee116047038ddb2309feefbfcd1d 19-Mar-1998 charnier <charnier@FreeBSD.org> .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq
ddr2ascii.3
bdf0841be6cec556fba5dcf7976b4cdd02627b41 20-Feb-1998 jb <jb@FreeBSD.org> Change MACHINE references to MACHINE_ARCH.
akefile.inc
5860dff332f43af9ac77f1506ba3a67ac8863dd2 20-Feb-1998 jb <jb@FreeBSD.org> Add #include <string.h> to get prototypes.
net_neta.c
69cc48469969f7d36269cc77135b4fc379a62e7e 20-Jan-1998 bde <bde@FreeBSD.org> Fixed #includes in the synopsis and in an example. <sys/socket.h>
isn't a prerequisite, since it isn't required for the prototypes
and isn't always needed to call the functions (the address family
might be a variable).
ddr2ascii.3
c15aab914445717e45e8260a65476aedd8d79614 07-Jan-1998 imp <imp@FreeBSD.org> handle long usernames more carefully
Reviewed by: guido
Obtained from: OpenBSD (Theo de Raadt)
etnetbydns.c
32ddc95d9022f09a9b44b5dec56dee6e77bb2914 25-Dec-1997 alex <alex@FreeBSD.org> Removed unnecessary initialization of hp in gethostbyaddr_r.
ethostnamadr.c
ea35ce8d7327dba210d7ed93edbbf2821a41fbf6 21-Oct-1997 bde <bde@FreeBSD.org> Sorted lists.
akefile.inc
ef5c98dd4552a60c77815d0cc9d9b7c5e80ceb62 15-Oct-1997 bde <bde@FreeBSD.org> Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
akefile.inc
d9fa5d1fa233a5679640cf7041a6aa60a44c6bf9 16-Sep-1997 peter <peter@FreeBSD.org> Some adjustments for the resolver use of poll(). For some reason I thought
an unimplemented syscall returned ENOSYS, rather than EINVAL. I have run
statically linked code with this wrapper and it does appear to work fine
on 2.2-stable which doesn't have poll(). ktrace shows the poll syscall fail
once and the fallback to select() working.
es_send.c
ef7710b20181f03b3f6a27f56769d39b84d04958 14-Sep-1997 peter <peter@FreeBSD.org> Call poll(2) from within the resolver but adapt to older kernels without it
if necessary. This removes the need to malloc large fd_set's for selecting
on high fd's (larger than FD_SETSIZE at libc compile time).

The syscall adaptive stuff only happens on the very first call. SIGSYS
is masked, and if the call to poll fails with ENOSYS, then we use select
for the life of the program. If poll does not fail with ENOSYS, then we
always use poll and skip the once-off signal masking gunk.

This may be overkill, but it saved my neck a few times while working on
multiple different sets of kernel sources, some with poll, some without.
es_send.c
a059b2e7c8fc7680bc0536c45c891db372aa7e32 01-Sep-1997 brian <brian@FreeBSD.org> Add "options no_tld_query" to resolv.conf.
Mention the capability in resolver(5).
Mention that RES_OPTIONS can be used in resolver(5).
Discussed with: -hackers
es_init.c
es_query.c
486333fcfd5f2cc27736d07dbf10d2cd0b6875e0 13-Jul-1997 peter <peter@FreeBSD.org> kill the undead
etnetbyname.c
etnetent.c
ethostent.c
c800b77e17a9db61b5cfedb8ada17ba33ba97d40 03-Jul-1997 bde <bde@FreeBSD.org> This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.
e2f0a0f35c8c3ecbae359c67f0d5b3aac5ce43dc 03-Jul-1997 bde <bde@FreeBSD.org> Import Lite2's src/lib, except for non-i386 machine-dependent directories,
libc/db, libc/gen/crypt.* and libtelnet. All affected files except 3
unimportant ones have already left the vendor branch.
etnetbyname.c
etnetent.c
etservent.3
ethostent.c
0e9bc076721cc9e5492fe8d0faa092eada38c0c3 28-Jun-1997 peter <peter@FreeBSD.org> replace the OpenBSD fd_set sizing code with something more efficient.
Only call malloc() if the fd is too big for the compiled in fd_set size,
and don't use calloc either. This should reduce the impact of conflicts
with private malloc implementations etc. When using the fd_set on the
stack, only zero what is needed rather than all 1024 bits like FD_ZERO did.
es_send.c
f2163cb4a1fdc0c1433c2019b7d7a88d9efb5b65 27-Jun-1997 peter <peter@FreeBSD.org> Dynamically size fd_set in select rather than fail if too many files
are open.
Obtained from: OpenBSD; by deraadt and dm
es_send.c
6d60ffd86ab763b4c8b04ee0a43cf1c9fa7be893 27-Jun-1997 peter <peter@FreeBSD.org> compensate for res_send <-> __res_send changes
es_stubs.c
63d61ea6e9374a89adcb36c3f5c3b759b9a82c41 27-Jun-1997 peter <peter@FreeBSD.org> Merge in bind-4.9.6 resolver changes. Note that they resolve the
overflow problem differently.
ethostbydns.c
ethostbyht.c
etnetbydns.c
etnetbyht.c
etnetnamadr.c
es_comp.c
es_debug.c
es_init.c
es_query.c
es_send.c
59c6ef884a174454627ad4e474ed046c199c9d9a 18-Jun-1997 charnier <charnier@FreeBSD.org> Typo.
ethostbyname.3
ea356bff532d9ca6ae96c0916a3dedfcb8870627 13-Jun-1997 ache <ache@FreeBSD.org> Add MAXHOSTNAMELEN check
Obtained from: OpenBSD
es_comp.c
a1337bb0aea1f73b56821753ae8b9758996f55e4 03-May-1997 jb <jb@FreeBSD.org> Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
akefile.inc
f4efda881f0b73cfc108d4f6835ca9dd7f223716 13-Apr-1997 bde <bde@FreeBSD.org> Fixed #include and/or prototype bugs in synopsis.
ddr2ascii.3
etnetent.3
etprotoent.3
esolver.3
ff12c038efa6945b2598bb5f2d145ba82d294aca 24-Mar-1997 imp <imp@FreeBSD.org> If we're running setuid/setguid then don't open the host alias file to
prevent information leakage.

Closes PR 2578

Submitted by: Julian Assange
es_query.c
0e6987f95b41e8595536e877ec50562cb3da1127 19-Mar-1997 bde <bde@FreeBSD.org> Fixed missing #include of <sys/types.h> and wrong arg types in synopsis.

Reviewed by: wollman
net.3
3d671533150c40efd34c69490e5cfb7e36788a9e 19-Mar-1997 bde <bde@FreeBSD.org> Fixed missing function types in synopsis.
ethostbyname.3
214d331cf7e0d14525bb64b287160d25bd5aebc2 12-Mar-1997 peter <peter@FreeBSD.org> Fix problem with FD_SET* overflow reporting.. Perror() didn't have enough
args, and errno hasn't actually been set so it probably doesn't make sense
to report it via strerror().

Pointed out by: bde
es_send.c
9e8bec943073cf63f0c944ed459ba0dfb5d29da9 12-Mar-1997 peter <peter@FreeBSD.org> _res_close() -> res_close()

Pointed out by: bde
ethostbydns.c
39c96d6474f91fa081183ba05b1ae0b1a14beeff 10-Mar-1997 guido <guido@FreeBSD.org> Check for overflow of FD_SET
es_send.c
b0a4a0ba48497bf42a7df2341c53630366ac9729 28-Feb-1997 mpp <mpp@FreeBSD.org> getnetbyaddr now takes an unsigned long as its first argument.
etnetent.3
00bfe049f97d722775fe5c444bd8ae53e872e3ac 26-Feb-1997 imp <imp@FreeBSD.org> Buffer overflow from DNS name information which could cause root access
when called from lpd.

Reviewed by: jkh, pst
Submitted by: Oliver Friedrichs <oliver@secnet.com>
cmd.c
6b08958c64bd274652d33b6f406630fcb201cd3d 22-Feb-1997 peter <peter@FreeBSD.org> Revert $FreeBSD$ to $Id$
ther_addr.c
thers.3
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbynis.c
etnetnamadr.c
etservent.3
error.c
net.3
net_addr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
net_ntop.c
net_pton.c
inkaddr.3
ap_v4v6.c
s.3
sap_addr.c
cmd.3
es_comp.c
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
es_stubs.c
b0afeca2e2e6f1e44a1f422540e344c65583365d 09-Feb-1997 imp <imp@FreeBSD.org> Fix PR2579: potential security hole in rcmd.c

Submitted by: Julian Assange
cmd.c
0037fcc3a04c86477286312805c4e5b392e96ffd 30-Jan-1997 mpp <mpp@FreeBSD.org> Update to reflect current include files.
thers.3
6d0dbd7455d2457305fad8dab1cbd93d75cf5771 20-Jan-1997 wosch <wosch@FreeBSD.org> Sort cross references.
etnetent.3
esolver.3
808a36ef658c1810327b5d329469bcf5dad24b28 14-Jan-1997 jkh <jkh@FreeBSD.org> Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
ther_addr.c
thers.3
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbynis.c
etnetnamadr.c
etservent.3
error.c
net.3
net_addr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
net_ntop.c
net_pton.c
inkaddr.3
ap_v4v6.c
s.3
sap_addr.c
cmd.3
es_comp.c
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
es_stubs.c
bf70ac7d48b1d04e4034ae5559d632caba564706 08-Jan-1997 ache <ache@FreeBSD.org> Fix fake failures on the short names which looks like hexadecimal numbers
Submitted by: paul@vix.com
ethostbydns.c
17cdaa2f54df6b9ffc677ecffc8364f64bdd4220 05-Jan-1997 ache <ache@FreeBSD.org> Disable isxdigit block until proper solution will be found
isxdigit(name[0]) gives false failures on short names which looks
like hexadecimal digits, f.e. "fade", "babe", "d133", etc.
ethostbydns.c
331981ce541e5a56b807c650ecef3685ffaccd14 01-Jan-1997 jkh <jkh@FreeBSD.org> Remove bogus weak reference.
es_stubs.c
7b950e65b2fd7b182f052a13da5c0465fb308334 30-Dec-1996 peter <peter@FreeBSD.org> Tempt fate! 'cvs add' a file remotely which also exists in the Attic on
RELENG_2_2!

This is part#2 of the previous commit to src/lib/libc/net to contain the
potential damage.

This provides stubs so that binaries linked in 2.2 will run on 3.0
es_stubs.c
43be453b52c9807ae45f5761e14df21a517e496c 30-Dec-1996 peter <peter@FreeBSD.org> Here goes.. Bring the 4.9.5-P1 resolver into -current. This has the
DNSSEC stuff, among other things. There are also some renamed functions,
I've left out the res_stubs.c from this commit in case cvs bombs out..
akefile.inc
ase64.c
ethostbydns.c
ethostbyht.c
etnetbydns.c
etnetnamadr.c
net_net_ntop.c
net_net_pton.c
net_neta.c
ap_v4v6.c
s_addr.c
sap_addr.c
es_comp.c
es_config.h
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
7187ede0636788711d157314ae5b131815515a80 27-Dec-1996 wpaul <wpaul@FreeBSD.org> Small yet significant tweaks/cleanups:

- getservent:
o put _yp_check() proto under #ifdef YP where it belongs
o local YP buffers should be YPMAXRECORD + 2 bytes long and should
be NUL terminated after copying

- gethostbynis:
o local YP buffer should be YPMAXRECORD + 2 bytes long

- getnetbynis:
o local YP buffer should be YPMAXRECORD + 2 bytes long and should
be NUL terminated after copying

- ether_addr:
o local YP buffers should be YPMAXRECORD + 2 bytes long and should
be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes,
but it happens that BUFSIZ == YPMAXRECORD.

- gethostbydns:
o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly)

These are 2.2 candidates. I will wait a few days to make sure these don't
break anything and then, if there are no objections, move them to the 2.2
branch.
ther_addr.c
ethostbydns.c
ethostbynis.c
etnetbynis.c
etservent.c
d594a0a4463e72746f58f6f7c37f42b684060387 24-Dec-1996 wpaul <wpaul@FreeBSD.org> Another one-liner: remember to NUL terminate local copy of NIS host
lookup results. Without this, doing multiple host/addr lookups in a
single process yeilds strange results (the buffer is static, and
garbage may be left behind from previous lookups).

I just noticed this in 2.2-BETA. Unless somebody threatens to chop my
hands off with an axe, I'm going to move this to the 2.2-RELENG branch
shortly.
ethostbynis.c
4ab0d63c8aed49b7d37e4c8f3557febdad48a701 24-Dec-1996 wpaul <wpaul@FreeBSD.org> Make the __dns_getanswer() wrapper work right. For the newer versions
of BIND, we need to tweak some things to that gethostanswer() knows
whether or not we're dealing with an IPv4 or IPv6 address. (This'll
teach me to use a 2.1.0 system for NIS development -- but it's so nice
and stable I just can't being myself to upgrade it. :)
ethostbydns.c
0426c0af88896ae0e7b7809d8729d78595b55e26 23-Dec-1996 wosch <wosch@FreeBSD.org> comma typos
net.3
s.3
d389236bb21608788d7843fe717422b5eeb5af45 22-Dec-1996 wpaul <wpaul@FreeBSD.org> Add __dns_getanswer() hook to allow access to the gethostanswer()
functions from outside libc. (Needed for async DNS resolver in ypserv.)
ethostbydns.c
9bc3e724e5355cd0097ffaa4d92bba7d649789d5 14-Dec-1996 mpp <mpp@FreeBSD.org> Correct some xrefs/mlinks.
akefile.inc
8f51351988bc899b89223df15506d9533024f8bd 13-Dec-1996 joerg <joerg@FreeBSD.org> Fix the fix.

Pointed out by: wollman, bde
scii2addr.c
20ea94ba7dca8bed454a1891b2d427d6fd445bcf 12-Dec-1996 joerg <joerg@FreeBSD.org> Fix an embarassing and rather obscure incarnation of an uninitialized
local variable use.

Found by: actually using ascii2addr() :-/
scii2addr.c
b569335b9308eb4b8a67b16e0e3dffe2f50bdc7b 10-Dec-1996 wollman <wollman@FreeBSD.org> Get struct ether_addr directly from <net/ethernet.h> rather than pulling
in lots of unrelated junk from <net/if.h> and <net/if_ether.h>. These
functions still aren't prototyped anywhere (but should be in
<net/ethernet.h>---got that, Bill?).
ther_addr.c
thers.3
eeb126378ebe691b733ace62bfea8d6edd75faa4 06-Dec-1996 jkh <jkh@FreeBSD.org> I asked Bill Paul why _getnetbynis() was only being called with 2 parameters,
and he said:

The 3rd agrument is new; looks like it was part of the upgrade to
a new BIND with some IPv6 support. The third argument here should be
AF_INET. In order for it to be anything else, I'd have to add new
NIS functions to support IPv6 lookups. I don't even know what those
look like yet.

So there ya go, add AF_INET as the 3rd argument to the call.

Submitted-by: wpaul
etnetbynis.c
e1ff7f23f852545fc959bfc5f5a158938af54ac5 05-Dec-1996 jkh <jkh@FreeBSD.org> Remove more instances of passing arrays by address when they should
have simply been passed as arrays. In some cases, casts had even
been added to remove the warnings generated by such misuse! Aieee!
ther_addr.c
387fe043cb29876f6215a04438bcb1ecb12e7f52 05-Dec-1996 jkh <jkh@FreeBSD.org> Eliminate 3 more examples of gratutiously passing arrays by address.

Everyone please call ParaSoft today and say "I will buy 57 copies of
Insure++ tomorrow, but first I want a FreeBSD version." :-)
etservent.c
259bccfa492f72406c4205a16808d8749926d8ea 01-Nov-1996 peter <peter@FreeBSD.org> Doc updates and cleanups made with the bind-4.9.4 update some time ago.
I thought I had committed these, but it seems not.
akefile.inc
ethostbyname.3
etnetent.3
esolver.3
f21a0e44182a336c25b015823557bf2ac004e6b7 01-Nov-1996 peter <peter@FreeBSD.org> Add an "officially undocumented" tweak for squid so that it can see the
TTL of DNS records that it looks up for it's resolver cache.

Obtained from: Endre Balint Nagy <bne@CareNet.hu>, via squid-1.1.x source.
ethostbydns.c
dea026027ce02804712e35943b7bfea6e86ce05a 16-Oct-1996 jkh <jkh@FreeBSD.org> Bring back ns_* routines; we need them for ifconfig and route.
akefile.inc
32032fd3dfd54672b93bc90711ba1024e19808c3 08-Oct-1996 jdp <jdp@FreeBSD.org> Fix an error in the description of "h_errno". Add "const" to a few
declarations to make them agree with the actual prototypes in <netdb.h>.
ethostbyname.3
2e60f50f68a3916d8a5a1fe3b787637180aec93a 01-Oct-1996 pst <pst@FreeBSD.org> Skip results that have unexpected lengths
ethostbydns.c
d1d004ea7b904ee20cce6859c11c4407427639a1 30-Aug-1996 peter <peter@FreeBSD.org> pull this in to avoid fixing these twice
ethostbyname.3
2e0e3adbfdd71837c1010680bb5ec5718293f1da 30-Aug-1996 peter <peter@FreeBSD.org> Sigh, back out the last bright idea I had here about compiling the res_*
routines from contrib/bind directly. There were too many problems,
including having to add -DUSE_OPTIONS_H to the entire libc source in
order for the contrib code to pick up it's options, and so on.

Instead, I've merged the changes, libc is now self contained again.
akefile.inc
es_comp.c
es_config.h
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
d976fee71f9db074ad153373647c3e747415556c 30-Aug-1996 peter <peter@FreeBSD.org> back out last two changes, this caused the mandoc pages to be replaced by
man pages. I'll fold in the real changes in a seperate commit.
ethostbyname.3
etnetent.3
esolver.3
3752244d028d46a6ab2ed44d5cb918b322d869cb 30-Aug-1996 peter <peter@FreeBSD.org> oops, brain-lapse caused undefined symbol
ethostbyht.c
89e21d41bf7f5ae4a5a040cfd3f5391657956a2d 29-Aug-1996 peter <peter@FreeBSD.org> The last commit failed part-way through, re-add the generated
resolver man pages.
ethostbyname.3
etnetent.3
esolver.3
286c357861cb82b1749ee01b91f8c2377d97b7c6 29-Aug-1996 peter <peter@FreeBSD.org> Revert change to build the reolver man pages on the fly, install the
machine-generated versions
akefile.inc
1f1fd8028fddf809ce8077697ffa07cb30a1e5d2 29-Aug-1996 peter <peter@FreeBSD.org> Merge in bind-4.9.4-P1 resolver...
akefile.inc
ethostbydns.c
ethostbyht.c
ethostbyname.3
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetent.3
etnetnamadr.c
net_ntop.c
net_pton.c
ap_v4v6.c
sap_addr.c
es_comp.c
es_config.h
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
esolver.3
e3cbaed95562378632d591fd758ea8ef089fc360 21-Aug-1996 mpp <mpp@FreeBSD.org> Update some more man pages to use the .Fx macro.
thers.3
7350d1d3b2ec940c89a2b20f9d09985d9fd9e9d7 20-Aug-1996 julian <julian@FreeBSD.org> Submitted by: John Birrell <cimaxp1!jb@werple.net.au>

Here are the diffs for libc_r to get it one step closer to P1003.1c
These make most of the thread/mutex/condvar structures opaque to the
user. There are three functions which have been renamed with _np
suffixes because they are extensions to P1003.1c (I did them for JAVA,
which needs to suspend/resume threads and also start threads suspended).

I've created a new header (pthread_np.h) for the non-POSIX stuff.

The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented
doesn't work. I think its best to delete it. I don't think libc_r needs
tags anyway, 'cause most of the source is in libc which does have tags.

also:

Here's the first batch of man pages for the thread functions.
The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was
inherited from /usr/src/lib/libc/Makefile that should only be done with
libc.

also:

I should have sent this diff with the pthread(3) man page.
It allows people to type

make -DWANT_LIBC_R world

to get libc_r built with the rest of the world. I put this in the
pthread(3) man page. The default is still not to build libc_r.


also:
The diff attached adds a pthread(3) man page to /usr/src/share/man/man3.
The idea is that without libc_r installed, this man page will give people
enough info to know that they have to build libc_r.
ethostnamadr.c
665b6e261ba076b16c6c02125a104c2297ae5a96 12-Aug-1996 peter <peter@FreeBSD.org> clear sockaddr_in's on stack before use
set sin_len
close one ftp port bounce attack
have rresvport() use bindresvport() rather than duplicate the code,
rresvport() is a superset of bindresvport().

Obtained from: OpenBSD / Jason Downs / Theo de Raadt, minor tweaks by me.
cmd.c
c4d4a99d31762beef936f34571330923e9300da9 12-Jul-1996 jkh <jkh@FreeBSD.org> General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
ther_addr.c
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetnamadr.c
etproto.c
etprotoname.c
etservbyname.c
etservbyport.c
etservent.c
net_network.c
cmd.c
es_comp.c
es_debug.c
es_send.c
ab2d57f2bbd866d4c2e67dd76e0b054a4ba3bdf8 17-Jun-1996 wollman <wollman@FreeBSD.org> Add RCS Id and fix date.
cmd.3
28bd91029c88511ea45cb67f19d74d4995ba0177 17-Jun-1996 wollman <wollman@FreeBSD.org> Cross-reference addr2ascii(3).
inkaddr.3
5aea613dbecf2e30987c4f912cb069a6faf9caf6 17-Jun-1996 wollman <wollman@FreeBSD.org> Correct date and add $Id$ to reflect previous modification.
etservent.3
7fd93ff52ecefa6b25bc445eabba977f76bb3823 17-Jun-1996 wollman <wollman@FreeBSD.org> Cross-reference addr2ascii(3) and inlcude a note about how those
functions are preferred but are not widely available as yet.
net.3
32277d9773346c2da6e585898d259fa3cd9e5314 13-Jun-1996 wollman <wollman@FreeBSD.org> It would help if I actually added the source code for these routines.
ddr2ascii.3
ddr2ascii.c
scii2addr.c
ab56e8b192f1b86fc9601d31ae4f9a1f0ab4a9d8 13-Jun-1996 wollman <wollman@FreeBSD.org> Add an independent implementation of addr2ascii(3) and ascii2addr(3)
following the API of the INRIA IPv6 implementation.
akefile.inc
f96a6bec7fc3dcdc42d9d842779178e93798aac2 01-Jun-1996 wpaul <wpaul@FreeBSD.org> Improve NIS performace of getservbyname() and getservbyport(). Both these
functions are implimented as wrappers around getservent(), which means it's
up to getservent() to do all the work. The NIS support in getservent()
only allows it to scan through the services.byname map one entry at a
time until it finds the requested service name/port. This can be painfully
slow due to the overhead involved (lots and lots of successive RPCs).

To fix this, we allow getservbyname() and getservbyport() to signal
getservent() that if NIS is turned on (there's a '+' in /etc/services),
the usual yp_first()/yp_next() linear search should be abandoned and
yp_match() used instead. This causes getservent() to immediately
locate the requested entry instead of wasting time groping through the
whole map.

The downside is that this trick is accomplished by exporting a couple of
pointers from getservent.c which getservbyname.c and getservbyport.c can
preset in order to tell getservent() what to do. If all three functions
were in the same source module, then the extra cruft could be delcared
static to avoid poluting the global symbol space. Maybe they should be
combined anyway. For now I've settled on prepending lots of underscores.
etservbyname.c
etservbyport.c
etservent.c
3259f4bdcaa61a9bcde732df3f930ee3f278b563 31-May-1996 peter <peter@FreeBSD.org> Use the setsockopt for IP_PORTRANGE to cause rresvport() to allocate a
privileged port within a single bind(), rather than looping through
attempts to bind over and over again over progressively lower ports.

This should speed up rlogin/rsh etc, and will probably cure some of the
strange rlogin hangs that have been reported in the past where rresvport()
managed to bind() to a port address that it shouldn't have.
cmd.c
f13d17519fb4ad30eac746ec447eba0715fdbc01 08-Apr-1996 mpp <mpp@FreeBSD.org> Do not install the now unsupported netns and netiso
related man pages. Comment out cross references to those man
pages from other man pages.
akefile.inc
inkaddr.3
3c57dc77537bfff8a25b061e147f5a1194613a28 08-Apr-1996 mpp <mpp@FreeBSD.org> Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
inkaddr.3
ce5b804dd075dfa57105aaf12534b68a604f49c0 23-Mar-1996 wpaul <wpaul@FreeBSD.org> Fix other half of problem reported in PR #1079: _getnetbynisaddr() is
broken. The translation from network number to ASCII string was not
working correctly (you would sometimes get things like 0.244.0.0 instead
of 244.0.0).

Also copied results of yp_match() to a static buffer for consistency
with gethostbynis.c.

Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is
truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks
lookups) leaves the traling .0's in place. This means that the NIS
and local file lookups will match different things when looking up the
same network number. I'm not sure which is the correct behavior. (I
think the DNS lookup code tries all combinations -- should the NIS
and local host lookup routines do that too?)
etnetbynis.c
d51d5c3ca53d4022fa3bd9f0a938e5cea4169c2a 16-Mar-1996 wpaul <wpaul@FreeBSD.org> gethostbynis.c:

- Fix problem described in PR #1079: _gethostbynisaddr() doesn't
work. Make it accept the same arguments as all the other
gethostby*addr() functions and properly convert the supplied IP
address into a text string so that yp_match() can find it in the
hosts.byaddr map.

- Also fix potential memory leak: copy the results of yp_match() to
a static buffer and free the result (yp_match() returns dynamically
allocated memory).

ether_addr.c:

- Since I was in the neighborhood, fix ether_ntohost() and
ether_hostton() so that they don't bogusly for a free(result)
when yp_match() fails.
ther_addr.c
ethostbynis.c
8b115c5fc51ae95cdef8f4bf8747a4ee347850ad 17-Feb-1996 mpp <mpp@FreeBSD.org> Fix inet_network to not dump core if passed in an address
with more than 4 octets (e.g. 1.2.3.4.5).

Submitted by: Amy Baron <amee@beer.org> via NetBSD-bugs
net_network.c
f153098d8fd4cf063b9c6a6a4cf4f3a4edcee28f 15-Feb-1996 mpp <mpp@FreeBSD.org> Fixed a bunch of man page cross references that were
in the main text of various man pages.

Thanks to Warner Losh for adding an option to manck to allow
it to scan the entire man page looking for bogus xrefs, instead
of just checking the SEE ALSO section.
inkaddr.3
cmd.3
379b9b388fc8788659993af038bb322bfbcea8b2 13-Feb-1996 wollman <wollman@FreeBSD.org> XNS sort-of-support is no more.
akefile.inc
3aeb7f1d49074a8872660d87d96bd1ba0e41d3e5 11-Feb-1996 mpp <mpp@FreeBSD.org> Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
thers.3
ac7bc7dc91fd898b819e49238b290fc5dc91c2fd 09-Feb-1996 mpp <mpp@FreeBSD.org> Added some missing MLINKS for section 3 man pages.
Also corrected a few minor formatting errors, file location and cross
references in some of the section 3 man pages.

This shuts up a lot of the output from "manck" for section 3.
akefile.inc
61d8d8e40b45efc45d9bbdf14fe96e565ceb074f 06-Feb-1996 wollman <wollman@FreeBSD.org> Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree. NB: because
a function was deleted, libc is now at version 3.0 (was 2.2 previously).
akefile.inc
es_debug.c
62cdcaa268e9ad16b906a817690d3036e0f12eee 30-Jan-1996 mpp <mpp@FreeBSD.org> Fix even more spelling errors in some more man pages.
cmd.3
bc3d519a691dae27cb75aacccb78a04639023aed 29-Jan-1996 mpp <mpp@FreeBSD.org> Getpwent() and getservent() can wind up calling free() with
an invalid pointer if a call to yp_first() fails. Closes PR # 964,
and possibly # 952.
etservent.c
05184daaef969978db8f5aa4df2c3c5edac44c51 13-Jan-1996 peter <peter@FreeBSD.org> The last of the bind-4.9.3-REL resolver merges.
ethostbydns.c
ethostbyht.c
etnetbyaddr.c
etnetbydns.c
etnetbyht.c
error.c
net_addr.c
es_config.h
5318dd95b77bde12017e70a09ed69461782dd072 07-Jan-1996 peter <peter@FreeBSD.org> Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYY
parts are not quite so simple..
akefile.inc
es_comp.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
349c571ce6b65ab9c3e8ba707e87959ae986568c 07-Jan-1996 peter <peter@FreeBSD.org> This commit was generated by cvs2svn to compensate for changes in r13304,
which included commits to RCS files with non-trunk default branches.
65550ab4bf1a40a68b3fe1a06c5a21e96df6c811 07-Jan-1996 peter <peter@FreeBSD.org> Part of bind-4.9.3-rel.. This is for my convenience and reference.
This import to the vendor branch changes no files...
es_comp.c
es_data.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
9e723d65b3dbe4a3c599923d35ce1e637e0d32e1 30-Dec-1995 peter <peter@FreeBSD.org> recording cvs-1.6 file death
etnetbyname.c
etnetent.c
ethostent.c
c3f352d4ad515968c54d216a0e53252eff8ab3ef 30-Dec-1995 peter <peter@FreeBSD.org> This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
etnetbyname.c
etnetent.c
ethostent.c
346ab43d02955c00ee4d34bf243e660871d0500a 04-Nov-1995 wpaul <wpaul@FreeBSD.org> Add NIS support to getservent(3) functions (getservbyport() and getservbyname()
both call getservent() to do most of the work, so we only need to modify
this file to take care of everybody).

Note that there is only one NIS services map (services.byname) even
though there are getservbyname() and getservbyport() library functions.
etservent.c
4be9bcf742cae0887e6a357faf90273b56da27e4 22-Oct-1995 phk <phk@FreeBSD.org> As above.
ethostbydns.c
etnetbydns.c
etnetbynis.c
2caa66b6de6e6875c2a3a4ec856234ff9da55fa4 21-Aug-1995 peter <peter@FreeBSD.org> Remove the CFLAGS+=-I${CURDIR}/net that I previously added.
Since Bruce changed the #include <res_config.h> to #include "res_config.h"
this is no longer needed, and only makes the 'make' more verbose for
no real reason.
akefile.inc
c48db1d71212705488fef88b5d12bc7aa2883863 21-Aug-1995 bde <bde@FreeBSD.org> Define DEBUG as 1 instead of as nothing so that it doesn't conflict with
-DDEBUG in libresolv/Makefile.
es_config.h
1c10f9504f2a4c4ea53e350c36f5ae89cdc37522 21-Aug-1995 bde <bde@FreeBSD.org> Fix bogus include paths, some of which stopped libresolv from compiling.
ethostbydns.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
bbe6ab41603ea223c7c921bd48586ed795917870 20-Aug-1995 peter <peter@FreeBSD.org> Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)
Note that this was done by selective patching from diffs, to not conflict
with the 4.4bsd base code.. This was *not* a trivial task.. I have been
testing this code (apart from cosmetic changes) in my libc for a while now.

Obtained from: Paul Vixie <paul@vix.com>
akefile.inc
ethostbydns.c
error.c
es_config.h
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
26b873784e215f9e40afa030392b82600e7ebeef 14-Aug-1995 wpaul <wpaul@FreeBSD.org> Submitted by: Bill Fenner <fenner@parc.xerox.com>

Fix for PR #510. The original problem was that __ivaliduser() was
failing to grant access to a machine listed in a +@netgroup specified
in /etc/hosts.equiv, even though the host being checked was most
certainly in the +@netgroup.

The /etc/hosts.equiv file in question looked like this:

localhost
+@netgroup

The reason for the failure was had to do with gethostbyaddr(). Inside
the __ivaliduser() routine, we need to do a gethostbyaddr() in order
to get back the actual name of the host we're trying to validate since
we're only passed its IP address. The hostname returned by gethostbyaddr()
is later passed as an argument to innetgr(). The problem is that
__icheckhost() later does a gethostbyname() of its own, which clobbers
the buffer returned by gethostbyaddr().

The fix is just to copy the hostname into a private buffer and use
_that_ as the 'host' argument that gets passed to innetgr().

And here I was crawling all over the innetgr() code thinking the
problem was there. *sigh*
cmd.c
d9b109975827973dc12bcc88eff6356d6dd941a6 07-Aug-1995 wpaul <wpaul@FreeBSD.org> Just when you thought it was safe...

- getnetgrent.c: address some NIS compatibility problems. We really need
to use the netgroup.byuser and netgroup.byhost maps to speed up innetgr()
when using NIS. Also, change the NIS interaction in the following way:

If /etc/netgroup does not exist or is empty (or contains only the
NIS '+' token), we now use NIS exclusively. This lets us use the
'reverse netgroup' maps and is more or less the behavior of other
platforms.

If /etc/netgroup exists and contains local netgroup data (but no '+').
we use only lthe local stuff and ignore NIS.

If /etc/netgroup exists and contains both local data and the '+',
we use the local data nd the netgroup map as a single combined
database (which, unfortunately, can be slow when the netgroup
database is large). This is what we have been doing up until now.

Head off a potential NULL pointer dereference in the old innetgr()
matching code.

Also fix the way the NIS netgroup map is incorporated into things:
adding the '+' is supposed to make it seem as though the netgroup
database is 'inserted' wherever the '+' is placed. We didn't quite
do it that way before.

(The NetBSD people apparently use a real, honest-to-gosh, netgroup.db
database that works just like the password database. This is
actually a neat idea since netgroups is the sort of thing that
can really benefit from having multi-key search capability,
particularly since reverse lookups require more than a trivial
amount of processing. Should we do something like this too?)

- netgroup.5: document all this stuff.

- rcmd.c: some sleuthing with some test programs linked with my own
version of innetgr() has revealed that SunOS always passes the NIS
domain name to innetgr() in the 'domain' argument. We might as well
do the same (if YP is defined).

- ether_addr.c: also fix the NIS interaction so that placing the
'+' token in the /etc/ethers file makes it seem like the NIS
ethers data is 'inserted' at that point. (Chances are nobody will
notice the effect of this change, which is just te way I like it. :)
ther_addr.c
cmd.c
28fb9a318face899c781210923641a0c958e2d18 16-Jul-1995 peter <peter@FreeBSD.org> Slight adjustment to previous fix for __ivaliduser(). It was checking for
the comment before checking for long lines, so there was a possibility
that the wrap-around might be used as an exploitable hostname.
Reviewed by:
Submitted by:
Obtained from:
cmd.c
694c4272848a2eb83621679c60812e3cbf1df6b2 16-Jul-1995 joerg <joerg@FreeBSD.org> Make ruserok() accept the #-starting comment lines we used to have
in our default /etc/hosts.equiv.

Closes PR #conf/620: Default /etc/hosts.equiv...
cmd.c
873428202f4d1c10ed4e2d3587a6fcfc3dc33ba1 09-Jul-1995 joerg <joerg@FreeBSD.org> Fix the prototypes for getservby{name,port}().

Closes PR #docs/568: minor manpage bug

Submitted by: Michael Smith (email address no longer valid)
etservent.3
f05428e4cd63dde97bac14b84dd146a5c00455e3 30-May-1995 rgrimes <rgrimes@FreeBSD.org> Remove trailing whitespace.
ethostbydns.c
ethostbyht.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
error.c
net_addr.c
so_addr.c
inkaddr.c
s_addr.c
es_comp.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
a20de0747bbf948879ad0eab8936baa3f2310e85 12-Apr-1995 wpaul <wpaul@FreeBSD.org> Add an ethers(3) man page.
akefile.inc
thers.3
3db0e33b6893dc9dc85f7e72a8e3bc83a8909bfa 02-Apr-1995 wpaul <wpaul@FreeBSD.org> Add ether_addr functions to libc. This seems to be the logical place
to put them. A man page is in the works.
akefile.inc
ther_addr.c
522e5e4d534ca03d5c37eee0e66cdff59d100de8 24-Mar-1995 ache <ache@FreeBSD.org> Sicnce this code shares the same fragment as gethostnamaddr:
Change strtok() to strsep(), cause memory corruption for all
programs which use strtok() too in the same time.
Fix potential NULL reference, depends of /etc/hosts.conf format
Fix the bug when service name fetched always from beginning of the line,
not from parsed token.
etnetnamadr.c
74c984e74d6e85a006418d318d5aa7b26abd8247 24-Mar-1995 ache <ache@FreeBSD.org> Change strtok() to strsep(), cause memory corruption for all
programs which use strtok() too in the same time.
Fix potential NULL reference, depends of /etc/hosts.conf format
Fix the bug when service name fetched always from beginning of the line,
not from parsed token.
ethostnamadr.c
48d35b4b93ee64793453e193c884843832ebfd94 20-Mar-1995 wpaul <wpaul@FreeBSD.org> At last! Modified __ivaliduser() to do the same kind of user/host validation
that everyone else does: you can now use +host/-host, +user,-user and
+@netgroup/-@netgroup in /etc/hosts.equiv, /.rhosts, /etc/hosts.lpd and
~/.rhosts. Previously, __ivaliduser would only do host/user matches,
which was lame. This affects all the r-commands, lpd, and any other
program/service that uses ruserok().

An example of the usefullness of this feature would be a hosts.equiv
file that looks like this:

+@equiv-hosts

Since the netgroup database can now be accessed via NIS, this lets you
set up client machines once and then never have to worry about them
again: all hosts.equiv changes can now be done through NIS. Once I
finish with getpwent.c, we'll be able to do similar wacky things
with login authentication too. (Our password field substitution
will finally be on par with everyone else's, and I'll finally be
able to fully integrate my FreeBSD machine into my network without
having to worry about the grad students sneaking into it when I'm
not looking. :)

Danger Will Robinson! I tested this thing every which way I could, but
Murphy's Law applies! If anybody spots a potential security problem with
the way my matching algorithm works, tell me immediately! I don't want
crackers snickering and calling me names behind my back. :)
cmd.c
1504867da7e0ae79c8e140fa173348cd341befef 01-Dec-1994 wollman <wollman@FreeBSD.org> In _gethostbydnsaddr(), force RES_RECURSE into _res.options. This is
incredibly obnoxious, but also makes inverse mappings work when the local
resolver is in a cache-only configuration. (Maybe this is actually
a bug in BIND?)
ethostbydns.c
68370522b61180c61814111e939fdec63f62d6bd 27-Oct-1994 rgrimes <rgrimes@FreeBSD.org> >Description:
While trying to figure out why rlogind wasn't working right for root,
I noticed that man wouldn't come back with a man page for iruserok, but
it would for ruserok. Checking the lib/net directory's Makefile.inc
file shows that the link to the rcmd man page just isn't getting
created.
>How-To-Repeat:
Do a 'man iruserok' and notihing will come back, where a 'man ruserok'
will.

Submitted by: Brian Moore <ziff@houdini.eecs.umich.edu>
Obtained from: NetBSD-bugs mailing list
akefile.inc
cmd.3
7c60a4347c7c992c0059dd04bad99a1f4bf79ca0 26-Sep-1994 wollman <wollman@FreeBSD.org> Use same configuration file, /etc/host.conf, for both gethost* and
getnet* configuration. (It's highly unlikely that you'd want to do
something different, and network lookups aren't common enough to justify
their own configuration file.)
etnetnamadr.c
88bee1e698eab6445fa919ef122394c263a018a3 26-Sep-1994 wollman <wollman@FreeBSD.org> Fixed YP networks map support.
etnetbynis.c
6f303e99351daee1b39170a6bd59677992df1da8 25-Sep-1994 pst <pst@FreeBSD.org> remove need for -DDEBUG from resolver code (conflict with db/hash)
akefile.inc
ethostbydns.c
etnetbydns.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
4f0d0da86d54d2621713e7d8ccfd0507888f348b 25-Sep-1994 pst <pst@FreeBSD.org> get* rework and new bind code
akefile.inc
ethostbydns.c
ethostbyht.c
ethostbynis.c
ethostnamadr.c
etnetbydns.c
etnetbyht.c
etnetbynis.c
etnetnamadr.c
es_comp.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
dc4fe996accf9ff5f0e1c9fa6e0f4b0f45316852 22-Sep-1994 pst <pst@FreeBSD.org> Make iso_addr's output conform to modern conventions for NSAP
representation. Original code by pst but ported in as part of
enhancements to BIND 4.9.2 and returned to Vixie.
so_addr.c
7ca8cf71da0aa32305b0f45ca0738b7cc8ac01e8 08-Sep-1994 csgr <csgr@FreeBSD.org> Based on fix from 1.1.5.1:
>From: jtk@atria.com (John T. Kohl)
in rcmd:
It calls select() with a hardcoded "number of file descriptors" argument
of 32, rather than computing it based on the sockets about which it
cares.

- Now we work out the nfds arg, and do some error checking
Submitted by: Geoff.
cmd.c
33e047d3b0c9cdbbe20730ae94cfa32d6de3a75a 28-Aug-1994 csgr <csgr@FreeBSD.org> Fix gethostbyaddr():
call _getdnsbyaddr() instead of _getdnsbyname() ;-)
Submitted by: Geoff
ethostnamadr.c
d20aae3469e2d3a7d4ad92e91cd3b06c0e17c742 09-Aug-1994 wollman <wollman@FreeBSD.org> Fixed typo.
ethostnamadr.c
004c5a34827fa735ae1159dc312425dac0b26695 09-Aug-1994 wollman <wollman@FreeBSD.org> Add (substantially re-written) support for /etc/host.conf, and reintegrated
1.1.5 support for YP, fixing a bug in 1.1.5 that prevented YP from ever
working reliably. (I'm amazed that there were no bug reports.)

IWBRNI someone could write a host.conf(5) manual page. Please look at
the code before doing so; this version is somewhat more flexible in the
format of its input.
ethostnamadr.c
e017c781cac0ce8879390a958837f07f3ae09f36 05-Aug-1994 wollman <wollman@FreeBSD.org> First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work. Still to be done: RPCand YP merge.
akefile.inc
8b1c40bc18615379af063dfafe0085ffa594da60 27-May-1994 rgrimes <rgrimes@FreeBSD.org> BSD 4.4 Lite Lib Sources
es_comp.c
es_debug.c
es_init.c
es_mkquery.c
es_query.c
es_send.c
be22b15ae2ff8d7fe06b6e14fddf0c5b444a95da 27-May-1994 rgrimes <rgrimes@FreeBSD.org> BSD 4.4 Lite Lib Sources
akefile.inc
yteorder.3
ethostbyname.3
ethostnamadr.c
etnetbyaddr.c
etnetbyname.c
etnetent.3
etnetent.c
etproto.c
etprotoent.3
etprotoent.c
etprotoname.c
etservbyname.c
etservbyport.c
etservent.3
etservent.c
error.c
net.3
net_addr.c
net_lnaof.c
net_makeaddr.c
net_netof.c
net_network.c
net_ntoa.c
so_addr.3
so_addr.c
inkaddr.3
inkaddr.c
s.3
s_addr.c
s_ntoa.c
cmd.3
cmd.c
ecv.c
esolver.3
end.c
ethostent.c
e043687c62ddb48f84fb579106c88fbbaf4c76a7 27-May-1994 rgrimes <rgrimes@FreeBSD.org> This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.