1 .\" $NetBSD: ethers.3,v 1.13 2003/04/16 13:34:41 wiz Exp $
3 .\" Written by roland@frob.com. Public domain.
23 .Fn ether_ntoa "const struct ether_addr *e"
24 .Ft struct ether_addr *
25 .Fn ether_aton "const char *s"
27 .Fn ether_ntohost "char *hostname" "const struct ether_addr *e"
29 .Fn ether_hostton "const char *hostname" "struct ether_addr *e"
31 .Fn ether_line "const char *line" "struct ether_addr *e" "char *hostname"
33 Ethernet addresses are represented by the
35 .Bd -literal -offset indent
37 u_char ether_addr_octet[6];
43 function converts this structure into an ASCII string of the form
44 ``xx:xx:xx:xx:xx:xx'', consisting of 6 hexadecimal numbers separated
45 by colons. It returns a pointer to a static buffer that is reused for
49 converts an ASCII string of the same form and to a structure
50 containing the 6 octets of the address. It returns a pointer to a
51 static structure that is reused for each call.
57 functions interrogate the data base mapping host names to Ethernet
62 function looks up the given Ethernet address and writes the associated
63 host name into the character buffer passed.
66 function looks up the given host name and writes the associated
67 Ethernet address into the structure passed. Both functions return
68 zero if they find the requested host name or address, and -1 if not.
71 from the beginning; if a + appears alone on a line in the file, then
83 function parses a line from the
85 file and fills in the passed ``struct ether_addr'' and character
86 buffer with the Ethernet address and host name on the line. It
87 returns zero if the line was successfully parsed and -1 if not.
98 characters long, to prevent a buffer overflow during parsing.
100 .Bl -tag -width /etc/ethers -compact
113 functions were adopted from
118 The data space used by these functions is static; if future use
119 requires the data, it should be copied before any subsequent calls to
120 these functions overwrite it.