Commit Graph

686 Commits

Author SHA1 Message Date
itojun
cfbab92fdb use randomid(3). actually generate random ID for DNS queries (previous
fix was incomplete)
2003-09-09 22:16:58 +00:00
wiz
a2f146d519 Mention RFC 3493; inet_{ntop,pton} are in 1003.1-2001; move XNS5.2 to HISTORY.
Okayed by kleink.
2003-09-08 17:21:31 +00:00
wiz
47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
christos
cdf03491b8 rename exp to expo to avoid global shadowing warning. 2003-09-06 22:47:56 +00:00
itojun
08fc9c3284 move provos' copyright closer to res_randomid() 2003-09-06 11:46:32 +00:00
itojun
a970cdd909 bring in openbsd lib/libc/net/res_random.c for truely-random res_randomid(). 2003-09-06 11:40:52 +00:00
wiz
a24c4806d6 Nm -> Fn getnameinfo; grammar improvements; markup improvement;
all from jmc@openbsd, thanks.
2003-08-28 12:03:08 +00:00
wiz
520d0eab98 Bump date for CAVEATS; fix punctuation usage in one place;
drop trailing space; use \*[Am] instead of & for HTML generation.
2003-08-28 09:39:11 +00:00
itojun
e3a97c1624 use NI_NUMERICHOST for 2nd invocation 2003-08-28 01:49:30 +00:00
itojun
9de573eee1 add int error in CAVEAT 2003-08-28 01:46:45 +00:00
itojun
91c72951cb add CAVEATS section 2003-08-28 01:43:14 +00:00
agc
eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
salo
99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
tshiozak
8adfd9b778 make _DIAGNOSTIC happy. 2003-07-10 08:50:43 +00:00
wiz
9d37bb0f6b Va Sq -> Sq Va so both work. 2003-07-01 10:17:36 +00:00
kleink
5a44432bf1 Sprinkle some restrict. 2003-06-30 15:14:17 +00:00
itojun
7a5741651c - sync up MLD declaration with RFC3542 (s/MLD6/MLD/)
- routing header declaration with RFC3542
  (note: sizeof(ip6_rthdr0) has changed!)
  also, sync up with RFC2460 routing header definition (no "strict" source
  routing mode any more)

part of advanced API update (RFC2292 -> 3542).
2003-06-06 08:13:43 +00:00
itojun
e72a5afeb3 KNF. 2003-06-06 06:43:18 +00:00
itojun
6a95da7f05 bound copies 2003-05-17 01:36:03 +00:00
kleink
affdf0b300 Change conformance reference to 1003.1-2001; the reference to 1003.1g is
retained in HISTORY.  Spotted by Thomas Klausner.
2003-05-15 10:16:36 +00:00
wiz
ccc85581a5 Point to IPC tutorials in /usr/share/doc/psd, update names, and add authors.
Bump date.
Suggested by kleink.
2003-05-15 10:13:53 +00:00
uebayasi
385286938f Typo; from Onno van der Linden <o dot vd dot linden at quicknet dot nl>. 2003-05-10 08:51:54 +00:00
itojun
ece2a37389 fill ai_canonname field for numeric hostname, by the given hostname.
folows new recommendation in RFC3493
2003-05-08 05:30:53 +00:00
bjh21
e3f0868ef4 ANSIfy, since I'm in the area. 2003-05-05 21:35:40 +00:00
bjh21
306b20c934 Handle struct in_addr with proper respect, rather than assuming we can
make one by casting in in_addr_t *.  This has the pleasant side-effect
of making the machine code shorter, at least on ARM.
2003-05-05 20:12:23 +00:00
bjh21
e6ad10a0b6 Remove some lint-pacification that's not necessary now that the signature of
inet_makeaddr() is correct.
2003-05-05 20:04:04 +00:00
bjh21
b8df43c967 Delint last change, reducing size of several variables. 2003-05-05 19:54:59 +00:00
bjh21
2c2e44766b Delint last change (change a variable from unsigned long to in_addr_t).
Remove "register" at the same time.
2003-05-05 19:53:29 +00:00
wiz
fe160e31c2 No leading zero in Dd argument. 2003-05-05 17:16:20 +00:00
bjh21
83939562ef Document signature changes to inet_addr() and friends. 2003-05-05 14:04:50 +00:00
bjh21
77de1304d5 Fix the signatures of inet_addr(), inet_lnaof(), inet_makeaddr(), inet_netof(),
and inet_network() to match XNS and (where applicable) POSIX.  This is largely
just the replacement of unsigned long with in_addr_t.

