Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ethers(4) [sunos man page]

ethers(4)							   File Formats 							 ethers(4)

NAME
ethers - Ethernet address to hostname database or domain DESCRIPTION
The ethers file is a local source of information about the (48-bit) Ethernet addresses of hosts on the Internet. The ethers file can be used in conjunction with or instead of other ethers sources, including the NIS maps ethers.byname and ethers.byaddr, the NIS+ table ethers, or Ethernet address data stored on an LDAP server. Programs use the ethers(3SOCKET) routines to access this information. The ethers file has one line for each host on an Ethernet. The line has the following format: Ethernet-address official-host-name Items are separated by any number of SPACE and/or TAB characters. A `#' indicates the beginning of a comment extending to the end of line. The standard form for Ethernet addresses is "x:x:x:x:x:x" where x is a hexadecimal number between 0 and ff, representing one byte. The address bytes are always in network order. Host names may contain any printable character other than SPACE, TAB, NEWLINE, or comment char- acter. FILES
/etc/ethers SEE ALSO
ethers(3SOCKET), hosts(4), nsswitch.conf(4) SunOS 5.10 22 Jul 2004 ethers(4)

Check Out this Related Man Page

ethers(3SOCKET) 					     Sockets Library Functions						   ethers(3SOCKET)

NAME
ethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line - Ethernet address mapping operations SYNOPSIS
cc [ flag ... ] file ... -lsocket -lnsl [ library ... ] #include <sys/types.h> #include <sys/ethernet.h> char *ether_ntoa(const struct ether_addr *e); struct ether_addr *ether_aton(const char *s); int ether_ntohost(char *hostname, const struct ether_addr *e); int ether_hostton(const char *hostname, struct ether_addr *e); int ether_line(const char *l, struct ether_addr *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 ether_ntoa() converts a 48 bit Ethernet number pointed to by e to its standard ASCII 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 ether_aton() 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 ether_ntohost() maps an Ethernet number (pointed to by e) to its associated hostname. The string pointed to by hostname must be long enough to hold the hostname and a NULL character. The function returns zero upon success and non-zero upon failure. Inversely, the function ether_hostton() maps a hostname 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. In order to do the mapping, both these functions may lookup one or more of the following sources: the ethers file, the NIS maps ethers.byname and ethers.byaddr and the NIS+ table ethers. The sources and their lookup order are specified in the /etc/nsswitch.conf file. See nsswitch.conf(4) for details. The function ether_line() scans a line, pointed to by l, and sets the hostname and the Ethernet number, pointed to by e. The string pointed to by hostname must be long enough to hold the hostname 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(4). FILES
/etc/ethers Ethernet address to hostname database or domain /etc/nsswitch.conf configuration file for the name service switch ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
ethers(4), nsswitch.conf(4), attributes(5) SunOS 5.11 5 Apr 2004 ethers(3SOCKET)
Man Page