1 .\" Copyright 2000 Sam Varshavchik <mrsam@courier-mta.com>
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" References: RFC 2553
25 .\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
26 .\" Translated 2001-01-14, NAKANO Takeo <nakano@apm.seikei.ac.jp>
27 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
30 .TH INET_NTOP 3 2008-11-11 "Linux" "Linux Programmer's Manual"
33 .\"O inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form
34 inet_ntop \- IPv4/IPv6 アドレスをバイナリ形式からテキスト形式に変換する
38 .B #include <arpa/inet.h>
40 .BI "const char *inet_ntop(int " "af" ", const void *" "src" ,
41 .BI " char *" "dst" ", socklen_t " "size" );
45 .\"O This function converts the network address structure
49 .\"O address family into a character string.
50 .\"O The resulting string is copied to the buffer pointed to by
52 .\"O which must be a non-NULL pointer.
53 .\"O The caller specifies the number of bytes available in this buffer in
58 アドレスファミリーのネットワークアドレス構造体
65 は NULL でないポインタでなければならない。
66 呼び出し時に、このバッファで利用できるバイト数を
73 .\"O .BR inet_ntoa (3)
74 .\"O function to support multiple address families,
75 .\"O .BR inet_ntoa (3)
76 .\"O is now considered to be deprecated in favor of
77 .\"O .BR inet_ntop ().
78 .\"O The following address families are currently supported:
82 関数を拡張して複数のアドレスファミリーを扱えるようにしたものである。
88 現在サポートされているアドレスファミリーは以下の通り:
93 .\"O .I struct in_addr
94 .\"O (in network byte order)
95 .\"O which is converted to an IPv4 network address in
96 .\"O the dotted-decimal format, "\fIddd.ddd.ddd.ddd\fP".
100 .\"O .B INET_ADDRSTRLEN
106 へのポインタとみなされ、この構造体の内容が
107 ドット区切りの 10 進数形式 "\fIddd.ddd.ddd.ddd\fP" の
108 IPv4 ネットワークアドレスに変換される。
118 .\"O .I struct in6_addr
119 .\"O (in network byte order)
120 .\"O which is converted to a representation of this address in the
121 .\"O most appropriate IPv6 network address format for this address.
124 .\"O must be at least
125 .\"O .B INET6_ADDRSTRLEN
131 へのポインタとみなされ、この構造体の内容が、
133 IPv6 ネットワークアドレスの表示形式に変換される。
139 .\"O .SH "RETURN VALUE"
142 .\"O .BR inet_ntop ()
143 .\"O returns a non-NULL pointer to
145 .\"O NULL is returned if there was an error, with
147 .\"O set to indicate the error.
152 への (NULL でない) ポインタを返す。
161 .\"O was not a valid address family.
163 がサポートされているアドレスファミリーでなかった。
166 .\"O The converted address string would exceed the size given by
171 .\"O .SH "CONFORMING TO"
174 .\"O Note that RFC\ 2553 defines a prototype where the last argument
178 .\"O Many systems follow RFC\ 2553.
179 .\"O Glibc 2.0 and 2.1 have
181 .\"O but 2.2 and later have
183 .\"O .\" 2.1.3: size_t, 2.1.91: socklen_t
188 型と定義している。多くのシステムでは RFC\ 2553 にしたがっている。
195 .\" 2.1.3: size_t, 2.1.91: socklen_t
199 .\"O converts IPv6-mapped IPv4 addresses into an IPv6 format.
201 は IPv4 がマップされた IPv6 アドレスを
206 .\"O .BR inet_pton (3).