This constitutes a small ABI change on sh5, but scw (sh5 portmaster) thinks
that both the users of that port will be able to cope.  kleink claims the
change is ABI-neutral on other LP64 ports, and it's a no-op on ILP32 ports.
Hence, I'm doing it this way and avoiding the whole __RENAME dance.
2003-05-05 13:56:13 +00:00
wiz
3ca9503cd5 Misc. fixes from jmc@openbsd. 2003-05-03 19:11:31 +00:00
itojun
dc5aee069b english grammer. by Jason McIntyre via kame 2003-04-30 06:30:48 +00:00
wiz
48ceee3140 Bump date for last. 2003-04-29 12:39:20 +00:00
bjh21
e94b259c46 <arpa/inet.h> no longer has any prerequisite headers, so don't pretend
it does.
2003-04-29 12:20:29 +00:00
simonb
6312e6abc3 Add a missing full stop, join to short lines. 2003-04-23 07:33:36 +00:00
wiz
472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
perry
9b2c6bd3d7 preceeded->preceded, desciptor->descriptor from Igor Sobrado, PR misc/19814 2003-03-31 18:38:11 +00:00
perry
8e85db615f millenia->millennia from Igor Sobrado PR misc/19814 2003-03-31 18:35:38 +00:00
ross
c73965d14b LP64 warnings 2003-03-21 03:07:40 +00:00
itojun
b5dda3e238 From: "Jason L. Wright" <jason@thought.net>
The man page for getaddrinfo() and RFC2553 says it should return EAI_NONAME
for the case where hostname != NULL, hostname is not a numeric string and
ai_flags has the AI_NUMERICHOST bit set.  Instead, it returns EAI_NODATA
for this case.  The diff below makes it return EAI_NONAME for this case.

