Hajimu UMEMOTO
3a0b3b6739
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
2006-03-01 15:53:49 +00:00
Daniel Eischen
fc9ae54dca
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.
2006-02-27 22:08:16 +00:00
Hajimu UMEMOTO
12d96fe63f
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
2006-02-26 05:44:21 +00:00
Hajimu UMEMOTO
5ecccefb4a
- 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
2006-02-24 16:53:42 +00:00
Ruslan Ermilov
49e5b98f5a
Fix inet6_opt_get_val() prototype.
2005-11-23 16:07:54 +00:00
Ruslan Ermilov
c48648d2c1
Add missing includes.
2005-11-23 10:49:07 +00:00
Hajimu UMEMOTO
4a58c5f5a3
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
2005-11-15 03:40:15 +00:00
Stefan Farfeleder
d8f77b4529
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
2005-08-20 07:59:13 +00:00
Poul-Henning Kamp
3d86554c20
Respect the YES_HESIOD build variable.
2005-08-06 16:53:55 +00:00
Giorgos Keramidas
6fb9b618f5
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.
2005-07-31 03:30:48 +00:00
Hajimu UMEMOTO
5495564735
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
2005-07-27 14:33:36 +00:00
Hajimu UMEMOTO
85a71a15c8
Remove padding for ABI compatibility of ai_addrlen member
...
from struct addrinfo. This change break ABI compatibility
on 64 bit arch.
2005-07-22 18:21:28 +00:00
Hajimu UMEMOTO
d84e21303c
refer RFC 3542 rather than RFC 2292bis.
...
Submitted by: Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from: KAME
2005-07-19 18:13:58 +00:00
Hajimu UMEMOTO
d5cbe1abb0
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
2005-07-19 18:09:44 +00:00
Ruslan Ermilov
48856b0042
Markup fixes.
...
Approved by: re
2005-06-16 19:01:07 +00:00
Ruslan Ermilov
f789cb8293
Assorted markup fixes.
...
Approved by: re
2005-06-15 19:04:04 +00:00
Jacques Vidrine
a8e0b2e8ab
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.
2005-06-10 20:52:36 +00:00
Hajimu UMEMOTO
360a23ab31
reflect type change of n_net and getnetbyaddr(3).
2005-06-03 04:44:54 +00:00
Hajimu UMEMOTO
ad0fab44e2
- 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
2005-06-03 03:32:06 +00:00
Hajimu UMEMOTO
d6fd3ed8ab
reduce cast.
...
MFC after: 1 week
2005-05-27 20:44:57 +00:00
Hajimu UMEMOTO
036ae3dd79
- 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
2005-05-15 20:15:15 +00:00
George V. Neville-Neil
fd57e549e0
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.
2005-05-14 19:43:10 +00:00
Hajimu UMEMOTO
946e41f142
raise readability bit.
2005-05-13 17:56:53 +00:00
Hajimu UMEMOTO
f8997ca2f4
free ypbuf only when yp_match() succeed.
2005-05-13 17:30:03 +00:00
Hajimu UMEMOTO
4f10131848
NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
...
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
2005-05-13 16:31:11 +00:00
Hajimu UMEMOTO
1ccfa322aa
fix signed/unsigned comparison warnings.
...
Obtained from: NetBSD
2005-05-03 16:13:31 +00:00
Hajimu UMEMOTO
943db5a2ab
the 3rd argument of getsockname() should be socklen_t*.
...
Submitted by: stefanf
2005-05-02 04:43:32 +00:00
Hajimu UMEMOTO
f468e837a1
oops, we don't need previous change.
2005-05-01 12:37:12 +00:00
Hajimu UMEMOTO
6bd1d1a192
make it compilable without YP definition.
2005-05-01 12:08:57 +00:00
Hajimu UMEMOTO
8592d23a9f
don't see RES_USE_INET6 when called from getipnodeby*().
2005-05-01 07:39:45 +00:00
Hajimu UMEMOTO
e84892eb74
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.
2005-04-30 20:07:01 +00:00
Hajimu UMEMOTO
6964622dd0
handling RES_USE_INET6 better.
2005-04-30 19:28:31 +00:00
Hajimu UMEMOTO
e4f846efec
_ht_gethostbyaddr didn't handle RES_USE_INET6 correctly.
2005-04-30 18:46:27 +00:00
Hajimu UMEMOTO
e692b6186a
_gethostbynisname() didn't support RES_USE_INET6.
2005-04-30 18:37:35 +00:00
Hajimu UMEMOTO
40ca152d15
_ht_gethostbyname didn't handle RES_USE_INET6 correctly.
2005-04-30 17:01:18 +00:00
Hajimu UMEMOTO
2c08ac2b38
- 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
2005-04-29 19:55:23 +00:00
Hajimu UMEMOTO
86726f325b
NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.
2005-04-29 17:36:54 +00:00
Hajimu UMEMOTO
49e0283df8
our get{addr,name}info() is considered thread-safe.
2005-04-29 14:37:51 +00:00
Hajimu UMEMOTO
0d389e7212
we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead.
2005-04-29 12:01:36 +00:00
Hajimu UMEMOTO
850bc9af6b
sync _map_v4v6_host*() with bind9's. it treats align better bit.
...
Obtained from: BIND9
2005-04-28 18:52:40 +00:00
Hajimu UMEMOTO
b8ab0f4506
we don't need mutex lock to call _gethostbynis*(), anymore.
2005-04-28 18:21:11 +00:00
Hajimu UMEMOTO
aa2f4ec72a
make gethostby*() thread-safe.
2005-04-28 18:03:43 +00:00
Hajimu UMEMOTO
7b671d902b
_gethostbynis{addr,name}() can handle an IPv6, now.
2005-04-28 17:44:44 +00:00
Hajimu UMEMOTO
a2a775011c
make getnetby*() thread-safe.
2005-04-28 15:32:55 +00:00
Hajimu UMEMOTO
bcb131aa3c
hide implementation specific internal functions from netdb.h.
...
it is needed to make get{host,net}by*() thread-safe.
2005-04-27 19:12:57 +00:00
Hajimu UMEMOTO
b190ee6140
our get{proto,serv}by*() use a thread-specific data space.
2005-04-26 18:04:09 +00:00
Hajimu UMEMOTO
72572cc6ea
add IPv6 awareness for NIS query of gethostby*().
...
Inspired by: NetBSD
2005-04-26 14:55:47 +00:00
Hajimu UMEMOTO
a72b0131c9
ensure parsing numeric address before any host query.
...
Inspired by: NetBSD
2005-04-25 17:36:28 +00:00
Hajimu UMEMOTO
4801b1f131
remove unused variable.
2005-04-25 14:52:13 +00:00
Hajimu UMEMOTO
71d0cbb671
if last line didn't have trailing space, network address was also
...
treated as an alias.
2005-04-24 18:22:39 +00:00
Hajimu UMEMOTO
92b6f7be5a
- add getproto{byname,bynumber,ent}_r for internal use within libc.
...
- make getproto{byname,bynumber,ent} thread-safe.
2005-04-19 14:41:13 +00:00
Hajimu UMEMOTO
d7d66e8c85
- nuke deprecated and unused getnodeby(3).
...
- remove unused variable.
Obtained from: KAME
2005-04-19 12:28:17 +00:00
Hajimu UMEMOTO
a87b3988c9
rename the NIS related fields to have yp_ prefix.
...
Suggested by: delphij
2005-04-18 18:34:58 +00:00
Xin LI
ffe49790ef
Do not check whether a pointer is NULL, since free(3) already takes care of
...
this case.
Reviewed by: ume
2005-04-18 03:45:23 +00:00
Xin LI
6d44c5c74b
Fix build for !YP case.
...
BTW. Shall we change these fields to have yp_ prefix? That will make the
code easier to read.
2005-04-17 15:10:30 +00:00
Hajimu UMEMOTO
109e5709c0
libc-internal interfaces should have two underscores in front
...
of their names.
Pointed out by: das
2005-04-17 14:42:52 +00:00
Xin LI
5c83bb4912
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
2005-04-17 04:00:55 +00:00
Xin LI
f5d25e4900
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
2005-04-17 03:56:07 +00:00
Hajimu UMEMOTO
62e8b17d72
Now, our getservbyname(3) is thread-safe. So, we don't need
...
to protect it with mutex lock.
2005-04-15 18:15:12 +00:00
Hajimu UMEMOTO
96f79dca76
- add getserv{byname,byport,ent}_r for internal use within libc.
...
- make getserv{byname,byport,ent} thread-safe.
Reviewed by: gnn
2005-04-15 18:09:39 +00:00
Hajimu UMEMOTO
159d2a98c5
hostalias() is not thread-safe. So, introduce _res_hostalias()
...
and use it.
Obtained from: BIND9
2005-04-15 14:42:29 +00:00
Hajimu UMEMOTO
f35528f852
remove needless res_init() call.
...
Inspired by: NetBSD
2005-04-14 11:44:43 +00:00
Hajimu UMEMOTO
e8ffd81605
unbreak build without YP defined.
...
Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
2005-04-09 14:20:18 +00:00
Stefan Farfeleder
cf00abe993
Remove unused variables and assignments.
2005-04-08 21:24:23 +00:00
Hajimu UMEMOTO
2424b11851
- we are no longer shareing any resources to be locked between
...
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
2005-04-06 15:36:34 +00:00
Hajimu UMEMOTO
148b7ece93
separate gai_strerror(3) from getaddrinfo.c.
...
Requested by: phantom
2005-04-06 12:45:51 +00:00
Hajimu UMEMOTO
d7057edb15
make yp stuff re-entrant.
...
Obtained from: NetBSD
2005-04-05 18:25:23 +00:00
Hajimu UMEMOTO
78ebcde839
add missing mutex unlock.
2005-04-05 17:13:28 +00:00
Hajimu UMEMOTO
9def31dcd7
make _files_getaddrinfo() re-entrant.
...
Obtained from: NetBSD
2005-04-04 19:45:27 +00:00
Hajimu UMEMOTO
0fbf0979c8
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.
2005-04-02 08:18:33 +00:00
Simon L. B. Nielsen
4bced63f6d
Add byteorder(9) to SEE ALSO.
...
MFC after: 3 days
2005-03-20 17:27:57 +00:00
Stefan Farfeleder
10248e3a93
- Use socklen_t.
...
- No need for two instances of 'num'.
2005-02-14 17:51:45 +00:00
Stefan Farfeleder
78e3eed071
Fix most cases where the address of an int is passed to a function expecting a
...
socklen_t * argument.
2005-02-14 17:42:58 +00:00
Alexey Zelkin
ed61386604
. Convert return type of gai_strerror() to 'const char *' as POSIX requires.
...
. Convert ai_errlist[] to simple 'char *' array, and appropriately
optimize gai_strerror()
2005-02-14 11:33:12 +00:00
Alexey Zelkin
03c51c7e90
EAI_ADDRFAMILY and EAI_NODATA are obsoleted, and not definined anymore,
...
so do not export these definitions via manual page
2005-02-14 11:24:58 +00:00
Ruslan Ermilov
0227791b40
Expand *n't contractions.
2005-02-13 22:25:33 +00:00
Ruslan Ermilov
6b806d21d1
Fixed the misplaced $FreeBSD$.
2005-02-09 18:07:17 +00:00
Hajimu UMEMOTO
8743b270c9
use strdup().
...
Obtained from: KAME
MFC after: 1 week
2005-01-28 19:35:42 +00:00
Hajimu UMEMOTO
a2a24ec881
make _getipnodebyname_multi() static.
2005-01-27 15:01:05 +00:00
Hajimu UMEMOTO
c224435ed9
implement AI_NUMERICSERV (as defined in RFC3493).
...
Obtained from: KAME
MFC after: 1 week
2005-01-27 14:45:11 +00:00
Hajimu UMEMOTO
8755b918a1
fill ai_canonname field for numeric hostname, by the given hostname.
...
follow new recommendation in RFC3493.
Obtained from: KAME
MFC after: 1 week
2005-01-27 14:41:56 +00:00
Hajimu UMEMOTO
d0d6a2c7cc
query A RR before AAAA RR.
...
MFC after: 1 week
2005-01-27 08:03:46 +00:00
Ruslan Ermilov
f000229472
Markup and grammar fixes.
2005-01-24 18:14:18 +00:00
George V. Neville-Neil
f579625397
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)
2005-01-24 11:23:14 +00:00
George V. Neville-Neil
b986ced475
Fix a dangling MKLINK from my last commit.
...
Approved by: rwatson (mentor)
2005-01-24 01:40:16 +00:00
George V. Neville-Neil
6617cf5778
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.
2005-01-23 16:02:48 +00:00
George V. Neville-Neil
b8a3e40819
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.
2005-01-23 15:41:10 +00:00
Ruslan Ermilov
24a0682c64
Sort sections.
2005-01-20 09:17:07 +00:00
Ruslan Ermilov
6a5796e734
Eliminate macro calls inside literal displays.
2005-01-15 12:28:01 +00:00
Ruslan Ermilov
2d82ac3110
Scheduled mdoc(7) sweep.
2005-01-11 20:50:51 +00:00
Maxim Sobolev
7b6cc40479
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
2005-01-03 11:07:45 +00:00
Tom Rhodes
8f79184fe2
Various markup and spelling fixes.
...
PR: 75574
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> (original version)
2004-12-29 02:18:24 +00:00
Bjoern A. Zeeb
6c58990d47
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
2004-11-13 20:40:32 +00:00
Maxim Konovalov
e2494b93fc
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
2004-10-09 17:13:58 +00:00
Maxim Konovalov
796a03f172
Reflect the fact addr2ascii(3) and ascii2addr(3) need sys/socket.h
...
for AF_* constants.
Submitted by: Matthew George
MFC after: 2 weeks
2004-09-29 17:54:30 +00:00
Yaroslav Tykhiy
23b5c802b8
Use the recently introduced RES_DFLRETRY parameter instead of a well-hidden
...
constant for the default number of retries.
2004-09-09 17:42:18 +00:00
Peter Pentchev
16d9177176
Bump the document date, since the content changed today.
...
Discussed with: ru
2004-08-06 15:29:54 +00:00
Peter Pentchev
808712c91c
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
2004-08-06 12:02:07 +00:00
Hajimu UMEMOTO
0def575fd7
now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int
...
Obtained from: KAME
2004-07-21 17:26:40 +00:00
Ruslan Ermilov
5792ef0983
Markup nits.
2004-07-07 20:15:31 +00:00