lwres_inetntop.3 revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
Copyright (C) 2000 Internet Software Consortium.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

$Id: lwres_inetntop.3,v 1.3 2000/08/01 01:21:41 tale Exp $

.Dd Jun 30, 2000 .Dt LWRES_INETNTOP 3 .Os BIND9 9 .Sh NAME .Nm lwres_net_ntop .Nd lightweight resolver IP address presentation .Sh SYNOPSIS .Fd #include <lwres/net.h> .Fd .Ft const char * .Fo lwres_net_ntop .Fa "int af" .Fa "const void *src" .Fa "char *dst" .Fa "size_t size" .Fc .Sh DESCRIPTION .Fn lwres_net_ntop converts an IP address of protocol family .Fa af - IPv4 or IPv6 - at location .Fa src from network format to its conventional representation as a string. For IPv4 addresses, that string would be a dotted-decimal. An IPv6 address would be represented in colon notation as described in RFC1884.

p The generated string is copied to .Fa dst provided .Fa size indicates it is long enough to store the ASCII representation of the address. .Sh RETURN VALUES

p If successful, the function returns .Fa dst : a pointer to a string containing the presentation format of the address. .Fn lwres_net_ntop returns .Dv NULL and sets the global variable .Li errno to .Er EAFNOSUPPORT if the protocol family given in .Fa af is not supported. .Sh SEE ALSO .Xr RFC1884 , .Xr inet_ntop 3 , .Xr errno 3 .