Manual Pages for Linux CentOS command on man ether_ntohost
MyWebUniversity

Manual Pages for Linux CentOS command on man ether_ntohost

ETHERATON(3) Linux Programmer's Manual ETHERATON(3)

NAME etheraton, etherntoa, etherntohost, etherhostton, etherline,

etherntoar, etheratonr - Ethernet address manipulation routines SYNOPSIS

#include char *etherntoa(const struct etheraddr *addr); struct etheraddr *etheraton(const char *asc); int etherntohost(char *hostname, const struct etheraddr *addr); int etherhostton(const char *hostname, struct etheraddr *addr); int etherline(const char *line, struct etheraddr *addr, char *hostname); /* GNU extensions */ char *etherntoar(const struct etheraddr *addr, char *buf); struct etheraddr *etheratonr(const char *asc, struct etheraddr *addr); DESCRIPTION

etheraton() converts the 48-bit Ethernet host address asc 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 buf‐ fer, which subsequent calls will overwrite. etheraton() returns NULL if the address is invalid. The etherntoa() function converts the Ethernet host address addr given

in network byte order to a string in standard hex-digits-and-colons notation, omitting leading zeros. The string is returned in a stati‐ cally allocated buffer, which subsequent calls will overwrite. The etherntohost() function maps an Ethernet address to the corre‐ sponding hostname in /etc/ethers and returns nonzero if it cannot be found. The etherhostton() function maps a hostname to the corresponding Eth‐ ernet address in /etc/ethers and returns nonzero if it cannot be found. The etherline() function parses a line in /etc/ethers format (ethernet

address followed by whitespace followed by hostname; '#' introduces a comment) and returns an address and hostname pair, or nonzero if it cannot be parsed. The buffer pointed to by hostname must be suffi‐ ciently long, for example, have the same length as line.

The functions etherntoar() and etheratonr() are reentrant thread- safe versions of etherntoa() and etheraton() respectively, and do not use static buffers. The structure etheraddr is defined in as: struct etheraddr { uint8t etheraddroctet[6]; } ATTRIBUTES Multithreading (see pthreads(7))

The etheraton() and etherntoa() functions are not thread-safe. The etherntohost(), etherhostton(), etherline(), etherntoar() and

etheratonr() functions are thread-safe. CONFORMING TO 4.3BSD, SunOS. BUGS The glibc 2.2.5 implementation of etherline() is broken. SEE ALSO ethers(5) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

GNU 2013-07-04 ETHERATON(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™