This is why ntpq and ntpdc from ntp-4.1.74 can't resolve hostnames,
but work fine with numeric strings like ::1 or 127.0.0.1.
2003-03-17 23:10:25 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
wiz
4824190751 transmission, not transmition. 2003-01-06 13:17:01 +00:00
itojun
233424cdc2 make sure to bound string operation by strlcpy
(there are bunch of "strcpy is safe" comments, i think we should change them
to strlcpy as much as possible)
2002-11-17 20:49:33 +00:00
itojun
ca7918fced whitespace 2002-11-17 20:48:44 +00:00
itojun
9134efabd0 use strlcpy where it is more appropriate. 2002-11-17 01:51:24 +00:00
itojun
095b03757d pull in changes in http://www.isc.org/products/BIND/patches/bind4910.diff
- better error check on __dn_skipname
- more strict reverse lookup handling
2002-11-14 02:14:43 +00:00
itojun
d7ec2d5997 fix remote buffer overrun. from openbsd tree (1997). 2002-11-13 00:21:05 +00:00
thorpej
0e69571cc2 Avoid strict alias warning. 2002-11-11 20:24:38 +00:00
thorpej
de792f2457 Fix signed/unsigned comparison warnings. 2002-11-11 19:49:00 +00:00
thorpej
4747ad6ea7 Fix signed/unsigned comparison warnings. 2002-11-11 19:25:38 +00:00
thorpej
1289029f10 Fix signed/unsigned comparison warnings. 2002-11-11 17:56:11 +00:00
thorpej
585ad39ac1 Fix signed/unsigned comparison warnings. Catch error conditions
from snprintf().
2002-11-11 17:10:11 +00:00
thorpej
fd128e9fb6 Fix signed/unsigned comparison warnings. 2002-11-11 16:50:34 +00:00
thorpej
20b98814a9 Fix signed/unsigned comparison warnings. 2002-11-11 01:12:04 +00:00
wiz
091f48096d writable instead of writeable. By Adrian Mrva. 2002-10-02 10:57:55 +00:00
wiz
3e44f1568a Correct spelling of "constraints". Noted by Adrian Mrva. 2002-10-02 10:53:50 +00:00
wiz
8f0a2a607c function with n. 2002-10-02 10:48:35 +00:00
tron
377e179dcb Use "const" for all input parameters of ethers(3) functions. 2002-09-16 19:25:30 +00:00
wiz
604d7cb2eb implemented, not implementated; arbitrary, not arbritrary. 2002-09-04 01:07:12 +00:00
onoe
a5fc25f65e Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value. 2002-08-28 02:37:09 +00:00
itojun
006281a1e2 kill register decl 2002-08-27 23:47:07 +00:00
itojun
62f36ff8e2 allocate 64K recieve buffer for DNS responses. 2002-08-27 08:50:49 +00:00
itojun
36e473ebb2 off-by-one. PR 18049
correct snprintf() return value handling in another place.
2002-08-23 16:10:42 +00:00
itojun
949583590f drop AAAA reply with IPv4 mapped address. sync w/kame
draft-itojun-v6ops-v4mapped-harmful-00.txt
2002-08-22 16:32:14 +00:00
itojun
4005a5250f set h_errno properly if internal string manipulation fails. 2002-08-16 21:54:00 +00:00
itojun
44ca8f4da1 use sizeof, avoid duplicated use of MAXDNAME 2002-08-16 13:59:39 +00:00
itojun
1173373b45 be more picky about size arg 2002-08-16 12:23:20 +00:00
itojun
1e1a07972c lint clean 2002-08-16 12:20:19 +00:00
itojun
bb80ac654a avoid sprintf. use snprintf with picky error traps. 2002-08-16 12:18:06 +00:00
itojun
0de70db9cd check for pointer overwrap 2002-08-16 12:10:37 +00:00
itojun
b51bffa186 correct cases with zero in the middle
(0x00ff00ff should be "0.255.0.255", not "255.255")
2002-08-16 12:05:01 +00:00
itojun
0b6566bcda avoid sprintf. use snprintf. simplify cases where 1st arg is 0. 2002-08-16 12:03:41 +00:00
itojun
c6a3499c08 use snprintf. don't duplicate MAXDNAME (use sizeof). 2002-08-16 11:53:19 +00:00
itojun
90a8853f46 use strlcat 2002-08-16 11:49:57 +00:00
itojun
f425242dc9 fix weird indent for comment lines 2002-08-16 11:48:25 +00:00
itojun
c5a4255163 eliminate sprintf. use snprintf.
XXX loc_ntoa should be changed to take additional size_t as arg
2002-08-16 11:45:55 +00:00
itojun
5c323232e7 eliminate sprintf, use snprintf. check strlcat error. 2002-08-16 11:30:28 +00:00
itojun
3452fa16c4 be more picky about string buffer manipulation. hints from freebsd 2002-08-16 07:39:44 +00:00
itojun
0cb9a97393 lint clean 2002-08-09 04:29:29 +00:00
itojun
cb4277ff85 unifdef for auditability. 2002-08-09 04:26:07 +00:00
soren
69e08c5b46 Make SYNOPSIS accurate about required headers.
Fixes PR lib/11021 from wiz.
2002-08-06 16:08:47 +00:00
itojun
463bfdcd98 use strlcpy where appropriate 2002-08-02 07:50:35 +00:00
itojun
0c0bf329c4 query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152. 2002-07-29 10:01:58 +00:00
wiz
18c66da5b7 Two typos. 2002-07-18 10:41:17 +00:00
itojun
a4cf77c9bb pacify lint. from he@netbsd 2002-07-01 22:05:08 +00:00
itojun
754f8759a4 lint clean. from martin husemann 2002-07-01 21:05:56 +00:00
itojun
9922c987a9 make more pedantic check on strtoul. from deraadt, sync w/kame 2002-07-01 07:42:49 +00:00
itojun
28735a6a17 correct port range check. from deraadt, sync w/kame, diff sent to bind-bugs 2002-06-29 12:23:10 +00:00
itojun
0c63dd3cf2 correct %d/%u mixup. 2002-06-27 10:22:07 +00:00
itojun
0c4fb2c7e1 correct DIAGASSERT 2002-06-26 09:39:48 +00:00
itojun
9cdbc86d39 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.

this fix is NOT critical.
2002-06-26 06:00:26 +00:00
itojun
092b3bc66a avoid remote buffer overrun on hostbuf[]. From: Joost Pol <joost@pine.nl>
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.

this fix is critical.
2002-06-26 06:00:07 +00:00
itojun
fb40d48413 do not pass uninitialized variable to nsdispatch(). 2002-06-26 02:40:46 +00:00
itojun
9ed8a29685 refer nsswitch.conf(5). From: Jim Bernard <jbernard@mines.edu> 2002-06-15 21:49:18 +00:00
wiz
e3e4fede44 __STDC__ is always defined on NetBSD. 2002-05-26 14:48:19 +00:00
tron
f2679ef4e3 Revert last change after protoype of getnameinfo(3) has been changed back. 2002-05-22 14:42:37 +00:00
kleink
a24f74d0fd Turn the flags argument to getnameinfo(3) back into an int (from unsigned
int); this is consistent with RFC2553, the current draft-ietf-ipngwg-
rfc2553bis-05 and the majority of deployed implementations.

