summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getservent.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove __P() usage.obrien2002-03-211-1/+1
|
* Remove 'register' keyword.obrien2002-03-211-1/+1
|
* Remove trailing characters from #endif.obrien2002-03-151-3/+0
| | | | Actually this #endif is not needed, so remove leading characters also.
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Small yet significant tweaks/cleanups:wpaul1996-12-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | - getservent: o put _yp_check() proto under #ifdef YP where it belongs o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - gethostbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long - getnetbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - ether_addr: o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes, but it happens that BUFSIZ == YPMAXRECORD. - gethostbydns: o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly) These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch.
* Eliminate 3 more examples of gratutiously passing arrays by address.jkh1996-12-051-3/+3
| | | | | Everyone please call ParaSoft today and say "I will buy 57 copies of Insure++ tomorrow, but first I want a FreeBSD version." :-)
* General -Wall warning cleanup, part I.jkh1996-07-121-0/+2
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Improve NIS performace of getservbyname() and getservbyport(). Both thesewpaul1996-06-011-7/+95
| | | | | | | | | | | | | | | | | | | | | | functions are implimented as wrappers around getservent(), which means it's up to getservent() to do all the work. The NIS support in getservent() only allows it to scan through the services.byname map one entry at a time until it finds the requested service name/port. This can be painfully slow due to the overhead involved (lots and lots of successive RPCs). To fix this, we allow getservbyname() and getservbyport() to signal getservent() that if NIS is turned on (there's a '+' in /etc/services), the usual yp_first()/yp_next() linear search should be abandoned and yp_match() used instead. This causes getservent() to immediately locate the requested entry instead of wasting time groping through the whole map. The downside is that this trick is accomplished by exporting a couple of pointers from getservent.c which getservbyname.c and getservbyport.c can preset in order to tell getservent() what to do. If all three functions were in the same source module, then the extra cruft could be delcared static to avoid poluting the global symbol space. Maybe they should be combined anyway. For now I've settled on prepending lots of underscores.
* Getpwent() and getservent() can wind up calling free() withmpp1996-01-291-1/+0
| | | | | an invalid pointer if a call to yp_first() fails. Closes PR # 964, and possibly # 952.
* Add NIS support to getservent(3) functions (getservbyport() and getservbyname()wpaul1995-11-041-0/+68
| | | | | | | | both call getservent() to do most of the work, so we only need to modify this file to take care of everybody). Note that there is only one NIS services map (services.byname) even though there are getservbyname() and getservbyport() library functions.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+121
OpenPOWER on IntegriCloud