ETHERS(3N) COMMAND REFERENCE ETHERS(3N) NAME ethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line - Ethernet address mapping operations SYNOPSIS #include <sys/types.h> #include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> #include <netinet/ifether.h> char * etherntoa(e) struct etheraddr *e; struct etheraddr * etheraton(s) char *s; etherntohost(hostname, e) char *hostname; struct etheraddr *e; etherhostton(hostname, e) char *hostname; struct etheraddr *e; etherline(l, e, hostname) char *l; struct etheraddr *e; char *hostname; DESCRIPTION These routines are useful for mapping 48 bit Ethernet numbers to their ASCII representations or their corresponding host names, and vice versa. The function etherntoa converts a 48 bit Ethernet number pointed to by e to its standard ACSII representation; it returns a pointer to the ASCII string. The representation is of the form: x:x:x:x:x:x where x is a hexadecimal number between 0 and ff. The function etheraton converts an ASCII string in the standard representation back to a 48 bit Ethernet number; the function returns NULL if the string cannot be scanned successfully. The function etherntohost maps an Ethernet number (pointed to by e) to its associated host name. The string pointed to by hostname must be long enough to hold the host name and a null character. The function returns zero upon success and non-zero upon failure. Inversely, the function etherhostton maps a host name string to its corresponding Ethernet number; the function modifies the Ethernet number pointed to by e. The function also returns zero upon success and non-zero upon failure. Printed 5/12/88 1
ETHERS(3N) COMMAND REFERENCE ETHERS(3N) The function etherline scans a line (pointed to by l) and sets the host name and the Ethernet number (pointed to by e). The string pointed to by hostname must be long enough to hold the host name and a null character. The function returns zero upon success and non-zero upon failure. The format of the scanned line is described by ethers(5). FILES /etc/ethers (or the Yellow Pages' maps ethers.byaddr and ethers.byname) SEE ALSO ethers(5). Printed 5/12/88 2
%%index%% na:312,172; sy:484,4301; de:4785,1787;6956,511; fi:7467,223; se:7690,148; %%index%%000000000107