blob: 93ee09cf773b518556438d46656496f92dea63c0 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.\"
2.\" Copyright (C) 2013 by Daniel Stenberg
3.\"
4.\" Permission to use, copy, modify, and distribute this
5.\" software and its documentation for any purpose and without
6.\" fee is hereby granted, provided that the above copyright
7.\" notice appear in all copies and that both that copyright
8.\" notice and this permission notice appear in supporting
9.\" documentation, and that the name of M.I.T. not be used in
10.\" advertising or publicity pertaining to distribution of the
11.\" software without specific, written prior permission.
12.\" M.I.T. makes no representations about the suitability of
13.\" this software for any purpose. It is provided "as is"
14.\" without express or implied warranty.
15.\"
16.TH ARES_INET_NTOP 3 "17 Feb 2013"
17.SH NAME
18ares_inet_ntop \- convert a network format address to presentation format
19.SH SYNOPSIS
20.nf
21.B #include <ares.h>
22.PP
23.B const char *
24.B ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size);
25.fi
26.SH DESCRIPTION
27This is a portable version with the identical functionality of the commonly
28available \fIinet_ntop\fP.
29
30The ares_inet_ntop() function converts a numeric address into a text string
31suitable for presentation. The \fBaf\fP argument shall specify the family of
32the address. This can be AF_INET or AF_INET6. The \fBsrc\fP argument points
33to a buffer holding an IPv4 address if the af argument is AF_INET, or an IPv6
34address if the af argument is AF_INET6; the address must be in network byte
35order. The \fBdst\fP argument points to a buffer where the function stores the
36resulting text string; it shall not be NULL. The \fBsize\fP argument specifies
37the size of this buffer, which shall be large enough to hold the text string
38(INET_ADDRSTRLEN (16) characters for IPv4, INET6_ADDRSTRLEN (46) characters
39for IPv6).
40.SH SEE ALSO
41.BR ares_init(3),
42.BR ares_inet_pton(3)
43.SH AVAILABILITY
44made properly publicly available in c-ares for real in version 1.10.0
45.SH AUTHOR
46Daniel Stenberg
47