Commit Graph

346 Commits

Author SHA1 Message Date
Robert Drehmel
7cfcd02787 Put each function argument on its own line to keep lines shorter
than 80 columns.
2002-08-15 20:33:44 +00:00
Robert Drehmel
b7dbaf7b46 -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.
2002-08-14 20:40:35 +00:00
Ruslan Ermilov
e0fe2c62de mdoc(7) police: laundry. 2002-08-09 11:15:49 +00:00
Maxime Henrion
9e69d6b629 Remove an #include <syslog.h>. It's already included conditionally
above, as it should be.

Submitted by:	Olivier Houchard <cognet@ci0.org>
2002-08-02 11:58:48 +00:00
Hajimu UMEMOTO
2cbe834ad1 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
2002-07-25 08:08:30 +00:00
Hajimu UMEMOTO
f6074d745f - 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
2002-07-24 18:58:32 +00:00
Hajimu UMEMOTO
8071d8d70d Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex()
and if_freenameindex().

Obtained from:	KAME
MFC after:	2 weeks
2002-07-15 19:58:56 +00:00
Robert Drehmel
897ad22f04 Fix syntax error which occurred when LIBC_SCCS was defined. 2002-07-07 11:28:28 +00:00
Hajimu UMEMOTO
15e4dafc91 Make NI_WITHSCOPEID a default (always on), to synchronize
with recent 2553bis.

Obtained from:	KAME
MFC after:	3 weeks
2002-07-02 11:05:31 +00:00
Warner Losh
ecddb03f1e Remove two lines that were cvs merged that shouldn't have been. This
fixes the build.

Reported by: dillon.
2002-06-26 18:03:31 +00:00
Warner Losh
145ec10619 Remove two stray lines that snuck in the cvs merge 2002-06-26 14:18:36 +00:00
Jacques Vidrine
9a370b24b5 Initialize a pointer that was left uninitialized with the previous
commit.
2002-06-26 08:48:34 +00:00
Warner Losh
d6af58f572 Include more robust checking of end of buffer that more completely
plugs the hole.
2002-06-26 08:18:05 +00:00
Warner Losh
4cbd2472b3 Don't allow buffer overflow here either. 2002-06-26 06:31:06 +00:00
Warner Losh
fda8311189 Fix a minor last, minute issue that came in after I committed.
Noticed by: nectar
2002-06-26 06:23:22 +00:00
Warner Losh
4cf0747073 Avoid remote buffer overflow on hostbuf[].
Submitted by: joost Pol <joost@pine.nl>
2002-06-26 06:04:46 +00:00
Sheldon Hearn
68f8e47a04 Correct FreeBSD release of first appearance in the HISTORY section
(5.0 -> 4.6).
2002-06-06 10:51:25 +00:00
Alfred Perlstein
a82bbc730e Assume __STDC__, remove non-__STDC__ code.
Submitted by: keramida
2002-05-28 17:03:12 +00:00
Mike Barcroft
f605f8168e Document that <netinet/in.h> can also provide prototypes. Change
wording related to standards conformance.
2002-05-11 23:22:54 +00:00
SUZUKI Shinsuke
88ff5695c1 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
2002-04-19 04:46:24 +00:00
Hajimu UMEMOTO
7b0e82a919 Add awareness of an IPv6.
MFC after:	1 week
2002-04-15 18:45:20 +00:00
Jacques Vidrine
9368e99f25 Quoting log message for OpenBSD rev 1.7:
``Tack on MagniComp (BSD) license since this originally came from rdist.''

Obtained from:	OpenBSD
2002-04-15 12:46:07 +00:00
Ruslan Ermilov
7c1d25d6c2 Fix style of ether_ntoa(). 2002-04-08 07:51:10 +00:00
Ruslan Ermilov
dab8ffaac3 Polish previous revision. 2002-04-06 09:54:17 +00:00
Matthew Dillon
87bd4d6ceb Fix ether_ntoa() to generate the %02x format people expect, instead of %x,
for the ethernet address.

MFC after:	1 day
2002-04-06 05:21:57 +00:00
Hajimu UMEMOTO
3d246faa5a When _kevent() returns with errno = EINTR and timeout is not
exceeded, it should be falldown to next_ns.

MFC after:	1 week
2002-04-01 16:09:45 +00:00
David E. O'Brien
1114a754ed Fix the style of the SCM ID's.
I believe have made all of libc .h's as consistent as possible.
2002-03-22 23:42:05 +00:00
David E. O'Brien
333fc21e3c Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
David E. O'Brien
1372519b15 Remove multi-line __P() usage. 2002-03-22 09:22:15 +00:00
David E. O'Brien
c05ac53b8b Remove __P() usage. 2002-03-21 22:49:10 +00:00
David E. O'Brien
8fb3f3f682 Remove 'register' keyword. 2002-03-21 18:49:23 +00:00
David E. O'Brien
68a6b5e1ba Remove trailing characters from #endif.
Actually this #endif is not needed, so remove leading characters also.
2002-03-15 09:58:45 +00:00
Eric Melville
ee6c974de4 Add a carriage return to each function declaration, and make use of ID tag
macros.

MFC after:	1 day
2002-03-06 03:26:11 +00:00
Mike Barcroft
fd8e4ebc8c 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
2002-02-18 20:35:27 +00:00
Alfred Perlstein
1c71deff79 balance parens.
Submitted by: mbr
2002-02-05 23:56:29 +00:00
Alfred Perlstein
8d6301358e 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
2002-02-05 23:43:43 +00:00
Peter Pentchev
b484faa5e0 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
2002-02-01 08:35:16 +00:00
Ruslan Ermilov
491a842962 yp(4) -> yp(8).
PR:		docs/30797
2002-01-14 16:59:03 +00:00
Hajimu UMEMOTO
676e98714d - 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
2001-12-26 21:21:10 +00:00
Ruslan Ermilov
edd2da71b2 Start using .St macro for POSIX.1-2001. 2001-12-08 19:06:23 +00:00
Mike Barcroft
de2656d0ed 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
2001-12-01 03:43:01 +00:00
Crist J. Clark
2d69bc9b8e 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
2001-11-29 09:44:33 +00:00
Crist J. Clark
e1a5ca24ca 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
2001-11-29 00:56:45 +00:00
Bruce Evans
ac8e56a7f9 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.
2001-11-11 02:48:09 +00:00
Ruslan Ermilov
e117e7a5b0 - Put missing prototype for rcmd() in <unistd.h>.
- Clean up the manpage.
- style(9) rcmdsh.c.

Committed from:	BSDCon/EU 2k+1 terminal room
2001-11-09 15:19:25 +00:00
Bill Fenner
70982dca88 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.
2001-11-07 00:05:26 +00:00
Warner Losh
d45672120f 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
2001-10-23 06:22:15 +00:00
Jonathan Lemon
c479a8493c 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.
2001-10-17 20:08:15 +00:00
Ruslan Ermilov
943873e722 getnetbyaddr() should be serviced by the "networks" database. 2001-10-10 12:49:53 +00:00
Mike Barcroft
2815c1fd80 Don't mangle vendor ids to put them in __RCSID. Just ifdef all vendor
id cruft.

Submitted by:	bde
2001-10-09 16:40:04 +00:00