*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> ethers (3c)              
Title
Content
Arch
Section
 

Contents


ETHERS(3Y)							    ETHERS(3Y)


NAME    [Toc]    [Back]

     ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line -
     ethernet address mapping operations

SYNOPSIS    [Toc]    [Back]

     struct ether_addr {
	 unsigned char	ether_addr_octet[6];
     };

     char *ether_ntoa(struct ether_addr	*e);
     struct ether_addr *ether_aton(char	*s);

     int ether_ntohost(char *hostname, struct ether_addr *e);
     int ether_hostton(char *hostname, struct ether_addr *e);

     int ether_line(char *l, struct ether_addr *e, char	*hostname)

DESCRIPTION    [Toc]    [Back]

     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 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	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.

     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    [Toc]    [Back]

     /etc/ethers    (or	the NIS	maps ethers.byaddr and ethers.byname)

SEE ALSO    [Toc]    [Back]

      
      
     ethers(4) of these	functions.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
iomap HP-UX physical I/O address mapping
ethers FreeBSD ethernet address database
ethers Linux Ethernet address to IP number database
ethers IRIX ethernet address to hostname database
ether_hostton FreeBSD Ethernet address conversion and lookup routines
ether_ntoa FreeBSD Ethernet address conversion and lookup routines
ether_ntohost FreeBSD Ethernet address conversion and lookup routines
ether_line FreeBSD Ethernet address conversion and lookup routines
ether_aton FreeBSD Ethernet address conversion and lookup routines
ethers FreeBSD Ethernet address conversion and lookup routines
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service