1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00
Commit Graph

33 Commits

Author SHA1 Message Date
deraadt
e87170bba9 Stop including <sys/param.h> from <netdb.h>. Portable software must either
include <sys/param.h> (to operate in legacy mode) or if it wishes to operate
in the POSIX world use <limits.h>
ok guenther millert doug naddy
2015-01-18 20:29:31 +00:00
sperreault
20149d178a Implement AI_ADDRCONFIG
This is a getaddrinfo() flag that is defined thusly in RFC 3493:

   If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be
   returned only if an IPv4 address is configured on the local system,
   and IPv6 addresses shall be returned only if an IPv6 address is
   configured on the local system.  The loopback address is not
   considered for this case as valid as a configured address.

      For example, when using the DNS, a query for AAAA records should
      occur only if the node has at least one IPv6 address configured
      (other than IPv6 loopback) and a query for A records should occur
      only if the node has at least one IPv4 address configured (other
      than the IPv4 loopback).

The flag is set by default when hints is NULL.

ok Eric Faurot, Jason McIntyre
2014-04-28 21:38:59 +00:00
guenther
de9f3fadcd Improve POSIX/SUS compliance of <netdb.h>, <sys/socket.h>, and <sys/un.h>.
Much ports testing of various versions by naddy@ and jasper@
ok matthew@, miller@
2012-09-15 00:47:08 +00:00
deraadt
95c1c14110 net_addrcmp() dies. found out to be a horrific function by eric
ok guenther
2012-01-17 02:33:20 +00:00
sobrado
0742bdbf96 fix typos; while here, improve spacing in comments.
changes to libevent and zlib headers sent to the upstream maintainers.

ok jmc@ (for typos), millert@
2011-07-07 14:25:15 +00:00
matthew
f98b7d8494 Add AI_FQDN flag to getaddrinfo(3). Prompted by discussions with djm@
about cert checking in OpenSSH.  Man page wording tweaks thanks to
jmc@.

ok henning@, jmc@; positive feedback from djm@, ajacoutat@

Committing now to reuse guenther@'s libc minor bump instead of
cranking it again, as suggested by deraadt@.
2011-04-05 00:46:06 +00:00
jasper
ab0c76cf9a - define EAI_OVERFLOW, as per IEEE Std 1003.1-2001(Interpretation #13)
hint from claudio@, ok millert@
2009-06-02 16:47:50 +00:00
jacekm
ce40aaaee9 fix confusing comment; ok krw@ 2009-05-07 16:32:53 +00:00
millert
52a0e6034e First step in include files overhaul. Use __FOO_VISIBLE (as defined
in sys/cdefs.h) instead of _FOO_SOURCE.  Also fix several namespace
pollution issues, including the byte order defines.  OK deraadt@
2005-12-13 00:35:22 +00:00
millert
674bddc6d3 Make gethostbyaddr() prototype match POSIX. This means len is now
unsigned but there is no ABI change.  OK deraadt@
2005-06-08 18:32:32 +00:00
millert
6de6e2769b gai_strerror() should return const char *; OK deraadt@ 2004-12-20 22:35:32 +00:00
itojun
d23920d9af remove NI_WITHSCOPEID 2004-11-17 03:57:53 +00:00
millert
e3a1e9bf34 Change return value of reentrant getproto* and getserv* to match the
IBM/Digital API.
2004-10-25 03:09:01 +00:00
millert
71a18e7f07 Reentrant versions of getprotoent(3) and getservent(3). Adapted from
changes in NetBSD by Christos.  OK otto@
2004-10-17 20:24:23 +00:00
itojun
70595f11fa implement RFC3493 AI_NUMERICSERV. tedu ok 2004-04-14 07:06:15 +00:00
millert
e33d3bd3b8 Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.
2003-06-02 19:34:12 +00:00
deraadt
82fb79371c compatiblity -> compatibility
decriptor -> descriptor
authentciated -> authenticated
transmition -> transmission
2002-06-03 12:14:30 +00:00
millert
f3c3a9c6df Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree) 2002-02-17 19:42:18 +00:00
millert
c72b5b24e1 Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically. 2002-02-16 21:27:05 +00:00
jakob
8f429fc2a3 add getrrsetbyname(3) - API to retrieve arbitrary DNS records 2001-08-06 14:40:47 +00:00
deraadt
57d692be8f repair copyright notices for NRL & cmetz; cmetz 2001-06-05 02:38:05 +00:00
itojun
428596e954 change ai_addrlen to socklen_t. now it conforms to
draft-ietf-ipngwg-rfc2553bis-03.txt.  backward compatibility concern:
- should be safe to change signed to unsigned, as we never return
  negative value.
- sizeof(int) is 4 for all archs, so there's no size change with socklen_t
  (= u_int32_t)

commented by deraadt.
2001-02-21 15:12:00 +00:00
espie
7772dd168e Remove parameter names in prototypes (always a bad idea) 2000-10-04 22:54:23 +00:00
itojun
affbb987d9 correct type of 2nd argument to meet RFC2553. (this should raise no ABI
problem due to type promotion).  PR 1228.
2000-05-15 10:50:39 +00:00
itojun
87af116515 revise extended scoped address format support. delimiter and the order
is changed, based on discussion in ipngwg scoped address cabal.
past code:	fe80::1@de0
now:		de0%fe80::1
this will be in sync with next extended address format proposal
(which should be final - I don't want to make this kind of change again).
2000-02-09 12:22:08 +00:00
itojun
92f92416a7 replace NRL get{addr,name}info with KAME get{addr,name}info.
removed functionality:
	new code will not return AF_LOCAL addrinfo struct.
added funtionality:
	SOCK_RAW is permitted as ai_socktype (no servname allowed).
	draft-ietf-ipngwg-scopedaddr-format-00.txt
1999-12-30 08:54:20 +00:00
deraadt
2cb1ea9d95 proto net_addrcmp() 1999-07-03 18:14:51 +00:00
cmetz
bc4c5135fc Added some protocol independent interfaces (supposedly IPv6 support APIs, but
ones that are useful for all protocols, not just IPv6).
1999-06-23 21:55:28 +00:00
deraadt
85977e3181 getaddrinfo() info prototypes and such; cmetz 1999-06-05 23:47:07 +00:00
millert
5290f10fc1 Use in_addr_t not u_long. 1997-04-05 20:58:28 +00:00
downsj
1231c44100 BIND 4.9.5 includes. 1997-03-13 19:11:49 +00:00
dm
1ddd5cc1d5 netbsd: bind 4.9.3 1996-02-19 19:53:13 +00:00
deraadt
df930be708 initial import of NetBSD tree 1995-10-18 08:37:01 +00:00