summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/ether_addr.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix style of ether_ntoa().ru2002-04-081-3/+3
|
* Polish previous revision.ru2002-04-061-1/+1
|
* Fix ether_ntoa() to generate the %02x format people expect, instead of %x,dillon2002-04-061-2/+3
| | | | | | for the ethernet address. MFC after: 1 day
* Add a carriage return to each function declaration, and make use of ID tageric2002-03-061-8/+12
| | | | | | macros. MFC after: 1 day
* Const'ify parameters to ethers(3) routines as appropriate.archie2000-07-181-5/+5
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Small yet significant tweaks/cleanups:wpaul1996-12-271-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Get struct ether_addr directly from <net/ethernet.h> rather than pullingwollman1996-12-101-4/+2
| | | | | | in lots of unrelated junk from <net/if.h> and <net/if_ether.h>. These functions still aren't prototyped anywhere (but should be in <net/ethernet.h>---got that, Bill?).
* Remove more instances of passing arrays by address when they shouldjkh1996-12-051-7/+7
| | | | | have simply been passed as arrays. In some cases, casts had even been added to remove the warnings generated by such misuse! Aieee!
* General -Wall warning cleanup, part I.jkh1996-07-121-3/+12
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* gethostbynis.c:wpaul1996-03-161-3/+1
| | | | | | | | | | | | | | | | | | - Fix problem described in PR #1079: _gethostbynisaddr() doesn't work. Make it accept the same arguments as all the other gethostby*addr() functions and properly convert the supplied IP address into a text string so that yp_match() can find it in the hosts.byaddr map. - Also fix potential memory leak: copy the results of yp_match() to a static buffer and free the result (yp_match() returns dynamically allocated memory). ether_addr.c: - Since I was in the neighborhood, fix ether_ntohost() and ether_hostton() so that they don't bogusly for a free(result) when yp_match() fails.
* Just when you thought it was safe...wpaul1995-08-071-23/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - getnetgrent.c: address some NIS compatibility problems. We really need to use the netgroup.byuser and netgroup.byhost maps to speed up innetgr() when using NIS. Also, change the NIS interaction in the following way: If /etc/netgroup does not exist or is empty (or contains only the NIS '+' token), we now use NIS exclusively. This lets us use the 'reverse netgroup' maps and is more or less the behavior of other platforms. If /etc/netgroup exists and contains local netgroup data (but no '+'). we use only lthe local stuff and ignore NIS. If /etc/netgroup exists and contains both local data and the '+', we use the local data nd the netgroup map as a single combined database (which, unfortunately, can be slow when the netgroup database is large). This is what we have been doing up until now. Head off a potential NULL pointer dereference in the old innetgr() matching code. Also fix the way the NIS netgroup map is incorporated into things: adding the '+' is supposed to make it seem as though the netgroup database is 'inserted' wherever the '+' is placed. We didn't quite do it that way before. (The NetBSD people apparently use a real, honest-to-gosh, netgroup.db database that works just like the password database. This is actually a neat idea since netgroups is the sort of thing that can really benefit from having multi-key search capability, particularly since reverse lookups require more than a trivial amount of processing. Should we do something like this too?) - netgroup.5: document all this stuff. - rcmd.c: some sleuthing with some test programs linked with my own version of innetgr() has revealed that SunOS always passes the NIS domain name to innetgr() in the 'domain' argument. We might as well do the same (if YP is defined). - ether_addr.c: also fix the NIS interaction so that placing the '+' token in the /etc/ethers file makes it seem like the NIS ethers data is 'inserted' at that point. (Chances are nobody will notice the effect of this change, which is just te way I like it. :)
* Add ether_addr functions to libc. This seems to be the logical placewpaul1995-04-021-0/+234
to put them. A man page is in the works.
OpenPOWER on IntegriCloud