summaryrefslogtreecommitdiff
path: root/lib/libc/net/getnetbyht.c
Commit message (Collapse)AuthorAgeFilesLines
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=314436
* Revert r301707Enji Cooper2016-06-081-2/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=301708
* Use NULL instead of `0` in _ht_getnetbyname(..)Enji Cooper2016-06-081-2/+2
| | | | | | | | | | | - getnetent returns NULL on completion/error. - .h_aliases is NULL terminated. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301707
* libc: Make various internal file descriptors from fopen() close-on-exec.Jilles Tjoelker2013-08-231-2/+2
| | | | Notes: svn path=/head/; revision=254700
* - When there is no room for returning the result, nss backendHajimu UMEMOTO2010-08-131-4/+12
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=211276
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* - make reentrant version of netdb functions glibc style API, andHajimu UMEMOTO2006-04-151-27/+98
| | | | | | | | | | expose them to outside of libc. - make netdb functions NSS friendly. Reviewed by: arch@ and current@ (no objection) Notes: svn path=/head/; revision=157779
* Update the resolver in libc to BIND9's one.Hajimu UMEMOTO2006-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=156960
* - Remove padding for ABI compatibility of n_net member from structHajimu UMEMOTO2005-06-031-3/+0
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=146904
* - The ai_addrlen of a struct addrinfo used to be a size_t, perHajimu UMEMOTO2005-05-151-2/+5
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=146244
* NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.Hajimu UMEMOTO2005-04-291-1/+1
| | | | Notes: svn path=/head/; revision=145684
* make getnetby*() thread-safe.Hajimu UMEMOTO2005-04-281-53/+82
| | | | Notes: svn path=/head/; revision=145626
* if last line didn't have trailing space, network address was alsoHajimu UMEMOTO2005-04-241-10/+11
| | | | | | | treated as an alias. Notes: svn path=/head/; revision=145477
* Don't ignore the last line of config file (/etc/hosts, /etc/services, etc)Maxim Sobolev2005-01-031-3/+2
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=139612
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-1/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove 'register' keyword.David E. O'Brien2002-03-211-4/+4
| | | | Notes: svn path=/head/; revision=92889
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you canJacques Vidrine2000-09-061-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=65532
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Merge in bind-4.9.6 resolver changes. Note that they resolve thePeter Wemm1997-06-271-1/+3
| | | | | | | overflow problem differently. Notes: svn path=/head/; revision=26974
* Merge in bind-4.9.4-P1 resolver...Peter Wemm1996-08-291-1/+1
| | | | Notes: svn path=/head/; revision=17903
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-2/+2
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* The last of the bind-4.9.3-REL resolver merges.Peter Wemm1996-01-131-4/+16
| | | | Notes: svn path=/head/; revision=13408
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8870
* get* rework and new bind codePaul Traina1994-09-251-0/+159
Notes: svn path=/head/; revision=3070