Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ link_ntoa(3) — BSD/386 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iso(4)

LINK_ADDR(3)                BSD Programmer's Manual               LINK_ADDR(3)

NAME
     linkaddr, linkntoa - elementary address specification routines for link
     level access

SYNOPSIS
     #include <sys/types.h>
     #include <sys/socket.h>
     #include <net/ifdl.h>

     void
     linkaddr(const char *addr, struct sockaddrdl *sdl)

     char *
     linkntoa(const struct sockaddrdl *sdl)

DESCRIPTION
     The routine linkaddr() interprets character strings representing link-
     level addresses, returning binary information suitable for use in system
     calls.  The routine linkntoa() takes a link-level address and returns an
     ASCII string representing some of the information present, including the
     link level address itself, and the interface name or number, if present.
     This facility is experimental and is still subject to change.

     For linkaddr(), the string addr may contain an optional network inter-
     face identifier of the form ``name unit-number'', suitable for the first
     argument to ifconfig(4),  followed in all cases by a colon and an inter-
     face address in the form of groups of hexadecimal digits separated by pe-
     riods.  Each group represents a byte of address; address bytes are filled
     left to right from low order bytes through high order bytes.

     Thus le0:8.0.9.13.d.30 represents an ethernet address to be transmitted
     on the first Lance ethernet interface.

RETURN VALUES
     linkntoa() always returns a null terminated string.  linkaddr() has no
     return value.  (See BUGS.)

SEE ALSO
     iso(4),

HISTORY
     The linkaddr() and linkntoa() functions appeared in 4.3BSD-Reno.

BUGS
     The returned values for link_ntoa reside in a static memory area.

     The function linkaddr() should diagnose improperly formed input, and
     there should be an unambiguous way to recognize this.

     If the sdllen field of the link socket address sdl is 0, linkntoa()
     will not insert a colon before the interface address bytes.  If this
     translated address is given to linkaddr() without inserting an initial
     colon, the latter will not interpret it correctly.

BSDI BSD/386                    March 26, 1993                               1









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