Manual Pages for UNIX Darwin command on man link_ntoa
MyWebUniversity

Manual Pages for UNIX Darwin command on man link_ntoa

LINKADDR(3) BSD Library Functions Manual LINKADDR(3)

NAME

lliinnkkaaddddrr, lliinnkknnttooaa - elementary address specification routines for

link level access LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

##iinncclluuddee <>

##iinncclluuddee <>

void lliinnkkaaddddrr(const char *addr, struct sockaddrdl *sdl); char * lliinnkknnttooaa(const struct sockaddrdl *sdl);

DESCRIPTION

The routine lliinnkkaaddddrr() interprets character strings representing link-

level addresses, returning binary information suitable for use in system

calls. The routine lliinnkknnttooaa() 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 lliinnkkaaddddrr(), the string addr may contain an optional network inter-

face identifier of the form ``name unit-number'', suitable for the first

argument to ifconfig(8), followed in all cases by a colon and an inter-

face 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. The direct use of these functions is deprecated in favor of the addr2ascii(3) interface; however, portable programs cannot rely on the latter as it is not yet widely implemented.

RETURN VALUES

The lliinnkknnttooaa() function always returns a null terminated string. The

lliinnkkaaddddrr() function has no return value. (See BUGS.)

SEE ALSO

addr2ascii(3) HISTORY

The lliinnkkaaddddrr() and lliinnkknnttooaa() functions appeared in 4.3BSD-Reno.

BUGS

The returned values for linkntoa reside in a static memory area. The function lliinnkkaaddddrr() 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, lliinnkknnttooaa() will not insert a colon before the interface address bytes. If this translated address is given to lliinnkkaaddddrr() without inserting an initial colon, the latter will not interpret it correctly. BSD June 17, 1996 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™