:man| Alphabetical   Categories   About us 
 
LINK_ADDR (3) | C library functions | Unix Manual Pages | :man

NAME

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

CONTENTS

Library
Synopsis
Description
Return Values
See Also
History
Bugs

LIBRARY


.Lb libc

SYNOPSIS


.In sys/types.h
.In sys/socket.h
.In net/if_dl.h void link_addr "const char *addr" "struct sockaddr_dl *sdl" char * link_ntoa "const struct sockaddr_dl *sdl"

DESCRIPTION

The routine link_addr interprets character strings representing link-level addresses, returning binary information suitable for use in system calls. The routine 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.

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 link_ntoa function always returns a null terminated string. The link_addr function has no return value. (See BUGS.)

SEE ALSO

addr2ascii(3)

HISTORY

BUGS


Share this page

     Follow us

Facebook Twitter Google+ LinkedIn


 
Created by Blin Media, 2008-2013