ethers(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ethers(3c)

ethers(3C)               Standard C Library Functions               ethers(3C)

NAME
       ethers,    ether_ntoa,    ether_aton,   ether_ntohost,   ether_hostton,
       ether_line - Ethernet address mapping operations

SYNOPSIS
       #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  addresses  to
       their ASCII representations or their corresponding host names, and vice
       versa.


       The function ether_ntoa() converts a 48 bit Ethernet address 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  each
       x is a hexadecimal number between 0 and ff.


       The function ether_aton() converts an ASCII string in the standard rep‐
       resentation  back  to  a  48 bit Ethernet address; the function returns
       NULL if the string cannot be scanned successfully.


       The function ether_ntohost() maps an Ethernet address (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 re‐
       turns zero upon success and non-zero upon failure. Inversely, the func‐
       tion ether_hostton() maps a hostname string to its corresponding Ether‐
       net  address;  the function modifies the Ethernet address pointed to by
       e. The function also returns zero upon success and non-zero upon  fail‐
       ure. In order to do the mapping, both these functions may lookup one or
       more  of  the  following  sources:  the  ethers  file, and the NIS maps
       ethers.byname and ethers.byaddr. The sources and their lookup order are
       specified in the nsswitch.conf(5) configuration.


       The function ether_line() scans a line, pointed to by l, and  sets  the
       hostname  and the Ethernet address, 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(5).

USAGE
       Few systems other than boot servers have other machines listed in their
       ethers file, making it unlikely that host names will be able to be  re‐
       trieved  for  a  given  Ethernet  address. Most systems instead rely on
       arp(4P) to map between Ethernet addresses and IP addresses on their lo‐
       cal network.

FILES
       /etc/ethers    Ethernet address to hostname database


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe


SEE ALSO
       arp(4P), ethers(5), nsswitch.conf(5), attributes(7)

HISTORY
       These functions have been present since the initial release of Solaris.

Oracle Solaris 11.4               2 Feb 2021                        ethers(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3