Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

iso_addr(3) [netbsd man page]

ISO_ADDR(3)						   BSD Library Functions Manual 					       ISO_ADDR(3)

NAME
iso_addr, iso_ntoa -- elementary network address conversion routines for Open System Interconnection LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <netiso/iso.h> struct iso_addr * iso_addr(const char *cp); char * iso_ntoa(struct iso_addr *isoa); DESCRIPTION
The routine iso_addr() interprets character strings representing OSI addresses, returning binary information suitable for use in system calls. The routine iso_ntoa() takes OSI addresses and returns ASCII strings representing NSAPs (network service access points) in a notation inverse to that accepted by iso_addr(). Unfortunately, no universal standard exists for representing OSI network addresses. The format employed by iso_addr() is a sequence of hexadecimal ``digits'' (optionally separated by periods), of the form: <hex digits>.<hex digits>.<hex digits> Each pair of hexadecimal digits represents a byte with the leading digit indicating the higher-ordered bits. A period following an even num- ber of bytes has no effect (but may be used to increase legibility). A period following an odd number of bytes has the effect of causing the byte of address being translated to have its higher order bits filled with zeros. RETURN VALUES
iso_ntoa() always returns a null terminated string. iso_addr() always returns a pointer to a struct iso_addr. (See BUGS.) SEE ALSO
iso(4) HISTORY
The iso_addr() and iso_ntoa() functions appeared in 4.3BSD-Reno. BUGS
The returned values reside in a static memory area. The function iso_addr() should diagnose improperly formed input, and there should be an unambiguous way to recognize this. BSD
June 4, 1993 BSD

Check Out this Related Man Page

LINK_ADDR(3)						   BSD Library Functions Manual 					      LINK_ADDR(3)

NAME
link_addr, link_ntoa -- elementary address specification routines for link level access LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#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
The routine link_addr() interprets character strings representing link-level addresses, returning binary information suitable for use in sys- tem 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. Prior to a call to link_addr(), sdl->sdl_len must be initialized to the size of the link-level socket structure, typically sizeof(struct sockaddr_dl). 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 sepa- rated 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
link_ntoa() always returns a null terminated string. link_addr() has no return value (See BUGS). SEE ALSO
ethers(3), iso(4) HISTORY
The link_addr() and link_ntoa() functions appeared in 4.3BSD-Reno. BUGS
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. BSD
July 28, 1993 BSD
Man Page