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

  man pages->OpenBSD man pages -> link_ntoa (3)              
Title
Content
Arch
Section
 

LINK_ADDR(3)

Contents


NAME    [Toc]    [Back]

     link_addr, link_ntoa - elementary address specification routines for link
     level access

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <sys/socket.h>
     #include <net/if_dl.h>

     void
     link_addr(const char *addr, struct sockaddr_dl *sdl);

     char *
     link_ntoa(const struct sockaddr_dl *sdl);

DESCRIPTION    [Toc]    [Back]

     The link_addr() function interprets character strings representing linklevel
 addresses, returning binary information  suitable  for
use in system
     calls.   link_ntoa()  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 link_addr(), the string addr  may  contain  an  optional
network interface
  identifier  of the form ``name unit-number'', suitable
for the first
     argument to ifconfig(8), followed in all cases  by  a  colon
and an interface
  address  in  the  form of groups of hexadecimal digits
separated by periods.
  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    [Toc]    [Back]

     link_ntoa()   always   returns   a  null-terminated  string.
link_addr() has no
     return value.  (See BUGS.)

SEE ALSO    [Toc]    [Back]

      
      
     ifconfig(8)

HISTORY    [Toc]    [Back]

     The  link_addr()  and  link_ntoa()  functions  appeared   in
4.3BSD-Reno.

BUGS    [Toc]    [Back]

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

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

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

OpenBSD     3.6                           July      28,      1993
[ Back ]
 Similar pages
Name OS Title
iso_addr NetBSD elementary network address conversion routines for Open System Interconnection
stfe Tru64 routines that provide a high-level interface to basic functions needed to access and add to the symb...
stfe IRIX routines that provide a high-level interface to basic functions needed to access and add to the symbol table
linkloop HP-UX verify LAN connectivity with link-level loopback
sdfft2dui IRIX 2D FFT Real to Complex workspace initialization routines. FORTRAN SPECIFICATION subroutine SFFT2DUI( n1, n2, w
sdfft3dui IRIX 3D FFT Real to Complex workspace initialization routines. FORTRAN SPECIFICATION subroutine SFFT3DUI( n1, n2, n
sdfftm1dui IRIX Multiple 1D, FFT Real to Complex workspace initialization routines. FORTRAN SPECIFICATION subroutine SFFTM1DUI
sdfft1dui IRIX 1D FFT Real to Complex workspace initialization routines. FORTRAN SPECIFICATION subroutine SFFT1DUI( n, worksp
udmalib IRIX user-level access to DMA hardware
netdevice Linux Low level access to Linux network devices.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service