Also, there is an effort under way to have this changed back to int in
XBD6/XSH6, XNS, and POSIX-2001 TC1.
2002-05-22 09:42:37 +00:00
itojun
6a3445b8a3 be picky about string manipulation in reverse lookups 2002-05-22 02:39:15 +00:00
itojun
b617695b31 use strlcpy, not strcpy 2002-05-22 01:52:24 +00:00
itojun
449d6afcab style 2002-05-18 00:07:28 +00:00
itojun
c37fca45ce do not reverse-lookup scoped IPv6 address. it does not make sense as
there's no way to give scope identifier.  sync w/kame
2002-05-17 22:40:31 +00:00
kleink
3f6b0b61a5 <netdb.h> doesn't need prerequisite headers. 2002-05-15 08:53:42 +00:00
thorpej
2afd826926 Delint after getaddrinfo(), etc. changes. 2002-05-14 23:58:08 +00:00
kleink
ba77dc646c XNS5.2/POSIX-2001: change the size argument to inet_ntop from size_t to
socklen_t.
2002-05-14 18:57:31 +00:00
kleink
4b77e72e94 More XNS5.2/POSIX-2001 alignment: change the flags argument to
getnameinfo() from int to unsigned int.
2002-05-14 14:35:36 +00:00
kleink
485febee55 Align with XNS5.2/POSIX-2001: change hostlen and servlen arguments to
getnameinfo() from size_t to socklen_t.
2002-05-14 14:31:05 +00:00
kleink
dddf6754e0 ai_addrlen: size_t -> socklen_t. 2002-05-14 13:50:21 +00:00
kleink
06d36d9eee struct addrinfo.ai_addrlen used to be a size_t, per RFC 2553.
In XNS5.2, and subsequently in POSIX-2001 and draft-ietf-ipngwg-rfc2553bis-02
it was changed to a socklen_t.

To accomodate for this while preserving binary compatibility with the
old interface, prepend or append 32 bits of padding, depending on
the (LP64 data model) architecture's endianness.

This should be deleted the next time the libc major number is
incremented.
2002-05-14 13:45:13 +00:00
kleink
4396915999 Rip out <sys/types.h> and <sys/socket.h> inclusions: there are no
pre-requisites for <netdb.h>.
2002-05-10 22:26:59 +00:00
kleink
c88f6e9e24 In the examples, initialize struct addrinfo explicitly to either 0 or a
NULL pointer; from der Mouse in PR lib/16634.
2002-05-10 22:11:24 +00:00
simonb
fdf099ea04 Remove a check for a u_int8_t variable being greater than 255. 2002-05-05 08:28:47 +00:00
groo
fbac9d8372 botched strncpy -> strlcpy
from xs@kittenz.org
2002-04-16 19:17:17 +00:00
groo
1e880d776e botched strn* -> strl*
from xs@kittenz.org
2002-04-16 19:16:22 +00:00
groo
6bf409aa5b Minor KNF + proper end of string detection in read_config_file()
Inspired by xs@kittenz.org
2002-04-16 19:12:40 +00:00
thorpej
9c33b55e7c Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

	* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
	  of the infratsructure (libraries, support programs, etc.)

	* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
	  building of support for using the corresponding API
	  in various libraries/programs that can use it.

As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
lukem
247856f4d7 Fixes from Bill Fenner <fenner@research.att.com> for problems he found
in FreeBSD's port of this nsswitch code:

- Don't ignore unknown characters.  The old lexer would treat
	hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns
  exactly the same as
	hosts: files dns

- Recover from errors by looking for the end of a line.  This means
  that having a syntax error near the top of the file doesn't prevent
  a service at the bottom of the file with no syntax error from being
  looked up.

