Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ethers(3N) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ethers(4)

ethers(3N)                                                       ethers(3N)

NAME
     ethers: etherntoa, etheraton, etherntohost, etherhostton,
     etherline - MAC 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(etheraddrt *e);

     etheraddrt *etheraton(char *s);

     int etherntohost(char *hostname, etheraddrt *e);

     int etherhostton(char *hostname, etheraddrt *e);

     int etherline(char *s, etheraddrt *e, char *hostname);

DESCRIPTION
     These routines are useful for mapping 48 bit MAC addresses to their
     ASCII representations or their corresponding host names, and vice
     versa. A MAC address identifies a network interface and is valid for
     Ethernet, FDDI and Token Ring.

     The function etherntoa() converts a 48 bit MAC 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 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 MAC address; the function returns NULL
     if the string cannot be scanned successfully.

     The function etherntohost() maps a MAC 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
     returns zero upon success and non-zero upon failure. Inversely, the
     function etherhostton() maps a hostname string to its corresponding
     MAC address; the function modifies the MAC address pointed to by e.
     The function also returns zero upon success and non-zero upon failure.

     The function etherline() scans a line (pointed to by s) and sets the
     hostname and the MAC address (pointed to by e). The string pointed to
     by hostname must be long enough to hold the hostname and a NULL char-
     acter. The function returns zero upon success and non-zero upon
     failure. The format of the scanned line is described by ethers(4).






Page 1                       Reliant UNIX 5.44                Printed 11/98

ethers(3N)                                                       ethers(3N)

FILES
     /etc/ethers

SEE ALSO
     ethers(4).

















































Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026