diff options
Diffstat (limited to 'man3/ether_aton.3')
| -rw-r--r-- | man3/ether_aton.3 | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/man3/ether_aton.3 b/man3/ether_aton.3 index a6d01ab9e2..3587110b47 100644 --- a/man3/ether_aton.3 +++ b/man3/ether_aton.3 @@ -55,29 +55,40 @@ ether_ntoa_r, ether_aton_r \- Ethernet address manipulation routines .BI " struct ether_addr *" addr ); .fi .SH DESCRIPTION -\fBether_aton\fP() converts the 48-bit Ethernet host address \fIasc\fP +.BR ether_aton () +converts the 48-bit Ethernet host address \fIasc\fP from the standard hex-digits-and-colons notation into binary data in network byte order and returns a pointer to it in a statically allocated buffer, which subsequent calls will -overwrite. \fBether_aton\fP() returns NULL if the address is invalid. +overwrite. +.BR ether_aton () +returns NULL if the address is invalid. .PP -The \fBether_ntoa\fP() function converts the Ethernet host address +The +.BR ether_ntoa () +function converts the Ethernet host address \fIaddr\fP given in network byte order to a string in standard hex-digits-and-colons notation, omitting leading zeroes. The string is returned in a statically allocated buffer, which subsequent calls will overwrite. .PP -The \fBether_ntohost\fP() function maps an Ethernet address to the +The +.BR ether_ntohost () +function maps an Ethernet address to the corresponding hostname in .I /etc/ethers and returns non-zero if it cannot be found. .PP -The \fBether_hostton\fP() function maps a hostname to the +The +.BR ether_hostton () +function maps a hostname to the corresponding Ethernet address in .I /etc/ethers and returns non-zero if it cannot be found. .PP -The \fBether_line\fP() function parses a line in +The +.BR ether_line () +function parses a line in .I /etc/ethers format (ethernet address followed by whitespace followed by hostname; '#' introduces a comment) and returns an address @@ -87,8 +98,15 @@ The buffer pointed to by must be sufficiently long, e.g., have the same length as .IR line . .PP -The functions \fBether_ntoa_r\fP() and \fBether_aton_r\fP() are re-entrant -threadsafe versions of \fBether_ntoa\fP() and \fBether_aton\fP() +The functions +.BR ether_ntoa_r () +and +.BR ether_aton_r () +are re-entrant +threadsafe versions of +.BR ether_ntoa () +and +.BR ether_aton () respectively, and do not use static buffers. .PP The structure \fIether_addr\fP is defined in \fInet/ethernet.h\fP as: |