Thanks Bill!
2002-03-19 00:04:09 +00:00
sommerfeld
3e18fc136f More ipip references 2002-03-04 15:15:39 +00:00
augustss
8f814a0ad6 Make this lintable so we can build libc again. 2002-02-14 22:10:56 +00:00
martin
63ad589924 Fix a LP64 problem. Patch from Minoura Makoto in PR lib/15596. 2002-02-14 19:53:00 +00:00
ross
9856438e91 generate & symbolically 2002-02-07 09:24:04 +00:00
ross
814f296b77 Generate <>& symbolically. 2002-02-07 07:00:09 +00:00
lukem
4d32f2f102 - be consistent about using "u_char" instead of "unsigned char"
- delint
2001-12-09 01:17:36 +00:00
lukem
686d221d91 Implement AF_INET6 back-ends for inet_net_ntop() and inet_net_pton(), from
the BIND 8.3.0-T2A sources.  Thanks to Paul Vixie for the pointer to it.
2001-12-08 12:06:12 +00:00
lukem
32a96141e4 ansi knf 2001-12-08 11:47:04 +00:00
gmcgarry
d28c8e0f2a Add .Os 2001-12-08 04:52:01 +00:00
lukem
d62c475930 ansi knf. remove unused cruft 2001-12-01 04:43:24 +00:00
ross
28e17cffb8 Delete the old BUGS section entry:
> On the VAX bytes are handled backwards from most everyone else in
> the world.  This is not expected to be fixed in the near future.

Multiple levels of irony there...
2001-11-29 22:55:57 +00:00
itojun
3c0303a158 sync with reality; scope identifier comes with the result even without
NI_WITHSCOPEID.
2001-11-15 06:46:33 +00:00
itojun
6c9440f374 make NI_WITHSCOPEID a default (always on), to synchronize with recent 2553bis.
sync with kame.
2001-11-15 04:49:01 +00:00
itojun
72a8eddd96 synchronize with kame better. get rid of #defines for ENI_xx. 2001-11-15 04:38:32 +00:00
lukem
50f5afd52e fix WARNS=2 (-Wshadow) warnings 2001-11-04 13:57:29 +00:00
wiz
2a5b4efdf5 sort sections 2001-10-22 23:47:01 +00:00
kleink
bec52f0825 Add a reference to recv(2) as well. 2001-10-22 22:29:39 +00:00
kleink
d4c0d0f2a2 Add a sockatmark(3), the 1003.1g wrapper around SIOCATMARK. 2001-10-22 17:53:43 +00:00
bjh21
b12979794e Put back AF_LINK support. This time, all the new code passes lint(1), modulo
bin/14175.  It should pass lint on a native i386 build, but I can't test that.
2001-10-06 13:59:41 +00:00
bjh21
5a7a518e05 Remove AF_LINK support. It generates lint warnings, and hence won't compile
on i386.  I'll re-commit once I've understood and fixed the problems.
2001-10-05 20:51:19 +00:00
itojun
84bfe490e4 make it at least compile (there's no /usr/include/net/if_ieee1394.h exist).
avoid overrun with snprintf.  be careful about snprintf return value.
2001-10-05 01:39:38 +00:00
bjh21
5b533f601d Extend getnameinfo() to support AF_LINK sockaddrs. The intention is that
anything that wants to print a link-layer address should go through here,
rather than re-inventing the wheel.
2001-10-04 23:09:04 +00:00
wiz
cb19ecf339 Actually, we don't have libhesiod -- the functions are in libc.
Noted by Gregory McGarry.
2001-10-04 11:27:19 +00:00
wiz
104fe43050 mdoc'ify. 2001-09-16 15:53:03 +00:00
wiz
97ff145f62 Sort sections, sort SEE ALSO, and misc. fixes. 2001-09-16 02:54:17 +00:00
wiz
e7560d5642 Boring whitespace fixes. 2001-09-16 02:23:09 +00:00
itojun
5996ba4042 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-02.txt>.
sync with kame.
2001-09-13 11:05:02 +00:00
itojun
9fe945f2fe sync argument/return type of [hn]to[nh][ls] to XNET 5.2 (uint{16,32}_t).
as discussed on tech-net.
2001-08-22 07:42:07 +00:00
itojun
cba884a178 cope with sa_len < sizeof(struct sockaddr).
From: Patrik Lindergren <patrik@datacom.nu>
sync with kame
2001-08-20 02:33:49 +00:00
itojun
6cc1136ae1 use snprintf, not sprintf. sync with kame. 2001-08-20 02:33:31 +00:00
itojun
511e898dc2 snprintf return value audit. inspired by deraadt 2001-08-19 01:37:39 +00:00
itojun
908c009e33 there's no host.conf in netbsd. pointed out by smb 2001-08-05 18:09:03 +00:00
itojun
879d773221 make sure we do not touch *pp outside of parts[4]. 2001-07-22 15:16:18 +00:00