Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/net/getnameinfo.3
Show All 12 Lines | |||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, | .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, | ||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | .\" 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 | .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||||
.\" PERFORMANCE OF THIS SOFTWARE. | .\" PERFORMANCE OF THIS SOFTWARE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd July 28, 2016 | .Dd March 15, 2018 | ||||
.Dt GETNAMEINFO 3 | .Dt GETNAMEINFO 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm getnameinfo | .Nm getnameinfo | ||||
.Nd socket address structure to hostname and service name | .Nd socket address structure to hostname and service name | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/types.h | .In sys/types.h | ||||
.In sys/socket.h | .In sys/socket.h | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
.Po for IPv4 , | .Po for IPv4 , | ||||
IPv6, | IPv6, | ||||
link-layer, | link-layer, | ||||
or UNIX-domain respectively | or UNIX-domain respectively | ||||
.Pc | .Pc | ||||
that is | that is | ||||
.Fa salen | .Fa salen | ||||
bytes long. | bytes long. | ||||
If | |||||
.Fa salen | |||||
is shorter than the length corresponding to the specified | |||||
address family or longer than | |||||
.Fn sizeof "struct sockaddr_storage" , | |||||
it returns | |||||
.Er EAI_FAMILY . | |||||
Note that | |||||
.Va sa->sa_len | |||||
should be consistent with | |||||
.Fa salen | |||||
though the value of | |||||
.Va sa->sa_len | |||||
is not directly used in this function. | |||||
.Pp | .Pp | ||||
The host and service names associated with | The host and service names associated with | ||||
.Fa sa | .Fa sa | ||||
are stored in | are stored in | ||||
.Fa host | .Fa host | ||||
and | and | ||||
.Fa serv | .Fa serv | ||||
which have length parameters | which have length parameters | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |