OpenBSD manual page server

Manual Page Search Parameters

LINK_NTOA(3) Library Functions Manual LINK_NTOA(3)

link_ntoaelementary address specification routine for link level access

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

char *
link_ntoa(const struct sockaddr_dl *sdl);

The link_ntoa() function 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.

link_ntoa() always returns a NUL-terminated string.

ifconfig(8)

The link_ntoa() function appeared in 4.3BSD-Reno.

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

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.

September 10, 2015 OpenBSD-current