OSDN Git Service

LDP: Update POT and ja.po to LDP v3.79
[linuxjm/LDP_man-pages.git] / po4a / net / po / net.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2015-02-04 23:33+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man7/arp.7:13
21 #, no-wrap
22 msgid "ARP"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man7/arp.7:13
27 #, no-wrap
28 msgid "2008-11-25"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man7/arp.7:13 build/C/man3/cmsg.3:11 build/C/man7/ddp.7:12 build/C/man5/gai.conf.5:19 build/C/man1/getent.1:24 build/C/man3/getipnodebyname.3:26 build/C/man2/getpeername.2:42 build/C/man5/host.conf.5:26 build/C/man7/hostname.7:39 build/C/man5/hosts.5:27 build/C/man5/hosts.equiv.5:6 build/C/man7/icmp.7:12 build/C/man3/inet_net_pton.3:26 build/C/man3/inet_ntop.3:26 build/C/man3/inet_pton.3:27 build/C/man7/ip.7:36 build/C/man7/ipv6.7:86 build/C/man7/netdevice.7:18 build/C/man5/nss.5:19 build/C/man5/nsswitch.conf.5:25 build/C/man7/packet.7:12 build/C/man5/protocols.5:29 build/C/man7/raw.7:13 build/C/man3/rcmd.3:43 build/C/man3/rexec.3:41 build/C/man5/services.5:34 build/C/man2/shutdown.2:40 build/C/man7/tcp.7:76 build/C/man7/udp.7:12 build/C/man7/udplite.7:27 build/C/man7/unix.7:20 build/C/man7/x25.7:12
33 #, no-wrap
34 msgid "Linux"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man7/arp.7:13 build/C/man3/byteorder.3:32 build/C/man3/cmsg.3:11 build/C/man7/ddp.7:12 build/C/man3/endian.3:28 build/C/man3/ether_aton.3:31 build/C/man5/gai.conf.5:19 build/C/man3/getaddrinfo.3:44 build/C/man3/getaddrinfo_a.3:29 build/C/man3/gethostbyname.3:38 build/C/man3/getipnodebyname.3:26 build/C/man3/getnameinfo.3:10 build/C/man3/getnetent.3:30 build/C/man3/getnetent_r.3:26 build/C/man2/getpeername.2:42 build/C/man3/getprotoent.3:30 build/C/man3/getprotoent_r.3:26 build/C/man3/getservent.3:34 build/C/man3/getservent_r.3:26 build/C/man7/hostname.7:39 build/C/man5/hosts.5:27 build/C/man5/hosts.equiv.5:6 build/C/man7/icmp.7:12 build/C/man3/inet.3:42 build/C/man3/inet_net_pton.3:26 build/C/man3/inet_ntop.3:26 build/C/man3/inet_pton.3:27 build/C/man7/ip.7:36 build/C/man7/ipv6.7:86 build/C/man7/netdevice.7:18 build/C/man8/nscd.8:23 build/C/man5/nscd.conf.5:20 build/C/man5/nss.5:19 build/C/man5/nsswitch.conf.5:25 build/C/man7/packet.7:12 build/C/man5/protocols.5:29 build/C/man7/raw.7:13 build/C/man3/rcmd.3:43 build/C/man5/resolv.conf.5:23 build/C/man3/resolver.3:32 build/C/man3/rexec.3:41 build/C/man5/services.5:34 build/C/man3/setnetgrent.3:10 build/C/man2/shutdown.2:40 build/C/man7/tcp.7:76 build/C/man7/udp.7:12 build/C/man7/udplite.7:27 build/C/man7/unix.7:20 build/C/man7/x25.7:12
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man7/arp.7:14 build/C/man3/byteorder.3:33 build/C/man3/cmsg.3:12 build/C/man7/ddp.7:13 build/C/man3/endian.3:29 build/C/man3/ether_aton.3:32 build/C/man5/gai.conf.5:20 build/C/man3/getaddrinfo.3:45 build/C/man3/getaddrinfo_a.3:30 build/C/man1/getent.1:25 build/C/man3/gethostbyname.3:39 build/C/man3/getipnodebyname.3:27 build/C/man3/getnameinfo.3:11 build/C/man3/getnetent.3:31 build/C/man3/getnetent_r.3:27 build/C/man2/getpeername.2:43 build/C/man3/getprotoent.3:31 build/C/man3/getprotoent_r.3:27 build/C/man3/getservent.3:35 build/C/man3/getservent_r.3:27 build/C/man5/host.conf.5:27 build/C/man7/hostname.7:40 build/C/man5/hosts.5:28 build/C/man5/hosts.equiv.5:7 build/C/man7/icmp.7:13 build/C/man3/inet.3:43 build/C/man3/inet_net_pton.3:27 build/C/man3/inet_ntop.3:27 build/C/man3/inet_pton.3:28 build/C/man7/ip.7:37 build/C/man7/ipv6.7:87 build/C/man7/netdevice.7:19 build/C/man5/networks.5:27 build/C/man8/nscd.8:24 build/C/man5/nscd.conf.5:21 build/C/man5/nss.5:20 build/C/man5/nsswitch.conf.5:26 build/C/man7/packet.7:13 build/C/man5/protocols.5:30 build/C/man7/raw.7:14 build/C/man3/rcmd.3:44 build/C/man5/resolv.conf.5:25 build/C/man3/resolver.3:33 build/C/man3/rexec.3:42 build/C/man5/services.5:35 build/C/man3/setnetgrent.3:11 build/C/man2/shutdown.2:41 build/C/man7/tcp.7:77 build/C/man7/udp.7:13 build/C/man7/udplite.7:28 build/C/man7/unix.7:21 build/C/man7/x25.7:13
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man7/arp.7:16
51 msgid "arp - Linux ARP kernel module."
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man7/arp.7:16 build/C/man3/byteorder.3:48 build/C/man3/cmsg.3:37 build/C/man7/ddp.7:23 build/C/man3/endian.3:53 build/C/man3/ether_aton.3:57 build/C/man5/gai.conf.5:22 build/C/man3/getaddrinfo.3:76 build/C/man3/getaddrinfo_a.3:50 build/C/man1/getent.1:30 build/C/man3/gethostbyname.3:129 build/C/man3/getipnodebyname.3:44 build/C/man3/getnameinfo.3:32 build/C/man3/getnetent.3:48 build/C/man3/getnetent_r.3:62 build/C/man2/getpeername.2:50 build/C/man3/getprotoent.3:48 build/C/man3/getprotoent_r.3:59 build/C/man3/getservent.3:52 build/C/man3/getservent_r.3:59 build/C/man5/host.conf.5:29 build/C/man7/hostname.7:42 build/C/man5/hosts.5:32 build/C/man5/hosts.equiv.5:11 build/C/man7/icmp.7:15 build/C/man3/inet.3:75 build/C/man3/inet_net_pton.3:61 build/C/man3/inet_ntop.3:36 build/C/man3/inet_pton.3:36 build/C/man7/ip.7:53 build/C/man7/ipv6.7:99 build/C/man7/netdevice.7:25 build/C/man5/networks.5:29 build/C/man8/nscd.8:26 build/C/man5/nscd.conf.5:23 build/C/man5/nss.5:22 build/C/man5/nsswitch.conf.5:28 build/C/man7/packet.7:25 build/C/man5/protocols.5:32 build/C/man7/raw.7:22 build/C/man3/rcmd.3:92 build/C/man5/resolv.conf.5:29 build/C/man3/resolver.3:85 build/C/man3/rexec.3:56 build/C/man5/services.5:37 build/C/man3/setnetgrent.3:44 build/C/man2/shutdown.2:47 build/C/man7/tcp.7:87 build/C/man7/udp.7:23 build/C/man7/udplite.7:38 build/C/man7/unix.7:31 build/C/man7/x25.7:21
56 #, no-wrap
57 msgid "DESCRIPTION"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man7/arp.7:24
62 msgid ""
63 "This kernel protocol module implements the Address Resolution Protocol "
64 "defined in RFC\\ 826.  It is used to convert between Layer2 hardware "
65 "addresses and IPv4 protocol addresses on directly connected networks.  The "
66 "user normally doesn't interact directly with this module except to configure "
67 "it; instead it provides a service for other protocols in the kernel."
68 msgstr ""
69
70 #. type: Plain text
71 #: build/C/man7/arp.7:37
72 msgid ""
73 "A user process can receive ARP packets by using B<packet>(7)  sockets.  "
74 "There is also a mechanism for managing the ARP cache in user-space by using "
75 "B<netlink>(7)  sockets.  The ARP table can also be controlled via "
76 "B<ioctl>(2)  on any B<AF_INET> socket."
77 msgstr ""
78
79 #. type: Plain text
80 #: build/C/man7/arp.7:49
81 msgid ""
82 "The ARP module maintains a cache of mappings between hardware addresses and "
83 "protocol addresses.  The cache has a limited size so old and less frequently "
84 "used entries are garbage-collected.  Entries which are marked as permanent "
85 "are never deleted by the garbage-collector.  The cache can be directly "
86 "manipulated by the use of ioctls and its behavior can be tuned by the "
87 "I</proc> interfaces described below."
88 msgstr ""
89
90 #. type: Plain text
91 #: build/C/man7/arp.7:72
92 msgid ""
93 "When there is no positive feedback for an existing mapping after some time "
94 "(see the I</proc> interfaces below), a neighbor cache entry is considered "
95 "stale.  Positive feedback can be gotten from a higher layer; for example "
96 "from a successful TCP ACK.  Other protocols can signal forward progress "
97 "using the B<MSG_CONFIRM> flag to B<sendmsg>(2).  When there is no forward "
98 "progress, ARP tries to reprobe.  It first tries to ask a local arp daemon "
99 "B<app_solicit> times for an updated MAC address.  If that fails and an old "
100 "MAC address is known, a unicast probe is sent B<ucast_solicit> times.  If "
101 "that fails too, it will broadcast a new ARP request to the network.  "
102 "Requests are sent only when there is data queued for sending."
103 msgstr ""
104
105 #. type: Plain text
106 #: build/C/man7/arp.7:77
107 msgid ""
108 "Linux will automatically add a nonpermanent proxy arp entry when it receives "
109 "a request for an address it forwards to and proxy arp is enabled on the "
110 "receiving interface.  When there is a reject route for the target, no proxy "
111 "arp entry is added."
112 msgstr ""
113
114 #. type: SS
115 #: build/C/man7/arp.7:77 build/C/man7/ddp.7:144 build/C/man7/ip.7:1075 build/C/man7/netdevice.7:64 build/C/man7/packet.7:479 build/C/man7/tcp.7:1127 build/C/man7/udp.7:202 build/C/man7/unix.7:367
116 #, no-wrap
117 msgid "Ioctls"
118 msgstr ""
119
120 #. type: Plain text
121 #: build/C/man7/arp.7:84
122 msgid ""
123 "Three ioctls are available on all B<AF_INET> sockets.  They take a pointer "
124 "to a I<struct arpreq> as their argument."
125 msgstr ""
126
127 #. type: Plain text
128 #: build/C/man7/arp.7:94
129 #, no-wrap
130 msgid ""
131 "struct arpreq {\n"
132 "    struct sockaddr arp_pa;      /* protocol address */\n"
133 "    struct sockaddr arp_ha;      /* hardware address */\n"
134 "    int             arp_flags;   /* flags */\n"
135 "    struct sockaddr arp_netmask; /* netmask of protocol address */\n"
136 "    char            arp_dev[16];\n"
137 "};\n"
138 msgstr ""
139
140 #. type: Plain text
141 #: build/C/man7/arp.7:103
142 msgid ""
143 "B<SIOCSARP>, B<SIOCDARP> and B<SIOCGARP> respectively set, delete and get an "
144 "ARP mapping.  Setting and deleting ARP maps are privileged operations and "
145 "may be performed only by a process with the B<CAP_NET_ADMIN> capability or "
146 "an effective UID of 0."
147 msgstr ""
148
149 #. type: Plain text
150 #: build/C/man7/arp.7:113
151 msgid ""
152 "I<arp_pa> must be an B<AF_INET> address and I<arp_ha> must have the same "
153 "type as the device which is specified in I<arp_dev>.  I<arp_dev> is a "
154 "zero-terminated string which names a device."
155 msgstr ""
156
157 #. type: tbl table
158 #: build/C/man7/arp.7:118
159 #, no-wrap
160 msgid "I<arp_flags>\n"
161 msgstr ""
162
163 #. type: tbl table
164 #: build/C/man7/arp.7:119
165 #, no-wrap
166 msgid "flag:meaning\n"
167 msgstr ""
168
169 #. type: tbl table
170 #: build/C/man7/arp.7:120
171 #, no-wrap
172 msgid "ATF_COM:Lookup complete\n"
173 msgstr ""
174
175 #. type: tbl table
176 #: build/C/man7/arp.7:121
177 #, no-wrap
178 msgid "ATF_PERM:Permanent entry\n"
179 msgstr ""
180
181 #. type: tbl table
182 #: build/C/man7/arp.7:122
183 #, no-wrap
184 msgid "ATF_PUBL:Publish entry\n"
185 msgstr ""
186
187 #. type: tbl table
188 #: build/C/man7/arp.7:123
189 #, no-wrap
190 msgid "ATF_USETRAILERS:Trailers requested\n"
191 msgstr ""
192
193 #. type: tbl table
194 #: build/C/man7/arp.7:124
195 #, no-wrap
196 msgid "ATF_NETMASK:Use a netmask\n"
197 msgstr ""
198
199 #. type: tbl table
200 #: build/C/man7/arp.7:125
201 #, no-wrap
202 msgid "ATF_DONTPUB:Don't answer\n"
203 msgstr ""
204
205 #. type: Plain text
206 #: build/C/man7/arp.7:138
207 msgid ""
208 "If the B<ATF_NETMASK> flag is set, then I<arp_netmask> should be valid.  "
209 "Linux 2.2 does not support proxy network ARP entries, so this should be set "
210 "to 0xffffffff, or 0 to remove an existing proxy arp entry.  "
211 "B<ATF_USETRAILERS> is obsolete and should not be used."
212 msgstr ""
213
214 #. type: SS
215 #: build/C/man7/arp.7:138 build/C/man7/ddp.7:122 build/C/man7/icmp.7:41 build/C/man7/ip.7:926 build/C/man7/tcp.7:219 build/C/man7/udp.7:137
216 #, no-wrap
217 msgid "/proc interfaces"
218 msgstr ""
219
220 #. type: Plain text
221 #: build/C/man7/arp.7:151
222 msgid ""
223 "ARP supports a range of I</proc> interfaces to configure parameters on a "
224 "global or per-interface basis.  The interfaces can be accessed by reading or "
225 "writing the I</proc/sys/net/ipv4/neigh/*/*> files.  Each interface in the "
226 "system has its own directory in I</proc/sys/net/ipv4/neigh/>.  The setting "
227 "in the \"default\" directory is used for all newly created devices.  Unless "
228 "otherwise specified, time-related interfaces are specified in seconds."
229 msgstr ""
230
231 #. type: TP
232 #: build/C/man7/arp.7:151
233 #, no-wrap
234 msgid "I<anycast_delay> (since Linux 2.2)"
235 msgstr ""
236
237 #.  Precisely: 2.1.79
238 #. type: Plain text
239 #: build/C/man7/arp.7:158
240 msgid ""
241 "The maximum number of jiffies to delay before replying to a IPv6 neighbor "
242 "solicitation message.  Anycast support is not yet implemented.  Defaults to "
243 "1 second."
244 msgstr ""
245
246 #. type: TP
247 #: build/C/man7/arp.7:158
248 #, no-wrap
249 msgid "I<app_solicit> (since Linux 2.2)"
250 msgstr ""
251
252 #.  Precisely: 2.1.79
253 #. type: Plain text
254 #: build/C/man7/arp.7:165
255 msgid ""
256 "The maximum number of probes to send to the user space ARP daemon via "
257 "netlink before dropping back to multicast probes (see I<mcast_solicit>).  "
258 "Defaults to 0."
259 msgstr ""
260
261 #. type: TP
262 #: build/C/man7/arp.7:165
263 #, no-wrap
264 msgid "I<base_reachable_time> (since Linux 2.2)"
265 msgstr ""
266
267 #.  Precisely: 2.1.79
268 #. type: Plain text
269 #: build/C/man7/arp.7:176
270 msgid ""
271 "Once a neighbor has been found, the entry is considered to be valid for at "
272 "least a random value between I<base_reachable_time>/2 and "
273 "3*I<base_reachable_time>/2.  An entry's validity will be extended if it "
274 "receives positive feedback from higher level protocols.  Defaults to 30 "
275 "seconds.  This file is now obsolete in favor of I<base_reachable_time_ms>."
276 msgstr ""
277
278 #. type: TP
279 #: build/C/man7/arp.7:176
280 #, no-wrap
281 msgid "I<base_reachable_time_ms> (since Linux 2.6.12)"
282 msgstr ""
283
284 #. type: Plain text
285 #: build/C/man7/arp.7:182
286 msgid ""
287 "As for I<base_reachable_time>, but measures time in milliseconds.  Defaults "
288 "to 30000 milliseconds."
289 msgstr ""
290
291 #. type: TP
292 #: build/C/man7/arp.7:182
293 #, no-wrap
294 msgid "I<delay_first_probe_time> (since Linux 2.2)"
295 msgstr ""
296
297 #.  Precisely: 2.1.79
298 #. type: Plain text
299 #: build/C/man7/arp.7:188
300 msgid ""
301 "Delay before first probe after it has been decided that a neighbor is "
302 "stale.  Defaults to 5 seconds."
303 msgstr ""
304
305 #. type: TP
306 #: build/C/man7/arp.7:188
307 #, no-wrap
308 msgid "I<gc_interval> (since Linux 2.2)"
309 msgstr ""
310
311 #.  Precisely: 2.1.79
312 #. type: Plain text
313 #: build/C/man7/arp.7:194
314 msgid ""
315 "How frequently the garbage collector for neighbor entries should attempt to "
316 "run.  Defaults to 30 seconds."
317 msgstr ""
318
319 #. type: TP
320 #: build/C/man7/arp.7:194
321 #, no-wrap
322 msgid "I<gc_stale_time> (since Linux 2.2)"
323 msgstr ""
324
325 #.  Precisely: 2.1.79
326 #. type: Plain text
327 #: build/C/man7/arp.7:201
328 msgid ""
329 "Determines how often to check for stale neighbor entries.  When a neighbor "
330 "entry is considered stale, it is resolved again before sending data to it.  "
331 "Defaults to 60 seconds."
332 msgstr ""
333
334 #. type: TP
335 #: build/C/man7/arp.7:201
336 #, no-wrap
337 msgid "I<gc_thresh1> (since Linux 2.2)"
338 msgstr ""
339
340 #.  Precisely: 2.1.79
341 #. type: Plain text
342 #: build/C/man7/arp.7:208
343 msgid ""
344 "The minimum number of entries to keep in the ARP cache.  The garbage "
345 "collector will not run if there are fewer than this number of entries in the "
346 "cache.  Defaults to 128."
347 msgstr ""
348
349 #. type: TP
350 #: build/C/man7/arp.7:208
351 #, no-wrap
352 msgid "I<gc_thresh2> (since Linux 2.2)"
353 msgstr ""
354
355 #.  Precisely: 2.1.79
356 #. type: Plain text
357 #: build/C/man7/arp.7:215
358 msgid ""
359 "The soft maximum number of entries to keep in the ARP cache.  The garbage "
360 "collector will allow the number of entries to exceed this for 5 seconds "
361 "before collection will be performed.  Defaults to 512."
362 msgstr ""
363
364 #. type: TP
365 #: build/C/man7/arp.7:215
366 #, no-wrap
367 msgid "I<gc_thresh3> (since Linux 2.2)"
368 msgstr ""
369
370 #.  Precisely: 2.1.79
371 #. type: Plain text
372 #: build/C/man7/arp.7:222
373 msgid ""
374 "The hard maximum number of entries to keep in the ARP cache.  The garbage "
375 "collector will always run if there are more than this number of entries in "
376 "the cache.  Defaults to 1024."
377 msgstr ""
378
379 #. type: TP
380 #: build/C/man7/arp.7:222
381 #, no-wrap
382 msgid "I<locktime> (since Linux 2.2)"
383 msgstr ""
384
385 #.  Precisely: 2.1.79
386 #. type: Plain text
387 #: build/C/man7/arp.7:229
388 msgid ""
389 "The minimum number of jiffies to keep an ARP entry in the cache.  This "
390 "prevents ARP cache thrashing if there is more than one potential mapping "
391 "(generally due to network misconfiguration).  Defaults to 1 second."
392 msgstr ""
393
394 #. type: TP
395 #: build/C/man7/arp.7:229
396 #, no-wrap
397 msgid "I<mcast_solicit> (since Linux 2.2)"
398 msgstr ""
399
400 #.  Precisely: 2.1.79
401 #. type: Plain text
402 #: build/C/man7/arp.7:235
403 msgid ""
404 "The maximum number of attempts to resolve an address by multicast/broadcast "
405 "before marking the entry as unreachable.  Defaults to 3."
406 msgstr ""
407
408 #. type: TP
409 #: build/C/man7/arp.7:235
410 #, no-wrap
411 msgid "I<proxy_delay> (since Linux 2.2)"
412 msgstr ""
413
414 #.  Precisely: 2.1.79
415 #. type: Plain text
416 #: build/C/man7/arp.7:243
417 msgid ""
418 "When an ARP request for a known proxy-ARP address is received, delay up to "
419 "I<proxy_delay> jiffies before replying.  This is used to prevent network "
420 "flooding in some cases.  Defaults to 0.8 seconds."
421 msgstr ""
422
423 #. type: TP
424 #: build/C/man7/arp.7:243
425 #, no-wrap
426 msgid "I<proxy_qlen> (since Linux 2.2)"
427 msgstr ""
428
429 #.  Precisely: 2.1.79
430 #. type: Plain text
431 #: build/C/man7/arp.7:248
432 msgid ""
433 "The maximum number of packets which may be queued to proxy-ARP addresses.  "
434 "Defaults to 64."
435 msgstr ""
436
437 #. type: TP
438 #: build/C/man7/arp.7:248
439 #, no-wrap
440 msgid "I<retrans_time> (since Linux 2.2)"
441 msgstr ""
442
443 #.  Precisely: 2.1.79
444 #. type: Plain text
445 #: build/C/man7/arp.7:255
446 msgid ""
447 "The number of jiffies to delay before retransmitting a request.  Defaults to "
448 "1 second.  This file is now obsolete in favor of I<retrans_time_ms>."
449 msgstr ""
450
451 #. type: TP
452 #: build/C/man7/arp.7:255
453 #, no-wrap
454 msgid "I<retrans_time_ms> (since Linux 2.6.12)"
455 msgstr ""
456
457 #. type: Plain text
458 #: build/C/man7/arp.7:259
459 msgid ""
460 "The number of milliseconds to delay before retransmitting a request.  "
461 "Defaults to 1000 milliseconds."
462 msgstr ""
463
464 #. type: TP
465 #: build/C/man7/arp.7:259
466 #, no-wrap
467 msgid "I<ucast_solicit> (since Linux 2.2)"
468 msgstr ""
469
470 #.  Precisely: 2.1.79
471 #. type: Plain text
472 #: build/C/man7/arp.7:266
473 msgid ""
474 "The maximum number of attempts to send unicast probes before asking the ARP "
475 "daemon (see I<app_solicit>).  Defaults to 3."
476 msgstr ""
477
478 #. type: TP
479 #: build/C/man7/arp.7:266
480 #, no-wrap
481 msgid "I<unres_qlen> (since Linux 2.2)"
482 msgstr ""
483
484 #.  Precisely: 2.1.79
485 #. type: Plain text
486 #: build/C/man7/arp.7:272
487 msgid ""
488 "The maximum number of packets which may be queued for each unresolved "
489 "address by other network layers.  Defaults to 3."
490 msgstr ""
491
492 #. type: SH
493 #: build/C/man7/arp.7:272 build/C/man7/ddp.7:221 build/C/man3/endian.3:74 build/C/man3/getnameinfo.3:203 build/C/man7/icmp.7:161 build/C/man7/ipv6.7:362 build/C/man7/packet.7:532 build/C/man7/raw.7:175 build/C/man3/rcmd.3:262 build/C/man3/rexec.3:138 build/C/man7/tcp.7:1244 build/C/man7/udp.7:251 build/C/man7/udplite.7:132 build/C/man7/unix.7:484 build/C/man7/x25.7:100
494 #, no-wrap
495 msgid "VERSIONS"
496 msgstr ""
497
498 #. type: Plain text
499 #: build/C/man7/arp.7:279
500 msgid ""
501 "The I<struct arpreq> changed in Linux 2.0 to include the I<arp_dev> member "
502 "and the ioctl numbers changed at the same time.  Support for the old ioctls "
503 "was dropped in Linux 2.2."
504 msgstr ""
505
506 #. type: Plain text
507 #: build/C/man7/arp.7:285
508 msgid ""
509 "Support for proxy arp entries for networks (netmask not equal 0xffffffff)  "
510 "was dropped in Linux 2.2.  It is replaced by automatic proxy arp setup by "
511 "the kernel for all reachable hosts on other interfaces (when forwarding and "
512 "proxy arp is enabled for the interface)."
513 msgstr ""
514
515 #. type: Plain text
516 #: build/C/man7/arp.7:289
517 msgid "The I<neigh/*> interfaces did not exist before Linux 2.2."
518 msgstr ""
519
520 #. type: SH
521 #: build/C/man7/arp.7:289 build/C/man7/ddp.7:244 build/C/man3/ether_aton.3:151 build/C/man3/gethostbyname.3:438 build/C/man3/inet_ntop.3:112 build/C/man3/inet_pton.3:150 build/C/man7/ip.7:1245 build/C/man7/ipv6.7:396 build/C/man7/netdevice.7:359 build/C/man7/packet.7:601 build/C/man7/raw.7:252 build/C/man3/rcmd.3:278 build/C/man3/rexec.3:158 build/C/man2/shutdown.2:104 build/C/man7/tcp.7:1251 build/C/man7/udplite.7:134 build/C/man7/unix.7:521 build/C/man7/x25.7:102
522 #, no-wrap
523 msgid "BUGS"
524 msgstr ""
525
526 #. type: Plain text
527 #: build/C/man7/arp.7:293
528 msgid ""
529 "Some timer settings are specified in jiffies, which is architecture- and "
530 "kernel version-dependent; see B<time>(7)."
531 msgstr ""
532
533 #. type: Plain text
534 #: build/C/man7/arp.7:299
535 msgid ""
536 "There is no way to signal positive feedback from user space.  This means "
537 "connection-oriented protocols implemented in user space will generate "
538 "excessive ARP traffic, because ndisc will regularly reprobe the MAC "
539 "address.  The same problem applies for some kernel protocols (e.g., NFS over "
540 "UDP)."
541 msgstr ""
542
543 #. type: Plain text
544 #: build/C/man7/arp.7:302
545 msgid ""
546 "This man page mashes together functionality that is IPv4-specific with "
547 "functionality that is shared between IPv4 and IPv6."
548 msgstr ""
549
550 #. type: SH
551 #: build/C/man7/arp.7:302 build/C/man3/byteorder.3:92 build/C/man3/cmsg.3:222 build/C/man7/ddp.7:249 build/C/man3/endian.3:151 build/C/man3/ether_aton.3:157 build/C/man5/gai.conf.5:93 build/C/man3/getaddrinfo.3:828 build/C/man3/getaddrinfo_a.3:600 build/C/man1/getent.1:368 build/C/man3/gethostbyname.3:443 build/C/man3/getipnodebyname.3:266 build/C/man3/getnameinfo.3:282 build/C/man3/getnetent.3:154 build/C/man3/getnetent_r.3:145 build/C/man2/getpeername.2:143 build/C/man3/getprotoent.3:142 build/C/man3/getprotoent_r.3:237 build/C/man3/getservent.3:159 build/C/man3/getservent_r.3:241 build/C/man5/host.conf.5:199 build/C/man7/hostname.7:85 build/C/man5/hosts.5:115 build/C/man5/hosts.equiv.5:84 build/C/man7/icmp.7:191 build/C/man3/inet.3:305 build/C/man3/inet_net_pton.3:390 build/C/man3/inet_ntop.3:118 build/C/man3/inet_pton.3:215 build/C/man7/ip.7:1272 build/C/man7/ipv6.7:407 build/C/man7/netdevice.7:373 build/C/man5/networks.5:74 build/C/man8/nscd.8:85 build/C/man5/nscd.conf.5:239 build/C/man5/nss.5:110 build/C/man5/nsswitch.conf.5:352 build/C/man7/packet.7:631 build/C/man5/protocols.5:81 build/C/man7/raw.7:269 build/C/man3/rcmd.3:285 build/C/man5/resolv.conf.5:301 build/C/man3/resolver.3:274 build/C/man3/rexec.3:167 build/C/man5/services.5:210 build/C/man3/setnetgrent.3:107 build/C/man2/shutdown.2:113 build/C/man7/tcp.7:1263 build/C/man7/udp.7:256 build/C/man7/udplite.7:146 build/C/man7/unix.7:616 build/C/man7/x25.7:118
552 #, no-wrap
553 msgid "SEE ALSO"
554 msgstr ""
555
556 #. type: Plain text
557 #: build/C/man7/arp.7:305
558 msgid "B<capabilities>(7), B<ip>(7)"
559 msgstr ""
560
561 #. type: Plain text
562 #: build/C/man7/arp.7:310
563 msgid ""
564 "RFC\\ 826 for a description of ARP.  RFC\\ 2461 for a description of IPv6 "
565 "neighbor discovery and the base algorithms used.  Linux 2.2+ IPv4 ARP uses "
566 "the IPv6 algorithms when applicable."
567 msgstr ""
568
569 #. type: SH
570 #: build/C/man7/arp.7:310 build/C/man3/byteorder.3:96 build/C/man3/cmsg.3:227 build/C/man7/ddp.7:254 build/C/man3/endian.3:153 build/C/man3/ether_aton.3:159 build/C/man5/gai.conf.5:96 build/C/man3/getaddrinfo.3:838 build/C/man3/getaddrinfo_a.3:607 build/C/man1/getent.1:370 build/C/man3/gethostbyname.3:457 build/C/man3/getipnodebyname.3:271 build/C/man3/getnameinfo.3:315 build/C/man3/getnetent.3:161 build/C/man3/getnetent_r.3:148 build/C/man2/getpeername.2:150 build/C/man3/getprotoent.3:147 build/C/man3/getprotoent_r.3:240 build/C/man3/getservent.3:164 build/C/man3/getservent_r.3:244 build/C/man5/host.conf.5:204 build/C/man7/hostname.7:93 build/C/man5/hosts.5:126 build/C/man5/hosts.equiv.5:88 build/C/man7/icmp.7:195 build/C/man3/inet.3:316 build/C/man3/inet_net_pton.3:393 build/C/man3/inet_ntop.3:122 build/C/man3/inet_pton.3:219 build/C/man7/ip.7:1289 build/C/man7/ipv6.7:414 build/C/man7/netdevice.7:378 build/C/man5/networks.5:80 build/C/man8/nscd.8:91 build/C/man5/nscd.conf.5:244 build/C/man5/nss.5:112 build/C/man5/nsswitch.conf.5:355 build/C/man7/packet.7:654 build/C/man5/protocols.5:86 build/C/man7/raw.7:282 build/C/man3/rcmd.3:293 build/C/man5/resolv.conf.5:308 build/C/man3/resolver.3:280 build/C/man3/rexec.3:170 build/C/man5/services.5:222 build/C/man3/setnetgrent.3:111 build/C/man2/shutdown.2:117 build/C/man7/tcp.7:1289 build/C/man7/udp.7:267 build/C/man7/udplite.7:156 build/C/man7/unix.7:625 build/C/man7/x25.7:127
571 #, no-wrap
572 msgid "COLOPHON"
573 msgstr ""
574
575 #. type: Plain text
576 #: build/C/man7/arp.7:318 build/C/man3/byteorder.3:104 build/C/man3/cmsg.3:235 build/C/man7/ddp.7:262 build/C/man3/endian.3:161 build/C/man3/ether_aton.3:167 build/C/man5/gai.conf.5:104 build/C/man3/getaddrinfo.3:846 build/C/man3/getaddrinfo_a.3:615 build/C/man1/getent.1:378 build/C/man3/gethostbyname.3:465 build/C/man3/getipnodebyname.3:279 build/C/man3/getnameinfo.3:323 build/C/man3/getnetent.3:169 build/C/man3/getnetent_r.3:156 build/C/man2/getpeername.2:158 build/C/man3/getprotoent.3:155 build/C/man3/getprotoent_r.3:248 build/C/man3/getservent.3:172 build/C/man3/getservent_r.3:252 build/C/man5/host.conf.5:212 build/C/man7/hostname.7:101 build/C/man5/hosts.5:134 build/C/man5/hosts.equiv.5:96 build/C/man7/icmp.7:203 build/C/man3/inet.3:324 build/C/man3/inet_net_pton.3:401 build/C/man3/inet_ntop.3:130 build/C/man3/inet_pton.3:227 build/C/man7/ip.7:1297 build/C/man7/ipv6.7:422 build/C/man7/netdevice.7:386 build/C/man5/networks.5:88 build/C/man8/nscd.8:99 build/C/man5/nscd.conf.5:252 build/C/man5/nss.5:120 build/C/man5/nsswitch.conf.5:363 build/C/man7/packet.7:662 build/C/man5/protocols.5:94 build/C/man7/raw.7:290 build/C/man3/rcmd.3:301 build/C/man5/resolv.conf.5:316 build/C/man3/resolver.3:288 build/C/man3/rexec.3:178 build/C/man5/services.5:230 build/C/man3/setnetgrent.3:119 build/C/man2/shutdown.2:125 build/C/man7/tcp.7:1297 build/C/man7/udp.7:275 build/C/man7/udplite.7:164 build/C/man7/unix.7:633 build/C/man7/x25.7:135
577 msgid ""
578 "This page is part of release 3.79 of the Linux I<man-pages> project.  A "
579 "description of the project, information about reporting bugs, and the latest "
580 "version of this page, can be found at "
581 "\\%http://www.kernel.org/doc/man-pages/."
582 msgstr ""
583
584 #. type: TH
585 #: build/C/man3/byteorder.3:32
586 #, no-wrap
587 msgid "BYTEORDER"
588 msgstr ""
589
590 #. type: TH
591 #: build/C/man3/byteorder.3:32
592 #, no-wrap
593 msgid "2014-04-08"
594 msgstr ""
595
596 #. type: TH
597 #: build/C/man3/byteorder.3:32 build/C/man3/endian.3:28 build/C/man3/ether_aton.3:31 build/C/man3/getaddrinfo.3:44 build/C/man3/getaddrinfo_a.3:29 build/C/man3/getnameinfo.3:10 build/C/man3/getnetent.3:30 build/C/man3/getnetent_r.3:26 build/C/man3/getprotoent.3:30 build/C/man3/getprotoent_r.3:26 build/C/man3/getservent.3:34 build/C/man3/getservent_r.3:26 build/C/man3/inet.3:42 build/C/man8/nscd.8:23 build/C/man5/nscd.conf.5:20 build/C/man3/resolver.3:32 build/C/man3/setnetgrent.3:10
598 #, no-wrap
599 msgid "GNU"
600 msgstr ""
601
602 #. type: Plain text
603 #: build/C/man3/byteorder.3:36
604 msgid ""
605 "htonl, htons, ntohl, ntohs - convert values between host and network byte "
606 "order"
607 msgstr ""
608
609 #. type: SH
610 #: build/C/man3/byteorder.3:36 build/C/man3/cmsg.3:14 build/C/man7/ddp.7:15 build/C/man3/endian.3:33 build/C/man3/ether_aton.3:35 build/C/man3/getaddrinfo.3:48 build/C/man3/getaddrinfo_a.3:33 build/C/man1/getent.1:27 build/C/man3/gethostbyname.3:46 build/C/man3/getipnodebyname.3:30 build/C/man3/getnameinfo.3:13 build/C/man3/getnetent.3:34 build/C/man3/getnetent_r.3:30 build/C/man2/getpeername.2:45 build/C/man3/getprotoent.3:34 build/C/man3/getprotoent_r.3:30 build/C/man3/getservent.3:38 build/C/man3/getservent_r.3:30 build/C/man5/hosts.5:30 build/C/man3/inet.3:46 build/C/man3/inet_net_pton.3:29 build/C/man3/inet_ntop.3:29 build/C/man3/inet_pton.3:30 build/C/man7/ip.7:39 build/C/man7/ipv6.7:89 build/C/man7/netdevice.7:21 build/C/man7/packet.7:15 build/C/man7/raw.7:16 build/C/man3/rcmd.3:48 build/C/man5/resolv.conf.5:27 build/C/man3/resolver.3:36 build/C/man3/rexec.3:44 build/C/man3/setnetgrent.3:14 build/C/man2/shutdown.2:43 build/C/man7/tcp.7:79 build/C/man7/udp.7:15 build/C/man7/udplite.7:30 build/C/man7/unix.7:23 build/C/man7/x25.7:15
611 #, no-wrap
612 msgid "SYNOPSIS"
613 msgstr ""
614
615 #. type: Plain text
616 #: build/C/man3/byteorder.3:39 build/C/man3/inet_net_pton.3:32 build/C/man3/inet_ntop.3:32 build/C/man3/inet_pton.3:33
617 #, no-wrap
618 msgid "B<#include E<lt>arpa/inet.hE<gt>>\n"
619 msgstr ""
620
621 #. type: Plain text
622 #: build/C/man3/byteorder.3:41
623 #, no-wrap
624 msgid "B<uint32_t htonl(uint32_t >I<hostlong>B<);>\n"
625 msgstr ""
626
627 #. type: Plain text
628 #: build/C/man3/byteorder.3:43
629 #, no-wrap
630 msgid "B<uint16_t htons(uint16_t >I<hostshort>B<);>\n"
631 msgstr ""
632
633 #. type: Plain text
634 #: build/C/man3/byteorder.3:45
635 #, no-wrap
636 msgid "B<uint32_t ntohl(uint32_t >I<netlong>B<);>\n"
637 msgstr ""
638
639 #. type: Plain text
640 #: build/C/man3/byteorder.3:47
641 #, no-wrap
642 msgid "B<uint16_t ntohs(uint16_t >I<netshort>B<);>\n"
643 msgstr ""
644
645 #. type: Plain text
646 #: build/C/man3/byteorder.3:54
647 msgid ""
648 "The B<htonl>()  function converts the unsigned integer I<hostlong> from host "
649 "byte order to network byte order."
650 msgstr ""
651
652 #. type: Plain text
653 #: build/C/man3/byteorder.3:60
654 msgid ""
655 "The B<htons>()  function converts the unsigned short integer I<hostshort> "
656 "from host byte order to network byte order."
657 msgstr ""
658
659 #. type: Plain text
660 #: build/C/man3/byteorder.3:66
661 msgid ""
662 "The B<ntohl>()  function converts the unsigned integer I<netlong> from "
663 "network byte order to host byte order."
664 msgstr ""
665
666 #. type: Plain text
667 #: build/C/man3/byteorder.3:72
668 msgid ""
669 "The B<ntohs>()  function converts the unsigned short integer I<netshort> "
670 "from network byte order to host byte order."
671 msgstr ""
672
673 #. type: Plain text
674 #: build/C/man3/byteorder.3:76
675 msgid ""
676 "On the i386 the host byte order is Least Significant Byte first, whereas the "
677 "network byte order, as used on the Internet, is Most Significant Byte first."
678 msgstr ""
679
680 #. type: SH
681 #: build/C/man3/byteorder.3:76 build/C/man3/ether_aton.3:127 build/C/man3/rexec.3:142
682 #, no-wrap
683 msgid "ATTRIBUTES"
684 msgstr ""
685
686 #. type: SS
687 #: build/C/man3/byteorder.3:77 build/C/man3/rexec.3:143
688 #, no-wrap
689 msgid "Multithreading (see pthreads(7))"
690 msgstr ""
691
692 #. type: Plain text
693 #: build/C/man3/byteorder.3:85
694 msgid ""
695 "The B<htonl>(), B<htons>(), B<ntohl>(), and B<ntohs>()  functions are "
696 "thread-safe."
697 msgstr ""
698
699 #. type: SH
700 #: build/C/man3/byteorder.3:85 build/C/man3/cmsg.3:141 build/C/man3/endian.3:76 build/C/man3/ether_aton.3:149 build/C/man3/getaddrinfo.3:595 build/C/man3/getaddrinfo_a.3:305 build/C/man3/gethostbyname.3:317 build/C/man3/getipnodebyname.3:258 build/C/man3/getnameinfo.3:206 build/C/man3/getnetent.3:145 build/C/man3/getnetent_r.3:141 build/C/man2/getpeername.2:101 build/C/man3/getprotoent.3:140 build/C/man3/getprotoent_r.3:131 build/C/man3/getservent.3:157 build/C/man3/getservent_r.3:130 build/C/man3/inet.3:218 build/C/man3/inet_net_pton.3:159 build/C/man3/inet_ntop.3:100 build/C/man3/inet_pton.3:129 build/C/man3/rcmd.3:270 build/C/man3/resolver.3:272 build/C/man3/rexec.3:149 build/C/man3/setnetgrent.3:92 build/C/man2/shutdown.2:91
701 #, no-wrap
702 msgid "CONFORMING TO"
703 msgstr ""
704
705 #. type: Plain text
706 #: build/C/man3/byteorder.3:87 build/C/man3/inet_pton.3:131
707 msgid "POSIX.1-2001."
708 msgstr ""
709
710 #. type: Plain text
711 #: build/C/man3/byteorder.3:92
712 msgid ""
713 "Some systems require the inclusion of I<E<lt>netinet/in.hE<gt>> instead of "
714 "I<E<lt>arpa/inet.hE<gt>>."
715 msgstr ""
716
717 #. type: Plain text
718 #: build/C/man3/byteorder.3:96
719 msgid "B<endian>(3), B<gethostbyname>(3), B<getservent>(3)"
720 msgstr ""
721
722 #. type: TH
723 #: build/C/man3/cmsg.3:11
724 #, no-wrap
725 msgid "CMSG"
726 msgstr ""
727
728 #. type: TH
729 #: build/C/man3/cmsg.3:11 build/C/man5/resolv.conf.5:23 build/C/man7/unix.7:20
730 #, no-wrap
731 msgid "2014-12-31"
732 msgstr ""
733
734 #. type: Plain text
735 #: build/C/man3/cmsg.3:14
736 msgid "CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR - access ancillary data"
737 msgstr ""
738
739 #. type: Plain text
740 #: build/C/man3/cmsg.3:16 build/C/man7/ddp.7:17 build/C/man2/getpeername.2:47 build/C/man7/ip.7:41 build/C/man7/ipv6.7:91 build/C/man7/raw.7:18 build/C/man2/shutdown.2:45 build/C/man7/tcp.7:81 build/C/man7/udp.7:17 build/C/man7/udplite.7:32 build/C/man7/unix.7:25 build/C/man7/x25.7:17
741 msgid "B<#include E<lt>sys/socket.hE<gt>>"
742 msgstr ""
743
744 #. type: Plain text
745 #: build/C/man3/cmsg.3:18
746 msgid "B<struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *>I<msgh>B<);>"
747 msgstr ""
748
749 #. type: Plain text
750 #: build/C/man3/cmsg.3:20
751 msgid ""
752 "B<struct cmsghdr *CMSG_NXTHDR(struct msghdr *>I<msgh>B<, struct cmsghdr "
753 "*>I<cmsg>B<);>"
754 msgstr ""
755
756 #. type: Plain text
757 #: build/C/man3/cmsg.3:22
758 msgid "B<size_t CMSG_ALIGN(size_t >I<length>B<);>"
759 msgstr ""
760
761 #. type: Plain text
762 #: build/C/man3/cmsg.3:24
763 msgid "B<size_t CMSG_SPACE(size_t >I<length>B<);>"
764 msgstr ""
765
766 #. type: Plain text
767 #: build/C/man3/cmsg.3:26
768 msgid "B<size_t CMSG_LEN(size_t >I<length>B<);>"
769 msgstr ""
770
771 #. type: Plain text
772 #: build/C/man3/cmsg.3:28
773 msgid "B<unsigned char *CMSG_DATA(struct cmsghdr *>I<cmsg>B<);>"
774 msgstr ""
775
776 #. type: Plain text
777 #: build/C/man3/cmsg.3:36
778 #, no-wrap
779 msgid ""
780 "struct cmsghdr {\n"
781 "    socklen_t cmsg_len;    /* data byte count, including header */\n"
782 "    int       cmsg_level;  /* originating protocol */\n"
783 "    int       cmsg_type;   /* protocol-specific type */\n"
784 "    /* followed by unsigned char cmsg_data[]; */\n"
785 "};\n"
786 msgstr ""
787
788 #. type: Plain text
789 #: build/C/man3/cmsg.3:51
790 msgid ""
791 "These macros are used to create and access control messages (also called "
792 "ancillary data) that are not a part of the socket payload.  This control "
793 "information may include the interface the packet was received on, various "
794 "rarely used header fields, an extended error description, a set of file "
795 "descriptors or UNIX credentials.  For instance, control messages can be used "
796 "to send additional header fields such as IP options.  Ancillary data is sent "
797 "by calling B<sendmsg>(2)  and received by calling B<recvmsg>(2).  See their "
798 "manual pages for more information."
799 msgstr ""
800
801 #. type: Plain text
802 #: build/C/man3/cmsg.3:62
803 msgid ""
804 "Ancillary data is a sequence of I<struct cmsghdr> structures with appended "
805 "data.  This sequence should be accessed using only the macros described in "
806 "this manual page and never directly.  See the specific protocol man pages "
807 "for the available control message types.  The maximum ancillary buffer size "
808 "allowed per socket can be set using I</proc/sys/net/core/optmem_max>; see "
809 "B<socket>(7)."
810 msgstr ""
811
812 #. type: Plain text
813 #: build/C/man3/cmsg.3:69
814 msgid ""
815 "B<CMSG_FIRSTHDR>()  returns a pointer to the first I<cmsghdr> in the "
816 "ancillary data buffer associated with the passed I<msghdr>."
817 msgstr ""
818
819 #. type: Plain text
820 #: build/C/man3/cmsg.3:76
821 msgid ""
822 "B<CMSG_NXTHDR>()  returns the next valid I<cmsghdr> after the passed "
823 "I<cmsghdr>.  It returns NULL when there isn't enough space left in the "
824 "buffer."
825 msgstr ""
826
827 #. type: Plain text
828 #: build/C/man3/cmsg.3:81
829 msgid ""
830 "B<CMSG_ALIGN>(), given a length, returns it including the required "
831 "alignment.  This is a constant expression."
832 msgstr ""
833
834 #. type: Plain text
835 #: build/C/man3/cmsg.3:86
836 msgid ""
837 "B<CMSG_SPACE>()  returns the number of bytes an ancillary element with "
838 "payload of the passed data length occupies.  This is a constant expression."
839 msgstr ""
840
841 #. type: Plain text
842 #: build/C/man3/cmsg.3:90
843 msgid "B<CMSG_DATA>()  returns a pointer to the data portion of a I<cmsghdr>."
844 msgstr ""
845
846 #. type: Plain text
847 #: build/C/man3/cmsg.3:101
848 msgid ""
849 "B<CMSG_LEN>()  returns the value to store in the I<cmsg_len> member of the "
850 "I<cmsghdr> structure, taking into account any necessary alignment.  It takes "
851 "the data length as an argument.  This is a constant expression."
852 msgstr ""
853
854 #. type: Plain text
855 #: build/C/man3/cmsg.3:134
856 msgid ""
857 "To create ancillary data, first initialize the I<msg_controllen> member of "
858 "the I<msghdr> with the length of the control message buffer.  Use "
859 "B<CMSG_FIRSTHDR>()  on the I<msghdr> to get the first control message and "
860 "B<CMSG_NXTHDR>()  to get all subsequent ones.  In each control message, "
861 "initialize I<cmsg_len> (with B<CMSG_LEN>()), the other I<cmsghdr> header "
862 "fields, and the data portion using B<CMSG_DATA>().  Finally, the "
863 "I<msg_controllen> field of the I<msghdr> should be set to the sum of the "
864 "B<CMSG_SPACE>()  of the length of all control messages in the buffer.  For "
865 "more information on the I<msghdr>, see B<recvmsg>(2)."
866 msgstr ""
867
868 #. type: Plain text
869 #: build/C/man3/cmsg.3:141
870 msgid ""
871 "When the control message buffer is too short to store all messages, the "
872 "B<MSG_CTRUNC> flag is set in the I<msg_flags> member of the I<msghdr>."
873 msgstr ""
874
875 #. type: Plain text
876 #: build/C/man3/cmsg.3:146
877 msgid ""
878 "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, the "
879 "IPv6 advanced API described in RFC\\ 2292 and SUSv2.  B<CMSG_ALIGN>()  is a "
880 "Linux extension."
881 msgstr ""
882
883 #. type: SH
884 #: build/C/man3/cmsg.3:146 build/C/man7/ddp.7:226 build/C/man3/endian.3:91 build/C/man3/getaddrinfo.3:600 build/C/man3/getaddrinfo_a.3:308 build/C/man3/gethostbyname.3:341 build/C/man3/getipnodebyname.3:261 build/C/man3/getnameinfo.3:208 build/C/man3/getnetent.3:147 build/C/man2/getpeername.2:105 build/C/man5/host.conf.5:190 build/C/man5/hosts.5:88 build/C/man5/hosts.equiv.5:71 build/C/man7/icmp.7:169 build/C/man3/inet.3:226 build/C/man3/inet_net_pton.3:165 build/C/man3/inet_pton.3:131 build/C/man7/ip.7:1183 build/C/man7/ipv6.7:386 build/C/man7/netdevice.7:341 build/C/man8/nscd.8:60 build/C/man5/nscd.conf.5:232 build/C/man5/nsswitch.conf.5:333 build/C/man7/packet.7:538 build/C/man7/raw.7:187 build/C/man3/setnetgrent.3:103 build/C/man2/shutdown.2:95 build/C/man7/unix.7:490
885 #, no-wrap
886 msgid "NOTES"
887 msgstr ""
888
889 #. type: Plain text
890 #: build/C/man3/cmsg.3:151
891 msgid ""
892 "For portability, ancillary data should be accessed using only the macros "
893 "described here.  B<CMSG_ALIGN>()  is a Linux extension and should not be "
894 "used in portable programs."
895 msgstr ""
896
897 #. type: Plain text
898 #: build/C/man3/cmsg.3:161
899 msgid ""
900 "In Linux, B<CMSG_LEN>(), B<CMSG_DATA>(), and B<CMSG_ALIGN>()  are constant "
901 "expressions (assuming their argument is constant); this could be used to "
902 "declare the size of global variables.  This may not be portable, however."
903 msgstr ""
904
905 #. type: SH
906 #: build/C/man3/cmsg.3:161 build/C/man3/endian.3:107 build/C/man5/gai.conf.5:74 build/C/man3/getaddrinfo.3:623 build/C/man3/getaddrinfo_a.3:314 build/C/man3/getnameinfo.3:243 build/C/man3/getprotoent_r.3:135 build/C/man3/getservent_r.3:134 build/C/man5/hosts.5:107 build/C/man3/inet.3:262 build/C/man3/inet_net_pton.3:247 build/C/man3/inet_ntop.3:115 build/C/man3/inet_pton.3:156 build/C/man5/nss.5:100 build/C/man7/unix.7:608
907 #, no-wrap
908 msgid "EXAMPLE"
909 msgstr ""
910
911 #. type: Plain text
912 #: build/C/man3/cmsg.3:165
913 msgid "This code looks for the B<IP_TTL> option in a received ancillary buffer:"
914 msgstr ""
915
916 #. type: Plain text
917 #: build/C/man3/cmsg.3:172
918 #, no-wrap
919 msgid ""
920 "struct msghdr msgh;\n"
921 "struct cmsghdr *cmsg;\n"
922 "int *ttlptr;\n"
923 "int received_ttl;\n"
924 msgstr ""
925
926 #. type: Plain text
927 #: build/C/man3/cmsg.3:189
928 #, no-wrap
929 msgid ""
930 "/* Receive auxiliary data in msgh */\n"
931 "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n"
932 "        cmsg = CMSG_NXTHDR(&msgh,cmsg)) {\n"
933 "    if (cmsg-E<gt>cmsg_level == IPPROTO_IP\n"
934 "            && cmsg-E<gt>cmsg_type == IP_TTL) {\n"
935 "        ttlptr = (int *) CMSG_DATA(cmsg);\n"
936 "        received_ttl = *ttlptr;\n"
937 "        break;\n"
938 "    }\n"
939 "}\n"
940 "if (cmsg == NULL) {\n"
941 "    /*\n"
942 "     * Error: IP_TTL not enabled or small buffer\n"
943 "     * or I/O error.\n"
944 "     */\n"
945 "}\n"
946 msgstr ""
947
948 #. type: Plain text
949 #: build/C/man3/cmsg.3:195
950 msgid ""
951 "The code below passes an array of file descriptors over a UNIX domain socket "
952 "using B<SCM_RIGHTS>:"
953 msgstr ""
954
955 #. type: Plain text
956 #: build/C/man3/cmsg.3:208
957 #, no-wrap
958 msgid ""
959 "struct msghdr msg = {0};\n"
960 "struct cmsghdr *cmsg;\n"
961 "int myfds[NUM_FD]; /* Contains the file descriptors to pass. */\n"
962 "union {\n"
963 "    /* ancillary data buffer, wrapped in a union in order to ensure it is\n"
964 "       suitably aligned */\n"
965 "    char buf[CMSG_SPACE(sizeof myfds)];\n"
966 "    struct cmsghdr align;\n"
967 "} u;\n"
968 "int *fdptr;\n"
969 msgstr ""
970
971 #. type: Plain text
972 #: build/C/man3/cmsg.3:220
973 #, no-wrap
974 msgid ""
975 "msg.msg_control = u.buf;\n"
976 "msg.msg_controllen = sizeof u.buf;\n"
977 "cmsg = CMSG_FIRSTHDR(&msg);\n"
978 "cmsg-E<gt>cmsg_level = SOL_SOCKET;\n"
979 "cmsg-E<gt>cmsg_type = SCM_RIGHTS;\n"
980 "cmsg-E<gt>cmsg_len = CMSG_LEN(sizeof(int) * NUM_FD);\n"
981 "/* Initialize the payload: */\n"
982 "fdptr = (int *) CMSG_DATA(cmsg);\n"
983 "memcpy(fdptr, myfds, NUM_FD * sizeof(int));\n"
984 "/* Sum of the length of all control messages in the buffer: */\n"
985 "msg.msg_controllen = cmsg-E<gt>cmsg_len;\n"
986 msgstr ""
987
988 #. type: Plain text
989 #: build/C/man3/cmsg.3:225
990 msgid "B<recvmsg>(2), B<sendmsg>(2)"
991 msgstr ""
992
993 #. type: Plain text
994 #: build/C/man3/cmsg.3:227
995 msgid "RFC\\ 2292"
996 msgstr ""
997
998 #. type: TH
999 #: build/C/man7/ddp.7:12
1000 #, no-wrap
1001 msgid "DDP"
1002 msgstr ""
1003
1004 #. type: TH
1005 #: build/C/man7/ddp.7:12
1006 #, no-wrap
1007 msgid "2008-11-20"
1008 msgstr ""
1009
1010 #. type: Plain text
1011 #: build/C/man7/ddp.7:15
1012 msgid "ddp - Linux AppleTalk protocol implementation"
1013 msgstr ""
1014
1015 #. type: Plain text
1016 #: build/C/man7/ddp.7:19
1017 msgid "B<#include E<lt>netatalk/at.hE<gt>>"
1018 msgstr ""
1019
1020 #. type: Plain text
1021 #: build/C/man7/ddp.7:21
1022 msgid "I<ddp_socket>B< = socket(AF_APPLETALK, SOCK_DGRAM, 0);>"
1023 msgstr ""
1024
1025 #. type: Plain text
1026 #: build/C/man7/ddp.7:23
1027 msgid "I<raw_socket>B< = socket(AF_APPLETALK, SOCK_RAW, >I<protocol>B<);>"
1028 msgstr ""
1029
1030 #. type: Plain text
1031 #: build/C/man7/ddp.7:34
1032 msgid ""
1033 "Linux implements the AppleTalk protocols described in I<Inside AppleTalk>.  "
1034 "Only the DDP layer and AARP are present in the kernel.  They are designed to "
1035 "be used via the B<netatalk> protocol libraries.  This page documents the "
1036 "interface for those who wish or need to use the DDP layer directly."
1037 msgstr ""
1038
1039 #. type: Plain text
1040 #: build/C/man7/ddp.7:39
1041 msgid ""
1042 "The communication between AppleTalk and the user program works using a "
1043 "BSD-compatible socket interface.  For more information on sockets, see "
1044 "B<socket>(7)."
1045 msgstr ""
1046
1047 #. type: Plain text
1048 #: build/C/man7/ddp.7:60
1049 msgid ""
1050 "An AppleTalk socket is created by calling the B<socket>(2)  function with a "
1051 "B<AF_APPLETALK> socket family argument.  Valid socket types are "
1052 "B<SOCK_DGRAM> to open a B<ddp> socket or B<SOCK_RAW> to open a B<raw> "
1053 "socket.  I<protocol> is the AppleTalk protocol to be received or sent.  For "
1054 "B<SOCK_RAW> you must specify B<ATPROTO_DDP>."
1055 msgstr ""
1056
1057 #. type: Plain text
1058 #: build/C/man7/ddp.7:65
1059 msgid ""
1060 "Raw sockets may be opened only by a process with effective user ID 0 or when "
1061 "the process has the B<CAP_NET_RAW> capability."
1062 msgstr ""
1063
1064 #. type: SS
1065 #: build/C/man7/ddp.7:65 build/C/man7/ip.7:123 build/C/man7/ipv6.7:142 build/C/man7/raw.7:93 build/C/man7/udp.7:98 build/C/man7/udplite.7:58 build/C/man7/unix.7:57
1066 #, no-wrap
1067 msgid "Address format"
1068 msgstr ""
1069
1070 #. type: Plain text
1071 #: build/C/man7/ddp.7:68
1072 msgid ""
1073 "An AppleTalk socket address is defined as a combination of a network number, "
1074 "a node number, and a port number."
1075 msgstr ""
1076
1077 #. type: Plain text
1078 #: build/C/man7/ddp.7:75
1079 #, no-wrap
1080 msgid ""
1081 "struct at_addr {\n"
1082 "    unsigned short s_net;\n"
1083 "    unsigned char  s_node;\n"
1084 "};\n"
1085 msgstr ""
1086
1087 #. type: Plain text
1088 #: build/C/man7/ddp.7:81
1089 #, no-wrap
1090 msgid ""
1091 "struct sockaddr_atalk {\n"
1092 "    sa_family_t    sat_family;    /* address family */\n"
1093 "    unsigned char  sat_port;      /* port */\n"
1094 "    struct at_addr sat_addr;      /* net/node */\n"
1095 "};\n"
1096 msgstr ""
1097
1098 #.  FIXME . this doesn't make sense [johnl]
1099 #. type: Plain text
1100 #: build/C/man7/ddp.7:120
1101 msgid ""
1102 "I<sat_family> is always set to B<AF_APPLETALK>.  I<sat_port> contains the "
1103 "port.  The port numbers below 129 are known as I<reserved ports>.  Only "
1104 "processes with the effective user ID 0 or the B<CAP_NET_BIND_SERVICE> "
1105 "capability may B<bind>(2)  to these sockets.  I<sat_addr> is the host "
1106 "address.  The I<net> member of I<struct at_addr> contains the host network "
1107 "in network byte order.  The value of B<AT_ANYNET> is a wildcard and also "
1108 "implies \\(lqthis network.\\(rq The I<node> member of I<struct at_addr> "
1109 "contains the host node number.  The value of B<AT_ANYNODE> is a wildcard and "
1110 "also implies \\(lqthis node.\\(rq The value of B<ATADDR_BCAST> is a link "
1111 "local broadcast address."
1112 msgstr ""
1113
1114 #. type: SS
1115 #: build/C/man7/ddp.7:120 build/C/man7/ip.7:224 build/C/man7/ipv6.7:192 build/C/man7/packet.7:180 build/C/man7/raw.7:109 build/C/man7/tcp.7:889 build/C/man7/udp.7:178 build/C/man7/udplite.7:67 build/C/man7/unix.7:220 build/C/man7/x25.7:72
1116 #, no-wrap
1117 msgid "Socket options"
1118 msgstr ""
1119
1120 #. type: Plain text
1121 #: build/C/man7/ddp.7:122
1122 msgid "No protocol-specific socket options are supported."
1123 msgstr ""
1124
1125 #. type: Plain text
1126 #: build/C/man7/ddp.7:128
1127 msgid ""
1128 "IP supports a set of I</proc> interfaces to configure some global AppleTalk "
1129 "parameters.  The parameters can be accessed by reading or writing files in "
1130 "the directory I</proc/sys/net/atalk/>."
1131 msgstr ""
1132
1133 #. type: TP
1134 #: build/C/man7/ddp.7:128
1135 #, no-wrap
1136 msgid "I<aarp-expiry-time>"
1137 msgstr ""
1138
1139 #. type: Plain text
1140 #: build/C/man7/ddp.7:131
1141 msgid "The time interval (in seconds) before an AARP cache entry expires."
1142 msgstr ""
1143
1144 #. type: TP
1145 #: build/C/man7/ddp.7:131
1146 #, no-wrap
1147 msgid "I<aarp-resolve-time>"
1148 msgstr ""
1149
1150 #. type: Plain text
1151 #: build/C/man7/ddp.7:134
1152 msgid "The time interval (in seconds) before an AARP cache entry is resolved."
1153 msgstr ""
1154
1155 #. type: TP
1156 #: build/C/man7/ddp.7:134
1157 #, no-wrap
1158 msgid "I<aarp-retransmit-limit>"
1159 msgstr ""
1160
1161 #. type: Plain text
1162 #: build/C/man7/ddp.7:138
1163 msgid ""
1164 "The number of retransmissions of an AARP query before the node is declared "
1165 "dead."
1166 msgstr ""
1167
1168 #. type: TP
1169 #: build/C/man7/ddp.7:138
1170 #, no-wrap
1171 msgid "I<aarp-tick-time>"
1172 msgstr ""
1173
1174 #. type: Plain text
1175 #: build/C/man7/ddp.7:141
1176 msgid "The timer rate (in seconds) for the timer driving AARP."
1177 msgstr ""
1178
1179 #. type: Plain text
1180 #: build/C/man7/ddp.7:144
1181 msgid ""
1182 "The default values match the specification and should never need to be "
1183 "changed."
1184 msgstr ""
1185
1186 #.  FIXME . Add a section about multicasting
1187 #. type: Plain text
1188 #: build/C/man7/ddp.7:149
1189 msgid "All ioctls described in B<socket>(7)  apply to DDP."
1190 msgstr ""
1191
1192 #. type: SH
1193 #: build/C/man7/ddp.7:149 build/C/man3/gethostbyname.3:292 build/C/man3/getnetent_r.3:129 build/C/man2/getpeername.2:73 build/C/man3/getprotoent_r.3:119 build/C/man3/getservent_r.3:118 build/C/man3/inet_net_pton.3:145 build/C/man3/inet_ntop.3:91 build/C/man7/ip.7:1092 build/C/man7/ipv6.7:351 build/C/man7/packet.7:496 build/C/man7/raw.7:144 build/C/man2/shutdown.2:74 build/C/man7/tcp.7:1226 build/C/man7/udp.7:241 build/C/man7/udplite.7:121 build/C/man7/unix.7:405
1194 #, no-wrap
1195 msgid "ERRORS"
1196 msgstr ""
1197
1198 #. type: TP
1199 #: build/C/man7/ddp.7:153 build/C/man7/ip.7:1096 build/C/man7/raw.7:145
1200 #, no-wrap
1201 msgid "B<EACCES>"
1202 msgstr ""
1203
1204 #. type: Plain text
1205 #: build/C/man7/ddp.7:160
1206 msgid ""
1207 "The user tried to execute an operation without the necessary permissions.  "
1208 "These include sending to a broadcast address without having the broadcast "
1209 "flag set, and trying to bind to a reserved port without effective user ID 0 "
1210 "or B<CAP_NET_BIND_SERVICE>."
1211 msgstr ""
1212
1213 #. type: TP
1214 #: build/C/man7/ddp.7:160 build/C/man7/ip.7:1112 build/C/man7/unix.7:406
1215 #, no-wrap
1216 msgid "B<EADDRINUSE>"
1217 msgstr ""
1218
1219 #. type: Plain text
1220 #: build/C/man7/ddp.7:163 build/C/man7/ip.7:1115
1221 msgid "Tried to bind to an address already in use."
1222 msgstr ""
1223
1224 #. type: TP
1225 #: build/C/man7/ddp.7:163 build/C/man7/ip.7:1115 build/C/man7/packet.7:497
1226 #, no-wrap
1227 msgid "B<EADDRNOTAVAIL>"
1228 msgstr ""
1229
1230 #. type: Plain text
1231 #: build/C/man7/ddp.7:167 build/C/man7/ip.7:1119
1232 msgid ""
1233 "A nonexistent interface was requested or the requested source address was "
1234 "not local."
1235 msgstr ""
1236
1237 #. type: TP
1238 #: build/C/man7/ddp.7:167 build/C/man7/ip.7:1119
1239 #, no-wrap
1240 msgid "B<EAGAIN>"
1241 msgstr ""
1242
1243 #. type: Plain text
1244 #: build/C/man7/ddp.7:170 build/C/man7/ip.7:1122
1245 msgid "Operation on a nonblocking socket would block."
1246 msgstr ""
1247
1248 #. type: TP
1249 #: build/C/man7/ddp.7:170 build/C/man7/ip.7:1122
1250 #, no-wrap
1251 msgid "B<EALREADY>"
1252 msgstr ""
1253
1254 #. type: Plain text
1255 #: build/C/man7/ddp.7:173
1256 msgid "A connection operation on a nonblocking socket is already in progress."
1257 msgstr ""
1258
1259 #. type: TP
1260 #: build/C/man7/ddp.7:173 build/C/man7/ip.7:1125
1261 #, no-wrap
1262 msgid "B<ECONNABORTED>"
1263 msgstr ""
1264
1265 #. type: Plain text
1266 #: build/C/man7/ddp.7:177 build/C/man7/ip.7:1129
1267 msgid "A connection was closed during an B<accept>(2)."
1268 msgstr ""
1269
1270 #. type: TP
1271 #: build/C/man7/ddp.7:177 build/C/man7/ip.7:1129
1272 #, no-wrap
1273 msgid "B<EHOSTUNREACH>"
1274 msgstr ""
1275
1276 #. type: Plain text
1277 #: build/C/man7/ddp.7:180
1278 msgid "No routing table entry matches the destination address."
1279 msgstr ""
1280
1281 #. type: TP
1282 #: build/C/man7/ddp.7:180 build/C/man2/getpeername.2:85 build/C/man7/ip.7:1134 build/C/man7/packet.7:503 build/C/man7/raw.7:152 build/C/man2/shutdown.2:79 build/C/man7/unix.7:422
1283 #, no-wrap
1284 msgid "B<EINVAL>"
1285 msgstr ""
1286
1287 #. type: Plain text
1288 #: build/C/man7/ddp.7:183
1289 msgid "Invalid argument passed."
1290 msgstr ""
1291
1292 #. type: TP
1293 #: build/C/man7/ddp.7:183 build/C/man7/ip.7:1140 build/C/man7/unix.7:431
1294 #, no-wrap
1295 msgid "B<EISCONN>"
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: build/C/man7/ddp.7:187 build/C/man7/ip.7:1144
1300 msgid "B<connect>(2)  was called on an already connected socket."
1301 msgstr ""
1302
1303 #. type: TP
1304 #: build/C/man7/ddp.7:187 build/C/man3/inet_net_pton.3:151 build/C/man7/ip.7:1144 build/C/man7/packet.7:506 build/C/man7/raw.7:155
1305 #, no-wrap
1306 msgid "B<EMSGSIZE>"
1307 msgstr ""
1308
1309 #. type: Plain text
1310 #: build/C/man7/ddp.7:190
1311 msgid "Datagram is bigger than the DDP MTU."
1312 msgstr ""
1313
1314 #. type: TP
1315 #: build/C/man7/ddp.7:190 build/C/man7/ipv6.7:352 build/C/man7/packet.7:515
1316 #, no-wrap
1317 msgid "B<ENODEV>"
1318 msgstr ""
1319
1320 #. type: Plain text
1321 #: build/C/man7/ddp.7:193
1322 msgid "Network device not available or not capable of sending IP."
1323 msgstr ""
1324
1325 #. type: TP
1326 #: build/C/man7/ddp.7:193 build/C/man3/getnetent_r.3:130 build/C/man3/getprotoent_r.3:120 build/C/man3/getservent_r.3:119 build/C/man3/inet_net_pton.3:154 build/C/man7/ip.7:1152 build/C/man7/packet.7:518 build/C/man7/unix.7:436
1327 #, no-wrap
1328 msgid "B<ENOENT>"
1329 msgstr ""
1330
1331 #. type: Plain text
1332 #: build/C/man7/ddp.7:197 build/C/man7/ip.7:1156
1333 msgid "B<SIOCGSTAMP> was called on a socket where no packet arrived."
1334 msgstr ""
1335
1336 #. type: TP
1337 #: build/C/man7/ddp.7:197
1338 #, no-wrap
1339 msgid "B<ENOMEM> and B<ENOBUFS>"
1340 msgstr ""
1341
1342 #. type: Plain text
1343 #: build/C/man7/ddp.7:200
1344 msgid "Not enough memory available."
1345 msgstr ""
1346
1347 #. type: TP
1348 #: build/C/man7/ddp.7:200 build/C/man7/ip.7:1156
1349 #, no-wrap
1350 msgid "B<ENOPKG>"
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: build/C/man7/ddp.7:203 build/C/man7/ip.7:1159
1355 msgid "A kernel subsystem was not configured."
1356 msgstr ""
1357
1358 #. type: TP
1359 #: build/C/man7/ddp.7:203 build/C/man7/ip.7:1159
1360 #, no-wrap
1361 msgid "B<ENOPROTOOPT> and B<EOPNOTSUPP>"
1362 msgstr ""
1363
1364 #. type: Plain text
1365 #: build/C/man7/ddp.7:206 build/C/man7/ip.7:1162
1366 msgid "Invalid socket option passed."
1367 msgstr ""
1368
1369 #. type: TP
1370 #: build/C/man7/ddp.7:206 build/C/man2/getpeername.2:93 build/C/man7/ip.7:1162 build/C/man7/packet.7:521 build/C/man2/shutdown.2:84 build/C/man7/unix.7:444
1371 #, no-wrap
1372 msgid "B<ENOTCONN>"
1373 msgstr ""
1374
1375 #. type: Plain text
1376 #: build/C/man7/ddp.7:210 build/C/man7/ip.7:1166
1377 msgid ""
1378 "The operation is defined only on a connected socket, but the socket wasn't "
1379 "connected."
1380 msgstr ""
1381
1382 #. type: TP
1383 #: build/C/man7/ddp.7:210 build/C/man7/ip.7:1166 build/C/man7/packet.7:527 build/C/man7/raw.7:166 build/C/man7/unix.7:451
1384 #, no-wrap
1385 msgid "B<EPERM>"
1386 msgstr ""
1387
1388 #. type: Plain text
1389 #: build/C/man7/ddp.7:215
1390 msgid ""
1391 "User doesn't have permission to set high priority, make a configuration "
1392 "change, or send signals to the requested process or group."
1393 msgstr ""
1394
1395 #. type: TP
1396 #: build/C/man7/ddp.7:215 build/C/man7/ip.7:1170 build/C/man7/tcp.7:1233 build/C/man7/unix.7:455
1397 #, no-wrap
1398 msgid "B<EPIPE>"
1399 msgstr ""
1400
1401 #. type: Plain text
1402 #: build/C/man7/ddp.7:218 build/C/man7/ip.7:1173
1403 msgid "The connection was unexpectedly closed or shut down by the other end."
1404 msgstr ""
1405
1406 #. type: TP
1407 #: build/C/man7/ddp.7:218 build/C/man7/ip.7:1173 build/C/man7/unix.7:477
1408 #, no-wrap
1409 msgid "B<ESOCKTNOSUPPORT>"
1410 msgstr ""
1411
1412 #. type: Plain text
1413 #: build/C/man7/ddp.7:221
1414 msgid "The socket was unconfigured, or an unknown socket type was requested."
1415 msgstr ""
1416
1417 #. type: Plain text
1418 #: build/C/man7/ddp.7:226
1419 msgid ""
1420 "AppleTalk is supported by Linux 2.0 or higher.  The I</proc> interfaces "
1421 "exist since Linux 2.2."
1422 msgstr ""
1423
1424 #. type: Plain text
1425 #: build/C/man7/ddp.7:232
1426 msgid ""
1427 "Be very careful with the B<SO_BROADCAST> option - it is not privileged in "
1428 "Linux.  It is easy to overload the network with careless sending to "
1429 "broadcast addresses."
1430 msgstr ""
1431
1432 #. type: SS
1433 #: build/C/man7/ddp.7:232 build/C/man7/ip.7:1232 build/C/man7/packet.7:569
1434 #, no-wrap
1435 msgid "Compatibility"
1436 msgstr ""
1437
1438 #. type: Plain text
1439 #: build/C/man7/ddp.7:239
1440 msgid ""
1441 "The basic AppleTalk socket interface is compatible with B<netatalk> on "
1442 "BSD-derived systems.  Many BSD systems fail to check B<SO_BROADCAST> when "
1443 "sending broadcast frames; this can lead to compatibility problems."
1444 msgstr ""
1445
1446 #. type: Plain text
1447 #: build/C/man7/ddp.7:244
1448 msgid ""
1449 "The raw socket mode is unique to Linux and exists to support the alternative "
1450 "CAP package and AppleTalk monitoring tools more easily."
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man7/ddp.7:246 build/C/man7/ip.7:1247
1455 msgid "There are too many inconsistent error values."
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man7/ddp.7:249
1460 msgid ""
1461 "The ioctls used to configure routing tables, devices, AARP tables and other "
1462 "devices are not yet described."
1463 msgstr ""
1464
1465 #. type: Plain text
1466 #: build/C/man7/ddp.7:254
1467 msgid "B<recvmsg>(2), B<sendmsg>(2), B<capabilities>(7), B<socket>(7)"
1468 msgstr ""
1469
1470 #. type: TH
1471 #: build/C/man3/endian.3:28
1472 #, no-wrap
1473 msgid "ENDIAN"
1474 msgstr ""
1475
1476 #. type: TH
1477 #: build/C/man3/endian.3:28 build/C/man3/getnetent_r.3:26 build/C/man3/getprotoent_r.3:26 build/C/man3/getservent_r.3:26
1478 #, no-wrap
1479 msgid "2010-09-10"
1480 msgstr ""
1481
1482 #. type: Plain text
1483 #: build/C/man3/endian.3:33
1484 msgid ""
1485 "htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, "
1486 "htobe64, htole64, be64toh, le64toh - convert values between host and "
1487 "big-/little-endian byte order"
1488 msgstr ""
1489
1490 #. type: Plain text
1491 #: build/C/man3/endian.3:37
1492 #, no-wrap
1493 msgid ""
1494 "B<#define _BSD_SOURCE>             /* See feature_test_macros(7) */\n"
1495 "B<#include E<lt>endian.hE<gt>>\n"
1496 msgstr ""
1497
1498 #. type: Plain text
1499 #: build/C/man3/endian.3:42
1500 #, no-wrap
1501 msgid ""
1502 "B<uint16_t htobe16(uint16_t >I<host_16bits>B<);>\n"
1503 "B<uint16_t htole16(uint16_t >I<host_16bits>B<);>\n"
1504 "B<uint16_t be16toh(uint16_t >I<big_endian_16bits>B<);>\n"
1505 "B<uint16_t le16toh(uint16_t >I<little_endian_16bits>B<);>\n"
1506 msgstr ""
1507
1508 #. type: Plain text
1509 #: build/C/man3/endian.3:47
1510 #, no-wrap
1511 msgid ""
1512 "B<uint32_t htobe32(uint32_t >I<host_32bits>B<);>\n"
1513 "B<uint32_t htole32(uint32_t >I<host_32bits>B<);>\n"
1514 "B<uint32_t be32toh(uint32_t >I<big_endian_32bits>B<);>\n"
1515 "B<uint32_t le32toh(uint32_t >I<little_endian_32bits>B<);>\n"
1516 msgstr ""
1517
1518 #. type: Plain text
1519 #: build/C/man3/endian.3:52
1520 #, no-wrap
1521 msgid ""
1522 "B<uint64_t htobe64(uint64_t >I<host_64bits>B<);>\n"
1523 "B<uint64_t htole64(uint64_t >I<host_64bits>B<);>\n"
1524 "B<uint64_t be64toh(uint64_t >I<big_endian_64bits>B<);>\n"
1525 "B<uint64_t le64toh(uint64_t >I<little_endian_64bits>B<);>\n"
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man3/endian.3:57
1530 msgid ""
1531 "These functions convert the byte encoding of integer values from the byte "
1532 "order that the current CPU (the \"host\") uses, to and from little-endian "
1533 "and big-endian byte order."
1534 msgstr ""
1535
1536 #. type: Plain text
1537 #: build/C/man3/endian.3:62
1538 msgid ""
1539 "The number, I<nn>, in the name of each function indicates the size of "
1540 "integer handled by the function, either 16, 32, or 64 bits."
1541 msgstr ""
1542
1543 #. type: Plain text
1544 #: build/C/man3/endian.3:65
1545 msgid ""
1546 "The functions with names of the form \"htobeI<nn>\" convert from host byte "
1547 "order to big-endian order."
1548 msgstr ""
1549
1550 #. type: Plain text
1551 #: build/C/man3/endian.3:68
1552 msgid ""
1553 "The functions with names of the form \"htoleI<nn>\" convert from host byte "
1554 "order to little-endian order."
1555 msgstr ""
1556
1557 #. type: Plain text
1558 #: build/C/man3/endian.3:71
1559 msgid ""
1560 "The functions with names of the form \"beI<nn>toh\" convert from big-endian "
1561 "order to host byte order."
1562 msgstr ""
1563
1564 #. type: Plain text
1565 #: build/C/man3/endian.3:74
1566 msgid ""
1567 "The functions with names of the form \"leI<nn>toh\" convert from "
1568 "little-endian order to host byte order."
1569 msgstr ""
1570
1571 #. type: Plain text
1572 #: build/C/man3/endian.3:76
1573 msgid "These functions were added to glibc in version 2.9."
1574 msgstr ""
1575
1576 #. type: Plain text
1577 #: build/C/man3/endian.3:91
1578 msgid ""
1579 "These functions are nonstandard.  Similar functions are present on the BSDs, "
1580 "where the required header file is I<E<lt>sys/endian.hE<gt>> instead of "
1581 "I<E<lt>endian.hE<gt>>.  Unfortunately, NetBSD, FreeBSD, and glibc haven't "
1582 "followed the original OpenBSD naming convention for these functions, whereby "
1583 "the I<nn> component always appears at the end of the function name (thus, "
1584 "for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs "
1585 "\"betoh32\" is \"be32toh\")."
1586 msgstr ""
1587
1588 #. type: Plain text
1589 #: build/C/man3/endian.3:99
1590 msgid ""
1591 "These functions are similar to the older B<byteorder>(3)  family of "
1592 "functions.  For example, B<be32toh>()  is identical to B<ntohl>()."
1593 msgstr ""
1594
1595 #. type: Plain text
1596 #: build/C/man3/endian.3:107
1597 msgid ""
1598 "The advantage of the B<byteorder>(3)  functions is that they are standard "
1599 "functions available on all UNIX systems.  On the other hand, the fact that "
1600 "they were designed for use in the context of TCP/IP means that they lack the "
1601 "64-bit and little-endian variants described in this page."
1602 msgstr ""
1603
1604 #. type: Plain text
1605 #: build/C/man3/endian.3:114
1606 msgid ""
1607 "The program below display the results of converting an integer from host "
1608 "byte order to both little-endian and big-endian byte order.  Since host byte "
1609 "order is either little-endian or big-endian, only one of these conversions "
1610 "will have an effect.  When we run this program on a little-endian system "
1611 "such as x86-32, we see the following:"
1612 msgstr ""
1613
1614 #. type: Plain text
1615 #: build/C/man3/endian.3:121
1616 #, no-wrap
1617 msgid ""
1618 "$ B<./a.out>\n"
1619 "x.u32 = 0x44332211\n"
1620 "htole32(x.u32) = 0x44332211\n"
1621 "htobe32(x.u32) = 0x11223344\n"
1622 msgstr ""
1623
1624 #. type: SS
1625 #: build/C/man3/endian.3:123 build/C/man3/getprotoent_r.3:162 build/C/man3/getservent_r.3:160 build/C/man3/inet.3:278 build/C/man3/inet_net_pton.3:331 build/C/man3/inet_pton.3:173
1626 #, no-wrap
1627 msgid "Program source"
1628 msgstr ""
1629
1630 #. type: Plain text
1631 #: build/C/man3/endian.3:130
1632 #, no-wrap
1633 msgid ""
1634 "#include E<lt>endian.hE<gt>\n"
1635 "#include E<lt>stdint.hE<gt>\n"
1636 "#include E<lt>stdio.hE<gt>\n"
1637 "#include E<lt>stdlib.hE<gt>\n"
1638 msgstr ""
1639
1640 #. type: Plain text
1641 #: build/C/man3/endian.3:138
1642 #, no-wrap
1643 msgid ""
1644 "int\n"
1645 "main(int argc, char *argv[])\n"
1646 "{\n"
1647 "    union {\n"
1648 "        uint32_t u32;\n"
1649 "        uint8_t arr[4];\n"
1650 "    } x;\n"
1651 msgstr ""
1652
1653 #. type: Plain text
1654 #: build/C/man3/endian.3:143
1655 #, no-wrap
1656 msgid ""
1657 "    x.arr[0] = 0x11;\t/* Lowest-address byte */\n"
1658 "    x.arr[1] = 0x22;\n"
1659 "    x.arr[2] = 0x33;\n"
1660 "    x.arr[3] = 0x44;\t/* Highest-address byte */\n"
1661 msgstr ""
1662
1663 #. type: Plain text
1664 #: build/C/man3/endian.3:147
1665 #, no-wrap
1666 msgid ""
1667 "    printf(\"x.u32 = 0x%x\\en\", x.u32);\n"
1668 "    printf(\"htole32(x.u32) = 0x%x\\en\", htole32(x.u32));\n"
1669 "    printf(\"htobe32(x.u32) = 0x%x\\en\", htobe32(x.u32));\n"
1670 msgstr ""
1671
1672 #. type: Plain text
1673 #: build/C/man3/endian.3:150 build/C/man3/getaddrinfo.3:827 build/C/man3/getprotoent_r.3:236 build/C/man3/getservent_r.3:240 build/C/man3/inet_net_pton.3:389 build/C/man3/inet_pton.3:214
1674 #, no-wrap
1675 msgid ""
1676 "    exit(EXIT_SUCCESS);\n"
1677 "}\n"
1678 msgstr ""
1679
1680 #. type: Plain text
1681 #: build/C/man3/endian.3:153
1682 msgid "B<byteorder>(3)"
1683 msgstr ""
1684
1685 #. type: TH
1686 #: build/C/man3/ether_aton.3:31
1687 #, no-wrap
1688 msgid "ETHER_ATON"
1689 msgstr ""
1690
1691 #. type: TH
1692 #: build/C/man3/ether_aton.3:31 build/C/man7/udplite.7:27
1693 #, no-wrap
1694 msgid "2014-07-08"
1695 msgstr ""
1696
1697 #. type: Plain text
1698 #: build/C/man3/ether_aton.3:35
1699 msgid ""
1700 "ether_aton, ether_ntoa, ether_ntohost, ether_hostton, ether_line, "
1701 "ether_ntoa_r, ether_aton_r - Ethernet address manipulation routines"
1702 msgstr ""
1703
1704 #. type: Plain text
1705 #: build/C/man3/ether_aton.3:38
1706 #, no-wrap
1707 msgid "B<#include E<lt>netinet/ether.hE<gt>>\n"
1708 msgstr ""
1709
1710 #. type: Plain text
1711 #: build/C/man3/ether_aton.3:40
1712 #, no-wrap
1713 msgid "B<char *ether_ntoa(const struct ether_addr *>I<addr>B<);>\n"
1714 msgstr ""
1715
1716 #. type: Plain text
1717 #: build/C/man3/ether_aton.3:42
1718 #, no-wrap
1719 msgid "B<struct ether_addr *ether_aton(const char *>I<asc>B<);>\n"
1720 msgstr ""
1721
1722 #. type: Plain text
1723 #: build/C/man3/ether_aton.3:44
1724 #, no-wrap
1725 msgid ""
1726 "B<int ether_ntohost(char *>I<hostname>B<, const struct ether_addr "
1727 "*>I<addr>B<);>\n"
1728 msgstr ""
1729
1730 #. type: Plain text
1731 #: build/C/man3/ether_aton.3:46
1732 #, no-wrap
1733 msgid ""
1734 "B<int ether_hostton(const char *>I<hostname>B<, struct ether_addr "
1735 "*>I<addr>B<);>\n"
1736 msgstr ""
1737
1738 #. type: Plain text
1739 #: build/C/man3/ether_aton.3:49
1740 #, no-wrap
1741 msgid ""
1742 "B<int ether_line(const char *>I<line>B<, struct ether_addr *>I<addr>B<,>\n"
1743 "B<               char *>I<hostname>B<);>\n"
1744 msgstr ""
1745
1746 #. type: Plain text
1747 #: build/C/man3/ether_aton.3:51 build/C/man3/gethostbyname.3:70
1748 #, no-wrap
1749 msgid "/* GNU extensions */\n"
1750 msgstr ""
1751
1752 #. type: Plain text
1753 #: build/C/man3/ether_aton.3:53
1754 #, no-wrap
1755 msgid ""
1756 "B<char *ether_ntoa_r(const struct ether_addr *>I<addr>B<, char "
1757 "*>I<buf>B<);>\n"
1758 msgstr ""
1759
1760 #. type: Plain text
1761 #: build/C/man3/ether_aton.3:56
1762 #, no-wrap
1763 msgid ""
1764 "B<struct ether_addr *ether_aton_r(const char *>I<asc>B<,>\n"
1765 "B<                                struct ether_addr *>I<addr>B<);>\n"
1766 msgstr ""
1767
1768 #. type: Plain text
1769 #: build/C/man3/ether_aton.3:67
1770 msgid ""
1771 "B<ether_aton>()  converts the 48-bit Ethernet host address I<asc> from the "
1772 "standard hex-digits-and-colons notation into binary data in network byte "
1773 "order and returns a pointer to it in a statically allocated buffer, which "
1774 "subsequent calls will overwrite.  B<ether_aton>()  returns NULL if the "
1775 "address is invalid."
1776 msgstr ""
1777
1778 #. type: Plain text
1779 #: build/C/man3/ether_aton.3:76
1780 msgid ""
1781 "The B<ether_ntoa>()  function converts the Ethernet host address I<addr> "
1782 "given in network byte order to a string in standard hex-digits-and-colons "
1783 "notation, omitting leading zeros.  The string is returned in a statically "
1784 "allocated buffer, which subsequent calls will overwrite."
1785 msgstr ""
1786
1787 #. type: Plain text
1788 #: build/C/man3/ether_aton.3:83
1789 msgid ""
1790 "The B<ether_ntohost>()  function maps an Ethernet address to the "
1791 "corresponding hostname in I</etc/ethers> and returns nonzero if it cannot be "
1792 "found."
1793 msgstr ""
1794
1795 #. type: Plain text
1796 #: build/C/man3/ether_aton.3:90
1797 msgid ""
1798 "The B<ether_hostton>()  function maps a hostname to the corresponding "
1799 "Ethernet address in I</etc/ethers> and returns nonzero if it cannot be "
1800 "found."
1801 msgstr ""
1802
1803 #. type: Plain text
1804 #: build/C/man3/ether_aton.3:102
1805 msgid ""
1806 "The B<ether_line>()  function parses a line in I</etc/ethers> format "
1807 "(ethernet address followed by whitespace followed by hostname; \\(aq#\\(aq "
1808 "introduces a comment) and returns an address and hostname pair, or nonzero "
1809 "if it cannot be parsed.  The buffer pointed to by I<hostname> must be "
1810 "sufficiently long, for example, have the same length as I<line>."
1811 msgstr ""
1812
1813 #. type: Plain text
1814 #: build/C/man3/ether_aton.3:113
1815 msgid ""
1816 "The functions B<ether_ntoa_r>()  and B<ether_aton_r>()  are reentrant "
1817 "thread-safe versions of B<ether_ntoa>()  and B<ether_aton>()  respectively, "
1818 "and do not use static buffers."
1819 msgstr ""
1820
1821 #. type: Plain text
1822 #: build/C/man3/ether_aton.3:119
1823 msgid "The structure I<ether_addr> is defined in I<E<lt>net/ethernet.hE<gt>> as:"
1824 msgstr ""
1825
1826 #. type: Plain text
1827 #: build/C/man3/ether_aton.3:125
1828 #, no-wrap
1829 msgid ""
1830 "struct ether_addr {\n"
1831 "    uint8_t ether_addr_octet[6];\n"
1832 "}\n"
1833 msgstr ""
1834
1835 #. type: Plain text
1836 #: build/C/man3/ether_aton.3:130
1837 msgid "For an explanation of the terms used in this section, see B<attributes>(7)."
1838 msgstr ""
1839
1840 #. type: tbl table
1841 #: build/C/man3/ether_aton.3:135
1842 #, no-wrap
1843 msgid "Interface\tAttribute\tValue\n"
1844 msgstr ""
1845
1846 #. type: tbl table
1847 #: build/C/man3/ether_aton.3:136 build/C/man3/ether_aton.3:140
1848 #, no-wrap
1849 msgid "T{\n"
1850 msgstr ""
1851
1852 #. type: tbl table
1853 #: build/C/man3/ether_aton.3:137
1854 #, no-wrap
1855 msgid "B<ether_aton>(),\n"
1856 msgstr ""
1857
1858 #. type: tbl table
1859 #: build/C/man3/ether_aton.3:138
1860 #, no-wrap
1861 msgid "B<ether_ntoa>()\n"
1862 msgstr ""
1863
1864 #. type: tbl table
1865 #: build/C/man3/ether_aton.3:139
1866 #, no-wrap
1867 msgid "T}\tThread safety\tMT-Unsafe\n"
1868 msgstr ""
1869
1870 #. type: tbl table
1871 #: build/C/man3/ether_aton.3:141
1872 #, no-wrap
1873 msgid "B<ether_ntohost>(),\n"
1874 msgstr ""
1875
1876 #. type: tbl table
1877 #: build/C/man3/ether_aton.3:142
1878 #, no-wrap
1879 msgid "B<ether_hostton>(),\n"
1880 msgstr ""
1881
1882 #. type: tbl table
1883 #: build/C/man3/ether_aton.3:143
1884 #, no-wrap
1885 msgid "B<ether_line>(),\n"
1886 msgstr ""
1887
1888 #. type: tbl table
1889 #: build/C/man3/ether_aton.3:144
1890 #, no-wrap
1891 msgid "B<ether_ntoa_r>(),\n"
1892 msgstr ""
1893
1894 #. type: tbl table
1895 #: build/C/man3/ether_aton.3:145
1896 #, no-wrap
1897 msgid "B<ether_aton_r>()\n"
1898 msgstr ""
1899
1900 #. type: tbl table
1901 #: build/C/man3/ether_aton.3:146
1902 #, no-wrap
1903 msgid "T}\tThread safety\tMT-Safe\n"
1904 msgstr ""
1905
1906 #. type: Plain text
1907 #: build/C/man3/ether_aton.3:151
1908 msgid "4.3BSD, SunOS."
1909 msgstr ""
1910
1911 #.  The fix was presumably commit c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7
1912 #.  which was in glibc 2.3
1913 #. type: Plain text
1914 #: build/C/man3/ether_aton.3:157
1915 msgid ""
1916 "In glibc 2.2.5 and earlier, the implementation of B<ether_line>()  is "
1917 "broken."
1918 msgstr ""
1919
1920 #. type: Plain text
1921 #: build/C/man3/ether_aton.3:159
1922 msgid "B<ethers>(5)"
1923 msgstr ""
1924
1925 #. type: TH
1926 #: build/C/man5/gai.conf.5:19
1927 #, no-wrap
1928 msgid "GAI.CONF"
1929 msgstr ""
1930
1931 #. type: TH
1932 #: build/C/man5/gai.conf.5:19 build/C/man5/nss.5:19
1933 #, no-wrap
1934 msgid "2013-02-13"
1935 msgstr ""
1936
1937 #. type: Plain text
1938 #: build/C/man5/gai.conf.5:22
1939 msgid "gai.conf - getaddrinfo(3) configuration file"
1940 msgstr ""
1941
1942 #. type: Plain text
1943 #: build/C/man5/gai.conf.5:36
1944 msgid ""
1945 "A call to B<getaddrinfo>(3)  might return multiple answers.  According to "
1946 "RFC\\ 3484 these answers must be sorted so that the answer with the highest "
1947 "success rate is first in the list.  The RFC provides an algorithm for the "
1948 "sorting.  The static rules are not always adequate, though.  For this "
1949 "reason, the RFC also requires that system administrators should have the "
1950 "possibility to dynamically change the sorting.  For the glibc "
1951 "implementation, this can be achieved with the I</etc/gai.conf> file."
1952 msgstr ""
1953
1954 #. type: Plain text
1955 #: build/C/man5/gai.conf.5:40
1956 msgid ""
1957 "Each line in the configuration file consists of a keyword and its "
1958 "parameters.  White spaces in any place are ignored.  Lines starting with "
1959 "\\(aq#\\(aq are comments and are ignored."
1960 msgstr ""
1961
1962 #. type: Plain text
1963 #: build/C/man5/gai.conf.5:42
1964 msgid "The keywords currently recognized are:"
1965 msgstr ""
1966
1967 #. type: TP
1968 #: build/C/man5/gai.conf.5:42
1969 #, no-wrap
1970 msgid "B<label> I<netmask> I<precedence>"
1971 msgstr ""
1972
1973 #. type: Plain text
1974 #: build/C/man5/gai.conf.5:51
1975 msgid ""
1976 "The value is added to the label table used in the RFC\\ 3484 sorting.  If "
1977 "any B<label> definition is present in the configuration file is present, the "
1978 "default table is not used.  All the label definitions of the default table "
1979 "which are to be maintained have to be duplicated.  Following the keyword, "
1980 "the line has to contain a network mask and a label value."
1981 msgstr ""
1982
1983 #. type: TP
1984 #: build/C/man5/gai.conf.5:51
1985 #, no-wrap
1986 msgid "B<precedence> I<netmask> I<precedence>"
1987 msgstr ""
1988
1989 #. type: Plain text
1990 #: build/C/man5/gai.conf.5:58
1991 msgid ""
1992 "This keyword is similar to B<label>, but instead the value is added to the "
1993 "precedence table as specified in RFC\\ 3484.  Once again, the presence of a "
1994 "single B<precedence> line in the configuration file causes the default table "
1995 "to not be used."
1996 msgstr ""
1997
1998 #. type: TP
1999 #: build/C/man5/gai.conf.5:58
2000 #, no-wrap
2001 msgid "B<reload> E<lt>B<yes>|B<no>E<gt>"
2002 msgstr ""
2003
2004 #. type: Plain text
2005 #: build/C/man5/gai.conf.5:67
2006 msgid ""
2007 "This keyword controls whether a process checks whether the configuration "
2008 "file has been changed since the last time it was read.  If the value is "
2009 "\"B<yes>\", the file is reread.  This might cause problems in multithreaded "
2010 "applications and is generally a bad idea.  The default is \"B<no>\"."
2011 msgstr ""
2012
2013 #. type: TP
2014 #: build/C/man5/gai.conf.5:67
2015 #, no-wrap
2016 msgid "B<scopev4> I<mask> I<value>"
2017 msgstr ""
2018
2019 #. type: Plain text
2020 #: build/C/man5/gai.conf.5:72
2021 msgid ""
2022 "Add another rule to the RFC\\ 3484 scope table for IPv4 address.  By "
2023 "default, the scope IDs described in section 3.2 in RFC\\ 3438 are used.  "
2024 "Changing these defaults should hardly ever be necessary."
2025 msgstr ""
2026
2027 #. type: SH
2028 #: build/C/man5/gai.conf.5:72 build/C/man3/getaddrinfo.3:593 build/C/man3/gethostbyname.3:307 build/C/man3/getnameinfo.3:197 build/C/man3/getnetent.3:141 build/C/man3/getprotoent.3:134 build/C/man3/getservent.3:153 build/C/man5/host.conf.5:180 build/C/man5/hosts.5:86 build/C/man5/hosts.equiv.5:69 build/C/man5/networks.5:70 build/C/man5/nss.5:98 build/C/man5/nsswitch.conf.5:298 build/C/man5/protocols.5:77 build/C/man5/resolv.conf.5:298 build/C/man3/resolver.3:267 build/C/man5/services.5:185 build/C/man3/setnetgrent.3:88 build/C/man7/udplite.7:126
2029 #, no-wrap
2030 msgid "FILES"
2031 msgstr ""
2032
2033 #. type: Plain text
2034 #: build/C/man5/gai.conf.5:74 build/C/man3/getaddrinfo.3:595
2035 msgid "I</etc/gai.conf>"
2036 msgstr ""
2037
2038 #. type: Plain text
2039 #: build/C/man5/gai.conf.5:77
2040 msgid ""
2041 "The default table according to RFC\\ 3484 would be specified with the "
2042 "following configuration file:"
2043 msgstr ""
2044
2045 #. type: Plain text
2046 #: build/C/man5/gai.conf.5:89
2047 #, no-wrap
2048 msgid ""
2049 "label  ::1/128       0\n"
2050 "label  ::/0          1\n"
2051 "label  2002::/16     2\n"
2052 "label ::/96          3\n"
2053 "label ::ffff:0:0/96  4\n"
2054 "precedence  ::1/128       50\n"
2055 "precedence  ::/0          40\n"
2056 "precedence  2002::/16     30\n"
2057 "precedence ::/96          20\n"
2058 "precedence ::ffff:0:0/96  10\n"
2059 msgstr ""
2060
2061 #. type: Plain text
2062 #: build/C/man5/gai.conf.5:96
2063 msgid "B<getaddrinfo>(3), RFC\\ 3484"
2064 msgstr ""
2065
2066 #. type: TH
2067 #: build/C/man3/getaddrinfo.3:44
2068 #, no-wrap
2069 msgid "GETADDRINFO"
2070 msgstr ""
2071
2072 #. type: TH
2073 #: build/C/man3/getaddrinfo.3:44
2074 #, no-wrap
2075 msgid "2014-04-06"
2076 msgstr ""
2077
2078 #. type: Plain text
2079 #: build/C/man3/getaddrinfo.3:48
2080 msgid ""
2081 "getaddrinfo, freeaddrinfo, gai_strerror - network address and service "
2082 "translation"
2083 msgstr ""
2084
2085 #. type: Plain text
2086 #: build/C/man3/getaddrinfo.3:53 build/C/man3/getipnodebyname.3:35
2087 #, no-wrap
2088 msgid ""
2089 "B<#include E<lt>sys/types.hE<gt>>\n"
2090 "B<#include E<lt>sys/socket.hE<gt>>\n"
2091 "B<#include E<lt>netdb.hE<gt>>\n"
2092 msgstr ""
2093
2094 #. type: Plain text
2095 #: build/C/man3/getaddrinfo.3:57
2096 #, no-wrap
2097 msgid ""
2098 "B<int getaddrinfo(const char *>I<node>B<, const char *>I<service>B<,>\n"
2099 "B<                const struct addrinfo *>I<hints>B<,>\n"
2100 "B<                struct addrinfo **>I<res>B<);>\n"
2101 msgstr ""
2102
2103 #. type: Plain text
2104 #: build/C/man3/getaddrinfo.3:59
2105 #, no-wrap
2106 msgid "B<void freeaddrinfo(struct addrinfo *>I<res>B<);>\n"
2107 msgstr ""
2108
2109 #. type: Plain text
2110 #: build/C/man3/getaddrinfo.3:61
2111 #, no-wrap
2112 msgid "B<const char *gai_strerror(int >I<errcode>B<);>\n"
2113 msgstr ""
2114
2115 #. type: Plain text
2116 #: build/C/man3/getaddrinfo.3:66 build/C/man3/gethostbyname.3:93 build/C/man3/getnameinfo.3:26 build/C/man3/getnetent_r.3:52 build/C/man3/getprotoent_r.3:49 build/C/man3/getservent_r.3:49 build/C/man3/inet.3:70 build/C/man3/inet_net_pton.3:45 build/C/man3/rcmd.3:81 build/C/man3/setnetgrent.3:34
2117 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2118 msgstr ""
2119
2120 #. type: Plain text
2121 #: build/C/man3/getaddrinfo.3:72
2122 msgid "B<getaddrinfo>(), B<freeaddrinfo>(), B<gai_strerror>():"
2123 msgstr ""
2124
2125 #. type: Plain text
2126 #: build/C/man3/getaddrinfo.3:74
2127 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2128 msgstr ""
2129
2130 #.  .BR getipnodebyname (3),
2131 #.  .BR getipnodebyaddr (3),
2132 #. type: Plain text
2133 #: build/C/man3/getaddrinfo.3:101
2134 msgid ""
2135 "Given I<node> and I<service>, which identify an Internet host and a service, "
2136 "B<getaddrinfo>()  returns one or more I<addrinfo> structures, each of which "
2137 "contains an Internet address that can be specified in a call to B<bind>(2)  "
2138 "or B<connect>(2).  The B<getaddrinfo>()  function combines the functionality "
2139 "provided by the B<gethostbyname>(3)  and B<getservbyname>(3)  functions into "
2140 "a single interface, but unlike the latter functions, B<getaddrinfo>()  is "
2141 "reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies."
2142 msgstr ""
2143
2144 #. type: Plain text
2145 #: build/C/man3/getaddrinfo.3:107
2146 msgid ""
2147 "The I<addrinfo> structure used by B<getaddrinfo>()  contains the following "
2148 "fields:"
2149 msgstr ""
2150
2151 #. type: Plain text
2152 #: build/C/man3/getaddrinfo.3:120
2153 #, no-wrap
2154 msgid ""
2155 "struct addrinfo {\n"
2156 "    int              ai_flags;\n"
2157 "    int              ai_family;\n"
2158 "    int              ai_socktype;\n"
2159 "    int              ai_protocol;\n"
2160 "    socklen_t        ai_addrlen;\n"
2161 "    struct sockaddr *ai_addr;\n"
2162 "    char            *ai_canonname;\n"
2163 "    struct addrinfo *ai_next;\n"
2164 "};\n"
2165 msgstr ""
2166
2167 #. type: Plain text
2168 #: build/C/man3/getaddrinfo.3:142
2169 msgid ""
2170 "The I<hints> argument points to an I<addrinfo> structure that specifies "
2171 "criteria for selecting the socket address structures returned in the list "
2172 "pointed to by I<res>.  If I<hints> is not NULL it points to an I<addrinfo> "
2173 "structure whose I<ai_family>, I<ai_socktype>, and I<ai_protocol> specify "
2174 "criteria that limit the set of socket addresses returned by "
2175 "B<getaddrinfo>(), as follows:"
2176 msgstr ""
2177
2178 #. type: TP
2179 #: build/C/man3/getaddrinfo.3:142
2180 #, no-wrap
2181 msgid "I<ai_family>"
2182 msgstr ""
2183
2184 #. type: Plain text
2185 #: build/C/man3/getaddrinfo.3:158
2186 msgid ""
2187 "This field specifies the desired address family for the returned addresses.  "
2188 "Valid values for this field include B<AF_INET> and B<AF_INET6>.  The value "
2189 "B<AF_UNSPEC> indicates that B<getaddrinfo>()  should return socket addresses "
2190 "for any address family (either IPv4 or IPv6, for example) that can be used "
2191 "with I<node> and I<service>."
2192 msgstr ""
2193
2194 #. type: TP
2195 #: build/C/man3/getaddrinfo.3:158
2196 #, no-wrap
2197 msgid "I<ai_socktype>"
2198 msgstr ""
2199
2200 #. type: Plain text
2201 #: build/C/man3/getaddrinfo.3:167
2202 msgid ""
2203 "This field specifies the preferred socket type, for example B<SOCK_STREAM> "
2204 "or B<SOCK_DGRAM>.  Specifying 0 in this field indicates that socket "
2205 "addresses of any type can be returned by B<getaddrinfo>()."
2206 msgstr ""
2207
2208 #. type: TP
2209 #: build/C/man3/getaddrinfo.3:167
2210 #, no-wrap
2211 msgid "I<ai_protocol>"
2212 msgstr ""
2213
2214 #. type: Plain text
2215 #: build/C/man3/getaddrinfo.3:173
2216 msgid ""
2217 "This field specifies the protocol for the returned socket addresses.  "
2218 "Specifying 0 in this field indicates that socket addresses with any protocol "
2219 "can be returned by B<getaddrinfo>()."
2220 msgstr ""
2221
2222 #. type: TP
2223 #: build/C/man3/getaddrinfo.3:173
2224 #, no-wrap
2225 msgid "I<ai_flags>"
2226 msgstr ""
2227
2228 #. type: Plain text
2229 #: build/C/man3/getaddrinfo.3:177
2230 msgid ""
2231 "This field specifies additional options, described below.  Multiple flags "
2232 "are specified by bitwise OR-ing them together."
2233 msgstr ""
2234
2235 #. type: Plain text
2236 #: build/C/man3/getaddrinfo.3:181
2237 msgid ""
2238 "All the other fields in the structure pointed to by I<hints> must contain "
2239 "either 0 or a null pointer, as appropriate."
2240 msgstr ""
2241
2242 #. type: Plain text
2243 #: build/C/man3/getaddrinfo.3:216
2244 msgid ""
2245 "Specifying I<hints> as NULL is equivalent to setting I<ai_socktype> and "
2246 "I<ai_protocol> to 0; I<ai_family> to B<AF_UNSPEC>; and I<ai_flags> to "
2247 "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)>.  (POSIX specifies different defaults "
2248 "for I<ai_flags>; see NOTES.)  I<node> specifies either a numerical network "
2249 "address (for IPv4, numbers-and-dots notation as supported by "
2250 "B<inet_aton>(3); for IPv6, hexadecimal string format as supported by "
2251 "B<inet_pton>(3)), or a network hostname, whose network addresses are looked "
2252 "up and resolved.  If I<hints.ai_flags> contains the B<AI_NUMERICHOST> flag, "
2253 "then I<node> must be a numerical network address.  The B<AI_NUMERICHOST> "
2254 "flag suppresses any potentially lengthy network host address lookups."
2255 msgstr ""
2256
2257 #. type: Plain text
2258 #: build/C/man3/getaddrinfo.3:241
2259 msgid ""
2260 "If the B<AI_PASSIVE> flag is specified in I<hints.ai_flags>, and I<node> is "
2261 "NULL, then the returned socket addresses will be suitable for B<bind>(2)ing "
2262 "a socket that will B<accept>(2)  connections.  The returned socket address "
2263 "will contain the \"wildcard address\" (B<INADDR_ANY> for IPv4 addresses, "
2264 "B<IN6ADDR_ANY_INIT> for IPv6 address).  The wildcard address is used by "
2265 "applications (typically servers)  that intend to accept connections on any "
2266 "of the hosts's network addresses.  If I<node> is not NULL, then the "
2267 "B<AI_PASSIVE> flag is ignored."
2268 msgstr ""
2269
2270 #. type: Plain text
2271 #: build/C/man3/getaddrinfo.3:261
2272 msgid ""
2273 "If the B<AI_PASSIVE> flag is not set in I<hints.ai_flags>, then the returned "
2274 "socket addresses will be suitable for use with B<connect>(2), B<sendto>(2), "
2275 "or B<sendmsg>(2).  If I<node> is NULL, then the network address will be set "
2276 "to the loopback interface address (B<INADDR_LOOPBACK> for IPv4 addresses, "
2277 "B<IN6ADDR_LOOPBACK_INIT> for IPv6 address); this is used by applications "
2278 "that intend to communicate with peers running on the same host."
2279 msgstr ""
2280
2281 #. type: Plain text
2282 #: build/C/man3/getaddrinfo.3:284
2283 msgid ""
2284 "I<service> sets the port in each returned address structure.  If this "
2285 "argument is a service name (see B<services>(5)), it is translated to the "
2286 "corresponding port number.  This argument can also be specified as a decimal "
2287 "number, which is simply converted to binary.  If I<service> is NULL, then "
2288 "the port number of the returned socket addresses will be left "
2289 "uninitialized.  If B<AI_NUMERICSERV> is specified in I<hints.ai_flags> and "
2290 "I<service> is not NULL, then I<service> must point to a string containing a "
2291 "numeric port number.  This flag is used to inhibit the invocation of a name "
2292 "resolution service in cases where it is known not to be required."
2293 msgstr ""
2294
2295 #. type: Plain text
2296 #: build/C/man3/getaddrinfo.3:290
2297 msgid "Either I<node> or I<service>, but not both, may be NULL."
2298 msgstr ""
2299
2300 #. type: Plain text
2301 #: build/C/man3/getaddrinfo.3:306
2302 msgid ""
2303 "The B<getaddrinfo>()  function allocates and initializes a linked list of "
2304 "I<addrinfo> structures, one for each network address that matches I<node> "
2305 "and I<service>, subject to any restrictions imposed by I<hints>, and returns "
2306 "a pointer to the start of the list in I<res>.  The items in the linked list "
2307 "are linked by the I<ai_next> field."
2308 msgstr ""
2309
2310 #. type: Plain text
2311 #: build/C/man3/getaddrinfo.3:328
2312 msgid ""
2313 "There are several reasons why the linked list may have more than one "
2314 "I<addrinfo> structure, including: the network host is multihomed, accessible "
2315 "over multiple protocols (e.g., both B<AF_INET> and B<AF_INET6>); or the same "
2316 "service is available from multiple socket types (one B<SOCK_STREAM> address "
2317 "and another B<SOCK_DGRAM> address, for example).  Normally, the application "
2318 "should try using the addresses in the order in which they are returned.  The "
2319 "sorting function used within B<getaddrinfo>()  is defined in RFC\\ 3484; the "
2320 "order can be tweaked for a particular system by editing I</etc/gai.conf> "
2321 "(available since glibc 2.5)."
2322 msgstr ""
2323
2324 #.  In glibc prior to 2.3.4, the ai_canonname of each addrinfo
2325 #.  structure was set pointing to the canonical name; that was
2326 #.  more than POSIX.1-2001 specified, or other implementations provided.
2327 #.  MTK, Aug 05
2328 #. type: Plain text
2329 #: build/C/man3/getaddrinfo.3:343
2330 msgid ""
2331 "If I<hints.ai_flags> includes the B<AI_CANONNAME> flag, then the "
2332 "I<ai_canonname> field of the first of the I<addrinfo> structures in the "
2333 "returned list is set to point to the official name of the host."
2334 msgstr ""
2335
2336 #. type: Plain text
2337 #: build/C/man3/getaddrinfo.3:347
2338 msgid ""
2339 "The remaining fields of each returned I<addrinfo> structure are initialized "
2340 "as follows:"
2341 msgstr ""
2342
2343 #. type: IP
2344 #: build/C/man3/getaddrinfo.3:347 build/C/man3/getaddrinfo.3:370 build/C/man3/getaddrinfo_a.3:191 build/C/man3/getaddrinfo_a.3:195 build/C/man3/getaddrinfo_a.3:197 build/C/man3/inet_net_pton.3:207 build/C/man3/inet_net_pton.3:213 build/C/man3/inet_net_pton.3:220 build/C/man3/inet_net_pton.3:227 build/C/man3/inet_net_pton.3:234 build/C/man7/ip.7:1001 build/C/man7/ip.7:1004 build/C/man7/ip.7:1007 build/C/man7/ip.7:1010 build/C/man5/nsswitch.conf.5:144 build/C/man5/nsswitch.conf.5:148 build/C/man7/unix.7:95 build/C/man7/unix.7:120 build/C/man7/unix.7:136 build/C/man7/unix.7:162 build/C/man7/unix.7:166 build/C/man7/unix.7:170
2345 #, no-wrap
2346 msgid "*"
2347 msgstr ""
2348
2349 #. type: Plain text
2350 #: build/C/man3/getaddrinfo.3:370
2351 msgid ""
2352 "The I<ai_family>, I<ai_socktype>, and I<ai_protocol> fields return the "
2353 "socket creation parameters (i.e., these fields have the same meaning as the "
2354 "corresponding arguments of B<socket>(2)).  For example, I<ai_family> might "
2355 "return B<AF_INET> or B<AF_INET6>; I<ai_socktype> might return B<SOCK_DGRAM> "
2356 "or B<SOCK_STREAM>; and I<ai_protocol> returns the protocol for the socket."
2357 msgstr ""
2358
2359 #. type: Plain text
2360 #: build/C/man3/getaddrinfo.3:377
2361 msgid ""
2362 "A pointer to the socket address is placed in the I<ai_addr> field, and the "
2363 "length of the socket address, in bytes, is placed in the I<ai_addrlen> "
2364 "field."
2365 msgstr ""
2366
2367 #. type: Plain text
2368 #: build/C/man3/getaddrinfo.3:396
2369 msgid ""
2370 "If I<hints.ai_flags> includes the B<AI_ADDRCONFIG> flag, then IPv4 addresses "
2371 "are returned in the list pointed to by I<res> only if the local system has "
2372 "at least one IPv4 address configured, and IPv6 addresses are returned only "
2373 "if the local system has at least one IPv6 address configured.  The loopback "
2374 "address is not considered for this case as valid as a configured address.  "
2375 "This flag is useful on, for example, IPv4-only systems, to ensure that "
2376 "B<getaddrinfo>()  does not return IPv6 socket addresses that would always "
2377 "fail in B<connect>(2)  or B<bind>(2)."
2378 msgstr ""
2379
2380 #. type: Plain text
2381 #: build/C/man3/getaddrinfo.3:421
2382 msgid ""
2383 "If I<hints.ai_flags> specifies the B<AI_V4MAPPED> flag, and "
2384 "I<hints.ai_family> was specified as B<AF_INET6>, and no matching IPv6 "
2385 "addresses could be found, then return IPv4-mapped IPv6 addresses in the list "
2386 "pointed to by I<res>.  If both B<AI_V4MAPPED> and B<AI_ALL> are specified in "
2387 "I<hints.ai_flags>, then return both IPv6 and IPv4-mapped IPv6 addresses in "
2388 "the list pointed to by I<res>.  B<AI_ALL> is ignored if B<AI_V4MAPPED> is "
2389 "not also specified."
2390 msgstr ""
2391
2392 #. type: Plain text
2393 #: build/C/man3/getaddrinfo.3:427
2394 msgid ""
2395 "The B<freeaddrinfo>()  function frees the memory that was allocated for the "
2396 "dynamically allocated linked list I<res>."
2397 msgstr ""
2398
2399 #. type: SS
2400 #: build/C/man3/getaddrinfo.3:427
2401 #, no-wrap
2402 msgid "Extensions to getaddrinfo() for Internationalized Domain Names"
2403 msgstr ""
2404
2405 #. type: Plain text
2406 #: build/C/man3/getaddrinfo.3:436
2407 msgid ""
2408 "Starting with glibc 2.3.4, B<getaddrinfo>()  has been extended to "
2409 "selectively allow the incoming and outgoing hostnames to be transparently "
2410 "converted to and from the Internationalized Domain Name (IDN) format (see "
2411 "RFC 3490, I<Internationalizing Domain Names in Applications (IDNA)>).  Four "
2412 "new flags are defined:"
2413 msgstr ""
2414
2415 #. type: TP
2416 #: build/C/man3/getaddrinfo.3:436
2417 #, no-wrap
2418 msgid "B<AI_IDN>"
2419 msgstr ""
2420
2421 #. type: Plain text
2422 #: build/C/man3/getaddrinfo.3:442
2423 msgid ""
2424 "If this flag is specified, then the node name given in I<node> is converted "
2425 "to IDN format if necessary.  The source encoding is that of the current "
2426 "locale."
2427 msgstr ""
2428
2429 #.  Implementation Detail:
2430 #.  To minimize effects on system performance the implementation might
2431 #.  want to check whether the input string contains any non-ASCII
2432 #.  characters.  If there are none the IDN step can be skipped completely.
2433 #.  On systems which allow not-ASCII safe encodings for a locale this
2434 #.  might be a problem.
2435 #. type: Plain text
2436 #: build/C/man3/getaddrinfo.3:454
2437 msgid ""
2438 "If the input name contains non-ASCII characters, then the IDN encoding is "
2439 "used.  Those parts of the node name (delimited by dots) that contain "
2440 "non-ASCII characters are encoded using ASCII Compatible Encoding (ACE)  "
2441 "before being passed to the name resolution functions."
2442 msgstr ""
2443
2444 #. type: TP
2445 #: build/C/man3/getaddrinfo.3:454
2446 #, no-wrap
2447 msgid "B<AI_CANONIDN>"
2448 msgstr ""
2449
2450 #. type: Plain text
2451 #: build/C/man3/getaddrinfo.3:466
2452 msgid ""
2453 "After a successful name lookup, and if the B<AI_CANONNAME> flag was "
2454 "specified, B<getaddrinfo>()  will return the canonical name of the node "
2455 "corresponding to the I<addrinfo> structure value passed back.  The return "
2456 "value is an exact copy of the value returned by the name resolution "
2457 "function."
2458 msgstr ""
2459
2460 #
2461 #. Implementation Detail:
2462 #. If no component of the returned name starts with xn\-\- the IDN
2463 #. step can be skipped, therefore avoiding unnecessary slowdowns.
2464 #. type: Plain text
2465 #: build/C/man3/getaddrinfo.3:479
2466 msgid ""
2467 "If the name is encoded using ACE, then it will contain the I<xn--> prefix "
2468 "for one or more components of the name.  To convert these components into a "
2469 "readable form the B<AI_CANONIDN> flag can be passed in addition to "
2470 "B<AI_CANONNAME>.  The resulting string is encoded using the current locale's "
2471 "encoding."
2472 msgstr ""
2473
2474 #. type: TP
2475 #: build/C/man3/getaddrinfo.3:479
2476 #, no-wrap
2477 msgid "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
2478 msgstr ""
2479
2480 #. type: Plain text
2481 #: build/C/man3/getaddrinfo.3:486 build/C/man3/getnameinfo.3:139
2482 msgid ""
2483 "Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned "
2484 "Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make "
2485 "sure it is a STD3 conforming hostname)  flags respectively to be used in the "
2486 "IDNA handling."
2487 msgstr ""
2488
2489 #. type: SH
2490 #: build/C/man3/getaddrinfo.3:486 build/C/man3/getaddrinfo_a.3:242 build/C/man3/gethostbyname.3:280 build/C/man3/getipnodebyname.3:186 build/C/man3/getnameinfo.3:139 build/C/man3/getnetent.3:130 build/C/man3/getnetent_r.3:118 build/C/man2/getpeername.2:68 build/C/man3/getprotoent.3:123 build/C/man3/getprotoent_r.3:108 build/C/man3/getservent.3:142 build/C/man3/getservent_r.3:107 build/C/man3/inet_net_pton.3:130 build/C/man3/inet_ntop.3:83 build/C/man3/inet_pton.3:116 build/C/man3/rcmd.3:239 build/C/man3/resolver.3:245 build/C/man3/setnetgrent.3:86 build/C/man2/shutdown.2:69
2491 #, no-wrap
2492 msgid "RETURN VALUE"
2493 msgstr ""
2494
2495 #.  FIXME glibc defines the following additional errors, some which
2496 #.  can probably be returned by getaddrinfo(); they need to
2497 #.  be documented.
2498 #.  #ifdef __USE_GNU
2499 #.  #define EAI_INPROGRESS  -100  /* Processing request in progress.  */
2500 #.  #define EAI_CANCELED    -101  /* Request canceled.  */
2501 #.  #define EAI_NOTCANCELED -102  /* Request not canceled.  */
2502 #.  #define EAI_ALLDONE     -103  /* All requests done.  */
2503 #.  #define EAI_INTR        -104  /* Interrupted by a signal.  */
2504 #.  #define EAI_IDN_ENCODE  -105  /* IDN encoding failed.  */
2505 #.  #endif
2506 #. type: Plain text
2507 #: build/C/man3/getaddrinfo.3:500
2508 msgid ""
2509 "B<getaddrinfo>()  returns 0 if it succeeds, or one of the following nonzero "
2510 "error codes:"
2511 msgstr ""
2512
2513 #. type: TP
2514 #: build/C/man3/getaddrinfo.3:500
2515 #, no-wrap
2516 msgid "B<EAI_ADDRFAMILY>"
2517 msgstr ""
2518
2519 #.  Not in SUSv3
2520 #. type: Plain text
2521 #: build/C/man3/getaddrinfo.3:505
2522 msgid ""
2523 "The specified network host does not have any network addresses in the "
2524 "requested address family."
2525 msgstr ""
2526
2527 #. type: TP
2528 #: build/C/man3/getaddrinfo.3:505 build/C/man3/getaddrinfo_a.3:247 build/C/man3/getaddrinfo_a.3:264 build/C/man3/getnameinfo.3:155
2529 #, no-wrap
2530 msgid "B<EAI_AGAIN>"
2531 msgstr ""
2532
2533 #. type: Plain text
2534 #: build/C/man3/getaddrinfo.3:509
2535 msgid "The name server returned a temporary failure indication.  Try again later."
2536 msgstr ""
2537
2538 #. type: TP
2539 #: build/C/man3/getaddrinfo.3:509 build/C/man3/getnameinfo.3:159
2540 #, no-wrap
2541 msgid "B<EAI_BADFLAGS>"
2542 msgstr ""
2543
2544 #. type: Plain text
2545 #: build/C/man3/getaddrinfo.3:519
2546 msgid ""
2547 "I<hints.ai_flags> contains invalid flags; or, I<hints.ai_flags> included "
2548 "B<AI_CANONNAME> and I<name> was NULL."
2549 msgstr ""
2550
2551 #. type: TP
2552 #: build/C/man3/getaddrinfo.3:519 build/C/man3/getnameinfo.3:164
2553 #, no-wrap
2554 msgid "B<EAI_FAIL>"
2555 msgstr ""
2556
2557 #. type: Plain text
2558 #: build/C/man3/getaddrinfo.3:522
2559 msgid "The name server returned a permanent failure indication."
2560 msgstr ""
2561
2562 #. type: TP
2563 #: build/C/man3/getaddrinfo.3:522 build/C/man3/getnameinfo.3:167
2564 #, no-wrap
2565 msgid "B<EAI_FAMILY>"
2566 msgstr ""
2567
2568 #. type: Plain text
2569 #: build/C/man3/getaddrinfo.3:525
2570 msgid "The requested address family is not supported."
2571 msgstr ""
2572
2573 #. type: TP
2574 #: build/C/man3/getaddrinfo.3:525 build/C/man3/getaddrinfo_a.3:252 build/C/man3/getnameinfo.3:171
2575 #, no-wrap
2576 msgid "B<EAI_MEMORY>"
2577 msgstr ""
2578
2579 #. type: Plain text
2580 #: build/C/man3/getaddrinfo.3:528 build/C/man3/getaddrinfo_a.3:255 build/C/man3/getnameinfo.3:174 build/C/man7/unix.7:444
2581 msgid "Out of memory."
2582 msgstr ""
2583
2584 #. type: TP
2585 #: build/C/man3/getaddrinfo.3:528
2586 #, no-wrap
2587 msgid "B<EAI_NODATA>"
2588 msgstr ""
2589
2590 #.  Not in SUSv3
2591 #. type: Plain text
2592 #: build/C/man3/getaddrinfo.3:533
2593 msgid ""
2594 "The specified network host exists, but does not have any network addresses "
2595 "defined."
2596 msgstr ""
2597
2598 #. type: TP
2599 #: build/C/man3/getaddrinfo.3:533 build/C/man3/getnameinfo.3:174
2600 #, no-wrap
2601 msgid "B<EAI_NONAME>"
2602 msgstr ""
2603
2604 #. type: Plain text
2605 #: build/C/man3/getaddrinfo.3:550
2606 msgid ""
2607 "The I<node> or I<service> is not known; or both I<node> and I<service> are "
2608 "NULL; or B<AI_NUMERICSERV> was specified in I<hints.ai_flags> and I<service> "
2609 "was not a numeric port-number string."
2610 msgstr ""
2611
2612 #. type: TP
2613 #: build/C/man3/getaddrinfo.3:550
2614 #, no-wrap
2615 msgid "B<EAI_SERVICE>"
2616 msgstr ""
2617
2618 #. type: Plain text
2619 #: build/C/man3/getaddrinfo.3:571
2620 msgid ""
2621 "The requested service is not available for the requested socket type.  It "
2622 "may be available through another socket type.  For example, this error could "
2623 "occur if I<service> was \"shell\" (a service available only on stream "
2624 "sockets), and either I<hints.ai_protocol> was B<IPPROTO_UDP>, or "
2625 "I<hints.ai_socktype> was B<SOCK_DGRAM>; or the error could occur if "
2626 "I<service> was not NULL, and I<hints.ai_socktype> was B<SOCK_RAW> (a socket "
2627 "type that does not support the concept of services)."
2628 msgstr ""
2629
2630 #. type: TP
2631 #: build/C/man3/getaddrinfo.3:571
2632 #, no-wrap
2633 msgid "B<EAI_SOCKTYPE>"
2634 msgstr ""
2635
2636 #. type: Plain text
2637 #: build/C/man3/getaddrinfo.3:583
2638 msgid ""
2639 "The requested socket type is not supported.  This could occur, for example, "
2640 "if I<hints.ai_socktype> and I<hints.ai_protocol> are inconsistent (e.g., "
2641 "B<SOCK_DGRAM> and B<IPPROTO_TCP>, respectively)."
2642 msgstr ""
2643
2644 #. type: TP
2645 #: build/C/man3/getaddrinfo.3:583 build/C/man3/getaddrinfo_a.3:255 build/C/man3/getnameinfo.3:187
2646 #, no-wrap
2647 msgid "B<EAI_SYSTEM>"
2648 msgstr ""
2649
2650 #. type: Plain text
2651 #: build/C/man3/getaddrinfo.3:588
2652 msgid "Other system error, check I<errno> for details."
2653 msgstr ""
2654
2655 #. type: Plain text
2656 #: build/C/man3/getaddrinfo.3:593
2657 msgid ""
2658 "The B<gai_strerror>()  function translates these error codes to a human "
2659 "readable string, suitable for error reporting."
2660 msgstr ""
2661
2662 #. type: Plain text
2663 #: build/C/man3/getaddrinfo.3:600
2664 msgid "POSIX.1-2001.  The B<getaddrinfo>()  function is documented in RFC\\ 2553."
2665 msgstr ""
2666
2667 #. type: Plain text
2668 #: build/C/man3/getaddrinfo.3:605
2669 msgid ""
2670 "B<getaddrinfo>()  supports the I<address>B<%>I<scope-id> notation for "
2671 "specifying the IPv6 scope-ID."
2672 msgstr ""
2673
2674 #. type: Plain text
2675 #: build/C/man3/getaddrinfo.3:613
2676 msgid ""
2677 "B<AI_ADDRCONFIG>, B<AI_ALL>, and B<AI_V4MAPPED> are available since glibc "
2678 "2.3.3.  B<AI_NUMERICSERV> is available since glibc 2.3.4."
2679 msgstr ""
2680
2681 #. type: Plain text
2682 #: build/C/man3/getaddrinfo.3:623
2683 msgid ""
2684 "According to POSIX.1-2001, specifying I<hints> as NULL should cause "
2685 "I<ai_flags> to be assumed as 0.  The GNU C library instead assumes a value "
2686 "of B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)> for this case, since this value is "
2687 "considered an improvement on the specification."
2688 msgstr ""
2689
2690 #.  getnameinfo.3 refers to this example
2691 #.  socket.2 refers to this example
2692 #.  bind.2 refers to this example
2693 #.  connect.2 refers to this example
2694 #.  recvfrom.2 refers to this example
2695 #.  sendto.2 refers to this example
2696 #. type: Plain text
2697 #: build/C/man3/getaddrinfo.3:637
2698 msgid ""
2699 "The following programs demonstrate the use of B<getaddrinfo>(), "
2700 "B<gai_strerror>(), B<freeaddrinfo>(), and B<getnameinfo>(3).  The programs "
2701 "are an echo server and client for UDP datagrams."
2702 msgstr ""
2703
2704 #. type: SS
2705 #: build/C/man3/getaddrinfo.3:637
2706 #, no-wrap
2707 msgid "Server program"
2708 msgstr ""
2709
2710 #. type: Plain text
2711 #: build/C/man3/getaddrinfo.3:647
2712 #, no-wrap
2713 msgid ""
2714 "#include E<lt>sys/types.hE<gt>\n"
2715 "#include E<lt>stdio.hE<gt>\n"
2716 "#include E<lt>stdlib.hE<gt>\n"
2717 "#include E<lt>unistd.hE<gt>\n"
2718 "#include E<lt>string.hE<gt>\n"
2719 "#include E<lt>sys/socket.hE<gt>\n"
2720 "#include E<lt>netdb.hE<gt>\n"
2721 msgstr ""
2722
2723 #. type: Plain text
2724 #: build/C/man3/getaddrinfo.3:649 build/C/man3/getaddrinfo.3:744
2725 #, no-wrap
2726 msgid "#define BUF_SIZE 500\n"
2727 msgstr ""
2728
2729 #. type: Plain text
2730 #: build/C/man3/getaddrinfo.3:660
2731 #, no-wrap
2732 msgid ""
2733 "int\n"
2734 "main(int argc, char *argv[])\n"
2735 "{\n"
2736 "    struct addrinfo hints;\n"
2737 "    struct addrinfo *result, *rp;\n"
2738 "    int sfd, s;\n"
2739 "    struct sockaddr_storage peer_addr;\n"
2740 "    socklen_t peer_addr_len;\n"
2741 "    ssize_t nread;\n"
2742 "    char buf[BUF_SIZE];\n"
2743 msgstr ""
2744
2745 #. type: Plain text
2746 #: build/C/man3/getaddrinfo.3:665
2747 #, no-wrap
2748 msgid ""
2749 "    if (argc != 2) {\n"
2750 "        fprintf(stderr, \"Usage: %s port\\en\", argv[0]);\n"
2751 "        exit(EXIT_FAILURE);\n"
2752 "    }\n"
2753 msgstr ""
2754
2755 #. type: Plain text
2756 #: build/C/man3/getaddrinfo.3:674
2757 #, no-wrap
2758 msgid ""
2759 "    memset(&hints, 0, sizeof(struct addrinfo));\n"
2760 "    hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */\n"
2761 "    hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
2762 "    hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */\n"
2763 "    hints.ai_protocol = 0;          /* Any protocol */\n"
2764 "    hints.ai_canonname = NULL;\n"
2765 "    hints.ai_addr = NULL;\n"
2766 "    hints.ai_next = NULL;\n"
2767 msgstr ""
2768
2769 #. type: Plain text
2770 #: build/C/man3/getaddrinfo.3:680
2771 #, no-wrap
2772 msgid ""
2773 "    s = getaddrinfo(NULL, argv[1], &hints, &result);\n"
2774 "    if (s != 0) {\n"
2775 "        fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n"
2776 "        exit(EXIT_FAILURE);\n"
2777 "    }\n"
2778 msgstr ""
2779
2780 #. type: Plain text
2781 #: build/C/man3/getaddrinfo.3:685
2782 #, no-wrap
2783 msgid ""
2784 "    /* getaddrinfo() returns a list of address structures.\n"
2785 "       Try each address until we successfully bind(2).\n"
2786 "       If socket(2) (or bind(2)) fails, we (close the socket\n"
2787 "       and) try the next address. */\n"
2788 msgstr ""
2789
2790 #. type: Plain text
2791 #: build/C/man3/getaddrinfo.3:691
2792 #, no-wrap
2793 msgid ""
2794 "    for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
2795 "        sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
2796 "                rp-E<gt>ai_protocol);\n"
2797 "        if (sfd == -1)\n"
2798 "            continue;\n"
2799 msgstr ""
2800
2801 #. type: Plain text
2802 #: build/C/man3/getaddrinfo.3:694
2803 #, no-wrap
2804 msgid ""
2805 "        if (bind(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) == 0)\n"
2806 "            break;                  /* Success */\n"
2807 msgstr ""
2808
2809 #. type: Plain text
2810 #: build/C/man3/getaddrinfo.3:697 build/C/man3/getaddrinfo.3:790
2811 #, no-wrap
2812 msgid ""
2813 "        close(sfd);\n"
2814 "    }\n"
2815 msgstr ""
2816
2817 #. type: Plain text
2818 #: build/C/man3/getaddrinfo.3:702
2819 #, no-wrap
2820 msgid ""
2821 "    if (rp == NULL) {               /* No address succeeded */\n"
2822 "        fprintf(stderr, \"Could not bind\\en\");\n"
2823 "        exit(EXIT_FAILURE);\n"
2824 "    }\n"
2825 msgstr ""
2826
2827 #. type: Plain text
2828 #: build/C/man3/getaddrinfo.3:704 build/C/man3/getaddrinfo.3:797
2829 #, no-wrap
2830 msgid "    freeaddrinfo(result);           /* No longer needed */\n"
2831 msgstr ""
2832
2833 #. type: Plain text
2834 #: build/C/man3/getaddrinfo.3:706
2835 #, no-wrap
2836 msgid "    /* Read datagrams and echo them back to sender */\n"
2837 msgstr ""
2838
2839 #. type: Plain text
2840 #: build/C/man3/getaddrinfo.3:713
2841 #, no-wrap
2842 msgid ""
2843 "    for (;;) {\n"
2844 "        peer_addr_len = sizeof(struct sockaddr_storage);\n"
2845 "        nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n"
2846 "                (struct sockaddr *) &peer_addr, &peer_addr_len);\n"
2847 "        if (nread == -1)\n"
2848 "            continue;               /* Ignore failed request */\n"
2849 msgstr ""
2850
2851 #. type: Plain text
2852 #: build/C/man3/getaddrinfo.3:715
2853 #, no-wrap
2854 msgid "        char host[NI_MAXHOST], service[NI_MAXSERV];\n"
2855 msgstr ""
2856
2857 #. type: Plain text
2858 #: build/C/man3/getaddrinfo.3:724
2859 #, no-wrap
2860 msgid ""
2861 "        s = getnameinfo((struct sockaddr *) &peer_addr,\n"
2862 "                        peer_addr_len, host, NI_MAXHOST,\n"
2863 "                        service, NI_MAXSERV, NI_NUMERICSERV);\n"
2864 "       if (s == 0)\n"
2865 "            printf(\"Received %zd bytes from %s:%s\\en\",\n"
2866 "                    nread, host, service);\n"
2867 "        else\n"
2868 "            fprintf(stderr, \"getnameinfo: %s\\en\", gai_strerror(s));\n"
2869 msgstr ""
2870
2871 #. type: Plain text
2872 #: build/C/man3/getaddrinfo.3:731
2873 #, no-wrap
2874 msgid ""
2875 "        if (sendto(sfd, buf, nread, 0,\n"
2876 "                    (struct sockaddr *) &peer_addr,\n"
2877 "                    peer_addr_len) != nread)\n"
2878 "            fprintf(stderr, \"Error sending response\\en\");\n"
2879 "    }\n"
2880 "}\n"
2881 msgstr ""
2882
2883 #. type: SS
2884 #: build/C/man3/getaddrinfo.3:732
2885 #, no-wrap
2886 msgid "Client program"
2887 msgstr ""
2888
2889 #. type: Plain text
2890 #: build/C/man3/getaddrinfo.3:742
2891 #, no-wrap
2892 msgid ""
2893 "#include E<lt>sys/types.hE<gt>\n"
2894 "#include E<lt>sys/socket.hE<gt>\n"
2895 "#include E<lt>netdb.hE<gt>\n"
2896 "#include E<lt>stdio.hE<gt>\n"
2897 "#include E<lt>stdlib.hE<gt>\n"
2898 "#include E<lt>unistd.hE<gt>\n"
2899 "#include E<lt>string.hE<gt>\n"
2900 msgstr ""
2901
2902 #. type: Plain text
2903 #: build/C/man3/getaddrinfo.3:754
2904 #, no-wrap
2905 msgid ""
2906 "int\n"
2907 "main(int argc, char *argv[])\n"
2908 "{\n"
2909 "    struct addrinfo hints;\n"
2910 "    struct addrinfo *result, *rp;\n"
2911 "    int sfd, s, j;\n"
2912 "    size_t len;\n"
2913 "    ssize_t nread;\n"
2914 "    char buf[BUF_SIZE];\n"
2915 msgstr ""
2916
2917 #. type: Plain text
2918 #: build/C/man3/getaddrinfo.3:759
2919 #, no-wrap
2920 msgid ""
2921 "    if (argc E<lt> 3) {\n"
2922 "        fprintf(stderr, \"Usage: %s host port msg...\\en\", argv[0]);\n"
2923 "        exit(EXIT_FAILURE);\n"
2924 "    }\n"
2925 msgstr ""
2926
2927 #. type: Plain text
2928 #: build/C/man3/getaddrinfo.3:761
2929 #, no-wrap
2930 msgid "    /* Obtain address(es) matching host/port */\n"
2931 msgstr ""
2932
2933 #. type: Plain text
2934 #: build/C/man3/getaddrinfo.3:767
2935 #, no-wrap
2936 msgid ""
2937 "    memset(&hints, 0, sizeof(struct addrinfo));\n"
2938 "    hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */\n"
2939 "    hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
2940 "    hints.ai_flags = 0;\n"
2941 "    hints.ai_protocol = 0;          /* Any protocol */\n"
2942 msgstr ""
2943
2944 #. type: Plain text
2945 #: build/C/man3/getaddrinfo.3:773
2946 #, no-wrap
2947 msgid ""
2948 "    s = getaddrinfo(argv[1], argv[2], &hints, &result);\n"
2949 "    if (s != 0) {\n"
2950 "        fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n"
2951 "        exit(EXIT_FAILURE);\n"
2952 "    }\n"
2953 msgstr ""
2954
2955 #. type: Plain text
2956 #: build/C/man3/getaddrinfo.3:778
2957 #, no-wrap
2958 msgid ""
2959 "    /* getaddrinfo() returns a list of address structures.\n"
2960 "       Try each address until we successfully connect(2).\n"
2961 "       If socket(2) (or connect(2)) fails, we (close the socket\n"
2962 "       and) try the next address. */\n"
2963 msgstr ""
2964
2965 #. type: Plain text
2966 #: build/C/man3/getaddrinfo.3:784
2967 #, no-wrap
2968 msgid ""
2969 "    for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
2970 "        sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
2971 "                     rp-E<gt>ai_protocol);\n"
2972 "        if (sfd == -1)\n"
2973 "            continue;\n"
2974 msgstr ""
2975
2976 #. type: Plain text
2977 #: build/C/man3/getaddrinfo.3:787
2978 #, no-wrap
2979 msgid ""
2980 "        if (connect(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) != -1)\n"
2981 "            break;                  /* Success */\n"
2982 msgstr ""
2983
2984 #. type: Plain text
2985 #: build/C/man3/getaddrinfo.3:795
2986 #, no-wrap
2987 msgid ""
2988 "    if (rp == NULL) {               /* No address succeeded */\n"
2989 "        fprintf(stderr, \"Could not connect\\en\");\n"
2990 "        exit(EXIT_FAILURE);\n"
2991 "    }\n"
2992 msgstr ""
2993
2994 #. type: Plain text
2995 #: build/C/man3/getaddrinfo.3:800
2996 #, no-wrap
2997 msgid ""
2998 "    /* Send remaining command-line arguments as separate\n"
2999 "       datagrams, and read responses from server */\n"
3000 msgstr ""
3001
3002 #. type: Plain text
3003 #: build/C/man3/getaddrinfo.3:804
3004 #, no-wrap
3005 msgid ""
3006 "    for (j = 3; j E<lt> argc; j++) {\n"
3007 "        len = strlen(argv[j]) + 1;\n"
3008 "                /* +1 for terminating null byte */\n"
3009 msgstr ""
3010
3011 #. type: Plain text
3012 #: build/C/man3/getaddrinfo.3:810
3013 #, no-wrap
3014 msgid ""
3015 "        if (len + 1 E<gt> BUF_SIZE) {\n"
3016 "            fprintf(stderr,\n"
3017 "                    \"Ignoring long message in argument %d\\en\", j);\n"
3018 "            continue;\n"
3019 "        }\n"
3020 msgstr ""
3021
3022 #. type: Plain text
3023 #: build/C/man3/getaddrinfo.3:815
3024 #, no-wrap
3025 msgid ""
3026 "        if (write(sfd, argv[j], len) != len) {\n"
3027 "            fprintf(stderr, \"partial/failed write\\en\");\n"
3028 "            exit(EXIT_FAILURE);\n"
3029 "        }\n"
3030 msgstr ""
3031
3032 #. type: Plain text
3033 #: build/C/man3/getaddrinfo.3:821
3034 #, no-wrap
3035 msgid ""
3036 "        nread = read(sfd, buf, BUF_SIZE);\n"
3037 "        if (nread == -1) {\n"
3038 "            perror(\"read\");\n"
3039 "            exit(EXIT_FAILURE);\n"
3040 "        }\n"
3041 msgstr ""
3042
3043 #. type: Plain text
3044 #: build/C/man3/getaddrinfo.3:824
3045 #, no-wrap
3046 msgid ""
3047 "        printf(\"Received %zd bytes: %s\\en\", nread, buf);\n"
3048 "    }\n"
3049 msgstr ""
3050
3051 #.  .BR getipnodebyaddr (3),
3052 #.  .BR getipnodebyname (3),
3053 #. type: Plain text
3054 #: build/C/man3/getaddrinfo.3:838
3055 msgid ""
3056 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<inet>(3), "
3057 "B<gai.conf>(5), B<hostname>(7), B<ip>(7)"
3058 msgstr ""
3059
3060 #. type: TH
3061 #: build/C/man3/getaddrinfo_a.3:29
3062 #, no-wrap
3063 msgid "GETADDRINFO_A"
3064 msgstr ""
3065
3066 #. type: TH
3067 #: build/C/man3/getaddrinfo_a.3:29 build/C/man3/getnameinfo.3:10 build/C/man3/inet.3:42 build/C/man3/inet_net_pton.3:26 build/C/man3/rcmd.3:43 build/C/man3/resolver.3:32 build/C/man3/rexec.3:41 build/C/man3/setnetgrent.3:10
3068 #, no-wrap
3069 msgid "2014-05-28"
3070 msgstr ""
3071
3072 #. type: Plain text
3073 #: build/C/man3/getaddrinfo_a.3:33
3074 msgid ""
3075 "getaddrinfo_a, gai_suspend, gai_error, gai_cancel - asynchronous network "
3076 "address and service translation"
3077 msgstr ""
3078
3079 #. type: Plain text
3080 #: build/C/man3/getaddrinfo_a.3:37
3081 #, no-wrap
3082 msgid ""
3083 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
3084 "B<#include E<lt>netdb.hE<gt>>\n"
3085 msgstr ""
3086
3087 #. type: Plain text
3088 #: build/C/man3/getaddrinfo_a.3:40
3089 #, no-wrap
3090 msgid ""
3091 "B<int getaddrinfo_a(int >I<mode>B<, struct gaicb *>I<list[]>B<,>\n"
3092 "B<                int >I<nitems>B<, struct sigevent *>I<sevp>B<);>\n"
3093 msgstr ""
3094
3095 #. type: Plain text
3096 #: build/C/man3/getaddrinfo_a.3:43
3097 #, no-wrap
3098 msgid ""
3099 "B<int gai_suspend(const struct gaicb * const >I<list[]>B<, int "
3100 ">I<nitems>B<,>\n"
3101 "B<                const struct timespec *>I<timeout>B<);>\n"
3102 msgstr ""
3103
3104 #. type: Plain text
3105 #: build/C/man3/getaddrinfo_a.3:45
3106 #, no-wrap
3107 msgid "B<int gai_error(struct gaicb *>I<req>B<);>\n"
3108 msgstr ""
3109
3110 #. type: Plain text
3111 #: build/C/man3/getaddrinfo_a.3:47
3112 #, no-wrap
3113 msgid "B<int gai_cancel(struct gaicb *>I<req>B<);>\n"
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man3/getaddrinfo_a.3:49
3118 #, no-wrap
3119 msgid "Link with I<-lanl>.\n"
3120 msgstr ""
3121
3122 #. type: Plain text
3123 #: build/C/man3/getaddrinfo_a.3:57
3124 msgid ""
3125 "The B<getaddrinfo_a>()  function performs the same task as "
3126 "B<getaddrinfo>(3), but allows multiple name look-ups to be performed "
3127 "asynchronously, with optional notification on completion of look-up "
3128 "operations."
3129 msgstr ""
3130
3131 #. type: Plain text
3132 #: build/C/man3/getaddrinfo_a.3:61
3133 msgid "The I<mode> argument has one of the following values:"
3134 msgstr ""
3135
3136 #. type: TP
3137 #: build/C/man3/getaddrinfo_a.3:61
3138 #, no-wrap
3139 msgid "B<GAI_WAIT>"
3140 msgstr ""
3141
3142 #. type: Plain text
3143 #: build/C/man3/getaddrinfo_a.3:65
3144 msgid ""
3145 "Perform the look-ups synchronously.  The call blocks until the look-ups have "
3146 "completed."
3147 msgstr ""
3148
3149 #. type: TP
3150 #: build/C/man3/getaddrinfo_a.3:65
3151 #, no-wrap
3152 msgid "B<GAI_NOWAIT>"
3153 msgstr ""
3154
3155 #. type: Plain text
3156 #: build/C/man3/getaddrinfo_a.3:73
3157 msgid ""
3158 "Perform the look-ups asynchronously.  The call returns immediately, and the "
3159 "requests are resolved in the background.  See the discussion of the I<sevp> "
3160 "argument below."
3161 msgstr ""
3162
3163 #. type: Plain text
3164 #: build/C/man3/getaddrinfo_a.3:88
3165 msgid ""
3166 "The array I<list> specifies the look-up requests to process.  The I<nitems> "
3167 "argument specifies the number of elements in I<list>.  The requested look-up "
3168 "operations are started in parallel.  NULL elements in I<list> are ignored.  "
3169 "Each request is described by a I<gaicb> structure, defined as follows:"
3170 msgstr ""
3171
3172 #. type: Plain text
3173 #: build/C/man3/getaddrinfo_a.3:97
3174 #, no-wrap
3175 msgid ""
3176 "struct gaicb {\n"
3177 "    const char            *ar_name;\n"
3178 "    const char            *ar_service;\n"
3179 "    const struct addrinfo *ar_request;\n"
3180 "    struct addrinfo       *ar_result;\n"
3181 "};\n"
3182 msgstr ""
3183
3184 #. type: Plain text
3185 #: build/C/man3/getaddrinfo_a.3:128
3186 msgid ""
3187 "The elements of this structure correspond to the arguments of "
3188 "B<getaddrinfo>(3).  Thus, I<ar_name> corresponds to the I<node> argument and "
3189 "I<ar_service> to the I<service> argument, identifying an Internet host and a "
3190 "service.  The I<ar_request> element corresponds to the I<hints> argument, "
3191 "specifying the criteria for selecting the returned socket address "
3192 "structures.  Finally, I<ar_result> corresponds to the I<res> argument; you "
3193 "do not need to initialize this element, it will be automatically set when "
3194 "the request is resolved.  The I<addrinfo> structure referenced by the last "
3195 "two elements is described in B<getaddrinfo>(3)."
3196 msgstr ""
3197
3198 #. type: Plain text
3199 #: build/C/man3/getaddrinfo_a.3:144
3200 msgid ""
3201 "When I<mode> is specified as B<GAI_NOWAIT>, notifications about resolved "
3202 "requests can be obtained by employing the I<sigevent> structure pointed to "
3203 "by the I<sevp> argument.  For the definition and general details of this "
3204 "structure, see B<sigevent>(7).  The I<sevp-E<gt>sigev_notify> field can have "
3205 "the following values:"
3206 msgstr ""
3207
3208 #. type: TP
3209 #: build/C/man3/getaddrinfo_a.3:144
3210 #, no-wrap
3211 msgid "B<SIGEV_NONE>"
3212 msgstr ""
3213
3214 #. type: Plain text
3215 #: build/C/man3/getaddrinfo_a.3:147
3216 msgid "Don't provide any notification."
3217 msgstr ""
3218
3219 #. type: TP
3220 #: build/C/man3/getaddrinfo_a.3:147
3221 #, no-wrap
3222 msgid "B<SIGEV_SIGNAL>"
3223 msgstr ""
3224
3225 #.  si_pid and si_uid are also set, to the values of the calling process,
3226 #.  which doesn't provide useful information, so we'll skip mentioning it.
3227 #. type: Plain text
3228 #: build/C/man3/getaddrinfo_a.3:163
3229 msgid ""
3230 "When a look-up completes, generate the signal I<sigev_signo> for the "
3231 "process.  See B<sigevent>(7)  for general details.  The I<si_code> field of "
3232 "the I<siginfo_t> structure will be set to B<SI_ASYNCNL>."
3233 msgstr ""
3234
3235 #. type: TP
3236 #: build/C/man3/getaddrinfo_a.3:163
3237 #, no-wrap
3238 msgid "B<SIGEV_THREAD>"
3239 msgstr ""
3240
3241 #. type: Plain text
3242 #: build/C/man3/getaddrinfo_a.3:171
3243 msgid ""
3244 "When a look-up completes, invoke I<sigev_notify_function> as if it were the "
3245 "start function of a new thread.  See B<sigevent>(7)  for details."
3246 msgstr ""
3247
3248 #. type: Plain text
3249 #: build/C/man3/getaddrinfo_a.3:180
3250 msgid ""
3251 "For B<SIGEV_SIGNAL> and B<SIGEV_THREAD>, it may be useful to point "
3252 "I<sevp-E<gt>sigev_value.sival_ptr> to I<list>."
3253 msgstr ""
3254
3255 #. type: Plain text
3256 #: build/C/man3/getaddrinfo_a.3:191
3257 msgid ""
3258 "The B<gai_suspend>()  function suspends execution of the calling thread, "
3259 "waiting for the completion of one or more requests in the array I<list>.  "
3260 "The I<nitems> argument specifies the size of the array I<list>.  The call "
3261 "blocks until one of the following occurs:"
3262 msgstr ""
3263
3264 #. type: Plain text
3265 #: build/C/man3/getaddrinfo_a.3:195
3266 msgid "One or more of the operations in I<list> completes."
3267 msgstr ""
3268
3269 #. type: Plain text
3270 #: build/C/man3/getaddrinfo_a.3:197
3271 msgid "The call is interrupted by a signal that is caught."
3272 msgstr ""
3273
3274 #. type: Plain text
3275 #: build/C/man3/getaddrinfo_a.3:210
3276 msgid ""
3277 "The time interval specified in I<timeout> elapses.  This argument specifies "
3278 "a timeout in seconds plus nanoseconds (see B<nanosleep>(2)  for details of "
3279 "the I<timespec> structure).  If I<timeout> is NULL, then the call blocks "
3280 "indefinitely (until one of the events above occurs)."
3281 msgstr ""
3282
3283 #. type: Plain text
3284 #: build/C/man3/getaddrinfo_a.3:215
3285 msgid ""
3286 "No explicit indication of which request was completed is given; you must "
3287 "determine which request(s) have completed by iterating with B<gai_error>()  "
3288 "over the list of requests."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man3/getaddrinfo_a.3:225
3293 msgid ""
3294 "The B<gai_error>()  function returns the status of the request I<req>: "
3295 "either B<EAI_INPROGRESS> if the request was not completed yet, 0 if it was "
3296 "handled successfully, or an error code if the request could not be resolved."
3297 msgstr ""
3298
3299 #. type: Plain text
3300 #: build/C/man3/getaddrinfo_a.3:242
3301 msgid ""
3302 "The B<gai_cancel>()  function cancels the request I<req>.  If the request "
3303 "has been canceled successfully, the error status of the request will be set "
3304 "to B<EAI_CANCELLED> and normal asynchronous notification will be performed.  "
3305 "The request cannot be canceled if it is currently being processed; in that "
3306 "case, it will be handled as if B<gai_cancel>()  has never been called.  If "
3307 "I<req> is NULL, an attempt is made to cancel all outstanding requests that "
3308 "the process has made."
3309 msgstr ""
3310
3311 #. type: Plain text
3312 #: build/C/man3/getaddrinfo_a.3:247
3313 msgid ""
3314 "The B<getaddrinfo_a>()  function returns 0 if all of the requests have been "
3315 "enqueued successfully, or one of the following nonzero error codes:"
3316 msgstr ""
3317
3318 #. type: Plain text
3319 #: build/C/man3/getaddrinfo_a.3:252
3320 msgid ""
3321 "The resources necessary to enqueue the look-up requests were not available.  "
3322 "The application may check the error status of each request to determine "
3323 "which ones failed."
3324 msgstr ""
3325
3326 #. type: Plain text
3327 #: build/C/man3/getaddrinfo_a.3:259
3328 msgid "I<mode> is invalid."
3329 msgstr ""
3330
3331 #. type: Plain text
3332 #: build/C/man3/getaddrinfo_a.3:264
3333 msgid ""
3334 "The B<gai_suspend>()  function returns 0 if at least one of the listed "
3335 "requests has been completed.  Otherwise, it returns one of the following "
3336 "nonzero error codes:"
3337 msgstr ""
3338
3339 #. type: Plain text
3340 #: build/C/man3/getaddrinfo_a.3:267
3341 msgid "The given timeout expired before any of the requests could be completed."
3342 msgstr ""
3343
3344 #. type: TP
3345 #: build/C/man3/getaddrinfo_a.3:267 build/C/man3/getaddrinfo_a.3:297
3346 #, no-wrap
3347 msgid "B<EAI_ALLDONE>"
3348 msgstr ""
3349
3350 #. type: Plain text
3351 #: build/C/man3/getaddrinfo_a.3:270
3352 msgid "There were no actual requests given to the function."
3353 msgstr ""
3354
3355 #. type: TP
3356 #: build/C/man3/getaddrinfo_a.3:270
3357 #, no-wrap
3358 msgid "B<EAI_INTR>"
3359 msgstr ""
3360
3361 #. type: Plain text
3362 #: build/C/man3/getaddrinfo_a.3:275
3363 msgid ""
3364 "A signal has interrupted the function.  Note that this interruption might "
3365 "have been caused by signal notification of some completed look-up request."
3366 msgstr ""
3367
3368 #. type: Plain text
3369 #: build/C/man3/getaddrinfo_a.3:287
3370 msgid ""
3371 "The B<gai_error>()  function can return B<EAI_INPROGRESS> for an unfinished "
3372 "look-up request, 0 for a successfully completed look-up (as described "
3373 "above), one of the error codes that could be returned by B<getaddrinfo>(3), "
3374 "or the error code B<EAI_CANCELLED> if the request has been canceled "
3375 "explicitly before it could be finished."
3376 msgstr ""
3377
3378 #. type: Plain text
3379 #: build/C/man3/getaddrinfo_a.3:291
3380 msgid "The B<gai_cancel>()  function can return one of these values:"
3381 msgstr ""
3382
3383 #. type: TP
3384 #: build/C/man3/getaddrinfo_a.3:291
3385 #, no-wrap
3386 msgid "B<EAI_CANCELLED>"
3387 msgstr ""
3388
3389 #. type: Plain text
3390 #: build/C/man3/getaddrinfo_a.3:294
3391 msgid "The request has been canceled successfully."
3392 msgstr ""
3393
3394 #. type: TP
3395 #: build/C/man3/getaddrinfo_a.3:294
3396 #, no-wrap
3397 msgid "B<EAI_NOTCANCELLED>"
3398 msgstr ""
3399
3400 #. type: Plain text
3401 #: build/C/man3/getaddrinfo_a.3:297
3402 msgid "The request has not been canceled."
3403 msgstr ""
3404
3405 #. type: Plain text
3406 #: build/C/man3/getaddrinfo_a.3:300
3407 msgid "The request has already completed."
3408 msgstr ""
3409
3410 #. type: Plain text
3411 #: build/C/man3/getaddrinfo_a.3:305 build/C/man3/getnameinfo.3:197
3412 msgid ""
3413 "The B<gai_strerror>(3)  function translates these error codes to a human "
3414 "readable string, suitable for error reporting."
3415 msgstr ""
3416
3417 #. type: Plain text
3418 #: build/C/man3/getaddrinfo_a.3:308
3419 msgid ""
3420 "These functions are GNU extensions; they first appeared in glibc in version "
3421 "2.2.3."
3422 msgstr ""
3423
3424 #. type: Plain text
3425 #: build/C/man3/getaddrinfo_a.3:314
3426 msgid ""
3427 "The interface of B<getaddrinfo_a>()  was modeled after the B<lio_listio>(3)  "
3428 "interface."
3429 msgstr ""
3430
3431 #. type: Plain text
3432 #: build/C/man3/getaddrinfo_a.3:318
3433 msgid ""
3434 "Two examples are provided: a simple example that resolves several requests "
3435 "in parallel synchronously, and a complex example showing some of the "
3436 "asynchronous capabilities."
3437 msgstr ""
3438
3439 #. type: SS
3440 #: build/C/man3/getaddrinfo_a.3:318
3441 #, no-wrap
3442 msgid "Synchronous example"
3443 msgstr ""
3444
3445 #. type: Plain text
3446 #: build/C/man3/getaddrinfo_a.3:323
3447 msgid ""
3448 "The program below simply resolves several hostnames in parallel, giving a "
3449 "speed-up compared to resolving the hostnames sequentially using "
3450 "B<getaddrinfo>(3).  The program might be used like this:"
3451 msgstr ""
3452
3453 #. type: Plain text
3454 #: build/C/man3/getaddrinfo_a.3:330
3455 #, no-wrap
3456 msgid ""
3457 "$ B<./a.out ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz>\n"
3458 "ftp.us.kernel.org: 128.30.2.36\n"
3459 "enoent.linuxfoundation.org: Name or service not known\n"
3460 "gnu.cz: 87.236.197.13\n"
3461 msgstr ""
3462
3463 #. type: Plain text
3464 #: build/C/man3/getaddrinfo_a.3:334
3465 msgid "Here is the program source code"
3466 msgstr ""
3467
3468 #. type: Plain text
3469 #: build/C/man3/getaddrinfo_a.3:341 build/C/man3/getaddrinfo_a.3:430
3470 #, no-wrap
3471 msgid ""
3472 "#define _GNU_SOURCE\n"
3473 "#include E<lt>netdb.hE<gt>\n"
3474 "#include E<lt>stdio.hE<gt>\n"
3475 "#include E<lt>stdlib.hE<gt>\n"
3476 "#include E<lt>string.hE<gt>\n"
3477 msgstr ""
3478
3479 #. type: Plain text
3480 #: build/C/man3/getaddrinfo_a.3:349
3481 #, no-wrap
3482 msgid ""
3483 "int\n"
3484 "main(int argc, char *argv[])\n"
3485 "{\n"
3486 "    int i, ret;\n"
3487 "    struct gaicb *reqs[argc - 1];\n"
3488 "    char host[NI_MAXHOST];\n"
3489 "    struct addrinfo *res;\n"
3490 msgstr ""
3491
3492 #. type: Plain text
3493 #: build/C/man3/getaddrinfo_a.3:354
3494 #, no-wrap
3495 msgid ""
3496 "    if (argc E<lt> 2) {\n"
3497 "        fprintf(stderr, \"Usage: %s HOST...\\en\", argv[0]);\n"
3498 "        exit(EXIT_FAILURE);\n"
3499 "    }\n"
3500 msgstr ""
3501
3502 #. type: Plain text
3503 #: build/C/man3/getaddrinfo_a.3:364
3504 #, no-wrap
3505 msgid ""
3506 "    for (i = 0; i E<lt> argc - 1; i++) {\n"
3507 "        reqs[i] = malloc(sizeof(*reqs[0]));\n"
3508 "        if (reqs[i] == NULL) {\n"
3509 "            perror(\"malloc\");\n"
3510 "            exit(EXIT_FAILURE);\n"
3511 "        }\n"
3512 "        memset(reqs[i], 0, sizeof(*reqs[0]));\n"
3513 "        reqs[i]-E<gt>ar_name = argv[i + 1];\n"
3514 "    }\n"
3515 msgstr ""
3516
3517 #. type: Plain text
3518 #: build/C/man3/getaddrinfo_a.3:371
3519 #, no-wrap
3520 msgid ""
3521 "    ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL);\n"
3522 "    if (ret != 0) {\n"
3523 "        fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
3524 "                gai_strerror(ret));\n"
3525 "        exit(EXIT_FAILURE);\n"
3526 "    }\n"
3527 msgstr ""
3528
3529 #. type: Plain text
3530 #: build/C/man3/getaddrinfo_a.3:377
3531 #, no-wrap
3532 msgid ""
3533 "    for (i = 0; i E<lt> argc - 1; i++) {\n"
3534 "        printf(\"%s: \", reqs[i]-E<gt>ar_name);\n"
3535 "        ret = gai_error(reqs[i]);\n"
3536 "        if (ret == 0) {\n"
3537 "            res = reqs[i]-E<gt>ar_result;\n"
3538 msgstr ""
3539
3540 #. type: Plain text
3541 #: build/C/man3/getaddrinfo_a.3:387
3542 #, no-wrap
3543 msgid ""
3544 "            ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
3545 "                    host, sizeof(host),\n"
3546 "                    NULL, 0, NI_NUMERICHOST);\n"
3547 "            if (ret != 0) {\n"
3548 "                fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
3549 "                        gai_strerror(ret));\n"
3550 "                exit(EXIT_FAILURE);\n"
3551 "            }\n"
3552 "            puts(host);\n"
3553 msgstr ""
3554
3555 #. type: Plain text
3556 #: build/C/man3/getaddrinfo_a.3:394
3557 #, no-wrap
3558 msgid ""
3559 "        } else {\n"
3560 "            puts(gai_strerror(ret));\n"
3561 "        }\n"
3562 "    }\n"
3563 "    exit(EXIT_SUCCESS);\n"
3564 "}\n"
3565 msgstr ""
3566
3567 #. type: SS
3568 #: build/C/man3/getaddrinfo_a.3:395
3569 #, no-wrap
3570 msgid "Asynchronous example"
3571 msgstr ""
3572
3573 #. type: Plain text
3574 #: build/C/man3/getaddrinfo_a.3:400
3575 msgid ""
3576 "This example shows a simple interactive B<getaddrinfo_a>()  front-end.  The "
3577 "notification facility is not demonstrated."
3578 msgstr ""
3579
3580 #. type: Plain text
3581 #: build/C/man3/getaddrinfo_a.3:402
3582 msgid "An example session might look like this:"
3583 msgstr ""
3584
3585 #. type: Plain text
3586 #: build/C/man3/getaddrinfo_a.3:419
3587 #, no-wrap
3588 msgid ""
3589 "$ B<./a.out>\n"
3590 "E<gt> a ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz\n"
3591 "E<gt> c 2\n"
3592 "[2] gnu.cz: Request not canceled\n"
3593 "E<gt> w 0 1\n"
3594 "[00] ftp.us.kernel.org: Finished\n"
3595 "E<gt> l\n"
3596 "[00] ftp.us.kernel.org: 216.165.129.139\n"
3597 "[01] enoent.linuxfoundation.org: Processing request in progress\n"
3598 "[02] gnu.cz: 87.236.197.13\n"
3599 "E<gt> l\n"
3600 "[00] ftp.us.kernel.org: 216.165.129.139\n"
3601 "[01] enoent.linuxfoundation.org: Name or service not known\n"
3602 "[02] gnu.cz: 87.236.197.13\n"
3603 msgstr ""
3604
3605 #. type: Plain text
3606 #: build/C/man3/getaddrinfo_a.3:423
3607 msgid "The program source is as follows:"
3608 msgstr ""
3609
3610 #. type: Plain text
3611 #: build/C/man3/getaddrinfo_a.3:433
3612 #, no-wrap
3613 msgid ""
3614 "static struct gaicb **reqs = NULL;\n"
3615 "static int nreqs = 0;\n"
3616 msgstr ""
3617
3618 #. type: Plain text
3619 #: build/C/man3/getaddrinfo_a.3:438
3620 #, no-wrap
3621 msgid ""
3622 "static char *\n"
3623 "getcmd(void)\n"
3624 "{\n"
3625 "    static char buf[256];\n"
3626 msgstr ""
3627
3628 #. type: Plain text
3629 #: build/C/man3/getaddrinfo_a.3:442
3630 #, no-wrap
3631 msgid ""
3632 "    fputs(\"E<gt> \", stdout); fflush(stdout);\n"
3633 "    if (fgets(buf, sizeof(buf), stdin) == NULL)\n"
3634 "        return NULL;\n"
3635 msgstr ""
3636
3637 #. type: Plain text
3638 #: build/C/man3/getaddrinfo_a.3:445
3639 #, no-wrap
3640 msgid ""
3641 "    if (buf[strlen(buf) - 1] == \\(aq\\en\\(aq)\n"
3642 "        buf[strlen(buf) - 1] = 0;\n"
3643 msgstr ""
3644
3645 #. type: Plain text
3646 #: build/C/man3/getaddrinfo_a.3:448
3647 #, no-wrap
3648 msgid ""
3649 "    return buf;\n"
3650 "}\n"
3651 msgstr ""
3652
3653 #. type: Plain text
3654 #: build/C/man3/getaddrinfo_a.3:456
3655 #, no-wrap
3656 msgid ""
3657 "/* Add requests for specified hostnames */\n"
3658 "static void\n"
3659 "add_requests(void)\n"
3660 "{\n"
3661 "    int nreqs_base = nreqs;\n"
3662 "    char *host;\n"
3663 "    int ret;\n"
3664 msgstr ""
3665
3666 #. type: Plain text
3667 #: build/C/man3/getaddrinfo_a.3:460
3668 #, no-wrap
3669 msgid ""
3670 "    while ((host = strtok(NULL, \" \"))) {\n"
3671 "        nreqs++;\n"
3672 "        reqs = realloc(reqs, nreqs * sizeof(reqs[0]));\n"
3673 msgstr ""
3674
3675 #. type: Plain text
3676 #: build/C/man3/getaddrinfo_a.3:464
3677 #, no-wrap
3678 msgid ""
3679 "        reqs[nreqs - 1] = calloc(1, sizeof(*reqs[0]));\n"
3680 "        reqs[nreqs - 1]-E<gt>ar_name = strdup(host);\n"
3681 "    }\n"
3682 msgstr ""
3683
3684 #. type: Plain text
3685 #: build/C/man3/getaddrinfo_a.3:466
3686 #, no-wrap
3687 msgid "    /* Queue nreqs_base..nreqs requests. */\n"
3688 msgstr ""
3689
3690 #. type: Plain text
3691 #: build/C/man3/getaddrinfo_a.3:475
3692 #, no-wrap
3693 msgid ""
3694 "    ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],\n"
3695 "                        nreqs - nreqs_base, NULL);\n"
3696 "    if (ret) {\n"
3697 "        fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
3698 "                gai_strerror(ret));\n"
3699 "        exit(EXIT_FAILURE);\n"
3700 "    }\n"
3701 "}\n"
3702 msgstr ""
3703
3704 #. type: Plain text
3705 #: build/C/man3/getaddrinfo_a.3:484
3706 #, no-wrap
3707 msgid ""
3708 "/* Wait until at least one of specified requests completes */\n"
3709 "static void\n"
3710 "wait_requests(void)\n"
3711 "{\n"
3712 "    char *id;\n"
3713 "    int i, ret, n;\n"
3714 "    struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));\n"
3715 "                /* NULL elements are ignored by gai_suspend(). */\n"
3716 msgstr ""
3717
3718 #. type: Plain text
3719 #: build/C/man3/getaddrinfo_a.3:487 build/C/man3/getaddrinfo_a.3:524
3720 #, no-wrap
3721 msgid ""
3722 "    while ((id = strtok(NULL, \" \")) != NULL) {\n"
3723 "        n = atoi(id);\n"
3724 msgstr ""
3725
3726 #. type: Plain text
3727 #: build/C/man3/getaddrinfo_a.3:492 build/C/man3/getaddrinfo_a.3:529
3728 #, no-wrap
3729 msgid ""
3730 "        if (n E<gt>= nreqs) {\n"
3731 "            printf(\"Bad request number: %s\\en\", id);\n"
3732 "            return;\n"
3733 "        }\n"
3734 msgstr ""
3735
3736 #. type: Plain text
3737 #: build/C/man3/getaddrinfo_a.3:495
3738 #, no-wrap
3739 msgid ""
3740 "        wait_reqs[n] = reqs[n];\n"
3741 "    }\n"
3742 msgstr ""
3743
3744 #. type: Plain text
3745 #: build/C/man3/getaddrinfo_a.3:501
3746 #, no-wrap
3747 msgid ""
3748 "    ret = gai_suspend(wait_reqs, nreqs, NULL);\n"
3749 "    if (ret) {\n"
3750 "        printf(\"gai_suspend(): %s\\en\", gai_strerror(ret));\n"
3751 "        return;\n"
3752 "    }\n"
3753 msgstr ""
3754
3755 #. type: Plain text
3756 #: build/C/man3/getaddrinfo_a.3:505
3757 #, no-wrap
3758 msgid ""
3759 "    for (i = 0; i E<lt> nreqs; i++) {\n"
3760 "        if (wait_reqs[i] == NULL)\n"
3761 "            continue;\n"
3762 msgstr ""
3763
3764 #. type: Plain text
3765 #: build/C/man3/getaddrinfo_a.3:509
3766 #, no-wrap
3767 msgid ""
3768 "        ret = gai_error(reqs[i]);\n"
3769 "        if (ret == EAI_INPROGRESS)\n"
3770 "            continue;\n"
3771 msgstr ""
3772
3773 #. type: Plain text
3774 #: build/C/man3/getaddrinfo_a.3:514
3775 #, no-wrap
3776 msgid ""
3777 "        printf(\"[%02d] %s: %s\\en\", i, reqs[i]-E<gt>ar_name,\n"
3778 "               ret == 0 ? \"Finished\" : gai_strerror(ret));\n"
3779 "    }\n"
3780 "}\n"
3781 msgstr ""
3782
3783 #. type: Plain text
3784 #: build/C/man3/getaddrinfo_a.3:521
3785 #, no-wrap
3786 msgid ""
3787 "/* Cancel specified requests */\n"
3788 "static void\n"
3789 "cancel_requests(void)\n"
3790 "{\n"
3791 "    char *id;\n"
3792 "    int ret, n;\n"
3793 msgstr ""
3794
3795 #. type: Plain text
3796 #: build/C/man3/getaddrinfo_a.3:535
3797 #, no-wrap
3798 msgid ""
3799 "        ret = gai_cancel(reqs[n]);\n"
3800 "        printf(\"[%s] %s: %s\\en\", id, reqs[atoi(id)]-E<gt>ar_name,\n"
3801 "               gai_strerror(ret));\n"
3802 "    }\n"
3803 "}\n"
3804 msgstr ""
3805
3806 #. type: Plain text
3807 #: build/C/man3/getaddrinfo_a.3:543
3808 #, no-wrap
3809 msgid ""
3810 "/* List all requests */\n"
3811 "static void\n"
3812 "list_requests(void)\n"
3813 "{\n"
3814 "    int i, ret;\n"
3815 "    char host[NI_MAXHOST];\n"
3816 "    struct addrinfo *res;\n"
3817 msgstr ""
3818
3819 #. type: Plain text
3820 #: build/C/man3/getaddrinfo_a.3:547
3821 #, no-wrap
3822 msgid ""
3823 "    for (i = 0; i E<lt> nreqs; i++) {\n"
3824 "        printf(\"[%02d] %s: \", i, reqs[i]-E<gt>ar_name);\n"
3825 "        ret = gai_error(reqs[i]);\n"
3826 msgstr ""
3827
3828 #. type: Plain text
3829 #: build/C/man3/getaddrinfo_a.3:550
3830 #, no-wrap
3831 msgid ""
3832 "        if (!ret) {\n"
3833 "            res = reqs[i]-E<gt>ar_result;\n"
3834 msgstr ""
3835
3836 #. type: Plain text
3837 #: build/C/man3/getaddrinfo_a.3:565
3838 #, no-wrap
3839 msgid ""
3840 "            ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
3841 "                              host, sizeof(host),\n"
3842 "                              NULL, 0, NI_NUMERICHOST);\n"
3843 "            if (ret) {\n"
3844 "                fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
3845 "                        gai_strerror(ret));\n"
3846 "                exit(EXIT_FAILURE);\n"
3847 "            }\n"
3848 "            puts(host);\n"
3849 "        } else {\n"
3850 "            puts(gai_strerror(ret));\n"
3851 "        }\n"
3852 "    }\n"
3853 "}\n"
3854 msgstr ""
3855
3856 #. type: Plain text
3857 #: build/C/man3/getaddrinfo_a.3:571
3858 #, no-wrap
3859 msgid ""
3860 "int\n"
3861 "main(int argc, char *argv[])\n"
3862 "{\n"
3863 "    char *cmdline;\n"
3864 "    char *cmd;\n"
3865 msgstr ""
3866
3867 #. type: Plain text
3868 #: build/C/man3/getaddrinfo_a.3:574
3869 #, no-wrap
3870 msgid ""
3871 "    while ((cmdline = getcmd()) != NULL) {\n"
3872 "        cmd = strtok(cmdline, \" \");\n"
3873 msgstr ""
3874
3875 #. type: Plain text
3876 #: build/C/man3/getaddrinfo_a.3:599
3877 #, no-wrap
3878 msgid ""
3879 "        if (cmd == NULL) {\n"
3880 "            list_requests();\n"
3881 "        } else {\n"
3882 "            switch (cmd[0]) {\n"
3883 "            case \\(aqa\\(aq:\n"
3884 "                add_requests();\n"
3885 "                break;\n"
3886 "            case \\(aqw\\(aq:\n"
3887 "                wait_requests();\n"
3888 "                break;\n"
3889 "            case \\(aqc\\(aq:\n"
3890 "                cancel_requests();\n"
3891 "                break;\n"
3892 "            case \\(aql\\(aq:\n"
3893 "                list_requests();\n"
3894 "                break;\n"
3895 "            default:\n"
3896 "                fprintf(stderr, \"Bad command: %c\\en\", cmd[0]);\n"
3897 "                break;\n"
3898 "            }\n"
3899 "        }\n"
3900 "    }\n"
3901 "    exit(EXIT_SUCCESS);\n"
3902 "}\n"
3903 msgstr ""
3904
3905 #. type: Plain text
3906 #: build/C/man3/getaddrinfo_a.3:607
3907 msgid ""
3908 "B<getaddrinfo>(3), B<inet>(3), B<lio_listio>(3), B<hostname>(7), B<ip>(7), "
3909 "B<sigevent>(7)"
3910 msgstr ""
3911
3912 #. type: TH
3913 #: build/C/man1/getent.1:24
3914 #, no-wrap
3915 msgid "GETENT"
3916 msgstr ""
3917
3918 #. type: TH
3919 #: build/C/man1/getent.1:24
3920 #, no-wrap
3921 msgid "2013-03-15"
3922 msgstr ""
3923
3924 #. type: TH
3925 #: build/C/man1/getent.1:24
3926 #, no-wrap
3927 msgid "User Commands"
3928 msgstr ""
3929
3930 #. type: Plain text
3931 #: build/C/man1/getent.1:27
3932 msgid "getent - get entries from Name Service Switch libraries"
3933 msgstr ""
3934
3935 #. type: Plain text
3936 #: build/C/man1/getent.1:30
3937 msgid "B<getent> I<database> [I<key> ...]"
3938 msgstr ""
3939
3940 #. type: Plain text
3941 #: build/C/man1/getent.1:45
3942 msgid ""
3943 "The B<getent> command displays entries from databases supported by the Name "
3944 "Service Switch libraries, which are configured in I</etc/nsswitch.conf>.  If "
3945 "one or more I<key> arguments are provided, then only the entries that match "
3946 "the supplied keys will be displayed.  Otherwise, if no I<key> is provided, "
3947 "all entries will be displayed (unless the database does not support "
3948 "enumeration)."
3949 msgstr ""
3950
3951 #. type: Plain text
3952 #: build/C/man1/getent.1:49
3953 msgid ""
3954 "The I<database> may be any of those supported by the GNU C Library, listed "
3955 "below:"
3956 msgstr ""
3957
3958 #. type: TP
3959 #: build/C/man1/getent.1:50
3960 #, no-wrap
3961 msgid "B<ahosts>"
3962 msgstr ""
3963
3964 #. type: Plain text
3965 #: build/C/man1/getent.1:71
3966 msgid ""
3967 "When no I<key> is provided, use B<sethostent>(3), B<gethostent>(3), and "
3968 "B<endhostent>(3)  to enumerate the hosts database.  This is identical to "
3969 "using B<hosts>.  When one or more I<key> arguments are provided, pass each "
3970 "I<key> in succession to B<getaddrinfo>(3)  with the address family "
3971 "B<AF_UNSPEC>, enumerating each socket address structure returned."
3972 msgstr ""
3973
3974 #. type: TP
3975 #: build/C/man1/getent.1:71
3976 #, no-wrap
3977 msgid "B<ahostsv4>"
3978 msgstr ""
3979
3980 #. type: Plain text
3981 #: build/C/man1/getent.1:77
3982 msgid "Same as B<ahosts>, but use the address family B<AF_INET>."
3983 msgstr ""
3984
3985 #. type: TP
3986 #: build/C/man1/getent.1:77
3987 #, no-wrap
3988 msgid "B<ahostsv6>"
3989 msgstr ""
3990
3991 #. type: Plain text
3992 #: build/C/man1/getent.1:88
3993 msgid ""
3994 "Same as B<ahosts>, but use the address family B<AF_INET6>.  The call to "
3995 "B<getaddrinfo>(3)  in this case includes the B<AI_V4MAPPED> flag."
3996 msgstr ""
3997
3998 #. type: TP
3999 #: build/C/man1/getent.1:88 build/C/man5/nsswitch.conf.5:44
4000 #, no-wrap
4001 msgid "B<aliases>"
4002 msgstr ""
4003
4004 #. type: Plain text
4005 #: build/C/man1/getent.1:105
4006 msgid ""
4007 "When no I<key> is provided, use B<setaliasent>(3), B<getaliasent>(3), and "
4008 "B<endaliasent>(3)  to enumerate the aliases database.  When one or more "
4009 "I<key> arguments are provided, pass each I<key> in succession to "
4010 "B<getaliasbyname>(3)  and display the result."
4011 msgstr ""
4012
4013 #. type: TP
4014 #: build/C/man1/getent.1:105 build/C/man5/nsswitch.conf.5:49
4015 #, no-wrap
4016 msgid "B<ethers>"
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man1/getent.1:121
4021 msgid ""
4022 "When one or more I<key> arguments are provided, pass each I<key> in "
4023 "succession to B<ether_aton>(3)  and B<ether_hostton>(3)  until a result is "
4024 "obtained, and display the result.  Enumeration is not supported on "
4025 "B<ethers>, so a I<key> must be provided."
4026 msgstr ""
4027
4028 #. type: TP
4029 #: build/C/man1/getent.1:121 build/C/man5/nsswitch.conf.5:52
4030 #, no-wrap
4031 msgid "B<group>"
4032 msgstr ""
4033
4034 #. type: Plain text
4035 #: build/C/man1/getent.1:142
4036 msgid ""
4037 "When no I<key> is provided, use B<setgrent>(3), B<getgrent>(3), and "
4038 "B<endgrent>(3)  to enumerate the group database.  When one or more I<key> "
4039 "arguments are provided, pass each numeric I<key> to B<getgrgid>(3)  and each "
4040 "nonnumeric I<key> to B<getgrnam>(3)  and display the result."
4041 msgstr ""
4042
4043 #. type: TP
4044 #: build/C/man1/getent.1:142
4045 #, no-wrap
4046 msgid "B<gshadow>"
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: build/C/man1/getent.1:159
4051 msgid ""
4052 "When no I<key> is provided, use B<setsgent>(3), B<getsgent>(3), and "
4053 "B<endsgent>(3)  to enumerate the gshadow database.  When one or more I<key> "
4054 "arguments are provided, pass each I<key> in succession to B<getsgnam>(3)  "
4055 "and display the result."
4056 msgstr ""
4057
4058 #. type: TP
4059 #: build/C/man1/getent.1:159 build/C/man5/nsswitch.conf.5:57
4060 #, no-wrap
4061 msgid "B<hosts>"
4062 msgstr ""
4063
4064 #. type: Plain text
4065 #: build/C/man1/getent.1:182
4066 msgid ""
4067 "When no I<key> is provided, use B<sethostent>(3), B<gethostent>(3), and "
4068 "B<endhostent>(3)  to enumerate the hosts database.  When one or more I<key> "
4069 "arguments are provided, pass each I<key> to B<gethostbyaddr>(3)  or "
4070 "B<gethostbyname2>(3), depending on whether a call to B<inet_pton>(3)  "
4071 "indicates that the I<key> is an IPv6 or IPv4 address or not, and display the "
4072 "result."
4073 msgstr ""
4074
4075 #. type: TP
4076 #: build/C/man1/getent.1:182 build/C/man5/nsswitch.conf.5:62
4077 #, no-wrap
4078 msgid "B<initgroups>"
4079 msgstr ""
4080
4081 #. type: Plain text
4082 #: build/C/man1/getent.1:196
4083 msgid ""
4084 "When one or more I<key> arguments are provided, pass each I<key> in "
4085 "succession to B<getgrouplist>(3)  and display the result.  Enumeration is "
4086 "not supported on B<initgroups>, so a I<key> must be provided."
4087 msgstr ""
4088
4089 #. type: TP
4090 #: build/C/man1/getent.1:196 build/C/man5/nsswitch.conf.5:67
4091 #, no-wrap
4092 msgid "B<netgroup>"
4093 msgstr ""
4094
4095 #. type: Plain text
4096 #: build/C/man1/getent.1:222
4097 msgid ""
4098 "When one I<key> is provided, pass the I<key> to B<setnetgrent>(3)  and, "
4099 "using B<getnetgrent>(3)  display the resulting string triple (I<hostname>, "
4100 "I<username>, I<domainname>).  Alternatively, three I<keys> may be provided, "
4101 "which are interpreted as the I<hostname>, I<username> and I<domainname> to "
4102 "match to a netgroup name via B<innetgr>(3).  Enumeration is not supported on "
4103 "B<netgroup>, so either one or three I<keys> must be provided."
4104 msgstr ""
4105
4106 #. type: TP
4107 #: build/C/man1/getent.1:222 build/C/man5/nsswitch.conf.5:71
4108 #, no-wrap
4109 msgid "B<networks>"
4110 msgstr ""
4111
4112 #. type: Plain text
4113 #: build/C/man1/getent.1:243
4114 msgid ""
4115 "When no I<key> is provided, use B<setnetent>(3), B<getnetent>(3), and "
4116 "B<endnetent>(3)  to enumerate the networks database.  When one or more "
4117 "I<key> arguments are provided, pass each numeric I<key> to "
4118 "B<getnetbyaddr>(3)  and each nonnumeric I<key> to B<getnetbyname>(3)  and "
4119 "display the result."
4120 msgstr ""
4121
4122 #. type: TP
4123 #: build/C/man1/getent.1:243 build/C/man5/nsswitch.conf.5:76
4124 #, no-wrap
4125 msgid "B<passwd>"
4126 msgstr ""
4127
4128 #. type: Plain text
4129 #: build/C/man1/getent.1:264
4130 msgid ""
4131 "When no I<key> is provided, use B<setpwent>(3), B<getpwent>(3), and "
4132 "B<endpwent>(3)  to enumerate the passwd database.  When one or more I<key> "
4133 "arguments are provided, pass each numeric I<key> to B<getpwuid>(3)  and each "
4134 "nonnumeric I<key> to B<getpwnam>(3)  and display the result."
4135 msgstr ""
4136
4137 #. type: TP
4138 #: build/C/man1/getent.1:264 build/C/man5/nsswitch.conf.5:81
4139 #, no-wrap
4140 msgid "B<protocols>"
4141 msgstr ""
4142
4143 #. type: Plain text
4144 #: build/C/man1/getent.1:285
4145 msgid ""
4146 "When no I<key> is provided, use B<setprotoent>(3), B<getprotoent>(3), and "
4147 "B<endprotoent>(3)  to enumerate the protocols database.  When one or more "
4148 "I<key> arguments are provided, pass each numeric I<key> to "
4149 "B<getprotobynumber>(3)  and each nonnumeric I<key> to B<getprotobyname>(3)  "
4150 "and display the result."
4151 msgstr ""
4152
4153 #. type: TP
4154 #: build/C/man1/getent.1:285 build/C/man5/nsswitch.conf.5:89
4155 #, no-wrap
4156 msgid "B<rpc>"
4157 msgstr ""
4158
4159 #. type: Plain text
4160 #: build/C/man1/getent.1:306
4161 msgid ""
4162 "When no I<key> is provided, use B<setrpcent>(3), B<getrpcent>(3), and "
4163 "B<endrpcent>(3)  to enumerate the rpc database.  When one or more I<key> "
4164 "arguments are provided, pass each numeric I<key> to B<getrpcbynumber>(3)  "
4165 "and each nonnumeric I<key> to B<getrpcbyname>(3)  and display the result."
4166 msgstr ""
4167
4168 #. type: TP
4169 #: build/C/man1/getent.1:306 build/C/man5/nsswitch.conf.5:94
4170 #, no-wrap
4171 msgid "B<services>"
4172 msgstr ""
4173
4174 #. type: Plain text
4175 #: build/C/man1/getent.1:327
4176 msgid ""
4177 "When no I<key> is provided, use B<setservent>(3), B<getservent>(3), and "
4178 "B<endservent>(3)  to enumerate the services database.  When one or more "
4179 "I<key> arguments are provided, pass each numeric I<key> to "
4180 "B<getservbynumber>(3)  and each nonnumeric I<key> to B<getservbyname>(3)  "
4181 "and display the result."
4182 msgstr ""
4183
4184 #. type: TP
4185 #: build/C/man1/getent.1:327 build/C/man5/nsswitch.conf.5:99
4186 #, no-wrap
4187 msgid "B<shadow>"
4188 msgstr ""
4189
4190 #. type: Plain text
4191 #: build/C/man1/getent.1:344
4192 msgid ""
4193 "When no I<key> is provided, use B<setspent>(3), B<getspent>(3), and "
4194 "B<endspent>(3)  to enumerate the shadow database.  When one or more I<key> "
4195 "arguments are provided, pass each I<key> in succession to B<getspnam>(3)  "
4196 "and display the result."
4197 msgstr ""
4198
4199 #. type: SH
4200 #: build/C/man1/getent.1:345
4201 #, no-wrap
4202 msgid "EXIT STATUS"
4203 msgstr ""
4204
4205 #. type: Plain text
4206 #: build/C/man1/getent.1:348
4207 msgid "One of the following exit values can be returned by B<getent>:"
4208 msgstr ""
4209
4210 #. type: TP
4211 #: build/C/man1/getent.1:349
4212 #, no-wrap
4213 msgid "B<0>"
4214 msgstr ""
4215
4216 #. type: Plain text
4217 #: build/C/man1/getent.1:352
4218 msgid "Command completed successfully."
4219 msgstr ""
4220
4221 #. type: TP
4222 #: build/C/man1/getent.1:352
4223 #, no-wrap
4224 msgid "B<1>"
4225 msgstr ""
4226
4227 #. type: Plain text
4228 #: build/C/man1/getent.1:357
4229 msgid "Missing arguments, or I<database> unknown."
4230 msgstr ""
4231
4232 #. type: TP
4233 #: build/C/man1/getent.1:357
4234 #, no-wrap
4235 msgid "B<2>"
4236 msgstr ""
4237
4238 #. type: Plain text
4239 #: build/C/man1/getent.1:363
4240 msgid "One or more supplied I<key> could not be found in the I<database>."
4241 msgstr ""
4242
4243 #. type: TP
4244 #: build/C/man1/getent.1:363
4245 #, no-wrap
4246 msgid "B<3>"
4247 msgstr ""
4248
4249 #. type: Plain text
4250 #: build/C/man1/getent.1:367
4251 msgid "Enumeration not supported on this I<database>."
4252 msgstr ""
4253
4254 #. type: Plain text
4255 #: build/C/man1/getent.1:370
4256 msgid "B<nsswitch.conf>(5)"
4257 msgstr ""
4258
4259 #. type: TH
4260 #: build/C/man3/gethostbyname.3:38
4261 #, no-wrap
4262 msgid "GETHOSTBYNAME"
4263 msgstr ""
4264
4265 #. type: TH
4266 #: build/C/man3/gethostbyname.3:38
4267 #, no-wrap
4268 msgid "2014-03-11"
4269 msgstr ""
4270
4271 #. type: Plain text
4272 #: build/C/man3/gethostbyname.3:46
4273 msgid ""
4274 "gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno, "
4275 "herror, hstrerror, gethostbyaddr_r, gethostbyname2, gethostbyname2_r, "
4276 "gethostbyname_r, gethostent_r - get network host entry"
4277 msgstr ""
4278
4279 #. type: Plain text
4280 #: build/C/man3/gethostbyname.3:50
4281 #, no-wrap
4282 msgid ""
4283 "B<#include E<lt>netdb.hE<gt>>\n"
4284 "B<extern int h_errno;>\n"
4285 msgstr ""
4286
4287 #. type: Plain text
4288 #: build/C/man3/gethostbyname.3:52
4289 #, no-wrap
4290 msgid "B<struct hostent *gethostbyname(const char *>I<name>B<);>\n"
4291 msgstr ""
4292
4293 #. type: Plain text
4294 #: build/C/man3/gethostbyname.3:56
4295 #, no-wrap
4296 msgid ""
4297 "B<#include E<lt>sys/socket.hE<gt>>       /* for AF_INET */\n"
4298 "B<struct hostent *gethostbyaddr(const void *>I<addr>B<,>\n"
4299 "B<                              socklen_t >I<len>B<, int >I<type>B<);>\n"
4300 msgstr ""
4301
4302 #. type: Plain text
4303 #: build/C/man3/gethostbyname.3:58
4304 #, no-wrap
4305 msgid "B<void sethostent(int >I<stayopen>B<);>\n"
4306 msgstr ""
4307
4308 #. type: Plain text
4309 #: build/C/man3/gethostbyname.3:60
4310 #, no-wrap
4311 msgid "B<void endhostent(void);>\n"
4312 msgstr ""
4313
4314 #. type: Plain text
4315 #: build/C/man3/gethostbyname.3:62
4316 #, no-wrap
4317 msgid "B<void herror(const char *>I<s>B<);>\n"
4318 msgstr ""
4319
4320 #. type: Plain text
4321 #: build/C/man3/gethostbyname.3:64
4322 #, no-wrap
4323 msgid "B<const char *hstrerror(int >I<err>B<);>\n"
4324 msgstr ""
4325
4326 #. type: Plain text
4327 #: build/C/man3/gethostbyname.3:66
4328 #, no-wrap
4329 msgid "/* System V/POSIX extension */\n"
4330 msgstr ""
4331
4332 #. type: Plain text
4333 #: build/C/man3/gethostbyname.3:68
4334 #, no-wrap
4335 msgid "B<struct hostent *gethostent(void);>\n"
4336 msgstr ""
4337
4338 #. type: Plain text
4339 #: build/C/man3/gethostbyname.3:72
4340 #, no-wrap
4341 msgid "B<struct hostent *gethostbyname2(const char *>I<name>B<, int >I<af>B<);>\n"
4342 msgstr ""
4343
4344 #. type: Plain text
4345 #: build/C/man3/gethostbyname.3:76
4346 #, no-wrap
4347 msgid ""
4348 "B<int gethostent_r(>\n"
4349 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4350 ">I<buflen>B<,>\n"
4351 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4352 msgstr ""
4353
4354 #. type: Plain text
4355 #: build/C/man3/gethostbyname.3:80
4356 #, no-wrap
4357 msgid ""
4358 "B<int gethostbyaddr_r(const void *>I<addr>B<, socklen_t >I<len>B<, int "
4359 ">I<type>B<,>\n"
4360 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4361 ">I<buflen>B<,>\n"
4362 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4363 msgstr ""
4364
4365 #. type: Plain text
4366 #: build/C/man3/gethostbyname.3:84
4367 #, no-wrap
4368 msgid ""
4369 "B<int gethostbyname_r(const char *>I<name>B<,>\n"
4370 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4371 ">I<buflen>B<,>\n"
4372 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4373 msgstr ""
4374
4375 #. type: Plain text
4376 #: build/C/man3/gethostbyname.3:88
4377 #, no-wrap
4378 msgid ""
4379 "B<int gethostbyname2_r(const char *>I<name>B<, int >I<af,>\n"
4380 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4381 ">I<buflen>B<,>\n"
4382 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4383 msgstr ""
4384
4385 #. type: Plain text
4386 #: build/C/man3/gethostbyname.3:102
4387 msgid ""
4388 "B<gethostbyname2>(), B<gethostent_r>(), B<gethostbyaddr_r>(), "
4389 "B<gethostbyname_r>(), B<gethostbyname2_r>():"
4390 msgstr ""
4391
4392 #. type: Plain text
4393 #: build/C/man3/gethostbyname.3:104 build/C/man3/gethostbyname.3:112 build/C/man3/getnetent_r.3:60 build/C/man3/getprotoent_r.3:57 build/C/man3/getservent_r.3:57 build/C/man3/inet_net_pton.3:58
4394 msgid "_BSD_SOURCE || _SVID_SOURCE"
4395 msgstr ""
4396
4397 #. type: Plain text
4398 #: build/C/man3/gethostbyname.3:108
4399 msgid "B<herror>(), B<hstrerror>():"
4400 msgstr ""
4401
4402 #. type: TP
4403 #: build/C/man3/gethostbyname.3:109
4404 #, no-wrap
4405 msgid "Since glibc 2.8:"
4406 msgstr ""
4407
4408 #. type: TP
4409 #: build/C/man3/gethostbyname.3:112
4410 #, no-wrap
4411 msgid "Before glibc 2.8:"
4412 msgstr ""
4413
4414 #. type: Plain text
4415 #: build/C/man3/gethostbyname.3:115 build/C/man3/gethostbyname.3:126
4416 msgid "none"
4417 msgstr ""
4418
4419 #. type: Plain text
4420 #: build/C/man3/gethostbyname.3:118
4421 msgid "B<h_errno>:"
4422 msgstr ""
4423
4424 #. type: TP
4425 #: build/C/man3/gethostbyname.3:119
4426 #, no-wrap
4427 msgid "Since glibc 2.12:"
4428 msgstr ""
4429
4430 #. type: Plain text
4431 #: build/C/man3/gethostbyname.3:123
4432 #, no-wrap
4433 msgid ""
4434 "_BSD_SOURCE || _SVID_SOURCE ||\n"
4435 "    (_POSIX_C_SOURCE E<lt> 200809L && _XOPEN_SOURCE E<lt> 700)\n"
4436 msgstr ""
4437
4438 #. type: TP
4439 #: build/C/man3/gethostbyname.3:123
4440 #, no-wrap
4441 msgid "Before glibc 2.12:"
4442 msgstr ""
4443
4444 #. type: Plain text
4445 #: build/C/man3/gethostbyname.3:143
4446 msgid ""
4447 "The B<gethostbyname*>(), B<gethostbyaddr*>(), B<herror>(), and "
4448 "B<hstrerror>()  functions are obsolete.  Applications should use "
4449 "B<getaddrinfo>(3), B<getnameinfo>(3), and B<gai_strerror>(3)  instead."
4450 msgstr ""
4451
4452 #. type: Plain text
4453 #: build/C/man3/gethostbyname.3:184
4454 msgid ""
4455 "The B<gethostbyname>()  function returns a structure of type I<hostent> for "
4456 "the given host I<name>.  Here I<name> is either a hostname, or an IPv4 "
4457 "address in standard dot notation (as for B<inet_addr>(3)), or an IPv6 "
4458 "address in colon (and possibly dot) notation.  (See RFC\\ 1884 for the "
4459 "description of IPv6 addresses.)  If I<name> is an IPv4 or IPv6 address, no "
4460 "lookup is performed and B<gethostbyname>()  simply copies I<name> into the "
4461 "I<h_name> field and its I<struct in_addr> equivalent into the "
4462 "I<h_addr_list[0]> field of the returned I<hostent> structure.  If I<name> "
4463 "doesn't end in a dot and the environment variable B<HOSTALIASES> is set, the "
4464 "alias file pointed to by B<HOSTALIASES> will first be searched for I<name> "
4465 "(see B<hostname>(7)  for the file format).  The current domain and its "
4466 "parents are searched unless I<name> ends in a dot."
4467 msgstr ""
4468
4469 #. type: Plain text
4470 #: build/C/man3/gethostbyname.3:200
4471 msgid ""
4472 "The B<gethostbyaddr>()  function returns a structure of type I<hostent> for "
4473 "the given host address I<addr> of length I<len> and address type I<type>.  "
4474 "Valid address types are B<AF_INET> and B<AF_INET6>.  The host address "
4475 "argument is a pointer to a struct of a type depending on the address type, "
4476 "for example a I<struct in_addr *> (probably obtained via a call to "
4477 "B<inet_addr>(3))  for address type B<AF_INET>."
4478 msgstr ""
4479
4480 #. type: Plain text
4481 #: build/C/man3/gethostbyname.3:207
4482 msgid ""
4483 "The B<sethostent>()  function specifies, if I<stayopen> is true (1), that a "
4484 "connected TCP socket should be used for the name server queries and that the "
4485 "connection should remain open during successive queries.  Otherwise, name "
4486 "server queries will use UDP datagrams."
4487 msgstr ""
4488
4489 #. type: Plain text
4490 #: build/C/man3/gethostbyname.3:212
4491 msgid ""
4492 "The B<endhostent>()  function ends the use of a TCP connection for name "
4493 "server queries."
4494 msgstr ""
4495
4496 #. type: Plain text
4497 #: build/C/man3/gethostbyname.3:217
4498 msgid ""
4499 "The (obsolete)  B<herror>()  function prints the error message associated "
4500 "with the current value of I<h_errno> on I<stderr>."
4501 msgstr ""
4502
4503 #. type: Plain text
4504 #: build/C/man3/gethostbyname.3:222
4505 msgid ""
4506 "The (obsolete)  B<hstrerror>()  function takes an error number (typically "
4507 "I<h_errno>) and returns the corresponding message string."
4508 msgstr ""
4509
4510 #.  (See
4511 #.  .BR resolv+ (8)).
4512 #. type: Plain text
4513 #: build/C/man3/gethostbyname.3:239
4514 msgid ""
4515 "The domain name queries carried out by B<gethostbyname>()  and "
4516 "B<gethostbyaddr>()  use a combination of any or all of the name server "
4517 "B<named>(8), a broken out line from I</etc/hosts>, and the Network "
4518 "Information Service (NIS or YP), depending upon the contents of the I<order> "
4519 "line in I</etc/host.conf>.  The default action is to query B<named>(8), "
4520 "followed by I</etc/hosts>."
4521 msgstr ""
4522
4523 #. type: Plain text
4524 #: build/C/man3/gethostbyname.3:241
4525 msgid "The I<hostent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
4526 msgstr ""
4527
4528 #. type: Plain text
4529 #: build/C/man3/gethostbyname.3:253
4530 #, no-wrap
4531 msgid ""
4532 "struct hostent {\n"
4533 "    char  *h_name;            /* official name of host */\n"
4534 "    char **h_aliases;         /* alias list */\n"
4535 "    int    h_addrtype;        /* host address type */\n"
4536 "    int    h_length;          /* length of address */\n"
4537 "    char **h_addr_list;       /* list of addresses */\n"
4538 "}\n"
4539 "#define h_addr h_addr_list[0] /* for backward compatibility */\n"
4540 msgstr ""
4541
4542 #. type: Plain text
4543 #: build/C/man3/gethostbyname.3:257
4544 msgid "The members of the I<hostent> structure are:"
4545 msgstr ""
4546
4547 #. type: TP
4548 #: build/C/man3/gethostbyname.3:257 build/C/man3/getipnodebyname.3:210
4549 #, no-wrap
4550 msgid "I<h_name>"
4551 msgstr ""
4552
4553 #. type: Plain text
4554 #: build/C/man3/gethostbyname.3:260
4555 msgid "The official name of the host."
4556 msgstr ""
4557
4558 #. type: TP
4559 #: build/C/man3/gethostbyname.3:260 build/C/man3/getipnodebyname.3:213
4560 #, no-wrap
4561 msgid "I<h_aliases>"
4562 msgstr ""
4563
4564 #. type: Plain text
4565 #: build/C/man3/gethostbyname.3:263
4566 msgid "An array of alternative names for the host, terminated by a null pointer."
4567 msgstr ""
4568
4569 #. type: TP
4570 #: build/C/man3/gethostbyname.3:263 build/C/man3/getipnodebyname.3:217
4571 #, no-wrap
4572 msgid "I<h_addrtype>"
4573 msgstr ""
4574
4575 #. type: Plain text
4576 #: build/C/man3/gethostbyname.3:270
4577 msgid "The type of address; always B<AF_INET> or B<AF_INET6> at present."
4578 msgstr ""
4579
4580 #. type: TP
4581 #: build/C/man3/gethostbyname.3:270 build/C/man3/getipnodebyname.3:239
4582 #, no-wrap
4583 msgid "I<h_length>"
4584 msgstr ""
4585
4586 #. type: Plain text
4587 #: build/C/man3/gethostbyname.3:273
4588 msgid "The length of the address in bytes."
4589 msgstr ""
4590
4591 #. type: TP
4592 #: build/C/man3/gethostbyname.3:273 build/C/man3/getipnodebyname.3:253
4593 #, no-wrap
4594 msgid "I<h_addr_list>"
4595 msgstr ""
4596
4597 #. type: Plain text
4598 #: build/C/man3/gethostbyname.3:277
4599 msgid ""
4600 "An array of pointers to network addresses for the host (in network byte "
4601 "order), terminated by a null pointer."
4602 msgstr ""
4603
4604 #. type: TP
4605 #: build/C/man3/gethostbyname.3:277
4606 #, no-wrap
4607 msgid "I<h_addr>"
4608 msgstr ""
4609
4610 #. type: Plain text
4611 #: build/C/man3/gethostbyname.3:280
4612 msgid "The first address in I<h_addr_list> for backward compatibility."
4613 msgstr ""
4614
4615 #. type: Plain text
4616 #: build/C/man3/gethostbyname.3:292
4617 msgid ""
4618 "The B<gethostbyname>()  and B<gethostbyaddr>()  functions return the "
4619 "I<hostent> structure or a null pointer if an error occurs.  On error, the "
4620 "I<h_errno> variable holds an error number.  When non-NULL, the return value "
4621 "may point at static data, see the notes below."
4622 msgstr ""
4623
4624 #. type: Plain text
4625 #: build/C/man3/gethostbyname.3:294
4626 msgid "The variable I<h_errno> can have the following values:"
4627 msgstr ""
4628
4629 #. type: TP
4630 #: build/C/man3/gethostbyname.3:294 build/C/man3/getipnodebyname.3:190
4631 #, no-wrap
4632 msgid "B<HOST_NOT_FOUND>"
4633 msgstr ""
4634
4635 #. type: Plain text
4636 #: build/C/man3/gethostbyname.3:297
4637 msgid "The specified host is unknown."
4638 msgstr ""
4639
4640 #. type: TP
4641 #: build/C/man3/gethostbyname.3:297
4642 #, no-wrap
4643 msgid "B<NO_ADDRESS> or B<NO_DATA>"
4644 msgstr ""
4645
4646 #. type: Plain text
4647 #: build/C/man3/gethostbyname.3:300
4648 msgid "The requested name is valid but does not have an IP address."
4649 msgstr ""
4650
4651 #. type: TP
4652 #: build/C/man3/gethostbyname.3:300 build/C/man3/getipnodebyname.3:199
4653 #, no-wrap
4654 msgid "B<NO_RECOVERY>"
4655 msgstr ""
4656
4657 #. type: Plain text
4658 #: build/C/man3/gethostbyname.3:303
4659 msgid "A nonrecoverable name server error occurred."
4660 msgstr ""
4661
4662 #. type: TP
4663 #: build/C/man3/gethostbyname.3:303 build/C/man3/getipnodebyname.3:202
4664 #, no-wrap
4665 msgid "B<TRY_AGAIN>"
4666 msgstr ""
4667
4668 #. type: Plain text
4669 #: build/C/man3/gethostbyname.3:307
4670 msgid ""
4671 "A temporary error occurred on an authoritative name server.  Try again "
4672 "later."
4673 msgstr ""
4674
4675 #. type: TP
4676 #: build/C/man3/gethostbyname.3:308 build/C/man5/host.conf.5:181
4677 #, no-wrap
4678 msgid "I</etc/host.conf>"
4679 msgstr ""
4680
4681 #. type: Plain text
4682 #: build/C/man3/gethostbyname.3:311
4683 msgid "resolver configuration file"
4684 msgstr ""
4685
4686 #. type: Plain text
4687 #: build/C/man3/gethostbyname.3:311 build/C/man5/host.conf.5:187 build/C/man5/hosts.5:88
4688 #, no-wrap
4689 msgid "I</etc/hosts>"
4690 msgstr ""
4691
4692 #. type: Plain text
4693 #: build/C/man3/gethostbyname.3:314
4694 msgid "host database file"
4695 msgstr ""
4696
4697 #. type: Plain text
4698 #: build/C/man3/gethostbyname.3:314 build/C/man5/nsswitch.conf.5:306 build/C/man3/setnetgrent.3:92
4699 #, no-wrap
4700 msgid "I</etc/nsswitch.conf>"
4701 msgstr ""
4702
4703 #. type: Plain text
4704 #: build/C/man3/gethostbyname.3:317
4705 msgid "name service switch configuration"
4706 msgstr ""
4707
4708 #. type: Plain text
4709 #: build/C/man3/gethostbyname.3:341
4710 msgid ""
4711 "POSIX.1-2001 specifies B<gethostbyname>(), B<gethostbyaddr>(), "
4712 "B<sethostent>(), B<endhostent>(), B<gethostent>(), and I<h_errno>; "
4713 "B<gethostbyname>(), B<gethostbyaddr>(), and I<h_errno> are marked "
4714 "obsolescent in that standard.  POSIX.1-2008 removes the specifications of "
4715 "B<gethostbyname>(), B<gethostbyaddr>(), and I<h_errno>, recommending the use "
4716 "of B<getaddrinfo>(3)  and B<getnameinfo>(3)  instead."
4717 msgstr ""
4718
4719 #. type: Plain text
4720 #: build/C/man3/gethostbyname.3:351
4721 msgid ""
4722 "The functions B<gethostbyname>()  and B<gethostbyaddr>()  may return "
4723 "pointers to static data, which may be overwritten by later calls.  Copying "
4724 "the I<struct hostent> does not suffice, since it contains pointers; a deep "
4725 "copy is required."
4726 msgstr ""
4727
4728 #. type: Plain text
4729 #: build/C/man3/gethostbyname.3:375
4730 msgid ""
4731 "In the original BSD implementation the I<len> argument of B<gethostbyname>()  "
4732 "was an I<int>.  The SUSv2 standard is buggy and declares the I<len> argument "
4733 "of B<gethostbyaddr>()  to be of type I<size_t>.  (That is wrong, because it "
4734 "has to be I<int>, and I<size_t> is not.  POSIX.1-2001 makes it I<socklen_t>, "
4735 "which is OK.)  See also B<accept>(2)."
4736 msgstr ""
4737
4738 #. type: Plain text
4739 #: build/C/man3/gethostbyname.3:381
4740 msgid ""
4741 "The BSD prototype for B<gethostbyaddr>()  uses I<const char\\ *> for the "
4742 "first argument."
4743 msgstr ""
4744
4745 #. type: SS
4746 #: build/C/man3/gethostbyname.3:381
4747 #, no-wrap
4748 msgid "System V/POSIX extension"
4749 msgstr ""
4750
4751 #.  e.g., Linux, FreeBSD, UnixWare, HP-UX
4752 #.  e.g., FreeBSD, AIX
4753 #. type: Plain text
4754 #: build/C/man3/gethostbyname.3:398
4755 msgid ""
4756 "POSIX requires the B<gethostent>()  call, that should return the next entry "
4757 "in the host data base.  When using DNS/BIND this does not make much sense, "
4758 "but it may be reasonable if the host data base is a file that can be read "
4759 "line by line.  On many systems a routine of this name reads from the file "
4760 "I</etc/hosts>.  It may be available only when the library was built without "
4761 "DNS support.  The glibc version will ignore ipv6 entries.  This function is "
4762 "not reentrant, and glibc adds a reentrant version B<gethostent_r>()."
4763 msgstr ""
4764
4765 #. type: SS
4766 #: build/C/man3/gethostbyname.3:398
4767 #, no-wrap
4768 msgid "GNU extensions"
4769 msgstr ""
4770
4771 #. type: Plain text
4772 #: build/C/man3/gethostbyname.3:404
4773 msgid ""
4774 "Glibc2 also has a B<gethostbyname2>()  that works like B<gethostbyname>(), "
4775 "but permits to specify the address family to which the address must belong."
4776 msgstr ""
4777
4778 #. type: Plain text
4779 #: build/C/man3/gethostbyname.3:438
4780 msgid ""
4781 "Glibc2 also has reentrant versions B<gethostent_r>(), B<gethostbyaddr_r>(), "
4782 "B<gethostbyname_r>()  and B<gethostbyname2_r>().  The caller supplies a "
4783 "I<hostent> structure I<ret> which will be filled in on success, and a "
4784 "temporary work buffer I<buf> of size I<buflen>.  After the call, I<result> "
4785 "will point to the result on success.  In case of an error or if no entry is "
4786 "found I<result> will be NULL.  The functions return 0 on success and a "
4787 "nonzero error number on failure.  In addition to the errors returned by the "
4788 "nonreentrant versions of these functions, if I<buf> is too small, the "
4789 "functions will return B<ERANGE>, and the call should be retried with a "
4790 "larger buffer.  The global variable I<h_errno> is not modified, but the "
4791 "address of a variable in which to store error numbers is passed in "
4792 "I<h_errnop>."
4793 msgstr ""
4794
4795 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973
4796 #. type: Plain text
4797 #: build/C/man3/gethostbyname.3:443
4798 msgid ""
4799 "B<gethostbyname>()  does not recognize components of a dotted IPv4 address "
4800 "string that are expressed in hexadecimal."
4801 msgstr ""
4802
4803 #.  .BR getipnodebyaddr (3),
4804 #.  .BR getipnodebyname (3),
4805 #.  .BR resolv+ (8)
4806 #. type: Plain text
4807 #: build/C/man3/gethostbyname.3:457
4808 msgid ""
4809 "B<getaddrinfo>(3), B<getnameinfo>(3), B<inet>(3), B<inet_ntop>(3), "
4810 "B<inet_pton>(3), B<resolver>(3), B<hosts>(5), B<nsswitch.conf>(5), "
4811 "B<hostname>(7), B<named>(8)"
4812 msgstr ""
4813
4814 #. type: TH
4815 #: build/C/man3/getipnodebyname.3:26
4816 #, no-wrap
4817 msgid "GETIPNODEBYNAME"
4818 msgstr ""
4819
4820 #. type: TH
4821 #: build/C/man3/getipnodebyname.3:26
4822 #, no-wrap
4823 msgid "2010-09-04"
4824 msgstr ""
4825
4826 #. type: Plain text
4827 #: build/C/man3/getipnodebyname.3:30
4828 msgid ""
4829 "getipnodebyname, getipnodebyaddr, freehostent - get network hostnames and "
4830 "addresses"
4831 msgstr ""
4832
4833 #. type: Plain text
4834 #: build/C/man3/getipnodebyname.3:38
4835 #, no-wrap
4836 msgid ""
4837 "B<struct hostent *getipnodebyname(const char *>I<name>B<, int >I<af>B<,>\n"
4838 "B<                                int >I<flags>B<, int *>I<error_num>B<);>\n"
4839 msgstr ""
4840
4841 #. type: Plain text
4842 #: build/C/man3/getipnodebyname.3:41
4843 #, no-wrap
4844 msgid ""
4845 "B<struct hostent *getipnodebyaddr(const void *>I<addr>B<, size_t "
4846 ">I<len>B<,>\n"
4847 "B<                                int >I<af>B<, int *>I<error_num>B<);>\n"
4848 msgstr ""
4849
4850 #. type: Plain text
4851 #: build/C/man3/getipnodebyname.3:43
4852 #, no-wrap
4853 msgid "B<void freehostent(struct hostent *>I<ip>B<);>\n"
4854 msgstr ""
4855
4856 #. type: Plain text
4857 #: build/C/man3/getipnodebyname.3:51
4858 msgid ""
4859 "These functions are deprecated (and unavailable in glibc).  Use "
4860 "B<getaddrinfo>(3)  and B<getnameinfo>(3)  instead."
4861 msgstr ""
4862
4863 #. type: Plain text
4864 #: build/C/man3/getipnodebyname.3:59
4865 msgid ""
4866 "The B<getipnodebyname>()  and B<getipnodebyaddr>()  functions return the "
4867 "names and addresses of a network host.  These functions return a pointer to "
4868 "the following structure:"
4869 msgstr ""
4870
4871 #. type: Plain text
4872 #: build/C/man3/getipnodebyname.3:69
4873 #, no-wrap
4874 msgid ""
4875 "struct hostent {\n"
4876 "    char  *h_name;\n"
4877 "    char **h_aliases;\n"
4878 "    int    h_addrtype;\n"
4879 "    int    h_length;\n"
4880 "    char **h_addr_list;\n"
4881 "};\n"
4882 msgstr ""
4883
4884 #. type: Plain text
4885 #: build/C/man3/getipnodebyname.3:82
4886 msgid ""
4887 "These functions replace the B<gethostbyname>(3)  and B<gethostbyaddr>(3)  "
4888 "functions, which could access only the IPv4 network address family.  The "
4889 "B<getipnodebyname>()  and B<getipnodebyaddr>()  functions can access "
4890 "multiple network address families."
4891 msgstr ""
4892
4893 #. type: Plain text
4894 #: build/C/man3/getipnodebyname.3:93
4895 msgid ""
4896 "Unlike the B<gethostby> functions, these functions return pointers to "
4897 "dynamically allocated memory.  The B<freehostent>()  function is used to "
4898 "release the dynamically allocated memory after the caller no longer needs "
4899 "the I<hostent> structure."
4900 msgstr ""
4901
4902 #. type: SS
4903 #: build/C/man3/getipnodebyname.3:93
4904 #, no-wrap
4905 msgid "getipnodebyname() arguments"
4906 msgstr ""
4907
4908 #. type: Plain text
4909 #: build/C/man3/getipnodebyname.3:104
4910 msgid ""
4911 "The B<getipnodebyname>()  function looks up network addresses for the host "
4912 "specified by the I<name> argument.  The I<af> argument specifies one of the "
4913 "following values:"
4914 msgstr ""
4915
4916 #. type: TP
4917 #: build/C/man3/getipnodebyname.3:104 build/C/man3/getipnodebyname.3:166 build/C/man3/inet_ntop.3:57 build/C/man3/inet_pton.3:53
4918 #, no-wrap
4919 msgid "B<AF_INET>"
4920 msgstr ""
4921
4922 #. type: Plain text
4923 #: build/C/man3/getipnodebyname.3:110
4924 msgid ""
4925 "The I<name> argument points to a dotted-quad IPv4 address or a name of an "
4926 "IPv4 network host."
4927 msgstr ""
4928
4929 #. type: TP
4930 #: build/C/man3/getipnodebyname.3:110 build/C/man3/getipnodebyname.3:176 build/C/man3/inet_ntop.3:70 build/C/man3/inet_pton.3:67
4931 #, no-wrap
4932 msgid "B<AF_INET6>"
4933 msgstr ""
4934
4935 #. type: Plain text
4936 #: build/C/man3/getipnodebyname.3:116
4937 msgid ""
4938 "The I<name> argument points to a hexadecimal IPv6 address or a name of an "
4939 "IPv6 network host."
4940 msgstr ""
4941
4942 #. type: Plain text
4943 #: build/C/man3/getipnodebyname.3:125
4944 msgid ""
4945 "The I<flags> argument specifies additional options.  More than one option "
4946 "can be specified by bitwise OR-ing them together.  I<flags> should be set to "
4947 "0 if no options are desired."
4948 msgstr ""
4949
4950 #. type: TP
4951 #: build/C/man3/getipnodebyname.3:125
4952 #, no-wrap
4953 msgid "B<AI_V4MAPPED>"
4954 msgstr ""
4955
4956 #. type: Plain text
4957 #: build/C/man3/getipnodebyname.3:132
4958 msgid ""
4959 "This flag is used with B<AF_INET6> to request a query for IPv4 addresses "
4960 "instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 "
4961 "addresses."
4962 msgstr ""
4963
4964 #. type: TP
4965 #: build/C/man3/getipnodebyname.3:132
4966 #, no-wrap
4967 msgid "B<AI_ALL>"
4968 msgstr ""
4969
4970 #. type: Plain text
4971 #: build/C/man3/getipnodebyname.3:138
4972 msgid ""
4973 "This flag is used with B<AI_V4MAPPED> to request a query for both IPv4 and "
4974 "IPv6 addresses.  Any IPv4 address found will be mapped to an IPv6 address."
4975 msgstr ""
4976
4977 #. type: TP
4978 #: build/C/man3/getipnodebyname.3:138
4979 #, no-wrap
4980 msgid "B<AI_ADDRCONFIG>"
4981 msgstr ""
4982
4983 #. type: Plain text
4984 #: build/C/man3/getipnodebyname.3:150
4985 msgid ""
4986 "This flag is used with B<AF_INET6> to further request that queries for IPv6 "
4987 "addresses should not be made unless the system has at least one IPv6 address "
4988 "assigned to a network interface, and that queries for IPv4 addresses should "
4989 "not be made unless the system has at least one IPv4 address assigned to a "
4990 "network interface.  This flag may be used by itself or with the "
4991 "B<AI_V4MAPPED> flag."
4992 msgstr ""
4993
4994 #. type: TP
4995 #: build/C/man3/getipnodebyname.3:150
4996 #, no-wrap
4997 msgid "B<AI_DEFAULT>"
4998 msgstr ""
4999
5000 #. type: Plain text
5001 #: build/C/man3/getipnodebyname.3:154
5002 msgid "This flag is equivalent to B<(AI_ADDRCONFIG | AI_V4MAPPED)>."
5003 msgstr ""
5004
5005 #. type: SS
5006 #: build/C/man3/getipnodebyname.3:154
5007 #, no-wrap
5008 msgid "getipnodebyaddr() arguments"
5009 msgstr ""
5010
5011 #. type: Plain text
5012 #: build/C/man3/getipnodebyname.3:166
5013 msgid ""
5014 "The B<getipnodebyaddr>()  function looks up the name of the host whose "
5015 "network address is specified by the I<addr> argument.  The I<af> argument "
5016 "specifies one of the following values:"
5017 msgstr ""
5018
5019 #. type: Plain text
5020 #: build/C/man3/getipnodebyname.3:176
5021 msgid ""
5022 "The I<addr> argument points to a I<struct in_addr> and I<len> must be set to "
5023 "I<sizeof(struct in_addr)>."
5024 msgstr ""
5025
5026 #. type: Plain text
5027 #: build/C/man3/getipnodebyname.3:186
5028 msgid ""
5029 "The I<addr> argument points to a I<struct in6_addr> and I<len> must be set "
5030 "to I<sizeof(struct in6_addr)>."
5031 msgstr ""
5032
5033 #. type: Plain text
5034 #: build/C/man3/getipnodebyname.3:190
5035 msgid ""
5036 "NULL is returned if an error occurred, and I<error_num> will contain an "
5037 "error code from the following list:"
5038 msgstr ""
5039
5040 #. type: Plain text
5041 #: build/C/man3/getipnodebyname.3:193
5042 msgid "The hostname or network address was not found."
5043 msgstr ""
5044
5045 #. type: TP
5046 #: build/C/man3/getipnodebyname.3:193
5047 #, no-wrap
5048 msgid "B<NO_ADDRESS>"
5049 msgstr ""
5050
5051 #. type: Plain text
5052 #: build/C/man3/getipnodebyname.3:199
5053 msgid ""
5054 "The domain name server recognized the network address or name, but no answer "
5055 "was returned.  This can happen if the network host has only IPv4 addresses "
5056 "and a request has been made for IPv6 information only, or vice versa."
5057 msgstr ""
5058
5059 #. type: Plain text
5060 #: build/C/man3/getipnodebyname.3:202
5061 msgid "The domain name server returned a permanent failure response."
5062 msgstr ""
5063
5064 #. type: Plain text
5065 #: build/C/man3/getipnodebyname.3:206
5066 msgid ""
5067 "The domain name server returned a temporary failure response.  You might "
5068 "have better luck next time."
5069 msgstr ""
5070
5071 #. type: Plain text
5072 #: build/C/man3/getipnodebyname.3:210
5073 msgid ""
5074 "A successful query returns a pointer to a I<hostent> structure that contains "
5075 "the following fields:"
5076 msgstr ""
5077
5078 #. type: Plain text
5079 #: build/C/man3/getipnodebyname.3:213
5080 msgid "This is the official name of this network host."
5081 msgstr ""
5082
5083 #. type: Plain text
5084 #: build/C/man3/getipnodebyname.3:217
5085 msgid ""
5086 "This is an array of pointers to unofficial aliases for the same host.  The "
5087 "array is terminated by a null pointer."
5088 msgstr ""
5089
5090 #. type: Plain text
5091 #: build/C/man3/getipnodebyname.3:239
5092 msgid ""
5093 "This is a copy of the I<af> argument to B<getipnodebyname>()  or "
5094 "B<getipnodebyaddr>().  I<h_addrtype> will always be B<AF_INET> if the I<af> "
5095 "argument was B<AF_INET>.  I<h_addrtype> will always be B<AF_INET6> if the "
5096 "I<af> argument was B<AF_INET6>."
5097 msgstr ""
5098
5099 #. type: Plain text
5100 #: build/C/man3/getipnodebyname.3:253
5101 msgid ""
5102 "This field will be set to I<sizeof(struct in_addr)> if I<h_addrtype> is "
5103 "B<AF_INET>, and to I<sizeof(struct in6_addr)> if I<h_addrtype> is "
5104 "B<AF_INET6>."
5105 msgstr ""
5106
5107 #. type: Plain text
5108 #: build/C/man3/getipnodebyname.3:258
5109 msgid ""
5110 "This is an array of one or more pointers to network address structures for "
5111 "the network host.  The array is terminated by a null pointer."
5112 msgstr ""
5113
5114 #.  Not in POSIX.1-2001.
5115 #. type: Plain text
5116 #: build/C/man3/getipnodebyname.3:261
5117 msgid "RFC\\ 2553."
5118 msgstr ""
5119
5120 #. type: Plain text
5121 #: build/C/man3/getipnodebyname.3:266
5122 msgid ""
5123 "These functions were present in glibc 2.1.91-95, but were removed again.  "
5124 "Several UNIX-like systems support them, but all call them deprecated."
5125 msgstr ""
5126
5127 #. type: Plain text
5128 #: build/C/man3/getipnodebyname.3:271
5129 msgid "B<getaddrinfo>(3), B<getnameinfo>(3), B<inet_ntop>(3), B<inet_pton>(3)"
5130 msgstr ""
5131
5132 #. type: TH
5133 #: build/C/man3/getnameinfo.3:10
5134 #, no-wrap
5135 msgid "GETNAMEINFO"
5136 msgstr ""
5137
5138 #. type: Plain text
5139 #: build/C/man3/getnameinfo.3:13
5140 msgid "getnameinfo - address-to-name translation in protocol-independent manner"
5141 msgstr ""
5142
5143 #. type: Plain text
5144 #: build/C/man3/getnameinfo.3:17
5145 #, no-wrap
5146 msgid ""
5147 "B<#include E<lt>sys/socket.hE<gt>>\n"
5148 "B<#include E<lt>netdb.hE<gt>>\n"
5149 msgstr ""
5150
5151 #. type: Plain text
5152 #: build/C/man3/getnameinfo.3:21
5153 #, no-wrap
5154 msgid ""
5155 "B<int getnameinfo(const struct sockaddr *>I<sa>B<, socklen_t >I<salen>B<,>\n"
5156 "B<                char *>I<host>B<, socklen_t >I<hostlen>B<,>\n"
5157 "B<                char *>I<serv>B<, socklen_t >I<servlen>B<, int "
5158 ">I<flags>B<);>\n"
5159 msgstr ""
5160
5161 #. type: Plain text
5162 #: build/C/man3/getnameinfo.3:31
5163 msgid ""
5164 "B<getnameinfo>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
5165 "_POSIX_SOURCE"
5166 msgstr ""
5167
5168 #. type: Plain text
5169 #: build/C/man3/getnameinfo.3:47
5170 msgid ""
5171 "The B<getnameinfo>()  function is the inverse of B<getaddrinfo>(3): it "
5172 "converts a socket address to a corresponding host and service, in a "
5173 "protocol-independent manner.  It combines the functionality of "
5174 "B<gethostbyaddr>(3)  and B<getservbyport>(3), but unlike those functions, "
5175 "B<getnameinfo>()  is reentrant and allows programs to eliminate "
5176 "IPv4-versus-IPv6 dependencies."
5177 msgstr ""
5178
5179 #. type: Plain text
5180 #: build/C/man3/getnameinfo.3:70
5181 msgid ""
5182 "The I<sa> argument is a pointer to a generic socket address structure (of "
5183 "type I<sockaddr_in> or I<sockaddr_in6>)  of size I<salen> that holds the "
5184 "input IP address and port number.  The arguments I<host> and I<serv> are "
5185 "pointers to caller-allocated buffers (of size I<hostlen> and I<servlen> "
5186 "respectively) into which B<getnameinfo>()  places null-terminated strings "
5187 "containing the host and service names respectively."
5188 msgstr ""
5189
5190 #. type: Plain text
5191 #: build/C/man3/getnameinfo.3:83
5192 msgid ""
5193 "The caller can specify that no hostname (or no service name)  is required by "
5194 "providing a NULL I<host> (or I<serv>)  argument or a zero I<hostlen> (or "
5195 "I<servlen>)  argument.  However, at least one of hostname or service name "
5196 "must be requested."
5197 msgstr ""
5198
5199 #. type: Plain text
5200 #: build/C/man3/getnameinfo.3:89
5201 msgid "The I<flags> argument modifies the behavior of B<getnameinfo>()  as follows:"
5202 msgstr ""
5203
5204 #. type: TP
5205 #: build/C/man3/getnameinfo.3:89
5206 #, no-wrap
5207 msgid "B<NI_NAMEREQD>"
5208 msgstr ""
5209
5210 #. type: Plain text
5211 #: build/C/man3/getnameinfo.3:92
5212 msgid "If set, then an error is returned if the hostname cannot be determined."
5213 msgstr ""
5214
5215 #. type: TP
5216 #: build/C/man3/getnameinfo.3:92
5217 #, no-wrap
5218 msgid "B<NI_DGRAM>"
5219 msgstr ""
5220
5221 #. type: Plain text
5222 #: build/C/man3/getnameinfo.3:98
5223 msgid ""
5224 "If set, then the service is datagram (UDP) based rather than stream (TCP) "
5225 "based.  This is required for the few ports (512-514)  that have different "
5226 "services for UDP and TCP."
5227 msgstr ""
5228
5229 #. type: TP
5230 #: build/C/man3/getnameinfo.3:98
5231 #, no-wrap
5232 msgid "B<NI_NOFQDN>"
5233 msgstr ""
5234
5235 #. type: Plain text
5236 #: build/C/man3/getnameinfo.3:102
5237 msgid ""
5238 "If set, return only the hostname part of the fully qualified domain name for "
5239 "local hosts."
5240 msgstr ""
5241
5242 #. type: TP
5243 #: build/C/man3/getnameinfo.3:102
5244 #, no-wrap
5245 msgid "B<NI_NUMERICHOST>"
5246 msgstr ""
5247
5248 #.  For example, by calling
5249 #.  .BR inet_ntop ()
5250 #.  instead of
5251 #.  .BR gethostbyaddr ().
5252 #.  POSIX.1-2003 has NI_NUMERICSCOPE, but glibc doesn't have it.
5253 #. type: Plain text
5254 #: build/C/man3/getnameinfo.3:112
5255 msgid ""
5256 "If set, then the numeric form of the hostname is returned.  (When not set, "
5257 "this will still happen in case the node's name cannot be determined.)"
5258 msgstr ""
5259
5260 #. type: TP
5261 #: build/C/man3/getnameinfo.3:112
5262 #, no-wrap
5263 msgid "B<NI_NUMERICSERV>"
5264 msgstr ""
5265
5266 #. type: Plain text
5267 #: build/C/man3/getnameinfo.3:117
5268 msgid ""
5269 "If set, then the numeric form of the service address is returned.  (When not "
5270 "set, this will still happen in case the service's name cannot be "
5271 "determined.)"
5272 msgstr ""
5273
5274 #. type: SS
5275 #: build/C/man3/getnameinfo.3:117
5276 #, no-wrap
5277 msgid "Extensions to getnameinfo() for Internationalized Domain Names"
5278 msgstr ""
5279
5280 #. type: Plain text
5281 #: build/C/man3/getnameinfo.3:126
5282 msgid ""
5283 "Starting with glibc 2.3.4, B<getnameinfo>()  has been extended to "
5284 "selectively allow hostnames to be transparently converted to and from the "
5285 "Internationalized Domain Name (IDN) format (see RFC 3490, "
5286 "I<Internationalizing Domain Names in Applications (IDNA)>).  Three new flags "
5287 "are defined:"
5288 msgstr ""
5289
5290 #. type: TP
5291 #: build/C/man3/getnameinfo.3:126
5292 #, no-wrap
5293 msgid "B<NI_IDN>"
5294 msgstr ""
5295
5296 #. type: Plain text
5297 #: build/C/man3/getnameinfo.3:132
5298 msgid ""
5299 "If this flag is used, then the name found in the lookup process is converted "
5300 "from IDN format to the locale's encoding if necessary.  ASCII-only names are "
5301 "not affected by the conversion, which makes this flag usable in existing "
5302 "programs and environments."
5303 msgstr ""
5304
5305 #. type: TP
5306 #: build/C/man3/getnameinfo.3:132
5307 #, no-wrap
5308 msgid "B<NI_IDN_ALLOW_UNASSIGNED>, B<NI_IDN_USE_STD3_ASCII_RULES>"
5309 msgstr ""
5310
5311 #.  FIXME glibc defines the following additional errors, some which
5312 #.  can probably be returned by getnameinfo(); they need to
5313 #.  be documented.
5314 #.  #ifdef __USE_GNU
5315 #.  #define EAI_INPROGRESS  -100  /* Processing request in progress.  */
5316 #.  #define EAI_CANCELED    -101  /* Request canceled.  */
5317 #.  #define EAI_NOTCANCELED -102  /* Request not canceled.  */
5318 #.  #define EAI_ALLDONE     -103  /* All requests done.  */
5319 #.  #define EAI_INTR        -104  /* Interrupted by a signal.  */
5320 #.  #define EAI_IDN_ENCODE  -105  /* IDN encoding failed.  */
5321 #.  #endif
5322 #. type: Plain text
5323 #: build/C/man3/getnameinfo.3:155
5324 msgid ""
5325 "On success 0 is returned, and node and service names, if requested, are "
5326 "filled with null-terminated strings, possibly truncated to fit the specified "
5327 "buffer lengths.  On error, one of the following nonzero error codes is "
5328 "returned:"
5329 msgstr ""
5330
5331 #. type: Plain text
5332 #: build/C/man3/getnameinfo.3:159
5333 msgid "The name could not be resolved at this time.  Try again later."
5334 msgstr ""
5335
5336 #. type: Plain text
5337 #: build/C/man3/getnameinfo.3:164
5338 msgid "The I<flags> argument has an invalid value."
5339 msgstr ""
5340
5341 #. type: Plain text
5342 #: build/C/man3/getnameinfo.3:167
5343 msgid "A nonrecoverable error occurred."
5344 msgstr ""
5345
5346 #. type: Plain text
5347 #: build/C/man3/getnameinfo.3:171
5348 msgid ""
5349 "The address family was not recognized, or the address length was invalid for "
5350 "the specified family."
5351 msgstr ""
5352
5353 #. type: Plain text
5354 #: build/C/man3/getnameinfo.3:180
5355 msgid ""
5356 "The name does not resolve for the supplied arguments.  B<NI_NAMEREQD> is set "
5357 "and the host's name cannot be located, or neither hostname nor service name "
5358 "were requested."
5359 msgstr ""
5360
5361 #. type: TP
5362 #: build/C/man3/getnameinfo.3:180
5363 #, no-wrap
5364 msgid "B<EAI_OVERFLOW>"
5365 msgstr ""
5366
5367 #. type: Plain text
5368 #: build/C/man3/getnameinfo.3:187
5369 msgid "The buffer pointed to by I<host> or I<serv> was too small."
5370 msgstr ""
5371
5372 #. type: Plain text
5373 #: build/C/man3/getnameinfo.3:192
5374 msgid "A system error occurred.  The error code can be found in I<errno>."
5375 msgstr ""
5376
5377 #. type: Plain text
5378 #: build/C/man3/getnameinfo.3:199
5379 msgid "/etc/hosts"
5380 msgstr ""
5381
5382 #. type: Plain text
5383 #: build/C/man3/getnameinfo.3:201
5384 msgid "/etc/nsswitch.conf"
5385 msgstr ""
5386
5387 #. type: Plain text
5388 #: build/C/man3/getnameinfo.3:203
5389 msgid "/etc/resolv.conf"
5390 msgstr ""
5391
5392 #. type: Plain text
5393 #: build/C/man3/getnameinfo.3:206
5394 msgid "B<getnameinfo>()  is provided in glibc since version 2.1."
5395 msgstr ""
5396
5397 #. type: Plain text
5398 #: build/C/man3/getnameinfo.3:208
5399 msgid "RFC\\ 2553, POSIX.1-2001."
5400 msgstr ""
5401
5402 #. type: Plain text
5403 #: build/C/man3/getnameinfo.3:213
5404 msgid ""
5405 "In order to assist the programmer in choosing reasonable sizes for the "
5406 "supplied buffers, I<E<lt>netdb.hE<gt>> defines the constants"
5407 msgstr ""
5408
5409 #. type: Plain text
5410 #: build/C/man3/getnameinfo.3:218
5411 #, no-wrap
5412 msgid ""
5413 "#define NI_MAXHOST      1025\n"
5414 "#define NI_MAXSERV      32\n"
5415 msgstr ""
5416
5417 #. type: Plain text
5418 #: build/C/man3/getnameinfo.3:228
5419 msgid ""
5420 "Since glibc 2.8, these definitions are exposed only if one of the feature "
5421 "test macros B<_BSD_SOURCE>, B<_SVID_SOURCE>, or B<_GNU_SOURCE> is defined."
5422 msgstr ""
5423
5424 #. type: Plain text
5425 #: build/C/man3/getnameinfo.3:236
5426 msgid ""
5427 "The former is the constant B<MAXDNAME> in recent versions of BIND's "
5428 "I<E<lt>arpa/nameser.hE<gt>> header file.  The latter is a guess based on the "
5429 "services listed in the current Assigned Numbers RFC."
5430 msgstr ""
5431
5432 #. type: Plain text
5433 #: build/C/man3/getnameinfo.3:243
5434 msgid ""
5435 "Before glibc version 2.2, the I<hostlen> and I<servlen> arguments were typed "
5436 "as I<size_t>."
5437 msgstr ""
5438
5439 #. type: Plain text
5440 #: build/C/man3/getnameinfo.3:248
5441 msgid ""
5442 "The following code tries to get the numeric hostname and service name, for a "
5443 "given socket address.  Note that there is no hardcoded reference to a "
5444 "particular address family."
5445 msgstr ""
5446
5447 #. type: Plain text
5448 #: build/C/man3/getnameinfo.3:254
5449 #, no-wrap
5450 msgid ""
5451 "struct sockaddr *sa;    /* input */\n"
5452 "socklen_t len;         /* input */\n"
5453 "char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];\n"
5454 msgstr ""
5455
5456 #. type: Plain text
5457 #: build/C/man3/getnameinfo.3:258
5458 #, no-wrap
5459 msgid ""
5460 "if (getnameinfo(sa, len, hbuf, sizeof(hbuf), sbuf,\n"
5461 "            sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0)\n"
5462 "    printf(\"host=%s, serv=%s\\en\", hbuf, sbuf);\n"
5463 msgstr ""
5464
5465 #. type: Plain text
5466 #: build/C/man3/getnameinfo.3:263
5467 msgid ""
5468 "The following version checks if the socket address has a reverse address "
5469 "mapping."
5470 msgstr ""
5471
5472 #. type: Plain text
5473 #: build/C/man3/getnameinfo.3:269
5474 #, no-wrap
5475 msgid ""
5476 "struct sockaddr *sa;    /* input */\n"
5477 "socklen_t len;         /* input */\n"
5478 "char hbuf[NI_MAXHOST];\n"
5479 msgstr ""
5480
5481 #. type: Plain text
5482 #: build/C/man3/getnameinfo.3:275
5483 #, no-wrap
5484 msgid ""
5485 "if (getnameinfo(sa, len, hbuf, sizeof(hbuf),\n"
5486 "            NULL, 0, NI_NAMEREQD))\n"
5487 "    printf(\"could not resolve hostname\");\n"
5488 "else\n"
5489 "    printf(\"host=%s\\en\", hbuf);\n"
5490 msgstr ""
5491
5492 #. type: Plain text
5493 #: build/C/man3/getnameinfo.3:282
5494 msgid ""
5495 "An example program using B<getnameinfo>()  can be found in "
5496 "B<getaddrinfo>(3)."
5497 msgstr ""
5498
5499 #. type: Plain text
5500 #: build/C/man3/getnameinfo.3:297
5501 msgid ""
5502 "B<accept>(2), B<getpeername>(2), B<getsockname>(2), B<recvfrom>(2), "
5503 "B<socket>(2), B<getaddrinfo>(3), B<gethostbyaddr>(3), B<getservbyname>(3), "
5504 "B<getservbyport>(3), B<inet_ntop>(3), B<hosts>(5), B<services>(5), "
5505 "B<hostname>(7), B<named>(8)"
5506 msgstr ""
5507
5508 #. type: Plain text
5509 #: build/C/man3/getnameinfo.3:301
5510 msgid ""
5511 "R. Gilligan, S. Thomson, J. Bound and W. Stevens, I<Basic Socket Interface "
5512 "Extensions for IPv6>, RFC\\ 2553, March 1999."
5513 msgstr ""
5514
5515 #. type: Plain text
5516 #: build/C/man3/getnameinfo.3:307
5517 msgid ""
5518 "Tatsuya Jinmei and Atsushi Onoe, I<An Extension of Format for IPv6 Scoped "
5519 "Addresses>, internet draft, work in progress E<.UR "
5520 "ftp://ftp.ietf.org\\:/internet-drafts\\:/draft-ietf-ipngwg-scopedaddr-format-02.txt> "
5521 "E<.UE .>"
5522 msgstr ""
5523
5524 #. type: Plain text
5525 #: build/C/man3/getnameinfo.3:312
5526 msgid ""
5527 "Craig Metz, I<Protocol Independence Using the Sockets API>, Proceedings of "
5528 "the freenix track: 2000 USENIX annual technical conference, June 2000"
5529 msgstr ""
5530
5531 #. type: Plain text
5532 #: build/C/man3/getnameinfo.3:315
5533 msgid ""
5534 "E<.UR "
5535 "http://www.usenix.org\\:/publications\\:/library\\:/proceedings\\:/usenix2000\\:/freenix\\:/metzprotocol.html> "
5536 "E<.UE .>"
5537 msgstr ""
5538
5539 #. type: TH
5540 #: build/C/man3/getnetent.3:30
5541 #, no-wrap
5542 msgid "GETNETENT"
5543 msgstr ""
5544
5545 #. type: TH
5546 #: build/C/man3/getnetent.3:30 build/C/man3/getprotoent.3:30 build/C/man3/getservent.3:34
5547 #, no-wrap
5548 msgid "2008-08-19"
5549 msgstr ""
5550
5551 #. type: Plain text
5552 #: build/C/man3/getnetent.3:34
5553 msgid ""
5554 "getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent - get network "
5555 "entry"
5556 msgstr ""
5557
5558 #. type: Plain text
5559 #: build/C/man3/getnetent.3:37 build/C/man3/getnetent_r.3:33 build/C/man3/getprotoent.3:37 build/C/man3/getprotoent_r.3:33 build/C/man3/getservent.3:41 build/C/man3/getservent_r.3:33 build/C/man3/setnetgrent.3:17
5560 #, no-wrap
5561 msgid "B<#include E<lt>netdb.hE<gt>>\n"
5562 msgstr ""
5563
5564 #. type: Plain text
5565 #: build/C/man3/getnetent.3:39
5566 #, no-wrap
5567 msgid "B<struct netent *getnetent(void);>\n"
5568 msgstr ""
5569
5570 #. type: Plain text
5571 #: build/C/man3/getnetent.3:41
5572 #, no-wrap
5573 msgid "B<struct netent *getnetbyname(const char *>I<name>B<);>\n"
5574 msgstr ""
5575
5576 #. type: Plain text
5577 #: build/C/man3/getnetent.3:43
5578 #, no-wrap
5579 msgid "B<struct netent *getnetbyaddr(uint32_t >I<net>B<, int >I<type>B<);>\n"
5580 msgstr ""
5581
5582 #. type: Plain text
5583 #: build/C/man3/getnetent.3:45
5584 #, no-wrap
5585 msgid "B<void setnetent(int >I<stayopen>B<);>\n"
5586 msgstr ""
5587
5588 #. type: Plain text
5589 #: build/C/man3/getnetent.3:47
5590 #, no-wrap
5591 msgid "B<void endnetent(void);>\n"
5592 msgstr ""
5593
5594 #. type: Plain text
5595 #: build/C/man3/getnetent.3:57
5596 msgid ""
5597 "The B<getnetent>()  function reads the next entry from the networks database "
5598 "and returns a I<netent> structure containing the broken-out fields from the "
5599 "entry.  A connection is opened to the database if necessary."
5600 msgstr ""
5601
5602 #. type: Plain text
5603 #: build/C/man3/getnetent.3:66
5604 msgid ""
5605 "The B<getnetbyname>()  function returns a I<netent> structure for the entry "
5606 "from the database that matches the network I<name>."
5607 msgstr ""
5608
5609 #. type: Plain text
5610 #: build/C/man3/getnetent.3:80
5611 msgid ""
5612 "The B<getnetbyaddr>()  function returns a I<netent> structure for the entry "
5613 "from the database that matches the network number I<net> of type I<type>.  "
5614 "The I<net> argument must be in host byte order."
5615 msgstr ""
5616
5617 #. type: Plain text
5618 #: build/C/man3/getnetent.3:92
5619 msgid ""
5620 "The B<setnetent>()  function opens a connection to the database, and sets "
5621 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
5622 "connection to the database will not be closed between calls to one of the "
5623 "B<getnet*>()  functions."
5624 msgstr ""
5625
5626 #. type: Plain text
5627 #: build/C/man3/getnetent.3:96
5628 msgid "The B<endnetent>()  function closes the connection to the database."
5629 msgstr ""
5630
5631 #. type: Plain text
5632 #: build/C/man3/getnetent.3:102
5633 msgid "The I<netent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
5634 msgstr ""
5635
5636 #. type: Plain text
5637 #: build/C/man3/getnetent.3:111
5638 #, no-wrap
5639 msgid ""
5640 "struct netent {\n"
5641 "    char      *n_name;     /* official network name */\n"
5642 "    char     **n_aliases;  /* alias list */\n"
5643 "    int        n_addrtype; /* net address type */\n"
5644 "    uint32_t   n_net;      /* network number */\n"
5645 "}\n"
5646 msgstr ""
5647
5648 #. type: Plain text
5649 #: build/C/man3/getnetent.3:117
5650 msgid "The members of the I<netent> structure are:"
5651 msgstr ""
5652
5653 #. type: TP
5654 #: build/C/man3/getnetent.3:117
5655 #, no-wrap
5656 msgid "I<n_name>"
5657 msgstr ""
5658
5659 #. type: Plain text
5660 #: build/C/man3/getnetent.3:120
5661 msgid "The official name of the network."
5662 msgstr ""
5663
5664 #. type: TP
5665 #: build/C/man3/getnetent.3:120
5666 #, no-wrap
5667 msgid "I<n_aliases>"
5668 msgstr ""
5669
5670 #. type: Plain text
5671 #: build/C/man3/getnetent.3:123
5672 msgid "A NULL-terminated list of alternative names for the network."
5673 msgstr ""
5674
5675 #. type: TP
5676 #: build/C/man3/getnetent.3:123
5677 #, no-wrap
5678 msgid "I<n_addrtype>"
5679 msgstr ""
5680
5681 #. type: Plain text
5682 #: build/C/man3/getnetent.3:127
5683 msgid "The type of the network number; always B<AF_INET>."
5684 msgstr ""
5685
5686 #. type: TP
5687 #: build/C/man3/getnetent.3:127
5688 #, no-wrap
5689 msgid "I<n_net>"
5690 msgstr ""
5691
5692 #. type: Plain text
5693 #: build/C/man3/getnetent.3:130
5694 msgid "The network number in host byte order."
5695 msgstr ""
5696
5697 #. type: Plain text
5698 #: build/C/man3/getnetent.3:141
5699 msgid ""
5700 "The B<getnetent>(), B<getnetbyname>()  and B<getnetbyaddr>()  functions "
5701 "return a pointer to a statically allocated I<netent> structure, or a null "
5702 "pointer if an error occurs or the end of the file is reached."
5703 msgstr ""
5704
5705 #. type: TP
5706 #: build/C/man3/getnetent.3:142 build/C/man5/networks.5:71
5707 #, no-wrap
5708 msgid "I</etc/networks>"
5709 msgstr ""
5710
5711 #. type: Plain text
5712 #: build/C/man3/getnetent.3:145
5713 msgid "networks database file"
5714 msgstr ""
5715
5716 #. type: Plain text
5717 #: build/C/man3/getnetent.3:147 build/C/man3/getprotoent.3:142 build/C/man3/getservent.3:159
5718 msgid "4.3BSD, POSIX.1-2001."
5719 msgstr ""
5720
5721 #. type: Plain text
5722 #: build/C/man3/getnetent.3:154
5723 msgid ""
5724 "In glibc versions before 2.2, the I<net> argument of B<getnetbyaddr>()  was "
5725 "of type I<long>."
5726 msgstr ""
5727
5728 #.  .BR networks (5)
5729 #. type: Plain text
5730 #: build/C/man3/getnetent.3:159
5731 msgid "B<getnetent_r>(3), B<getprotoent>(3), B<getservent>(3)"
5732 msgstr ""
5733
5734 #. type: Plain text
5735 #: build/C/man3/getnetent.3:161
5736 msgid "RFC\\ 1101"
5737 msgstr ""
5738
5739 #. type: TH
5740 #: build/C/man3/getnetent_r.3:26
5741 #, no-wrap
5742 msgid "GETNETENT_R"
5743 msgstr ""
5744
5745 #. type: Plain text
5746 #: build/C/man3/getnetent_r.3:30
5747 msgid "getnetent_r, getnetbyname_r, getnetbyaddr_r - get network entry (reentrant)"
5748 msgstr ""
5749
5750 #. type: Plain text
5751 #: build/C/man3/getnetent_r.3:37
5752 #, no-wrap
5753 msgid ""
5754 "B<int getnetent_r(struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5755 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5756 "B<                int *>I<h_errnop>B<);>\n"
5757 msgstr ""
5758
5759 #. type: Plain text
5760 #: build/C/man3/getnetent_r.3:42
5761 #, no-wrap
5762 msgid ""
5763 "B<int getnetbyname_r(const char *>I<name>B<,>\n"
5764 "B<                struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5765 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5766 "B<                int *>I<h_errnop>B<);>\n"
5767 msgstr ""
5768
5769 #. type: Plain text
5770 #: build/C/man3/getnetent_r.3:47
5771 #, no-wrap
5772 msgid ""
5773 "B<int getnetbyaddr_r(uint32_t >I<net>B<, int >I<type>B<,>\n"
5774 "B<                struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5775 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5776 "B<                int *>I<h_errnop>B<);>\n"
5777 msgstr ""
5778
5779 #. type: Plain text
5780 #: build/C/man3/getnetent_r.3:58
5781 msgid "B<getnetent_r>(), B<getnetbyname_r>(), B<getnetbyaddr_r>():"
5782 msgstr ""
5783
5784 #. type: Plain text
5785 #: build/C/man3/getnetent_r.3:79
5786 msgid ""
5787 "The B<getnetent_r>(), B<getnetbyname_r>(), and B<getnetbyaddr_r>()  "
5788 "functions are the reentrant equivalents of, respectively, B<getnetent>(3), "
5789 "B<getnetbyname>(3), and B<getnetbynumber>(3).  They differ in the way that "
5790 "the I<netent> structure is returned, and in the function calling signature "
5791 "and return value.  This manual page describes just the differences from the "
5792 "nonreentrant functions."
5793 msgstr ""
5794
5795 #. type: Plain text
5796 #: build/C/man3/getnetent_r.3:85
5797 msgid ""
5798 "Instead of returning a pointer to a statically allocated I<netent> structure "
5799 "as the function result, these functions copy the structure into the location "
5800 "pointed to by I<result_buf>."
5801 msgstr ""
5802
5803 #.  I can find no information on the required/recommended buffer size;
5804 #.  the nonreentrant functions use a 1024 byte buffer -- mtk.
5805 #. type: Plain text
5806 #: build/C/man3/getnetent_r.3:102
5807 msgid ""
5808 "The I<buf> array is used to store the string fields pointed to by the "
5809 "returned I<netent> structure.  (The nonreentrant functions allocate these "
5810 "strings in static storage.)  The size of this array is specified in "
5811 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
5812 "and the caller must try again with a larger buffer.  (A buffer of length "
5813 "1024 bytes should be sufficient for most applications.)"
5814 msgstr ""
5815
5816 #. type: Plain text
5817 #: build/C/man3/getnetent_r.3:110
5818 msgid ""
5819 "If the function call successfully obtains a network record, then I<*result> "
5820 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
5821 msgstr ""
5822
5823 #.  getnetent.3 doesn't document any use of h_errno, but nevertheless
5824 #.  the nonreentrant functions no seem to set h_errno.
5825 #. type: Plain text
5826 #: build/C/man3/getnetent_r.3:118
5827 msgid ""
5828 "The buffer pointed to by I<h_errnop> is used to return the value that would "
5829 "be stored in the global variable I<h_errno> by the nonreentrant versions of "
5830 "these functions."
5831 msgstr ""
5832
5833 #. type: Plain text
5834 #: build/C/man3/getnetent_r.3:121 build/C/man3/getprotoent_r.3:111
5835 msgid ""
5836 "On success, these functions return 0.  On error, they return one of the "
5837 "positive error numbers listed in ERRORS."
5838 msgstr ""
5839
5840 #. type: Plain text
5841 #: build/C/man3/getnetent_r.3:129
5842 msgid ""
5843 "On error, record not found (B<getnetbyname_r>(), B<getnetbyaddr_r>()), or "
5844 "end of input (B<getnetent_r>())  I<result> is set to NULL."
5845 msgstr ""
5846
5847 #. type: Plain text
5848 #: build/C/man3/getnetent_r.3:134
5849 msgid "(B<getnetent_r>())  No more records in database."
5850 msgstr ""
5851
5852 #. type: TP
5853 #: build/C/man3/getnetent_r.3:134 build/C/man3/getprotoent_r.3:124 build/C/man3/getservent_r.3:123
5854 #, no-wrap
5855 msgid "B<ERANGE>"
5856 msgstr ""
5857
5858 #. type: Plain text
5859 #: build/C/man3/getnetent_r.3:141 build/C/man3/getprotoent_r.3:131 build/C/man3/getservent_r.3:130
5860 msgid ""
5861 "I<buf> is too small.  Try again with a larger buffer (and increased "
5862 "I<buflen>)."
5863 msgstr ""
5864
5865 #. type: Plain text
5866 #: build/C/man3/getnetent_r.3:145 build/C/man3/getprotoent_r.3:135 build/C/man3/getservent_r.3:134
5867 msgid ""
5868 "These functions are GNU extensions.  Functions with similar names exist on "
5869 "some other systems, though typically with different calling signatures."
5870 msgstr ""
5871
5872 #. type: Plain text
5873 #: build/C/man3/getnetent_r.3:148
5874 msgid "B<getnetent>(3), B<networks>(5)"
5875 msgstr ""
5876
5877 #. type: TH
5878 #: build/C/man2/getpeername.2:42
5879 #, no-wrap
5880 msgid "GETPEERNAME"
5881 msgstr ""
5882
5883 #. type: TH
5884 #: build/C/man2/getpeername.2:42 build/C/man5/nsswitch.conf.5:25
5885 #, no-wrap
5886 msgid "2013-02-12"
5887 msgstr ""
5888
5889 #. type: Plain text
5890 #: build/C/man2/getpeername.2:45
5891 msgid "getpeername - get name of connected peer socket"
5892 msgstr ""
5893
5894 #. type: Plain text
5895 #: build/C/man2/getpeername.2:50
5896 msgid ""
5897 "B<int getpeername(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t "
5898 "*>I<addrlen>B<);>"
5899 msgstr ""
5900
5901 #. type: Plain text
5902 #: build/C/man2/getpeername.2:63
5903 msgid ""
5904 "B<getpeername>()  returns the address of the peer connected to the socket "
5905 "I<sockfd>, in the buffer pointed to by I<addr>.  The I<addrlen> argument "
5906 "should be initialized to indicate the amount of space pointed to by "
5907 "I<addr>.  On return it contains the actual size of the name returned (in "
5908 "bytes).  The name is truncated if the buffer provided is too small."
5909 msgstr ""
5910
5911 #. type: Plain text
5912 #: build/C/man2/getpeername.2:68
5913 msgid ""
5914 "The returned address is truncated if the buffer provided is too small; in "
5915 "this case, I<addrlen> will return a value greater than was supplied to the "
5916 "call."
5917 msgstr ""
5918
5919 #. type: Plain text
5920 #: build/C/man2/getpeername.2:73 build/C/man2/shutdown.2:74
5921 msgid ""
5922 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5923 "appropriately."
5924 msgstr ""
5925
5926 #. type: TP
5927 #: build/C/man2/getpeername.2:74 build/C/man2/shutdown.2:75
5928 #, no-wrap
5929 msgid "B<EBADF>"
5930 msgstr ""
5931
5932 #. type: Plain text
5933 #: build/C/man2/getpeername.2:79
5934 msgid "The argument I<sockfd> is not a valid descriptor."
5935 msgstr ""
5936
5937 #. type: TP
5938 #: build/C/man2/getpeername.2:79 build/C/man7/packet.7:500 build/C/man7/raw.7:149 build/C/man7/unix.7:419
5939 #, no-wrap
5940 msgid "B<EFAULT>"
5941 msgstr ""
5942
5943 #. type: Plain text
5944 #: build/C/man2/getpeername.2:85
5945 msgid ""
5946 "The I<addr> argument points to memory not in a valid part of the process "
5947 "address space."
5948 msgstr ""
5949
5950 #. type: Plain text
5951 #: build/C/man2/getpeername.2:89
5952 msgid "I<addrlen> is invalid (e.g., is negative)."
5953 msgstr ""
5954
5955 #. type: TP
5956 #: build/C/man2/getpeername.2:89 build/C/man7/packet.7:512
5957 #, no-wrap
5958 msgid "B<ENOBUFS>"
5959 msgstr ""
5960
5961 #. type: Plain text
5962 #: build/C/man2/getpeername.2:93
5963 msgid ""
5964 "Insufficient resources were available in the system to perform the "
5965 "operation."
5966 msgstr ""
5967
5968 #. type: Plain text
5969 #: build/C/man2/getpeername.2:96
5970 msgid "The socket is not connected."
5971 msgstr ""
5972
5973 #. type: TP
5974 #: build/C/man2/getpeername.2:96 build/C/man2/shutdown.2:87
5975 #, no-wrap
5976 msgid "B<ENOTSOCK>"
5977 msgstr ""
5978
5979 #. type: Plain text
5980 #: build/C/man2/getpeername.2:101
5981 msgid "The argument I<sockfd> is a file, not a socket."
5982 msgstr ""
5983
5984 #. type: Plain text
5985 #: build/C/man2/getpeername.2:105
5986 msgid ""
5987 "SVr4, 4.4BSD (the B<getpeername>()  function call first appeared in 4.2BSD), "
5988 "POSIX.1-2001."
5989 msgstr ""
5990
5991 #. type: Plain text
5992 #: build/C/man2/getpeername.2:116
5993 msgid ""
5994 "The third argument of B<getpeername>()  is in reality an I<int\\ *> (and "
5995 "this is what 4.x BSD and libc4 and libc5 have).  Some POSIX confusion "
5996 "resulted in the present I<socklen_t>, also used by glibc.  See also "
5997 "B<accept>(2)."
5998 msgstr ""
5999
6000 #. type: Plain text
6001 #: build/C/man2/getpeername.2:143
6002 msgid ""
6003 "For stream sockets, once a B<connect>(2)  has been performed, either socket "
6004 "can call B<getpeername>()  to obtain the address of the peer socket.  On the "
6005 "other hand, datagram sockets are connectionless.  Calling B<connect>(2)  on "
6006 "a datagram socket merely sets the peer address for outgoing datagrams sent "
6007 "with B<write>(2)  or B<recv>(2).  The caller of B<connect>(2)  can use "
6008 "B<getpeername>()  to obtain the peer address that it earlier set for the "
6009 "socket.  However, the peer socket is unaware of this information, and "
6010 "calling B<getpeername>()  on the peer socket will return no useful "
6011 "information (unless a B<connect>(2)  call was also executed on the peer).  "
6012 "Note also that the receiver of a datagram can obtain the address of the "
6013 "sender when using B<recvfrom>(2)."
6014 msgstr ""
6015
6016 #. type: Plain text
6017 #: build/C/man2/getpeername.2:150
6018 msgid ""
6019 "B<accept>(2), B<bind>(2), B<getsockname>(2), B<ip>(7), B<socket>(7), "
6020 "B<unix>(7)"
6021 msgstr ""
6022
6023 #. type: TH
6024 #: build/C/man3/getprotoent.3:30
6025 #, no-wrap
6026 msgid "GETPROTOENT"
6027 msgstr ""
6028
6029 #. type: Plain text
6030 #: build/C/man3/getprotoent.3:34
6031 msgid ""
6032 "getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent - "
6033 "get protocol entry"
6034 msgstr ""
6035
6036 #. type: Plain text
6037 #: build/C/man3/getprotoent.3:39
6038 #, no-wrap
6039 msgid "B<struct protoent *getprotoent(void);>\n"
6040 msgstr ""
6041
6042 #. type: Plain text
6043 #: build/C/man3/getprotoent.3:41
6044 #, no-wrap
6045 msgid "B<struct protoent *getprotobyname(const char *>I<name>B<);>\n"
6046 msgstr ""
6047
6048 #. type: Plain text
6049 #: build/C/man3/getprotoent.3:43
6050 #, no-wrap
6051 msgid "B<struct protoent *getprotobynumber(int >I<proto>B<);>\n"
6052 msgstr ""
6053
6054 #. type: Plain text
6055 #: build/C/man3/getprotoent.3:45
6056 #, no-wrap
6057 msgid "B<void setprotoent(int >I<stayopen>B<);>\n"
6058 msgstr ""
6059
6060 #. type: Plain text
6061 #: build/C/man3/getprotoent.3:47
6062 #, no-wrap
6063 msgid "B<void endprotoent(void);>\n"
6064 msgstr ""
6065
6066 #. type: Plain text
6067 #: build/C/man3/getprotoent.3:58
6068 msgid ""
6069 "The B<getprotoent>()  function reads the next entry from the protocols "
6070 "database (see B<protocols>(5))  and returns a I<protoent> structure "
6071 "containing the broken-out fields from the entry.  A connection is opened to "
6072 "the database if necessary."
6073 msgstr ""
6074
6075 #. type: Plain text
6076 #: build/C/man3/getprotoent.3:68
6077 msgid ""
6078 "The B<getprotobyname>()  function returns a I<protoent> structure for the "
6079 "entry from the database that matches the protocol name I<name>.  A "
6080 "connection is opened to the database if necessary."
6081 msgstr ""
6082
6083 #. type: Plain text
6084 #: build/C/man3/getprotoent.3:78
6085 msgid ""
6086 "The B<getprotobynumber>()  function returns a I<protoent> structure for the "
6087 "entry from the database that matches the protocol number I<number>.  A "
6088 "connection is opened to the database if necessary."
6089 msgstr ""
6090
6091 #. type: Plain text
6092 #: build/C/man3/getprotoent.3:90
6093 msgid ""
6094 "The B<setprotoent>()  function opens a connection to the database, and sets "
6095 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
6096 "connection to the database will not be closed between calls to one of the "
6097 "B<getproto*>()  functions."
6098 msgstr ""
6099
6100 #. type: Plain text
6101 #: build/C/man3/getprotoent.3:94
6102 msgid "The B<endprotoent>()  function closes the connection to the database."
6103 msgstr ""
6104
6105 #. type: Plain text
6106 #: build/C/man3/getprotoent.3:100
6107 msgid "The I<protoent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
6108 msgstr ""
6109
6110 #. type: Plain text
6111 #: build/C/man3/getprotoent.3:108
6112 #, no-wrap
6113 msgid ""
6114 "struct protoent {\n"
6115 "    char  *p_name;       /* official protocol name */\n"
6116 "    char **p_aliases;    /* alias list */\n"
6117 "    int    p_proto;      /* protocol number */\n"
6118 "}\n"
6119 msgstr ""
6120
6121 #. type: Plain text
6122 #: build/C/man3/getprotoent.3:114
6123 msgid "The members of the I<protoent> structure are:"
6124 msgstr ""
6125
6126 #. type: TP
6127 #: build/C/man3/getprotoent.3:114
6128 #, no-wrap
6129 msgid "I<p_name>"
6130 msgstr ""
6131
6132 #. type: Plain text
6133 #: build/C/man3/getprotoent.3:117
6134 msgid "The official name of the protocol."
6135 msgstr ""
6136
6137 #. type: TP
6138 #: build/C/man3/getprotoent.3:117
6139 #, no-wrap
6140 msgid "I<p_aliases>"
6141 msgstr ""
6142
6143 #. type: Plain text
6144 #: build/C/man3/getprotoent.3:120
6145 msgid "A NULL-terminated list of alternative names for the protocol."
6146 msgstr ""
6147
6148 #. type: TP
6149 #: build/C/man3/getprotoent.3:120
6150 #, no-wrap
6151 msgid "I<p_proto>"
6152 msgstr ""
6153
6154 #. type: Plain text
6155 #: build/C/man3/getprotoent.3:123
6156 msgid "The protocol number."
6157 msgstr ""
6158
6159 #. type: Plain text
6160 #: build/C/man3/getprotoent.3:134
6161 msgid ""
6162 "The B<getprotoent>(), B<getprotobyname>()  and B<getprotobynumber>()  "
6163 "functions return a pointer to a statically allocated I<protoent> structure, "
6164 "or a null pointer if an error occurs or the end of the file is reached."
6165 msgstr ""
6166
6167 #. type: TP
6168 #: build/C/man3/getprotoent.3:136 build/C/man5/protocols.5:78
6169 #, no-wrap
6170 msgid "I</etc/protocols>"
6171 msgstr ""
6172
6173 #. type: Plain text
6174 #: build/C/man3/getprotoent.3:139
6175 msgid "protocol database file"
6176 msgstr ""
6177
6178 #. type: Plain text
6179 #: build/C/man3/getprotoent.3:147
6180 msgid "B<getnetent>(3), B<getprotoent_r>(3), B<getservent>(3), B<protocols>(5)"
6181 msgstr ""
6182
6183 #. type: TH
6184 #: build/C/man3/getprotoent_r.3:26
6185 #, no-wrap
6186 msgid "GETPROTOENT_R"
6187 msgstr ""
6188
6189 #. type: Plain text
6190 #: build/C/man3/getprotoent_r.3:30
6191 msgid ""
6192 "getprotoent_r, getprotobyname_r, getprotobynumber_r - get protocol entry "
6193 "(reentrant)"
6194 msgstr ""
6195
6196 #. type: Plain text
6197 #: build/C/man3/getprotoent_r.3:36
6198 #, no-wrap
6199 msgid ""
6200 "B<int getprotoent_r(struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6201 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6202 msgstr ""
6203
6204 #. type: Plain text
6205 #: build/C/man3/getprotoent_r.3:40
6206 #, no-wrap
6207 msgid ""
6208 "B<int getprotobyname_r(const char *>I<name>B<,>\n"
6209 "B<                struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6210 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6211 msgstr ""
6212
6213 #. type: Plain text
6214 #: build/C/man3/getprotoent_r.3:44
6215 #, no-wrap
6216 msgid ""
6217 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
6218 "B<                struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6219 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6220 msgstr ""
6221
6222 #. type: Plain text
6223 #: build/C/man3/getprotoent_r.3:55
6224 msgid "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
6225 msgstr ""
6226
6227 #. type: Plain text
6228 #: build/C/man3/getprotoent_r.3:76
6229 msgid ""
6230 "The B<getprotoent_r>(), B<getprotobyname_r>(), and B<getprotobynumber_r>()  "
6231 "functions are the reentrant equivalents of, respectively, B<getprotoent>(3), "
6232 "B<getprotobyname>(3), and B<getprotobynumber>(3).  They differ in the way "
6233 "that the I<protoent> structure is returned, and in the function calling "
6234 "signature and return value.  This manual page describes just the differences "
6235 "from the nonreentrant functions."
6236 msgstr ""
6237
6238 #. type: Plain text
6239 #: build/C/man3/getprotoent_r.3:82
6240 msgid ""
6241 "Instead of returning a pointer to a statically allocated I<protoent> "
6242 "structure as the function result, these functions copy the structure into "
6243 "the location pointed to by I<result_buf>."
6244 msgstr ""
6245
6246 #.  I can find no information on the required/recommended buffer size;
6247 #.  the nonreentrant functions use a 1024 byte buffer.
6248 #.  The 1024 byte value is also what the Solaris man page suggests. -- mtk
6249 #. type: Plain text
6250 #: build/C/man3/getprotoent_r.3:100
6251 msgid ""
6252 "The I<buf> array is used to store the string fields pointed to by the "
6253 "returned I<protoent> structure.  (The nonreentrant functions allocate these "
6254 "strings in static storage.)  The size of this array is specified in "
6255 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
6256 "and the caller must try again with a larger buffer.  (A buffer of length "
6257 "1024 bytes should be sufficient for most applications.)"
6258 msgstr ""
6259
6260 #. type: Plain text
6261 #: build/C/man3/getprotoent_r.3:108
6262 msgid ""
6263 "If the function call successfully obtains a protocol record, then I<*result> "
6264 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
6265 msgstr ""
6266
6267 #. type: Plain text
6268 #: build/C/man3/getprotoent_r.3:119
6269 msgid ""
6270 "On error, record not found (B<getprotobyname_r>(), B<getprotobynumber_r>()), "
6271 "or end of input (B<getprotoent_r>())  I<result> is set to NULL."
6272 msgstr ""
6273
6274 #. type: Plain text
6275 #: build/C/man3/getprotoent_r.3:124
6276 msgid "(B<getprotoent_r>())  No more records in database."
6277 msgstr ""
6278
6279 #. type: Plain text
6280 #: build/C/man3/getprotoent_r.3:149
6281 msgid ""
6282 "The program below uses B<getprotobyname_r>()  to retrieve the protocol "
6283 "record for the protocol named in its first command-line argument.  If a "
6284 "second (integer) command-line argument is supplied, it is used as the "
6285 "initial value for I<buflen>; if B<getprotobyname_r>()  fails with the error "
6286 "B<ERANGE>, the program retries with larger buffer sizes.  The following "
6287 "shell session shows a couple of sample runs:"
6288 msgstr ""
6289
6290 #. type: Plain text
6291 #: build/C/man3/getprotoent_r.3:160
6292 #, no-wrap
6293 msgid ""
6294 "$B< ./a.out tcp 1>\n"
6295 "ERANGE! Retrying with larger buffer\n"
6296 "getprotobyname_r() returned: 0 (success)  (buflen=78)\n"
6297 "p_name=tcp; p_proto=6; aliases=TCP\n"
6298 "$B< ./a.out xxx 1>\n"
6299 "ERANGE! Retrying with larger buffer\n"
6300 "getprotobyname_r() returned: 0 (success)  (buflen=100)\n"
6301 "Call failed/record not found\n"
6302 msgstr ""
6303
6304 #. type: Plain text
6305 #: build/C/man3/getprotoent_r.3:172 build/C/man3/getservent_r.3:170
6306 #, no-wrap
6307 msgid ""
6308 "#define _GNU_SOURCE\n"
6309 "#include E<lt>ctype.hE<gt>\n"
6310 "#include E<lt>netdb.hE<gt>\n"
6311 "#include E<lt>stdlib.hE<gt>\n"
6312 "#include E<lt>stdio.hE<gt>\n"
6313 "#include E<lt>errno.hE<gt>\n"
6314 "#include E<lt>string.hE<gt>\n"
6315 msgstr ""
6316
6317 #. type: Plain text
6318 #: build/C/man3/getprotoent_r.3:174 build/C/man3/getservent_r.3:172
6319 #, no-wrap
6320 msgid "#define MAX_BUF 10000\n"
6321 msgstr ""
6322
6323 #. type: Plain text
6324 #: build/C/man3/getprotoent_r.3:183
6325 #, no-wrap
6326 msgid ""
6327 "int\n"
6328 "main(int argc, char *argv[])\n"
6329 "{\n"
6330 "    int buflen, erange_cnt, s;\n"
6331 "    struct protoent result_buf;\n"
6332 "    struct protoent *result;\n"
6333 "    char buf[MAX_BUF];\n"
6334 "    char **p;\n"
6335 msgstr ""
6336
6337 #. type: Plain text
6338 #: build/C/man3/getprotoent_r.3:188
6339 #, no-wrap
6340 msgid ""
6341 "    if (argc E<lt> 2) {\n"
6342 "        printf(\"Usage: %s proto-name [buflen]\\en\", argv[0]);\n"
6343 "        exit(EXIT_FAILURE);\n"
6344 "    }\n"
6345 msgstr ""
6346
6347 #. type: Plain text
6348 #: build/C/man3/getprotoent_r.3:192
6349 #, no-wrap
6350 msgid ""
6351 "    buflen = 1024;\n"
6352 "    if (argc E<gt> 2)\n"
6353 "        buflen = atoi(argv[2]);\n"
6354 msgstr ""
6355
6356 #. type: Plain text
6357 #: build/C/man3/getprotoent_r.3:197 build/C/man3/getservent_r.3:200
6358 #, no-wrap
6359 msgid ""
6360 "    if (buflen E<gt> MAX_BUF) {\n"
6361 "        printf(\"Exceeded buffer limit (%d)\\en\", MAX_BUF);\n"
6362 "        exit(EXIT_FAILURE);\n"
6363 "    }\n"
6364 msgstr ""
6365
6366 #. type: Plain text
6367 #: build/C/man3/getprotoent_r.3:206
6368 #, no-wrap
6369 msgid ""
6370 "    erange_cnt = 0;\n"
6371 "    do {\n"
6372 "        s = getprotobyname_r(argv[1], &result_buf,\n"
6373 "                     buf, buflen, &result);\n"
6374 "        if (s == ERANGE) {\n"
6375 "            if (erange_cnt == 0)\n"
6376 "                printf(\"ERANGE! Retrying with larger buffer\\en\");\n"
6377 "            erange_cnt++;\n"
6378 msgstr ""
6379
6380 #. type: Plain text
6381 #: build/C/man3/getprotoent_r.3:209 build/C/man3/getservent_r.3:212
6382 #, no-wrap
6383 msgid ""
6384 "            /* Increment a byte at a time so we can see exactly\n"
6385 "               what size buffer was required */\n"
6386 msgstr ""
6387
6388 #. type: Plain text
6389 #: build/C/man3/getprotoent_r.3:211 build/C/man3/getservent_r.3:214
6390 #, no-wrap
6391 msgid "            buflen++;\n"
6392 msgstr ""
6393
6394 #. type: Plain text
6395 #: build/C/man3/getprotoent_r.3:218 build/C/man3/getservent_r.3:221
6396 #, no-wrap
6397 msgid ""
6398 "            if (buflen E<gt> MAX_BUF) {\n"
6399 "                printf(\"Exceeded buffer limit (%d)\\en\", MAX_BUF);\n"
6400 "                exit(EXIT_FAILURE);\n"
6401 "            }\n"
6402 "        }\n"
6403 "    } while (s == ERANGE);\n"
6404 msgstr ""
6405
6406 #. type: Plain text
6407 #: build/C/man3/getprotoent_r.3:222
6408 #, no-wrap
6409 msgid ""
6410 "    printf(\"getprotobyname_r() returned: %s  (buflen=%d)\\en\",\n"
6411 "            (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
6412 "            strerror(s), buflen);\n"
6413 msgstr ""
6414
6415 #. type: Plain text
6416 #: build/C/man3/getprotoent_r.3:227 build/C/man3/getservent_r.3:230
6417 #, no-wrap
6418 msgid ""
6419 "    if (s != 0 || result == NULL) {\n"
6420 "        printf(\"Call failed/record not found\\en\");\n"
6421 "        exit(EXIT_FAILURE);\n"
6422 "    }\n"
6423 msgstr ""
6424
6425 #. type: Plain text
6426 #: build/C/man3/getprotoent_r.3:233
6427 #, no-wrap
6428 msgid ""
6429 "    printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
6430 "                result_buf.p_name, result_buf.p_proto);\n"
6431 "    for (p = result_buf.p_aliases; *p != NULL; p++)\n"
6432 "        printf(\"%s \", *p);\n"
6433 "    printf(\"\\en\");\n"
6434 msgstr ""
6435
6436 #. type: Plain text
6437 #: build/C/man3/getprotoent_r.3:240
6438 msgid "B<getprotoent>(3), B<protocols>(5)"
6439 msgstr ""
6440
6441 #. type: TH
6442 #: build/C/man3/getservent.3:34
6443 #, no-wrap
6444 msgid "GETSERVENT"
6445 msgstr ""
6446
6447 #. type: Plain text
6448 #: build/C/man3/getservent.3:38
6449 msgid ""
6450 "getservent, getservbyname, getservbyport, setservent, endservent - get "
6451 "service entry"
6452 msgstr ""
6453
6454 #. type: Plain text
6455 #: build/C/man3/getservent.3:43
6456 #, no-wrap
6457 msgid "B<struct servent *getservent(void);>\n"
6458 msgstr ""
6459
6460 #. type: Plain text
6461 #: build/C/man3/getservent.3:45
6462 #, no-wrap
6463 msgid ""
6464 "B<struct servent *getservbyname(const char *>I<name>B<, const char "
6465 "*>I<proto>B<);>\n"
6466 msgstr ""
6467
6468 #. type: Plain text
6469 #: build/C/man3/getservent.3:47
6470 #, no-wrap
6471 msgid "B<struct servent *getservbyport(int >I<port>B<, const char *>I<proto>B<);>\n"
6472 msgstr ""
6473
6474 #. type: Plain text
6475 #: build/C/man3/getservent.3:49
6476 #, no-wrap
6477 msgid "B<void setservent(int >I<stayopen>B<);>\n"
6478 msgstr ""
6479
6480 #. type: Plain text
6481 #: build/C/man3/getservent.3:51
6482 #, no-wrap
6483 msgid "B<void endservent(void);>\n"
6484 msgstr ""
6485
6486 #. type: Plain text
6487 #: build/C/man3/getservent.3:62
6488 msgid ""
6489 "The B<getservent>()  function reads the next entry from the services "
6490 "database (see B<services>(5))  and returns a I<servent> structure containing "
6491 "the broken-out fields from the entry.  A connection is opened to the "
6492 "database if necessary."
6493 msgstr ""
6494
6495 #. type: Plain text
6496 #: build/C/man3/getservent.3:77
6497 msgid ""
6498 "The B<getservbyname>()  function returns a I<servent> structure for the "
6499 "entry from the database that matches the service I<name> using protocol "
6500 "I<proto>.  If I<proto> is NULL, any protocol will be matched.  A connection "
6501 "is opened to the database if necessary."
6502 msgstr ""
6503
6504 #. type: Plain text
6505 #: build/C/man3/getservent.3:93
6506 msgid ""
6507 "The B<getservbyport>()  function returns a I<servent> structure for the "
6508 "entry from the database that matches the port I<port> (given in network byte "
6509 "order)  using protocol I<proto>.  If I<proto> is NULL, any protocol will be "
6510 "matched.  A connection is opened to the database if necessary."
6511 msgstr ""
6512
6513 #. type: Plain text
6514 #: build/C/man3/getservent.3:105
6515 msgid ""
6516 "The B<setservent>()  function opens a connection to the database, and sets "
6517 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
6518 "connection to the database will not be closed between calls to one of the "
6519 "B<getserv*>()  functions."
6520 msgstr ""
6521
6522 #. type: Plain text
6523 #: build/C/man3/getservent.3:109
6524 msgid "The B<endservent>()  function closes the connection to the database."
6525 msgstr ""
6526
6527 #. type: Plain text
6528 #: build/C/man3/getservent.3:115
6529 msgid "The I<servent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
6530 msgstr ""
6531
6532 #. type: Plain text
6533 #: build/C/man3/getservent.3:124
6534 #, no-wrap
6535 msgid ""
6536 "struct servent {\n"
6537 "    char  *s_name;       /* official service name */\n"
6538 "    char **s_aliases;    /* alias list */\n"
6539 "    int    s_port;       /* port number */\n"
6540 "    char  *s_proto;      /* protocol to use */\n"
6541 "}\n"
6542 msgstr ""
6543
6544 #. type: Plain text
6545 #: build/C/man3/getservent.3:130
6546 msgid "The members of the I<servent> structure are:"
6547 msgstr ""
6548
6549 #. type: TP
6550 #: build/C/man3/getservent.3:130
6551 #, no-wrap
6552 msgid "I<s_name>"
6553 msgstr ""
6554
6555 #. type: Plain text
6556 #: build/C/man3/getservent.3:133
6557 msgid "The official name of the service."
6558 msgstr ""
6559
6560 #. type: TP
6561 #: build/C/man3/getservent.3:133
6562 #, no-wrap
6563 msgid "I<s_aliases>"
6564 msgstr ""
6565
6566 #. type: Plain text
6567 #: build/C/man3/getservent.3:136
6568 msgid "A NULL-terminated list of alternative names for the service."
6569 msgstr ""
6570
6571 #. type: TP
6572 #: build/C/man3/getservent.3:136
6573 #, no-wrap
6574 msgid "I<s_port>"
6575 msgstr ""
6576
6577 #. type: Plain text
6578 #: build/C/man3/getservent.3:139
6579 msgid "The port number for the service given in network byte order."
6580 msgstr ""
6581
6582 #. type: TP
6583 #: build/C/man3/getservent.3:139
6584 #, no-wrap
6585 msgid "I<s_proto>"
6586 msgstr ""
6587
6588 #. type: Plain text
6589 #: build/C/man3/getservent.3:142
6590 msgid "The name of the protocol to use with this service."
6591 msgstr ""
6592
6593 #. type: Plain text
6594 #: build/C/man3/getservent.3:153
6595 msgid ""
6596 "The B<getservent>(), B<getservbyname>()  and B<getservbyport>()  functions "
6597 "return a pointer to a statically allocated I<servent> structure, or NULL if "
6598 "an error occurs or the end of the file is reached."
6599 msgstr ""
6600
6601 #. type: TP
6602 #: build/C/man3/getservent.3:154 build/C/man5/services.5:186
6603 #, no-wrap
6604 msgid "I</etc/services>"
6605 msgstr ""
6606
6607 #. type: Plain text
6608 #: build/C/man3/getservent.3:157
6609 msgid "services database file"
6610 msgstr ""
6611
6612 #. type: Plain text
6613 #: build/C/man3/getservent.3:164
6614 msgid "B<getnetent>(3), B<getprotoent>(3), B<getservent_r>(3), B<services>(5)"
6615 msgstr ""
6616
6617 #. type: TH
6618 #: build/C/man3/getservent_r.3:26
6619 #, no-wrap
6620 msgid "GETSERVENT_R"
6621 msgstr ""
6622
6623 #. type: Plain text
6624 #: build/C/man3/getservent_r.3:30
6625 msgid ""
6626 "getservent_r, getservbyname_r, getservbyport_r - get service entry "
6627 "(reentrant)"
6628 msgstr ""
6629
6630 #. type: Plain text
6631 #: build/C/man3/getservent_r.3:36
6632 #, no-wrap
6633 msgid ""
6634 "B<int getservent_r(struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6635 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6636 msgstr ""
6637
6638 #. type: Plain text
6639 #: build/C/man3/getservent_r.3:40
6640 #, no-wrap
6641 msgid ""
6642 "B<int getservbyname_r(const char *>I<name>B<, const char *>I<proto>B<,>\n"
6643 "B<                struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6644 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6645 msgstr ""
6646
6647 #. type: Plain text
6648 #: build/C/man3/getservent_r.3:44
6649 #, no-wrap
6650 msgid ""
6651 "B<int getservbyport_r(int >I<port>B<, const char *>I<proto>B<,>\n"
6652 "B<                struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6653 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6654 msgstr ""
6655
6656 #. type: Plain text
6657 #: build/C/man3/getservent_r.3:55
6658 msgid "B<getservent_r>(), B<getservbyname_r>(), B<getservbyport_r>():"
6659 msgstr ""
6660
6661 #. type: Plain text
6662 #: build/C/man3/getservent_r.3:76
6663 msgid ""
6664 "The B<getservent_r>(), B<getservbyname_r>(), and B<getservbyport_r>()  "
6665 "functions are the reentrant equivalents of, respectively, B<getservent>(3), "
6666 "B<getservbyname>(3), and B<getservbyport>(3).  They differ in the way that "
6667 "the I<servent> structure is returned, and in the function calling signature "
6668 "and return value.  This manual page describes just the differences from the "
6669 "nonreentrant functions."
6670 msgstr ""
6671
6672 #. type: Plain text
6673 #: build/C/man3/getservent_r.3:82
6674 msgid ""
6675 "Instead of returning a pointer to a statically allocated I<servent> "
6676 "structure as the function result, these functions copy the structure into "
6677 "the location pointed to by I<result_buf>."
6678 msgstr ""
6679
6680 #.  I can find no information on the required/recommended buffer size;
6681 #.  the nonreentrant functions use a 1024 byte buffer -- mtk.
6682 #. type: Plain text
6683 #: build/C/man3/getservent_r.3:99
6684 msgid ""
6685 "The I<buf> array is used to store the string fields pointed to by the "
6686 "returned I<servent> structure.  (The nonreentrant functions allocate these "
6687 "strings in static storage.)  The size of this array is specified in "
6688 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
6689 "and the caller must try again with a larger buffer.  (A buffer of length "
6690 "1024 bytes should be sufficient for most applications.)"
6691 msgstr ""
6692
6693 #. type: Plain text
6694 #: build/C/man3/getservent_r.3:107
6695 msgid ""
6696 "If the function call successfully obtains a service record, then I<*result> "
6697 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
6698 msgstr ""
6699
6700 #. type: Plain text
6701 #: build/C/man3/getservent_r.3:110
6702 msgid ""
6703 "On success, these functions return 0.  On error, they return one of the "
6704 "positive error numbers listed in errors."
6705 msgstr ""
6706
6707 #. type: Plain text
6708 #: build/C/man3/getservent_r.3:118
6709 msgid ""
6710 "On error, record not found (B<getservbyname_r>(), B<getservbyport_r>()), or "
6711 "end of input (B<getservent_r>())  I<result> is set to NULL."
6712 msgstr ""
6713
6714 #. type: Plain text
6715 #: build/C/man3/getservent_r.3:123
6716 msgid "(B<getservent_r>())  No more records in database."
6717 msgstr ""
6718
6719 #. type: Plain text
6720 #: build/C/man3/getservent_r.3:148
6721 msgid ""
6722 "The program below uses B<getservbyport_r>()  to retrieve the service record "
6723 "for the port and protocol named in its first command-line argument.  If a "
6724 "third (integer) command-line argument is supplied, it is used as the initial "
6725 "value for I<buflen>; if B<getservbyport_r>()  fails with the error "
6726 "B<ERANGE>, the program retries with larger buffer sizes.  The following "
6727 "shell session shows a couple of sample runs:"
6728 msgstr ""
6729
6730 #. type: Plain text
6731 #: build/C/man3/getservent_r.3:158
6732 #, no-wrap
6733 msgid ""
6734 "$B< ./a.out 7 tcp 1>\n"
6735 "ERANGE! Retrying with larger buffer\n"
6736 "getservbyport_r() returned: 0 (success)  (buflen=87)\n"
6737 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
6738 "$B< ./a.out 77777 tcp>\n"
6739 "getservbyport_r() returned: 0 (success)  (buflen=1024)\n"
6740 "Call failed/record not found\n"
6741 msgstr ""
6742
6743 #. type: Plain text
6744 #: build/C/man3/getservent_r.3:182
6745 #, no-wrap
6746 msgid ""
6747 "int\n"
6748 "main(int argc, char *argv[])\n"
6749 "{\n"
6750 "    int buflen, erange_cnt, port, s;\n"
6751 "    struct servent result_buf;\n"
6752 "    struct servent *result;\n"
6753 "    char buf[MAX_BUF];\n"
6754 "    char *protop;\n"
6755 "    char **p;\n"
6756 msgstr ""
6757
6758 #. type: Plain text
6759 #: build/C/man3/getservent_r.3:187
6760 #, no-wrap
6761 msgid ""
6762 "    if (argc E<lt> 3) {\n"
6763 "        printf(\"Usage: %s port-num proto-name [buflen]\\en\", argv[0]);\n"
6764 "        exit(EXIT_FAILURE);\n"
6765 "    }\n"
6766 msgstr ""
6767
6768 #. type: Plain text
6769 #: build/C/man3/getservent_r.3:191
6770 #, no-wrap
6771 msgid ""
6772 "    port = htons(atoi(argv[1]));\n"
6773 "    protop = (strcmp(argv[2], \"null\") == 0 ||\n"
6774 "              strcmp(argv[2], \"NULL\") == 0) ?  NULL : argv[2];\n"
6775 msgstr ""
6776
6777 #. type: Plain text
6778 #: build/C/man3/getservent_r.3:195
6779 #, no-wrap
6780 msgid ""
6781 "    buflen = 1024;\n"
6782 "    if (argc E<gt> 3)\n"
6783 "        buflen = atoi(argv[3]);\n"
6784 msgstr ""
6785
6786 #. type: Plain text
6787 #: build/C/man3/getservent_r.3:209
6788 #, no-wrap
6789 msgid ""
6790 "    erange_cnt = 0;\n"
6791 "    do {\n"
6792 "        s = getservbyport_r(port, protop, &result_buf,\n"
6793 "                     buf, buflen, &result);\n"
6794 "        if (s == ERANGE) {\n"
6795 "            if (erange_cnt == 0)\n"
6796 "                printf(\"ERANGE! Retrying with larger buffer\\en\");\n"
6797 "            erange_cnt++;\n"
6798 msgstr ""
6799
6800 #. type: Plain text
6801 #: build/C/man3/getservent_r.3:225
6802 #, no-wrap
6803 msgid ""
6804 "    printf(\"getservbyport_r() returned: %s  (buflen=%d)\\en\",\n"
6805 "            (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
6806 "            strerror(s), buflen);\n"
6807 msgstr ""
6808
6809 #. type: Plain text
6810 #: build/C/man3/getservent_r.3:237
6811 #, no-wrap
6812 msgid ""
6813 "    printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
6814 "                result_buf.s_name, result_buf.s_proto,\n"
6815 "                ntohs(result_buf.s_port));\n"
6816 "    for (p = result_buf.s_aliases; *p != NULL; p++)\n"
6817 "        printf(\"%s \", *p);\n"
6818 "    printf(\"\\en\");\n"
6819 msgstr ""
6820
6821 #. type: Plain text
6822 #: build/C/man3/getservent_r.3:244
6823 msgid "B<getservent>(3), B<services>(5)"
6824 msgstr ""
6825
6826 #. type: TH
6827 #: build/C/man5/host.conf.5:26
6828 #, no-wrap
6829 msgid "HOST.CONF"
6830 msgstr ""
6831
6832 #. type: TH
6833 #: build/C/man5/host.conf.5:26
6834 #, no-wrap
6835 msgid "2003-08-23"
6836 msgstr ""
6837
6838 #. type: TH
6839 #: build/C/man5/host.conf.5:26 build/C/man5/networks.5:26
6840 #, no-wrap
6841 msgid "Linux System Administration"
6842 msgstr ""
6843
6844 #. type: Plain text
6845 #: build/C/man5/host.conf.5:29
6846 msgid "host.conf - resolver configuration file"
6847 msgstr ""
6848
6849 #. type: Plain text
6850 #: build/C/man5/host.conf.5:38
6851 msgid ""
6852 "The file I</etc/host.conf> contains configuration information specific to "
6853 "the resolver library.  It should contain one configuration keyword per line, "
6854 "followed by appropriate configuration information.  The keywords recognized "
6855 "are I<order>, I<trim>, I<multi>, I<nospoof>, I<spoof>, and I<reorder>.  "
6856 "These keywords are described below."
6857 msgstr ""
6858
6859 #. type: TP
6860 #: build/C/man5/host.conf.5:38
6861 #, no-wrap
6862 msgid "I<order>"
6863 msgstr ""
6864
6865 #. type: Plain text
6866 #: build/C/man5/host.conf.5:44
6867 msgid ""
6868 "This keyword specifies how host lookups are to be performed.  It should be "
6869 "followed by one or more lookup methods, separated by commas.  Valid methods "
6870 "are I<bind>, I<hosts>, and I<nis>."
6871 msgstr ""
6872
6873 #. type: TP
6874 #: build/C/man5/host.conf.5:44
6875 #, no-wrap
6876 msgid "I<trim>"
6877 msgstr ""
6878
6879 #. type: Plain text
6880 #: build/C/man5/host.conf.5:61
6881 msgid ""
6882 "This keyword may be listed more than once.  Each time it should be followed "
6883 "by a list of domains, separated by colons (\\(aq:\\(aq), semicolons "
6884 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot.  When set, the "
6885 "resolv+ library will automatically trim the given domain name from the end "
6886 "of any hostname resolved via DNS.  This is intended for use with local hosts "
6887 "and domains.  (Related note: trim will not affect hostnames gathered via NIS "
6888 "or the hosts file.  Care should be taken to ensure that the first hostname "
6889 "for each entry in the hosts file is fully qualified or unqualified, as "
6890 "appropriate for the local installation.)"
6891 msgstr ""
6892
6893 #. type: TP
6894 #: build/C/man5/host.conf.5:61
6895 #, no-wrap
6896 msgid "I<multi>"
6897 msgstr ""
6898
6899 #. type: Plain text
6900 #: build/C/man5/host.conf.5:76
6901 msgid ""
6902 "Valid values are I<on> and I<off>.  If set to I<on>, the resolv+ library "
6903 "will return all valid addresses for a host that appears in the I</etc/hosts> "
6904 "file, instead of only the first.  This is I<off> by default, as it may cause "
6905 "a substantial performance loss at sites with large hosts files."
6906 msgstr ""
6907
6908 #. type: TP
6909 #: build/C/man5/host.conf.5:76
6910 #, no-wrap
6911 msgid "I<nospoof>"
6912 msgstr ""
6913
6914 #. type: Plain text
6915 #: build/C/man5/host.conf.5:91
6916 msgid ""
6917 "Valid values are I<on> and I<off>.  If set to I<on>, the resolv+ library "
6918 "will attempt to prevent hostname spoofing to enhance the security of "
6919 "B<rlogin> and B<rsh>.  It works as follows: after performing a host address "
6920 "lookup, resolv+ will perform a hostname lookup for that address.  If the two "
6921 "hostnames do not match, the query will fail.  The default value is I<off>."
6922 msgstr ""
6923
6924 #. type: TP
6925 #: build/C/man5/host.conf.5:91
6926 #, no-wrap
6927 msgid "I<spoofalert>"
6928 msgstr ""
6929
6930 #. type: Plain text
6931 #: build/C/man5/host.conf.5:103
6932 msgid ""
6933 "Valid values are I<on> and I<off>.  If this option is set to I<on> and the "
6934 "I<nospoof> option is also set, resolv+ will log a warning of the error via "
6935 "the syslog facility.  The default value is I<off>."
6936 msgstr ""
6937
6938 #. type: TP
6939 #: build/C/man5/host.conf.5:103
6940 #, no-wrap
6941 msgid "I<spoof>"
6942 msgstr ""
6943
6944 #. type: Plain text
6945 #: build/C/man5/host.conf.5:122
6946 msgid ""
6947 "Valid values are I<off>, I<nowarn> and I<warn>.  If this option is set to "
6948 "I<off>, spoofed addresses are permitted and no warnings will be emitted via "
6949 "the syslog facility.  If this option is set to I<warn>, resolv+ will attempt "
6950 "to prevent hostname spoofing to enhance the security and log a warning of "
6951 "the error via the syslog facility.  If this option is set to I<nowarn>, the "
6952 "resolv+ library will attempt to prevent hostname spoofing to enhance the "
6953 "security but not emit warnings via the syslog facility.  Setting this option "
6954 "to anything else is equal to setting it to I<nowarn>."
6955 msgstr ""
6956
6957 #. type: TP
6958 #: build/C/man5/host.conf.5:122
6959 #, no-wrap
6960 msgid "I<reorder>"
6961 msgstr ""
6962
6963 #. type: Plain text
6964 #: build/C/man5/host.conf.5:135
6965 msgid ""
6966 "Valid values are I<on> and I<off>.  If set to I<on>, resolv+ will attempt to "
6967 "reorder host addresses so that local addresses (i.e., on the same subnet) "
6968 "are listed first when a B<gethostbyname>(3)  is performed.  Reordering is "
6969 "done for all lookup methods.  The default value is I<off>."
6970 msgstr ""
6971
6972 #. type: SH
6973 #: build/C/man5/host.conf.5:135
6974 #, no-wrap
6975 msgid "ENVIRONMENT"
6976 msgstr ""
6977
6978 #. type: Plain text
6979 #: build/C/man5/host.conf.5:139
6980 msgid ""
6981 "There are six environment variables that can be used to allow users to "
6982 "override the behavior which is configured in I</etc/host.conf>."
6983 msgstr ""
6984
6985 #. type: TP
6986 #: build/C/man5/host.conf.5:139
6987 #, no-wrap
6988 msgid "B<RESOLV_HOST_CONF>"
6989 msgstr ""
6990
6991 #. type: Plain text
6992 #: build/C/man5/host.conf.5:143
6993 msgid ""
6994 "If set, this variable points to a file that should be read instead of "
6995 "I</etc/host.conf>."
6996 msgstr ""
6997
6998 #. type: TP
6999 #: build/C/man5/host.conf.5:143
7000 #, no-wrap
7001 msgid "B<RESOLV_SERV_ORDER>"
7002 msgstr ""
7003
7004 #. type: Plain text
7005 #: build/C/man5/host.conf.5:148
7006 msgid "Overrides the I<order> command."
7007 msgstr ""
7008
7009 #. type: TP
7010 #: build/C/man5/host.conf.5:148
7011 #, no-wrap
7012 msgid "B<RESOLV_SPOOF_CHECK>"
7013 msgstr ""
7014
7015 #. type: Plain text
7016 #: build/C/man5/host.conf.5:157
7017 msgid ""
7018 "Overrides the I<nospoof>, I<spoofalert> and I<spoof> commands in the same "
7019 "way as the I<spoof> command is parsed.  Valid values are I<off>, I<nowarn> "
7020 "and I<warn>."
7021 msgstr ""
7022
7023 #. type: TP
7024 #: build/C/man5/host.conf.5:157
7025 #, no-wrap
7026 msgid "B<RESOLV_MULTI>"
7027 msgstr ""
7028
7029 #. type: Plain text
7030 #: build/C/man5/host.conf.5:162
7031 msgid "Overrides the I<multi> command."
7032 msgstr ""
7033
7034 #. type: TP
7035 #: build/C/man5/host.conf.5:162
7036 #, no-wrap
7037 msgid "B<RESOLV_REORDER>"
7038 msgstr ""
7039
7040 #. type: Plain text
7041 #: build/C/man5/host.conf.5:167
7042 msgid "Overrides the I<reorder> command."
7043 msgstr ""
7044
7045 #. type: TP
7046 #: build/C/man5/host.conf.5:167
7047 #, no-wrap
7048 msgid "B<RESOLV_ADD_TRIM_DOMAINS>"
7049 msgstr ""
7050
7051 #. type: Plain text
7052 #: build/C/man5/host.conf.5:172
7053 msgid ""
7054 "A list of domains, separated by colons (\\(aq:\\(aq), semicolons "
7055 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot, which will be "
7056 "added to the list of domains that should be trimmed."
7057 msgstr ""
7058
7059 #. type: TP
7060 #: build/C/man5/host.conf.5:172
7061 #, no-wrap
7062 msgid "B<RESOLV_OVERRIDE_TRIM_DOMAINS>"
7063 msgstr ""
7064
7065 #. type: Plain text
7066 #: build/C/man5/host.conf.5:180
7067 msgid ""
7068 "A list of domains, separated by colons (\\(aq:\\(aq), semicolons "
7069 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot, which will "
7070 "replace the list of domains that should be trimmed.  Overrides the I<trim> "
7071 "command."
7072 msgstr ""
7073
7074 #. type: Plain text
7075 #: build/C/man5/host.conf.5:184 build/C/man5/host.conf.5:187
7076 msgid "Resolver configuration file"
7077 msgstr ""
7078
7079 #. type: TP
7080 #: build/C/man5/host.conf.5:184
7081 #, no-wrap
7082 msgid "I</etc/resolv.conf>"
7083 msgstr ""
7084
7085 #. type: Plain text
7086 #: build/C/man5/host.conf.5:190
7087 msgid "Local hosts database"
7088 msgstr ""
7089
7090 #. type: Plain text
7091 #: build/C/man5/host.conf.5:199
7092 msgid ""
7093 "The following differences exist compared to the original implementation.  A "
7094 "new command I<spoof> and a new environment variable B<RESOLV_SPOOF_CHECK> "
7095 "can take arguments like I<off>, I<nowarn> and I<warn>.  Line comments can "
7096 "appear anywhere and not only at the beginning of a line."
7097 msgstr ""
7098
7099 #. type: Plain text
7100 #: build/C/man5/host.conf.5:204
7101 msgid "B<gethostbyname>(3), B<hostname>(7), B<named>(8), B<resolv+>(8)"
7102 msgstr ""
7103
7104 #. type: TH
7105 #: build/C/man7/hostname.7:39
7106 #, no-wrap
7107 msgid "HOSTNAME"
7108 msgstr ""
7109
7110 #. type: TH
7111 #: build/C/man7/hostname.7:39
7112 #, no-wrap
7113 msgid "2010-11-07"
7114 msgstr ""
7115
7116 #. type: Plain text
7117 #: build/C/man7/hostname.7:42
7118 msgid "hostname - hostname resolution description"
7119 msgstr ""
7120
7121 #. type: Plain text
7122 #: build/C/man7/hostname.7:46
7123 msgid ""
7124 "Hostnames are domains, where a domain is a hierarchical, dot-separated list "
7125 "of subdomains; for example, the machine monet, in the Berkeley subdomain of "
7126 "the EDU domain would be represented as \"monet.Berkeley.EDU\"."
7127 msgstr ""
7128
7129 #. type: Plain text
7130 #: build/C/man7/hostname.7:55
7131 msgid ""
7132 "Hostnames are often used with network client and server programs, which must "
7133 "generally translate the name to an address for use.  (This task is generally "
7134 "performed by either B<getaddrinfo>(3)  or the obsolete B<gethostbyname>(3).)  "
7135 "Hostnames are resolved by the Internet name resolver in the following "
7136 "fashion."
7137 msgstr ""
7138
7139 #. type: Plain text
7140 #: build/C/man7/hostname.7:68
7141 msgid ""
7142 "If the name consists of a single component, that is, contains no dot, and if "
7143 "the environment variable B<HOSTALIASES> is set to the name of a file, that "
7144 "file is searched for any string matching the input hostname.  The file "
7145 "should consist of lines made up of two white-space separated strings, the "
7146 "first of which is the hostname alias, and the second of which is the "
7147 "complete hostname to be substituted for that alias.  If a case-insensitive "
7148 "match is found between the hostname to be resolved and the first field of a "
7149 "line in the file, the substituted name is looked up with no further "
7150 "processing."
7151 msgstr ""
7152
7153 #. type: Plain text
7154 #: build/C/man7/hostname.7:72
7155 msgid ""
7156 "If the input name ends with a trailing dot, the trailing dot is removed, and "
7157 "the remaining name is looked up with no further processing."
7158 msgstr ""
7159
7160 #. type: Plain text
7161 #: build/C/man7/hostname.7:85
7162 msgid ""
7163 "If the input name does not end with a trailing dot, it is looked up by "
7164 "searching through a list of domains until a match is found.  The default "
7165 "search list includes first the local domain, then its parent domains with at "
7166 "least 2 name components (longest first).  For example, in the domain "
7167 "CS.Berkeley.EDU, the name lithium.CChem will be checked first as "
7168 "lithium.CChem.CS.Berkeley.EDU and then as lithium.CChem.Berkeley.EDU.  "
7169 "Lithium.CChem.EDU will not be tried, as there is only one component "
7170 "remaining from the local domain.  The search path can be changed from the "
7171 "default by a system-wide configuration file (see B<resolver>(5))."
7172 msgstr ""
7173
7174 #.  .SH HISTORY
7175 #.  Hostname appeared in
7176 #.  4.2BSD.
7177 #. type: Plain text
7178 #: build/C/man7/hostname.7:93
7179 msgid "B<gethostbyname>(3), B<resolver>(5), B<mailaddr>(7), B<named>(8)"
7180 msgstr ""
7181
7182 #. type: TH
7183 #: build/C/man5/hosts.5:27
7184 #, no-wrap
7185 msgid "HOSTS"
7186 msgstr ""
7187
7188 #. type: TH
7189 #: build/C/man5/hosts.5:27
7190 #, no-wrap
7191 msgid "2002-06-16"
7192 msgstr ""
7193
7194 #. type: Plain text
7195 #: build/C/man5/hosts.5:30
7196 msgid "hosts - static table lookup for hostnames"
7197 msgstr ""
7198
7199 #. type: Plain text
7200 #: build/C/man5/hosts.5:32
7201 msgid "B</etc/hosts>"
7202 msgstr ""
7203
7204 #. type: Plain text
7205 #: build/C/man5/hosts.5:40
7206 msgid ""
7207 "This manual page describes the format of the I</etc/hosts> file.  This file "
7208 "is a simple text file that associates IP addresses with hostnames, one line "
7209 "per IP address.  For each host a single line should be present with the "
7210 "following information:"
7211 msgstr ""
7212
7213 #. type: Plain text
7214 #: build/C/man5/hosts.5:43
7215 msgid "IP_address canonical_hostname [aliases...]"
7216 msgstr ""
7217
7218 #. type: Plain text
7219 #: build/C/man5/hosts.5:56
7220 msgid ""
7221 "Fields of the entry are separated by any number of blanks and/or tab "
7222 "characters.  Text from a \"#\" character until the end of the line is a "
7223 "comment, and is ignored.  Host names may contain only alphanumeric "
7224 "characters, minus signs (\"-\"), and periods (\".\").  They must begin with "
7225 "an alphabetic character and end with an alphanumeric character.  Optional "
7226 "aliases provide for name changes, alternate spellings, shorter hostnames, or "
7227 "generic hostnames (for example, I<localhost>)."
7228 msgstr ""
7229
7230 #. type: Plain text
7231 #: build/C/man5/hosts.5:64
7232 msgid ""
7233 "The Berkeley Internet Name Domain (BIND) Server implements the Internet name "
7234 "server for UNIX systems.  It augments or replaces the I</etc/hosts> file or "
7235 "hostname lookup, and frees a host from relying on I</etc/hosts> being up to "
7236 "date and complete."
7237 msgstr ""
7238
7239 #. type: Plain text
7240 #: build/C/man5/hosts.5:67
7241 msgid ""
7242 "In modern systems, even though the host table has been superseded by DNS, it "
7243 "is still widely used for:"
7244 msgstr ""
7245
7246 #. type: TP
7247 #: build/C/man5/hosts.5:67
7248 #, no-wrap
7249 msgid "B<bootstrapping>"
7250 msgstr ""
7251
7252 #. type: Plain text
7253 #: build/C/man5/hosts.5:73
7254 msgid ""
7255 "Most systems have a small host table containing the name and address "
7256 "information for important hosts on the local network.  This is useful when "
7257 "DNS is not running, for example during system bootup."
7258 msgstr ""
7259
7260 #. type: TP
7261 #: build/C/man5/hosts.5:73
7262 #, no-wrap
7263 msgid "B<NIS>"
7264 msgstr ""
7265
7266 #. type: Plain text
7267 #: build/C/man5/hosts.5:79
7268 msgid ""
7269 "Sites that use NIS use the host table as input to the NIS host database.  "
7270 "Even though NIS can be used with DNS, most NIS sites still use the host "
7271 "table with an entry for all local hosts as a backup."
7272 msgstr ""
7273
7274 #. type: TP
7275 #: build/C/man5/hosts.5:79
7276 #, no-wrap
7277 msgid "B<isolated nodes>"
7278 msgstr ""
7279
7280 #. type: Plain text
7281 #: build/C/man5/hosts.5:86
7282 msgid ""
7283 "Very small sites that are isolated from the network use the host table "
7284 "instead of DNS.  If the local information rarely changes, and the network is "
7285 "not connected to the Internet, DNS offers little advantage."
7286 msgstr ""
7287
7288 #. type: Plain text
7289 #: build/C/man5/hosts.5:91
7290 msgid ""
7291 "Modifications to this file normally take effect immediately, except in cases "
7292 "where the file is cached by applications."
7293 msgstr ""
7294
7295 #. type: SS
7296 #: build/C/man5/hosts.5:91
7297 #, no-wrap
7298 msgid "Historical notes"
7299 msgstr ""
7300
7301 #. type: Plain text
7302 #: build/C/man5/hosts.5:94
7303 msgid ""
7304 "RFC\\ 952 gave the original format for the host table, though it has since "
7305 "changed."
7306 msgstr ""
7307
7308 #. type: Plain text
7309 #: build/C/man5/hosts.5:107
7310 msgid ""
7311 "Before the advent of DNS, the host table was the only way of resolving "
7312 "hostnames on the fledgling Internet.  Indeed, this file could be created "
7313 "from the official host data base maintained at the Network Information "
7314 "Control Center (NIC), though local changes were often required to bring it "
7315 "up to date regarding unofficial aliases and/or unknown hosts.  The NIC no "
7316 "longer maintains the hosts.txt files, though looking around at the time of "
7317 "writing (circa 2000), there are historical hosts.txt files on the WWW.  I "
7318 "just found three, from 92, 94, and 95."
7319 msgstr ""
7320
7321 #. type: Plain text
7322 #: build/C/man5/hosts.5:114
7323 #, no-wrap
7324 msgid ""
7325 "127.0.0.1       localhost\n"
7326 "192.168.1.10    foo.mydomain.org       foo\n"
7327 "192.168.1.13    bar.mydomain.org       bar\n"
7328 "146.82.138.7    master.debian.org      master\n"
7329 "209.237.226.90  www.opensource.org\n"
7330 msgstr ""
7331
7332 #. type: Plain text
7333 #: build/C/man5/hosts.5:121
7334 msgid "B<hostname>(1), B<resolver>(3), B<resolver>(5), B<hostname>(7), B<named>(8)"
7335 msgstr ""
7336
7337 #.  .SH AUTHOR
7338 #.  This manual page was written by Manoj Srivastava <srivasta@debian.org>,
7339 #.  for the Debian GNU/Linux system.
7340 #. type: Plain text
7341 #: build/C/man5/hosts.5:126
7342 msgid "Internet RFC\\ 952"
7343 msgstr ""
7344
7345 #. type: TH
7346 #: build/C/man5/hosts.equiv.5:6
7347 #, no-wrap
7348 msgid "HOSTS.EQUIV"
7349 msgstr ""
7350
7351 #. type: TH
7352 #: build/C/man5/hosts.equiv.5:6
7353 #, no-wrap
7354 msgid "2003-08-24"
7355 msgstr ""
7356
7357 #. type: Plain text
7358 #: build/C/man5/hosts.equiv.5:11
7359 msgid ""
7360 "/etc/hosts.equiv - list of hosts and users that are granted \"trusted\" B<r> "
7361 "command access to your system"
7362 msgstr ""
7363
7364 #. type: Plain text
7365 #: build/C/man5/hosts.equiv.5:22
7366 msgid ""
7367 "The B<hosts.equiv> file allows or denies hosts and users to use the "
7368 "B<r>-commands (e.g., B<rlogin>, B<rsh>, or B<rcp>)  without supplying a "
7369 "password."
7370 msgstr ""
7371
7372 #. type: Plain text
7373 #: build/C/man5/hosts.equiv.5:24
7374 msgid "The file uses the following format:"
7375 msgstr ""
7376
7377 #. type: TP
7378 #: build/C/man5/hosts.equiv.5:24
7379 #, no-wrap
7380 msgid "I<[ + | - ]> I<[hostname]> I<[username]>"
7381 msgstr ""
7382
7383 #. type: Plain text
7384 #: build/C/man5/hosts.equiv.5:43
7385 msgid ""
7386 "The I<hostname> is the name of a host which is logically equivalent to the "
7387 "local host.  Users logged into that host are allowed to access like-named "
7388 "user accounts on the local host without supplying a password.  The "
7389 "I<hostname> may be (optionally) preceded by a plus (+) sign.  If the plus "
7390 "sign is used alone, it allows any host to access your system.  You can "
7391 "explicitly deny access to a host by preceding the I<hostname> by a minus (-) "
7392 "sign.  Users from that host must always supply a password.  For security "
7393 "reasons you should always use the FQDN of the hostname and not the short "
7394 "hostname."
7395 msgstr ""
7396
7397 #. type: Plain text
7398 #: build/C/man5/hosts.equiv.5:61
7399 msgid ""
7400 "The I<username> entry grants a specific user access to all user accounts "
7401 "(except root) without supplying a password.  That means the user is NOT "
7402 "restricted to like-named accounts.  The I<username> may be (optionally) "
7403 "preceded by a plus (+) sign.  You can also explicitly deny access to a "
7404 "specific user by preceding the I<username> with a minus (-) sign.  This says "
7405 "that the user is not trusted no matter what other entries for that host "
7406 "exist."
7407 msgstr ""
7408
7409 #. type: Plain text
7410 #: build/C/man5/hosts.equiv.5:63
7411 msgid "Netgroups can be specified by preceding the netgroup by an @ sign."
7412 msgstr ""
7413
7414 #. type: Plain text
7415 #: build/C/man5/hosts.equiv.5:69
7416 msgid ""
7417 "Be extremely careful when using the plus (+) sign.  A simple typographical "
7418 "error could result in a standalone plus sign.  A standalone plus sign is a "
7419 "wildcard character that means \"any host\"!"
7420 msgstr ""
7421
7422 #. type: Plain text
7423 #: build/C/man5/hosts.equiv.5:71
7424 msgid "I</etc/hosts.equiv>"
7425 msgstr ""
7426
7427 #. type: Plain text
7428 #: build/C/man5/hosts.equiv.5:76
7429 msgid ""
7430 "Some systems will honor the contents of this file only when it has owner "
7431 "root and no write permission for anybody else.  Some exceptionally paranoid "
7432 "systems even require that there be no other hard links to the file."
7433 msgstr ""
7434
7435 #. type: Plain text
7436 #: build/C/man5/hosts.equiv.5:84
7437 msgid ""
7438 "Modern systems use the Pluggable Authentication Modules library (PAM).  With "
7439 "PAM a standalone plus sign is considered a wildcard character which means "
7440 "\"any host\" only when the word I<promiscuous> is added to the auth "
7441 "component line in your PAM file for the particular service (e.g., "
7442 "B<rlogin>)."
7443 msgstr ""
7444
7445 #. type: Plain text
7446 #: build/C/man5/hosts.equiv.5:88
7447 msgid "B<rhosts>(5), B<rlogind>(8), B<rshd>(8)"
7448 msgstr ""
7449
7450 #. type: TH
7451 #: build/C/man7/icmp.7:12
7452 #, no-wrap
7453 msgid "ICMP"
7454 msgstr ""
7455
7456 #. type: TH
7457 #: build/C/man7/icmp.7:12 build/C/man8/nscd.8:23 build/C/man7/raw.7:13
7458 #, no-wrap
7459 msgid "2012-05-10"
7460 msgstr ""
7461
7462 #. type: Plain text
7463 #: build/C/man7/icmp.7:15
7464 msgid "icmp - Linux IPv4 ICMP kernel module."
7465 msgstr ""
7466
7467 #. type: Plain text
7468 #: build/C/man7/icmp.7:23
7469 msgid ""
7470 "This kernel protocol module implements the Internet Control Message Protocol "
7471 "defined in RFC\\ 792.  It is used to signal error conditions and for "
7472 "diagnosis.  The user doesn't interact directly with this module; instead it "
7473 "communicates with the other protocols in the kernel and these pass the ICMP "
7474 "errors to the application layers.  The kernel ICMP module also answers ICMP "
7475 "requests."
7476 msgstr ""
7477
7478 #. type: Plain text
7479 #: build/C/man7/icmp.7:35
7480 msgid ""
7481 "A user protocol may receive ICMP packets for all local sockets by opening a "
7482 "raw socket with the protocol B<IPPROTO_ICMP>.  See B<raw>(7)  for more "
7483 "information.  The types of ICMP packets passed to the socket can be filtered "
7484 "using the B<ICMP_FILTER> socket option.  ICMP packets are always processed "
7485 "by the kernel too, even when passed to a user socket."
7486 msgstr ""
7487
7488 #. type: Plain text
7489 #: build/C/man7/icmp.7:41
7490 msgid ""
7491 "Linux limits the rate of ICMP error packets to each destination.  "
7492 "B<ICMP_REDIRECT> and B<ICMP_DEST_UNREACH> are also limited by the "
7493 "destination route of the incoming packets."
7494 msgstr ""
7495
7496 #.  FIXME . better description needed
7497 #. type: Plain text
7498 #: build/C/man7/icmp.7:54
7499 msgid ""
7500 "ICMP supports a set of I</proc> interfaces to configure some global IP "
7501 "parameters.  The parameters can be accessed by reading or writing files in "
7502 "the directory I</proc/sys/net/ipv4/>.  Most of these parameters are rate "
7503 "limitations for specific ICMP types.  Linux 2.2 uses a token bucket filter "
7504 "to limit ICMPs.  The value is the timeout in jiffies until the token bucket "
7505 "filter is cleared after a burst.  A jiffy is a system dependent unit, "
7506 "usually 10ms on i386 and about 1ms on alpha and ia64."
7507 msgstr ""
7508
7509 #. type: TP
7510 #: build/C/man7/icmp.7:54
7511 #, no-wrap
7512 msgid "I<icmp_destunreach_rate> (Linux 2.2 to 2.4.9)"
7513 msgstr ""
7514
7515 #.  Precisely: from 2.1.102
7516 #. type: Plain text
7517 #: build/C/man7/icmp.7:63
7518 msgid ""
7519 "Maximum rate to send ICMP Destination Unreachable packets.  This limits the "
7520 "rate at which packets are sent to any individual route or destination.  The "
7521 "limit does not affect sending of B<ICMP_FRAG_NEEDED> packets needed for path "
7522 "MTU discovery."
7523 msgstr ""
7524
7525 #. type: TP
7526 #: build/C/man7/icmp.7:63
7527 #, no-wrap
7528 msgid "I<icmp_echo_ignore_all> (since Linux 2.2)"
7529 msgstr ""
7530
7531 #.  Precisely: 2.1.68
7532 #. type: Plain text
7533 #: build/C/man7/icmp.7:69
7534 msgid "If this value is nonzero, Linux will ignore all B<ICMP_ECHO> requests."
7535 msgstr ""
7536
7537 #. type: TP
7538 #: build/C/man7/icmp.7:69
7539 #, no-wrap
7540 msgid "I<icmp_echo_ignore_broadcasts> (since Linux 2.2)"
7541 msgstr ""
7542
7543 #.  Precisely: from 2.1.68
7544 #. type: Plain text
7545 #: build/C/man7/icmp.7:75
7546 msgid ""
7547 "If this value is nonzero, Linux will ignore all B<ICMP_ECHO> packets sent to "
7548 "broadcast addresses."
7549 msgstr ""
7550
7551 #. type: TP
7552 #: build/C/man7/icmp.7:75
7553 #, no-wrap
7554 msgid "I<icmp_echoreply_rate> (Linux 2.2 to 2.4.9)"
7555 msgstr ""
7556
7557 #.  Precisely: from 2.1.102
7558 #. type: Plain text
7559 #: build/C/man7/icmp.7:83
7560 msgid ""
7561 "Maximum rate for sending B<ICMP_ECHOREPLY> packets in response to "
7562 "B<ICMP_ECHOREQUEST> packets."
7563 msgstr ""
7564
7565 #. type: TP
7566 #: build/C/man7/icmp.7:83
7567 #, no-wrap
7568 msgid ""
7569 "I<icmp_errors_use_inbound_ifaddr> (Boolean; default: disabled; since Linux "
7570 "2.6.12)"
7571 msgstr ""
7572
7573 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7574 #. type: Plain text
7575 #: build/C/man7/icmp.7:88
7576 msgid ""
7577 "If disabled, ICMP error messages are sent with the primary address of the "
7578 "exiting interface."
7579 msgstr ""
7580
7581 #. type: Plain text
7582 #: build/C/man7/icmp.7:94
7583 msgid ""
7584 "If enabled, the message will be sent with the primary address of the "
7585 "interface that received the packet that caused the ICMP error.  This is the "
7586 "behavior that many network administrators will expect from a router.  And it "
7587 "can make debugging complicated network layouts much easier."
7588 msgstr ""
7589
7590 #. type: Plain text
7591 #: build/C/man7/icmp.7:98
7592 msgid ""
7593 "Note that if no primary address exists for the interface selected, then the "
7594 "primary address of the first non-loopback interface that has one will be "
7595 "used regardless of this setting."
7596 msgstr ""
7597
7598 #. type: TP
7599 #: build/C/man7/icmp.7:98
7600 #, no-wrap
7601 msgid ""
7602 "I<icmp_ignore_bogus_error_responses> (Boolean; default: disabled; since "
7603 "Linux 2.2)"
7604 msgstr ""
7605
7606 #.  precisely: since 2.1.32
7607 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7608 #. type: Plain text
7609 #: build/C/man7/icmp.7:106
7610 msgid ""
7611 "Some routers violate RFC1122 by sending bogus responses to broadcast "
7612 "frames.  Such violations are normally logged via a kernel warning.  If this "
7613 "parameter is enabled, the kernel will not give such warnings, which will "
7614 "avoid log file clutter."
7615 msgstr ""
7616
7617 #. type: TP
7618 #: build/C/man7/icmp.7:106
7619 #, no-wrap
7620 msgid "I<icmp_paramprob_rate> (Linux 2.2 to 2.4.9)"
7621 msgstr ""
7622
7623 #.  Precisely: from 2.1.102
7624 #. type: Plain text
7625 #: build/C/man7/icmp.7:113
7626 msgid ""
7627 "Maximum rate for sending B<ICMP_PARAMETERPROB> packets.  These packets are "
7628 "sent when a packet arrives with an invalid IP header."
7629 msgstr ""
7630
7631 #. type: TP
7632 #: build/C/man7/icmp.7:113
7633 #, no-wrap
7634 msgid "I<icmp_ratelimit> (integer; default: 1000; since Linux 2.4.10)"
7635 msgstr ""
7636
7637 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7638 #. type: Plain text
7639 #: build/C/man7/icmp.7:121
7640 msgid ""
7641 "Limit the maximum rates for sending ICMP packets whose type matches "
7642 "I<icmp_ratemask> (see below) to specific targets.  0 to disable any "
7643 "limiting, otherwise the minimum space between responses in milliseconds."
7644 msgstr ""
7645
7646 #. type: TP
7647 #: build/C/man7/icmp.7:121
7648 #, no-wrap
7649 msgid "I<icmp_ratemask> (integer; default: see below; since Linux 2.4.10)"
7650 msgstr ""
7651
7652 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7653 #. type: Plain text
7654 #: build/C/man7/icmp.7:125
7655 msgid "Mask made of ICMP types for which rates are being limited."
7656 msgstr ""
7657
7658 #. type: Plain text
7659 #: build/C/man7/icmp.7:127
7660 msgid "Significant bits: IHGFEDCBA9876543210"
7661 msgstr ""
7662
7663 #. type: Plain text
7664 #: build/C/man7/icmp.7:129
7665 msgid "Default mask: 0000001100000011000 (0x1818)"
7666 msgstr ""
7667
7668 #. type: Plain text
7669 #: build/C/man7/icmp.7:132
7670 msgid "Bit definitions (see the Linux kernel source file I<include/linux/icmp.h>):"
7671 msgstr ""
7672
7673 #. type: tbl table
7674 #: build/C/man7/icmp.7:136
7675 #, no-wrap
7676 msgid "0 Echo Reply\n"
7677 msgstr ""
7678
7679 #. type: tbl table
7680 #: build/C/man7/icmp.7:137
7681 #, no-wrap
7682 msgid "3 Destination Unreachable *\n"
7683 msgstr ""
7684
7685 #. type: tbl table
7686 #: build/C/man7/icmp.7:138
7687 #, no-wrap
7688 msgid "4 Source Quench *\n"
7689 msgstr ""
7690
7691 #. type: tbl table
7692 #: build/C/man7/icmp.7:139
7693 #, no-wrap
7694 msgid "5 Redirect\n"
7695 msgstr ""
7696
7697 #. type: tbl table
7698 #: build/C/man7/icmp.7:140
7699 #, no-wrap
7700 msgid "8 Echo Request\n"
7701 msgstr ""
7702
7703 #. type: tbl table
7704 #: build/C/man7/icmp.7:141
7705 #, no-wrap
7706 msgid "B Time Exceeded *\n"
7707 msgstr ""
7708
7709 #. type: tbl table
7710 #: build/C/man7/icmp.7:142
7711 #, no-wrap
7712 msgid "C Parameter Problem *\n"
7713 msgstr ""
7714
7715 #. type: tbl table
7716 #: build/C/man7/icmp.7:143
7717 #, no-wrap
7718 msgid "D Timestamp Request\n"
7719 msgstr ""
7720
7721 #. type: tbl table
7722 #: build/C/man7/icmp.7:144
7723 #, no-wrap
7724 msgid "E Timestamp Reply\n"
7725 msgstr ""
7726
7727 #. type: tbl table
7728 #: build/C/man7/icmp.7:145
7729 #, no-wrap
7730 msgid "F Info Request\n"
7731 msgstr ""
7732
7733 #. type: tbl table
7734 #: build/C/man7/icmp.7:146
7735 #, no-wrap
7736 msgid "G Info Reply\n"
7737 msgstr ""
7738
7739 #. type: tbl table
7740 #: build/C/man7/icmp.7:147
7741 #, no-wrap
7742 msgid "H Address Mask Request\n"
7743 msgstr ""
7744
7745 #. type: tbl table
7746 #: build/C/man7/icmp.7:148
7747 #, no-wrap
7748 msgid "I Address Mask Reply\n"
7749 msgstr ""
7750
7751 #. type: Plain text
7752 #: build/C/man7/icmp.7:154
7753 msgid ""
7754 "The bits marked with an asterisk are rate limited by default (see the "
7755 "default mask above)."
7756 msgstr ""
7757
7758 #. type: TP
7759 #: build/C/man7/icmp.7:154
7760 #, no-wrap
7761 msgid "I<icmp_timeexceed_rate> (Linux 2.2 to 2.4.9)"
7762 msgstr ""
7763
7764 #. type: Plain text
7765 #: build/C/man7/icmp.7:161
7766 msgid ""
7767 "Maximum rate for sending B<ICMP_TIME_EXCEEDED> packets.  These packets are "
7768 "sent to prevent loops when a packet has crossed too many hops."
7769 msgstr ""
7770
7771 #. type: Plain text
7772 #: build/C/man7/icmp.7:165
7773 msgid "Support for the B<ICMP_ADDRESS> request was removed in 2.2."
7774 msgstr ""
7775
7776 #. type: Plain text
7777 #: build/C/man7/icmp.7:169
7778 msgid "Support for B<ICMP_SOURCE_QUENCH> was removed in Linux 2.2."
7779 msgstr ""
7780
7781 #.  not really true ATM
7782 #.  .PP
7783 #.  Linux ICMP should be compliant to RFC 1122.
7784 #. type: Plain text
7785 #: build/C/man7/icmp.7:177
7786 msgid ""
7787 "As many other implementations don't support B<IPPROTO_ICMP> raw sockets, "
7788 "this feature should not be relied on in portable programs."
7789 msgstr ""
7790
7791 #. type: Plain text
7792 #: build/C/man7/icmp.7:182
7793 msgid ""
7794 "B<ICMP_REDIRECT> packets are not sent when Linux is not acting as a router.  "
7795 "They are also accepted only from the old gateway defined in the routing "
7796 "table and the redirect routes are expired after some time."
7797 msgstr ""
7798
7799 #. type: Plain text
7800 #: build/C/man7/icmp.7:186
7801 msgid ""
7802 "The 64-bit timestamp returned by B<ICMP_TIMESTAMP> is in milliseconds since "
7803 "the Epoch, 1970-01-01 00:00:00 +0000 (UTC)."
7804 msgstr ""
7805
7806 #. type: Plain text
7807 #: build/C/man7/icmp.7:191
7808 msgid ""
7809 "Linux ICMP internally uses a raw socket to send ICMPs.  This raw socket may "
7810 "appear in B<netstat>(8)  output with a zero inode."
7811 msgstr ""
7812
7813 #. type: Plain text
7814 #: build/C/man7/icmp.7:193
7815 msgid "B<ip>(7)"
7816 msgstr ""
7817
7818 #. type: Plain text
7819 #: build/C/man7/icmp.7:195
7820 msgid "RFC\\ 792 for a description of the ICMP protocol."
7821 msgstr ""
7822
7823 #. type: TH
7824 #: build/C/man3/inet.3:42
7825 #, no-wrap
7826 msgid "INET"
7827 msgstr ""
7828
7829 #. type: Plain text
7830 #: build/C/man3/inet.3:46
7831 msgid ""
7832 "inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, "
7833 "inet_netof - Internet address manipulation routines"
7834 msgstr ""
7835
7836 #. type: Plain text
7837 #: build/C/man3/inet.3:51
7838 #, no-wrap
7839 msgid ""
7840 "B<#include E<lt>sys/socket.hE<gt>>\n"
7841 "B<#include E<lt>netinet/in.hE<gt>>\n"
7842 "B<#include E<lt>arpa/inet.hE<gt>>\n"
7843 msgstr ""
7844
7845 #. type: Plain text
7846 #: build/C/man3/inet.3:53
7847 #, no-wrap
7848 msgid "B<int inet_aton(const char *>I<cp>B<, struct in_addr *>I<inp>B<);>\n"
7849 msgstr ""
7850
7851 #. type: Plain text
7852 #: build/C/man3/inet.3:55
7853 #, no-wrap
7854 msgid "B<in_addr_t inet_addr(const char *>I<cp>B<);>\n"
7855 msgstr ""
7856
7857 #. type: Plain text
7858 #: build/C/man3/inet.3:57
7859 #, no-wrap
7860 msgid "B<in_addr_t inet_network(const char *>I<cp>B<);>\n"
7861 msgstr ""
7862
7863 #. type: Plain text
7864 #: build/C/man3/inet.3:59
7865 #, no-wrap
7866 msgid "B<char *inet_ntoa(struct in_addr >I<in>B<);>\n"
7867 msgstr ""
7868
7869 #. type: Plain text
7870 #: build/C/man3/inet.3:61
7871 #, no-wrap
7872 msgid ""
7873 "B<struct in_addr inet_makeaddr(in_addr_t >I<net>B<, in_addr_t "
7874 ">I<host>B<);>\n"
7875 msgstr ""
7876
7877 #. type: Plain text
7878 #: build/C/man3/inet.3:63
7879 #, no-wrap
7880 msgid "B<in_addr_t inet_lnaof(struct in_addr >I<in>B<);>\n"
7881 msgstr ""
7882
7883 #. type: Plain text
7884 #: build/C/man3/inet.3:65
7885 #, no-wrap
7886 msgid "B<in_addr_t inet_netof(struct in_addr >I<in>B<);>\n"
7887 msgstr ""
7888
7889 #. type: Plain text
7890 #: build/C/man3/inet.3:75
7891 msgid "B<inet_aton>(), B<inet_ntoa>(): _BSD_SOURCE || _SVID_SOURCE"
7892 msgstr ""
7893
7894 #. type: Plain text
7895 #: build/C/man3/inet.3:85
7896 msgid ""
7897 "B<inet_aton>()  converts the Internet host address I<cp> from the IPv4 "
7898 "numbers-and-dots notation into binary form (in network byte order)  and "
7899 "stores it in the structure that I<inp> points to.  B<inet_aton>()  returns "
7900 "nonzero if the address is valid, zero if not.  The address supplied in I<cp> "
7901 "can have one of the following forms:"
7902 msgstr ""
7903
7904 #. type: TP
7905 #: build/C/man3/inet.3:85
7906 #, no-wrap
7907 msgid "I<a.b.c.d>"
7908 msgstr ""
7909
7910 #. type: Plain text
7911 #: build/C/man3/inet.3:89
7912 msgid ""
7913 "Each of the four numeric parts specifies a byte of the address; the bytes "
7914 "are assigned in left-to-right order to produce the binary address."
7915 msgstr ""
7916
7917 #. type: TP
7918 #: build/C/man3/inet.3:89
7919 #, no-wrap
7920 msgid "I<a.b.c>"
7921 msgstr ""
7922
7923 #. type: Plain text
7924 #: build/C/man3/inet.3:102
7925 msgid ""
7926 "Parts I<a> and I<b> specify the first two bytes of the binary address.  Part "
7927 "I<c> is interpreted as a 16-bit value that defines the rightmost two bytes "
7928 "of the binary address.  This notation is suitable for specifying (outmoded) "
7929 "Class B network addresses."
7930 msgstr ""
7931
7932 #. type: TP
7933 #: build/C/man3/inet.3:102
7934 #, no-wrap
7935 msgid "I<a.b>"
7936 msgstr ""
7937
7938 #. type: Plain text
7939 #: build/C/man3/inet.3:113
7940 msgid ""
7941 "Part I<a> specifies the first byte of the binary address.  Part I<b> is "
7942 "interpreted as a 24-bit value that defines the rightmost three bytes of the "
7943 "binary address.  This notation is suitable for specifying (outmoded) Class A "
7944 "network addresses."
7945 msgstr ""
7946
7947 #. type: TP
7948 #: build/C/man3/inet.3:113
7949 #, no-wrap
7950 msgid "I<a>"
7951 msgstr ""
7952
7953 #. type: Plain text
7954 #: build/C/man3/inet.3:119
7955 msgid ""
7956 "The value I<a> is interpreted as a 32-bit value that is stored directly into "
7957 "the binary address without any byte rearrangement."
7958 msgstr ""
7959
7960 #. type: Plain text
7961 #: build/C/man3/inet.3:132
7962 msgid ""
7963 "In all of the above forms, components of the dotted address can be specified "
7964 "in decimal, octal (with a leading I<0>), or hexadecimal, with a leading "
7965 "I<0X>).  Addresses in any of these forms are collectively termed I<IPV4 "
7966 "numbers-and-dots notation>.  The form that uses exactly four decimal numbers "
7967 "is referred to as I<IPv4 dotted-decimal notation> (or sometimes: I<IPv4 "
7968 "dotted-quad notation>)."
7969 msgstr ""
7970
7971 #. type: Plain text
7972 #: build/C/man3/inet.3:140
7973 msgid ""
7974 "B<inet_aton>()  returns 1 if the supplied string was successfully "
7975 "interpreted, or 0 if the string is invalid (B<errno> is I<not> set on "
7976 "error)."
7977 msgstr ""
7978
7979 #. type: Plain text
7980 #: build/C/man3/inet.3:157
7981 msgid ""
7982 "The B<inet_addr>()  function converts the Internet host address I<cp> from "
7983 "IPv4 numbers-and-dots notation into binary data in network byte order.  If "
7984 "the input is invalid, B<INADDR_NONE> (usually -1) is returned.  Use of this "
7985 "function is problematic because -1 is a valid address (255.255.255.255).  "
7986 "Avoid its use in favor of B<inet_aton>(), B<inet_pton>(3), or "
7987 "B<getaddrinfo>(3), which provide a cleaner way to indicate error return."
7988 msgstr ""
7989
7990 #. type: Plain text
7991 #: build/C/man3/inet.3:167
7992 msgid ""
7993 "The B<inet_network>()  function converts I<cp>, a string in IPv4 "
7994 "numbers-and-dots notation, into a number in host byte order suitable for use "
7995 "as an Internet network address.  On success, the converted address is "
7996 "returned.  If the input is invalid, -1 is returned."
7997 msgstr ""
7998
7999 #. type: Plain text
8000 #: build/C/man3/inet.3:175
8001 msgid ""
8002 "The B<inet_ntoa>()  function converts the Internet host address I<in>, given "
8003 "in network byte order, to a string in IPv4 dotted-decimal notation.  The "
8004 "string is returned in a statically allocated buffer, which subsequent calls "
8005 "will overwrite."
8006 msgstr ""
8007
8008 #. type: Plain text
8009 #: build/C/man3/inet.3:181
8010 msgid ""
8011 "The B<inet_lnaof>()  function returns the local network address part of the "
8012 "Internet address I<in>.  The returned value is in host byte order."
8013 msgstr ""
8014
8015 #. type: Plain text
8016 #: build/C/man3/inet.3:187
8017 msgid ""
8018 "The B<inet_netof>()  function returns the network number part of the "
8019 "Internet address I<in>.  The returned value is in host byte order."
8020 msgstr ""
8021
8022 #. type: Plain text
8023 #: build/C/man3/inet.3:198
8024 msgid ""
8025 "The B<inet_makeaddr>()  function is the converse of B<inet_netof>()  and "
8026 "B<inet_lnaof>().  It returns an Internet host address in network byte order, "
8027 "created by combining the network number I<net> with the local address "
8028 "I<host>, both in host byte order."
8029 msgstr ""
8030
8031 #. type: Plain text
8032 #: build/C/man3/inet.3:208
8033 msgid ""
8034 "The structure I<in_addr> as used in B<inet_ntoa>(), B<inet_makeaddr>(), "
8035 "B<inet_lnaof>()  and B<inet_netof>()  is defined in "
8036 "I<E<lt>netinet/in.hE<gt>> as:"
8037 msgstr ""
8038
8039 #. type: Plain text
8040 #: build/C/man3/inet.3:212
8041 #, no-wrap
8042 msgid "typedef uint32_t in_addr_t;\n"
8043 msgstr ""
8044
8045 #. type: Plain text
8046 #: build/C/man3/inet.3:216
8047 #, no-wrap
8048 msgid ""
8049 "struct in_addr {\n"
8050 "    in_addr_t s_addr;\n"
8051 "};\n"
8052 msgstr ""
8053
8054 #. type: Plain text
8055 #: build/C/man3/inet.3:226
8056 msgid ""
8057 "4.3BSD.  B<inet_addr>()  and B<inet_ntoa>()  are specified in POSIX.1-2001.  "
8058 "B<inet_aton>()  is not specified in POSIX.1-2001, but is available on most "
8059 "systems."
8060 msgstr ""
8061
8062 #. type: Plain text
8063 #: build/C/man3/inet.3:230
8064 msgid ""
8065 "On the i386 the host byte order is Least Significant Byte first (little "
8066 "endian), whereas the network byte order, as used on the Internet, is Most "
8067 "Significant Byte first (big endian)."
8068 msgstr ""
8069
8070 #. type: Plain text
8071 #: build/C/man3/inet.3:239
8072 msgid ""
8073 "B<inet_lnaof>(), B<inet_netof>(), and B<inet_makeaddr>()  are legacy "
8074 "functions that assume they are dealing with I<classful network addresses>.  "
8075 "Classful networking divides IPv4 network addresses into host and network "
8076 "components at byte boundaries, as follows:"
8077 msgstr ""
8078
8079 #. type: TP
8080 #: build/C/man3/inet.3:239
8081 #, no-wrap
8082 msgid "Class A"
8083 msgstr ""
8084
8085 #. type: Plain text
8086 #: build/C/man3/inet.3:245
8087 msgid ""
8088 "This address type is indicated by the value 0 in the most significant bit of "
8089 "the (network byte ordered) address.  The network address is contained in the "
8090 "most significant byte, and the host address occupies the remaining three "
8091 "bytes."
8092 msgstr ""
8093
8094 #. type: TP
8095 #: build/C/man3/inet.3:245
8096 #, no-wrap
8097 msgid "Class B"
8098 msgstr ""
8099
8100 #. type: Plain text
8101 #: build/C/man3/inet.3:251
8102 msgid ""
8103 "This address type is indicated by the binary value 10 in the most "
8104 "significant two bits of the address.  The network address is contained in "
8105 "the two most significant bytes, and the host address occupies the remaining "
8106 "two bytes."
8107 msgstr ""
8108
8109 #. type: TP
8110 #: build/C/man3/inet.3:251
8111 #, no-wrap
8112 msgid "Class C"
8113 msgstr ""
8114
8115 #. type: Plain text
8116 #: build/C/man3/inet.3:257
8117 msgid ""
8118 "This address type is indicated by the binary value 110 in the most "
8119 "significant three bits of the address.  The network address is contained in "
8120 "the three most significant bytes, and the host address occupies the "
8121 "remaining byte."
8122 msgstr ""
8123
8124 #. type: Plain text
8125 #: build/C/man3/inet.3:262
8126 msgid ""
8127 "Classful network addresses are now obsolete, having been superseded by "
8128 "Classless Inter-Domain Routing (CIDR), which divides addresses into network "
8129 "and host components at arbitrary bit (rather than byte) boundaries."
8130 msgstr ""
8131
8132 #. type: Plain text
8133 #: build/C/man3/inet.3:269
8134 msgid ""
8135 "An example of the use of B<inet_aton>()  and B<inet_ntoa>()  is shown "
8136 "below.  Here are some example runs:"
8137 msgstr ""
8138
8139 #. type: Plain text
8140 #: build/C/man3/inet.3:276
8141 #, no-wrap
8142 msgid ""
8143 "$B< ./a.out 226.000.000.037>      # Last byte is in octal\n"
8144 "226.0.0.31\n"
8145 "$B< ./a.out 0x7f.1         >      # First byte is in hex\n"
8146 "127.0.0.1\n"
8147 msgstr ""
8148
8149 #. type: Plain text
8150 #: build/C/man3/inet.3:285
8151 #, no-wrap
8152 msgid ""
8153 "#define _BSD_SOURCE\n"
8154 "#include E<lt>arpa/inet.hE<gt>\n"
8155 "#include E<lt>stdio.hE<gt>\n"
8156 "#include E<lt>stdlib.hE<gt>\n"
8157 msgstr ""
8158
8159 #. type: Plain text
8160 #: build/C/man3/inet.3:290
8161 #, no-wrap
8162 msgid ""
8163 "int\n"
8164 "main(int argc, char *argv[])\n"
8165 "{\n"
8166 "    struct in_addr addr;\n"
8167 msgstr ""
8168
8169 #. type: Plain text
8170 #: build/C/man3/inet.3:295
8171 #, no-wrap
8172 msgid ""
8173 "    if (argc != 2) {\n"
8174 "        fprintf(stderr, \"%s E<lt>dotted-addressE<gt>\\en\", argv[0]);\n"
8175 "        exit(EXIT_FAILURE);\n"
8176 "    }\n"
8177 msgstr ""
8178
8179 #. type: Plain text
8180 #: build/C/man3/inet.3:300
8181 #, no-wrap
8182 msgid ""
8183 "    if (inet_aton(argv[1], &addr) == 0) {\n"
8184 "        fprintf(stderr, \"Invalid address\\en\");\n"
8185 "        exit(EXIT_FAILURE);\n"
8186 "    }\n"
8187 msgstr ""
8188
8189 #. type: Plain text
8190 #: build/C/man3/inet.3:304
8191 #, no-wrap
8192 msgid ""
8193 "    printf(\"%s\\en\", inet_ntoa(addr));\n"
8194 "    exit(EXIT_SUCCESS);\n"
8195 "}\n"
8196 msgstr ""
8197
8198 #. type: Plain text
8199 #: build/C/man3/inet.3:316
8200 msgid ""
8201 "B<byteorder>(3), B<getaddrinfo>(3), B<gethostbyname>(3), B<getnameinfo>(3), "
8202 "B<getnetent>(3), B<inet_net_pton>(3), B<inet_ntop>(3), B<inet_pton>(3), "
8203 "B<hosts>(5), B<networks>(5)"
8204 msgstr ""
8205
8206 #. type: TH
8207 #: build/C/man3/inet_net_pton.3:26
8208 #, no-wrap
8209 msgid "INET_NET_PTON"
8210 msgstr ""
8211
8212 #. type: Plain text
8213 #: build/C/man3/inet_net_pton.3:29
8214 msgid "inet_net_pton, inet_net_ntop - Internet network number conversion"
8215 msgstr ""
8216
8217 #. type: Plain text
8218 #: build/C/man3/inet_net_pton.3:35
8219 #, no-wrap
8220 msgid ""
8221 "B<int inet_net_pton(int >I<af>B<, const char *>I<pres>B<,>\n"
8222 "B<                  void *>I<netp>B<, size_t >I<nsize>B<);>\n"
8223 msgstr ""
8224
8225 #. type: Plain text
8226 #: build/C/man3/inet_net_pton.3:38
8227 #, no-wrap
8228 msgid ""
8229 "B<char *inet_net_ntop(int >I<af>B<, const void *>I<netp>B<, int "
8230 ">I<bits>B<,>\n"
8231 "B<                    char *>I<pres>B<, size_t >I<psize>B<);>\n"
8232 msgstr ""
8233
8234 #. type: Plain text
8235 #: build/C/man3/inet_net_pton.3:41 build/C/man3/resolver.3:85
8236 msgid "Link with I<-lresolv>."
8237 msgstr ""
8238
8239 #. type: Plain text
8240 #: build/C/man3/inet_net_pton.3:49
8241 msgid "B<inet_net_pton>(), B<inet_net_ntop>():"
8242 msgstr ""
8243
8244 #. type: TP
8245 #: build/C/man3/inet_net_pton.3:52
8246 #, no-wrap
8247 msgid "Since glibc 2.20:"
8248 msgstr ""
8249
8250 #. type: Plain text
8251 #: build/C/man3/inet_net_pton.3:55
8252 msgid "_DEFAULT_SOURCE"
8253 msgstr ""
8254
8255 #. type: TP
8256 #: build/C/man3/inet_net_pton.3:55
8257 #, no-wrap
8258 msgid "Before glibc 2.20:"
8259 msgstr ""
8260
8261 #. type: Plain text
8262 #: build/C/man3/inet_net_pton.3:64
8263 msgid ""
8264 "These functions convert network numbers between presentation (i.e., "
8265 "printable) format and network (i.e., binary) format."
8266 msgstr ""
8267
8268 #. type: Plain text
8269 #: build/C/man3/inet_net_pton.3:70
8270 msgid ""
8271 "For both functions, I<af> specifies the address family for the conversion; "
8272 "the only supported value is B<AF_INET>."
8273 msgstr ""
8274
8275 #. type: SS
8276 #: build/C/man3/inet_net_pton.3:70
8277 #, no-wrap
8278 msgid "inet_net_pton()"
8279 msgstr ""
8280
8281 #. type: Plain text
8282 #: build/C/man3/inet_net_pton.3:89
8283 msgid ""
8284 "The B<inet_net_pton>()  function converts I<pres>, a null-terminated string "
8285 "containing an Internet network number in presentation format to network "
8286 "format.  The result of the conversion, which is in network byte order, is "
8287 "placed in the buffer pointed to by I<net>.  (The I<netp> argument typically "
8288 "points to an I<in_addr> structure.)  The I<nsize> argument specifies the "
8289 "number of bytes available in I<netp>."
8290 msgstr ""
8291
8292 #. type: Plain text
8293 #: build/C/man3/inet_net_pton.3:97
8294 msgid ""
8295 "On success, B<inet_net_pton>()  returns the number of bits in the network "
8296 "number field of the result placed in I<netp>.  For a discussion of the input "
8297 "presentation format and the return value, see NOTES."
8298 msgstr ""
8299
8300 #. type: Plain text
8301 #: build/C/man3/inet_net_pton.3:107
8302 msgid ""
8303 "I<Note>: the buffer pointed to by I<netp> should be zeroed out before "
8304 "calling B<inet_net_pton>(), since the call writes only as many bytes as are "
8305 "required for the network number (or as are explicitly specified by I<pres>), "
8306 "which may be less than the number of bytes in a complete network address."
8307 msgstr ""
8308
8309 #. type: SS
8310 #: build/C/man3/inet_net_pton.3:107
8311 #, no-wrap
8312 msgid "inet_net_ntop()"
8313 msgstr ""
8314
8315 #. type: Plain text
8316 #: build/C/man3/inet_net_pton.3:119
8317 msgid ""
8318 "The B<inet_net_ntop>()  function converts the network number in the buffer "
8319 "pointed to by I<netp> to presentation format; I<*netp> is interpreted as a "
8320 "value in network byte order.  The I<bits> argument specifies the number of "
8321 "bits in the network number in I<*netp>."
8322 msgstr ""
8323
8324 #. type: Plain text
8325 #: build/C/man3/inet_net_pton.3:130
8326 msgid ""
8327 "The null-terminated presentation-format string is placed in the buffer "
8328 "pointed to by I<pres>.  The I<psize> argument specifies the number of bytes "
8329 "available in I<pres>.  The presentation string is in CIDR format: a "
8330 "dotted-decimal number representing the network address, followed by a slash, "
8331 "and the size of the network number in bits."
8332 msgstr ""
8333
8334 #. type: Plain text
8335 #: build/C/man3/inet_net_pton.3:137
8336 msgid ""
8337 "On success, B<inet_net_pton>()  returns the number of bits in the network "
8338 "number.  On error, it returns -1, and I<errno> is set to indicate the cause "
8339 "of the error."
8340 msgstr ""
8341
8342 #. type: Plain text
8343 #: build/C/man3/inet_net_pton.3:145
8344 msgid ""
8345 "On success, B<inet_net_ntop>()  returns I<pres>.  On error, it returns NULL, "
8346 "and I<errno> is set to indicate the cause of the error."
8347 msgstr ""
8348
8349 #. type: TP
8350 #: build/C/man3/inet_net_pton.3:146 build/C/man3/inet_ntop.3:92
8351 #, no-wrap
8352 msgid "B<EAFNOSUPPORT>"
8353 msgstr ""
8354
8355 #. type: Plain text
8356 #: build/C/man3/inet_net_pton.3:151
8357 msgid "I<af> specified a value other than B<AF_INET>."
8358 msgstr ""
8359
8360 #. type: Plain text
8361 #: build/C/man3/inet_net_pton.3:154
8362 msgid "The size of the output buffer was insufficient."
8363 msgstr ""
8364
8365 #. type: Plain text
8366 #: build/C/man3/inet_net_pton.3:159
8367 msgid "(B<inet_net_pton>())  I<pres> was not in correct presentation format."
8368 msgstr ""
8369
8370 #. type: Plain text
8371 #: build/C/man3/inet_net_pton.3:165
8372 msgid ""
8373 "The B<inet_net_pton>()  and B<inet_net_ntop>()  functions are nonstandard, "
8374 "but widely available."
8375 msgstr ""
8376
8377 #. type: SS
8378 #: build/C/man3/inet_net_pton.3:166
8379 #, no-wrap
8380 msgid "Input presentation format for inet_net_pton()"
8381 msgstr ""
8382
8383 #. type: Plain text
8384 #: build/C/man3/inet_net_pton.3:170
8385 msgid ""
8386 "The network number may be specified either as a hexadecimal value or in "
8387 "dotted-decimal notation."
8388 msgstr ""
8389
8390 #.  If the hexadecimal string is short, the remaining nibbles are zeroed.
8391 #. type: Plain text
8392 #: build/C/man3/inet_net_pton.3:175
8393 msgid ""
8394 "Hexadecimal values are indicated by an initial \"0x\" or \"0X\".  The "
8395 "hexadecimal digits populate the nibbles (half octets) of the network number "
8396 "from left to right in network byte order."
8397 msgstr ""
8398
8399 #. type: Plain text
8400 #: build/C/man3/inet_net_pton.3:179
8401 msgid ""
8402 "In dotted-decimal notation, up to four octets are specified, as decimal "
8403 "numbers separated by dots.  Thus, any of the following forms are accepted:"
8404 msgstr ""
8405
8406 #. type: Plain text
8407 #: build/C/man3/inet_net_pton.3:184
8408 #, no-wrap
8409 msgid ""
8410 "    a.b.c.d\n"
8411 "    a.b.c\n"
8412 "    a.b\n"
8413 "    a\n"
8414 msgstr ""
8415
8416 #.  Reading other man pages, some other implementations treat
8417 #.      'c' in a.b.c as a 16-bit number that populates right-most two bytes
8418 #.      'b' in a.b as a 24-bit number that populates right-most three bytes
8419 #. type: Plain text
8420 #: build/C/man3/inet_net_pton.3:192
8421 msgid ""
8422 "Each part is a number in the range 0 to 255 that populates one byte of the "
8423 "resulting network number, going from left to right, in network-byte (big "
8424 "endian) order.  Where a part is omitted, the resulting byte in the network "
8425 "number is zero."
8426 msgstr ""
8427
8428 #. type: Plain text
8429 #: build/C/man3/inet_net_pton.3:197
8430 msgid ""
8431 "For either hexadecimal or dotted-decimal format, the network number can "
8432 "optionally be followed by a slash and a number in the range 0 to 32, which "
8433 "specifies the size of the network number in bits."
8434 msgstr ""
8435
8436 #. type: SS
8437 #: build/C/man3/inet_net_pton.3:197
8438 #, no-wrap
8439 msgid "Return value of inet_net_pton()"
8440 msgstr ""
8441
8442 #. type: Plain text
8443 #: build/C/man3/inet_net_pton.3:207
8444 msgid ""
8445 "The return value of B<inet_net_pton>()  is the number of bits in the network "
8446 "number field.  If the input presentation string terminates with a slash and "
8447 "an explicit size value, then that size becomes the return value of "
8448 "B<inet_net_pton>().  Otherwise, the return value, I<bits>, is inferred as "
8449 "follows:"
8450 msgstr ""
8451
8452 #. type: Plain text
8453 #: build/C/man3/inet_net_pton.3:213
8454 msgid ""
8455 "If the most significant byte of the network number is greater than or equal "
8456 "to 240, then I<bits> is 32."
8457 msgstr ""
8458
8459 #. type: Plain text
8460 #: build/C/man3/inet_net_pton.3:220
8461 msgid ""
8462 "Otherwise, if the most significant byte of the network number is greater "
8463 "than or equal to 224, then I<bits> is 4."
8464 msgstr ""
8465
8466 #. type: Plain text
8467 #: build/C/man3/inet_net_pton.3:227
8468 msgid ""
8469 "Otherwise, if the most significant byte of the network number is greater "
8470 "than or equal to 192, then I<bits> is 24."
8471 msgstr ""
8472
8473 #. type: Plain text
8474 #: build/C/man3/inet_net_pton.3:234
8475 msgid ""
8476 "Otherwise, if the most significant byte of the network number is greater "
8477 "than or equal to 128, then I<bits> is 16."
8478 msgstr ""
8479
8480 #. type: Plain text
8481 #: build/C/man3/inet_net_pton.3:238
8482 msgid "Otherwise, I<bits> is 8."
8483 msgstr ""
8484
8485 #. type: Plain text
8486 #: build/C/man3/inet_net_pton.3:247
8487 msgid ""
8488 "If the resulting I<bits> value from the above steps is greater than or equal "
8489 "to 8, but the number of octets specified in the network number exceed "
8490 "I<bits/8>, then I<bits> is set to 8 times the number of octets actually "
8491 "specified."
8492 msgstr ""
8493
8494 #. type: Plain text
8495 #: build/C/man3/inet_net_pton.3:261
8496 msgid ""
8497 "The program below demonstrates the use of B<inet_net_pton>()  and "
8498 "B<inet_net_ntop>().  It uses B<inet_net_pton>()  to convert the presentation "
8499 "format network address provided in its first command-line argument to binary "
8500 "form, displays the return value from B<inet_net_pton>().  It then uses "
8501 "B<inet_net_ntop>()  to convert the binary form back to presentation format, "
8502 "and displays the resulting string."
8503 msgstr ""
8504
8505 #. type: Plain text
8506 #: build/C/man3/inet_net_pton.3:275
8507 msgid ""
8508 "In order to demonstrate that B<inet_net_pton>()  may not write to all bytes "
8509 "of its I<netp> argument, the program allows an optional second command-line "
8510 "argument, a number used to initialize the buffer before B<inet_net_pton>()  "
8511 "is called.  As its final line of output, the program displays all of the "
8512 "bytes of the buffer returned by B<inet_net_pton>()  allowing the user to see "
8513 "which bytes have not been touched by B<inet_net_pton>()."
8514 msgstr ""
8515
8516 #. type: Plain text
8517 #: build/C/man3/inet_net_pton.3:279
8518 msgid ""
8519 "An example run, showing that B<inet_net_pton>()  infers the number of bits "
8520 "in the network number:"
8521 msgstr ""
8522
8523 #. type: Plain text
8524 #: build/C/man3/inet_net_pton.3:286
8525 #, no-wrap
8526 msgid ""
8527 "$ B<./a.out 193.168>\n"
8528 "inet_net_pton() returned: 24\n"
8529 "inet_net_ntop() yielded:  193.168.0/24\n"
8530 "Raw address:              c1a80000\n"
8531 msgstr ""
8532
8533 #. type: Plain text
8534 #: build/C/man3/inet_net_pton.3:292
8535 msgid ""
8536 "Demonstrate that B<inet_net_pton>()  does not zero out unused bytes in its "
8537 "result buffer:"
8538 msgstr ""
8539
8540 #. type: Plain text
8541 #: build/C/man3/inet_net_pton.3:299
8542 #, no-wrap
8543 msgid ""
8544 "$ B<./a.out 193.168 0xffffffff>\n"
8545 "inet_net_pton() returned: 24\n"
8546 "inet_net_ntop() yielded:  193.168.0/24\n"
8547 "Raw address:              c1a800ff\n"
8548 msgstr ""
8549
8550 #. type: Plain text
8551 #: build/C/man3/inet_net_pton.3:307
8552 msgid ""
8553 "Demonstrate that B<inet_net_pton>()  will widen the inferred size of the "
8554 "network number, if the supplied number of bytes in the presentation string "
8555 "exceeds the inferred value:"
8556 msgstr ""
8557
8558 #. type: Plain text
8559 #: build/C/man3/inet_net_pton.3:314
8560 #, no-wrap
8561 msgid ""
8562 "$ B<./a.out 193.168.1.128>\n"
8563 "inet_net_pton() returned: 32\n"
8564 "inet_net_ntop() yielded:  193.168.1.128/32\n"
8565 "Raw address:              c1a80180\n"
8566 msgstr ""
8567
8568 #. type: Plain text
8569 #: build/C/man3/inet_net_pton.3:322
8570 msgid ""
8571 "Explicitly specifying the size of the network number overrides any inference "
8572 "about its size (but any extra bytes that are explicitly specified will still "
8573 "be used by B<inet_net_pton>(): to populate the result buffer):"
8574 msgstr ""
8575
8576 #. type: Plain text
8577 #: build/C/man3/inet_net_pton.3:329
8578 #, no-wrap
8579 msgid ""
8580 "$ B<./a.out 193.168.1.128/24>\n"
8581 "inet_net_pton() returned: 24\n"
8582 "inet_net_ntop() yielded:  193.168.1/24\n"
8583 "Raw address:              c1a80180\n"
8584 msgstr ""
8585
8586 #. type: Plain text
8587 #: build/C/man3/inet_net_pton.3:334
8588 #, no-wrap
8589 msgid "/* Link with \"-lresolv\" */\n"
8590 msgstr ""
8591
8592 #. type: Plain text
8593 #: build/C/man3/inet_net_pton.3:338
8594 #, no-wrap
8595 msgid ""
8596 "#include E<lt>arpa/inet.hE<gt>\n"
8597 "#include E<lt>stdio.hE<gt>\n"
8598 "#include E<lt>stdlib.hE<gt>\n"
8599 msgstr ""
8600
8601 #. type: Plain text
8602 #: build/C/man3/inet_net_pton.3:341
8603 #, no-wrap
8604 msgid ""
8605 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8606 "                        } while (0)\n"
8607 msgstr ""
8608
8609 #. type: Plain text
8610 #: build/C/man3/inet_net_pton.3:348
8611 #, no-wrap
8612 msgid ""
8613 "int\n"
8614 "main(int argc, char *argv[])\n"
8615 "{\n"
8616 "    char buf[100];\n"
8617 "    struct in_addr addr;\n"
8618 "    int bits;\n"
8619 msgstr ""
8620
8621 #. type: Plain text
8622 #: build/C/man3/inet_net_pton.3:355
8623 #, no-wrap
8624 msgid ""
8625 "    if (argc E<lt> 2) {\n"
8626 "        fprintf(stderr,\n"
8627 "                \"Usage: %s presentation-form [addr-init-value]\\en\",\n"
8628 "                argv[0]);\n"
8629 "        exit(EXIT_FAILURE);\n"
8630 "    }\n"
8631 msgstr ""
8632
8633 #. type: Plain text
8634 #: build/C/man3/inet_net_pton.3:361
8635 #, no-wrap
8636 msgid ""
8637 "    /* If argv[2] is supplied (a numeric value), use it to initialize\n"
8638 "       the output buffer given to inet_net_pton(), so that we can see\n"
8639 "       that inet_net_pton() initializes only those bytes needed for\n"
8640 "       the network number. If argv[2] is not supplied, then initialize\n"
8641 "       the buffer to zero (as is recommended practice). */\n"
8642 msgstr ""
8643
8644 #. type: Plain text
8645 #: build/C/man3/inet_net_pton.3:363
8646 #, no-wrap
8647 msgid "    addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
8648 msgstr ""
8649
8650 #. type: Plain text
8651 #: build/C/man3/inet_net_pton.3:365
8652 #, no-wrap
8653 msgid "    /* Convert presentation network number in argv[1] to binary */\n"
8654 msgstr ""
8655
8656 #. type: Plain text
8657 #: build/C/man3/inet_net_pton.3:369
8658 #, no-wrap
8659 msgid ""
8660 "    bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
8661 "    if (bits == -1)\n"
8662 "        errExit(\"inet_net_ntop\");\n"
8663 msgstr ""
8664
8665 #. type: Plain text
8666 #: build/C/man3/inet_net_pton.3:371
8667 #, no-wrap
8668 msgid "    printf(\"inet_net_pton() returned: %d\\en\", bits);\n"
8669 msgstr ""
8670
8671 #. type: Plain text
8672 #: build/C/man3/inet_net_pton.3:374
8673 #, no-wrap
8674 msgid ""
8675 "    /* Convert binary format back to presentation, using \\(aqbits\\(aq\n"
8676 "       returned by inet_net_pton() */\n"
8677 msgstr ""
8678
8679 #. type: Plain text
8680 #: build/C/man3/inet_net_pton.3:377
8681 #, no-wrap
8682 msgid ""
8683 "    if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
8684 "        errExit(\"inet_net_ntop\");\n"
8685 msgstr ""
8686
8687 #. type: Plain text
8688 #: build/C/man3/inet_net_pton.3:379
8689 #, no-wrap
8690 msgid "    printf(\"inet_net_ntop() yielded:  %s\\en\", buf);\n"
8691 msgstr ""
8692
8693 #. type: Plain text
8694 #: build/C/man3/inet_net_pton.3:384
8695 #, no-wrap
8696 msgid ""
8697 "    /* Display \\(aqaddr\\(aq in raw form (in network byte order), so we "
8698 "can\n"
8699 "       see bytes not displayed by inet_net_ntop(); some of those bytes\n"
8700 "       may not have been touched by inet_net_ntop(), and so will still\n"
8701 "       have any initial value that was specified in argv[2]. */\n"
8702 msgstr ""
8703
8704 #. type: Plain text
8705 #: build/C/man3/inet_net_pton.3:386
8706 #, no-wrap
8707 msgid "    printf(\"Raw address:              %x\\en\", htonl(addr.s_addr));\n"
8708 msgstr ""
8709
8710 #. type: Plain text
8711 #: build/C/man3/inet_net_pton.3:393
8712 msgid "B<inet>(3), B<networks>(5)"
8713 msgstr ""
8714
8715 #. type: TH
8716 #: build/C/man3/inet_ntop.3:26
8717 #, no-wrap
8718 msgid "INET_NTOP"
8719 msgstr ""
8720
8721 #. type: TH
8722 #: build/C/man3/inet_ntop.3:26
8723 #, no-wrap
8724 msgid "2008-11-11"
8725 msgstr ""
8726
8727 #. type: Plain text
8728 #: build/C/man3/inet_ntop.3:29
8729 msgid "inet_ntop - convert IPv4 and IPv6 addresses from binary to text form"
8730 msgstr ""
8731
8732 #. type: Plain text
8733 #: build/C/man3/inet_ntop.3:35
8734 #, no-wrap
8735 msgid ""
8736 "B<const char *inet_ntop(int >I<af>B<, const void *>I<src>B<,>\n"
8737 "B<                      char *>I<dst>B<, socklen_t >I<size>B<);>\n"
8738 msgstr ""
8739
8740 #. type: Plain text
8741 #: build/C/man3/inet_ntop.3:48
8742 msgid ""
8743 "This function converts the network address structure I<src> in the I<af> "
8744 "address family into a character string.  The resulting string is copied to "
8745 "the buffer pointed to by I<dst>, which must be a non-null pointer.  The "
8746 "caller specifies the number of bytes available in this buffer in the "
8747 "argument I<size>."
8748 msgstr ""
8749
8750 #. type: Plain text
8751 #: build/C/man3/inet_ntop.3:57
8752 msgid ""
8753 "B<inet_ntop>()  extends the B<inet_ntoa>(3)  function to support multiple "
8754 "address families, B<inet_ntoa>(3)  is now considered to be deprecated in "
8755 "favor of B<inet_ntop>().  The following address families are currently "
8756 "supported:"
8757 msgstr ""
8758
8759 #. type: Plain text
8760 #: build/C/man3/inet_ntop.3:70
8761 msgid ""
8762 "I<src> points to a I<struct in_addr> (in network byte order)  which is "
8763 "converted to an IPv4 network address in the dotted-decimal format, "
8764 "\"I<ddd.ddd.ddd.ddd>\".  The buffer I<dst> must be at least "
8765 "B<INET_ADDRSTRLEN> bytes long."
8766 msgstr ""
8767
8768 #. type: Plain text
8769 #: build/C/man3/inet_ntop.3:83
8770 msgid ""
8771 "I<src> points to a I<struct in6_addr> (in network byte order)  which is "
8772 "converted to a representation of this address in the most appropriate IPv6 "
8773 "network address format for this address.  The buffer I<dst> must be at least "
8774 "B<INET6_ADDRSTRLEN> bytes long."
8775 msgstr ""
8776
8777 #. type: Plain text
8778 #: build/C/man3/inet_ntop.3:91
8779 msgid ""
8780 "On success, B<inet_ntop>()  returns a non-null pointer to I<dst>.  NULL is "
8781 "returned if there was an error, with I<errno> set to indicate the error."
8782 msgstr ""
8783
8784 #. type: Plain text
8785 #: build/C/man3/inet_ntop.3:96
8786 msgid "I<af> was not a valid address family."
8787 msgstr ""
8788
8789 #. type: TP
8790 #: build/C/man3/inet_ntop.3:96
8791 #, no-wrap
8792 msgid "B<ENOSPC>"
8793 msgstr ""
8794
8795 #. type: Plain text
8796 #: build/C/man3/inet_ntop.3:100
8797 msgid "The converted address string would exceed the size given by I<size>."
8798 msgstr ""
8799
8800 #.  2.1.3: size_t, 2.1.91: socklen_t
8801 #. type: Plain text
8802 #: build/C/man3/inet_ntop.3:112
8803 msgid ""
8804 "POSIX.1-2001.  Note that RFC\\ 2553 defines a prototype where the last "
8805 "argument I<size> is of type I<size_t>.  Many systems follow RFC\\ 2553.  "
8806 "Glibc 2.0 and 2.1 have I<size_t>, but 2.2 and later have I<socklen_t>."
8807 msgstr ""
8808
8809 #. type: Plain text
8810 #: build/C/man3/inet_ntop.3:115
8811 msgid "B<AF_INET6> converts IPv4-mapped IPv6 addresses into an IPv6 format."
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man3/inet_ntop.3:118
8816 msgid "See B<inet_pton>(3)."
8817 msgstr ""
8818
8819 #. type: Plain text
8820 #: build/C/man3/inet_ntop.3:122
8821 msgid "B<getnameinfo>(3), B<inet>(3), B<inet_pton>(3)"
8822 msgstr ""
8823
8824 #. type: TH
8825 #: build/C/man3/inet_pton.3:27
8826 #, no-wrap
8827 msgid "INET_PTON"
8828 msgstr ""
8829
8830 #. type: TH
8831 #: build/C/man3/inet_pton.3:27
8832 #, no-wrap
8833 msgid "2008-06-18"
8834 msgstr ""
8835
8836 #. type: Plain text
8837 #: build/C/man3/inet_pton.3:30
8838 msgid "inet_pton - convert IPv4 and IPv6 addresses from text to binary form"
8839 msgstr ""
8840
8841 #. type: Plain text
8842 #: build/C/man3/inet_pton.3:35
8843 #, no-wrap
8844 msgid "B<int inet_pton(int >I<af>B<, const char *>I<src>B<, void *>I<dst>B<);>\n"
8845 msgstr ""
8846
8847 #. type: Plain text
8848 #: build/C/man3/inet_pton.3:51
8849 msgid ""
8850 "This function converts the character string I<src> into a network address "
8851 "structure in the I<af> address family, then copies the network address "
8852 "structure to I<dst>.  The I<af> argument must be either B<AF_INET> or "
8853 "B<AF_INET6>."
8854 msgstr ""
8855
8856 #. type: Plain text
8857 #: build/C/man3/inet_pton.3:53
8858 msgid "The following address families are currently supported:"
8859 msgstr ""
8860
8861 #. type: Plain text
8862 #: build/C/man3/inet_pton.3:67
8863 msgid ""
8864 "I<src> points to a character string containing an IPv4 network address in "
8865 "dotted-decimal format, \"I<ddd.ddd.ddd.ddd>\", where I<ddd> is a decimal "
8866 "number of up to three digits in the range 0 to 255.  The address is "
8867 "converted to a I<struct in_addr> and copied to I<dst>, which must be "
8868 "I<sizeof(struct in_addr)> (4) bytes (32 bits) long."
8869 msgstr ""
8870
8871 #. type: Plain text
8872 #: build/C/man3/inet_pton.3:79
8873 msgid ""
8874 "I<src> points to a character string containing an IPv6 network address.  The "
8875 "address is converted to a I<struct in6_addr> and copied to I<dst>, which "
8876 "must be I<sizeof(struct in6_addr)> (16) bytes (128 bits) long.  The allowed "
8877 "formats for IPv6 addresses follow these rules:"
8878 msgstr ""
8879
8880 #. type: IP
8881 #: build/C/man3/inet_pton.3:80
8882 #, no-wrap
8883 msgid "1."
8884 msgstr ""
8885
8886 #. type: Plain text
8887 #: build/C/man3/inet_pton.3:87
8888 msgid ""
8889 "The preferred format is I<x:x:x:x:x:x:x:x>.  This form consists of eight "
8890 "hexadecimal numbers, each of which expresses a 16-bit value (i.e., each I<x> "
8891 "can be up to 4 hex digits)."
8892 msgstr ""
8893
8894 #. type: IP
8895 #: build/C/man3/inet_pton.3:87
8896 #, no-wrap
8897 msgid "2."
8898 msgstr ""
8899
8900 #. type: Plain text
8901 #: build/C/man3/inet_pton.3:100
8902 msgid ""
8903 "A series of contiguous zero values in the preferred format can be "
8904 "abbreviated to I<::>.  Only one instance of I<::> can occur in an address.  "
8905 "For example, the loopback address I<0:0:0:0:0:0:0:1> can be abbreviated as "
8906 "I<::1>.  The wildcard address, consisting of all zeros, can be written as "
8907 "I<::>."
8908 msgstr ""
8909
8910 #. type: IP
8911 #: build/C/man3/inet_pton.3:100
8912 #, no-wrap
8913 msgid "3."
8914 msgstr ""
8915
8916 #. type: Plain text
8917 #: build/C/man3/inet_pton.3:113
8918 msgid ""
8919 "An alternate format is useful for expressing IPv4-mapped IPv6 addresses.  "
8920 "This form is written as I<x:x:x:x:x:x:d.d.d.d>, where the six leading I<x>s "
8921 "are hexadecimal values that define the six most-significant 16-bit pieces of "
8922 "the address (i.e., 96 bits), and the I<d>s express a value in dotted-decimal "
8923 "notation that defines the least significant 32 bits of the address.  An "
8924 "example of such an address is I<::FFFF:204.152.189.116>."
8925 msgstr ""
8926
8927 #. type: Plain text
8928 #: build/C/man3/inet_pton.3:116
8929 msgid "See RFC 2373 for further details on the representation of IPv6 addresses."
8930 msgstr ""
8931
8932 #. type: Plain text
8933 #: build/C/man3/inet_pton.3:129
8934 msgid ""
8935 "B<inet_pton>()  returns 1 on success (network address was successfully "
8936 "converted).  0 is returned if I<src> does not contain a character string "
8937 "representing a valid network address in the specified address family.  If "
8938 "I<af> does not contain a valid address family, -1 is returned and I<errno> "
8939 "is set to B<EAFNOSUPPORT>."
8940 msgstr ""
8941
8942 #. type: Plain text
8943 #: build/C/man3/inet_pton.3:150
8944 msgid ""
8945 "Unlike B<inet_aton>(3)  and B<inet_addr>(3), B<inet_pton>()  supports IPv6 "
8946 "addresses.  On the other hand, B<inet_pton>()  accepts only IPv4 addresses "
8947 "in dotted-decimal notation, whereas B<inet_aton>(3)  and B<inet_addr>(3)  "
8948 "allow the more general numbers-and-dots notation (hexadecimal and octal "
8949 "number formats, and formats that don't require all four bytes to be "
8950 "explicitly written).  For an interface that handles both IPv6 addresses, and "
8951 "IPv4 addresses in numbers-and-dots notation, see B<getaddrinfo>(3)."
8952 msgstr ""
8953
8954 #. type: Plain text
8955 #: build/C/man3/inet_pton.3:156
8956 msgid ""
8957 "B<AF_INET6> does not recognize IPv4 addresses.  An explicit IPv4-mapped IPv6 "
8958 "address must be supplied in I<src> instead."
8959 msgstr ""
8960
8961 #. type: Plain text
8962 #: build/C/man3/inet_pton.3:162
8963 msgid ""
8964 "The program below demonstrates the use of B<inet_pton>()  and "
8965 "B<inet_ntop>(3).  Here are some example runs:"
8966 msgstr ""
8967
8968 #. type: Plain text
8969 #: build/C/man3/inet_pton.3:171
8970 #, no-wrap
8971 msgid ""
8972 "$B< ./a.out i6 0:0:0:0:0:0:0:0>\n"
8973 "::\n"
8974 "$B< ./a.out i6 1:0:0:0:0:0:0:8>\n"
8975 "1::8\n"
8976 "$B< ./a.out i6 0:0:0:0:0:FFFF:204.152.189.116>\n"
8977 "::ffff:204.152.189.116\n"
8978 msgstr ""
8979
8980 #. type: Plain text
8981 #: build/C/man3/inet_pton.3:180
8982 #, no-wrap
8983 msgid ""
8984 "#include E<lt>arpa/inet.hE<gt>\n"
8985 "#include E<lt>stdio.hE<gt>\n"
8986 "#include E<lt>stdlib.hE<gt>\n"
8987 "#include E<lt>string.hE<gt>\n"
8988 msgstr ""
8989
8990 #. type: Plain text
8991 #: build/C/man3/inet_pton.3:187
8992 #, no-wrap
8993 msgid ""
8994 "int\n"
8995 "main(int argc, char *argv[])\n"
8996 "{\n"
8997 "    unsigned char buf[sizeof(struct in6_addr)];\n"
8998 "    int domain, s;\n"
8999 "    char str[INET6_ADDRSTRLEN];\n"
9000 msgstr ""
9001
9002 #. type: Plain text
9003 #: build/C/man3/inet_pton.3:192
9004 #, no-wrap
9005 msgid ""
9006 "    if (argc != 3) {\n"
9007 "        fprintf(stderr, \"Usage: %s {i4|i6|E<lt>numE<gt>} string\\en\", "
9008 "argv[0]);\n"
9009 "        exit(EXIT_FAILURE);\n"
9010 "    }\n"
9011 msgstr ""
9012
9013 #. type: Plain text
9014 #: build/C/man3/inet_pton.3:195
9015 #, no-wrap
9016 msgid ""
9017 "    domain = (strcmp(argv[1], \"i4\") == 0) ? AF_INET :\n"
9018 "             (strcmp(argv[1], \"i6\") == 0) ? AF_INET6 : atoi(argv[1]);\n"
9019 msgstr ""
9020
9021 #. type: Plain text
9022 #: build/C/man3/inet_pton.3:204
9023 #, no-wrap
9024 msgid ""
9025 "    s = inet_pton(domain, argv[2], buf);\n"
9026 "    if (s E<lt>= 0) {\n"
9027 "        if (s == 0)\n"
9028 "            fprintf(stderr, \"Not in presentation format\");\n"
9029 "        else\n"
9030 "            perror(\"inet_pton\");\n"
9031 "        exit(EXIT_FAILURE);\n"
9032 "    }\n"
9033 msgstr ""
9034
9035 #. type: Plain text
9036 #: build/C/man3/inet_pton.3:209
9037 #, no-wrap
9038 msgid ""
9039 "    if (inet_ntop(domain, buf, str, INET6_ADDRSTRLEN) == NULL) {\n"
9040 "        perror(\"inet_ntop\");\n"
9041 "        exit(EXIT_FAILURE);\n"
9042 "    }\n"
9043 msgstr ""
9044
9045 #. type: Plain text
9046 #: build/C/man3/inet_pton.3:211
9047 #, no-wrap
9048 msgid "    printf(\"%s\\en\", str);\n"
9049 msgstr ""
9050
9051 #. type: Plain text
9052 #: build/C/man3/inet_pton.3:219
9053 msgid "B<getaddrinfo>(3), B<inet>(3), B<inet_ntop>(3)"
9054 msgstr ""
9055
9056 #. type: TH
9057 #: build/C/man7/ip.7:36
9058 #, no-wrap
9059 msgid "IP"
9060 msgstr ""
9061
9062 #. type: TH
9063 #: build/C/man7/ip.7:36
9064 #, no-wrap
9065 msgid "2014-05-10"
9066 msgstr ""
9067
9068 #. type: Plain text
9069 #: build/C/man7/ip.7:39
9070 msgid "ip - Linux IPv4 protocol implementation"
9071 msgstr ""
9072
9073 #. type: Plain text
9074 #: build/C/man7/ip.7:45 build/C/man7/ipv6.7:93 build/C/man7/raw.7:20 build/C/man7/tcp.7:83 build/C/man7/udp.7:19
9075 msgid "B<#include E<lt>netinet/in.hE<gt>>"
9076 msgstr ""
9077
9078 #. type: Plain text
9079 #: build/C/man7/ip.7:47
9080 msgid "B<#include E<lt>netinet/ip.hE<gt> >/* superset of previous */"
9081 msgstr ""
9082
9083 #. type: Plain text
9084 #: build/C/man7/ip.7:49
9085 msgid "I<tcp_socket>B< = socket(AF_INET, SOCK_STREAM, 0);>"
9086 msgstr ""
9087
9088 #. type: Plain text
9089 #: build/C/man7/ip.7:51
9090 msgid "I<udp_socket>B< = socket(AF_INET, SOCK_DGRAM, 0);>"
9091 msgstr ""
9092
9093 #. type: Plain text
9094 #: build/C/man7/ip.7:53
9095 msgid "I<raw_socket>B< = socket(AF_INET, SOCK_RAW, >I<protocol>B<);>"
9096 msgstr ""
9097
9098 #.  FIXME . has someone verified that 2.1 is really 1812 compliant?
9099 #. type: Plain text
9100 #: build/C/man7/ip.7:60
9101 msgid ""
9102 "Linux implements the Internet Protocol, version 4, described in RFC\\ 791 "
9103 "and RFC\\ 1122.  B<ip> contains a level 2 multicasting implementation "
9104 "conforming to RFC\\ 1112.  It also contains an IP router including a packet "
9105 "filter."
9106 msgstr ""
9107
9108 #. type: Plain text
9109 #: build/C/man7/ip.7:64
9110 msgid ""
9111 "The programming interface is BSD-sockets compatible.  For more information "
9112 "on sockets, see B<socket>(7)."
9113 msgstr ""
9114
9115 #. type: Plain text
9116 #: build/C/man7/ip.7:95
9117 msgid ""
9118 "An IP socket is created by calling the B<socket>(2)  function as "
9119 "B<socket(AF_INET, >I<socket_type>B<, >I<protocol>B<)>.  Valid socket types "
9120 "are B<SOCK_STREAM> to open a B<tcp>(7)  socket, B<SOCK_DGRAM> to open a "
9121 "B<udp>(7)  socket, or B<SOCK_RAW> to open a B<raw>(7)  socket to access the "
9122 "IP protocol directly.  I<protocol> is the IP protocol in the IP header to be "
9123 "received or sent.  The only valid values for I<protocol> are 0 and "
9124 "B<IPPROTO_TCP> for TCP sockets, and 0 and B<IPPROTO_UDP> for UDP sockets.  "
9125 "For B<SOCK_RAW> you may specify a valid IANA IP protocol defined in RFC\\ "
9126 "1700 assigned numbers."
9127 msgstr ""
9128
9129 #. type: Plain text
9130 #: build/C/man7/ip.7:117
9131 msgid ""
9132 "When a process wants to receive new incoming packets or connections, it "
9133 "should bind a socket to a local interface address using B<bind>(2).  In this "
9134 "case, only one IP socket may be bound to any given local (address, port) "
9135 "pair.  When B<INADDR_ANY> is specified in the bind call, the socket will be "
9136 "bound to I<all> local interfaces.  When B<listen>(2)  is called on an "
9137 "unbound socket, the socket is automatically bound to a random free port with "
9138 "the local address set to B<INADDR_ANY>.  When B<connect>(2)  is called on an "
9139 "unbound socket, the socket is automatically bound to a random free port or "
9140 "to a usable shared port with the local address set to B<INADDR_ANY>."
9141 msgstr ""
9142
9143 #. type: Plain text
9144 #: build/C/man7/ip.7:123
9145 msgid ""
9146 "A TCP local socket address that has been bound is unavailable for some time "
9147 "after closing, unless the B<SO_REUSEADDR> flag has been set.  Care should be "
9148 "taken when using this flag as it makes TCP less reliable."
9149 msgstr ""
9150
9151 #. type: Plain text
9152 #: build/C/man7/ip.7:134
9153 msgid ""
9154 "An IP socket address is defined as a combination of an IP interface address "
9155 "and a 16-bit port number.  The basic IP protocol does not supply port "
9156 "numbers, they are implemented by higher level protocols like B<udp>(7)  and "
9157 "B<tcp>(7).  On raw sockets I<sin_port> is set to the IP protocol."
9158 msgstr ""
9159
9160 #. type: Plain text
9161 #: build/C/man7/ip.7:142
9162 #, no-wrap
9163 msgid ""
9164 "struct sockaddr_in {\n"
9165 "    sa_family_t    sin_family; /* address family: AF_INET */\n"
9166 "    in_port_t      sin_port;   /* port in network byte order */\n"
9167 "    struct in_addr sin_addr;   /* internet address */\n"
9168 "};\n"
9169 msgstr ""
9170
9171 #. type: Plain text
9172 #: build/C/man7/ip.7:147
9173 #, no-wrap
9174 msgid ""
9175 "/* Internet address. */\n"
9176 "struct in_addr {\n"
9177 "    uint32_t       s_addr;     /* address in network byte order */\n"
9178 "};\n"
9179 msgstr ""
9180
9181 #. type: Plain text
9182 #: build/C/man7/ip.7:172
9183 msgid ""
9184 "I<sin_family> is always set to B<AF_INET>.  This is required; in Linux 2.2 "
9185 "most networking functions return B<EINVAL> when this setting is missing.  "
9186 "I<sin_port> contains the port in network byte order.  The port numbers below "
9187 "1024 are called I<privileged ports> (or sometimes: I<reserved ports>).  Only "
9188 "privileged processes (i.e., those having the B<CAP_NET_BIND_SERVICE> "
9189 "capability) may B<bind>(2)  to these sockets.  Note that the raw IPv4 "
9190 "protocol as such has no concept of a port, they are implemented only by "
9191 "higher protocols like B<tcp>(7)  and B<udp>(7)."
9192 msgstr ""
9193
9194 #. type: Plain text
9195 #: build/C/man7/ip.7:191
9196 msgid ""
9197 "I<sin_addr> is the IP host address.  The I<s_addr> member of I<struct "
9198 "in_addr> contains the host interface address in network byte order.  "
9199 "I<in_addr> should be assigned one of the B<INADDR_*> values (e.g., "
9200 "B<INADDR_ANY>)  or set using the B<inet_aton>(3), B<inet_addr>(3), "
9201 "B<inet_makeaddr>(3)  library functions or directly with the name resolver "
9202 "(see B<gethostbyname>(3))."
9203 msgstr ""
9204
9205 #.  Leave a loophole for XTP @)
9206 #. type: Plain text
9207 #: build/C/man7/ip.7:203
9208 msgid ""
9209 "IPv4 addresses are divided into unicast, broadcast and multicast addresses.  "
9210 "Unicast addresses specify a single interface of a host, broadcast addresses "
9211 "specify all hosts on a network and multicast addresses address all hosts in "
9212 "a multicast group.  Datagrams to broadcast addresses can be sent or received "
9213 "only when the B<SO_BROADCAST> socket flag is set.  In the current "
9214 "implementation, connection-oriented sockets are allowed to use only unicast "
9215 "addresses."
9216 msgstr ""
9217
9218 #. type: Plain text
9219 #: build/C/man7/ip.7:211
9220 msgid ""
9221 "Note that the address and the port are always stored in network byte order.  "
9222 "In particular, this means that you need to call B<htons>(3)  on the number "
9223 "that is assigned to a port.  All address/port manipulation functions in the "
9224 "standard library work in network byte order."
9225 msgstr ""
9226
9227 #. type: Plain text
9228 #: build/C/man7/ip.7:224
9229 msgid ""
9230 "There are several special addresses: B<INADDR_LOOPBACK> (127.0.0.1)  always "
9231 "refers to the local host via the loopback device; B<INADDR_ANY> (0.0.0.0)  "
9232 "means any address for binding; B<INADDR_BROADCAST> (255.255.255.255)  means "
9233 "any host and has the same effect on bind as B<INADDR_ANY> for historical "
9234 "reasons."
9235 msgstr ""
9236
9237 #.  or SOL_IP on Linux
9238 #. type: Plain text
9239 #: build/C/man7/ip.7:233
9240 msgid ""
9241 "IP supports some protocol-specific socket options that can be set with "
9242 "B<setsockopt>(2)  and read with B<getsockopt>(2).  The socket option level "
9243 "for IP is B<IPPROTO_IP>.  A boolean integer flag is zero when it is false, "
9244 "otherwise true."
9245 msgstr ""
9246
9247 #. type: TP
9248 #: build/C/man7/ip.7:233
9249 #, no-wrap
9250 msgid "B<IP_ADD_MEMBERSHIP> (since Linux 1.2)"
9251 msgstr ""
9252
9253 #. type: Plain text
9254 #: build/C/man7/ip.7:239
9255 msgid "Join a multicast group.  Argument is an I<ip_mreqn> structure."
9256 msgstr ""
9257
9258 #. type: Plain text
9259 #: build/C/man7/ip.7:249
9260 #, no-wrap
9261 msgid ""
9262 "struct ip_mreqn {\n"
9263 "    struct in_addr imr_multiaddr; /* IP multicast group\n"
9264 "                                     address */\n"
9265 "    struct in_addr imr_address;   /* IP address of local\n"
9266 "                                     interface */\n"
9267 "    int            imr_ifindex;   /* interface index */\n"
9268 "};\n"
9269 msgstr ""
9270
9271 #.  (i.e., within the 224.0.0.0-239.255.255.255 range)
9272 #. type: Plain text
9273 #: build/C/man7/ip.7:270
9274 msgid ""
9275 "I<imr_multiaddr> contains the address of the multicast group the application "
9276 "wants to join or leave.  It must be a valid multicast address (or "
9277 "B<setsockopt>(2)  fails with the error B<EINVAL>).  I<imr_address> is the "
9278 "address of the local interface with which the system should join the "
9279 "multicast group; if it is equal to B<INADDR_ANY>, an appropriate interface "
9280 "is chosen by the system.  I<imr_ifindex> is the interface index of the "
9281 "interface that should join/leave the I<imr_multiaddr> group, or 0 to "
9282 "indicate any interface."
9283 msgstr ""
9284
9285 #. type: Plain text
9286 #: build/C/man7/ip.7:285
9287 msgid ""
9288 "The I<ip_mreqn> structure is available only since Linux 2.2.  For "
9289 "compatibility, the old I<ip_mreq> structure (present since Linux 1.2) is "
9290 "still supported; it differs from I<ip_mreqn> only by not including the "
9291 "I<imr_ifindex> field.  Only valid as a B<setsockopt>(2)."
9292 msgstr ""
9293
9294 #. type: TP
9295 #: build/C/man7/ip.7:285
9296 #, no-wrap
9297 msgid "B<IP_ADD_SOURCE_MEMBERSHIP> (since Linux 2.4.22 / 2.5.68)"
9298 msgstr ""
9299
9300 #. type: Plain text
9301 #: build/C/man7/ip.7:292
9302 msgid ""
9303 "Join a multicast group and allow receiving data only from a specified "
9304 "source.  Argument is an I<ip_mreq_source> structure."
9305 msgstr ""
9306
9307 #. type: Plain text
9308 #: build/C/man7/ip.7:303
9309 #, no-wrap
9310 msgid ""
9311 "struct ip_mreq_source {\n"
9312 "    struct in_addr imr_multiaddr;  /* IP multicast group\n"
9313 "                                      address */\n"
9314 "    struct in_addr imr_interface;  /* IP address of local\n"
9315 "                                      interface */\n"
9316 "    struct in_addr imr_sourceaddr; /* IP address of\n"
9317 "                                      multicast source */\n"
9318 "};\n"
9319 msgstr ""
9320
9321 #. type: Plain text
9322 #: build/C/man7/ip.7:324
9323 msgid ""
9324 "The I<ip_mreq_source> structure is similar to I<ip_mreqn> described under "
9325 "B<IP_ADD_MEMBERSIP>.  The I<imr_multiaddr> field contains the address of the "
9326 "multicast group the application wants to join or leave.  The "
9327 "I<imr_interface> field is the address of the local interface with which the "
9328 "system should join the multicast group.  Finally, the I<imr_sourceaddr> "
9329 "field contains the address of the source the application wants to receive "
9330 "data from."
9331 msgstr ""
9332
9333 #. type: Plain text
9334 #: build/C/man7/ip.7:327
9335 msgid ""
9336 "This option can be used multiple times to allow receiving data from more "
9337 "than one source."
9338 msgstr ""
9339
9340 #. type: TP
9341 #: build/C/man7/ip.7:327
9342 #, no-wrap
9343 msgid "B<IP_BLOCK_SOURCE> (since Linux 2.4.22 / 2.5.68)"
9344 msgstr ""
9345
9346 #. type: Plain text
9347 #: build/C/man7/ip.7:335
9348 msgid ""
9349 "Stop receiving multicast data from a specific source in a given group.  This "
9350 "is valid only after the application has subscribed to the multicast group "
9351 "using either B<IP_ADD_MEMBERSHIP> or B<IP_ADD_SOURCE_MEMBERSHIP>."
9352 msgstr ""
9353
9354 #. type: Plain text
9355 #: build/C/man7/ip.7:340 build/C/man7/ip.7:362 build/C/man7/ip.7:926
9356 msgid ""
9357 "Argument is an I<ip_mreq_source> structure as described under "
9358 "B<IP_ADD_SOURCE_MEMBERSHIP>."
9359 msgstr ""
9360
9361 #. type: TP
9362 #: build/C/man7/ip.7:340
9363 #, no-wrap
9364 msgid "B<IP_DROP_MEMBERSHIP> (since Linux 1.2)"
9365 msgstr ""
9366
9367 #. type: Plain text
9368 #: build/C/man7/ip.7:349
9369 msgid ""
9370 "Leave a multicast group.  Argument is an I<ip_mreqn> or I<ip_mreq> structure "
9371 "similar to B<IP_ADD_MEMBERSHIP>."
9372 msgstr ""
9373
9374 #. type: TP
9375 #: build/C/man7/ip.7:349
9376 #, no-wrap
9377 msgid "B<IP_DROP_SOURCE_MEMBERSHIP> (since Linux 2.4.22 / 2.5.68)"
9378 msgstr ""
9379
9380 #. type: Plain text
9381 #: build/C/man7/ip.7:357
9382 msgid ""
9383 "Leave a source-specific group\\(emthat is, stop receiving data from a given "
9384 "multicast group that come from a given source.  If the application has "
9385 "subscribed to multiple sources within the same group, data from the "
9386 "remaining sources will still be delivered.  To stop receiving data from all "
9387 "sources at once, use B<IP_LEAVE_GROUP>."
9388 msgstr ""
9389
9390 #. type: TP
9391 #: build/C/man7/ip.7:362
9392 #, no-wrap
9393 msgid "B<IP_FREEBIND> (since Linux 2.4)"
9394 msgstr ""
9395
9396 #.  Precisely: 2.4.0-test10
9397 #. type: Plain text
9398 #: build/C/man7/ip.7:375
9399 msgid ""
9400 "If enabled, this boolean option allows binding to an IP address that is "
9401 "nonlocal or does not (yet) exist.  This permits listening on a socket, "
9402 "without requiring the underlying network interface or the specified dynamic "
9403 "IP address to be up at the time that the application is trying to bind to "
9404 "it.  This option is the per-socket equivalent of the I<ip_nonlocal_bind> "
9405 "I</proc> interface described below."
9406 msgstr ""
9407
9408 #. type: TP
9409 #: build/C/man7/ip.7:375
9410 #, no-wrap
9411 msgid "B<IP_HDRINCL> (since Linux 2.0)"
9412 msgstr ""
9413
9414 #. type: Plain text
9415 #: build/C/man7/ip.7:391
9416 msgid ""
9417 "If enabled, the user supplies an IP header in front of the user data.  Only "
9418 "valid for B<SOCK_RAW> sockets.  See B<raw>(7)  for more information.  When "
9419 "this flag is enabled the values set by B<IP_OPTIONS>, B<IP_TTL> and "
9420 "B<IP_TOS> are ignored."
9421 msgstr ""
9422
9423 #. type: TP
9424 #: build/C/man7/ip.7:391
9425 #, no-wrap
9426 msgid "B<IP_MSFILTER> (since Linux 2.4.22 / 2.5.68)"
9427 msgstr ""
9428
9429 #. type: Plain text
9430 #: build/C/man7/ip.7:397
9431 msgid ""
9432 "This option provides access to the advanced full-state filtering API.  "
9433 "Argument is an I<ip_msfilter> structure."
9434 msgstr ""
9435
9436 #. type: Plain text
9437 #: build/C/man7/ip.7:406
9438 #, no-wrap
9439 msgid ""
9440 "struct ip_msfilter {\n"
9441 "    struct in_addr imsf_multiaddr; /* IP multicast group\n"
9442 "                                      address */\n"
9443 "    struct in_addr imsf_interface; /* IP address of local\n"
9444 "                                      interface */\n"
9445 "    uint32_t       imsf_fmode;     /* Filter-mode */\n"
9446 msgstr ""
9447
9448 #. type: Plain text
9449 #: build/C/man7/ip.7:412
9450 #, no-wrap
9451 msgid ""
9452 "    uint32_t       imsf_numsrc;    /* Number of sources in\n"
9453 "                                      the following array */\n"
9454 "    struct in_addr imsf_slist[1];  /* Array of source\n"
9455 "                                      addresses */\n"
9456 "};\n"
9457 msgstr ""
9458
9459 #. type: Plain text
9460 #: build/C/man7/ip.7:427
9461 msgid ""
9462 "There are two macros, B<MCAST_INCLUDE> and B<MCAST_EXCLUDE>, which can be "
9463 "used to specify the filtering mode.  Additionally, the "
9464 "B<IP_MSFILTER_SIZE>(n)  macro exists to determine how much memory is needed "
9465 "to store I<ip_msfilter> structure with I<n> sources in the source list."
9466 msgstr ""
9467
9468 #. type: Plain text
9469 #: build/C/man7/ip.7:430
9470 msgid "For the full description of multicast source filtering refer to RFC 3376."
9471 msgstr ""
9472
9473 #. type: TP
9474 #: build/C/man7/ip.7:430
9475 #, no-wrap
9476 msgid "B<IP_MTU> (since Linux 2.2)"
9477 msgstr ""
9478
9479 #.  Precisely: 2.1.124
9480 #. type: Plain text
9481 #: build/C/man7/ip.7:438
9482 msgid ""
9483 "Retrieve the current known path MTU of the current socket.  Valid only when "
9484 "the socket has been connected.  Returns an integer.  Only valid as a "
9485 "B<getsockopt>(2)."
9486 msgstr ""
9487
9488 #. type: TP
9489 #: build/C/man7/ip.7:438
9490 #, no-wrap
9491 msgid "B<IP_MTU_DISCOVER> (since Linux 2.2)"
9492 msgstr ""
9493
9494 #.  Precisely: 2.1.124
9495 #. type: Plain text
9496 #: build/C/man7/ip.7:459
9497 msgid ""
9498 "Set or receive the Path MTU Discovery setting for a socket.  When enabled, "
9499 "Linux will perform Path MTU Discovery as defined in RFC\\ 1191 on "
9500 "B<SOCK_STREAM> sockets.  For non-B<SOCK_STREAM> sockets, B<IP_PMTUDISC_DO> "
9501 "forces the don't-fragment flag to be set on all outgoing packets.  It is the "
9502 "user's responsibility to packetize the data in MTU-sized chunks and to do "
9503 "the retransmits if necessary.  The kernel will reject (with B<EMSGSIZE>)  "
9504 "datagrams that are bigger than the known path MTU.  B<IP_PMTUDISC_WANT> will "
9505 "fragment a datagram if needed according to the path MTU, or will set the "
9506 "don't-fragment flag otherwise."
9507 msgstr ""
9508
9509 #. type: Plain text
9510 #: build/C/man7/ip.7:467
9511 msgid ""
9512 "The system-wide default can be toggled between B<IP_PMTUDISC_WANT> and "
9513 "B<IP_PMTUDISC_DONT> by writing (respectively, zero and nonzero values) to "
9514 "the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file."
9515 msgstr ""
9516
9517 #. type: tbl table
9518 #: build/C/man7/ip.7:471
9519 #, no-wrap
9520 msgid "Path MTU discovery value:Meaning\n"
9521 msgstr ""
9522
9523 #. type: tbl table
9524 #: build/C/man7/ip.7:472
9525 #, no-wrap
9526 msgid "IP_PMTUDISC_WANT:Use per-route settings.\n"
9527 msgstr ""
9528
9529 #. type: tbl table
9530 #: build/C/man7/ip.7:473
9531 #, no-wrap
9532 msgid "IP_PMTUDISC_DONT:Never do Path MTU Discovery.\n"
9533 msgstr ""
9534
9535 #. type: tbl table
9536 #: build/C/man7/ip.7:474
9537 #, no-wrap
9538 msgid "IP_PMTUDISC_DO:Always do Path MTU Discovery.\n"
9539 msgstr ""
9540
9541 #. type: tbl table
9542 #: build/C/man7/ip.7:475
9543 #, no-wrap
9544 msgid "IP_PMTUDISC_PROBE:Set DF but ignore Path MTU.\n"
9545 msgstr ""
9546
9547 #. type: Plain text
9548 #: build/C/man7/ip.7:493
9549 msgid ""
9550 "When PMTU discovery is enabled, the kernel automatically keeps track of the "
9551 "path MTU per destination host.  When it is connected to a specific peer with "
9552 "B<connect>(2), the currently known path MTU can be retrieved conveniently "
9553 "using the B<IP_MTU> socket option (e.g., after an B<EMSGSIZE> error "
9554 "occurred).  The path MTU may change over time.  For connectionless sockets "
9555 "with many destinations, the new MTU for a given destination can also be "
9556 "accessed using the error queue (see B<IP_RECVERR>).  A new error will be "
9557 "queued for every incoming MTU update."
9558 msgstr ""
9559
9560 #. type: Plain text
9561 #: build/C/man7/ip.7:498
9562 msgid ""
9563 "While MTU discovery is in progress, initial packets from datagram sockets "
9564 "may be dropped.  Applications using UDP should be aware of this and not take "
9565 "it into account for their packet retransmit strategy."
9566 msgstr ""
9567
9568 #.  FIXME . this is an ugly hack
9569 #. type: Plain text
9570 #: build/C/man7/ip.7:503
9571 msgid ""
9572 "To bootstrap the path MTU discovery process on unconnected sockets, it is "
9573 "possible to start with a big datagram size (up to 64K-headers bytes long) "
9574 "and let it shrink by updates of the path MTU."
9575 msgstr ""
9576
9577 #. type: Plain text
9578 #: build/C/man7/ip.7:512
9579 msgid ""
9580 "To get an initial estimate of the path MTU, connect a datagram socket to the "
9581 "destination address using B<connect>(2)  and retrieve the MTU by calling "
9582 "B<getsockopt>(2)  with the B<IP_MTU> option."
9583 msgstr ""
9584
9585 #. type: Plain text
9586 #: build/C/man7/ip.7:524
9587 msgid ""
9588 "It is possible to implement RFC 4821 MTU probing with B<SOCK_DGRAM> or "
9589 "B<SOCK_RAW> sockets by setting a value of B<IP_PMTUDISC_PROBE> (available "
9590 "since Linux 2.6.22).  This is also particularly useful for diagnostic tools "
9591 "such as B<tracepath>(8)  that wish to deliberately send probe packets larger "
9592 "than the observed Path MTU."
9593 msgstr ""
9594
9595 #. type: TP
9596 #: build/C/man7/ip.7:524
9597 #, no-wrap
9598 msgid "B<IP_MULTICAST_ALL> (since Linux 2.6.31)"
9599 msgstr ""
9600
9601 #. type: Plain text
9602 #: build/C/man7/ip.7:538
9603 msgid ""
9604 "This option can be used to modify the delivery policy of multicast messages "
9605 "to sockets bound to the wildcard B<INADDR_ANY> address.  The argument is a "
9606 "boolean integer (defaults to 1).  If set to 1, the socket will receive "
9607 "messages from all the groups that have been joined globally on the whole "
9608 "system.  Otherwise, it will deliver messages only from the groups that have "
9609 "been explicitly joined (for example via the B<IP_ADD_MEMBERSHIP> option) on "
9610 "this particular socket."
9611 msgstr ""
9612
9613 #. type: TP
9614 #: build/C/man7/ip.7:538
9615 #, no-wrap
9616 msgid "B<IP_MULTICAST_IF> (since Linux 1.2)"
9617 msgstr ""
9618
9619 #.  net: IP_MULTICAST_IF setsockopt now recognizes struct mreq
9620 #.  Commit: 3a084ddb4bf299a6e898a9a07c89f3917f0713f7
9621 #. type: Plain text
9622 #: build/C/man7/ip.7:550
9623 msgid ""
9624 "Set the local device for a multicast socket.  Argument is an I<ip_mreqn> or "
9625 "I<ip_mreq> (since Linux 3.5)  structure similar to B<IP_ADD_MEMBERSHIP>."
9626 msgstr ""
9627
9628 #. type: Plain text
9629 #: build/C/man7/ip.7:554
9630 msgid "When an invalid socket option is passed, B<ENOPROTOOPT> is returned."
9631 msgstr ""
9632
9633 #. type: TP
9634 #: build/C/man7/ip.7:554
9635 #, no-wrap
9636 msgid "B<IP_MULTICAST_LOOP> (since Linux 1.2)"
9637 msgstr ""
9638
9639 #. type: Plain text
9640 #: build/C/man7/ip.7:558
9641 msgid ""
9642 "Set or read a boolean integer argument that determines whether sent "
9643 "multicast packets should be looped back to the local sockets."
9644 msgstr ""
9645
9646 #. type: TP
9647 #: build/C/man7/ip.7:558
9648 #, no-wrap
9649 msgid "B<IP_MULTICAST_TTL> (since Linux 1.2)"
9650 msgstr ""
9651
9652 #. type: Plain text
9653 #: build/C/man7/ip.7:566
9654 msgid ""
9655 "Set or read the time-to-live value of outgoing multicast packets for this "
9656 "socket.  It is very important for multicast packets to set the smallest TTL "
9657 "possible.  The default is 1 which means that multicast packets don't leave "
9658 "the local network unless the user program explicitly requests it.  Argument "
9659 "is an integer."
9660 msgstr ""
9661
9662 #. type: TP
9663 #: build/C/man7/ip.7:566
9664 #, no-wrap
9665 msgid "B<IP_NODEFRAG> (since Linux 2.6.36)"
9666 msgstr ""
9667
9668 #. type: Plain text
9669 #: build/C/man7/ip.7:574
9670 msgid ""
9671 "If enabled (argument is nonzero), the reassembly of outgoing packets is "
9672 "disabled in the netfilter layer.  This option is valid only for B<SOCK_RAW> "
9673 "sockets.  The argument is an integer."
9674 msgstr ""
9675
9676 #. type: TP
9677 #: build/C/man7/ip.7:574
9678 #, no-wrap
9679 msgid "B<IP_OPTIONS> (since Linux 2.0)"
9680 msgstr ""
9681
9682 #.  Precisely: 1.3.30
9683 #. type: Plain text
9684 #: build/C/man7/ip.7:603
9685 msgid ""
9686 "Set or get the IP options to be sent with every packet from this socket.  "
9687 "The arguments are a pointer to a memory buffer containing the options and "
9688 "the option length.  The B<setsockopt>(2)  call sets the IP options "
9689 "associated with a socket.  The maximum option size for IPv4 is 40 bytes.  "
9690 "See RFC\\ 791 for the allowed options.  When the initial connection request "
9691 "packet for a B<SOCK_STREAM> socket contains IP options, the IP options will "
9692 "be set automatically to the options from the initial packet with routing "
9693 "headers reversed.  Incoming packets are not allowed to change options after "
9694 "the connection is established.  The processing of all incoming source "
9695 "routing options is disabled by default and can be enabled by using the "
9696 "I<accept_source_route> I</proc> interface.  Other options like timestamps "
9697 "are still handled.  For datagram sockets, IP options can be only set by the "
9698 "local user.  Calling B<getsockopt>(2)  with B<IP_OPTIONS> puts the current "
9699 "IP options used for sending into the supplied buffer."
9700 msgstr ""
9701
9702 #. type: TP
9703 #: build/C/man7/ip.7:603
9704 #, no-wrap
9705 msgid "B<IP_PKTINFO> (since Linux 2.2)"
9706 msgstr ""
9707
9708 #.  Precisely: 2.1.68
9709 #. type: Plain text
9710 #: build/C/man7/ip.7:620
9711 msgid ""
9712 "Pass an B<IP_PKTINFO> ancillary message that contains a I<pktinfo> structure "
9713 "that supplies some information about the incoming packet.  This only works "
9714 "for datagram oriented sockets.  The argument is a flag that tells the socket "
9715 "whether the B<IP_PKTINFO> message should be passed or not.  The message "
9716 "itself can only be sent/retrieved as control message with a packet using "
9717 "B<recvmsg>(2)  or B<sendmsg>(2)."
9718 msgstr ""
9719
9720 #. type: Plain text
9721 #: build/C/man7/ip.7:629
9722 #, no-wrap
9723 msgid ""
9724 "struct in_pktinfo {\n"
9725 "    unsigned int   ipi_ifindex;  /* Interface index */\n"
9726 "    struct in_addr ipi_spec_dst; /* Local address */\n"
9727 "    struct in_addr ipi_addr;     /* Header Destination\n"
9728 "                                    address */\n"
9729 "};\n"
9730 msgstr ""
9731
9732 #.  FIXME . elaborate on that.
9733 #.  This field is grossly misnamed
9734 #. type: Plain text
9735 #: build/C/man7/ip.7:654
9736 msgid ""
9737 "I<ipi_ifindex> is the unique index of the interface the packet was received "
9738 "on.  I<ipi_spec_dst> is the local address of the packet and I<ipi_addr> is "
9739 "the destination address in the packet header.  If B<IP_PKTINFO> is passed to "
9740 "B<sendmsg>(2)  and I<ipi_spec_dst> is not zero, then it is used as the local "
9741 "source address for the routing table lookup and for setting up IP source "
9742 "route options.  When I<ipi_ifindex> is not zero, the primary local address "
9743 "of the interface specified by the index overwrites I<ipi_spec_dst> for the "
9744 "routing table lookup."
9745 msgstr ""
9746
9747 #. type: TP
9748 #: build/C/man7/ip.7:654
9749 #, no-wrap
9750 msgid "B<IP_RECVERR> (since Linux 2.2)"
9751 msgstr ""
9752
9753 #.  Precisely: 2.1.15
9754 #.  or SOL_IP on Linux
9755 #. type: Plain text
9756 #: build/C/man7/ip.7:676
9757 msgid ""
9758 "Enable extended reliable error message passing.  When enabled on a datagram "
9759 "socket, all generated errors will be queued in a per-socket error queue.  "
9760 "When the user receives an error from a socket operation, the errors can be "
9761 "received by calling B<recvmsg>(2)  with the B<MSG_ERRQUEUE> flag set.  The "
9762 "I<sock_extended_err> structure describing the error will be passed in an "
9763 "ancillary message with the type B<IP_RECVERR> and the level B<IPPROTO_IP>.  "
9764 "This is useful for reliable error handling on unconnected sockets.  The "
9765 "received data portion of the error queue contains the error packet."
9766 msgstr ""
9767
9768 #. type: Plain text
9769 #: build/C/man7/ip.7:682
9770 msgid "The B<IP_RECVERR> control message contains a I<sock_extended_err> structure:"
9771 msgstr ""
9772
9773 #. type: Plain text
9774 #: build/C/man7/ip.7:690
9775 #, no-wrap
9776 msgid ""
9777 "#define SO_EE_ORIGIN_NONE    0\n"
9778 "#define SO_EE_ORIGIN_LOCAL   1\n"
9779 "#define SO_EE_ORIGIN_ICMP    2\n"
9780 "#define SO_EE_ORIGIN_ICMP6   3\n"
9781 msgstr ""
9782
9783 #. type: Plain text
9784 #: build/C/man7/ip.7:701
9785 #, no-wrap
9786 msgid ""
9787 "struct sock_extended_err {\n"
9788 "    uint32_t ee_errno;   /* error number */\n"
9789 "    uint8_t  ee_origin;  /* where the error originated */\n"
9790 "    uint8_t  ee_type;    /* type */\n"
9791 "    uint8_t  ee_code;    /* code */\n"
9792 "    uint8_t  ee_pad;\n"
9793 "    uint32_t ee_info;    /* additional information */\n"
9794 "    uint32_t ee_data;    /* other data */\n"
9795 "    /* More data may follow */\n"
9796 "};\n"
9797 msgstr ""
9798
9799 #. type: Plain text
9800 #: build/C/man7/ip.7:703
9801 #, no-wrap
9802 msgid "struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);\n"
9803 msgstr ""
9804
9805 #. type: Plain text
9806 #: build/C/man7/ip.7:726
9807 msgid ""
9808 "I<ee_errno> contains the I<errno> number of the queued error.  I<ee_origin> "
9809 "is the origin code of where the error originated.  The other fields are "
9810 "protocol-specific.  The macro B<SO_EE_OFFENDER> returns a pointer to the "
9811 "address of the network object where the error originated from given a "
9812 "pointer to the ancillary message.  If this address is not known, the "
9813 "I<sa_family> member of the I<sockaddr> contains B<AF_UNSPEC> and the other "
9814 "fields of the I<sockaddr> are undefined."
9815 msgstr ""
9816
9817 #.  FIXME . Is it a good idea to document that? It is a dubious feature.
9818 #.  On
9819 #.  .B SOCK_STREAM
9820 #.  sockets,
9821 #.  .B IP_RECVERR
9822 #.  has slightly different semantics. Instead of
9823 #.  saving the errors for the next timeout, it passes all incoming
9824 #.  errors immediately to the user.
9825 #.  This might be useful for very short-lived TCP connections which
9826 #.  need fast error handling. Use this option with care:
9827 #.  it makes TCP unreliable
9828 #.  by not allowing it to recover properly from routing
9829 #.  shifts and other normal
9830 #.  conditions and breaks the protocol specification.
9831 #. type: Plain text
9832 #: build/C/man7/ip.7:785
9833 msgid ""
9834 "IP uses the I<sock_extended_err> structure as follows: I<ee_origin> is set "
9835 "to B<SO_EE_ORIGIN_ICMP> for errors received as an ICMP packet, or "
9836 "B<SO_EE_ORIGIN_LOCAL> for locally generated errors.  Unknown values should "
9837 "be ignored.  I<ee_type> and I<ee_code> are set from the type and code fields "
9838 "of the ICMP header.  I<ee_info> contains the discovered MTU for B<EMSGSIZE> "
9839 "errors.  The message also contains the I<sockaddr_in of the node> caused the "
9840 "error, which can be accessed with the B<SO_EE_OFFENDER> macro.  The "
9841 "I<sin_family> field of the B<SO_EE_OFFENDER> address is B<AF_UNSPEC> when "
9842 "the source was unknown.  When the error originated from the network, all IP "
9843 "options (B<IP_OPTIONS>, B<IP_TTL>, etc.) enabled on the socket and contained "
9844 "in the error packet are passed as control messages.  The payload of the "
9845 "packet causing the error is returned as normal payload.  Note that TCP has "
9846 "no error queue; B<MSG_ERRQUEUE> is not permitted on B<SOCK_STREAM> sockets.  "
9847 "B<IP_RECVERR> is valid for TCP, but all errors are returned by socket "
9848 "function return or B<SO_ERROR> only."
9849 msgstr ""
9850
9851 #. type: Plain text
9852 #: build/C/man7/ip.7:790
9853 msgid ""
9854 "For raw sockets, B<IP_RECVERR> enables passing of all received ICMP errors "
9855 "to the application, otherwise errors are only reported on connected sockets"
9856 msgstr ""
9857
9858 #. type: Plain text
9859 #: build/C/man7/ip.7:794
9860 msgid ""
9861 "It sets or retrieves an integer boolean flag.  B<IP_RECVERR> defaults to "
9862 "off."
9863 msgstr ""
9864
9865 #. type: TP
9866 #: build/C/man7/ip.7:794
9867 #, no-wrap
9868 msgid "B<IP_RECVOPTS> (since Linux 2.2)"
9869 msgstr ""
9870
9871 #.  Precisely: 2.1.15
9872 #. type: Plain text
9873 #: build/C/man7/ip.7:805
9874 msgid ""
9875 "Pass all incoming IP options to the user in a B<IP_OPTIONS> control "
9876 "message.  The routing header and other options are already filled in for the "
9877 "local host.  Not supported for B<SOCK_STREAM> sockets."
9878 msgstr ""
9879
9880 #. type: TP
9881 #: build/C/man7/ip.7:805
9882 #, no-wrap
9883 msgid "B<IP_RECVORIGDSTADDR> (since Linux 2.6.29)"
9884 msgstr ""
9885
9886 #.  commit e8b2dfe9b4501ed0047459b2756ba26e5a940a69
9887 #. type: Plain text
9888 #: build/C/man7/ip.7:816
9889 msgid ""
9890 "This boolean option enables the B<IP_ORIGDSTADDR> ancillary message in "
9891 "B<recvmsg>(2), in which the kernel returns the original destination address "
9892 "of the datagram being received.  The ancillary message contains a I<struct "
9893 "sockaddr_in>."
9894 msgstr ""
9895
9896 #. type: TP
9897 #: build/C/man7/ip.7:816
9898 #, no-wrap
9899 msgid "B<IP_RECVTOS> (since Linux 2.2)"
9900 msgstr ""
9901
9902 #.  Precisely: 2.1.68
9903 #. type: Plain text
9904 #: build/C/man7/ip.7:825
9905 msgid ""
9906 "If enabled, the B<IP_TOS> ancillary message is passed with incoming "
9907 "packets.  It contains a byte which specifies the Type of Service/Precedence "
9908 "field of the packet header.  Expects a boolean integer flag."
9909 msgstr ""
9910
9911 #. type: TP
9912 #: build/C/man7/ip.7:825
9913 #, no-wrap
9914 msgid "B<IP_RECVTTL> (since Linux 2.2)"
9915 msgstr ""
9916
9917 #.  Precisely: 2.1.68
9918 #. type: Plain text
9919 #: build/C/man7/ip.7:835
9920 msgid ""
9921 "When this flag is set, pass a B<IP_TTL> control message with the time to "
9922 "live field of the received packet as a byte.  Not supported for "
9923 "B<SOCK_STREAM> sockets."
9924 msgstr ""
9925
9926 #. type: TP
9927 #: build/C/man7/ip.7:835
9928 #, no-wrap
9929 msgid "B<IP_RETOPTS> (since Linux 2.2)"
9930 msgstr ""
9931
9932 #.  Precisely: 2.1.15
9933 #. type: Plain text
9934 #: build/C/man7/ip.7:842
9935 msgid ""
9936 "Identical to B<IP_RECVOPTS>, but returns raw unprocessed options with "
9937 "timestamp and route record options not filled in for this hop."
9938 msgstr ""
9939
9940 #. type: TP
9941 #: build/C/man7/ip.7:842
9942 #, no-wrap
9943 msgid "B<IP_ROUTER_ALERT> (since Linux 2.2)"
9944 msgstr ""
9945
9946 #.  Precisely: 2.1.68
9947 #. type: Plain text
9948 #: build/C/man7/ip.7:854
9949 msgid ""
9950 "Pass all to-be forwarded packets with the IP Router Alert option set to this "
9951 "socket.  Only valid for raw sockets.  This is useful, for instance, for "
9952 "user-space RSVP daemons.  The tapped packets are not forwarded by the "
9953 "kernel; it is the user's responsibility to send them out again.  Socket "
9954 "binding is ignored, such packets are only filtered by protocol.  Expects an "
9955 "integer flag."
9956 msgstr ""
9957
9958 #. type: TP
9959 #: build/C/man7/ip.7:854
9960 #, no-wrap
9961 msgid "B<IP_TOS> (since Linux 1.0)"
9962 msgstr ""
9963
9964 #.  FIXME elaborate on this
9965 #.  Needs CAP_NET_ADMIN
9966 #.  Boolean
9967 #.  Since Linux 2.6.27
9968 #.  Author: KOVACS Krisztian <hidden@sch.bme.hu>
9969 #.  http://lwn.net/Articles/252545/
9970 #. type: Plain text
9971 #: build/C/man7/ip.7:888
9972 msgid ""
9973 "Set or receive the Type-Of-Service (TOS) field that is sent with every IP "
9974 "packet originating from this socket.  It is used to prioritize packets on "
9975 "the network.  TOS is a byte.  There are some standard TOS flags defined: "
9976 "B<IPTOS_LOWDELAY> to minimize delays for interactive traffic, "
9977 "B<IPTOS_THROUGHPUT> to optimize throughput, B<IPTOS_RELIABILITY> to optimize "
9978 "for reliability, B<IPTOS_MINCOST> should be used for \"filler data\" where "
9979 "slow transmission doesn't matter.  At most one of these TOS values can be "
9980 "specified.  Other bits are invalid and shall be cleared.  Linux sends "
9981 "B<IPTOS_LOWDELAY> datagrams first by default, but the exact behavior depends "
9982 "on the configured queueing discipline.  Some high priority levels may "
9983 "require superuser privileges (the B<CAP_NET_ADMIN> capability).  The "
9984 "priority can also be set in a protocol independent way by the "
9985 "(B<SOL_SOCKET>, B<SO_PRIORITY>)  socket option (see B<socket>(7))."
9986 msgstr ""
9987
9988 #. type: TP
9989 #: build/C/man7/ip.7:888
9990 #, no-wrap
9991 msgid "B<IP_TRANSPARENT> (since Linux 2.6.24)"
9992 msgstr ""
9993
9994 #.  commit f5715aea4564f233767ea1d944b2637a5fd7cd2e
9995 #.      This patch introduces the IP_TRANSPARENT socket option: enabling that
9996 #.      will make the IPv4 routing omit the non-local source address check on
9997 #.      output. Setting IP_TRANSPARENT requires NET_ADMIN capability.
9998 #.  http://lwn.net/Articles/252545/
9999 #. type: Plain text
10000 #: build/C/man7/ip.7:908
10001 msgid ""
10002 "Setting this boolean option enables transparent proxying on this socket.  "
10003 "This socket option allows the calling application to bind to a nonlocal IP "
10004 "address and operate both as a client and a server with the foreign address "
10005 "as the local endpoint.  NOTE: this requires that routing be set up in a way "
10006 "that packets going to the foreign address are routed through the TProxy box "
10007 "(i.e., the system hosting the application that employs the B<IP_TRANSPARENT> "
10008 "socket option).  Enabling this socket option requires superuser privileges "
10009 "(the B<CAP_NET_ADMIN> capability)."
10010 msgstr ""
10011
10012 #. type: Plain text
10013 #: build/C/man7/ip.7:911
10014 msgid ""
10015 "TProxy redirection with the iptables TPROXY target also requires that this "
10016 "option be set on the redirected socket."
10017 msgstr ""
10018
10019 #. type: TP
10020 #: build/C/man7/ip.7:911
10021 #, no-wrap
10022 msgid "B<IP_TTL> (since Linux 1.0)"
10023 msgstr ""
10024
10025 #. type: Plain text
10026 #: build/C/man7/ip.7:915
10027 msgid ""
10028 "Set or retrieve the current time-to-live field that is used in every packet "
10029 "sent from this socket."
10030 msgstr ""
10031
10032 #. type: TP
10033 #: build/C/man7/ip.7:915
10034 #, no-wrap
10035 msgid "B<IP_UNBLOCK_SOURCE> (since Linux 2.4.22 / 2.5.68)"
10036 msgstr ""
10037
10038 #. type: Plain text
10039 #: build/C/man7/ip.7:921
10040 msgid ""
10041 "Unblock previously blocked multicast source.  Returns B<EADDRNOTAVAIL> when "
10042 "given source is not being blocked."
10043 msgstr ""
10044
10045 #.  FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented:
10046 #.      ip_queue_maxlen
10047 #.      ip_conntrack_max
10048 #. type: Plain text
10049 #: build/C/man7/ip.7:942
10050 msgid ""
10051 "The IP protocol supports a set of I</proc> interfaces to configure some "
10052 "global parameters.  The parameters can be accessed by reading or writing "
10053 "files in the directory I</proc/sys/net/ipv4/>.  Interfaces described as "
10054 "I<Boolean> take an integer value, with a nonzero value (\"true\") meaning "
10055 "that the corresponding option is enabled, and a zero value (\"false\")  "
10056 "meaning that the option is disabled."
10057 msgstr ""
10058
10059 #. type: TP
10060 #: build/C/man7/ip.7:942
10061 #, no-wrap
10062 msgid "I<ip_always_defrag> (Boolean; since Linux 2.2.13)"
10063 msgstr ""
10064
10065 #. type: Plain text
10066 #: build/C/man7/ip.7:948
10067 msgid ""
10068 "[New with kernel 2.2.13; in earlier kernel versions this feature was "
10069 "controlled at compile time by the B<CONFIG_IP_ALWAYS_DEFRAG> option; this "
10070 "option is not present in 2.4.x and later]"
10071 msgstr ""
10072
10073 #. type: Plain text
10074 #: build/C/man7/ip.7:955
10075 msgid ""
10076 "When this boolean flag is enabled (not equal 0), incoming fragments (parts "
10077 "of IP packets that arose when some host between origin and destination "
10078 "decided that the packets were too large and cut them into pieces) will be "
10079 "reassembled (defragmented) before being processed, even if they are about to "
10080 "be forwarded."
10081 msgstr ""
10082
10083 #. type: Plain text
10084 #: build/C/man7/ip.7:962
10085 msgid ""
10086 "Only enable if running either a firewall that is the sole link to your "
10087 "network or a transparent proxy; never ever use it for a normal router or "
10088 "host.  Otherwise, fragmented communication can be disturbed if the fragments "
10089 "travel over different links.  Defragmentation also has a large memory and "
10090 "CPU time cost."
10091 msgstr ""
10092
10093 #. type: Plain text
10094 #: build/C/man7/ip.7:966
10095 msgid ""
10096 "This is automagically turned on when masquerading or transparent proxying "
10097 "are configured."
10098 msgstr ""
10099
10100 #. type: TP
10101 #: build/C/man7/ip.7:966
10102 #, no-wrap
10103 msgid "I<ip_autoconfig> (since Linux 2.2 to 2.6.17)"
10104 msgstr ""
10105
10106 #.  Precisely: since 2.1.68
10107 #.  FIXME document ip_autoconfig
10108 #. type: Plain text
10109 #: build/C/man7/ip.7:972
10110 msgid "Not documented."
10111 msgstr ""
10112
10113 #. type: TP
10114 #: build/C/man7/ip.7:972
10115 #, no-wrap
10116 msgid "I<ip_default_ttl> (integer; default: 64; since Linux 2.2)"
10117 msgstr ""
10118
10119 #.  Precisely: 2.1.15
10120 #. type: Plain text
10121 #: build/C/man7/ip.7:980
10122 msgid ""
10123 "Set the default time-to-live value of outgoing packets.  This can be changed "
10124 "per socket with the B<IP_TTL> option."
10125 msgstr ""
10126
10127 #. type: TP
10128 #: build/C/man7/ip.7:980
10129 #, no-wrap
10130 msgid "I<ip_dynaddr> (Boolean; default: disabled; since Linux 2.0.31)"
10131 msgstr ""
10132
10133 #. type: Plain text
10134 #: build/C/man7/ip.7:987
10135 msgid ""
10136 "Enable dynamic socket address and masquerading entry rewriting on interface "
10137 "address change.  This is useful for dialup interface with changing IP "
10138 "addresses.  0 means no rewriting, 1 turns it on and 2 enables verbose mode."
10139 msgstr ""
10140
10141 #. type: TP
10142 #: build/C/man7/ip.7:987
10143 #, no-wrap
10144 msgid "I<ip_forward> (Boolean; default: disabled; since Linux 1.2)"
10145 msgstr ""
10146
10147 #. type: Plain text
10148 #: build/C/man7/ip.7:992
10149 msgid ""
10150 "Enable IP forwarding with a boolean flag.  IP forwarding can be also set on "
10151 "a per-interface basis."
10152 msgstr ""
10153
10154 #. type: TP
10155 #: build/C/man7/ip.7:992
10156 #, no-wrap
10157 msgid "I<ip_local_port_range> (since Linux 2.2)"
10158 msgstr ""
10159
10160 #.  Precisely: since 2.1.68
10161 #. type: Plain text
10162 #: build/C/man7/ip.7:1000
10163 msgid ""
10164 "This file contains two integers that define the default local port range "
10165 "allocated to sockets that are not explicitly bound to a port number\\(emthat "
10166 "is, the range used for I<ephemeral ports>.  An ephemeral port is allocated "
10167 "to a socket in the following circumstances:"
10168 msgstr ""
10169
10170 #. type: Plain text
10171 #: build/C/man7/ip.7:1004
10172 msgid ""
10173 "the port number in a socket address is specified as 0 when calling "
10174 "B<bind>(2);"
10175 msgstr ""
10176
10177 #. type: Plain text
10178 #: build/C/man7/ip.7:1007
10179 msgid "B<listen>(2)  is called on a stream socket that was not previously bound;"
10180 msgstr ""
10181
10182 #. type: Plain text
10183 #: build/C/man7/ip.7:1010
10184 msgid "B<connect>(2)  was called on a socket that was not previously bound;"
10185 msgstr ""
10186
10187 #. type: Plain text
10188 #: build/C/man7/ip.7:1013
10189 msgid "B<sendto>(2)  is called on a datagram socket that was not previously bound."
10190 msgstr ""
10191
10192 #. type: Plain text
10193 #: build/C/man7/ip.7:1020
10194 msgid ""
10195 "Allocation of ephemeral ports starts with the first number in "
10196 "I<ip_local_port_range> and ends with the second number.  If the range of "
10197 "ephemeral ports is exhausted, then the relevant system call returns an error "
10198 "(but see BUGS)."
10199 msgstr ""
10200
10201 #. type: Plain text
10202 #: build/C/man7/ip.7:1031
10203 msgid ""
10204 "Note that the port range in I<ip_local_port_range> should not conflict with "
10205 "the ports used by masquerading (although the case is handled).  Also, "
10206 "arbitrary choices may cause problems with some firewall packet filters that "
10207 "make assumptions about the local ports in use.  The first number should be "
10208 "at least greater than 1024, or better, greater than 4096, to avoid clashes "
10209 "with well known ports and to minimize firewall problems."
10210 msgstr ""
10211
10212 #. type: TP
10213 #: build/C/man7/ip.7:1031
10214 #, no-wrap
10215 msgid "I<ip_no_pmtu_disc> (Boolean; default: disabled; since Linux 2.2)"
10216 msgstr ""
10217
10218 #.  Precisely: 2.1.15
10219 #
10220 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10221 #. type: Plain text
10222 #: build/C/man7/ip.7:1043
10223 msgid ""
10224 "If enabled, don't do Path MTU Discovery for TCP sockets by default.  Path "
10225 "MTU discovery may fail if misconfigured firewalls (that drop all ICMP "
10226 "packets) or misconfigured interfaces (e.g., a point-to-point link where the "
10227 "both ends don't agree on the MTU) are on the path.  It is better to fix the "
10228 "broken routers on the path than to turn off Path MTU Discovery globally, "
10229 "because not doing it incurs a high cost to the network."
10230 msgstr ""
10231
10232 #. type: TP
10233 #: build/C/man7/ip.7:1043
10234 #, no-wrap
10235 msgid "I<ip_nonlocal_bind> (Boolean; default: disabled; since Linux 2.4)"
10236 msgstr ""
10237
10238 #.  Precisely: patch-2.4.0-test10
10239 #
10240 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10241 #. type: Plain text
10242 #: build/C/man7/ip.7:1052
10243 msgid ""
10244 "If set, allows processes to B<bind>(2)  to nonlocal IP addresses, which can "
10245 "be quite useful, but may break some applications."
10246 msgstr ""
10247
10248 #. type: TP
10249 #: build/C/man7/ip.7:1052
10250 #, no-wrap
10251 msgid "I<ip6frag_time> (integer; default: 30)"
10252 msgstr ""
10253
10254 #
10255 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10256 #. type: Plain text
10257 #: build/C/man7/ip.7:1057
10258 msgid "Time in seconds to keep an IPv6 fragment in memory."
10259 msgstr ""
10260
10261 #. type: TP
10262 #: build/C/man7/ip.7:1057
10263 #, no-wrap
10264 msgid "I<ip6frag_secret_interval> (integer; default: 600)"
10265 msgstr ""
10266
10267 #. type: Plain text
10268 #: build/C/man7/ip.7:1061
10269 msgid ""
10270 "Regeneration interval (in seconds) of the hash secret (or lifetime for the "
10271 "hash secret) for IPv6 fragments."
10272 msgstr ""
10273
10274 #. type: TP
10275 #: build/C/man7/ip.7:1061
10276 #, no-wrap
10277 msgid "I<ipfrag_high_thresh> (integer), I<ipfrag_low_thresh> (integer)"
10278 msgstr ""
10279
10280 #. type: Plain text
10281 #: build/C/man7/ip.7:1068
10282 msgid ""
10283 "If the amount of queued IP fragments reaches I<ipfrag_high_thresh>, the "
10284 "queue is pruned down to I<ipfrag_low_thresh>.  Contains an integer with the "
10285 "number of bytes."
10286 msgstr ""
10287
10288 #. type: TP
10289 #: build/C/man7/ip.7:1068
10290 #, no-wrap
10291 msgid "I<neigh/*>"
10292 msgstr ""
10293
10294 #.  FIXME Document the conf/*/* interfaces
10295 #
10296 #.  FIXME Document the route/* interfaces
10297 #. type: Plain text
10298 #: build/C/man7/ip.7:1075
10299 msgid "See B<arp>(7)."
10300 msgstr ""
10301
10302 #.  2006-04-02, mtk
10303 #.  commented out the following because ipchains is obsolete
10304 #.  .PP
10305 #.  The ioctls to configure firewalling are documented in
10306 #.  .BR ipfw (4)
10307 #.  from the
10308 #.  .B ipchains
10309 #.  package.
10310 #. type: Plain text
10311 #: build/C/man7/ip.7:1088
10312 msgid "All ioctls described in B<socket>(7)  apply to B<ip>."
10313 msgstr ""
10314
10315 #.  FIXME Add a discussion of multicasting
10316 #. type: Plain text
10317 #: build/C/man7/ip.7:1092
10318 msgid ""
10319 "Ioctls to configure generic device parameters are described in "
10320 "B<netdevice>(7)."
10321 msgstr ""
10322
10323 #. type: Plain text
10324 #: build/C/man7/ip.7:1112
10325 msgid ""
10326 "The user tried to execute an operation without the necessary permissions.  "
10327 "These include: sending a packet to a broadcast address without having the "
10328 "B<SO_BROADCAST> flag set; sending a packet via a I<prohibit> route; "
10329 "modifying firewall settings without superuser privileges (the "
10330 "B<CAP_NET_ADMIN> capability); binding to a privileged port without superuser "
10331 "privileges (the B<CAP_NET_BIND_SERVICE> capability)."
10332 msgstr ""
10333
10334 #. type: Plain text
10335 #: build/C/man7/ip.7:1125
10336 msgid "An connection operation on a nonblocking socket is already in progress."
10337 msgstr ""
10338
10339 #. type: Plain text
10340 #: build/C/man7/ip.7:1134
10341 msgid ""
10342 "No valid routing table entry matches the destination address.  This error "
10343 "can be caused by a ICMP message from a remote router or for the local "
10344 "routing table."
10345 msgstr ""
10346
10347 #. type: Plain text
10348 #: build/C/man7/ip.7:1140
10349 msgid ""
10350 "Invalid argument passed.  For send operations this can be caused by sending "
10351 "to a I<blackhole> route."
10352 msgstr ""
10353
10354 #. type: Plain text
10355 #: build/C/man7/ip.7:1147
10356 msgid "Datagram is bigger than an MTU on the path and it cannot be fragmented."
10357 msgstr ""
10358
10359 #. type: TP
10360 #: build/C/man7/ip.7:1147
10361 #, no-wrap
10362 msgid "B<ENOBUFS>, B<ENOMEM>"
10363 msgstr ""
10364
10365 #. type: Plain text
10366 #: build/C/man7/ip.7:1152
10367 msgid ""
10368 "Not enough free memory.  This often means that the memory allocation is "
10369 "limited by the socket buffer limits, not by the system memory, but this is "
10370 "not 100% consistent."
10371 msgstr ""
10372
10373 #. type: Plain text
10374 #: build/C/man7/ip.7:1170
10375 msgid ""
10376 "User doesn't have permission to set high priority, change configuration, or "
10377 "send signals to the requested process or group."
10378 msgstr ""
10379
10380 #. type: Plain text
10381 #: build/C/man7/ip.7:1176
10382 msgid "The socket is not configured or an unknown socket type was requested."
10383 msgstr ""
10384
10385 #. type: Plain text
10386 #: build/C/man7/ip.7:1183
10387 msgid ""
10388 "Other errors may be generated by the overlaying protocols; see B<tcp>(7), "
10389 "B<raw>(7), B<udp>(7), and B<socket>(7)."
10390 msgstr ""
10391
10392 #.  IP_PASSSEC is Linux-specific
10393 #.  IP_XFRM_POLICY is Linux-specific
10394 #.  IP_IPSEC_POLICY is a nonstandard extension, also present on some BSDs
10395 #. type: Plain text
10396 #: build/C/man7/ip.7:1198
10397 msgid ""
10398 "B<IP_FREEBIND>, B<IP_MSFILTER>, B<IP_MTU>, B<IP_MTU_DISCOVER>, "
10399 "B<IP_RECVORIGDSTADDR>, B<IP_PKTINFO>, B<IP_RECVERR>, B<IP_ROUTER_ALERT>, and "
10400 "B<IP_TRANSPARENT> are Linux-specific."
10401 msgstr ""
10402
10403 #. type: Plain text
10404 #: build/C/man7/ip.7:1207
10405 msgid ""
10406 "Be very careful with the B<SO_BROADCAST> option - it is not privileged in "
10407 "Linux.  It is easy to overload the network with careless broadcasts.  For "
10408 "new application protocols it is better to use a multicast group instead of "
10409 "broadcasting.  Broadcasting is discouraged."
10410 msgstr ""
10411
10412 #. type: Plain text
10413 #: build/C/man7/ip.7:1217
10414 msgid ""
10415 "Some other BSD sockets implementations provide B<IP_RCVDSTADDR> and "
10416 "B<IP_RECVIF> socket options to get the destination address and the interface "
10417 "of received datagrams.  Linux has the more general B<IP_PKTINFO> for the "
10418 "same task."
10419 msgstr ""
10420
10421 #. type: Plain text
10422 #: build/C/man7/ip.7:1226
10423 msgid ""
10424 "Some BSD sockets implementations also provide an B<IP_RECVTTL> option, but "
10425 "an ancillary message with type B<IP_RECVTTL> is passed with the incoming "
10426 "packet.  This is different from the B<IP_TTL> option used in Linux."
10427 msgstr ""
10428
10429 #. type: Plain text
10430 #: build/C/man7/ip.7:1232
10431 msgid ""
10432 "Using B<SOL_IP> socket options level isn't portable, BSD-based stacks use "
10433 "B<IPPROTO_IP> level."
10434 msgstr ""
10435
10436 #. type: Plain text
10437 #: build/C/man7/ip.7:1245
10438 msgid ""
10439 "For compatibility with Linux 2.0, the obsolete B<socket(AF_INET, "
10440 "SOCK_PACKET, >I<protocol>B<)> syntax is still supported to open a "
10441 "B<packet>(7)  socket.  This is deprecated and should be replaced by "
10442 "B<socket(AF_PACKET, SOCK_RAW, >I<protocol>B<)> instead.  The main difference "
10443 "is the new I<sockaddr_ll> address structure for generic link layer "
10444 "information instead of the old B<sockaddr_pkt>."
10445 msgstr ""
10446
10447 #. type: Plain text
10448 #: build/C/man7/ip.7:1255
10449 msgid ""
10450 "The error used to diagnose exhaustion of the ephemeral port range differs "
10451 "across the various system calls (B<connect>(2), B<bind>(2), B<listen>(2), "
10452 "B<sendto>(2))  that can assign ephemeral ports."
10453 msgstr ""
10454
10455 #.  .PP
10456 #.  Some versions of glibc forget to declare
10457 #.  .IR in_pktinfo .
10458 #.  Workaround currently is to copy it into your program from this man page.
10459 #. type: Plain text
10460 #: build/C/man7/ip.7:1262
10461 msgid ""
10462 "The ioctls to configure IP-specific interface options and ARP tables are not "
10463 "described."
10464 msgstr ""
10465
10466 #.  .SH AUTHORS
10467 #.  This man page was written by Andi Kleen.
10468 #. type: Plain text
10469 #: build/C/man7/ip.7:1272
10470 msgid ""
10471 "Receiving the original destination address with B<MSG_ERRQUEUE> in "
10472 "I<msg_name> by B<recvmsg>(2)  does not work in some 2.2 kernels."
10473 msgstr ""
10474
10475 #. type: Plain text
10476 #: build/C/man7/ip.7:1285
10477 msgid ""
10478 "B<recvmsg>(2), B<sendmsg>(2), B<byteorder>(3), B<ipfw>(4), "
10479 "B<capabilities>(7), B<icmp>(7), B<ipv6>(7), B<netlink>(7), B<raw>(7), "
10480 "B<socket>(7), B<tcp>(7), B<udp>(7)"
10481 msgstr ""
10482
10483 #. type: Plain text
10484 #: build/C/man7/ip.7:1289
10485 msgid ""
10486 "RFC\\ 791 for the original IP specification.  RFC\\ 1122 for the IPv4 host "
10487 "requirements.  RFC\\ 1812 for the IPv4 router requirements."
10488 msgstr ""
10489
10490 #. type: TH
10491 #: build/C/man7/ipv6.7:86
10492 #, no-wrap
10493 msgid "IPV6"
10494 msgstr ""
10495
10496 #. type: TH
10497 #: build/C/man7/ipv6.7:86 build/C/man7/packet.7:12
10498 #, no-wrap
10499 msgid "2014-08-19"
10500 msgstr ""
10501
10502 #. type: Plain text
10503 #: build/C/man7/ipv6.7:89
10504 msgid "ipv6 - Linux IPv6 protocol implementation"
10505 msgstr ""
10506
10507 #. type: Plain text
10508 #: build/C/man7/ipv6.7:95
10509 msgid "I<tcp6_socket>B< = socket(AF_INET6, SOCK_STREAM, 0);>"
10510 msgstr ""
10511
10512 #. type: Plain text
10513 #: build/C/man7/ipv6.7:97
10514 msgid "I<raw6_socket>B< = socket(AF_INET6, SOCK_RAW, >I<protocol>B<);>"
10515 msgstr ""
10516
10517 #. type: Plain text
10518 #: build/C/man7/ipv6.7:99
10519 msgid "I<udp6_socket>B< = socket(AF_INET6, SOCK_DGRAM, >I<protocol>B<);>"
10520 msgstr ""
10521
10522 #. type: Plain text
10523 #: build/C/man7/ipv6.7:106
10524 msgid ""
10525 "Linux 2.2 optionally implements the Internet Protocol, version 6.  This man "
10526 "page contains a description of the IPv6 basic API as implemented by the "
10527 "Linux kernel and glibc 2.1.  The interface is based on the BSD sockets "
10528 "interface; see B<socket>(7)."
10529 msgstr ""
10530
10531 #. type: Plain text
10532 #: build/C/man7/ipv6.7:111
10533 msgid ""
10534 "The IPv6 API aims to be mostly compatible with the IPv4 API (see B<ip>(7)).  "
10535 "Only differences are described in this man page."
10536 msgstr ""
10537
10538 #. type: Plain text
10539 #: build/C/man7/ipv6.7:123
10540 msgid ""
10541 "To bind an B<AF_INET6> socket to any process, the local address should be "
10542 "copied from the I<in6addr_any> variable which has I<in6_addr> type.  In "
10543 "static initializations, B<IN6ADDR_ANY_INIT> may also be used, which expands "
10544 "to a constant expression.  Both of them are in network byte order."
10545 msgstr ""
10546
10547 #. type: Plain text
10548 #: build/C/man7/ipv6.7:130
10549 msgid ""
10550 "The IPv6 loopback address (::1) is available in the global "
10551 "I<in6addr_loopback> variable.  For initializations, B<IN6ADDR_LOOPBACK_INIT> "
10552 "should be used."
10553 msgstr ""
10554
10555 #. type: Plain text
10556 #: build/C/man7/ipv6.7:137
10557 msgid ""
10558 "IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 "
10559 "address type; thus a program needs to support only this API type to support "
10560 "both protocols.  This is handled transparently by the address handling "
10561 "functions in the C library."
10562 msgstr ""
10563
10564 #. type: Plain text
10565 #: build/C/man7/ipv6.7:142
10566 msgid ""
10567 "IPv4 and IPv6 share the local port space.  When you get an IPv4 connection "
10568 "or packet to a IPv6 socket, its source address will be mapped to v6 and it "
10569 "will be mapped to v6."
10570 msgstr ""
10571
10572 #. type: Plain text
10573 #: build/C/man7/ipv6.7:152
10574 #, no-wrap
10575 msgid ""
10576 "struct sockaddr_in6 {\n"
10577 "    sa_family_t     sin6_family;   /* AF_INET6 */\n"
10578 "    in_port_t       sin6_port;     /* port number */\n"
10579 "    uint32_t        sin6_flowinfo; /* IPv6 flow information */\n"
10580 "    struct in6_addr sin6_addr;     /* IPv6 address */\n"
10581 "    uint32_t        sin6_scope_id; /* Scope ID (new in 2.4) */\n"
10582 "};\n"
10583 msgstr ""
10584
10585 #. type: Plain text
10586 #: build/C/man7/ipv6.7:156
10587 #, no-wrap
10588 msgid ""
10589 "struct in6_addr {\n"
10590 "    unsigned char   s6_addr[16];   /* IPv6 address */\n"
10591 "};\n"
10592 msgstr ""
10593
10594 #. type: Plain text
10595 #: build/C/man7/ipv6.7:178
10596 msgid ""
10597 "I<sin6_family> is always set to B<AF_INET6>; I<sin6_port> is the protocol "
10598 "port (see I<sin_port> in B<ip>(7)); I<sin6_flowinfo> is the IPv6 flow "
10599 "identifier; I<sin6_addr> is the 128-bit IPv6 address.  I<sin6_scope_id> is "
10600 "an ID depending on the scope of the address.  It is new in Linux 2.4.  Linux "
10601 "supports it only for link-local addresses, in that case I<sin6_scope_id> "
10602 "contains the interface index (see B<netdevice>(7))"
10603 msgstr ""
10604
10605 #. type: Plain text
10606 #: build/C/man7/ipv6.7:184
10607 msgid ""
10608 "IPv6 supports several address types: unicast to address a single host, "
10609 "multicast to address a group of hosts, anycast to address the nearest member "
10610 "of a group of hosts (not implemented in Linux), IPv4-on-IPv6 to address a "
10611 "IPv4 host, and other reserved address types."
10612 msgstr ""
10613
10614 #. type: Plain text
10615 #: build/C/man7/ipv6.7:190
10616 msgid ""
10617 "The address notation for IPv6 is a group of 8 4-digit hexadecimal numbers, "
10618 "separated with a \\(aq:\\(aq.  \\&\"::\" stands for a string of 0 bits.  "
10619 "Special addresses are ::1 for loopback and ::FFFF:E<lt>IPv4 addressE<gt> for "
10620 "IPv4-mapped-on-IPv6."
10621 msgstr ""
10622
10623 #. type: Plain text
10624 #: build/C/man7/ipv6.7:192
10625 msgid "The port space of IPv6 is shared with IPv4."
10626 msgstr ""
10627
10628 #. type: Plain text
10629 #: build/C/man7/ipv6.7:200
10630 msgid ""
10631 "IPv6 supports some protocol-specific socket options that can be set with "
10632 "B<setsockopt>(2)  and read with B<getsockopt>(2).  The socket option level "
10633 "for IPv6 is B<IPPROTO_IPV6>.  A boolean integer flag is zero when it is "
10634 "false, otherwise true."
10635 msgstr ""
10636
10637 #. type: TP
10638 #: build/C/man7/ipv6.7:200
10639 #, no-wrap
10640 msgid "B<IPV6_ADDRFORM>"
10641 msgstr ""
10642
10643 #. type: Plain text
10644 #: build/C/man7/ipv6.7:214
10645 msgid ""
10646 "Turn an B<AF_INET6> socket into a socket of a different address family.  "
10647 "Only B<AF_INET> is currently supported for that.  It is allowed only for "
10648 "IPv6 sockets that are connected and bound to a v4-mapped-on-v6 address.  The "
10649 "argument is a pointer to an integer containing B<AF_INET>.  This is useful "
10650 "to pass v4-mapped sockets as file descriptors to programs that don't know "
10651 "how to deal with the IPv6 API."
10652 msgstr ""
10653
10654 #. type: TP
10655 #: build/C/man7/ipv6.7:214
10656 #, no-wrap
10657 msgid "B<IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP>"
10658 msgstr ""
10659
10660 #. type: Plain text
10661 #: build/C/man7/ipv6.7:219
10662 msgid ""
10663 "Control membership in multicast groups.  Argument is a pointer to a I<struct "
10664 "ipv6_mreq>."
10665 msgstr ""
10666
10667 #. type: TP
10668 #: build/C/man7/ipv6.7:219
10669 #, no-wrap
10670 msgid "B<IPV6_MTU>"
10671 msgstr ""
10672
10673 #. type: Plain text
10674 #: build/C/man7/ipv6.7:225
10675 msgid ""
10676 "B<getsockopt>(): Retrieve the current known path MTU of the current socket.  "
10677 "Only valid when the socket has been connected.  Returns an integer."
10678 msgstr ""
10679
10680 #. type: Plain text
10681 #: build/C/man7/ipv6.7:231
10682 msgid ""
10683 "B<setsockopt>(): Set the MTU to be used for the socket.  The MTU is limited "
10684 "by the device MTU or the path MTU when path MTU discovery is enabled.  "
10685 "Argument is a pointer to integer."
10686 msgstr ""
10687
10688 #. type: TP
10689 #: build/C/man7/ipv6.7:231
10690 #, no-wrap
10691 msgid "B<IPV6_MTU_DISCOVER>"
10692 msgstr ""
10693
10694 #. type: Plain text
10695 #: build/C/man7/ipv6.7:239
10696 msgid ""
10697 "Control path-MTU discovery on the socket.  See B<IP_MTU_DISCOVER> in "
10698 "B<ip>(7)  for details."
10699 msgstr ""
10700
10701 #. type: TP
10702 #: build/C/man7/ipv6.7:239
10703 #, no-wrap
10704 msgid "B<IPV6_MULTICAST_HOPS>"
10705 msgstr ""
10706
10707 #. type: Plain text
10708 #: build/C/man7/ipv6.7:246
10709 msgid ""
10710 "Set the multicast hop limit for the socket.  Argument is a pointer to an "
10711 "integer.  -1 in the value means use the route default, otherwise it should "
10712 "be between 0 and 255."
10713 msgstr ""
10714
10715 #. type: TP
10716 #: build/C/man7/ipv6.7:246
10717 #, no-wrap
10718 msgid "B<IPV6_MULTICAST_IF>"
10719 msgstr ""
10720
10721 #. type: Plain text
10722 #: build/C/man7/ipv6.7:257
10723 msgid ""
10724 "Set the device for outgoing multicast packets on the socket.  This is "
10725 "allowed only for B<SOCK_DGRAM> and B<SOCK_RAW> socket.  The argument is a "
10726 "pointer to an interface index (see B<netdevice>(7))  in an integer."
10727 msgstr ""
10728
10729 #. type: TP
10730 #: build/C/man7/ipv6.7:257
10731 #, no-wrap
10732 msgid "B<IPV6_MULTICAST_LOOP>"
10733 msgstr ""
10734
10735 #. type: Plain text
10736 #: build/C/man7/ipv6.7:261
10737 msgid ""
10738 "Control whether the socket sees multicast packets that it has send itself.  "
10739 "Argument is a pointer to boolean."
10740 msgstr ""
10741
10742 #. type: TP
10743 #: build/C/man7/ipv6.7:261
10744 #, no-wrap
10745 msgid "B<IPV6_RECVPKTINFO> (since Linux 2.6.14)"
10746 msgstr ""
10747
10748 #. type: Plain text
10749 #: build/C/man7/ipv6.7:275
10750 msgid ""
10751 "Set delivery of the B<IPV6_PKTINFO> control message on incoming datagrams.  "
10752 "Such control messages contain a I<struct in6_pktinfo>, as per RFC 3542.  "
10753 "Only allowed for B<SOCK_DGRAM> or B<SOCK_RAW> sockets.  Argument is a "
10754 "pointer to a boolean value in an integer."
10755 msgstr ""
10756
10757 #. type: Plain text
10758 #: build/C/man7/ipv6.7:278
10759 #, no-wrap
10760 msgid ""
10761 "B<IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPTS, IPV6_HOPOPTS, IPV6_FLOWINFO, "
10762 "IPV6_HOPLIMIT>\n"
10763 msgstr ""
10764
10765 #. type: Plain text
10766 #: build/C/man7/ipv6.7:303
10767 msgid ""
10768 "Set delivery of control messages for incoming datagrams containing extension "
10769 "headers from the received packet.  B<IPV6_RTHDR> delivers the routing "
10770 "header, B<IPV6_AUTHHDR> delivers the authentication header, B<IPV6_DSTOPTS> "
10771 "delivers the destination options, B<IPV6_HOPOPTS> delivers the hop options, "
10772 "B<IPV6_FLOWINFO> delivers an integer containing the flow ID, "
10773 "B<IPV6_HOPLIMIT> delivers an integer containing the hop count of the "
10774 "packet.  The control messages have the same type as the socket option.  All "
10775 "these header options can also be set for outgoing packets by putting the "
10776 "appropriate control message into the control buffer of B<sendmsg>(2).  Only "
10777 "allowed for B<SOCK_DGRAM> or B<SOCK_RAW> sockets.  Argument is a pointer to "
10778 "a boolean value."
10779 msgstr ""
10780
10781 #. type: TP
10782 #: build/C/man7/ipv6.7:303
10783 #, no-wrap
10784 msgid "B<IPV6_RECVERR>"
10785 msgstr ""
10786
10787 #. type: Plain text
10788 #: build/C/man7/ipv6.7:312
10789 msgid ""
10790 "Control receiving of asynchronous error options.  See B<IP_RECVERR> in "
10791 "B<ip>(7)  for details.  Argument is a pointer to boolean."
10792 msgstr ""
10793
10794 #. type: TP
10795 #: build/C/man7/ipv6.7:312
10796 #, no-wrap
10797 msgid "B<IPV6_ROUTER_ALERT>"
10798 msgstr ""
10799
10800 #. type: Plain text
10801 #: build/C/man7/ipv6.7:327
10802 msgid ""
10803 "Pass forwarded packets containing a router alert hop-by-hop option to this "
10804 "socket.  Only allowed for B<SOCK_RAW> sockets.  The tapped packets are not "
10805 "forwarded by the kernel, it is the user's responsibility to send them out "
10806 "again.  Argument is a pointer to an integer.  A positive integer indicates a "
10807 "router alert option value to intercept.  Packets carrying a router alert "
10808 "option with a value field containing this integer will be delivered to the "
10809 "socket.  A negative integer disables delivery of packets with router alert "
10810 "options to this socket."
10811 msgstr ""
10812
10813 #. type: TP
10814 #: build/C/man7/ipv6.7:327
10815 #, no-wrap
10816 msgid "B<IPV6_UNICAST_HOPS>"
10817 msgstr ""
10818
10819 #. type: Plain text
10820 #: build/C/man7/ipv6.7:333
10821 msgid ""
10822 "Set the unicast hop limit for the socket.  Argument is a pointer to an "
10823 "integer.  -1 in the value means use the route default, otherwise it should "
10824 "be between 0 and 255."
10825 msgstr ""
10826
10827 #. type: TP
10828 #: build/C/man7/ipv6.7:333
10829 #, no-wrap
10830 msgid "B<IPV6_V6ONLY> (since Linux 2.4.21 and 2.6)"
10831 msgstr ""
10832
10833 #.  See RFC 3493
10834 #. type: Plain text
10835 #: build/C/man7/ipv6.7:340
10836 msgid ""
10837 "If this flag is set to true (nonzero), then the socket is restricted to "
10838 "sending and receiving IPv6 packets only.  In this case, an IPv4 and an IPv6 "
10839 "application can bind to a single port at the same time."
10840 msgstr ""
10841
10842 #. type: Plain text
10843 #: build/C/man7/ipv6.7:344
10844 msgid ""
10845 "If this flag is set to false (zero), then the socket can be used to send and "
10846 "receive packets to and from an IPv6 address or an IPv4-mapped IPv6 address."
10847 msgstr ""
10848
10849 #. type: Plain text
10850 #: build/C/man7/ipv6.7:346
10851 msgid "The argument is a pointer to a boolean value in an integer."
10852 msgstr ""
10853
10854 #.  FLOWLABEL_MGR, FLOWINFO_SEND
10855 #. type: Plain text
10856 #: build/C/man7/ipv6.7:351
10857 msgid ""
10858 "The default value for this flag is defined by the contents of the file "
10859 "I</proc/sys/net/ipv6/bindv6only>.  The default value for that file is 0 "
10860 "(false)."
10861 msgstr ""
10862
10863 #. type: Plain text
10864 #: build/C/man7/ipv6.7:362
10865 msgid ""
10866 "The user tried to B<bind>(2)  to a link-local IPv6 address, but the "
10867 "I<sin6_scope_id> in the supplied I<sockaddr_in6> structure is not a valid "
10868 "interface index."
10869 msgstr ""
10870
10871 #. type: Plain text
10872 #: build/C/man7/ipv6.7:378
10873 msgid ""
10874 "Linux 2.4 will break binary compatibility for the I<sockaddr_in6> for 64-bit "
10875 "hosts by changing the alignment of I<in6_addr> and adding an additional "
10876 "I<sin6_scope_id> field.  The kernel interfaces stay compatible, but a "
10877 "program including I<sockaddr_in6> or I<in6_addr> into other structures may "
10878 "not be.  This is not a problem for 32-bit hosts like i386."
10879 msgstr ""
10880
10881 #. type: Plain text
10882 #: build/C/man7/ipv6.7:386
10883 msgid ""
10884 "The I<sin6_flowinfo> field is new in Linux 2.4.  It is transparently "
10885 "passed/read by the kernel when the passed address length contains it.  Some "
10886 "programs that pass a longer address buffer and then check the outgoing "
10887 "address length may break."
10888 msgstr ""
10889
10890 #. type: Plain text
10891 #: build/C/man7/ipv6.7:396
10892 msgid ""
10893 "The I<sockaddr_in6> structure is bigger than the generic I<sockaddr>.  "
10894 "Programs that assume that all address types can be stored safely in a "
10895 "I<struct sockaddr> need to be changed to use I<struct sockaddr_storage> for "
10896 "that instead."
10897 msgstr ""
10898
10899 #. type: Plain text
10900 #: build/C/man7/ipv6.7:401
10901 msgid ""
10902 "The IPv6 extended API as in RFC\\ 2292 is currently only partly implemented; "
10903 "although the 2.2 kernel has near complete support for receiving options, the "
10904 "macros for generating IPv6 options are missing in glibc 2.1."
10905 msgstr ""
10906
10907 #. type: Plain text
10908 #: build/C/man7/ipv6.7:403
10909 msgid "IPSec support for EH and AH headers is missing."
10910 msgstr ""
10911
10912 #. type: Plain text
10913 #: build/C/man7/ipv6.7:405
10914 msgid "Flow label management is not complete and not documented here."
10915 msgstr ""
10916
10917 #. type: Plain text
10918 #: build/C/man7/ipv6.7:407
10919 msgid "This man page is not complete."
10920 msgstr ""
10921
10922 #. type: Plain text
10923 #: build/C/man7/ipv6.7:410
10924 msgid "B<cmsg>(3), B<ip>(7)"
10925 msgstr ""
10926
10927 #. type: Plain text
10928 #: build/C/man7/ipv6.7:414
10929 msgid ""
10930 "RFC\\ 2553: IPv6 BASIC API; Linux tries to be compliant to this.  RFC\\ "
10931 "2460: IPv6 specification."
10932 msgstr ""
10933
10934 #. type: TH
10935 #: build/C/man7/netdevice.7:18
10936 #, no-wrap
10937 msgid "NETDEVICE"
10938 msgstr ""
10939
10940 #. type: TH
10941 #: build/C/man7/netdevice.7:18
10942 #, no-wrap
10943 msgid "2014-01-24"
10944 msgstr ""
10945
10946 #. type: Plain text
10947 #: build/C/man7/netdevice.7:21
10948 msgid "netdevice - low-level access to Linux network devices"
10949 msgstr ""
10950
10951 #. type: Plain text
10952 #: build/C/man7/netdevice.7:23
10953 msgid "B<#include E<lt>sys/ioctl.hE<gt>>"
10954 msgstr ""
10955
10956 #. type: Plain text
10957 #: build/C/man7/netdevice.7:25
10958 msgid "B<#include E<lt>net/if.hE<gt>>"
10959 msgstr ""
10960
10961 #. type: Plain text
10962 #: build/C/man7/netdevice.7:28
10963 msgid ""
10964 "This man page describes the sockets interface which is used to configure "
10965 "network devices."
10966 msgstr ""
10967
10968 #. type: Plain text
10969 #: build/C/man7/netdevice.7:35
10970 msgid ""
10971 "Linux supports some standard ioctls to configure network devices.  They can "
10972 "be used on any socket's file descriptor regardless of the family or type.  "
10973 "Most of them pass an I<ifreq> structure:"
10974 msgstr ""
10975
10976 #. type: Plain text
10977 #: build/C/man7/netdevice.7:56
10978 #, no-wrap
10979 msgid ""
10980 "struct ifreq {\n"
10981 "    char ifr_name[IFNAMSIZ]; /* Interface name */\n"
10982 "    union {\n"
10983 "        struct sockaddr ifr_addr;\n"
10984 "        struct sockaddr ifr_dstaddr;\n"
10985 "        struct sockaddr ifr_broadaddr;\n"
10986 "        struct sockaddr ifr_netmask;\n"
10987 "        struct sockaddr ifr_hwaddr;\n"
10988 "        short           ifr_flags;\n"
10989 "        int             ifr_ifindex;\n"
10990 "        int             ifr_metric;\n"
10991 "        int             ifr_mtu;\n"
10992 "        struct ifmap    ifr_map;\n"
10993 "        char            ifr_slave[IFNAMSIZ];\n"
10994 "        char            ifr_newname[IFNAMSIZ];\n"
10995 "        char           *ifr_data;\n"
10996 "    };\n"
10997 "};\n"
10998 msgstr ""
10999
11000 #. type: Plain text
11001 #: build/C/man7/netdevice.7:64
11002 msgid ""
11003 "Normally, the user specifies which device to affect by setting I<ifr_name> "
11004 "to the name of the interface.  All other members of the structure may share "
11005 "memory."
11006 msgstr ""
11007
11008 #. type: Plain text
11009 #: build/C/man7/netdevice.7:72
11010 msgid ""
11011 "If an ioctl is marked as privileged, then using it requires an effective "
11012 "user ID of 0 or the B<CAP_NET_ADMIN> capability.  If this is not the case, "
11013 "B<EPERM> will be returned."
11014 msgstr ""
11015
11016 #. type: TP
11017 #: build/C/man7/netdevice.7:72
11018 #, no-wrap
11019 msgid "B<SIOCGIFNAME>"
11020 msgstr ""
11021
11022 #. type: Plain text
11023 #: build/C/man7/netdevice.7:80
11024 msgid ""
11025 "Given the I<ifr_ifindex>, return the name of the interface in I<ifr_name>.  "
11026 "This is the only ioctl which returns its result in I<ifr_name>."
11027 msgstr ""
11028
11029 #. type: TP
11030 #: build/C/man7/netdevice.7:80
11031 #, no-wrap
11032 msgid "B<SIOCGIFINDEX>"
11033 msgstr ""
11034
11035 #. type: Plain text
11036 #: build/C/man7/netdevice.7:84
11037 msgid "Retrieve the interface index of the interface into I<ifr_ifindex>."
11038 msgstr ""
11039
11040 #. type: TP
11041 #: build/C/man7/netdevice.7:84
11042 #, no-wrap
11043 msgid "B<SIOCGIFFLAGS>, B<SIOCSIFFLAGS>"
11044 msgstr ""
11045
11046 #.  Do not right adjust text blocks in tables
11047 #. type: Plain text
11048 #: build/C/man7/netdevice.7:90
11049 msgid ""
11050 "Get or set the active flag word of the device.  I<ifr_flags> contains a bit "
11051 "mask of the following values:"
11052 msgstr ""
11053
11054 #. type: tbl table
11055 #: build/C/man7/netdevice.7:95
11056 #, no-wrap
11057 msgid "Device flags\n"
11058 msgstr ""
11059
11060 #. type: tbl table
11061 #: build/C/man7/netdevice.7:96
11062 #, no-wrap
11063 msgid "IFF_UP:Interface is running.\n"
11064 msgstr ""
11065
11066 #. type: tbl table
11067 #: build/C/man7/netdevice.7:97
11068 #, no-wrap
11069 msgid "IFF_BROADCAST:Valid broadcast address set.\n"
11070 msgstr ""
11071
11072 #. type: tbl table
11073 #: build/C/man7/netdevice.7:98
11074 #, no-wrap
11075 msgid "IFF_DEBUG:Internal debugging flag.\n"
11076 msgstr ""
11077
11078 #. type: tbl table
11079 #: build/C/man7/netdevice.7:99
11080 #, no-wrap
11081 msgid "IFF_LOOPBACK:Interface is a loopback interface.\n"
11082 msgstr ""
11083
11084 #. type: tbl table
11085 #: build/C/man7/netdevice.7:100
11086 #, no-wrap
11087 msgid "IFF_POINTOPOINT:Interface is a point-to-point link.\n"
11088 msgstr ""
11089
11090 #. type: tbl table
11091 #: build/C/man7/netdevice.7:101
11092 #, no-wrap
11093 msgid "IFF_RUNNING:Resources allocated.\n"
11094 msgstr ""
11095
11096 #. type: tbl table
11097 #: build/C/man7/netdevice.7:102
11098 #, no-wrap
11099 msgid "IFF_NOARP:T{\n"
11100 msgstr ""
11101
11102 #. type: tbl table
11103 #: build/C/man7/netdevice.7:103
11104 #, no-wrap
11105 msgid "No arp protocol, L2 destination address not set.\n"
11106 msgstr ""
11107
11108 #. type: tbl table
11109 #: build/C/man7/netdevice.7:104 build/C/man7/netdevice.7:115
11110 #, no-wrap
11111 msgid "T}\n"
11112 msgstr ""
11113
11114 #. type: tbl table
11115 #: build/C/man7/netdevice.7:105
11116 #, no-wrap
11117 msgid "IFF_PROMISC:Interface is in promiscuous mode.\n"
11118 msgstr ""
11119
11120 #. type: tbl table
11121 #: build/C/man7/netdevice.7:106
11122 #, no-wrap
11123 msgid "IFF_NOTRAILERS:Avoid use of trailers.\n"
11124 msgstr ""
11125
11126 #. type: tbl table
11127 #: build/C/man7/netdevice.7:107
11128 #, no-wrap
11129 msgid "IFF_ALLMULTI:Receive all multicast packets.\n"
11130 msgstr ""
11131
11132 #. type: tbl table
11133 #: build/C/man7/netdevice.7:108
11134 #, no-wrap
11135 msgid "IFF_MASTER:Master of a load balancing bundle.\n"
11136 msgstr ""
11137
11138 #. type: tbl table
11139 #: build/C/man7/netdevice.7:109
11140 #, no-wrap
11141 msgid "IFF_SLAVE:Slave of a load balancing bundle.\n"
11142 msgstr ""
11143
11144 #. type: tbl table
11145 #: build/C/man7/netdevice.7:110
11146 #, no-wrap
11147 msgid "IFF_MULTICAST:Supports multicast\n"
11148 msgstr ""
11149
11150 #. type: tbl table
11151 #: build/C/man7/netdevice.7:111
11152 #, no-wrap
11153 msgid "IFF_PORTSEL:Is able to select media type via ifmap.\n"
11154 msgstr ""
11155
11156 #. type: tbl table
11157 #: build/C/man7/netdevice.7:112
11158 #, no-wrap
11159 msgid "IFF_AUTOMEDIA:Auto media selection active.\n"
11160 msgstr ""
11161
11162 #. type: tbl table
11163 #: build/C/man7/netdevice.7:113
11164 #, no-wrap
11165 msgid "IFF_DYNAMIC:T{\n"
11166 msgstr ""
11167
11168 #. type: tbl table
11169 #: build/C/man7/netdevice.7:114
11170 #, no-wrap
11171 msgid "The addresses are lost when the interface goes down.\n"
11172 msgstr ""
11173
11174 #. type: tbl table
11175 #: build/C/man7/netdevice.7:116
11176 #, no-wrap
11177 msgid "IFF_LOWER_UP:Driver signals L1 up (since Linux 2.6.17)\n"
11178 msgstr ""
11179
11180 #. type: tbl table
11181 #: build/C/man7/netdevice.7:117
11182 #, no-wrap
11183 msgid "IFF_DORMANT:Driver signals dormant (since Linux 2.6.17)\n"
11184 msgstr ""
11185
11186 #. type: tbl table
11187 #: build/C/man7/netdevice.7:118
11188 #, no-wrap
11189 msgid "IFF_ECHO:Echo sent packets (since Linux 2.6.25)\n"
11190 msgstr ""
11191
11192 #. type: Plain text
11193 #: build/C/man7/netdevice.7:124
11194 msgid ""
11195 "Setting the active flag word is a privileged operation, but any process may "
11196 "read it."
11197 msgstr ""
11198
11199 #. type: TP
11200 #: build/C/man7/netdevice.7:124
11201 #, no-wrap
11202 msgid "B<SIOCGIFPFLAGS>, B<SIOCSIFPFLAGS>"
11203 msgstr ""
11204
11205 #. type: Plain text
11206 #: build/C/man7/netdevice.7:129
11207 msgid ""
11208 "Get or set extended (private) flags for the device.  I<ifr_flags> contains a "
11209 "bit mask of the following values:"
11210 msgstr ""
11211
11212 #. type: tbl table
11213 #: build/C/man7/netdevice.7:133
11214 #, no-wrap
11215 msgid "Private flags\n"
11216 msgstr ""
11217
11218 #. type: tbl table
11219 #: build/C/man7/netdevice.7:134
11220 #, no-wrap
11221 msgid "IFF_802_1Q_VLAN:Interface is 802.1Q VLAN device.\n"
11222 msgstr ""
11223
11224 #. type: tbl table
11225 #: build/C/man7/netdevice.7:135
11226 #, no-wrap
11227 msgid "IFF_EBRIDGE:Interface is Ethernet bridging device.\n"
11228 msgstr ""
11229
11230 #. type: tbl table
11231 #: build/C/man7/netdevice.7:136
11232 #, no-wrap
11233 msgid "IFF_SLAVE_INACTIVE:Interface is inactive bonding slave.\n"
11234 msgstr ""
11235
11236 #. type: tbl table
11237 #: build/C/man7/netdevice.7:137
11238 #, no-wrap
11239 msgid "IFF_MASTER_8023AD:Interface is 802.3ad bonding master.\n"
11240 msgstr ""
11241
11242 #. type: tbl table
11243 #: build/C/man7/netdevice.7:138
11244 #, no-wrap
11245 msgid "IFF_MASTER_ALB:Interface is balanced-alb bonding master.\n"
11246 msgstr ""
11247
11248 #. type: tbl table
11249 #: build/C/man7/netdevice.7:139
11250 #, no-wrap
11251 msgid "IFF_BONDING:Interface is a bonding master or slave.\n"
11252 msgstr ""
11253
11254 #. type: tbl table
11255 #: build/C/man7/netdevice.7:140
11256 #, no-wrap
11257 msgid "IFF_SLAVE_NEEDARP:Interface needs ARPs for validation.\n"
11258 msgstr ""
11259
11260 #. type: tbl table
11261 #: build/C/man7/netdevice.7:141
11262 #, no-wrap
11263 msgid "IFF_ISATAP:Interface is RFC4214 ISATAP interface.\n"
11264 msgstr ""
11265
11266 #. type: Plain text
11267 #: build/C/man7/netdevice.7:145
11268 msgid "Setting the extended (private) interface flags is a privileged operation."
11269 msgstr ""
11270
11271 #. type: TP
11272 #: build/C/man7/netdevice.7:145
11273 #, no-wrap
11274 msgid "B<SIOCGIFADDR>, B<SIOCSIFADDR>"
11275 msgstr ""
11276
11277 #. type: Plain text
11278 #: build/C/man7/netdevice.7:153
11279 msgid ""
11280 "Get or set the address of the device using I<ifr_addr>.  Setting the "
11281 "interface address is a privileged operation.  For compatibility, only "
11282 "B<AF_INET> addresses are accepted or returned."
11283 msgstr ""
11284
11285 #. type: TP
11286 #: build/C/man7/netdevice.7:153
11287 #, no-wrap
11288 msgid "B<SIOCGIFDSTADDR>, B<SIOCSIFDSTADDR>"
11289 msgstr ""
11290
11291 #. type: Plain text
11292 #: build/C/man7/netdevice.7:161
11293 msgid ""
11294 "Get or set the destination address of a point-to-point device using "
11295 "I<ifr_dstaddr>.  For compatibility, only B<AF_INET> addresses are accepted "
11296 "or returned.  Setting the destination address is a privileged operation."
11297 msgstr ""
11298
11299 #. type: TP
11300 #: build/C/man7/netdevice.7:161
11301 #, no-wrap
11302 msgid "B<SIOCGIFBRDADDR>, B<SIOCSIFBRDADDR>"
11303 msgstr ""
11304
11305 #. type: Plain text
11306 #: build/C/man7/netdevice.7:169
11307 msgid ""
11308 "Get or set the broadcast address for a device using I<ifr_brdaddr>.  For "
11309 "compatibility, only B<AF_INET> addresses are accepted or returned.  Setting "
11310 "the broadcast address is a privileged operation."
11311 msgstr ""
11312
11313 #. type: TP
11314 #: build/C/man7/netdevice.7:169
11315 #, no-wrap
11316 msgid "B<SIOCGIFNETMASK>, B<SIOCSIFNETMASK>"
11317 msgstr ""
11318
11319 #. type: Plain text
11320 #: build/C/man7/netdevice.7:177
11321 msgid ""
11322 "Get or set the network mask for a device using I<ifr_netmask>.  For "
11323 "compatibility, only B<AF_INET> addresses are accepted or returned.  Setting "
11324 "the network mask is a privileged operation."
11325 msgstr ""
11326
11327 #. type: TP
11328 #: build/C/man7/netdevice.7:177
11329 #, no-wrap
11330 msgid "B<SIOCGIFMETRIC>, B<SIOCSIFMETRIC>"
11331 msgstr ""
11332
11333 #. type: Plain text
11334 #: build/C/man7/netdevice.7:186
11335 msgid ""
11336 "Get or set the metric of the device using I<ifr_metric>.  This is currently "
11337 "not implemented; it sets I<ifr_metric> to 0 if you attempt to read it and "
11338 "returns B<EOPNOTSUPP> if you attempt to set it."
11339 msgstr ""
11340
11341 #. type: TP
11342 #: build/C/man7/netdevice.7:186
11343 #, no-wrap
11344 msgid "B<SIOCGIFMTU>, B<SIOCSIFMTU>"
11345 msgstr ""
11346
11347 #. type: Plain text
11348 #: build/C/man7/netdevice.7:193
11349 msgid ""
11350 "Get or set the MTU (Maximum Transfer Unit) of a device using I<ifr_mtu>.  "
11351 "Setting the MTU is a privileged operation.  Setting the MTU to too small "
11352 "values may cause kernel crashes."
11353 msgstr ""
11354
11355 #. type: TP
11356 #: build/C/man7/netdevice.7:193
11357 #, no-wrap
11358 msgid "B<SIOCGIFHWADDR>, B<SIOCSIFHWADDR>"
11359 msgstr ""
11360
11361 #. type: Plain text
11362 #: build/C/man7/netdevice.7:204
11363 msgid ""
11364 "Get or set the hardware address of a device using I<ifr_hwaddr>.  The "
11365 "hardware address is specified in a struct I<sockaddr>.  I<sa_family> "
11366 "contains the ARPHRD_* device type, I<sa_data> the L2 hardware address "
11367 "starting from byte 0.  Setting the hardware address is a privileged "
11368 "operation."
11369 msgstr ""
11370
11371 #. type: TP
11372 #: build/C/man7/netdevice.7:204
11373 #, no-wrap
11374 msgid "B<SIOCSIFHWBROADCAST>"
11375 msgstr ""
11376
11377 #. type: Plain text
11378 #: build/C/man7/netdevice.7:209
11379 msgid ""
11380 "Set the hardware broadcast address of a device from I<ifr_hwaddr>.  This is "
11381 "a privileged operation."
11382 msgstr ""
11383
11384 #. type: TP
11385 #: build/C/man7/netdevice.7:209
11386 #, no-wrap
11387 msgid "B<SIOCGIFMAP>, B<SIOCSIFMAP>"
11388 msgstr ""
11389
11390 #. type: Plain text
11391 #: build/C/man7/netdevice.7:214
11392 msgid ""
11393 "Get or set the interface's hardware parameters using I<ifr_map>.  Setting "
11394 "the parameters is a privileged operation."
11395 msgstr ""
11396
11397 #. type: Plain text
11398 #: build/C/man7/netdevice.7:225
11399 #, no-wrap
11400 msgid ""
11401 "struct ifmap {\n"
11402 "    unsigned long   mem_start;\n"
11403 "    unsigned long   mem_end;\n"
11404 "    unsigned short  base_addr;\n"
11405 "    unsigned char   irq;\n"
11406 "    unsigned char   dma;\n"
11407 "    unsigned char   port;\n"
11408 "};\n"
11409 msgstr ""
11410
11411 #. type: Plain text
11412 #: build/C/man7/netdevice.7:230
11413 msgid ""
11414 "The interpretation of the ifmap structure depends on the device driver and "
11415 "the architecture."
11416 msgstr ""
11417
11418 #. type: TP
11419 #: build/C/man7/netdevice.7:230
11420 #, no-wrap
11421 msgid "B<SIOCADDMULTI>, B<SIOCDELMULTI>"
11422 msgstr ""
11423
11424 #. type: Plain text
11425 #: build/C/man7/netdevice.7:239
11426 msgid ""
11427 "Add an address to or delete an address from the device's link layer "
11428 "multicast filters using I<ifr_hwaddr>.  These are privileged operations.  "
11429 "See also B<packet>(7)  for an alternative."
11430 msgstr ""
11431
11432 #. type: TP
11433 #: build/C/man7/netdevice.7:239
11434 #, no-wrap
11435 msgid "B<SIOCGIFTXQLEN>, B<SIOCSIFTXQLEN>"
11436 msgstr ""
11437
11438 #. type: Plain text
11439 #: build/C/man7/netdevice.7:244
11440 msgid ""
11441 "Get or set the transmit queue length of a device using I<ifr_qlen>.  Setting "
11442 "the transmit queue length is a privileged operation."
11443 msgstr ""
11444
11445 #. type: TP
11446 #: build/C/man7/netdevice.7:244
11447 #, no-wrap
11448 msgid "B<SIOCSIFNAME>"
11449 msgstr ""
11450
11451 #. type: Plain text
11452 #: build/C/man7/netdevice.7:253
11453 msgid ""
11454 "Changes the name of the interface specified in I<ifr_name> to "
11455 "I<ifr_newname>.  This is a privileged operation.  It is allowed only when "
11456 "the interface is not up."
11457 msgstr ""
11458
11459 #. type: TP
11460 #: build/C/man7/netdevice.7:253
11461 #, no-wrap
11462 msgid "B<SIOCGIFCONF>"
11463 msgstr ""
11464
11465 #. type: Plain text
11466 #: build/C/man7/netdevice.7:263
11467 msgid ""
11468 "Return a list of interface (transport layer) addresses.  This currently "
11469 "means only addresses of the B<AF_INET> (IPv4) family for compatibility.  "
11470 "Unlike the others, this ioctl passes an I<ifconf> structure:"
11471 msgstr ""
11472
11473 #. type: Plain text
11474 #: build/C/man7/netdevice.7:273
11475 #, no-wrap
11476 msgid ""
11477 "struct ifconf {\n"
11478 "    int                 ifc_len; /* size of buffer */\n"
11479 "    union {\n"
11480 "        char           *ifc_buf; /* buffer address */\n"
11481 "        struct ifreq   *ifc_req; /* array of structures */\n"
11482 "    };\n"
11483 "};\n"
11484 msgstr ""
11485
11486 #. type: Plain text
11487 #: build/C/man7/netdevice.7:299
11488 msgid ""
11489 "If I<ifc_req> is NULL, B<SIOCGIFCONF> returns the necessary buffer size in "
11490 "bytes for receiving all available addresses in I<ifc_len>.  Otherwise, "
11491 "I<ifc_req> contains a pointer to an array of I<ifreq> structures to be "
11492 "filled with all currently active L3 interface addresses.  I<ifc_len> "
11493 "contains the size of the array in bytes.  Within each I<ifreq> structure, "
11494 "I<ifr_name> will receive the interface name, and I<ifr_addr> the address.  "
11495 "The actual number of bytes transferred is returned in I<ifc_len>."
11496 msgstr ""
11497
11498 #. type: Plain text
11499 #: build/C/man7/netdevice.7:315
11500 msgid ""
11501 "If the size specified by I<ifc_len> is insufficient to store all the "
11502 "addresses, the kernel will skip the exceeding ones and return success.  "
11503 "There is no reliable way of detecting this condition once it has occurred.  "
11504 "It is therefore recommended to either determine the necessary buffer size "
11505 "beforehand by calling B<SIOCGIFCONF> with I<ifc_req> set to NULL, or to "
11506 "retry the call with a bigger buffer whenever I<ifc_len> upon return differs "
11507 "by less than I<sizeof(struct ifreq)> from its original value."
11508 msgstr ""
11509
11510 #.  Slaving isn't supported in 2.2
11511 #.  .
11512 #.  .TP
11513 #.  .BR SIOCGIFSLAVE ", " SIOCSIFSLAVE
11514 #.  Get or set the slave device using
11515 #.  .IR ifr_slave .
11516 #.  Setting the slave device is a privileged operation.
11517 #.  .PP
11518 #.  FIXME . add amateur radio stuff.
11519 #. type: Plain text
11520 #: build/C/man7/netdevice.7:332
11521 msgid ""
11522 "If an error occurs accessing the I<ifconf> or I<ifreq> structures, B<EFAULT> "
11523 "will be returned."
11524 msgstr ""
11525
11526 #. type: Plain text
11527 #: build/C/man7/netdevice.7:338
11528 msgid ""
11529 "Most protocols support their own ioctls to configure protocol-specific "
11530 "interface options.  See the protocol man pages for a description.  For "
11531 "configuring IP addresses, see B<ip>(7)."
11532 msgstr ""
11533
11534 #. type: Plain text
11535 #: build/C/man7/netdevice.7:341
11536 msgid ""
11537 "In addition, some devices support private ioctls.  These are not described "
11538 "here."
11539 msgstr ""
11540
11541 #. type: Plain text
11542 #: build/C/man7/netdevice.7:349
11543 msgid ""
11544 "Strictly speaking, B<SIOCGIFCONF> and the other ioctls that accept or return "
11545 "only B<AF_INET> socket addresses, are IP-specific and belong in B<ip>(7)."
11546 msgstr ""
11547
11548 #. type: Plain text
11549 #: build/C/man7/netdevice.7:354
11550 msgid ""
11551 "The names of interfaces with no addresses or that don't have the "
11552 "B<IFF_RUNNING> flag set can be found via I</proc/net/dev>."
11553 msgstr ""
11554
11555 #. type: Plain text
11556 #: build/C/man7/netdevice.7:359
11557 msgid ""
11558 "Local IPv6 IP addresses can be found via I</proc/net> or via "
11559 "B<rtnetlink>(7)."
11560 msgstr ""
11561
11562 #. type: Plain text
11563 #: build/C/man7/netdevice.7:365
11564 msgid ""
11565 "glibc 2.1 is missing the I<ifr_newname> macro in I<E<lt>net/if.hE<gt>>.  Add "
11566 "the following to your program as a workaround:"
11567 msgstr ""
11568
11569 #. type: Plain text
11570 #: build/C/man7/netdevice.7:371
11571 #, no-wrap
11572 msgid ""
11573 "#ifndef ifr_newname\n"
11574 "#define ifr_newname     ifr_ifru.ifru_slave\n"
11575 "#endif\n"
11576 msgstr ""
11577
11578 #. type: Plain text
11579 #: build/C/man7/netdevice.7:378
11580 msgid "B<proc>(5), B<capabilities>(7), B<ip>(7), B<rtnetlink>(7)"
11581 msgstr ""
11582
11583 #. type: TH
11584 #: build/C/man5/networks.5:26
11585 #, no-wrap
11586 msgid "NETWORKS"
11587 msgstr ""
11588
11589 #. type: TH
11590 #: build/C/man5/networks.5:26
11591 #, no-wrap
11592 msgid "2008-09-04"
11593 msgstr ""
11594
11595 #. type: TH
11596 #: build/C/man5/networks.5:26
11597 #, no-wrap
11598 msgid "GNU/Linux"
11599 msgstr ""
11600
11601 #. type: Plain text
11602 #: build/C/man5/networks.5:29
11603 msgid "networks - network name information"
11604 msgstr ""
11605
11606 #. type: Plain text
11607 #: build/C/man5/networks.5:35
11608 msgid ""
11609 "The file I</etc/networks> is a plain ASCII file that describes known DARPA "
11610 "networks and symbolic names for these networks.  Each line represents a "
11611 "network and has the following structure:"
11612 msgstr ""
11613
11614 #. type: Plain text
11615 #: build/C/man5/networks.5:38
11616 msgid "I<name number aliases ...>"
11617 msgstr ""
11618
11619 #. type: Plain text
11620 #: build/C/man5/networks.5:46
11621 msgid ""
11622 "where the fields are delimited by spaces or tabs.  Empty lines are ignored.  "
11623 "The hash character (B<#>) indicates the start of a comment: this character, "
11624 "and the remaining characters up to the end of the current line, are ignored "
11625 "by library functions that process the file."
11626 msgstr ""
11627
11628 #. type: Plain text
11629 #: build/C/man5/networks.5:48 build/C/man5/protocols.5:59
11630 msgid "The field descriptions are:"
11631 msgstr ""
11632
11633 #. type: TP
11634 #: build/C/man5/networks.5:48
11635 #, no-wrap
11636 msgid "I<name>"
11637 msgstr ""
11638
11639 #. type: Plain text
11640 #: build/C/man5/networks.5:53
11641 msgid ""
11642 "The symbolic name for the network.  Network names can contain any printable "
11643 "characters except white-space characters or the comment character."
11644 msgstr ""
11645
11646 #. type: TP
11647 #: build/C/man5/networks.5:53 build/C/man5/protocols.5:67
11648 #, no-wrap
11649 msgid "I<number>"
11650 msgstr ""
11651
11652 #. type: Plain text
11653 #: build/C/man5/networks.5:58
11654 msgid ""
11655 "The official number for this network in numbers-and-dots notation (see "
11656 "B<inet>(3)).  The trailing \".0\" (for the host component of the network "
11657 "address) may be omitted."
11658 msgstr ""
11659
11660 #. type: TP
11661 #: build/C/man5/networks.5:58 build/C/man5/protocols.5:71 build/C/man5/services.5:120
11662 #, no-wrap
11663 msgid "I<aliases>"
11664 msgstr ""
11665
11666 #. type: Plain text
11667 #: build/C/man5/networks.5:61
11668 msgid "Optional aliases for the network."
11669 msgstr ""
11670
11671 #. type: Plain text
11672 #: build/C/man5/networks.5:70
11673 msgid ""
11674 "This file is read by the B<route>(8)  and B<netstat>(8)  utilities.  Only "
11675 "Class A, B or C networks are supported, partitioned networks (i.e., "
11676 "network/26 or network/28) are not supported by this facility."
11677 msgstr ""
11678
11679 #. type: Plain text
11680 #: build/C/man5/networks.5:74
11681 msgid "The networks definition file."
11682 msgstr ""
11683
11684 #. type: Plain text
11685 #: build/C/man5/networks.5:80
11686 msgid ""
11687 "B<getnetbyaddr>(3), B<getnetbyname>(3), B<getnetent>(3), B<netstat>(8), "
11688 "B<route>(8)"
11689 msgstr ""
11690
11691 #. type: TH
11692 #: build/C/man8/nscd.8:23
11693 #, no-wrap
11694 msgid "NSCD"
11695 msgstr ""
11696
11697 #. type: Plain text
11698 #: build/C/man8/nscd.8:26
11699 msgid "nscd - name service cache daemon"
11700 msgstr ""
11701
11702 #. type: Plain text
11703 #: build/C/man8/nscd.8:34
11704 msgid ""
11705 "Nscd is a daemon that provides a cache for the most common name service "
11706 "requests.  The default configuration file, I</etc/nscd.conf>, determines the "
11707 "behavior of the cache daemon.  See B<nscd.conf>(5)."
11708 msgstr ""
11709
11710 #. type: Plain text
11711 #: build/C/man8/nscd.8:47
11712 msgid ""
11713 "Nscd provides caching for accesses of the B<passwd>(5), B<group>(5), and "
11714 "B<hosts>(5)  databases through standard libc interfaces, such as "
11715 "B<getpwnam>(3), B<getpwuid>(3), B<getgrnam>(3), B<getgrgid>(3), "
11716 "B<gethostbyname>(3), and others."
11717 msgstr ""
11718
11719 #. type: Plain text
11720 #: build/C/man8/nscd.8:56
11721 msgid ""
11722 "There are two caches for each database: a positive one for items found, and "
11723 "a negative one for items not found.  Each cache has a separate TTL "
11724 "(time-to-live)  period for its data.  Note that the shadow file is "
11725 "specifically not cached.  B<getspnam>(3)  calls remain uncached as a result."
11726 msgstr ""
11727
11728 #. type: SH
11729 #: build/C/man8/nscd.8:56
11730 #, no-wrap
11731 msgid "OPTIONS"
11732 msgstr ""
11733
11734 #. type: TP
11735 #: build/C/man8/nscd.8:57
11736 #, no-wrap
11737 msgid "B<--help>"
11738 msgstr ""
11739
11740 #. type: Plain text
11741 #: build/C/man8/nscd.8:60
11742 msgid "will give you a list with all options and what they do."
11743 msgstr ""
11744
11745 #. type: Plain text
11746 #: build/C/man8/nscd.8:83
11747 msgid ""
11748 "The daemon will try to watch for changes in configuration files appropriate "
11749 "for each database (e.g., I</etc/passwd> for the I<passwd> database or "
11750 "I</etc/hosts> and I</etc/resolv.conf> for the I<hosts> database), and flush "
11751 "the cache when these are changed.  However, this will happen only after a "
11752 "short delay (unless the B<inotify>(7)  mechanism is available and glibc 2.9 "
11753 "or later is available), and this auto-detection does not cover configuration "
11754 "files required by nonstandard NSS modules, if any are specified in "
11755 "I</etc/nsswitch.conf>.  In that case, you need to run the following command "
11756 "after changing the configuration file of the database so that B<nscd> "
11757 "invalidates its cache:"
11758 msgstr ""
11759
11760 #. type: Plain text
11761 #: build/C/man8/nscd.8:85
11762 #, no-wrap
11763 msgid "    $ B<nscd -i> I<E<lt>databaseE<gt>>\n"
11764 msgstr ""
11765
11766 #.  .SH AUTHOR
11767 #.  .B nscd
11768 #.  was written by Thorsten Kukuk and Ulrich Drepper.
11769 #. type: Plain text
11770 #: build/C/man8/nscd.8:91
11771 msgid "B<nscd.conf>(5), B<nsswitch.conf>(5)"
11772 msgstr ""
11773
11774 #. type: TH
11775 #: build/C/man5/nscd.conf.5:20
11776 #, no-wrap
11777 msgid "NSCD.CONF"
11778 msgstr ""
11779
11780 #. type: TH
11781 #: build/C/man5/nscd.conf.5:20
11782 #, no-wrap
11783 msgid "2014-02-07"
11784 msgstr ""
11785
11786 #. type: Plain text
11787 #: build/C/man5/nscd.conf.5:23
11788 msgid "/etc/nscd.conf - name service cache daemon configuration file"
11789 msgstr ""
11790
11791 #. type: Plain text
11792 #: build/C/man5/nscd.conf.5:36
11793 msgid ""
11794 "The file I</etc/nscd.conf> is read from B<nscd>(8)  at startup.  Each line "
11795 "specifies either an attribute and a value, or an attribute, service, and a "
11796 "value.  Fields are separated either by SPACE or TAB characters.  A "
11797 "\\(aq#\\(aq (number sign) indicates the beginning of a comment; following "
11798 "characters, up to the end of the line, are not interpreted by nscd."
11799 msgstr ""
11800
11801 #. type: Plain text
11802 #: build/C/man5/nscd.conf.5:39
11803 msgid ""
11804 "Valid services are I<passwd>, I<group>, I<hosts>, I<services>, or "
11805 "I<netgroup>."
11806 msgstr ""
11807
11808 #. type: Plain text
11809 #: build/C/man5/nscd.conf.5:42
11810 msgid "B<logfile> I<debug-file-name>"
11811 msgstr ""
11812
11813 #. type: Plain text
11814 #: build/C/man5/nscd.conf.5:44
11815 msgid "Specifies name of the file to which debug info should be written."
11816 msgstr ""
11817
11818 #. type: Plain text
11819 #: build/C/man5/nscd.conf.5:48
11820 msgid "B<debug-level> I<value>"
11821 msgstr ""
11822
11823 #. type: Plain text
11824 #: build/C/man5/nscd.conf.5:51
11825 msgid "Sets the desired debug level.  The default is 0."
11826 msgstr ""
11827
11828 #. type: Plain text
11829 #: build/C/man5/nscd.conf.5:55
11830 msgid "B<threads> I<number>"
11831 msgstr ""
11832
11833 #. type: Plain text
11834 #: build/C/man5/nscd.conf.5:59
11835 msgid ""
11836 "This is the number of threads that are started to wait for requests.  At "
11837 "least five threads will always be created."
11838 msgstr ""
11839
11840 #. type: Plain text
11841 #: build/C/man5/nscd.conf.5:63
11842 msgid "B<max-threads> I<number>"
11843 msgstr ""
11844
11845 #. type: Plain text
11846 #: build/C/man5/nscd.conf.5:66
11847 msgid "Specifies the maximum number of threads.  The default is 32."
11848 msgstr ""
11849
11850 #. type: Plain text
11851 #: build/C/man5/nscd.conf.5:70
11852 msgid "B<server-user> I<user>"
11853 msgstr ""
11854
11855 #. type: Plain text
11856 #: build/C/man5/nscd.conf.5:74
11857 msgid ""
11858 "If this option is set, nscd will run as this user and not as root.  If a "
11859 "separate cache for every user is used (-S parameter), this option is "
11860 "ignored."
11861 msgstr ""
11862
11863 #. type: Plain text
11864 #: build/C/man5/nscd.conf.5:78
11865 msgid "B<stat-user> I<user>"
11866 msgstr ""
11867
11868 #. type: Plain text
11869 #: build/C/man5/nscd.conf.5:80
11870 msgid "Specifies the user who is allowed to request statistics."
11871 msgstr ""
11872
11873 #. type: Plain text
11874 #: build/C/man5/nscd.conf.5:85
11875 msgid "B<reload-count> unlimited | I<number>"
11876 msgstr ""
11877
11878 #. type: Plain text
11879 #: build/C/man5/nscd.conf.5:89
11880 msgid ""
11881 "Limit on the number of times a cached entry gets reloaded without being used "
11882 "before it gets removed.  The default is 5."
11883 msgstr ""
11884
11885 #. type: Plain text
11886 #: build/C/man5/nscd.conf.5:93
11887 msgid "B<paranoia> I<E<lt>yes|noE<gt>>"
11888 msgstr ""
11889
11890 #. type: Plain text
11891 #: build/C/man5/nscd.conf.5:96
11892 msgid ""
11893 "Enabling paranoia mode causes nscd to restart itself periodically.  The "
11894 "default is no."
11895 msgstr ""
11896
11897 #. type: Plain text
11898 #: build/C/man5/nscd.conf.5:100
11899 msgid "B<restart-interval> I<time>"
11900 msgstr ""
11901
11902 #. type: Plain text
11903 #: build/C/man5/nscd.conf.5:108
11904 msgid ""
11905 "Sets the restart interval to I<time> seconds if periodic restart is enabled "
11906 "by enabling B<paranoia> mode.  The default is 3600."
11907 msgstr ""
11908
11909 #. type: Plain text
11910 #: build/C/man5/nscd.conf.5:113
11911 msgid "B<enable-cache> I<service> I<E<lt>yes|noE<gt>>"
11912 msgstr ""
11913
11914 #. type: Plain text
11915 #: build/C/man5/nscd.conf.5:118
11916 msgid "Enables or disables the specified I<service> cache.  The default is no."
11917 msgstr ""
11918
11919 #. type: Plain text
11920 #: build/C/man5/nscd.conf.5:123
11921 msgid "B<positive-time-to-live> I<service> I<value>"
11922 msgstr ""
11923
11924 #. type: Plain text
11925 #: build/C/man5/nscd.conf.5:131
11926 msgid ""
11927 "Sets the TTL (time-to-live) for positive entries (successful queries)  in "
11928 "the specified cache for I<service>.  I<Value> is in seconds.  Larger values "
11929 "increase cache hit rates and reduce mean response times, but increase "
11930 "problems with cache coherence."
11931 msgstr ""
11932
11933 #. type: Plain text
11934 #: build/C/man5/nscd.conf.5:136
11935 msgid "B<negative-time-to-live> I<service> I<value>"
11936 msgstr ""
11937
11938 #. type: Plain text
11939 #: build/C/man5/nscd.conf.5:146
11940 msgid ""
11941 "Sets the TTL (time-to-live) for negative entries (unsuccessful queries)  in "
11942 "the specified cache for I<service>.  I<Value> is in seconds.  Can result in "
11943 "significant performance improvements if there are several files owned by "
11944 "UIDs (user IDs) not in system databases (for example untarring the Linux "
11945 "kernel sources as root); should be kept small to reduce cache coherency "
11946 "problems."
11947 msgstr ""
11948
11949 #. type: Plain text
11950 #: build/C/man5/nscd.conf.5:151
11951 msgid "B<suggested-size> I<service> I<value>"
11952 msgstr ""
11953
11954 #. type: Plain text
11955 #: build/C/man5/nscd.conf.5:156
11956 msgid ""
11957 "This is the internal hash table size, I<value> should remain a prime number "
11958 "for optimum efficiency.  The default is 211."
11959 msgstr ""
11960
11961 #. type: Plain text
11962 #: build/C/man5/nscd.conf.5:161
11963 msgid "B<check-files> I<service> I<E<lt>yes|noE<gt>>"
11964 msgstr ""
11965
11966 #. type: Plain text
11967 #: build/C/man5/nscd.conf.5:173
11968 msgid ""
11969 "Enables or disables checking the file belonging to the specified I<service> "
11970 "for changes.  The files are I</etc/passwd>, I</etc/group>, I</etc/hosts>, "
11971 "I</etc/services> and I</etc/netgroup>.  The default is yes."
11972 msgstr ""
11973
11974 #. type: Plain text
11975 #: build/C/man5/nscd.conf.5:178
11976 msgid "B<persistent> I<service> I<E<lt>yes|noE<gt>>"
11977 msgstr ""
11978
11979 #. type: Plain text
11980 #: build/C/man5/nscd.conf.5:185
11981 msgid ""
11982 "Keep the content of the cache for I<service> over server restarts; useful "
11983 "when B<paranoia> mode is set.  The default is no."
11984 msgstr ""
11985
11986 #. type: Plain text
11987 #: build/C/man5/nscd.conf.5:190
11988 msgid "B<shared> I<service> I<E<lt>yes|noE<gt>>"
11989 msgstr ""
11990
11991 #. type: Plain text
11992 #: build/C/man5/nscd.conf.5:197
11993 msgid ""
11994 "The memory mapping of the nscd databases for I<service> is shared with the "
11995 "clients so that they can directly search in them instead of having to ask "
11996 "the daemon over the socket each time a lookup is performed.  The default is "
11997 "no."
11998 msgstr ""
11999
12000 #. type: Plain text
12001 #: build/C/man5/nscd.conf.5:202
12002 msgid "B<max-db-size> I<service> I<bytes>"
12003 msgstr ""
12004
12005 #. type: Plain text
12006 #: build/C/man5/nscd.conf.5:206
12007 msgid ""
12008 "The maximum allowable size, in bytes, of the database files for the "
12009 "I<service>.  The default is 33554432."
12010 msgstr ""
12011
12012 #. type: Plain text
12013 #: build/C/man5/nscd.conf.5:211
12014 msgid "B<auto-propagate> I<service> I<E<lt>yes|noE<gt>>"
12015 msgstr ""
12016
12017 #. type: Plain text
12018 #: build/C/man5/nscd.conf.5:231
12019 msgid ""
12020 "When set to I<no> for I<passwd> or I<group> service, then the I<.byname> "
12021 "requests are not added to I<passwd.byuid> or I<group.bygid> cache.  This can "
12022 "help with tables containing multiple records for the same ID.  The default "
12023 "is yes.  This option is valid only for services I<passwd> and I<group>."
12024 msgstr ""
12025
12026 #. type: Plain text
12027 #: build/C/man5/nscd.conf.5:239
12028 msgid ""
12029 "The default values stated in this manual page originate from the source code "
12030 "of B<nscd>(8)  and are used if not overridden in the configuration file.  "
12031 "The default values used in the configuration file of your distribution might "
12032 "differ."
12033 msgstr ""
12034
12035 #.  .SH AUTHOR
12036 #.  .B nscd
12037 #.  was written by Thorsten Kukuk and Ulrich Drepper.
12038 #. type: Plain text
12039 #: build/C/man5/nscd.conf.5:244
12040 msgid "B<nscd>(8)"
12041 msgstr ""
12042
12043 #. type: TH
12044 #: build/C/man5/nss.5:19
12045 #, no-wrap
12046 msgid "NSS"
12047 msgstr ""
12048
12049 #. type: Plain text
12050 #: build/C/man5/nss.5:22
12051 msgid "nss - Name Service Switch configuration file"
12052 msgstr ""
12053
12054 #. type: Plain text
12055 #: build/C/man5/nss.5:29
12056 msgid ""
12057 "Each call to a function which retrieves data from a system database like the "
12058 "password or group database is handled by the Name Service Switch "
12059 "implementation in the GNU C library.  The various services provided are "
12060 "implemented by independent modules, each of which naturally varies widely "
12061 "from the other."
12062 msgstr ""
12063
12064 #. type: Plain text
12065 #: build/C/man5/nss.5:38
12066 msgid ""
12067 "The default implementations coming with the GNU C library are by default "
12068 "conservative and do not use unsafe data.  This might be very costly in some "
12069 "situations, especially when the databases are large.  Some modules allow the "
12070 "system administrator to request taking shortcuts if these are known to be "
12071 "safe.  It is then the system administrator's responsibility to ensure the "
12072 "assumption is correct."
12073 msgstr ""
12074
12075 #. type: Plain text
12076 #: build/C/man5/nss.5:42
12077 msgid ""
12078 "There are other modules where the implementation changed over time.  If an "
12079 "implementation used to sacrifice speed for memory consumption, it might "
12080 "create problems if the preference is switched."
12081 msgstr ""
12082
12083 #. type: Plain text
12084 #: build/C/man5/nss.5:51
12085 msgid ""
12086 "The I</etc/default/nss> file contains a number of variable assignments.  "
12087 "Each variable controls the behavior of one or more NSS modules.  White "
12088 "spaces are ignored.  Lines beginning with \\(aq#\\(aq are treated as "
12089 "comments."
12090 msgstr ""
12091
12092 #. type: Plain text
12093 #: build/C/man5/nss.5:53
12094 msgid "The variables currently recognized are:"
12095 msgstr ""
12096
12097 #. type: TP
12098 #: build/C/man5/nss.5:53
12099 #, no-wrap
12100 msgid "B<NETID_AUTHORITATIVE => I<TRUE>|I<FALSE>"
12101 msgstr ""
12102
12103 #. type: Plain text
12104 #: build/C/man5/nss.5:68
12105 msgid ""
12106 "If set to TRUE, the NIS backend for the B<initgroups>(3)  function will "
12107 "accept the information from the I<netid.byname> NIS map as authoritative.  "
12108 "This can speed up the function significantly if the I<group.byname> map is "
12109 "large.  The content of the I<netid.byname> map is used B<as is>.  The system "
12110 "administrator has to make sure it is correctly generated."
12111 msgstr ""
12112
12113 #. type: TP
12114 #: build/C/man5/nss.5:68
12115 #, no-wrap
12116 msgid "B<SERVICES_AUTHORITATIVE => I<TRUE>|I<FALSE>"
12117 msgstr ""
12118
12119 #. type: Plain text
12120 #: build/C/man5/nss.5:80
12121 msgid ""
12122 "If set to TRUE, the NIS backend for the B<getservbyname>(3)  and "
12123 "B<getservbyname_r>(3)  functions will assume that the "
12124 "I<services.byservicename> NIS map exists and is authoritative, particularly "
12125 "that it contains both keys with /proto and without /proto for both primary "
12126 "service names and service aliases.  The system administrator has to make "
12127 "sure it is correctly generated."
12128 msgstr ""
12129
12130 #. type: TP
12131 #: build/C/man5/nss.5:80
12132 #, no-wrap
12133 msgid "B<SETENT_BATCH_READ => I<TRUE>|I<FALSE>"
12134 msgstr ""
12135
12136 #. type: Plain text
12137 #: build/C/man5/nss.5:98
12138 msgid ""
12139 "If set to TRUE, the NIS backend for the B<setpwent>(3)  and B<setgrent>(3)  "
12140 "functions will read the entire database at once and then hand out the "
12141 "requests one by one from memory with every corresponding B<getpwent>(3)  or "
12142 "B<getgrent>(3)  call respectively.  Otherwise, each B<getpwent>(3)  or "
12143 "B<getgrent>(3)  call might result in a network communication with the server "
12144 "to get the next entry."
12145 msgstr ""
12146
12147 #. type: Plain text
12148 #: build/C/man5/nss.5:100
12149 msgid "I</etc/default/nss>"
12150 msgstr ""
12151
12152 #. type: Plain text
12153 #: build/C/man5/nss.5:102
12154 msgid "The default configuration corresponds to the following configuration file:"
12155 msgstr ""
12156
12157 #.  .SH AUTHOR
12158 #.  Ulrich Drepper <drepper@redhat.com>
12159 #. type: Plain text
12160 #: build/C/man5/nss.5:110
12161 #, no-wrap
12162 msgid ""
12163 "NETID_AUTHORITATIVE=FALSE\n"
12164 "SERVICES_AUTHORITATIVE=FALSE\n"
12165 "SETENT_BATCH_READ=FALSE\n"
12166 msgstr ""
12167
12168 #. type: Plain text
12169 #: build/C/man5/nss.5:112
12170 msgid "I<nsswitch.conf>"
12171 msgstr ""
12172
12173 #. type: TH
12174 #: build/C/man5/nsswitch.conf.5:25
12175 #, no-wrap
12176 msgid "NSSWITCH.CONF"
12177 msgstr ""
12178
12179 #. type: Plain text
12180 #: build/C/man5/nsswitch.conf.5:28
12181 msgid "nsswitch.conf - Name Service Switch configuration file"
12182 msgstr ""
12183
12184 #. type: Plain text
12185 #: build/C/man5/nsswitch.conf.5:36
12186 msgid ""
12187 "The Name Service Switch (NSS) configuration file, I</etc/nsswitch.conf>, is "
12188 "used by the GNU C Library to determine the sources from which to obtain "
12189 "name-service information in a range of categories, and in what order.  Each "
12190 "category of information is identified by a database name."
12191 msgstr ""
12192
12193 #. type: Plain text
12194 #: build/C/man5/nsswitch.conf.5:42
12195 msgid ""
12196 "The file is plain ASCII text, with columns separated by spaces or tab "
12197 "characters.  The first column specifies the database name.  The remaining "
12198 "columns describe the order of sources to query and a limited set of actions "
12199 "that can be performed by lookup result."
12200 msgstr ""
12201
12202 #. type: Plain text
12203 #: build/C/man5/nsswitch.conf.5:44
12204 msgid "The following databases are understood by the GNU C Library:"
12205 msgstr ""
12206
12207 #. type: Plain text
12208 #: build/C/man5/nsswitch.conf.5:49
12209 msgid "Mail aliases, used by B<getaliasent>(3)  and related functions."
12210 msgstr ""
12211
12212 #. type: Plain text
12213 #: build/C/man5/nsswitch.conf.5:52
12214 msgid "Ethernet numbers."
12215 msgstr ""
12216
12217 #. type: Plain text
12218 #: build/C/man5/nsswitch.conf.5:57
12219 msgid "Groups of users, used by B<getgrent>(3)  and related functions."
12220 msgstr ""
12221
12222 #. type: Plain text
12223 #: build/C/man5/nsswitch.conf.5:62
12224 msgid "Host names and numbers, used by B<gethostbyname>(3)  and related functions."
12225 msgstr ""
12226
12227 #. type: Plain text
12228 #: build/C/man5/nsswitch.conf.5:67
12229 msgid "Supplementary group access list, used by B<getgrouplist>(3)  function."
12230 msgstr ""
12231
12232 #. type: Plain text
12233 #: build/C/man5/nsswitch.conf.5:71
12234 msgid ""
12235 "Network-wide list of hosts and users, used for access rules.  C libraries "
12236 "before glibc 2.1 supported netgroups only over NIS."
12237 msgstr ""
12238
12239 #. type: Plain text
12240 #: build/C/man5/nsswitch.conf.5:76
12241 msgid "Network names and numbers, used by B<getnetent>(3)  and related functions."
12242 msgstr ""
12243
12244 #. type: Plain text
12245 #: build/C/man5/nsswitch.conf.5:81
12246 msgid "User passwords, used by B<getpwent>(3)  and related functions."
12247 msgstr ""
12248
12249 #. type: Plain text
12250 #: build/C/man5/nsswitch.conf.5:86
12251 msgid "Network protocols, used by B<getprotoent>(3)  and related functions."
12252 msgstr ""
12253
12254 #. type: TP
12255 #: build/C/man5/nsswitch.conf.5:86
12256 #, no-wrap
12257 msgid "B<publickey>"
12258 msgstr ""
12259
12260 #. type: Plain text
12261 #: build/C/man5/nsswitch.conf.5:89
12262 msgid "Public and secret keys for Secure_RPC used by NFS and NIS+."
12263 msgstr ""
12264
12265 #. type: Plain text
12266 #: build/C/man5/nsswitch.conf.5:94
12267 msgid ""
12268 "Remote procedure call names and numbers, used by B<getrpcbyname>(3)  and "
12269 "related functions."
12270 msgstr ""
12271
12272 #. type: Plain text
12273 #: build/C/man5/nsswitch.conf.5:99
12274 msgid "Network services, used by B<getservent>(3)  and related functions."
12275 msgstr ""
12276
12277 #. type: Plain text
12278 #: build/C/man5/nsswitch.conf.5:104
12279 msgid "Shadow user passwords, used by B<getspnam>(3)  and related functions."
12280 msgstr ""
12281
12282 #. type: Plain text
12283 #: build/C/man5/nsswitch.conf.5:108
12284 msgid "Here is an example I</etc/nsswitch.conf> file:"
12285 msgstr ""
12286
12287 #. type: TP
12288 #: build/C/man5/nsswitch.conf.5:111
12289 #, no-wrap
12290 msgid "passwd:"
12291 msgstr ""
12292
12293 #. type: Plain text
12294 #: build/C/man5/nsswitch.conf.5:114 build/C/man5/nsswitch.conf.5:117 build/C/man5/nsswitch.conf.5:120
12295 msgid "compat"
12296 msgstr ""
12297
12298 #. type: TP
12299 #: build/C/man5/nsswitch.conf.5:114
12300 #, no-wrap
12301 msgid "group:"
12302 msgstr ""
12303
12304 #. type: TP
12305 #: build/C/man5/nsswitch.conf.5:117
12306 #, no-wrap
12307 msgid "shadow:"
12308 msgstr ""
12309
12310 #. type: TP
12311 #: build/C/man5/nsswitch.conf.5:121
12312 #, no-wrap
12313 msgid "hosts:"
12314 msgstr ""
12315
12316 #. type: Plain text
12317 #: build/C/man5/nsswitch.conf.5:124
12318 msgid "dns [!UNAVAIL=return] files"
12319 msgstr ""
12320
12321 #. type: TP
12322 #: build/C/man5/nsswitch.conf.5:124
12323 #, no-wrap
12324 msgid "networks:"
12325 msgstr ""
12326
12327 #. type: Plain text
12328 #: build/C/man5/nsswitch.conf.5:127 build/C/man5/nsswitch.conf.5:130 build/C/man5/nsswitch.conf.5:133 build/C/man5/nsswitch.conf.5:136 build/C/man5/nsswitch.conf.5:139
12329 msgid "nis [NOTFOUND=return] files"
12330 msgstr ""
12331
12332 #. type: TP
12333 #: build/C/man5/nsswitch.conf.5:127
12334 #, no-wrap
12335 msgid "ethers:"
12336 msgstr ""
12337
12338 #. type: TP
12339 #: build/C/man5/nsswitch.conf.5:130
12340 #, no-wrap
12341 msgid "protocols:"
12342 msgstr ""
12343
12344 #. type: TP
12345 #: build/C/man5/nsswitch.conf.5:133
12346 #, no-wrap
12347 msgid "rpc:"
12348 msgstr ""
12349
12350 #. type: TP
12351 #: build/C/man5/nsswitch.conf.5:136
12352 #, no-wrap
12353 msgid "services:"
12354 msgstr ""
12355
12356 #. type: Plain text
12357 #: build/C/man5/nsswitch.conf.5:144
12358 msgid "The first column is the database name.  The remaining columns specify:"
12359 msgstr ""
12360
12361 #. type: Plain text
12362 #: build/C/man5/nsswitch.conf.5:148
12363 msgid ""
12364 "One or more service specifications, for example, \"files\", \"db\", or "
12365 "\"nis\".  The order of the services on the line determines the order in "
12366 "which those services will be queried, in turn, until a result is found."
12367 msgstr ""
12368
12369 #. type: Plain text
12370 #: build/C/man5/nsswitch.conf.5:151
12371 msgid ""
12372 "Optional actions to perform if a particular result is obtained from the "
12373 "preceding service, for example, \"[NOTFOUND=return]\"."
12374 msgstr ""
12375
12376 #. type: Plain text
12377 #: build/C/man5/nsswitch.conf.5:177
12378 msgid ""
12379 "The service specifications supported on your system depend on the presence "
12380 "of shared libraries, and are therefore extensible.  Libraries called "
12381 "I</lib/libnss_SERVICE.so.>B<X> will provide the named I<SERVICE>.  On a "
12382 "standard installation, you can use \"files\", \"db\", \"nis\", and "
12383 "\"nisplus\".  For the B<hosts> database, you can additionally specify "
12384 "\"dns\".  For the B<passwd>, B<group>, and B<shadow> databases, you can "
12385 "additionally specify \"compat\" (see B<Compatibility mode> below).  The "
12386 "version number B<X> may be 1 for glibc 2.0, or 2 for glibc 2.1 and later.  "
12387 "On systems with additional libraries installed, you may have access to "
12388 "further services such as \"hesiod\", \"ldap\", \"winbind\" and \"wins\"."
12389 msgstr ""
12390
12391 #. type: Plain text
12392 #: build/C/man5/nsswitch.conf.5:182
12393 msgid ""
12394 "An action may also be specified following a service specification.  The "
12395 "action modifies the behavior following a result obtained from the preceding "
12396 "data source.  Action items take the general form:"
12397 msgstr ""
12398
12399 #. type: Plain text
12400 #: build/C/man5/nsswitch.conf.5:185
12401 msgid "[I<STATUS>=I<ACTION>]"
12402 msgstr ""
12403
12404 #. type: Plain text
12405 #: build/C/man5/nsswitch.conf.5:187
12406 msgid "[!I<STATUS>=I<ACTION>]"
12407 msgstr ""
12408
12409 #. type: Plain text
12410 #: build/C/man5/nsswitch.conf.5:190
12411 msgid "where"
12412 msgstr ""
12413
12414 #. type: Plain text
12415 #: build/C/man5/nsswitch.conf.5:201
12416 msgid "I<STATUS> =E<gt> B<success> | B<notfound> | B<unavail> | B<tryagain>"
12417 msgstr ""
12418
12419 #. type: Plain text
12420 #: build/C/man5/nsswitch.conf.5:207
12421 msgid "I<ACTION> =E<gt> B<return> | B<continue>"
12422 msgstr ""
12423
12424 #. type: Plain text
12425 #: build/C/man5/nsswitch.conf.5:212
12426 msgid ""
12427 "The ! negates the test, matching all possible results except the one "
12428 "specified.  The case of the keywords is not significant."
12429 msgstr ""
12430
12431 #. type: Plain text
12432 #: build/C/man5/nsswitch.conf.5:217
12433 msgid ""
12434 "The I<STATUS> value is matched against the result of the lookup function "
12435 "called by the preceding service specification, and can be one of:"
12436 msgstr ""
12437
12438 #. type: TP
12439 #: build/C/man5/nsswitch.conf.5:218
12440 #, no-wrap
12441 msgid "B<success>"
12442 msgstr ""
12443
12444 #. type: Plain text
12445 #: build/C/man5/nsswitch.conf.5:222
12446 msgid ""
12447 "No error occurred and the requested entry is returned.  The default action "
12448 "for this condition is \"return\"."
12449 msgstr ""
12450
12451 #. type: TP
12452 #: build/C/man5/nsswitch.conf.5:222
12453 #, no-wrap
12454 msgid "B<notfound>"
12455 msgstr ""
12456
12457 #. type: Plain text
12458 #: build/C/man5/nsswitch.conf.5:226
12459 msgid ""
12460 "The lookup succeeded, but the requested entry was not found.  The default "
12461 "action for this condition is \"continue\"."
12462 msgstr ""
12463
12464 #. type: TP
12465 #: build/C/man5/nsswitch.conf.5:226
12466 #, no-wrap
12467 msgid "B<unavail>"
12468 msgstr ""
12469
12470 #. type: Plain text
12471 #: build/C/man5/nsswitch.conf.5:233
12472 msgid ""
12473 "The service is permanently unavailable.  This can mean either that the "
12474 "required file cannot be read, or, for network services, that the server is "
12475 "not available or does not allow queries.  The default action for this "
12476 "condition is \"continue\"."
12477 msgstr ""
12478
12479 #. type: TP
12480 #: build/C/man5/nsswitch.conf.5:233
12481 #, no-wrap
12482 msgid "B<tryagain>"
12483 msgstr ""
12484
12485 #. type: Plain text
12486 #: build/C/man5/nsswitch.conf.5:239
12487 msgid ""
12488 "The service is temporarily unavailable.  This could mean a file is locked or "
12489 "a server currently cannot accept more connections.  The default action for "
12490 "this condition is \"continue\"."
12491 msgstr ""
12492
12493 #. type: Plain text
12494 #: build/C/man5/nsswitch.conf.5:244
12495 msgid "The I<ACTION> value can be one of:"
12496 msgstr ""
12497
12498 #. type: TP
12499 #: build/C/man5/nsswitch.conf.5:245
12500 #, no-wrap
12501 msgid "B<return>"
12502 msgstr ""
12503
12504 #. type: Plain text
12505 #: build/C/man5/nsswitch.conf.5:257
12506 msgid ""
12507 "Return a result now.  Do not call any further lookup functions.  However, "
12508 "for compatibility reasons, if this is the selected action for the B<group> "
12509 "database and the B<notfound> status, and the configuration file does not "
12510 "contain the B<initgroups> line, the next lookup function is always called, "
12511 "without affecting the search result."
12512 msgstr ""
12513
12514 #. type: TP
12515 #: build/C/man5/nsswitch.conf.5:257
12516 #, no-wrap
12517 msgid "B<continue>"
12518 msgstr ""
12519
12520 #. type: Plain text
12521 #: build/C/man5/nsswitch.conf.5:260
12522 msgid "Call the next lookup function."
12523 msgstr ""
12524
12525 #. type: SS
12526 #: build/C/man5/nsswitch.conf.5:261
12527 #, no-wrap
12528 msgid "Compatibility mode (compat)"
12529 msgstr ""
12530
12531 #. type: Plain text
12532 #: build/C/man5/nsswitch.conf.5:267
12533 msgid ""
12534 "The NSS \"compat\" service is similar to \"files\" except that it "
12535 "additionally permits special entries in I</etc/passwd> for granting users or "
12536 "members of netgroups access to the system.  The following entries are valid "
12537 "in this mode:"
12538 msgstr ""
12539
12540 #. type: TP
12541 #: build/C/man5/nsswitch.conf.5:268
12542 #, no-wrap
12543 msgid "B<+>I<user>"
12544 msgstr ""
12545
12546 #. type: Plain text
12547 #: build/C/man5/nsswitch.conf.5:273
12548 msgid "Include the specified I<user> from the NIS passwd map."
12549 msgstr ""
12550
12551 #. type: TP
12552 #: build/C/man5/nsswitch.conf.5:273
12553 #, no-wrap
12554 msgid "B<+@>I<netgroup>"
12555 msgstr ""
12556
12557 #. type: Plain text
12558 #: build/C/man5/nsswitch.conf.5:277
12559 msgid "Include all users in the given I<netgroup>."
12560 msgstr ""
12561
12562 #. type: TP
12563 #: build/C/man5/nsswitch.conf.5:277
12564 #, no-wrap
12565 msgid "B<->I<user>"
12566 msgstr ""
12567
12568 #. type: Plain text
12569 #: build/C/man5/nsswitch.conf.5:282
12570 msgid "Exclude the specified I<user> from the NIS passwd map."
12571 msgstr ""
12572
12573 #. type: TP
12574 #: build/C/man5/nsswitch.conf.5:282
12575 #, no-wrap
12576 msgid "B<-@>I<netgroup>"
12577 msgstr ""
12578
12579 #. type: Plain text
12580 #: build/C/man5/nsswitch.conf.5:286
12581 msgid "Exclude all users in the given I<netgroup>."
12582 msgstr ""
12583
12584 #. type: TP
12585 #: build/C/man5/nsswitch.conf.5:286
12586 #, no-wrap
12587 msgid "B<+>"
12588 msgstr ""
12589
12590 #. type: Plain text
12591 #: build/C/man5/nsswitch.conf.5:290
12592 msgid ""
12593 "Include every user, except previously excluded ones, from the NIS passwd "
12594 "map."
12595 msgstr ""
12596
12597 #. type: Plain text
12598 #: build/C/man5/nsswitch.conf.5:298
12599 msgid ""
12600 "By default the source is \"nis\", but this may be overridden by specifying "
12601 "\"nisplus\" as the source for the pseudo-databases B<passwd_compat>, "
12602 "B<group_compat>, and B<shadow_compat>."
12603 msgstr ""
12604
12605 #. type: Plain text
12606 #: build/C/man5/nsswitch.conf.5:305
12607 msgid ""
12608 "A service named I<SERVICE> is implemented by a shared object library named "
12609 "I<libnss_SERVICE.so.>B<X> that resides in I</lib>."
12610 msgstr ""
12611
12612 #. type: Plain text
12613 #: build/C/man5/nsswitch.conf.5:310
12614 msgid "NSS configuration file."
12615 msgstr ""
12616
12617 #. type: TP
12618 #: build/C/man5/nsswitch.conf.5:310
12619 #, no-wrap
12620 msgid "I</lib/libnss_compat.so.>B<X>"
12621 msgstr ""
12622
12623 #. type: Plain text
12624 #: build/C/man5/nsswitch.conf.5:313
12625 msgid "implements \"compat\" source."
12626 msgstr ""
12627
12628 #. type: TP
12629 #: build/C/man5/nsswitch.conf.5:313
12630 #, no-wrap
12631 msgid "I</lib/libnss_db.so.>B<X>"
12632 msgstr ""
12633
12634 #. type: Plain text
12635 #: build/C/man5/nsswitch.conf.5:316
12636 msgid "implements \"db\" source."
12637 msgstr ""
12638
12639 #. type: TP
12640 #: build/C/man5/nsswitch.conf.5:316
12641 #, no-wrap
12642 msgid "I</lib/libnss_dns.so.>B<X>"
12643 msgstr ""
12644
12645 #. type: Plain text
12646 #: build/C/man5/nsswitch.conf.5:319
12647 msgid "implements \"dns\" source."
12648 msgstr ""
12649
12650 #. type: TP
12651 #: build/C/man5/nsswitch.conf.5:319
12652 #, no-wrap
12653 msgid "I</lib/libnss_files.so.>B<X>"
12654 msgstr ""
12655
12656 #. type: Plain text
12657 #: build/C/man5/nsswitch.conf.5:322
12658 msgid "implements \"files\" source."
12659 msgstr ""
12660
12661 #. type: TP
12662 #: build/C/man5/nsswitch.conf.5:322
12663 #, no-wrap
12664 msgid "I</lib/libnss_hesiod.so.>B<X>"
12665 msgstr ""
12666
12667 #. type: Plain text
12668 #: build/C/man5/nsswitch.conf.5:325
12669 msgid "implements \"hesiod\" source."
12670 msgstr ""
12671
12672 #. type: TP
12673 #: build/C/man5/nsswitch.conf.5:325
12674 #, no-wrap
12675 msgid "I</lib/libnss_nis.so.>B<X>"
12676 msgstr ""
12677
12678 #. type: Plain text
12679 #: build/C/man5/nsswitch.conf.5:328
12680 msgid "implements \"nis\" source."
12681 msgstr ""
12682
12683 #. type: TP
12684 #: build/C/man5/nsswitch.conf.5:328
12685 #, no-wrap
12686 msgid "I</lib/libnss_nisplus.so.>B<X>"
12687 msgstr ""
12688
12689 #. type: Plain text
12690 #: build/C/man5/nsswitch.conf.5:331
12691 msgid "implements \"nisplus\" source."
12692 msgstr ""
12693
12694 #. type: Plain text
12695 #: build/C/man5/nsswitch.conf.5:339
12696 msgid ""
12697 "Within each process that uses B<nsswitch.conf>, the entire file is read only "
12698 "once.  If the file is later changed, the process will continue using the old "
12699 "configuration."
12700 msgstr ""
12701
12702 #. type: Plain text
12703 #: build/C/man5/nsswitch.conf.5:352
12704 msgid ""
12705 "Traditionally, there was only a single source for service information, often "
12706 "in the form of a single configuration file (e.g., I</etc/passwd>).  However, "
12707 "as other name services, such as the Network Information Service (NIS) and "
12708 "the Domain Name Service (DNS), became popular, a method was needed that "
12709 "would be more flexible than fixed search orders coded into the C library.  "
12710 "The Name Service Switch mechanism, which was based on the mechanism used by "
12711 "Sun Microsystems in the Solaris 2 C library, introduced a cleaner solution "
12712 "to the problem."
12713 msgstr ""
12714
12715 #. type: Plain text
12716 #: build/C/man5/nsswitch.conf.5:355
12717 msgid "B<getent>(1), B<nss>(5)"
12718 msgstr ""
12719
12720 #. type: TH
12721 #: build/C/man7/packet.7:12
12722 #, no-wrap
12723 msgid "PACKET"
12724 msgstr ""
12725
12726 #. type: Plain text
12727 #: build/C/man7/packet.7:15
12728 msgid "packet - packet interface on device level"
12729 msgstr ""
12730
12731 #. type: Plain text
12732 #: build/C/man7/packet.7:18
12733 #, no-wrap
12734 msgid "B<#include E<lt>sys/socket.hE<gt>>\n"
12735 msgstr ""
12736
12737 #. type: Plain text
12738 #: build/C/man7/packet.7:20
12739 #, no-wrap
12740 msgid "B<#include E<lt>linux/if_packet.hE<gt>>\n"
12741 msgstr ""
12742
12743 #. type: Plain text
12744 #: build/C/man7/packet.7:22
12745 #, no-wrap
12746 msgid "B<#include E<lt>net/ethernet.hE<gt> /* the L2 protocols */>\n"
12747 msgstr ""
12748
12749 #. type: Plain text
12750 #: build/C/man7/packet.7:24
12751 #, no-wrap
12752 msgid ""
12753 "B<packet_socket = socket(AF_PACKET, int >I<socket_type>B<, int "
12754 ">I<protocol>B<);>\n"
12755 msgstr ""
12756
12757 #. type: Plain text
12758 #: build/C/man7/packet.7:30
12759 msgid ""
12760 "Packet sockets are used to receive or send raw packets at the device driver "
12761 "(OSI Layer 2) level.  They allow the user to implement protocol modules in "
12762 "user space on top of the physical layer."
12763 msgstr ""
12764
12765 #. type: Plain text
12766 #: build/C/man7/packet.7:51
12767 msgid ""
12768 "The I<socket_type> is either B<SOCK_RAW> for raw packets including the "
12769 "link-level header or B<SOCK_DGRAM> for cooked packets with the link-level "
12770 "header removed.  The link-level header information is available in a common "
12771 "format in a I<sockaddr_ll>.  I<protocol> is the IEEE 802.3 protocol number "
12772 "in network byte order.  See the I<E<lt>linux/if_ether.hE<gt>> include file "
12773 "for a list of allowed protocols.  When protocol is set to "
12774 "B<htons(ETH_P_ALL)> then all protocols are received.  All incoming packets "
12775 "of that protocol type will be passed to the packet socket before they are "
12776 "passed to the protocols implemented in the kernel."
12777 msgstr ""
12778
12779 #. type: Plain text
12780 #: build/C/man7/packet.7:55
12781 msgid ""
12782 "Only processes with effective UID 0 or the B<CAP_NET_RAW> capability may "
12783 "open packet sockets."
12784 msgstr ""
12785
12786 #. type: Plain text
12787 #: build/C/man7/packet.7:73
12788 msgid ""
12789 "B<SOCK_RAW> packets are passed to and from the device driver without any "
12790 "changes in the packet data.  When receiving a packet, the address is still "
12791 "parsed and passed in a standard I<sockaddr_ll> address structure.  When "
12792 "transmitting a packet, the user supplied buffer should contain the physical "
12793 "layer header.  That packet is then queued unmodified to the network driver "
12794 "of the interface defined by the destination address.  Some device drivers "
12795 "always add other headers.  B<SOCK_RAW> is similar to but not compatible with "
12796 "the obsolete B<AF_INET/SOCK_PACKET> of Linux 2.0."
12797 msgstr ""
12798
12799 #. type: Plain text
12800 #: build/C/man7/packet.7:83
12801 msgid ""
12802 "B<SOCK_DGRAM> operates on a slightly higher level.  The physical header is "
12803 "removed before the packet is passed to the user.  Packets sent through a "
12804 "B<SOCK_DGRAM> packet socket get a suitable physical layer header based on "
12805 "the information in the I<sockaddr_ll> destination address before they are "
12806 "queued."
12807 msgstr ""
12808
12809 #. type: Plain text
12810 #: build/C/man7/packet.7:96
12811 msgid ""
12812 "By default all packets of the specified protocol type are passed to a packet "
12813 "socket.  To get packets only from a specific interface use B<bind>(2)  "
12814 "specifying an address in a I<struct sockaddr_ll> to bind the packet socket "
12815 "to an interface.  Only the I<sll_protocol> and the I<sll_ifindex> address "
12816 "fields are used for purposes of binding."
12817 msgstr ""
12818
12819 #. type: Plain text
12820 #: build/C/man7/packet.7:100
12821 msgid "The B<connect>(2)  operation is not supported on packet sockets."
12822 msgstr ""
12823
12824 #. type: Plain text
12825 #: build/C/man7/packet.7:109
12826 msgid ""
12827 "When the B<MSG_TRUNC> flag is passed to B<recvmsg>(2), B<recv>(2), "
12828 "B<recvfrom>(2)  the real length of the packet on the wire is always "
12829 "returned, even when it is longer than the buffer."
12830 msgstr ""
12831
12832 #. type: SS
12833 #: build/C/man7/packet.7:109
12834 #, no-wrap
12835 msgid "Address types"
12836 msgstr ""
12837
12838 #. type: Plain text
12839 #: build/C/man7/packet.7:113
12840 msgid "The I<sockaddr_ll> is a device independent physical layer address."
12841 msgstr ""
12842
12843 #. type: Plain text
12844 #: build/C/man7/packet.7:125
12845 #, no-wrap
12846 msgid ""
12847 "struct sockaddr_ll {\n"
12848 "    unsigned short sll_family;   /* Always AF_PACKET */\n"
12849 "    unsigned short sll_protocol; /* Physical layer protocol */\n"
12850 "    int            sll_ifindex;  /* Interface number */\n"
12851 "    unsigned short sll_hatype;   /* ARP hardware type */\n"
12852 "    unsigned char  sll_pkttype;  /* Packet type */\n"
12853 "    unsigned char  sll_halen;    /* Length of address */\n"
12854 "    unsigned char  sll_addr[8];  /* Physical layer address */\n"
12855 "};\n"
12856 msgstr ""
12857
12858 #. type: Plain text
12859 #: build/C/man7/packet.7:164
12860 msgid ""
12861 "I<sll_protocol> is the standard ethernet protocol type in network byte order "
12862 "as defined in the I<E<lt>linux/if_ether.hE<gt>> include file.  It defaults "
12863 "to the socket's protocol.  I<sll_ifindex> is the interface index of the "
12864 "interface (see B<netdevice>(7)); 0 matches any interface (only permitted for "
12865 "binding).  I<sll_hatype> is an ARP type as defined in the "
12866 "I<E<lt>linux/if_arp.hE<gt>> include file.  I<sll_pkttype> contains the "
12867 "packet type.  Valid types are B<PACKET_HOST> for a packet addressed to the "
12868 "local host, B<PACKET_BROADCAST> for a physical layer broadcast packet, "
12869 "B<PACKET_MULTICAST> for a packet sent to a physical layer multicast address, "
12870 "B<PACKET_OTHERHOST> for a packet to some other host that has been caught by "
12871 "a device driver in promiscuous mode, and B<PACKET_OUTGOING> for a packet "
12872 "originated from the local host that is looped back to a packet socket.  "
12873 "These types make sense only for receiving.  I<sll_addr> and I<sll_halen> "
12874 "contain the physical layer (e.g., IEEE 802.3) address and its length.  The "
12875 "exact interpretation depends on the device."
12876 msgstr ""
12877
12878 #. type: Plain text
12879 #: build/C/man7/packet.7:180
12880 msgid ""
12881 "When you send packets it is enough to specify I<sll_family>, I<sll_addr>, "
12882 "I<sll_halen>, I<sll_ifindex>.  The other fields should be 0.  I<sll_hatype> "
12883 "and I<sll_pkttype> are set on received packets for your information.  For "
12884 "bind only I<sll_protocol> and I<sll_ifindex> are used."
12885 msgstr ""
12886
12887 #. type: Plain text
12888 #: build/C/man7/packet.7:185
12889 msgid ""
12890 "Packet socket options are configured by calling B<setsockopt>(2)  with level "
12891 "B<SOL_PACKET>."
12892 msgstr ""
12893
12894 #. type: TP
12895 #: build/C/man7/packet.7:185
12896 #, no-wrap
12897 msgid "B<PACKET_ADD_MEMBERSHIP>"
12898 msgstr ""
12899
12900 #. type: TP
12901 #: build/C/man7/packet.7:188
12902 #, no-wrap
12903 msgid "B<PACKET_DROP_MEMBERSHIP>"
12904 msgstr ""
12905
12906 #. type: Plain text
12907 #: build/C/man7/packet.7:200
12908 msgid ""
12909 "Packet sockets can be used to configure physical layer multicasting and "
12910 "promiscuous mode.  B<PACKET_ADD_MEMBERSHIP> adds a binding and "
12911 "B<PACKET_DROP_MEMBERSHIP> drops it.  They both expect a I<packet_mreq> "
12912 "structure as argument:"
12913 msgstr ""
12914
12915 #. type: Plain text
12916 #: build/C/man7/packet.7:209
12917 #, no-wrap
12918 msgid ""
12919 "struct packet_mreq {\n"
12920 "    int            mr_ifindex;    /* interface index */\n"
12921 "    unsigned short mr_type;       /* action */\n"
12922 "    unsigned short mr_alen;       /* address length */\n"
12923 "    unsigned char  mr_address[8]; /* physical layer address */\n"
12924 "};\n"
12925 msgstr ""
12926
12927 #. type: Plain text
12928 #: build/C/man7/packet.7:230
12929 msgid ""
12930 "B<mr_ifindex> contains the interface index for the interface whose status "
12931 "should be changed.  The B<mr_type> parameter specifies which action to "
12932 "perform.  B<PACKET_MR_PROMISC> enables receiving all packets on a shared "
12933 "medium (often known as \"promiscuous mode\"), B<PACKET_MR_MULTICAST> binds "
12934 "the socket to the physical layer multicast group specified in B<mr_address> "
12935 "and B<mr_alen>, and B<PACKET_MR_ALLMULTI> sets the socket up to receive all "
12936 "multicast packets arriving at the interface."
12937 msgstr ""
12938
12939 #. type: Plain text
12940 #: build/C/man7/packet.7:236
12941 msgid ""
12942 "In addition, the traditional ioctls B<SIOCSIFFLAGS>, B<SIOCADDMULTI>, "
12943 "B<SIOCDELMULTI> can be used for the same purpose."
12944 msgstr ""
12945
12946 #. type: TP
12947 #: build/C/man7/packet.7:236
12948 #, no-wrap
12949 msgid "B<PACKET_AUXDATA> (since Linux 2.6.21)"
12950 msgstr ""
12951
12952 #.  commit 8dc4194474159660d7f37c495e3fc3f10d0db8cc
12953 #. type: Plain text
12954 #: build/C/man7/packet.7:246
12955 msgid ""
12956 "If this binary option is enabled, the packet socket passes a metadata "
12957 "structure along with each packet in the B<recvmsg>(2)  control field.  The "
12958 "structure can be read with B<cmsg>(3).  It is defined as"
12959 msgstr ""
12960
12961 #. type: Plain text
12962 #: build/C/man7/packet.7:258
12963 #, no-wrap
12964 msgid ""
12965 "struct tpacket_auxdata {\n"
12966 "    __u32 tp_status;\n"
12967 "    __u32 tp_len;      /* packet length */\n"
12968 "    __u32 tp_snaplen;  /* captured length */\n"
12969 "    __u16 tp_mac;\n"
12970 "    __u16 tp_net;\n"
12971 "    __u16 tp_vlan_tci;\n"
12972 "    __u16 tp_padding;\n"
12973 "};\n"
12974 msgstr ""
12975
12976 #. type: TP
12977 #: build/C/man7/packet.7:260
12978 #, no-wrap
12979 msgid "B<PACKET_FANOUT> (since Linux 3.1)"
12980 msgstr ""
12981
12982 #.  commit dc99f600698dcac69b8f56dda9a8a00d645c5ffc
12983 #. type: Plain text
12984 #: build/C/man7/packet.7:282
12985 msgid ""
12986 "To scale processing across threads, packet sockets can form a fanout group.  "
12987 "In this mode, each matching packet is enqueued onto only one socket in the "
12988 "group.  A socket joins a fanout group by calling B<setsockopt>(2)  with "
12989 "level B<SOL_PACKET> and option B<PACKET_FANOUT>.  Each network namespace can "
12990 "have up to 65536 independent groups.  A socket selects a group by encoding "
12991 "the ID in the first 16 bits of the integer option value.  The first packet "
12992 "socket to join a group implicitly creates it.  To successfully join an "
12993 "existing group, subsequent packet sockets must have the same protocol, "
12994 "device settings, fanout mode and flags (see below).  Packet sockets can "
12995 "leave a fanout group only by closing the socket.  The group is deleted when "
12996 "the last socket is closed."
12997 msgstr ""
12998
12999 #.  commit 2d36097d26b5991d71a2cf4a20c1a158f0f1bfcd
13000 #. type: Plain text
13001 #: build/C/man7/packet.7:305
13002 msgid ""
13003 "Fanout supports multiple algorithms to spread traffic between sockets.  The "
13004 "default mode, B<PACKET_FANOUT_HASH>, sends packets from the same flow to the "
13005 "same socket to maintain per-flow ordering.  For each packet, it chooses a "
13006 "socket by taking the packet flow hash modulo the number of sockets in the "
13007 "group, where a flow hash is a hash over network-layer address and optional "
13008 "transport-layer port fields.  The load-balance mode B<PACKET_FANOUT_LB> "
13009 "implements a round-robin algorithm.  B<PACKET_FANOUT_CPU> selects the socket "
13010 "based on the CPU that the packet arrived on.  B<PACKET_FANOUT_ROLLOVER> "
13011 "processes all data on a single socket, moves to the next when one becomes "
13012 "backlogged.  B<PACKET_FANOUT_RND> selects the socket using a pseudo-random "
13013 "number generator.  B<PACKET_FANOUT_QM> (available since Linux 3.14)  selects "
13014 "the socket using the recorded queue_mapping of the received skb."
13015 msgstr ""
13016
13017 #. type: Plain text
13018 #: build/C/man7/packet.7:320
13019 msgid ""
13020 "Fanout modes can take additional options.  IP fragmentation causes packets "
13021 "from the same flow to have different flow hashes.  The flag "
13022 "B<PACKET_FANOUT_FLAG_DEFRAG>, if set, causes packet to be defragmented "
13023 "before fanout is applied, to preserve order even in this case.  Fanout mode "
13024 "and options are communicated in the second 16 bits of the integer option "
13025 "value.  The flag B<PACKET_FANOUT_FLAG_ROLLOVER> enables the roll over "
13026 "mechanism as a backup strategy: if the original fanout algorithm selects a "
13027 "backlogged socket, the packet rolls over to the next available one."
13028 msgstr ""
13029
13030 #. type: TP
13031 #: build/C/man7/packet.7:320
13032 #, no-wrap
13033 msgid "B<PACKET_LOSS> (with B<PACKET_TX_RING>)"
13034 msgstr ""
13035
13036 #. type: Plain text
13037 #: build/C/man7/packet.7:343
13038 msgid ""
13039 "When a malformed packet is encountered on a transmit ring, the default is to "
13040 "reset its I<tp_status> to B<TP_STATUS_WRONG_FORMAT> and abort the "
13041 "transmission immediately.  The malformed packet blocks itself and "
13042 "subsequently enqueued packets from being sent.  The format error must be "
13043 "fixed, the associated I<tp_status> reset to B<TP_STATUS_SEND_REQUEST>, and "
13044 "the transmission process restarted via B<send>(2).  However, if "
13045 "B<PACKET_LOSS> is set, any malformed packet will be skipped, its "
13046 "I<tp_status> reset to B<TP_STATUS_AVAILABLE>, and the transmission process "
13047 "continued."
13048 msgstr ""
13049
13050 #. type: TP
13051 #: build/C/man7/packet.7:343
13052 #, no-wrap
13053 msgid "B<PACKET_RESERVE> (with B<PACKET_RX_RING>)"
13054 msgstr ""
13055
13056 #. type: Plain text
13057 #: build/C/man7/packet.7:348
13058 msgid ""
13059 "By default, a packet receive ring writes packets immediately following the "
13060 "metadata structure and alignment padding.  This integer option reserves "
13061 "additional headroom."
13062 msgstr ""
13063
13064 #. type: TP
13065 #: build/C/man7/packet.7:348
13066 #, no-wrap
13067 msgid "B<PACKET_RX_RING>"
13068 msgstr ""
13069
13070 #. type: Plain text
13071 #: build/C/man7/packet.7:394
13072 msgid ""
13073 "Create a memory-mapped ring buffer for asynchronous packet reception.  The "
13074 "packet socket reserves a contiguous region of application address space, "
13075 "lays it out into an array of packet slots and copies packets (up to "
13076 "I<tp_snaplen>)  into subsequent slots.  Each packet is preceded by a "
13077 "metadata structure similar to I<tpacket_auxdata>.  The protocol fields "
13078 "encode the offset to the data from the start of the metadata header.  "
13079 "I<tp_net> stores the offset to the network layer.  If the packet socket is "
13080 "of type B<SOCK_DGRAM>, then I<tp_mac> is the same.  If it is of type "
13081 "B<SOCK_RAW>, then that field stores the offset to the link-layer frame.  "
13082 "Packet socket and application communicate the head and tail of the ring "
13083 "through the I<tp_status> field.  The packet socket owns all slots with "
13084 "I<tp_status> equal to B<TP_STATUS_KERNEL>.  After filling a slot, it changes "
13085 "the status of the slot to transfer ownership to the application.  During "
13086 "normal operation, the new I<tp_status> value has at least the "
13087 "B<TP_STATUS_USER> bit set to signal that a received packet has been stored.  "
13088 "When the application has finished processing a packet, it transfers "
13089 "ownership of the slot back to the socket by setting I<tp_status> equal to "
13090 "B<TP_STATUS_KERNEL>.  Packet sockets implement multiple variants of the "
13091 "packet ring.  The implementation details are described in "
13092 "I<Documentation/networking/packet_mmap.txt> in the Linux kernel source tree."
13093 msgstr ""
13094
13095 #. type: TP
13096 #: build/C/man7/packet.7:394
13097 #, no-wrap
13098 msgid "B<PACKET_STATISTICS>"
13099 msgstr ""
13100
13101 #. type: Plain text
13102 #: build/C/man7/packet.7:397
13103 msgid "Retrieve packet socket statistics in the form of a structure"
13104 msgstr ""
13105
13106 #. type: Plain text
13107 #: build/C/man7/packet.7:404
13108 #, no-wrap
13109 msgid ""
13110 "struct tpacket_stats {\n"
13111 "    unsigned int tp_packets;  /* Total packet count */\n"
13112 "    unsigned int tp_drops;    /* Dropped packet count */\n"
13113 "};\n"
13114 msgstr ""
13115
13116 #. type: Plain text
13117 #: build/C/man7/packet.7:410
13118 msgid ""
13119 "Receiving statistics resets the internal counters.  The statistics structure "
13120 "differs when using a ring of variant B<TPACKET_V3>."
13121 msgstr ""
13122
13123 #. type: TP
13124 #: build/C/man7/packet.7:410
13125 #, no-wrap
13126 msgid "B<PACKET_TIMESTAMP> (with B<PACKET_RX_RING>; since Linux 2.6.36)"
13127 msgstr ""
13128
13129 #.  commit 614f60fa9d73a9e8fdff3df83381907fea7c5649
13130 #. type: Plain text
13131 #: build/C/man7/packet.7:420
13132 msgid ""
13133 "The packet receive ring always stores a timestamp in the metadata header.  "
13134 "By default, this is a software generated timestamp generated when the packet "
13135 "is copied into the ring.  This integer option selects the type of "
13136 "timestamp.  Besides the default, it support the two hardware formats "
13137 "described in I<Documentation/networking/timestamping.txt> in the Linux "
13138 "kernel source tree."
13139 msgstr ""
13140
13141 #. type: TP
13142 #: build/C/man7/packet.7:420
13143 #, no-wrap
13144 msgid "B<PACKET_TX_RING> (since Linux 2.6.31)"
13145 msgstr ""
13146
13147 #.  commit 69e3c75f4d541a6eb151b3ef91f34033cb3ad6e1
13148 #. type: Plain text
13149 #: build/C/man7/packet.7:455
13150 msgid ""
13151 "Create a memory-mapped ring buffer for packet transmission.  This option is "
13152 "similar to B<PACKET_RX_RING> and takes the same arguments.  The application "
13153 "writes packets into slots with I<tp_status> equal to B<TP_STATUS_AVAILABLE> "
13154 "and schedules them for transmission by changing I<tp_status> to "
13155 "B<TP_STATUS_SEND_REQUEST>.  When packets are ready to be transmitted, the "
13156 "application calls B<send>(2)  or a variant thereof.  The I<buf> and I<len> "
13157 "fields of this call are ignored.  If an address is passed using B<sendto>(2)  "
13158 "or B<sendmsg>(2), then that overrides the socket default.  On successful "
13159 "transmission, the socket resets I<tp_status> to B<TP_STATUS_AVAILABLE>.  It "
13160 "immediately aborts the transmission on error unless B<PACKET_LOSS> is set."
13161 msgstr ""
13162
13163 #. type: TP
13164 #: build/C/man7/packet.7:455
13165 #, no-wrap
13166 msgid "B<PACKET_VERSION> (with B<PACKET_RX_RING>; since Linux 2.6.27)"
13167 msgstr ""
13168
13169 #.  commit bbd6ef87c544d88c30e4b762b1b61ef267a7d279
13170 #. type: Plain text
13171 #: build/C/man7/packet.7:464
13172 msgid ""
13173 "By default, B<PACKET_RX_RING> creates a packet receive ring of variant "
13174 "B<TPACKET_V1>.  To create another variant, configure the desired variant by "
13175 "setting this integer option before creating the ring."
13176 msgstr ""
13177
13178 #. type: TP
13179 #: build/C/man7/packet.7:464
13180 #, no-wrap
13181 msgid "B<PACKET_QDISC_BYPASS> (since Linux 3.14)"
13182 msgstr ""
13183
13184 #.  commit d346a3fae3ff1d99f5d0c819bf86edf9094a26a1
13185 #. type: Plain text
13186 #: build/C/man7/packet.7:479
13187 msgid ""
13188 "By default, packets sent through packet sockets pass through the kernel's "
13189 "qdisc (traffic control) layer, which is fine for the vast majority of use "
13190 "cases.  For traffic generator appliances using packet sockets that intend to "
13191 "brute-force flood the network\\(emfor example, to test devices under load in "
13192 "a similar fashion to pktgen\\(emthis layer can be bypassed by setting this "
13193 "integer option to 1.  A side effect is that packet buffering in the qdisc "
13194 "layer is avoided, which will lead to increased drops when network device "
13195 "transmit queues are busy; therefore, use at your own risk."
13196 msgstr ""
13197
13198 #.  FIXME Document SIOCGSTAMPNS
13199 #. type: Plain text
13200 #: build/C/man7/packet.7:486
13201 msgid ""
13202 "B<SIOCGSTAMP> can be used to receive the timestamp of the last received "
13203 "packet.  Argument is a I<struct timeval> variable."
13204 msgstr ""
13205
13206 #. type: Plain text
13207 #: build/C/man7/packet.7:492
13208 msgid ""
13209 "In addition, all standard ioctls defined in B<netdevice>(7)  and "
13210 "B<socket>(7)  are valid on packet sockets."
13211 msgstr ""
13212
13213 #. type: SS
13214 #: build/C/man7/packet.7:492 build/C/man7/raw.7:131 build/C/man7/tcp.7:1210 build/C/man7/udp.7:103
13215 #, no-wrap
13216 msgid "Error handling"
13217 msgstr ""
13218
13219 #. type: Plain text
13220 #: build/C/man7/packet.7:496
13221 msgid ""
13222 "Packet sockets do no error handling other than errors occurred while passing "
13223 "the packet to the device driver.  They don't have the concept of a pending "
13224 "error."
13225 msgstr ""
13226
13227 #. type: Plain text
13228 #: build/C/man7/packet.7:500
13229 msgid "Unknown multicast group address passed."
13230 msgstr ""
13231
13232 #. type: Plain text
13233 #: build/C/man7/packet.7:503
13234 msgid "User passed invalid memory address."
13235 msgstr ""
13236
13237 #. type: Plain text
13238 #: build/C/man7/packet.7:506 build/C/man7/raw.7:155
13239 msgid "Invalid argument."
13240 msgstr ""
13241
13242 #. type: Plain text
13243 #: build/C/man7/packet.7:509
13244 msgid "Packet is bigger than interface MTU."
13245 msgstr ""
13246
13247 #. type: TP
13248 #: build/C/man7/packet.7:509
13249 #, no-wrap
13250 msgid "B<ENETDOWN>"
13251 msgstr ""
13252
13253 #. type: Plain text
13254 #: build/C/man7/packet.7:512
13255 msgid "Interface is not up."
13256 msgstr ""
13257
13258 #. type: Plain text
13259 #: build/C/man7/packet.7:515
13260 msgid "Not enough memory to allocate the packet."
13261 msgstr ""
13262
13263 #. type: Plain text
13264 #: build/C/man7/packet.7:518
13265 msgid "Unknown device name or interface index specified in interface address."
13266 msgstr ""
13267
13268 #. type: Plain text
13269 #: build/C/man7/packet.7:521
13270 msgid "No packet received."
13271 msgstr ""
13272
13273 #. type: Plain text
13274 #: build/C/man7/packet.7:524
13275 msgid "No interface address passed."
13276 msgstr ""
13277
13278 #. type: TP
13279 #: build/C/man7/packet.7:524
13280 #, no-wrap
13281 msgid "B<ENXIO>"
13282 msgstr ""
13283
13284 #. type: Plain text
13285 #: build/C/man7/packet.7:527
13286 msgid "Interface address contained an invalid interface index."
13287 msgstr ""
13288
13289 #. type: Plain text
13290 #: build/C/man7/packet.7:530
13291 msgid "User has insufficient privileges to carry out this operation."
13292 msgstr ""
13293
13294 #. type: Plain text
13295 #: build/C/man7/packet.7:532
13296 msgid "In addition, other errors may be generated by the low-level driver."
13297 msgstr ""
13298
13299 #. type: Plain text
13300 #: build/C/man7/packet.7:537
13301 msgid ""
13302 "B<AF_PACKET> is a new feature in Linux 2.2.  Earlier Linux versions "
13303 "supported only B<SOCK_PACKET>."
13304 msgstr ""
13305
13306 #. type: Plain text
13307 #: build/C/man7/packet.7:546
13308 msgid ""
13309 "For portable programs it is suggested to use B<AF_PACKET> via B<pcap>(3); "
13310 "although this covers only a subset of the B<AF_PACKET> features."
13311 msgstr ""
13312
13313 #. type: Plain text
13314 #: build/C/man7/packet.7:567
13315 msgid ""
13316 "The B<SOCK_DGRAM> packet sockets make no attempt to create or parse the IEEE "
13317 "802.2 LLC header for a IEEE 802.3 frame.  When B<ETH_P_802_3> is specified "
13318 "as protocol for sending the kernel creates the 802.3 frame and fills out the "
13319 "length field; the user has to supply the LLC header to get a fully "
13320 "conforming packet.  Incoming 802.3 packets are not multiplexed on the "
13321 "DSAP/SSAP protocol fields; instead they are supplied to the user as protocol "
13322 "B<ETH_P_802_2> with the LLC header prefixed.  It is thus not possible to "
13323 "bind to B<ETH_P_802_3>; bind to B<ETH_P_802_2> instead and do the protocol "
13324 "multiplex yourself.  The default for sending is the standard Ethernet DIX "
13325 "encapsulation with the protocol filled in."
13326 msgstr ""
13327
13328 #. type: Plain text
13329 #: build/C/man7/packet.7:569
13330 msgid "Packet sockets are not subject to the input or output firewall chains."
13331 msgstr ""
13332
13333 #. type: Plain text
13334 #: build/C/man7/packet.7:579
13335 msgid ""
13336 "In Linux 2.0, the only way to get a packet socket was by calling "
13337 "B<socket(AF_INET, SOCK_PACKET, >I<protocol>B<)>.  This is still supported "
13338 "but strongly deprecated.  The main difference between the two methods is "
13339 "that B<SOCK_PACKET> uses the old I<struct sockaddr_pkt> to specify an "
13340 "interface, which doesn't provide physical layer independence."
13341 msgstr ""
13342
13343 #. type: Plain text
13344 #: build/C/man7/packet.7:587
13345 #, no-wrap
13346 msgid ""
13347 "struct sockaddr_pkt {\n"
13348 "    unsigned short spkt_family;\n"
13349 "    unsigned char  spkt_device[14];\n"
13350 "    unsigned short spkt_protocol;\n"
13351 "};\n"
13352 msgstr ""
13353
13354 #. type: Plain text
13355 #: build/C/man7/packet.7:599
13356 msgid ""
13357 "I<spkt_family> contains the device type, I<spkt_protocol> is the IEEE 802.3 "
13358 "protocol type as defined in I<E<lt>sys/if_ether.hE<gt>> and I<spkt_device> "
13359 "is the device name as a null-terminated string, for example, eth0."
13360 msgstr ""
13361
13362 #. type: Plain text
13363 #: build/C/man7/packet.7:601
13364 msgid "This structure is obsolete and should not be used in new code."
13365 msgstr ""
13366
13367 #. type: Plain text
13368 #: build/C/man7/packet.7:605
13369 msgid ""
13370 "glibc 2.1 does not have a define for B<SOL_PACKET>.  The suggested "
13371 "workaround is to use:"
13372 msgstr ""
13373
13374 #. type: Plain text
13375 #: build/C/man7/packet.7:611
13376 #, no-wrap
13377 msgid ""
13378 "#ifndef SOL_PACKET\n"
13379 "#define SOL_PACKET 263\n"
13380 "#endif\n"
13381 msgstr ""
13382
13383 #. type: Plain text
13384 #: build/C/man7/packet.7:615
13385 msgid "This is fixed in later glibc versions."
13386 msgstr ""
13387
13388 #. type: Plain text
13389 #: build/C/man7/packet.7:617
13390 msgid "The IEEE 802.2/803.3 LLC handling could be considered as a bug."
13391 msgstr ""
13392
13393 #. type: Plain text
13394 #: build/C/man7/packet.7:619
13395 msgid "Socket filters are not documented."
13396 msgstr ""
13397
13398 #.  .SH CREDITS
13399 #.  This man page was written by Andi Kleen with help from Matthew Wilcox.
13400 #.  AF_PACKET in Linux 2.2 was implemented
13401 #.  by Alexey Kuznetsov, based on code by Alan Cox and others.
13402 #. type: Plain text
13403 #: build/C/man7/packet.7:631
13404 msgid ""
13405 "The B<MSG_TRUNC> B<recvmsg>(2)  extension is an ugly hack and should be "
13406 "replaced by a control message.  There is currently no way to get the "
13407 "original destination address of packets via B<SOCK_DGRAM>."
13408 msgstr ""
13409
13410 #. type: Plain text
13411 #: build/C/man7/packet.7:638
13412 msgid ""
13413 "B<socket>(2), B<pcap>(3), B<capabilities>(7), B<ip>(7), B<raw>(7), "
13414 "B<socket>(7)"
13415 msgstr ""
13416
13417 #. type: Plain text
13418 #: build/C/man7/packet.7:641
13419 msgid ""
13420 "RFC\\ 894 for the standard IP Ethernet encapsulation.  RFC\\ 1700 for the "
13421 "IEEE 802.3 IP encapsulation."
13422 msgstr ""
13423
13424 #. type: Plain text
13425 #: build/C/man7/packet.7:645
13426 msgid "The I<E<lt>linux/if_ether.hE<gt>> include file for physical layer protocols."
13427 msgstr ""
13428
13429 #. type: Plain text
13430 #: build/C/man7/packet.7:654
13431 msgid ""
13432 "The Linux kernel source tree.  I</Documentation/networking/filter.txt> "
13433 "describes how to apply Berkeley Packet Filters to packet sockets.  "
13434 "I</tools/testing/selftests/net/psock_tpacket.c> contains example source code "
13435 "for all available versions of B<PACKET_RX_RING> and B<PACKET_TX_RING>."
13436 msgstr ""
13437
13438 #. type: TH
13439 #: build/C/man5/protocols.5:29
13440 #, no-wrap
13441 msgid "PROTOCOLS"
13442 msgstr ""
13443
13444 #. type: TH
13445 #: build/C/man5/protocols.5:29 build/C/man7/x25.7:12
13446 #, no-wrap
13447 msgid "2012-08-05"
13448 msgstr ""
13449
13450 #. type: Plain text
13451 #: build/C/man5/protocols.5:32
13452 msgid "protocols - protocols definition file"
13453 msgstr ""
13454
13455 #. type: Plain text
13456 #: build/C/man5/protocols.5:40
13457 msgid ""
13458 "This file is a plain ASCII file, describing the various DARPA internet "
13459 "protocols that are available from the TCP/IP subsystem.  It should be "
13460 "consulted instead of using the numbers in the ARPA include files, or, even "
13461 "worse, just guessing them.  These numbers will occur in the protocol field "
13462 "of any IP header."
13463 msgstr ""
13464
13465 #.  .. by the DDN Network Information Center.
13466 #. type: Plain text
13467 #: build/C/man5/protocols.5:46
13468 msgid ""
13469 "Keep this file untouched since changes would result in incorrect IP "
13470 "packages.  Protocol numbers and names are specified by the IANA (Internet "
13471 "Assigned Numbers Authority)."
13472 msgstr ""
13473
13474 #. type: Plain text
13475 #: build/C/man5/protocols.5:48
13476 msgid "Each line is of the following format:"
13477 msgstr ""
13478
13479 #. type: Plain text
13480 #: build/C/man5/protocols.5:51
13481 msgid "I<protocol number aliases ...>"
13482 msgstr ""
13483
13484 #. type: Plain text
13485 #: build/C/man5/protocols.5:57
13486 msgid ""
13487 "where the fields are delimited by spaces or tabs.  Empty lines are ignored.  "
13488 "If a line contains a hash mark (#), the hash mark and the part of the line "
13489 "following it are ignored."
13490 msgstr ""
13491
13492 #. type: TP
13493 #: build/C/man5/protocols.5:59 build/C/man5/services.5:109
13494 #, no-wrap
13495 msgid "I<protocol>"
13496 msgstr ""
13497
13498 #. type: Plain text
13499 #: build/C/man5/protocols.5:67
13500 msgid "the native name for the protocol.  For example I<ip>, I<tcp>, or I<udp>."
13501 msgstr ""
13502
13503 #. type: Plain text
13504 #: build/C/man5/protocols.5:71
13505 msgid ""
13506 "the official number for this protocol as it will appear within the IP "
13507 "header."
13508 msgstr ""
13509
13510 #. type: Plain text
13511 #: build/C/man5/protocols.5:74
13512 msgid "optional aliases for the protocol."
13513 msgstr ""
13514
13515 #.  The following is not true as at glibc 2.8 (a line with a comma is
13516 #.  ignored by getservent()); it's not clear if/when it was ever true.
13517 #.    As a backward compatibility feature, the slash (/) between the
13518 #.    .I port
13519 #.    number and
13520 #.    .I protocol
13521 #.    name can in fact be either a slash or a comma (,).
13522 #.    Use of the comma in
13523 #.    modern installations is deprecated.
13524 #. type: Plain text
13525 #: build/C/man5/protocols.5:77 build/C/man5/services.5:165
13526 msgid ""
13527 "This file might be distributed over a network using a network-wide naming "
13528 "service like Yellow Pages/NIS or BIND/Hesiod."
13529 msgstr ""
13530
13531 #. type: Plain text
13532 #: build/C/man5/protocols.5:81
13533 msgid "The protocols definition file."
13534 msgstr ""
13535
13536 #. type: Plain text
13537 #: build/C/man5/protocols.5:83
13538 msgid "B<getprotoent>(3)"
13539 msgstr ""
13540
13541 #. type: Plain text
13542 #: build/C/man5/protocols.5:86
13543 msgid "E<.UR http://www.iana.org\\:/assignments\\:/protocol-numbers> E<.UE>"
13544 msgstr ""
13545
13546 #. type: TH
13547 #: build/C/man7/raw.7:13
13548 #, no-wrap
13549 msgid "RAW"
13550 msgstr ""
13551
13552 #. type: Plain text
13553 #: build/C/man7/raw.7:16
13554 msgid "raw - Linux IPv4 raw sockets"
13555 msgstr ""
13556
13557 #. type: Plain text
13558 #: build/C/man7/raw.7:22
13559 msgid "B<raw_socket = socket(AF_INET, SOCK_RAW, int >I<protocol>B<);>"
13560 msgstr ""
13561
13562 #. type: Plain text
13563 #: build/C/man7/raw.7:26
13564 msgid ""
13565 "Raw sockets allow new IPv4 protocols to be implemented in user space.  A raw "
13566 "socket receives or sends the raw datagram not including link level headers."
13567 msgstr ""
13568
13569 #. type: Plain text
13570 #: build/C/man7/raw.7:32
13571 msgid ""
13572 "The IPv4 layer generates an IP header when sending a packet unless the "
13573 "B<IP_HDRINCL> socket option is enabled on the socket.  When it is enabled, "
13574 "the packet must contain an IP header.  For receiving the IP header is always "
13575 "included in the packet."
13576 msgstr ""
13577
13578 #. type: Plain text
13579 #: build/C/man7/raw.7:36
13580 msgid ""
13581 "Only processes with an effective user ID of 0 or the B<CAP_NET_RAW> "
13582 "capability are allowed to open raw sockets."
13583 msgstr ""
13584
13585 #. type: Plain text
13586 #: build/C/man7/raw.7:43
13587 msgid ""
13588 "All packets or errors matching the I<protocol> number specified for the raw "
13589 "socket are passed to this socket.  For a list of the allowed protocols see "
13590 "RFC\\ 1700 assigned numbers and B<getprotobyname>(3)."
13591 msgstr ""
13592
13593 #. type: Plain text
13594 #: build/C/man7/raw.7:53
13595 msgid ""
13596 "A protocol of B<IPPROTO_RAW> implies enabled B<IP_HDRINCL> and is able to "
13597 "send any IP protocol that is specified in the passed header.  Receiving of "
13598 "all IP protocols via B<IPPROTO_RAW> is not possible using raw sockets."
13599 msgstr ""
13600
13601 #. type: tbl table
13602 #: build/C/man7/raw.7:58
13603 #, no-wrap
13604 msgid "IP Header fields modified on sending by B<IP_HDRINCL>\n"
13605 msgstr ""
13606
13607 #. type: tbl table
13608 #: build/C/man7/raw.7:59
13609 #, no-wrap
13610 msgid "IP Checksum:Always filled in.\n"
13611 msgstr ""
13612
13613 #. type: tbl table
13614 #: build/C/man7/raw.7:60
13615 #, no-wrap
13616 msgid "Source Address:Filled in when zero.\n"
13617 msgstr ""
13618
13619 #. type: tbl table
13620 #: build/C/man7/raw.7:61
13621 #, no-wrap
13622 msgid "Packet Id:Filled in when zero.\n"
13623 msgstr ""
13624
13625 #. type: tbl table
13626 #: build/C/man7/raw.7:62
13627 #, no-wrap
13628 msgid "Total Length:Always filled in.\n"
13629 msgstr ""
13630
13631 #. type: Plain text
13632 #: build/C/man7/raw.7:76
13633 msgid ""
13634 "If B<IP_HDRINCL> is specified and the IP header has a nonzero destination "
13635 "address, then the destination address of the socket is used to route the "
13636 "packet.  When B<MSG_DONTROUTE> is specified, the destination address should "
13637 "refer to a local interface, otherwise a routing table lookup is done anyway "
13638 "but gatewayed routes are ignored."
13639 msgstr ""
13640
13641 #. type: Plain text
13642 #: build/C/man7/raw.7:84
13643 msgid ""
13644 "If B<IP_HDRINCL> isn't set, then IP header options can be set on raw sockets "
13645 "with B<setsockopt>(2); see B<ip>(7)  for more information."
13646 msgstr ""
13647
13648 #. type: Plain text
13649 #: build/C/man7/raw.7:89
13650 msgid ""
13651 "In Linux 2.2, all IP header fields and options can be set using IP socket "
13652 "options.  This means raw sockets are usually needed only for new protocols "
13653 "or protocols with no user interface (like ICMP)."
13654 msgstr ""
13655
13656 #. type: Plain text
13657 #: build/C/man7/raw.7:93
13658 msgid ""
13659 "When a packet is received, it is passed to any raw sockets which have been "
13660 "bound to its protocol before it is passed to other protocol handlers (e.g., "
13661 "kernel protocol modules)."
13662 msgstr ""
13663
13664 #. type: Plain text
13665 #: build/C/man7/raw.7:109
13666 msgid ""
13667 "Raw sockets use the standard I<sockaddr_in> address structure defined in "
13668 "B<ip>(7).  The I<sin_port> field could be used to specify the IP protocol "
13669 "number, but it is ignored for sending in Linux 2.2 and should be always set "
13670 "to 0 (see BUGS).  For incoming packets, I<sin_port> is set to the protocol "
13671 "of the packet.  See the I<E<lt>netinet/in.hE<gt>> include file for valid IP "
13672 "protocols."
13673 msgstr ""
13674
13675 #.  Or SOL_RAW on Linux
13676 #. type: Plain text
13677 #: build/C/man7/raw.7:118
13678 msgid ""
13679 "Raw socket options can be set with B<setsockopt>(2)  and read with "
13680 "B<getsockopt>(2)  by passing the B<IPPROTO_RAW> family flag."
13681 msgstr ""
13682
13683 #. type: TP
13684 #: build/C/man7/raw.7:118
13685 #, no-wrap
13686 msgid "B<ICMP_FILTER>"
13687 msgstr ""
13688
13689 #. type: Plain text
13690 #: build/C/man7/raw.7:126
13691 msgid ""
13692 "Enable a special filter for raw sockets bound to the B<IPPROTO_ICMP> "
13693 "protocol.  The value has a bit set for each ICMP message type which should "
13694 "be filtered out.  The default is to filter no ICMP messages."
13695 msgstr ""
13696
13697 #. type: Plain text
13698 #: build/C/man7/raw.7:131
13699 msgid ""
13700 "In addition, all B<ip>(7)  B<IPPROTO_IP> socket options valid for datagram "
13701 "sockets are supported."
13702 msgstr ""
13703
13704 #. type: Plain text
13705 #: build/C/man7/raw.7:144
13706 msgid ""
13707 "Errors originating from the network are passed to the user only when the "
13708 "socket is connected or the B<IP_RECVERR> flag is enabled.  For connected "
13709 "sockets, only B<EMSGSIZE> and B<EPROTO> are passed for compatibility.  With "
13710 "B<IP_RECVERR>, all network errors are saved in the error queue."
13711 msgstr ""
13712
13713 #. type: Plain text
13714 #: build/C/man7/raw.7:149
13715 msgid ""
13716 "User tried to send to a broadcast address without having the broadcast flag "
13717 "set on the socket."
13718 msgstr ""
13719
13720 #. type: Plain text
13721 #: build/C/man7/raw.7:152
13722 msgid "An invalid memory address was supplied."
13723 msgstr ""
13724
13725 #. type: Plain text
13726 #: build/C/man7/raw.7:162
13727 msgid ""
13728 "Packet too big.  Either Path MTU Discovery is enabled (the "
13729 "B<IP_MTU_DISCOVER> socket flag) or the packet size exceeds the maximum "
13730 "allowed IPv4 packet size of 64KB."
13731 msgstr ""
13732
13733 #. type: TP
13734 #: build/C/man7/raw.7:162 build/C/man7/unix.7:447
13735 #, no-wrap
13736 msgid "B<EOPNOTSUPP>"
13737 msgstr ""
13738
13739 #. type: Plain text
13740 #: build/C/man7/raw.7:166
13741 msgid "Invalid flag has been passed to a socket call (like B<MSG_OOB>)."
13742 msgstr ""
13743
13744 #. type: Plain text
13745 #: build/C/man7/raw.7:172
13746 msgid ""
13747 "The user doesn't have permission to open raw sockets.  Only processes with "
13748 "an effective user ID of 0 or the B<CAP_NET_RAW> attribute may do that."
13749 msgstr ""
13750
13751 #. type: TP
13752 #: build/C/man7/raw.7:172
13753 #, no-wrap
13754 msgid "B<EPROTO>"
13755 msgstr ""
13756
13757 #. type: Plain text
13758 #: build/C/man7/raw.7:175
13759 msgid "An ICMP error has arrived reporting a parameter problem."
13760 msgstr ""
13761
13762 #. type: Plain text
13763 #: build/C/man7/raw.7:181
13764 msgid ""
13765 "B<IP_RECVERR> and B<ICMP_FILTER> are new in Linux 2.2.  They are Linux "
13766 "extensions and should not be used in portable programs."
13767 msgstr ""
13768
13769 #. type: Plain text
13770 #: build/C/man7/raw.7:187
13771 msgid ""
13772 "Linux 2.0 enabled some bug-to-bug compatibility with BSD in the raw socket "
13773 "code when the B<SO_BSDCOMPAT> socket option was set \\(em since Linux 2.2, "
13774 "this option no longer has that effect."
13775 msgstr ""
13776
13777 #. type: Plain text
13778 #: build/C/man7/raw.7:205
13779 msgid ""
13780 "By default, raw sockets do path MTU (Maximum Transmission Unit) discovery.  "
13781 "This means the kernel will keep track of the MTU to a specific target IP "
13782 "address and return B<EMSGSIZE> when a raw packet write exceeds it.  When "
13783 "this happens, the application should decrease the packet size.  Path MTU "
13784 "discovery can be also turned off using the B<IP_MTU_DISCOVER> socket option "
13785 "or the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file, see B<ip>(7)  for "
13786 "details.  When turned off, raw sockets will fragment outgoing packets that "
13787 "exceed the interface MTU.  However, disabling it is not recommended for "
13788 "performance and reliability reasons."
13789 msgstr ""
13790
13791 #. type: Plain text
13792 #: build/C/man7/raw.7:214
13793 msgid ""
13794 "A raw socket can be bound to a specific local address using the B<bind>(2)  "
13795 "call.  If it isn't bound, all packets with the specified IP protocol are "
13796 "received.  In addition, a RAW socket can be bound to a specific network "
13797 "device using B<SO_BINDTODEVICE>; see B<socket>(7)."
13798 msgstr ""
13799
13800 #. type: Plain text
13801 #: build/C/man7/raw.7:225
13802 msgid ""
13803 "An B<IPPROTO_RAW> socket is send only.  If you really want to receive all IP "
13804 "packets, use a B<packet>(7)  socket with the B<ETH_P_IP> protocol.  Note "
13805 "that packet sockets don't reassemble IP fragments, unlike raw sockets."
13806 msgstr ""
13807
13808 #. type: Plain text
13809 #: build/C/man7/raw.7:231
13810 msgid ""
13811 "If you want to receive all ICMP packets for a datagram socket, it is often "
13812 "better to use B<IP_RECVERR> on that particular socket; see B<ip>(7)."
13813 msgstr ""
13814
13815 #. type: Plain text
13816 #: build/C/man7/raw.7:238
13817 msgid ""
13818 "Raw sockets may tap all IP protocols in Linux, even protocols like ICMP or "
13819 "TCP which have a protocol module in the kernel.  In this case, the packets "
13820 "are passed to both the kernel module and the raw socket(s).  This should not "
13821 "be relied upon in portable programs, many other BSD socket implementation "
13822 "have limitations here."
13823 msgstr ""
13824
13825 #. type: Plain text
13826 #: build/C/man7/raw.7:243
13827 msgid ""
13828 "Linux never changes headers passed from the user (except for filling in some "
13829 "zeroed fields as described for B<IP_HDRINCL>).  This differs from many other "
13830 "implementations of raw sockets."
13831 msgstr ""
13832
13833 #. type: Plain text
13834 #: build/C/man7/raw.7:246
13835 msgid ""
13836 "RAW sockets are generally rather unportable and should be avoided in "
13837 "programs intended to be portable."
13838 msgstr ""
13839
13840 #. type: Plain text
13841 #: build/C/man7/raw.7:252
13842 msgid ""
13843 "Sending on raw sockets should take the IP protocol from I<sin_port>; this "
13844 "ability was lost in Linux 2.2.  The workaround is to use B<IP_HDRINCL>."
13845 msgstr ""
13846
13847 #. type: Plain text
13848 #: build/C/man7/raw.7:254
13849 msgid "Transparent proxy extensions are not described."
13850 msgstr ""
13851
13852 #. type: Plain text
13853 #: build/C/man7/raw.7:259
13854 msgid ""
13855 "When the B<IP_HDRINCL> option is set, datagrams will not be fragmented and "
13856 "are limited to the interface MTU."
13857 msgstr ""
13858
13859 #.  .SH AUTHORS
13860 #.  This man page was written by Andi Kleen.
13861 #. type: Plain text
13862 #: build/C/man7/raw.7:269
13863 msgid ""
13864 "Setting the IP protocol for sending in I<sin_port> got lost in Linux 2.2.  "
13865 "The protocol that the socket was bound to or that was specified in the "
13866 "initial B<socket>(2)  call is always used."
13867 msgstr ""
13868
13869 #. type: Plain text
13870 #: build/C/man7/raw.7:275
13871 msgid "B<recvmsg>(2), B<sendmsg>(2), B<capabilities>(7), B<ip>(7), B<socket>(7)"
13872 msgstr ""
13873
13874 #. type: Plain text
13875 #: build/C/man7/raw.7:282
13876 msgid ""
13877 "B<RFC\\ 1191> for path MTU discovery.  B<RFC\\ 791> and the "
13878 "I<E<lt>linux/ip.hE<gt>> header file for the IP protocol."
13879 msgstr ""
13880
13881 #. type: TH
13882 #: build/C/man3/rcmd.3:43
13883 #, no-wrap
13884 msgid "RCMD"
13885 msgstr ""
13886
13887 #. type: Plain text
13888 #: build/C/man3/rcmd.3:48
13889 msgid ""
13890 "rcmd, rresvport, iruserok, ruserok, rcmd_af, rresvport_af, iruserok_af, "
13891 "ruserok_af - routines for returning a stream to a remote command"
13892 msgstr ""
13893
13894 #. type: Plain text
13895 #: build/C/man3/rcmd.3:51
13896 #, no-wrap
13897 msgid ""
13898 "B<#include E<lt>netdb.hE<gt> \\ \\ >/* Or E<lt>unistd.hE<gt> on some systems "
13899 "*/\n"
13900 msgstr ""
13901
13902 #. type: Plain text
13903 #: build/C/man3/rcmd.3:54
13904 #, no-wrap
13905 msgid ""
13906 "B<int rcmd(char **>I<ahost>B<, unsigned short >I<inport>B<, const char "
13907 "*>I<locuser>B<, >\n"
13908 "B<         const char *>I<remuser>B<, const char *>I<cmd>B<, int "
13909 "*>I<fd2p>B<);>\n"
13910 msgstr ""
13911
13912 #. type: Plain text
13913 #: build/C/man3/rcmd.3:56
13914 #, no-wrap
13915 msgid "B<int rresvport(int *>I<port>B<);>\n"
13916 msgstr ""
13917
13918 #. type: Plain text
13919 #: build/C/man3/rcmd.3:59
13920 #, no-wrap
13921 msgid ""
13922 "B<int iruserok(uint32_t >I<raddr>B<, int >I<superuser>B<, >\n"
13923 "B<             const char *>I<ruser>B<, const char *>I<luser>B<);>\n"
13924 msgstr ""
13925
13926 #. type: Plain text
13927 #: build/C/man3/rcmd.3:62
13928 #, no-wrap
13929 msgid ""
13930 "B<int ruserok(const char *>I<rhost>B<, int >I<superuser>B<, >\n"
13931 "B<            const char *>I<ruser>B<, const char *>I<luser>B<);>\n"
13932 msgstr ""
13933
13934 #. type: Plain text
13935 #: build/C/man3/rcmd.3:66
13936 #, no-wrap
13937 msgid ""
13938 "B<int rcmd_af(char **>I<ahost>B<, unsigned short >I<inport>B<, const char "
13939 "*>I<locuser>B<, >\n"
13940 "B<            const char *>I<remuser>B<, const char *>I<cmd>B<, int "
13941 "*>I<fd2p>B<,>\n"
13942 "B<            sa_family_t >I<af>B<);>\n"
13943 msgstr ""
13944
13945 #. type: Plain text
13946 #: build/C/man3/rcmd.3:68
13947 #, no-wrap
13948 msgid "B<int rresvport_af(int *>I<port>B<, sa_family_t >I<af>B<);>\n"
13949 msgstr ""
13950
13951 #. type: Plain text
13952 #: build/C/man3/rcmd.3:72
13953 #, no-wrap
13954 msgid ""
13955 "B<int iruserok_af(const void *>I<raddr>B<, int >I<superuser>B<, >\n"
13956 "B<                const char *>I<ruser>B<, const char *>I<luser>B<, "
13957 "sa_family_t >I<af>B<);>\n"
13958 msgstr ""
13959
13960 #. type: Plain text
13961 #: build/C/man3/rcmd.3:76
13962 #, no-wrap
13963 msgid ""
13964 "B<int ruserok_af(const char *>I<rhost>B<, int >I<superuser>B<, >\n"
13965 "B<               const char *>I<ruser>B<, const char *>I<luser>B<, "
13966 "sa_family_t >I<af>B<);>\n"
13967 msgstr ""
13968
13969 #. type: Plain text
13970 #: build/C/man3/rcmd.3:92
13971 msgid ""
13972 "B<rcmd>(), B<rcmd_af>(), B<rresvport>(), B<rresvport_af>(), B<iruserok>(), "
13973 "B<iruserok_af>(), B<ruserok>(), B<ruserok_af>(): _BSD_SOURCE"
13974 msgstr ""
13975
13976 #. type: Plain text
13977 #: build/C/man3/rcmd.3:113
13978 msgid ""
13979 "The B<rcmd>()  function is used by the superuser to execute a command on a "
13980 "remote machine using an authentication scheme based on privileged port "
13981 "numbers.  The B<rresvport>()  function returns a descriptor to a socket with "
13982 "an address in the privileged port space.  The B<iruserok>()  and "
13983 "B<ruserok>()  functions are used by servers to authenticate clients "
13984 "requesting service with B<rcmd>().  All four functions are used by the "
13985 "B<rshd>(8)  server (among others)."
13986 msgstr ""
13987
13988 #. type: SS
13989 #: build/C/man3/rcmd.3:113
13990 #, no-wrap
13991 msgid "rcmd()"
13992 msgstr ""
13993
13994 #. type: Plain text
13995 #: build/C/man3/rcmd.3:129
13996 msgid ""
13997 "The B<rcmd>()  function looks up the host I<*ahost> using "
13998 "B<gethostbyname>(3), returning -1 if the host does not exist.  Otherwise, "
13999 "I<*ahost> is set to the standard name of the host and a connection is "
14000 "established to a server residing at the well-known Internet port I<inport>."
14001 msgstr ""
14002
14003 #. type: Plain text
14004 #: build/C/man3/rcmd.3:158
14005 msgid ""
14006 "If the connection succeeds, a socket in the Internet domain of type "
14007 "B<SOCK_STREAM> is returned to the caller, and given to the remote command as "
14008 "I<stdin> and I<stdout>.  If I<fd2p> is nonzero, then an auxiliary channel to "
14009 "a control process will be set up, and a descriptor for it will be placed in "
14010 "I<*fd2p>.  The control process will return diagnostic output from the "
14011 "command (unit 2) on this channel, and will also accept bytes on this channel "
14012 "as being UNIX signal numbers, to be forwarded to the process group of the "
14013 "command.  If I<fd2p> is 0, then the I<stderr> (unit 2 of the remote command) "
14014 "will be made the same as the I<stdout> and no provision is made for sending "
14015 "arbitrary signals to the remote process, although you may be able to get its "
14016 "attention by using out-of-band data."
14017 msgstr ""
14018
14019 #. type: Plain text
14020 #: build/C/man3/rcmd.3:161
14021 msgid "The protocol is described in detail in B<rshd>(8)."
14022 msgstr ""
14023
14024 #. type: SS
14025 #: build/C/man3/rcmd.3:161
14026 #, no-wrap
14027 msgid "rresvport()"
14028 msgstr ""
14029
14030 #. type: Plain text
14031 #: build/C/man3/rcmd.3:183
14032 msgid ""
14033 "The B<rresvport>()  function is used to obtain a socket with a privileged "
14034 "port bound to it.  This socket is suitable for use by B<rcmd>()  and several "
14035 "other functions.  Privileged ports are those in the range 0 to 1023.  Only a "
14036 "privileged process (B<CAP_NET_BIND_SERVICE>)  is allowed to bind to a "
14037 "privileged port.  In the glibc implementation, this function restricts its "
14038 "search to the ports from 512 to 1023.  The I<port> argument is value-result: "
14039 "the value it supplies to the call is used as the starting point for a "
14040 "circular search of the port range; on (successful) return, it contains the "
14041 "port number that was bound to."
14042 msgstr ""
14043
14044 #. type: SS
14045 #: build/C/man3/rcmd.3:183
14046 #, no-wrap
14047 msgid "iruserok() and ruserok()"
14048 msgstr ""
14049
14050 #. type: Plain text
14051 #: build/C/man3/rcmd.3:201
14052 msgid ""
14053 "The B<iruserok>()  and B<ruserok>()  functions take a remote host's IP "
14054 "address or name, respectively, two usernames and a flag indicating whether "
14055 "the local user's name is that of the superuser.  Then, if the user is I<not> "
14056 "the superuser, it checks the I</etc/hosts.equiv> file.  If that lookup is "
14057 "not done, or is unsuccessful, the I<.rhosts> in the local user's home "
14058 "directory is checked to see if the request for service is allowed."
14059 msgstr ""
14060
14061 #. type: Plain text
14062 #: build/C/man3/rcmd.3:217
14063 msgid ""
14064 "If this file does not exist, is not a regular file, is owned by anyone other "
14065 "than the user or the superuser, or is writable by anyone other than the "
14066 "owner, the check automatically fails.  Zero is returned if the machine name "
14067 "is listed in the I<hosts.equiv> file, or the host and remote username are "
14068 "found in the I<.rhosts> file; otherwise B<iruserok>()  and B<ruserok>()  "
14069 "return -1.  If the local domain (as obtained from B<gethostname>(2))  is the "
14070 "same as the remote domain, only the machine name need be specified."
14071 msgstr ""
14072
14073 #. type: Plain text
14074 #: build/C/man3/rcmd.3:223
14075 msgid ""
14076 "If the IP address of the remote host is known, B<iruserok>()  should be used "
14077 "in preference to B<ruserok>(), as it does not require trusting the DNS "
14078 "server for the remote host's domain."
14079 msgstr ""
14080
14081 #. type: SS
14082 #: build/C/man3/rcmd.3:223
14083 #, no-wrap
14084 msgid "*_af() variants"
14085 msgstr ""
14086
14087 #. type: Plain text
14088 #: build/C/man3/rcmd.3:239
14089 msgid ""
14090 "All of the functions described above work with IPv4 (B<AF_INET>)  sockets.  "
14091 "The \"_af\" variants take an extra argument that allows the socket address "
14092 "family to be specified.  For these functions, the I<af> argument can be "
14093 "specified as B<AF_INET> or B<AF_INET6>.  In addition, B<rcmd_af>()  supports "
14094 "the use of B<AF_UNSPEC>."
14095 msgstr ""
14096
14097 #. type: Plain text
14098 #: build/C/man3/rcmd.3:245
14099 msgid ""
14100 "The B<rcmd>()  function returns a valid socket descriptor on success.  It "
14101 "returns -1 on error and prints a diagnostic message on the standard error."
14102 msgstr ""
14103
14104 #. type: Plain text
14105 #: build/C/man3/rcmd.3:256
14106 msgid ""
14107 "The B<rresvport>()  function returns a valid, bound socket descriptor on "
14108 "success.  It returns -1 on error with the global value I<errno> set "
14109 "according to the reason for failure.  The error code B<EAGAIN> is overloaded "
14110 "to mean \"All network ports in use.\""
14111 msgstr ""
14112
14113 #. type: Plain text
14114 #: build/C/man3/rcmd.3:262
14115 msgid ""
14116 "For information on the return from B<ruserok>()  and B<iruserok>(), see "
14117 "above."
14118 msgstr ""
14119
14120 #. type: Plain text
14121 #: build/C/man3/rcmd.3:270
14122 msgid ""
14123 "The functions B<iruserok_af>(), B<rcmd_af>(), B<rresvport_af>(), and "
14124 "B<ruserok_af>()  functions are provide in glibc since version 2.2."
14125 msgstr ""
14126
14127 #. type: Plain text
14128 #: build/C/man3/rcmd.3:278
14129 msgid ""
14130 "Not in POSIX.1-2001.  Present on the BSDs, Solaris, and many other systems.  "
14131 "These functions appeared in 4.2BSD.  The \"_af\" variants are more recent "
14132 "additions, and are not present on as wide a range of systems."
14133 msgstr ""
14134
14135 #.  Bug filed 25 Nov 2007:
14136 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=5399
14137 #. type: Plain text
14138 #: build/C/man3/rcmd.3:285
14139 msgid ""
14140 "B<iruserok>()  and B<iruserok_af>()  are declared in glibc headers only "
14141 "since version 2.12."
14142 msgstr ""
14143
14144 #. type: Plain text
14145 #: build/C/man3/rcmd.3:293
14146 msgid ""
14147 "B<rlogin>(1), B<rsh>(1), B<intro>(2), B<rexec>(3), B<rexecd>(8), "
14148 "B<rlogind>(8), B<rshd>(8)"
14149 msgstr ""
14150
14151 #. type: TH
14152 #: build/C/man5/resolv.conf.5:23
14153 #, no-wrap
14154 msgid "RESOLV.CONF"
14155 msgstr ""
14156
14157 #. type: Plain text
14158 #: build/C/man5/resolv.conf.5:27
14159 msgid "resolv.conf - resolver configuration file"
14160 msgstr ""
14161
14162 #. type: Plain text
14163 #: build/C/man5/resolv.conf.5:29
14164 msgid "B</etc/resolv.conf>"
14165 msgstr ""
14166
14167 #. type: Plain text
14168 #: build/C/man5/resolv.conf.5:41
14169 msgid ""
14170 "The I<resolver> is a set of routines in the C library that provide access to "
14171 "the Internet Domain Name System (DNS).  The resolver configuration file "
14172 "contains information that is read by the resolver routines the first time "
14173 "they are invoked by a process.  The file is designed to be human readable "
14174 "and contains a list of keywords with values that provide various types of "
14175 "resolver information.  The configuration file is considered a trusted source "
14176 "of DNS information (e.g., DNSSEC AD-bit information will be returned "
14177 "unmodified from this source)."
14178 msgstr ""
14179
14180 #. type: Plain text
14181 #: build/C/man5/resolv.conf.5:46
14182 msgid ""
14183 "If this file does not exist, only the name server on the local machine will "
14184 "be queried; the domain name is determined from the hostname and the domain "
14185 "search path is constructed from the domain name."
14186 msgstr ""
14187
14188 #. type: Plain text
14189 #: build/C/man5/resolv.conf.5:48
14190 msgid "The different configuration options are:"
14191 msgstr ""
14192
14193 #. type: TP
14194 #: build/C/man5/resolv.conf.5:48
14195 #, no-wrap
14196 msgid "B<nameserver> Name server IP address"
14197 msgstr ""
14198
14199 #. type: Plain text
14200 #: build/C/man5/resolv.conf.5:65
14201 msgid ""
14202 "Internet address of a name server that the resolver should query, either an "
14203 "IPv4 address (in dot notation), or an IPv6 address in colon (and possibly "
14204 "dot) notation as per RFC 2373.  Up to B<MAXNS> (currently 3, see "
14205 "I<E<lt>resolv.hE<gt>>) name servers may be listed, one per keyword.  If "
14206 "there are multiple servers, the resolver library queries them in the order "
14207 "listed.  If no B<nameserver> entries are present, the default is to use the "
14208 "name server on the local machine.  (The algorithm used is to try a name "
14209 "server, and if the query times out, try the next, until out of name servers, "
14210 "then repeat trying all the name servers until a maximum number of retries "
14211 "are made.)"
14212 msgstr ""
14213
14214 #. type: TP
14215 #: build/C/man5/resolv.conf.5:65
14216 #, no-wrap
14217 msgid "B<domain> Local domain name."
14218 msgstr ""
14219
14220 #. type: Plain text
14221 #: build/C/man5/resolv.conf.5:76
14222 msgid ""
14223 "Most queries for names within this domain can use short names relative to "
14224 "the local domain.  If set to \\(aq.\\(aq, the root domain is considered.  If "
14225 "no B<domain> entry is present, the domain is determined from the local "
14226 "hostname returned by B<gethostname>(2); the domain part is taken to be "
14227 "everything after the first \\(aq.\\(aq.  Finally, if the hostname does not "
14228 "contain a domain part, the root domain is assumed."
14229 msgstr ""
14230
14231 #. type: TP
14232 #: build/C/man5/resolv.conf.5:76
14233 #, no-wrap
14234 msgid "B<search> Search list for host-name lookup."
14235 msgstr ""
14236
14237 #.  When having a resolv.conv with a line
14238 #.   search subdomain.domain.tld domain.tld
14239 #.  and doing a hostlookup, for example by
14240 #.   ping host.anothersubdomain
14241 #.  it sends dns-requests for
14242 #.   host.anothersubdomain.
14243 #.   host.anothersubdomain.subdomain.domain.tld.
14244 #.   host.anothersubdomain.domain.tld.
14245 #.  thus not only causing unnecessary traffic for the root-dns-servers
14246 #.  but broadcasting information to the outside and making man-in-the-middle
14247 #.  attacks possible.
14248 #. type: Plain text
14249 #: build/C/man5/resolv.conf.5:106
14250 msgid ""
14251 "The search list is normally determined from the local domain name; by "
14252 "default, it contains only the local domain name.  This may be changed by "
14253 "listing the desired domain search path following the I<search> keyword with "
14254 "spaces or tabs separating the names.  Resolver queries having fewer than "
14255 "I<ndots> dots (default is 1) in them will be attempted using each component "
14256 "of the search path in turn until a match is found.  For environments with "
14257 "multiple subdomains please read B<options ndots:>I<n> below to avoid "
14258 "man-in-the-middle attacks and unnecessary traffic for the root-dns-servers.  "
14259 "Note that this process may be slow and will generate a lot of network "
14260 "traffic if the servers for the listed domains are not local, and that "
14261 "queries will time out if no server is available for one of the domains."
14262 msgstr ""
14263
14264 #. type: Plain text
14265 #: build/C/man5/resolv.conf.5:109
14266 msgid ""
14267 "The search list is currently limited to six domains with a total of 256 "
14268 "characters."
14269 msgstr ""
14270
14271 #. type: TP
14272 #: build/C/man5/resolv.conf.5:109
14273 #, no-wrap
14274 msgid "B<sortlist>"
14275 msgstr ""
14276
14277 #. type: Plain text
14278 #: build/C/man5/resolv.conf.5:122
14279 msgid ""
14280 "This option allows addresses returned by B<gethostbyname>(3)  to be sorted.  "
14281 "A sortlist is specified by IP-address-netmask pairs.  The netmask is "
14282 "optional and defaults to the natural netmask of the net.  The IP address and "
14283 "optional network pairs are separated by slashes.  Up to 10 pairs may be "
14284 "specified.  Here is an example:"
14285 msgstr ""
14286
14287 #. type: Plain text
14288 #: build/C/man5/resolv.conf.5:125
14289 msgid "sortlist 130.155.160.0/255.255.240.0 130.155.0.0"
14290 msgstr ""
14291
14292 #. type: TP
14293 #: build/C/man5/resolv.conf.5:127
14294 #, no-wrap
14295 msgid "B<options>"
14296 msgstr ""
14297
14298 #. type: Plain text
14299 #: build/C/man5/resolv.conf.5:131
14300 msgid ""
14301 "Options allows certain internal resolver variables to be modified.  The "
14302 "syntax is"
14303 msgstr ""
14304
14305 #. type: Plain text
14306 #: build/C/man5/resolv.conf.5:134
14307 msgid "B<options> I<option> I<...>"
14308 msgstr ""
14309
14310 #. type: Plain text
14311 #: build/C/man5/resolv.conf.5:136
14312 msgid "where I<option> is one of the following:"
14313 msgstr ""
14314
14315 #. type: TP
14316 #: build/C/man5/resolv.conf.5:136
14317 #, no-wrap
14318 msgid "B<debug>"
14319 msgstr ""
14320
14321 #.  Since glibc 2.2?
14322 #. type: Plain text
14323 #: build/C/man5/resolv.conf.5:145
14324 msgid ""
14325 "sets B<RES_DEBUG> in I<_res.options> (effective only if glibc was built with "
14326 "debug support; see B<resolver>(3))."
14327 msgstr ""
14328
14329 #. type: TP
14330 #: build/C/man5/resolv.conf.5:145
14331 #, no-wrap
14332 msgid "B<ndots:>I<n>"
14333 msgstr ""
14334
14335 #.  Since glibc 2.2
14336 #. type: Plain text
14337 #: build/C/man5/resolv.conf.5:159
14338 msgid ""
14339 "sets a threshold for the number of dots which must appear in a name given to "
14340 "B<res_query>(3)  (see B<resolver>(3))  before an I<initial absolute query> "
14341 "will be made.  The default for I<n> is 1, meaning that if there are any dots "
14342 "in a name, the name will be tried first as an absolute name before any "
14343 "I<search list> elements are appended to it.  The value for this option is "
14344 "silently capped to 15."
14345 msgstr ""
14346
14347 #. type: TP
14348 #: build/C/man5/resolv.conf.5:159
14349 #, no-wrap
14350 msgid "B<timeout:>I<n>"
14351 msgstr ""
14352
14353 #.  Since glibc 2.2
14354 #. type: Plain text
14355 #: build/C/man5/resolv.conf.5:170
14356 msgid ""
14357 "sets the amount of time the resolver will wait for a response from a remote "
14358 "name server before retrying the query via a different name server.  Measured "
14359 "in seconds, the default is B<RES_TIMEOUT> (currently 5, see "
14360 "I<E<lt>resolv.hE<gt>>).  The value for this option is silently capped to 30."
14361 msgstr ""
14362
14363 #. type: TP
14364 #: build/C/man5/resolv.conf.5:170
14365 #, no-wrap
14366 msgid "B<attempts:>I<n>"
14367 msgstr ""
14368
14369 #. type: Plain text
14370 #: build/C/man5/resolv.conf.5:179
14371 msgid ""
14372 "sets the number of times the resolver will send a query to its name servers "
14373 "before giving up and returning an error to the calling application.  The "
14374 "default is B<RES_DFLRETRY> (currently 2, see I<E<lt>resolv.hE<gt>>).  The "
14375 "value for this option is silently capped to 5."
14376 msgstr ""
14377
14378 #. type: TP
14379 #: build/C/man5/resolv.conf.5:179
14380 #, no-wrap
14381 msgid "B<rotate>"
14382 msgstr ""
14383
14384 #.  Since glibc 2.2
14385 #. type: Plain text
14386 #: build/C/man5/resolv.conf.5:189
14387 msgid ""
14388 "sets B<RES_ROTATE> in I<_res.options>, which causes round-robin selection of "
14389 "name servers from among those listed.  This has the effect of spreading the "
14390 "query load among all listed servers, rather than having all clients try the "
14391 "first listed server first every time."
14392 msgstr ""
14393
14394 #. type: TP
14395 #: build/C/man5/resolv.conf.5:189
14396 #, no-wrap
14397 msgid "B<no-check-names>"
14398 msgstr ""
14399
14400 #.  since glibc 2.2
14401 #. type: Plain text
14402 #: build/C/man5/resolv.conf.5:199
14403 msgid ""
14404 "sets B<RES_NOCHECKNAME> in I<_res.options>, which disables the modern BIND "
14405 "checking of incoming hostnames and mail names for invalid characters such as "
14406 "underscore (_), non-ASCII, or control characters."
14407 msgstr ""
14408
14409 #. type: TP
14410 #: build/C/man5/resolv.conf.5:199
14411 #, no-wrap
14412 msgid "B<inet6>"
14413 msgstr ""
14414
14415 #.  Since glibc 2.2
14416 #. type: Plain text
14417 #: build/C/man5/resolv.conf.5:210
14418 msgid ""
14419 "sets B<RES_USE_INET6> in I<_res.options>.  This has the effect of trying a "
14420 "AAAA query before an A query inside the B<gethostbyname>(3)  function, and "
14421 "of mapping IPv4 responses in IPv6 \"tunneled form\" if no AAAA records are "
14422 "found but an A record set exists."
14423 msgstr ""
14424
14425 #. type: TP
14426 #: build/C/man5/resolv.conf.5:210
14427 #, no-wrap
14428 msgid "B<ip6-bytestring> (since glibc 2.3.4)"
14429 msgstr ""
14430
14431 #. type: Plain text
14432 #: build/C/man5/resolv.conf.5:219
14433 msgid ""
14434 "sets B<RES_USE_BSTRING> in I<_res.options>.  This causes reverse IPv6 "
14435 "lookups to be made using the bit-label format described in RFC\\ 2673; if "
14436 "this option is not set, then nibble format is used."
14437 msgstr ""
14438
14439 #. type: TP
14440 #: build/C/man5/resolv.conf.5:219
14441 #, no-wrap
14442 msgid "B<ip6-dotint>/B<no-ip6-dotint> (since glibc 2.3.4)"
14443 msgstr ""
14444
14445 #. type: Plain text
14446 #: build/C/man5/resolv.conf.5:236
14447 msgid ""
14448 "Clear/set B<RES_NOIP6DOTINT> in I<_res.options>.  When this option is clear "
14449 "(B<ip6-dotint>), reverse IPv6 lookups are made in the (deprecated)  "
14450 "I<ip6.int> zone; when this option is set (B<no-ip6-dotint>), reverse IPv6 "
14451 "lookups are made in the I<ip6.arpa> zone by default.  This option is set by "
14452 "default."
14453 msgstr ""
14454
14455 #. type: TP
14456 #: build/C/man5/resolv.conf.5:236
14457 #, no-wrap
14458 msgid "B<edns0> (since glibc 2.6)"
14459 msgstr ""
14460
14461 #. type: Plain text
14462 #: build/C/man5/resolv.conf.5:243
14463 msgid ""
14464 "sets B<RES_USE_EDNSO> in I<_res.options>.  This enables support for the DNS "
14465 "extensions described in RFC\\ 2671."
14466 msgstr ""
14467
14468 #. type: TP
14469 #: build/C/man5/resolv.conf.5:243
14470 #, no-wrap
14471 msgid "B<single-request> (since glibc 2.10)"
14472 msgstr ""
14473
14474 #. type: Plain text
14475 #: build/C/man5/resolv.conf.5:256
14476 msgid ""
14477 "sets B<RES_SNGLKUP> in I<_res.options>.  By default, glibc performs IPv4 and "
14478 "IPv6 lookups in parallel since version 2.9.  Some appliance DNS servers "
14479 "cannot handle these queries properly and make the requests time out.  This "
14480 "option disables the behavior and makes glibc perform the IPv6 and IPv4 "
14481 "requests sequentially (at the cost of some slowdown of the resolving "
14482 "process)."
14483 msgstr ""
14484
14485 #. type: TP
14486 #: build/C/man5/resolv.conf.5:256
14487 #, no-wrap
14488 msgid "B<single-request-reopen> (since glibc 2.9)"
14489 msgstr ""
14490
14491 #. type: Plain text
14492 #: build/C/man5/resolv.conf.5:264
14493 msgid ""
14494 "The resolver uses the same socket for the A and AAAA requests.  Some "
14495 "hardware mistakenly sends back only one reply.  When that happens the client "
14496 "system will sit and wait for the second reply.  Turning this option on "
14497 "changes this behavior so that if two requests from the same port are not "
14498 "handled correctly it will close the socket and open a new one before sending "
14499 "the second request."
14500 msgstr ""
14501
14502 #. type: TP
14503 #: build/C/man5/resolv.conf.5:264
14504 #, no-wrap
14505 msgid "B<no-tld-query> (since glibc 2.14)"
14506 msgstr ""
14507
14508 #. type: Plain text
14509 #: build/C/man5/resolv.conf.5:275
14510 msgid ""
14511 "sets RES_NOTLDQUERY in I<_res.options>.  This option causes B<res_nsearch>()  "
14512 "to not attempt to resolve an unqualified name as if it were a top level "
14513 "domain (TLD).  This option can cause problems if the site has ``localhost'' "
14514 "as a TLD rather than having localhost on one or more elements of the search "
14515 "list.  This option has no effect if neither RES_DEFNAMES or RES_DNSRCH is "
14516 "set."
14517 msgstr ""
14518
14519 #. type: Plain text
14520 #: build/C/man5/resolv.conf.5:280
14521 msgid ""
14522 "The I<domain> and I<search> keywords are mutually exclusive.  If more than "
14523 "one instance of these keywords is present, the last instance wins."
14524 msgstr ""
14525
14526 #. type: Plain text
14527 #: build/C/man5/resolv.conf.5:285
14528 msgid ""
14529 "The I<search> keyword of a system's I<resolv.conf> file can be overridden on "
14530 "a per-process basis by setting the environment variable B<LOCALDOMAIN> to a "
14531 "space-separated list of search domains."
14532 msgstr ""
14533
14534 #. type: Plain text
14535 #: build/C/man5/resolv.conf.5:291
14536 msgid ""
14537 "The I<options> keyword of a system's I<resolv.conf> file can be amended on a "
14538 "per-process basis by setting the environment variable B<RES_OPTIONS> to a "
14539 "space-separated list of resolver options as explained above under "
14540 "B<options>."
14541 msgstr ""
14542
14543 #. type: Plain text
14544 #: build/C/man5/resolv.conf.5:295
14545 msgid ""
14546 "The keyword and value must appear on a single line, and the keyword (e.g., "
14547 "B<nameserver>) must start the line.  The value follows the keyword, "
14548 "separated by white space."
14549 msgstr ""
14550
14551 #. type: Plain text
14552 #: build/C/man5/resolv.conf.5:298
14553 msgid ""
14554 "Lines that contain a semicolon (;) or hash character (#)  in the first "
14555 "column are treated as comments."
14556 msgstr ""
14557
14558 #. type: Plain text
14559 #: build/C/man5/resolv.conf.5:301
14560 msgid "I</etc/resolv.conf>, I<E<lt>resolv.hE<gt>>"
14561 msgstr ""
14562
14563 #. type: Plain text
14564 #: build/C/man5/resolv.conf.5:306
14565 msgid "B<gethostbyname>(3), B<resolver>(3), B<hostname>(7), B<named>(8)"
14566 msgstr ""
14567
14568 #. type: Plain text
14569 #: build/C/man5/resolv.conf.5:308
14570 msgid "Name Server Operations Guide for BIND"
14571 msgstr ""
14572
14573 #. type: TH
14574 #: build/C/man3/resolver.3:32
14575 #, no-wrap
14576 msgid "RESOLVER"
14577 msgstr ""
14578
14579 #. type: Plain text
14580 #: build/C/man3/resolver.3:36
14581 msgid ""
14582 "res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, "
14583 "dn_comp, dn_expand - resolver routines"
14584 msgstr ""
14585
14586 #. type: Plain text
14587 #: build/C/man3/resolver.3:42
14588 #, no-wrap
14589 msgid ""
14590 "B<#include E<lt>netinet/in.hE<gt>>\n"
14591 "B<#include E<lt>arpa/nameser.hE<gt>>\n"
14592 "B<#include E<lt>resolv.hE<gt>>\n"
14593 "B<extern struct __res_state _res;>\n"
14594 msgstr ""
14595
14596 #. type: Plain text
14597 #: build/C/man3/resolver.3:44
14598 #, no-wrap
14599 msgid "B<int res_init(void);>\n"
14600 msgstr ""
14601
14602 #. type: Plain text
14603 #: build/C/man3/resolver.3:46
14604 #, no-wrap
14605 msgid "B<int res_query(const char *>I<dname>B<, int >I<class>B<, int >I<type>B<,>\n"
14606 msgstr ""
14607
14608 #. type: Plain text
14609 #: build/C/man3/resolver.3:48 build/C/man3/resolver.3:53 build/C/man3/resolver.3:70
14610 #, no-wrap
14611 msgid "B<unsigned char *>I<answer>B<, int >I<anslen>B<);>\n"
14612 msgstr ""
14613
14614 #. type: Plain text
14615 #: build/C/man3/resolver.3:51
14616 #, no-wrap
14617 msgid ""
14618 "B<int res_search(const char *>I<dname>B<, int >I<class>B<, int "
14619 ">I<type>B<,>\n"
14620 msgstr ""
14621
14622 #. type: Plain text
14623 #: build/C/man3/resolver.3:56
14624 #, no-wrap
14625 msgid "B<int res_querydomain(const char *>I<name>B<, const char *>I<domain>B<,>\n"
14626 msgstr ""
14627
14628 #. type: Plain text
14629 #: build/C/man3/resolver.3:59
14630 #, no-wrap
14631 msgid ""
14632 "B<int >I<class>B<, int >I<type>B<, unsigned char *>I<answer>B<,>\n"
14633 "B<int >I<anslen>B<);>\n"
14634 msgstr ""
14635
14636 #. type: Plain text
14637 #: build/C/man3/resolver.3:62
14638 #, no-wrap
14639 msgid "B<int res_mkquery(int >I<op>B<, const char *>I<dname>B<, int >I<class>B<,>\n"
14640 msgstr ""
14641
14642 #. type: Plain text
14643 #: build/C/man3/resolver.3:65
14644 #, no-wrap
14645 msgid ""
14646 "B<int >I<type>B<, const unsigned char *>I<data>B<, int >I<datalen>B<,>\n"
14647 "B<const unsigned char *>I<newrr>B<, unsigned char *>I<buf>B<, int "
14648 ">I<buflen>B<);>\n"
14649 msgstr ""
14650
14651 #. type: Plain text
14652 #: build/C/man3/resolver.3:68
14653 #, no-wrap
14654 msgid "B<int res_send(const unsigned char *>I<msg>B<, int >I<msglen>B<,>\n"
14655 msgstr ""
14656
14657 #. type: Plain text
14658 #: build/C/man3/resolver.3:73
14659 #, no-wrap
14660 msgid "B<int dn_comp(const char *>I<exp_dn>B<, unsigned char *>I<comp_dn>B<,>\n"
14661 msgstr ""
14662
14663 #. type: Plain text
14664 #: build/C/man3/resolver.3:75
14665 #, no-wrap
14666 msgid ""
14667 "B<int >I<length>B<, unsigned char **>I<dnptrs>B<, unsigned char "
14668 "**>I<lastdnptr>B<);>\n"
14669 msgstr ""
14670
14671 #. type: Plain text
14672 #: build/C/man3/resolver.3:78
14673 #, no-wrap
14674 msgid ""
14675 "B<int dn_expand(const unsigned char *>I<msg>B<, const unsigned char "
14676 "*>I<eomorig>B<,>\n"
14677 msgstr ""
14678
14679 #. type: Plain text
14680 #: build/C/man3/resolver.3:81
14681 #, no-wrap
14682 msgid ""
14683 "B<const unsigned char *>I<comp_dn>B<, char *>I<exp_dn>B<,>\n"
14684 "B<int >I<length>B<);>\n"
14685 msgstr ""
14686
14687 #. type: Plain text
14688 #: build/C/man3/resolver.3:88
14689 msgid ""
14690 "These functions make queries to and interpret the responses from Internet "
14691 "domain name servers."
14692 msgstr ""
14693
14694 #. type: Plain text
14695 #: build/C/man3/resolver.3:102
14696 msgid ""
14697 "The B<res_init>()  function reads the configuration files (see "
14698 "B<resolv.conf>(5))  to get the default domain name, search order and name "
14699 "server address(es).  If no server is given, the local host is tried.  If no "
14700 "domain is given, that associated with the local host is used.  It can be "
14701 "overridden with the environment variable B<LOCALDOMAIN>.  B<res_init>()  is "
14702 "normally executed by the first call to one of the other functions."
14703 msgstr ""
14704
14705 #. type: Plain text
14706 #: build/C/man3/resolver.3:110
14707 msgid ""
14708 "The B<res_query>()  function queries the name server for the fully qualified "
14709 "domain name I<name> of specified I<type> and I<class>.  The reply is left in "
14710 "the buffer I<answer> of length I<anslen> supplied by the caller."
14711 msgstr ""
14712
14713 #. type: Plain text
14714 #: build/C/man3/resolver.3:123
14715 msgid ""
14716 "The B<res_search>()  function makes a query and waits for the response like "
14717 "B<res_query>(), but in addition implements the default and search rules "
14718 "controlled by B<RES_DEFNAMES> and B<RES_DNSRCH> (see description of I<_res> "
14719 "options below)."
14720 msgstr ""
14721
14722 #. type: Plain text
14723 #: build/C/man3/resolver.3:129
14724 msgid ""
14725 "The B<res_querydomain>()  function makes a query using B<res_query>()  on "
14726 "the concatenation of I<name> and I<domain>."
14727 msgstr ""
14728
14729 #. type: Plain text
14730 #: build/C/man3/resolver.3:132
14731 msgid "The following functions are lower-level routines used by B<res_query>()."
14732 msgstr ""
14733
14734 #. type: Plain text
14735 #: build/C/man3/resolver.3:143
14736 msgid ""
14737 "The B<res_mkquery>()  function constructs a query message in I<buf> of "
14738 "length I<buflen> for the domain name I<dname>.  The query type I<op> is "
14739 "usually B<QUERY>, but can be any of the types defined in "
14740 "I<E<lt>arpa/nameser.hE<gt>>.  I<newrr> is currently unused."
14741 msgstr ""
14742
14743 #. type: Plain text
14744 #: build/C/man3/resolver.3:153
14745 msgid ""
14746 "The B<res_send>()  function sends a preformatted query given in I<msg> of "
14747 "length I<msglen> and returns the answer in I<answer> which is of length "
14748 "I<anslen>.  It will call B<res_init>(), if it has not already been called."
14749 msgstr ""
14750
14751 #. type: Plain text
14752 #: build/C/man3/resolver.3:166
14753 msgid ""
14754 "The B<dn_comp>()  function compresses the domain name I<exp_dn> and stores "
14755 "it in the buffer I<comp_dn> of length I<length>.  The compression uses an "
14756 "array of pointers I<dnptrs> to previously compressed names in the current "
14757 "message.  The first pointer points to the beginning of the message and the "
14758 "list ends with NULL.  The limit of the array is specified by I<lastdnptr>.  "
14759 "If I<dnptr> is NULL, domain names are not compressed.  If I<lastdnptr> is "
14760 "NULL, the list of labels is not updated."
14761 msgstr ""
14762
14763 #. type: Plain text
14764 #: build/C/man3/resolver.3:175
14765 msgid ""
14766 "The B<dn_expand>()  function expands the compressed domain name I<comp_dn> "
14767 "to a full domain name, which is placed in the buffer I<exp_dn> of size "
14768 "I<length>.  The compressed name is contained in a query or reply message, "
14769 "and I<msg> points to the beginning of the message."
14770 msgstr ""
14771
14772 #. type: Plain text
14773 #: build/C/man3/resolver.3:183
14774 msgid ""
14775 "The resolver routines use global configuration and state information "
14776 "contained in the structure I<_res>, which is defined in "
14777 "I<E<lt>resolv.hE<gt>>.  The only field that is normally manipulated by the "
14778 "user is I<_res.options>.  This field can contain the bitwise \"OR\" of the "
14779 "following options:"
14780 msgstr ""
14781
14782 #. type: TP
14783 #: build/C/man3/resolver.3:183
14784 #, no-wrap
14785 msgid "B<RES_INIT>"
14786 msgstr ""
14787
14788 #. type: Plain text
14789 #: build/C/man3/resolver.3:188
14790 msgid "True if B<res_init>()  has been called."
14791 msgstr ""
14792
14793 #. type: TP
14794 #: build/C/man3/resolver.3:188
14795 #, no-wrap
14796 msgid "B<RES_DEBUG>"
14797 msgstr ""
14798
14799 #.  See resolv/README.
14800 #.  Support for RES_DEBUG was made conditional in glibc 2.2.
14801 #. type: Plain text
14802 #: build/C/man3/resolver.3:195
14803 msgid ""
14804 "Print debugging messages.  This option is available only if glibc was built "
14805 "with debugging enabled, which is not the default."
14806 msgstr ""
14807
14808 #. type: TP
14809 #: build/C/man3/resolver.3:195
14810 #, no-wrap
14811 msgid "B<RES_AAONLY>"
14812 msgstr ""
14813
14814 #. type: Plain text
14815 #: build/C/man3/resolver.3:202
14816 msgid ""
14817 "Accept authoritative answers only.  B<res_send>()  continues until it finds "
14818 "an authoritative answer or returns an error.  [Not currently implemented]."
14819 msgstr ""
14820
14821 #. type: TP
14822 #: build/C/man3/resolver.3:202
14823 #, no-wrap
14824 msgid "B<RES_USEVC>"
14825 msgstr ""
14826
14827 #. type: Plain text
14828 #: build/C/man3/resolver.3:205
14829 msgid "Use TCP connections for queries rather than UDP datagrams."
14830 msgstr ""
14831
14832 #. type: TP
14833 #: build/C/man3/resolver.3:205
14834 #, no-wrap
14835 msgid "B<RES_PRIMARY>"
14836 msgstr ""
14837
14838 #. type: Plain text
14839 #: build/C/man3/resolver.3:208
14840 msgid "Query primary domain name server only."
14841 msgstr ""
14842
14843 #. type: TP
14844 #: build/C/man3/resolver.3:208
14845 #, no-wrap
14846 msgid "B<RES_IGNTC>"
14847 msgstr ""
14848
14849 #. type: Plain text
14850 #: build/C/man3/resolver.3:213
14851 msgid ""
14852 "Ignore truncation errors.  Don't retry with TCP.  [Not currently "
14853 "implemented]."
14854 msgstr ""
14855
14856 #. type: TP
14857 #: build/C/man3/resolver.3:213
14858 #, no-wrap
14859 msgid "B<RES_RECURSE>"
14860 msgstr ""
14861
14862 #. type: Plain text
14863 #: build/C/man3/resolver.3:220
14864 msgid ""
14865 "Set the recursion desired bit in queries.  Recursion is carried out by the "
14866 "domain name server, not by B<res_send>().  [Enabled by default]."
14867 msgstr ""
14868
14869 #. type: TP
14870 #: build/C/man3/resolver.3:220
14871 #, no-wrap
14872 msgid "B<RES_DEFNAMES>"
14873 msgstr ""
14874
14875 #. type: Plain text
14876 #: build/C/man3/resolver.3:227
14877 msgid ""
14878 "If set, B<res_search>()  will append the default domain name to single "
14879 "component names\\(emthat is, those that do not contain a dot.  [Enabled by "
14880 "default]."
14881 msgstr ""
14882
14883 #. type: TP
14884 #: build/C/man3/resolver.3:227
14885 #, no-wrap
14886 msgid "B<RES_STAYOPEN>"
14887 msgstr ""
14888
14889 #. type: Plain text
14890 #: build/C/man3/resolver.3:232
14891 msgid "Used with B<RES_USEVC> to keep the TCP connection open between queries."
14892 msgstr ""
14893
14894 #. type: TP
14895 #: build/C/man3/resolver.3:232
14896 #, no-wrap
14897 msgid "B<RES_DNSRCH>"
14898 msgstr ""
14899
14900 #. type: Plain text
14901 #: build/C/man3/resolver.3:241
14902 msgid ""
14903 "If set, B<res_search>()  will search for hostnames in the current domain and "
14904 "in parent domains.  This option is used by B<gethostbyname>(3).  [Enabled by "
14905 "default]."
14906 msgstr ""
14907
14908 #. type: Plain text
14909 #: build/C/man3/resolver.3:245
14910 msgid ""
14911 "This list is not complete.  You can find some other flags described in "
14912 "B<resolv.conf>(5)."
14913 msgstr ""
14914
14915 #. type: Plain text
14916 #: build/C/man3/resolver.3:250
14917 msgid "The B<res_init>()  function returns 0 on success, or -1 if an error occurs."
14918 msgstr ""
14919
14920 #. type: Plain text
14921 #: build/C/man3/resolver.3:260
14922 msgid ""
14923 "The B<res_query>(), B<res_search>(), B<res_querydomain>(), B<res_mkquery>()  "
14924 "and B<res_send>()  functions return the length of the response, or -1 if an "
14925 "error occurs."
14926 msgstr ""
14927
14928 #. type: Plain text
14929 #: build/C/man3/resolver.3:267
14930 msgid ""
14931 "The B<dn_comp>()  and B<dn_expand>()  functions return the length of the "
14932 "compressed name, or -1 if an error occurs."
14933 msgstr ""
14934
14935 #. type: Plain text
14936 #: build/C/man3/resolver.3:271
14937 #, no-wrap
14938 msgid ""
14939 "/etc/resolv.conf          resolver configuration file\n"
14940 "/etc/host.conf            resolver configuration file\n"
14941 msgstr ""
14942
14943 #. type: Plain text
14944 #: build/C/man3/resolver.3:274
14945 msgid "4.3BSD."
14946 msgstr ""
14947
14948 #. type: Plain text
14949 #: build/C/man3/resolver.3:280
14950 msgid ""
14951 "B<gethostbyname>(3), B<resolv.conf>(5), B<resolver>(5), B<hostname>(7), "
14952 "B<named>(8)"
14953 msgstr ""
14954
14955 #. type: TH
14956 #: build/C/man3/rexec.3:41
14957 #, no-wrap
14958 msgid "REXEC"
14959 msgstr ""
14960
14961 #. type: Plain text
14962 #: build/C/man3/rexec.3:44
14963 msgid "rexec, rexec_af - return stream to a remote command"
14964 msgstr ""
14965
14966 #. type: Plain text
14967 #: build/C/man3/rexec.3:48
14968 #, no-wrap
14969 msgid ""
14970 "B<#define _BSD_SOURCE>             /* See feature_test_macros(7) */\n"
14971 "B<#include E<lt>netdb.hE<gt>>\n"
14972 msgstr ""
14973
14974 #. type: Plain text
14975 #: build/C/man3/rexec.3:51
14976 #, no-wrap
14977 msgid ""
14978 "B<int rexec(char **>I<ahost>B<, int >I<inport>B<, const char *>I<user>B<, "
14979 ">\n"
14980 "B<          const char *>I<passwd>B<, const char *>I<cmd>B<, int "
14981 "*>I<fd2p>B<);>\n"
14982 msgstr ""
14983
14984 #. type: Plain text
14985 #: build/C/man3/rexec.3:55
14986 #, no-wrap
14987 msgid ""
14988 "B<int rexec_af(char **>I<ahost>B<, int >I<inport>B<, const char *>I<user>B<, "
14989 ">\n"
14990 "B<             const char *>I<passwd>B<, const char *>I<cmd>B<, int "
14991 "*>I<fd2p>B<,>\n"
14992 "B<             sa_family_t >I<af>B<);>\n"
14993 msgstr ""
14994
14995 #. type: Plain text
14996 #: build/C/man3/rexec.3:59
14997 msgid "This interface is obsoleted by B<rcmd>(3)."
14998 msgstr ""
14999
15000 #. type: Plain text
15001 #: build/C/man3/rexec.3:78
15002 msgid ""
15003 "The B<rexec>()  function looks up the host I<*ahost> using "
15004 "B<gethostbyname>(3), returning -1 if the host does not exist.  Otherwise, "
15005 "I<*ahost> is set to the standard name of the host.  If a username and "
15006 "password are both specified, then these are used to authenticate to the "
15007 "foreign host; otherwise the environment and then the I<.netrc> file in "
15008 "user's home directory are searched for appropriate information.  If all this "
15009 "fails, the user is prompted for the information."
15010 msgstr ""
15011
15012 #. type: Plain text
15013 #: build/C/man3/rexec.3:89
15014 msgid ""
15015 "The port I<inport> specifies which well-known DARPA Internet port to use for "
15016 "the connection; the call I<getservbyname(\"exec\", \"tcp\")> (see "
15017 "B<getservent>(3))  will return a pointer to a structure that contains the "
15018 "necessary port.  The protocol for connection is described in detail in "
15019 "B<rexecd>(8)."
15020 msgstr ""
15021
15022 #. type: Plain text
15023 #: build/C/man3/rexec.3:122
15024 msgid ""
15025 "If the connection succeeds, a socket in the Internet domain of type "
15026 "B<SOCK_STREAM> is returned to the caller, and given to the remote command as "
15027 "I<stdin> and I<stdout>.  If I<fd2p> is nonzero, then an auxiliary channel to "
15028 "a control process will be setup, and a descriptor for it will be placed in "
15029 "I<*fd2p>.  The control process will return diagnostic output from the "
15030 "command (unit 2) on this channel, and will also accept bytes on this channel "
15031 "as being UNIX signal numbers, to be forwarded to the process group of the "
15032 "command.  The diagnostic information returned does not include remote "
15033 "authorization failure, as the secondary connection is set up after "
15034 "authorization has been verified.  If I<fd2p> is 0, then the I<stderr> (unit "
15035 "2 of the remote command) will be made the same as the I<stdout> and no "
15036 "provision is made for sending arbitrary signals to the remote process, "
15037 "although you may be able to get its attention by using out-of-band data."
15038 msgstr ""
15039
15040 #. type: SS
15041 #: build/C/man3/rexec.3:122
15042 #, no-wrap
15043 msgid "rexec_af()"
15044 msgstr ""
15045
15046 #. type: Plain text
15047 #: build/C/man3/rexec.3:138
15048 msgid ""
15049 "The B<rexec>()  function works over IPv4 (B<AF_INET>).  By contrast, the "
15050 "B<rexec_af>()  function provides an extra argument, I<af>, that allows the "
15051 "caller to select the protocol.  This argument can be specified as "
15052 "B<AF_INET>, B<AF_INET6>, or B<AF_UNSPEC> (to allow the implementation to "
15053 "select the protocol)."
15054 msgstr ""
15055
15056 #. type: Plain text
15057 #: build/C/man3/rexec.3:142
15058 msgid "The B<rexec_af>()  function was added to glibc in version 2.2."
15059 msgstr ""
15060
15061 #. type: Plain text
15062 #: build/C/man3/rexec.3:149
15063 msgid "The B<rexec>()  and B<rexec_af>()  functions are not thread-safe."
15064 msgstr ""
15065
15066 #. type: Plain text
15067 #: build/C/man3/rexec.3:158
15068 msgid ""
15069 "These functions are not in POSIX.1-2001.  The B<rexec>()  function first "
15070 "appeared in 4.2BSD, and is present on the BSDs, Solaris, and many other "
15071 "systems.  The B<rexec_af>()  function is more recent, and less widespread."
15072 msgstr ""
15073
15074 #. type: Plain text
15075 #: build/C/man3/rexec.3:162
15076 msgid "The B<rexec>()  function sends the unencrypted password across the network."
15077 msgstr ""
15078
15079 #. type: Plain text
15080 #: build/C/man3/rexec.3:167
15081 msgid ""
15082 "The underlying service is considered a big security hole and therefore not "
15083 "enabled on many sites; see B<rexecd>(8)  for explanations."
15084 msgstr ""
15085
15086 #. type: Plain text
15087 #: build/C/man3/rexec.3:170
15088 msgid "B<rcmd>(3), B<rexecd>(8)"
15089 msgstr ""
15090
15091 #. type: TH
15092 #: build/C/man5/services.5:34
15093 #, no-wrap
15094 msgid "SERVICES"
15095 msgstr ""
15096
15097 #. type: TH
15098 #: build/C/man5/services.5:34
15099 #, no-wrap
15100 msgid "2010-05-22"
15101 msgstr ""
15102
15103 #. type: Plain text
15104 #: build/C/man5/services.5:37
15105 msgid "services - Internet network services list"
15106 msgstr ""
15107
15108 #. type: Plain text
15109 #: build/C/man5/services.5:52
15110 msgid ""
15111 "B<services> is a plain ASCII file providing a mapping between human-friendly "
15112 "textual names for internet services, and their underlying assigned port "
15113 "numbers and protocol types.  Every networking program should look into this "
15114 "file to get the port number (and protocol) for its service.  The C library "
15115 "routines B<getservent>(3), B<getservbyname>(3), B<getservbyport>(3), "
15116 "B<setservent>(3), and B<endservent>(3)  support querying this file from "
15117 "programs."
15118 msgstr ""
15119
15120 #. type: Plain text
15121 #: build/C/man5/services.5:58
15122 msgid ""
15123 "Port numbers are assigned by the IANA (Internet Assigned Numbers Authority), "
15124 "and their current policy is to assign both TCP and UDP protocols when "
15125 "assigning a port number.  Therefore, most entries will have two entries, "
15126 "even for TCP-only services."
15127 msgstr ""
15128
15129 #. type: Plain text
15130 #: build/C/man5/services.5:70
15131 msgid ""
15132 "Port numbers below 1024 (so-called \"low numbered\" ports) can be bound to "
15133 "only by root (see B<bind>(2), B<tcp>(7), and B<udp>(7)).  This is so clients "
15134 "connecting to low numbered ports can trust that the service running on the "
15135 "port is the standard implementation, and not a rogue service run by a user "
15136 "of the machine.  Well-known port numbers specified by the IANA are normally "
15137 "located in this root-only space."
15138 msgstr ""
15139
15140 #. type: Plain text
15141 #: build/C/man5/services.5:85
15142 msgid ""
15143 "The presence of an entry for a service in the B<services> file does not "
15144 "necessarily mean that the service is currently running on the machine.  See "
15145 "B<inetd.conf>(5)  for the configuration of Internet services offered.  Note "
15146 "that not all networking services are started by B<inetd>(8), and so won't "
15147 "appear in B<inetd.conf>(5).  In particular, news (NNTP) and mail (SMTP) "
15148 "servers are often initialized from the system boot scripts."
15149 msgstr ""
15150
15151 #. type: Plain text
15152 #: build/C/man5/services.5:94
15153 msgid ""
15154 "The location of the B<services> file is defined by B<_PATH_SERVICES> in "
15155 "I<E<lt>netdb.hE<gt>>.  This is usually set to I</etc/services>."
15156 msgstr ""
15157
15158 #. type: Plain text
15159 #: build/C/man5/services.5:96
15160 msgid "Each line describes one service, and is of the form:"
15161 msgstr ""
15162
15163 #. type: Plain text
15164 #: build/C/man5/services.5:98
15165 msgid "I<service-name\\ \\ \\ port>B</>I<protocol\\ \\ \\ >[I<aliases ...>]"
15166 msgstr ""
15167
15168 #. type: TP
15169 #: build/C/man5/services.5:98
15170 #, no-wrap
15171 msgid "where:"
15172 msgstr ""
15173
15174 #. type: TP
15175 #: build/C/man5/services.5:100
15176 #, no-wrap
15177 msgid "I<service-name>"
15178 msgstr ""
15179
15180 #. type: Plain text
15181 #: build/C/man5/services.5:106
15182 msgid ""
15183 "is the friendly name the service is known by and looked up under.  It is "
15184 "case sensitive.  Often, the client program is named after the "
15185 "I<service-name>."
15186 msgstr ""
15187
15188 #. type: TP
15189 #: build/C/man5/services.5:106
15190 #, no-wrap
15191 msgid "I<port>"
15192 msgstr ""
15193
15194 #. type: Plain text
15195 #: build/C/man5/services.5:109
15196 msgid "is the port number (in decimal) to use for this service."
15197 msgstr ""
15198
15199 #. type: Plain text
15200 #: build/C/man5/services.5:120
15201 msgid ""
15202 "is the type of protocol to be used.  This field should match an entry in the "
15203 "B<protocols>(5)  file.  Typical values include B<tcp> and B<udp>."
15204 msgstr ""
15205
15206 #. type: Plain text
15207 #: build/C/man5/services.5:126
15208 msgid ""
15209 "is an optional space or tab separated list of other names for this service.  "
15210 "Again, the names are case sensitive."
15211 msgstr ""
15212
15213 #. type: Plain text
15214 #: build/C/man5/services.5:128
15215 msgid "Either spaces or tabs may be used to separate the fields."
15216 msgstr ""
15217
15218 #. type: Plain text
15219 #: build/C/man5/services.5:132
15220 msgid ""
15221 "Comments are started by the hash sign (#) and continue until the end of the "
15222 "line.  Blank lines are skipped."
15223 msgstr ""
15224
15225 #. type: Plain text
15226 #: build/C/man5/services.5:143
15227 msgid ""
15228 "The I<service-name> should begin in the first column of the file, since "
15229 "leading spaces are not stripped.  I<service-names> can be any printable "
15230 "characters excluding space and tab.  However, a conservative choice of "
15231 "characters should be used to minimize compatibility problems.  For example, "
15232 "a-z, 0-9, and hyphen (-) would seem a sensible choice."
15233 msgstr ""
15234
15235 #. type: Plain text
15236 #: build/C/man5/services.5:152
15237 msgid ""
15238 "Lines not matching this format should not be present in the file.  "
15239 "(Currently, they are silently skipped by B<getservent>(3), "
15240 "B<getservbyname>(3), and B<getservbyport>(3).  However, this behavior should "
15241 "not be relied on.)"
15242 msgstr ""
15243
15244 #. type: Plain text
15245 #: build/C/man5/services.5:169
15246 msgid "A sample B<services> file might look like this:"
15247 msgstr ""
15248
15249 #. type: Plain text
15250 #: build/C/man5/services.5:182
15251 #, no-wrap
15252 msgid ""
15253 "CW<netstat         15/tcp\n"
15254 "qotd            17/tcp          quote\n"
15255 "msp             18/tcp          # message send protocol\n"
15256 "msp             18/udp          # message send protocol\n"
15257 "chargen         19/tcp          ttytst source\n"
15258 "chargen         19/udp          ttytst source\n"
15259 "ftp             21/tcp\n"
15260 "# 22 - unassigned\n"
15261 "telnet          23/tcp>\n"
15262 msgstr ""
15263
15264 #. type: Plain text
15265 #: build/C/man5/services.5:189
15266 msgid "The Internet network services list"
15267 msgstr ""
15268
15269 #. type: TP
15270 #: build/C/man5/services.5:189
15271 #, no-wrap
15272 msgid "I<E<lt>netdb.hE<gt>>"
15273 msgstr ""
15274
15275 #.  .SH BUGS
15276 #.  It's not clear when/if the following was ever true;
15277 #.  it isn't true for glibc 2.8:
15278 #.     There is a maximum of 35 aliases, due to the way the
15279 #.     .BR getservent (3)
15280 #.     code is written.
15281 #
15282 #.  It's not clear when/if the following was ever true;
15283 #.  it isn't true for glibc 2.8:
15284 #.     Lines longer than
15285 #.     .B BUFSIZ
15286 #.     (currently 1024) characters will be ignored by
15287 #.     .BR getservent (3),
15288 #.     .BR getservbyname (3),
15289 #.     and
15290 #.     .BR getservbyport (3).
15291 #.     However, this will also cause the next line to be mis-parsed.
15292 #. type: Plain text
15293 #: build/C/man5/services.5:210
15294 msgid "Definition of B<_PATH_SERVICES>"
15295 msgstr ""
15296
15297 #. type: Plain text
15298 #: build/C/man5/services.5:220
15299 msgid ""
15300 "B<listen>(2), B<endservent>(3), B<getservbyname>(3), B<getservbyport>(3), "
15301 "B<getservent>(3), B<setservent>(3), B<inetd.conf>(5), B<protocols>(5), "
15302 "B<inetd>(8)"
15303 msgstr ""
15304
15305 #. type: Plain text
15306 #: build/C/man5/services.5:222
15307 msgid "Assigned Numbers RFC, most recently RFC\\ 1700, (AKA STD0002)."
15308 msgstr ""
15309
15310 #. type: TH
15311 #: build/C/man3/setnetgrent.3:10
15312 #, no-wrap
15313 msgid "SETNETGRENT"
15314 msgstr ""
15315
15316 #. type: Plain text
15317 #: build/C/man3/setnetgrent.3:14
15318 msgid ""
15319 "setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr - handle "
15320 "network group entries"
15321 msgstr ""
15322
15323 #. type: Plain text
15324 #: build/C/man3/setnetgrent.3:19
15325 #, no-wrap
15326 msgid "B<int setnetgrent(const char *>I<netgroup>B<);>\n"
15327 msgstr ""
15328
15329 #. type: Plain text
15330 #: build/C/man3/setnetgrent.3:21
15331 #, no-wrap
15332 msgid "B<void endnetgrent(void);>\n"
15333 msgstr ""
15334
15335 #. type: Plain text
15336 #: build/C/man3/setnetgrent.3:23
15337 #, no-wrap
15338 msgid ""
15339 "B<int getnetgrent(char **>I<host>B<, char **>I<user>B<, char "
15340 "**>I<domain>B<);>\n"
15341 msgstr ""
15342
15343 #. type: Plain text
15344 #: build/C/man3/setnetgrent.3:26
15345 #, no-wrap
15346 msgid ""
15347 "B<int getnetgrent_r(char **>I<host>B<, char **>I<user>B<,>\n"
15348 "B<                  char **>I<domain>B<, char *>I<buf>B<, size_t "
15349 ">I<buflen>B<);>\n"
15350 msgstr ""
15351
15352 #. type: Plain text
15353 #: build/C/man3/setnetgrent.3:29
15354 #, no-wrap
15355 msgid ""
15356 "B<int innetgr(const char *>I<netgroup>B<, const char *>I<host>B<,>\n"
15357 "B<            const char *>I<user>B<, const char *>I<domain>B<);>\n"
15358 msgstr ""
15359
15360 #. type: Plain text
15361 #: build/C/man3/setnetgrent.3:43
15362 msgid ""
15363 "B<setnetgrent>(), B<endnetgrent>(), B<getnetgrent>(), B<getnetgrent_r>(), "
15364 "B<innetgr>(): _BSD_SOURCE || _SVID_SOURCE"
15365 msgstr ""
15366
15367 #. type: Plain text
15368 #: build/C/man3/setnetgrent.3:57
15369 msgid ""
15370 "The I<netgroup> is a SunOS invention.  A netgroup database is a list of "
15371 "string triples (I<hostname>, I<username>, I<domainname>)  or other netgroup "
15372 "names.  Any of the elements in a triple can be empty, which means that "
15373 "anything matches.  The functions described here allow access to the netgroup "
15374 "databases.  The file I</etc/nsswitch.conf> defines what database is "
15375 "searched."
15376 msgstr ""
15377
15378 #. type: Plain text
15379 #: build/C/man3/setnetgrent.3:77
15380 msgid ""
15381 "The B<setnetgrent>()  call defines the netgroup that will be searched by "
15382 "subsequent B<getnetgrent>()  calls.  The B<getnetgrent>()  function "
15383 "retrieves the next netgroup entry, and returns pointers in I<host>, I<user>, "
15384 "I<domain>.  A null pointer means that the corresponding entry matches any "
15385 "string.  The pointers are valid only as long as there is no call to other "
15386 "netgroup-related functions.  To avoid this problem you can use the GNU "
15387 "function B<getnetgrent_r>()  that stores the strings in the supplied "
15388 "buffer.  To free all allocated buffers use B<endnetgrent>()."
15389 msgstr ""
15390
15391 #. type: Plain text
15392 #: build/C/man3/setnetgrent.3:86
15393 msgid ""
15394 "In most cases you want to check only if the triplet (I<hostname>, "
15395 "I<username>, I<domainname>)  is a member of a netgroup.  The function "
15396 "B<innetgr>()  can be used for this without calling the above three "
15397 "functions.  Again, a null pointer is a wildcard and matches any string.  The "
15398 "function is thread-safe."
15399 msgstr ""
15400
15401 #. type: Plain text
15402 #: build/C/man3/setnetgrent.3:88
15403 msgid "These functions return 1 on success and 0 for failure."
15404 msgstr ""
15405
15406 #. type: Plain text
15407 #: build/C/man3/setnetgrent.3:90
15408 msgid "I</etc/netgroup>"
15409 msgstr ""
15410
15411 #.  getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
15412 #. type: Plain text
15413 #: build/C/man3/setnetgrent.3:103
15414 msgid ""
15415 "These functions are not in POSIX.1-2001, but B<setnetgrent>(), "
15416 "B<endnetgrent>(), B<getnetgrent>(), and B<innetgr>()  are available on most "
15417 "UNIX systems.  B<getnetgrent_r>()  is not widely available on other systems."
15418 msgstr ""
15419
15420 #. type: Plain text
15421 #: build/C/man3/setnetgrent.3:107
15422 msgid "In the BSD implementation, B<setnetgrent>()  returns void."
15423 msgstr ""
15424
15425 #. type: Plain text
15426 #: build/C/man3/setnetgrent.3:111
15427 msgid "B<sethostent>(3), B<setprotoent>(3), B<setservent>(3)"
15428 msgstr ""
15429
15430 #. type: TH
15431 #: build/C/man2/shutdown.2:40
15432 #, no-wrap
15433 msgid "SHUTDOWN"
15434 msgstr ""
15435
15436 #. type: TH
15437 #: build/C/man2/shutdown.2:40
15438 #, no-wrap
15439 msgid "2012-09-06"
15440 msgstr ""
15441
15442 #. type: Plain text
15443 #: build/C/man2/shutdown.2:43
15444 msgid "shutdown - shut down part of a full-duplex connection"
15445 msgstr ""
15446
15447 #. type: Plain text
15448 #: build/C/man2/shutdown.2:47
15449 msgid "B<int shutdown(int >I<sockfd>B<, int >I<how>B<);>"
15450 msgstr ""
15451
15452 #. type: Plain text
15453 #: build/C/man2/shutdown.2:69
15454 msgid ""
15455 "The B<shutdown>()  call causes all or part of a full-duplex connection on "
15456 "the socket associated with I<sockfd> to be shut down.  If I<how> is "
15457 "B<SHUT_RD>, further receptions will be disallowed.  If I<how> is B<SHUT_WR>, "
15458 "further transmissions will be disallowed.  If I<how> is B<SHUT_RDWR>, "
15459 "further receptions and transmissions will be disallowed."
15460 msgstr ""
15461
15462 #. type: Plain text
15463 #: build/C/man2/shutdown.2:79
15464 msgid "I<sockfd> is not a valid descriptor."
15465 msgstr ""
15466
15467 #. type: Plain text
15468 #: build/C/man2/shutdown.2:84
15469 msgid "An invalid value was specified in I<how> (but see BUGS)."
15470 msgstr ""
15471
15472 #. type: Plain text
15473 #: build/C/man2/shutdown.2:87
15474 msgid "The specified socket is not connected."
15475 msgstr ""
15476
15477 #. type: Plain text
15478 #: build/C/man2/shutdown.2:91
15479 msgid "I<sockfd> is a file, not a socket."
15480 msgstr ""
15481
15482 #. type: Plain text
15483 #: build/C/man2/shutdown.2:95
15484 msgid ""
15485 "POSIX.1-2001, 4.4BSD (the B<shutdown>()  function call first appeared in "
15486 "4.2BSD)."
15487 msgstr ""
15488
15489 #. type: Plain text
15490 #: build/C/man2/shutdown.2:104
15491 msgid ""
15492 "The constants B<SHUT_RD>, B<SHUT_WR>, B<SHUT_RDWR> have the value 0, 1, 2, "
15493 "respectively, and are defined in I<E<lt>sys/socket.hE<gt>> since "
15494 "glibc-2.1.91."
15495 msgstr ""
15496
15497 #.  FIXME .
15498 #.  https://bugzilla.kernel.org/show_bug.cgi?id=47111
15499 #. type: Plain text
15500 #: build/C/man2/shutdown.2:113
15501 msgid ""
15502 "As currently implemented, checks for the validity of I<how> are done in "
15503 "domain-specific code, and not all domains perform these checks.  Most "
15504 "notably, UNIX domain sockets simply ignore invalid values; this may change "
15505 "in the future."
15506 msgstr ""
15507
15508 #. type: Plain text
15509 #: build/C/man2/shutdown.2:117
15510 msgid "B<connect>(2), B<socket>(2), B<socket>(7)"
15511 msgstr ""
15512
15513 #. type: TH
15514 #: build/C/man7/tcp.7:76
15515 #, no-wrap
15516 msgid "TCP"
15517 msgstr ""
15518
15519 #. type: TH
15520 #: build/C/man7/tcp.7:76
15521 #, no-wrap
15522 msgid "2015-01-10"
15523 msgstr ""
15524
15525 #. type: Plain text
15526 #: build/C/man7/tcp.7:79
15527 msgid "tcp - TCP protocol"
15528 msgstr ""
15529
15530 #. type: Plain text
15531 #: build/C/man7/tcp.7:85
15532 msgid "B<#include E<lt>netinet/tcp.hE<gt>>"
15533 msgstr ""
15534
15535 #. type: Plain text
15536 #: build/C/man7/tcp.7:87
15537 msgid "B<tcp_socket = socket(AF_INET, SOCK_STREAM, 0);>"
15538 msgstr ""
15539
15540 #. type: Plain text
15541 #: build/C/man7/tcp.7:100
15542 msgid ""
15543 "This is an implementation of the TCP protocol defined in RFC\\ 793, RFC\\ "
15544 "1122 and RFC\\ 2001 with the NewReno and SACK extensions.  It provides a "
15545 "reliable, stream-oriented, full-duplex connection between two sockets on top "
15546 "of B<ip>(7), for both v4 and v6 versions.  TCP guarantees that the data "
15547 "arrives in order and retransmits lost packets.  It generates and checks a "
15548 "per-packet checksum to catch transmission errors.  TCP does not preserve "
15549 "record boundaries."
15550 msgstr ""
15551
15552 #. type: Plain text
15553 #: build/C/man7/tcp.7:119
15554 msgid ""
15555 "A newly created TCP socket has no remote or local address and is not fully "
15556 "specified.  To create an outgoing TCP connection use B<connect>(2)  to "
15557 "establish a connection to another TCP socket.  To receive new incoming "
15558 "connections, first B<bind>(2)  the socket to a local address and port and "
15559 "then call B<listen>(2)  to put the socket into the listening state.  After "
15560 "that a new socket for each incoming connection can be accepted using "
15561 "B<accept>(2).  A socket which has had B<accept>(2)  or B<connect>(2)  "
15562 "successfully called on it is fully specified and may transmit data.  Data "
15563 "cannot be transmitted on listening or not yet connected sockets."
15564 msgstr ""
15565
15566 #. type: Plain text
15567 #: build/C/man7/tcp.7:139
15568 msgid ""
15569 "Linux supports RFC\\ 1323 TCP high performance extensions.  These include "
15570 "Protection Against Wrapped Sequence Numbers (PAWS), Window Scaling and "
15571 "Timestamps.  Window scaling allows the use of large (E<gt> 64K) TCP windows "
15572 "in order to support links with high latency or bandwidth.  To make use of "
15573 "them, the send and receive buffer sizes must be increased.  They can be set "
15574 "globally with the I</proc/sys/net/ipv4/tcp_wmem> and "
15575 "I</proc/sys/net/ipv4/tcp_rmem> files, or on individual sockets by using the "
15576 "B<SO_SNDBUF> and B<SO_RCVBUF> socket options with the B<setsockopt>(2)  "
15577 "call."
15578 msgstr ""
15579
15580 #. type: Plain text
15581 #: build/C/man7/tcp.7:170
15582 msgid ""
15583 "The maximum sizes for socket buffers declared via the B<SO_SNDBUF> and "
15584 "B<SO_RCVBUF> mechanisms are limited by the values in the "
15585 "I</proc/sys/net/core/rmem_max> and I</proc/sys/net/core/wmem_max> files.  "
15586 "Note that TCP actually allocates twice the size of the buffer requested in "
15587 "the B<setsockopt>(2)  call, and so a succeeding B<getsockopt>(2)  call will "
15588 "not return the same size of buffer as requested in the B<setsockopt>(2)  "
15589 "call.  TCP uses the extra space for administrative purposes and internal "
15590 "kernel structures, and the I</proc> file values reflect the larger sizes "
15591 "compared to the actual TCP windows.  On individual connections, the socket "
15592 "buffer size must be set prior to the B<listen>(2)  or B<connect>(2)  calls "
15593 "in order to have it take effect.  See B<socket>(7)  for more information."
15594 msgstr ""
15595
15596 #. type: Plain text
15597 #: build/C/man7/tcp.7:202
15598 msgid ""
15599 "TCP supports urgent data.  Urgent data is used to signal the receiver that "
15600 "some important message is part of the data stream and that it should be "
15601 "processed as soon as possible.  To send urgent data specify the B<MSG_OOB> "
15602 "option to B<send>(2).  When urgent data is received, the kernel sends a "
15603 "B<SIGURG> signal to the process or process group that has been set as the "
15604 "socket \"owner\" using the B<SIOCSPGRP> or B<FIOSETOWN> ioctls (or the "
15605 "POSIX.1-2001-specified B<fcntl>(2)  B<F_SETOWN> operation).  When the "
15606 "B<SO_OOBINLINE> socket option is enabled, urgent data is put into the normal "
15607 "data stream (a program can test for its location using the B<SIOCATMARK> "
15608 "ioctl described below), otherwise it can be received only when the "
15609 "B<MSG_OOB> flag is set for B<recv>(2)  or B<recvmsg>(2)."
15610 msgstr ""
15611
15612 #. type: Plain text
15613 #: build/C/man7/tcp.7:210
15614 msgid ""
15615 "Linux 2.4 introduced a number of changes for improved throughput and "
15616 "scaling, as well as enhanced functionality.  Some of these features include "
15617 "support for zero-copy B<sendfile>(2), Explicit Congestion Notification, new "
15618 "management of TIME_WAIT sockets, keep-alive socket options and support for "
15619 "Duplicate SACK extensions."
15620 msgstr ""
15621
15622 #. type: SS
15623 #: build/C/man7/tcp.7:210
15624 #, no-wrap
15625 msgid "Address formats"
15626 msgstr ""
15627
15628 #. type: Plain text
15629 #: build/C/man7/tcp.7:219
15630 msgid ""
15631 "TCP is built on top of IP (see B<ip>(7)).  The address formats defined by "
15632 "B<ip>(7)  apply to TCP.  TCP supports point-to-point communication only; "
15633 "broadcasting and multicasting are not supported."
15634 msgstr ""
15635
15636 #. type: Plain text
15637 #: build/C/man7/tcp.7:231
15638 msgid ""
15639 "System-wide TCP parameter settings can be accessed by files in the directory "
15640 "I</proc/sys/net/ipv4/>.  In addition, most IP I</proc> interfaces also apply "
15641 "to TCP; see B<ip>(7).  Variables described as I<Boolean> take an integer "
15642 "value, with a nonzero value (\"true\") meaning that the corresponding option "
15643 "is enabled, and a zero value (\"false\")  meaning that the option is "
15644 "disabled."
15645 msgstr ""
15646
15647 #. type: TP
15648 #: build/C/man7/tcp.7:231
15649 #, no-wrap
15650 msgid "I<tcp_abc> (Integer; default: 0; since Linux 2.6.15)"
15651 msgstr ""
15652
15653 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15654 #. type: Plain text
15655 #: build/C/man7/tcp.7:239
15656 msgid ""
15657 "Control the Appropriate Byte Count (ABC), defined in RFC 3465.  ABC is a way "
15658 "of increasing the congestion window (I<cwnd>)  more slowly in response to "
15659 "partial acknowledgments.  Possible values are:"
15660 msgstr ""
15661
15662 #. type: IP
15663 #: build/C/man7/tcp.7:240 build/C/man7/tcp.7:428 build/C/man7/tcp.7:449 build/C/man7/tcp.7:593
15664 #, no-wrap
15665 msgid "0"
15666 msgstr ""
15667
15668 #. type: Plain text
15669 #: build/C/man7/tcp.7:244
15670 msgid "increase I<cwnd> once per acknowledgment (no ABC)"
15671 msgstr ""
15672
15673 #. type: IP
15674 #: build/C/man7/tcp.7:244 build/C/man7/tcp.7:430 build/C/man7/tcp.7:456 build/C/man7/tcp.7:595
15675 #, no-wrap
15676 msgid "1"
15677 msgstr ""
15678
15679 #. type: Plain text
15680 #: build/C/man7/tcp.7:248
15681 msgid "increase I<cwnd> once per acknowledgment of full sized segment"
15682 msgstr ""
15683
15684 #. type: IP
15685 #: build/C/man7/tcp.7:248 build/C/man7/tcp.7:432 build/C/man7/tcp.7:463 build/C/man7/tcp.7:597
15686 #, no-wrap
15687 msgid "2"
15688 msgstr ""
15689
15690 #. type: Plain text
15691 #: build/C/man7/tcp.7:253
15692 msgid ""
15693 "allow increase I<cwnd> by two if acknowledgment is of two segments to "
15694 "compensate for delayed acknowledgments."
15695 msgstr ""
15696
15697 #. type: TP
15698 #: build/C/man7/tcp.7:254
15699 #, no-wrap
15700 msgid "I<tcp_abort_on_overflow> (Boolean; default: disabled; since Linux 2.4)"
15701 msgstr ""
15702
15703 #.  Since 2.3.41
15704 #. type: Plain text
15705 #: build/C/man7/tcp.7:266
15706 msgid ""
15707 "Enable resetting connections if the listening service is too slow and unable "
15708 "to keep up and accept them.  It means that if overflow occurred due to a "
15709 "burst, the connection will recover.  Enable this option I<only> if you are "
15710 "really sure that the listening daemon cannot be tuned to accept connections "
15711 "faster.  Enabling this option can harm the clients of your server."
15712 msgstr ""
15713
15714 #. type: TP
15715 #: build/C/man7/tcp.7:266
15716 #, no-wrap
15717 msgid "I<tcp_adv_win_scale> (integer; default: 2; since Linux 2.4)"
15718 msgstr ""
15719
15720 #.  Since 2.4.0-test7
15721 #. type: Plain text
15722 #: build/C/man7/tcp.7:278
15723 msgid ""
15724 "Count buffering overhead as I<bytes/2^tcp_adv_win_scale>, if "
15725 "I<tcp_adv_win_scale> is greater than 0; or "
15726 "I<bytes-bytes/2^(-tcp_adv_win_scale)>, if I<tcp_adv_win_scale> is less than "
15727 "or equal to zero."
15728 msgstr ""
15729
15730 #. type: Plain text
15731 #: build/C/man7/tcp.7:291
15732 msgid ""
15733 "The socket receive buffer space is shared between the application and "
15734 "kernel.  TCP maintains part of the buffer as the TCP window, this is the "
15735 "size of the receive window advertised to the other end.  The rest of the "
15736 "space is used as the \"application\" buffer, used to isolate the network "
15737 "from scheduling and application latencies.  The I<tcp_adv_win_scale> default "
15738 "value of 2 implies that the space used for the application buffer is one "
15739 "fourth that of the total."
15740 msgstr ""
15741
15742 #. type: TP
15743 #: build/C/man7/tcp.7:291
15744 #, no-wrap
15745 msgid ""
15746 "I<tcp_allowed_congestion_control> (String; default: see text; since Linux "
15747 "2.4.20)"
15748 msgstr ""
15749
15750 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15751 #. type: Plain text
15752 #: build/C/man7/tcp.7:304
15753 msgid ""
15754 "Show/set the congestion control algorithm choices available to unprivileged "
15755 "processes (see the description of the B<TCP_CONGESTION> socket option).  The "
15756 "items in the list are separated by white space and terminated by a newline "
15757 "character.  The list is a subset of those listed in "
15758 "I<tcp_available_congestion_control>.  The default value for this list is "
15759 "\"reno\" plus the default setting of I<tcp_congestion_control>."
15760 msgstr ""
15761
15762 #. type: TP
15763 #: build/C/man7/tcp.7:304
15764 #, no-wrap
15765 msgid "I<tcp_autocorking> (Boolean; default: enabled; since Linux 3.14)"
15766 msgstr ""
15767
15768 #.  commit f54b311142a92ea2e42598e347b84e1655caf8e3
15769 #.  Text heavily based on Documentation/networking/ip-sysctl.txt
15770 #. type: Plain text
15771 #: build/C/man7/tcp.7:321
15772 msgid ""
15773 "If this option is enabled, the kernel tries to coalesce small writes (from "
15774 "consecutive B<write>(2)  and B<sendmsg>(2)  calls) as much as possible, in "
15775 "order to decrease the total number of sent packets.  Coalescing is done if "
15776 "at least one prior packet for the flow is waiting in Qdisc queues or device "
15777 "transmit queue.  Applications can still use the B<TCP_CORK> socket option to "
15778 "obtain optimal behavior when they know how/when to uncork their sockets."
15779 msgstr ""
15780
15781 #. type: TP
15782 #: build/C/man7/tcp.7:321
15783 #, no-wrap
15784 msgid "I<tcp_available_congestion_control> (String; read-only; since Linux 2.4.20)"
15785 msgstr ""
15786
15787 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15788 #. type: Plain text
15789 #: build/C/man7/tcp.7:332
15790 msgid ""
15791 "Show a list of the congestion-control algorithms that are registered.  The "
15792 "items in the list are separated by white space and terminated by a newline "
15793 "character.  This list is a limiting set for the list in "
15794 "I<tcp_allowed_congestion_control>.  More congestion-control algorithms may "
15795 "be available as modules, but not loaded."
15796 msgstr ""
15797
15798 #. type: TP
15799 #: build/C/man7/tcp.7:332
15800 #, no-wrap
15801 msgid "I<tcp_app_win> (integer; default: 31; since Linux 2.4)"
15802 msgstr ""
15803
15804 #.  Since 2.4.0-test7
15805 #. type: Plain text
15806 #: build/C/man7/tcp.7:337
15807 msgid ""
15808 "This variable defines how many bytes of the TCP window are reserved for "
15809 "buffering overhead."
15810 msgstr ""
15811
15812 #
15813 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15814 #. type: Plain text
15815 #: build/C/man7/tcp.7:343
15816 msgid ""
15817 "A maximum of (I<window/2^tcp_app_win>, mss) bytes in the window are reserved "
15818 "for the application buffer.  A value of 0 implies that no amount is "
15819 "reserved."
15820 msgstr ""
15821
15822 #. type: TP
15823 #: build/C/man7/tcp.7:343
15824 #, no-wrap
15825 msgid "I<tcp_base_mss> (Integer; default: 512; since Linux 2.6.17)"
15826 msgstr ""
15827
15828 #
15829 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15830 #. type: Plain text
15831 #: build/C/man7/tcp.7:352
15832 msgid ""
15833 "The initial value of I<search_low> to be used by the packetization layer "
15834 "Path MTU discovery (MTU probing).  If MTU probing is enabled, this is the "
15835 "initial MSS used by the connection."
15836 msgstr ""
15837
15838 #. type: TP
15839 #: build/C/man7/tcp.7:352
15840 #, no-wrap
15841 msgid "I<tcp_bic> (Boolean; default: disabled; Linux 2.4.27/2.6.6 to 2.6.13)"
15842 msgstr ""
15843
15844 #
15845 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15846 #. type: Plain text
15847 #: build/C/man7/tcp.7:366
15848 msgid ""
15849 "Enable BIC TCP congestion control algorithm.  BIC-TCP is a sender-side-only "
15850 "change that ensures a linear RTT fairness under large windows while offering "
15851 "both scalability and bounded TCP-friendliness.  The protocol combines two "
15852 "schemes called additive increase and binary search increase.  When the "
15853 "congestion window is large, additive increase with a large increment ensures "
15854 "linear RTT fairness as well as good scalability.  Under small congestion "
15855 "windows, binary search increase provides TCP friendliness."
15856 msgstr ""
15857
15858 #. type: TP
15859 #: build/C/man7/tcp.7:366
15860 #, no-wrap
15861 msgid "I<tcp_bic_low_window> (integer; default: 14; Linux 2.4.27/2.6.6 to 2.6.13)"
15862 msgstr ""
15863
15864 #
15865 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15866 #. type: Plain text
15867 #: build/C/man7/tcp.7:373
15868 msgid ""
15869 "Set the threshold window (in packets) where BIC TCP starts to adjust the "
15870 "congestion window.  Below this threshold BIC TCP behaves the same as the "
15871 "default TCP Reno."
15872 msgstr ""
15873
15874 #. type: TP
15875 #: build/C/man7/tcp.7:373
15876 #, no-wrap
15877 msgid ""
15878 "I<tcp_bic_fast_convergence> (Boolean; default: enabled; Linux 2.4.27/2.6.6 "
15879 "to 2.6.13)"
15880 msgstr ""
15881
15882 #. type: Plain text
15883 #: build/C/man7/tcp.7:377
15884 msgid ""
15885 "Force BIC TCP to more quickly respond to changes in congestion window.  "
15886 "Allows two flows sharing the same connection to converge more rapidly."
15887 msgstr ""
15888
15889 #. type: TP
15890 #: build/C/man7/tcp.7:377
15891 #, no-wrap
15892 msgid "I<tcp_congestion_control> (String; default: see text; since Linux 2.4.13)"
15893 msgstr ""
15894
15895 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15896 #. type: Plain text
15897 #: build/C/man7/tcp.7:384
15898 msgid ""
15899 "Set the default congestion-control algorithm to be used for new "
15900 "connections.  The algorithm \"reno\" is always available, but additional "
15901 "choices may be available depending on kernel configuration.  The default "
15902 "value for this file is set as part of kernel configuration."
15903 msgstr ""
15904
15905 #. type: TP
15906 #: build/C/man7/tcp.7:384
15907 #, no-wrap
15908 msgid "I<tcp_dma_copybreak> (integer; default: 4096; since Linux 2.6.24)"
15909 msgstr ""
15910
15911 #. type: Plain text
15912 #: build/C/man7/tcp.7:391
15913 msgid ""
15914 "Lower limit, in bytes, of the size of socket reads that will be offloaded to "
15915 "a DMA copy engine, if one is present in the system and the kernel was "
15916 "configured with the B<CONFIG_NET_DMA> option."
15917 msgstr ""
15918
15919 #. type: TP
15920 #: build/C/man7/tcp.7:391
15921 #, no-wrap
15922 msgid "I<tcp_dsack> (Boolean; default: enabled; since Linux 2.4)"
15923 msgstr ""
15924
15925 #.  Since 2.4.0-test7
15926 #. type: Plain text
15927 #: build/C/man7/tcp.7:395
15928 msgid "Enable RFC\\ 2883 TCP Duplicate SACK support."
15929 msgstr ""
15930
15931 #. type: TP
15932 #: build/C/man7/tcp.7:395
15933 #, no-wrap
15934 msgid "I<tcp_ecn> (Boolean; default: disabled; since Linux 2.4)"
15935 msgstr ""
15936
15937 #.  Since 2.4.0-test7
15938 #. type: Plain text
15939 #: build/C/man7/tcp.7:402
15940 msgid ""
15941 "Enable RFC\\ 2884 Explicit Congestion Notification.  When enabled, "
15942 "connectivity to some destinations could be affected due to older, "
15943 "misbehaving routers along the path causing connections to be dropped."
15944 msgstr ""
15945
15946 #. type: TP
15947 #: build/C/man7/tcp.7:402
15948 #, no-wrap
15949 msgid "I<tcp_fack> (Boolean; default: enabled; since Linux 2.2)"
15950 msgstr ""
15951
15952 #.  Since 2.1.92
15953 #. type: Plain text
15954 #: build/C/man7/tcp.7:406
15955 msgid "Enable TCP Forward Acknowledgement support."
15956 msgstr ""
15957
15958 #. type: TP
15959 #: build/C/man7/tcp.7:406
15960 #, no-wrap
15961 msgid "I<tcp_fin_timeout> (integer; default: 60; since Linux 2.2)"
15962 msgstr ""
15963
15964 #.  Since 2.1.53
15965 #
15966 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15967 #. type: Plain text
15968 #: build/C/man7/tcp.7:416
15969 msgid ""
15970 "This specifies how many seconds to wait for a final FIN packet before the "
15971 "socket is forcibly closed.  This is strictly a violation of the TCP "
15972 "specification, but required to prevent denial-of-service attacks.  In Linux "
15973 "2.2, the default value was 180."
15974 msgstr ""
15975
15976 #. type: TP
15977 #: build/C/man7/tcp.7:416
15978 #, no-wrap
15979 msgid "I<tcp_frto> (integer; default: 0; since Linux 2.4.21/2.6)"
15980 msgstr ""
15981
15982 #.  Since 2.4.21/2.5.43
15983 #. type: Plain text
15984 #: build/C/man7/tcp.7:425
15985 msgid ""
15986 "Enable F-RTO, an enhanced recovery algorithm for TCP retransmission timeouts "
15987 "(RTOs).  It is particularly beneficial in wireless environments where packet "
15988 "loss is typically due to random radio interference rather than intermediate "
15989 "router congestion.  See RFC 4138 for more details."
15990 msgstr ""
15991
15992 #. type: Plain text
15993 #: build/C/man7/tcp.7:427
15994 msgid "This file can have one of the following values:"
15995 msgstr ""
15996
15997 #. type: Plain text
15998 #: build/C/man7/tcp.7:430
15999 msgid "Disabled."
16000 msgstr ""
16001
16002 #. type: Plain text
16003 #: build/C/man7/tcp.7:432
16004 msgid "The basic version F-RTO algorithm is enabled."
16005 msgstr ""
16006
16007 #. type: Plain text
16008 #: build/C/man7/tcp.7:437
16009 msgid ""
16010 "Enable SACK-enhanced F-RTO if flow uses SACK.  The basic version can be used "
16011 "also when SACK is in use though in that case scenario(s) exists where F-RTO "
16012 "interacts badly with the packet counting of the SACK-enabled TCP flow."
16013 msgstr ""
16014
16015 #. type: Plain text
16016 #: build/C/man7/tcp.7:441
16017 msgid ""
16018 "Before Linux 2.6.22, this parameter was a Boolean value, supporting just "
16019 "values 0 and 1 above."
16020 msgstr ""
16021
16022 #. type: TP
16023 #: build/C/man7/tcp.7:441
16024 #, no-wrap
16025 msgid "I<tcp_frto_response> (integer; default: 0; since Linux 2.6.22)"
16026 msgstr ""
16027
16028 #. type: Plain text
16029 #: build/C/man7/tcp.7:448
16030 msgid ""
16031 "When F-RTO has detected that a TCP retransmission timeout was spurious (i.e, "
16032 "the timeout would have been avoided had TCP set a longer retransmission "
16033 "timeout), TCP has several options concerning what to do next.  Possible "
16034 "values are:"
16035 msgstr ""
16036
16037 #. type: Plain text
16038 #: build/C/man7/tcp.7:456
16039 msgid ""
16040 "Rate halving based; a smooth and conservative response, results in halved "
16041 "congestion window (I<cwnd>)  and slow-start threshold (I<ssthresh>)  after "
16042 "one RTT."
16043 msgstr ""
16044
16045 #. type: Plain text
16046 #: build/C/man7/tcp.7:463
16047 msgid ""
16048 "Very conservative response; not recommended because even though being valid, "
16049 "it interacts poorly with the rest of Linux TCP; halves I<cwnd> and "
16050 "I<ssthresh> immediately."
16051 msgstr ""
16052
16053 #. type: Plain text
16054 #: build/C/man7/tcp.7:472
16055 msgid ""
16056 "Aggressive response; undoes congestion-control measures that are now known "
16057 "to be unnecessary (ignoring the possibility of a lost retransmission that "
16058 "would require TCP to be more cautious); I<cwnd> and I<ssthresh> are restored "
16059 "to the values prior to timeout."
16060 msgstr ""
16061
16062 #. type: TP
16063 #: build/C/man7/tcp.7:473
16064 #, no-wrap
16065 msgid "I<tcp_keepalive_intvl> (integer; default: 75; since Linux 2.4)"
16066 msgstr ""
16067
16068 #.  Since 2.3.18
16069 #. type: Plain text
16070 #: build/C/man7/tcp.7:477
16071 msgid "The number of seconds between TCP keep-alive probes."
16072 msgstr ""
16073
16074 #. type: TP
16075 #: build/C/man7/tcp.7:477
16076 #, no-wrap
16077 msgid "I<tcp_keepalive_probes> (integer; default: 9; since Linux 2.2)"
16078 msgstr ""
16079
16080 #.  Since 2.1.43
16081 #. type: Plain text
16082 #: build/C/man7/tcp.7:483
16083 msgid ""
16084 "The maximum number of TCP keep-alive probes to send before giving up and "
16085 "killing the connection if no response is obtained from the other end."
16086 msgstr ""
16087
16088 #. type: TP
16089 #: build/C/man7/tcp.7:483
16090 #, no-wrap
16091 msgid "I<tcp_keepalive_time> (integer; default: 7200; since Linux 2.2)"
16092 msgstr ""
16093
16094 #.  Since 2.1.43
16095 #. type: Plain text
16096 #: build/C/man7/tcp.7:495
16097 msgid ""
16098 "The number of seconds a connection needs to be idle before TCP begins "
16099 "sending out keep-alive probes.  Keep-alives are sent only when the "
16100 "B<SO_KEEPALIVE> socket option is enabled.  The default value is 7200 seconds "
16101 "(2 hours).  An idle connection is terminated after approximately an "
16102 "additional 11 minutes (9 probes an interval of 75 seconds apart) when "
16103 "keep-alive is enabled."
16104 msgstr ""
16105
16106 #
16107 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16108 #. type: Plain text
16109 #: build/C/man7/tcp.7:500
16110 msgid ""
16111 "Note that underlying connection tracking mechanisms and application timeouts "
16112 "may be much shorter."
16113 msgstr ""
16114
16115 #. type: TP
16116 #: build/C/man7/tcp.7:500
16117 #, no-wrap
16118 msgid "I<tcp_low_latency> (Boolean; default: disabled; since Linux 2.4.21/2.6)"
16119 msgstr ""
16120
16121 #.  Since 2.4.21/2.5.60
16122 #. type: Plain text
16123 #: build/C/man7/tcp.7:508
16124 msgid ""
16125 "If enabled, the TCP stack makes decisions that prefer lower latency as "
16126 "opposed to higher throughput.  It this option is disabled, then higher "
16127 "throughput is preferred.  An example of an application where this default "
16128 "should be changed would be a Beowulf compute cluster."
16129 msgstr ""
16130
16131 #. type: TP
16132 #: build/C/man7/tcp.7:508
16133 #, no-wrap
16134 msgid "I<tcp_max_orphans> (integer; default: see below; since Linux 2.4)"
16135 msgstr ""
16136
16137 #.  Since 2.3.41
16138 #. type: Plain text
16139 #: build/C/man7/tcp.7:522
16140 msgid ""
16141 "The maximum number of orphaned (not attached to any user file handle) TCP "
16142 "sockets allowed in the system.  When this number is exceeded, the orphaned "
16143 "connection is reset and a warning is printed.  This limit exists only to "
16144 "prevent simple denial-of-service attacks.  Lowering this limit is not "
16145 "recommended.  Network conditions might require you to increase the number of "
16146 "orphans allowed, but note that each orphan can eat up to ~64K of unswappable "
16147 "memory.  The default initial value is set equal to the kernel parameter "
16148 "NR_FILE.  This initial default is adjusted depending on the memory in the "
16149 "system."
16150 msgstr ""
16151
16152 #. type: TP
16153 #: build/C/man7/tcp.7:522
16154 #, no-wrap
16155 msgid "I<tcp_max_syn_backlog> (integer; default: see below; since Linux 2.2)"
16156 msgstr ""
16157
16158 #.  Since 2.1.53
16159 #. type: Plain text
16160 #: build/C/man7/tcp.7:539
16161 msgid ""
16162 "The maximum number of queued connection requests which have still not "
16163 "received an acknowledgement from the connecting client.  If this number is "
16164 "exceeded, the kernel will begin dropping requests.  The default value of 256 "
16165 "is increased to 1024 when the memory present in the system is adequate or "
16166 "greater (E<gt>= 128Mb), and reduced to 128 for those systems with very low "
16167 "memory (E<lt>= 32Mb).  It is recommended that if this needs to be increased "
16168 "above 1024, TCP_SYNQ_HSIZE in I<include/net/tcp.h> be modified to keep "
16169 "TCP_SYNQ_HSIZE*16E<lt>=tcp_max_syn_backlog, and the kernel be recompiled."
16170 msgstr ""
16171
16172 #. type: TP
16173 #: build/C/man7/tcp.7:539
16174 #, no-wrap
16175 msgid "I<tcp_max_tw_buckets> (integer; default: see below; since Linux 2.4)"
16176 msgstr ""
16177
16178 #.  Since 2.3.41
16179 #. type: Plain text
16180 #: build/C/man7/tcp.7:549
16181 msgid ""
16182 "The maximum number of sockets in TIME_WAIT state allowed in the system.  "
16183 "This limit exists only to prevent simple denial-of-service attacks.  The "
16184 "default value of NR_FILE*2 is adjusted depending on the memory in the "
16185 "system.  If this number is exceeded, the socket is closed and a warning is "
16186 "printed."
16187 msgstr ""
16188
16189 #. type: TP
16190 #: build/C/man7/tcp.7:549
16191 #, no-wrap
16192 msgid "I<tcp_moderate_rcvbuf> (Boolean; default: enabled; since Linux 2.4.17/2.6.7)"
16193 msgstr ""
16194
16195 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16196 #. type: Plain text
16197 #: build/C/man7/tcp.7:556
16198 msgid ""
16199 "If enabled, TCP performs receive buffer auto-tuning, attempting to "
16200 "automatically size the buffer (no greater than I<tcp_rmem[2]>)  to match the "
16201 "size required by the path for full throughput."
16202 msgstr ""
16203
16204 #. type: TP
16205 #: build/C/man7/tcp.7:556
16206 #, no-wrap
16207 msgid "I<tcp_mem> (since Linux 2.4)"
16208 msgstr ""
16209
16210 #.  Since 2.4.0-test7
16211 #. type: Plain text
16212 #: build/C/man7/tcp.7:568
16213 msgid ""
16214 "This is a vector of 3 integers: [low, pressure, high].  These bounds, "
16215 "measured in units of the system page size, are used by TCP to track its "
16216 "memory usage.  The defaults are calculated at boot time from the amount of "
16217 "available memory.  (TCP can only use I<low memory> for this, which is "
16218 "limited to around 900 megabytes on 32-bit systems.  64-bit systems do not "
16219 "suffer this limitation.)"
16220 msgstr ""
16221
16222 #. type: TP
16223 #: build/C/man7/tcp.7:569
16224 #, no-wrap
16225 msgid "I<low>"
16226 msgstr ""
16227
16228 #. type: Plain text
16229 #: build/C/man7/tcp.7:573
16230 msgid ""
16231 "TCP doesn't regulate its memory allocation when the number of pages it has "
16232 "allocated globally is below this number."
16233 msgstr ""
16234
16235 #. type: TP
16236 #: build/C/man7/tcp.7:573 build/C/man7/udp.7:151
16237 #, no-wrap
16238 msgid "I<pressure>"
16239 msgstr ""
16240
16241 #. type: Plain text
16242 #: build/C/man7/tcp.7:582
16243 msgid ""
16244 "When the amount of memory allocated by TCP exceeds this number of pages, TCP "
16245 "moderates its memory consumption.  This memory pressure state is exited once "
16246 "the number of pages allocated falls below the I<low> mark."
16247 msgstr ""
16248
16249 #. type: TP
16250 #: build/C/man7/tcp.7:582
16251 #, no-wrap
16252 msgid "I<high>"
16253 msgstr ""
16254
16255 #. type: Plain text
16256 #: build/C/man7/tcp.7:586
16257 msgid ""
16258 "The maximum number of pages, globally, that TCP will allocate.  This value "
16259 "overrides any other limits imposed by the kernel."
16260 msgstr ""
16261
16262 #. type: TP
16263 #: build/C/man7/tcp.7:587
16264 #, no-wrap
16265 msgid "I<tcp_mtu_probing> (integer; default: 0; since Linux 2.6.17)"
16266 msgstr ""
16267
16268 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16269 #. type: Plain text
16270 #: build/C/man7/tcp.7:592
16271 msgid ""
16272 "This parameter controls TCP Packetization-Layer Path MTU Discovery.  The "
16273 "following values may be assigned to the file:"
16274 msgstr ""
16275
16276 #. type: Plain text
16277 #: build/C/man7/tcp.7:595
16278 msgid "Disabled"
16279 msgstr ""
16280
16281 #. type: Plain text
16282 #: build/C/man7/tcp.7:597
16283 msgid "Disabled by default, enabled when an ICMP black hole detected"
16284 msgstr ""
16285
16286 #. type: Plain text
16287 #: build/C/man7/tcp.7:600
16288 msgid "Always enabled, use initial MSS of I<tcp_base_mss>."
16289 msgstr ""
16290
16291 #. type: TP
16292 #: build/C/man7/tcp.7:601
16293 #, no-wrap
16294 msgid "I<tcp_no_metrics_save> (Boolean; default: disabled; since Linux 2.6.6)"
16295 msgstr ""
16296
16297 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16298 #. type: Plain text
16299 #: build/C/man7/tcp.7:612
16300 msgid ""
16301 "By default, TCP saves various connection metrics in the route cache when the "
16302 "connection closes, so that connections established in the near future can "
16303 "use these to set initial conditions.  Usually, this increases overall "
16304 "performance, but it may sometimes cause performance degradation.  If "
16305 "I<tcp_no_metrics_save> is enabled, TCP will not cache metrics on closing "
16306 "connections."
16307 msgstr ""
16308
16309 #. type: TP
16310 #: build/C/man7/tcp.7:612
16311 #, no-wrap
16312 msgid "I<tcp_orphan_retries> (integer; default: 8; since Linux 2.4)"
16313 msgstr ""
16314
16315 #.  Since 2.3.41
16316 #. type: Plain text
16317 #: build/C/man7/tcp.7:617
16318 msgid ""
16319 "The maximum number of attempts made to probe the other end of a connection "
16320 "which has been closed by our end."
16321 msgstr ""
16322
16323 #. type: TP
16324 #: build/C/man7/tcp.7:617
16325 #, no-wrap
16326 msgid "I<tcp_reordering> (integer; default: 3; since Linux 2.4)"
16327 msgstr ""
16328
16329 #.  Since 2.4.0-test7
16330 #. type: Plain text
16331 #: build/C/man7/tcp.7:626
16332 msgid ""
16333 "The maximum a packet can be reordered in a TCP packet stream without TCP "
16334 "assuming packet loss and going into slow start.  It is not advisable to "
16335 "change this number.  This is a packet reordering detection metric designed "
16336 "to minimize unnecessary back off and retransmits provoked by reordering of "
16337 "packets on a connection."
16338 msgstr ""
16339
16340 #. type: TP
16341 #: build/C/man7/tcp.7:626
16342 #, no-wrap
16343 msgid "I<tcp_retrans_collapse> (Boolean; default: enabled; since Linux 2.2)"
16344 msgstr ""
16345
16346 #.  Since 2.1.96
16347 #. type: Plain text
16348 #: build/C/man7/tcp.7:630
16349 msgid "Try to send full-sized packets during retransmit."
16350 msgstr ""
16351
16352 #. type: TP
16353 #: build/C/man7/tcp.7:630
16354 #, no-wrap
16355 msgid "I<tcp_retries1> (integer; default: 3; since Linux 2.2)"
16356 msgstr ""
16357
16358 #.  Since 2.1.43
16359 #. type: Plain text
16360 #: build/C/man7/tcp.7:640
16361 msgid ""
16362 "The number of times TCP will attempt to retransmit a packet on an "
16363 "established connection normally, without the extra effort of getting the "
16364 "network layers involved.  Once we exceed this number of retransmits, we "
16365 "first have the network layer update the route if possible before each new "
16366 "retransmit.  The default is the RFC specified minimum of 3."
16367 msgstr ""
16368
16369 #. type: TP
16370 #: build/C/man7/tcp.7:640
16371 #, no-wrap
16372 msgid "I<tcp_retries2> (integer; default: 15; since Linux 2.2)"
16373 msgstr ""
16374
16375 #.  Since 2.1.43
16376 #. type: Plain text
16377 #: build/C/man7/tcp.7:650
16378 msgid ""
16379 "The maximum number of times a TCP packet is retransmitted in established "
16380 "state before giving up.  The default value is 15, which corresponds to a "
16381 "duration of approximately between 13 to 30 minutes, depending on the "
16382 "retransmission timeout.  The RFC\\ 1122 specified minimum limit of 100 "
16383 "seconds is typically deemed too short."
16384 msgstr ""
16385
16386 #. type: TP
16387 #: build/C/man7/tcp.7:650
16388 #, no-wrap
16389 msgid "I<tcp_rfc1337> (Boolean; default: disabled; since Linux 2.2)"
16390 msgstr ""
16391
16392 #.  Since 2.1.90
16393 #. type: Plain text
16394 #: build/C/man7/tcp.7:658
16395 msgid ""
16396 "Enable TCP behavior conformant with RFC\\ 1337.  When disabled, if a RST is "
16397 "received in TIME_WAIT state, we close the socket immediately without waiting "
16398 "for the end of the TIME_WAIT period."
16399 msgstr ""
16400
16401 #. type: TP
16402 #: build/C/man7/tcp.7:658
16403 #, no-wrap
16404 msgid "I<tcp_rmem> (since Linux 2.4)"
16405 msgstr ""
16406
16407 #.  Since 2.4.0-test7
16408 #. type: Plain text
16409 #: build/C/man7/tcp.7:666
16410 msgid ""
16411 "This is a vector of 3 integers: [min, default, max].  These parameters are "
16412 "used by TCP to regulate receive buffer sizes.  TCP dynamically adjusts the "
16413 "size of the receive buffer from the defaults listed below, in the range of "
16414 "these values, depending on memory available in the system."
16415 msgstr ""
16416
16417 #. type: TP
16418 #: build/C/man7/tcp.7:667 build/C/man7/tcp.7:844 build/C/man7/udp.7:145
16419 #, no-wrap
16420 msgid "I<min>"
16421 msgstr ""
16422
16423 #. type: Plain text
16424 #: build/C/man7/tcp.7:682
16425 msgid ""
16426 "minimum size of the receive buffer used by each TCP socket.  The default "
16427 "value is the system page size.  (On Linux 2.4, the default value is 4K, "
16428 "lowered to B<PAGE_SIZE> bytes in low-memory systems.)  This value is used to "
16429 "ensure that in memory pressure mode, allocations below this size will still "
16430 "succeed.  This is not used to bound the size of the receive buffer declared "
16431 "using B<SO_RCVBUF> on a socket."
16432 msgstr ""
16433
16434 #. type: TP
16435 #: build/C/man7/tcp.7:682 build/C/man7/tcp.7:854
16436 #, no-wrap
16437 msgid "I<default>"
16438 msgstr ""
16439
16440 #. type: Plain text
16441 #: build/C/man7/tcp.7:696
16442 msgid ""
16443 "the default size of the receive buffer for a TCP socket.  This value "
16444 "overwrites the initial default buffer size from the generic global "
16445 "I<net.core.rmem_default> defined for all protocols.  The default value is "
16446 "87380 bytes.  (On Linux 2.4, this will be lowered to 43689 in low-memory "
16447 "systems.)  If larger receive buffer sizes are desired, this value should be "
16448 "increased (to affect all sockets).  To employ large TCP windows, the "
16449 "I<net.ipv4.tcp_window_scaling> must be enabled (default)."
16450 msgstr ""
16451
16452 #. type: TP
16453 #: build/C/man7/tcp.7:696 build/C/man7/tcp.7:868 build/C/man7/udp.7:157
16454 #, no-wrap
16455 msgid "I<max>"
16456 msgstr ""
16457
16458 #. type: Plain text
16459 #: build/C/man7/tcp.7:705
16460 msgid ""
16461 "the maximum size of the receive buffer used by each TCP socket.  This value "
16462 "does not override the global I<net.core.rmem_max>.  This is not used to "
16463 "limit the size of the receive buffer declared using B<SO_RCVBUF> on a "
16464 "socket.  The default value is calculated using the formula"
16465 msgstr ""
16466
16467 #. type: Plain text
16468 #: build/C/man7/tcp.7:707
16469 #, no-wrap
16470 msgid "    max(87380, min(4MB, I<tcp_mem>[1]*PAGE_SIZE/128))\n"
16471 msgstr ""
16472
16473 #. type: Plain text
16474 #: build/C/man7/tcp.7:710
16475 msgid ""
16476 "(On Linux 2.4, the default is 87380*2 bytes, lowered to 87380 in low-memory "
16477 "systems)."
16478 msgstr ""
16479
16480 #. type: TP
16481 #: build/C/man7/tcp.7:711
16482 #, no-wrap
16483 msgid "I<tcp_sack> (Boolean; default: enabled; since Linux 2.2)"
16484 msgstr ""
16485
16486 #.  Since 2.1.36
16487 #. type: Plain text
16488 #: build/C/man7/tcp.7:715
16489 msgid "Enable RFC\\ 2018 TCP Selective Acknowledgements."
16490 msgstr ""
16491
16492 #. type: TP
16493 #: build/C/man7/tcp.7:715
16494 #, no-wrap
16495 msgid "I<tcp_slow_start_after_idle> (Boolean; default: enabled; since Linux 2.6.18)"
16496 msgstr ""
16497
16498 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16499 #. type: Plain text
16500 #: build/C/man7/tcp.7:723
16501 msgid ""
16502 "If enabled, provide RFC 2861 behavior and time out the congestion window "
16503 "after an idle period.  An idle period is defined as the current RTO "
16504 "(retransmission timeout).  If disabled, the congestion window will not be "
16505 "timed out after an idle period."
16506 msgstr ""
16507
16508 #. type: TP
16509 #: build/C/man7/tcp.7:723
16510 #, no-wrap
16511 msgid "I<tcp_stdurg> (Boolean; default: disabled; since Linux 2.2)"
16512 msgstr ""
16513
16514 #.  Since 2.1.44
16515 #.  RFC 793 was ambiguous in its specification of the meaning of the
16516 #.  urgent pointer.  RFC 1122 (and RFC 961) fixed on a particular
16517 #.  resolution of this ambiguity (unfortunately the "wrong" one).
16518 #. type: Plain text
16519 #: build/C/man7/tcp.7:737
16520 msgid ""
16521 "If this option is enabled, then use the RFC\\ 1122 interpretation of the TCP "
16522 "urgent-pointer field.  According to this interpretation, the urgent pointer "
16523 "points to the last byte of urgent data.  If this option is disabled, then "
16524 "use the BSD-compatible interpretation of the urgent pointer: the urgent "
16525 "pointer points to the first byte after the urgent data.  Enabling this "
16526 "option may lead to interoperability problems."
16527 msgstr ""
16528
16529 #. type: TP
16530 #: build/C/man7/tcp.7:737
16531 #, no-wrap
16532 msgid "I<tcp_syn_retries> (integer; default: 5; since Linux 2.2)"
16533 msgstr ""
16534
16535 #.  Since 2.1.38
16536 #. type: Plain text
16537 #: build/C/man7/tcp.7:744
16538 msgid ""
16539 "The maximum number of times initial SYNs for an active TCP connection "
16540 "attempt will be retransmitted.  This value should not be higher than 255.  "
16541 "The default value is 5, which corresponds to approximately 180 seconds."
16542 msgstr ""
16543
16544 #. type: TP
16545 #: build/C/man7/tcp.7:744
16546 #, no-wrap
16547 msgid "I<tcp_synack_retries> (integer; default: 5; since Linux 2.2)"
16548 msgstr ""
16549
16550 #.  Since 2.1.38
16551 #. type: Plain text
16552 #: build/C/man7/tcp.7:750
16553 msgid ""
16554 "The maximum number of times a SYN/ACK segment for a passive TCP connection "
16555 "will be retransmitted.  This number should not be higher than 255."
16556 msgstr ""
16557
16558 #. type: TP
16559 #: build/C/man7/tcp.7:750
16560 #, no-wrap
16561 msgid "I<tcp_syncookies> (Boolean; since Linux 2.2)"
16562 msgstr ""
16563
16564 #.  Since 2.1.43
16565 #. type: Plain text
16566 #: build/C/man7/tcp.7:770
16567 msgid ""
16568 "Enable TCP syncookies.  The kernel must be compiled with "
16569 "B<CONFIG_SYN_COOKIES>.  Send out syncookies when the syn backlog queue of a "
16570 "socket overflows.  The syncookies feature attempts to protect a socket from "
16571 "a SYN flood attack.  This should be used as a last resort, if at all.  This "
16572 "is a violation of the TCP protocol, and conflicts with other areas of TCP "
16573 "such as TCP extensions.  It can cause problems for clients and relays.  It "
16574 "is not recommended as a tuning mechanism for heavily loaded servers to help "
16575 "with overloaded or misconfigured conditions.  For recommended alternatives "
16576 "see I<tcp_max_syn_backlog>, I<tcp_synack_retries>, and "
16577 "I<tcp_abort_on_overflow>."
16578 msgstr ""
16579
16580 #. type: TP
16581 #: build/C/man7/tcp.7:770
16582 #, no-wrap
16583 msgid "I<tcp_timestamps> (Boolean; default: enabled; since Linux 2.2)"
16584 msgstr ""
16585
16586 #.  Since 2.1.36
16587 #. type: Plain text
16588 #: build/C/man7/tcp.7:774
16589 msgid "Enable RFC\\ 1323 TCP timestamps."
16590 msgstr ""
16591
16592 #. type: TP
16593 #: build/C/man7/tcp.7:774
16594 #, no-wrap
16595 msgid "I<tcp_tso_win_divisor> (integer; default: 3; since Linux 2.6.9)"
16596 msgstr ""
16597
16598 #. type: Plain text
16599 #: build/C/man7/tcp.7:780
16600 msgid ""
16601 "This parameter controls what percentage of the congestion window can be "
16602 "consumed by a single TCP Segmentation Offload (TSO) frame.  The setting of "
16603 "this parameter is a tradeoff between burstiness and building larger TSO "
16604 "frames."
16605 msgstr ""
16606
16607 #. type: TP
16608 #: build/C/man7/tcp.7:780
16609 #, no-wrap
16610 msgid "I<tcp_tw_recycle> (Boolean; default: disabled; since Linux 2.4)"
16611 msgstr ""
16612
16613 #.  Since 2.3.15
16614 #
16615 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16616 #. type: Plain text
16617 #: build/C/man7/tcp.7:790
16618 msgid ""
16619 "Enable fast recycling of TIME_WAIT sockets. Enabling this option is not "
16620 "recommended for devices communicating with the general Internet or using NAT "
16621 "(Network Address Translation). Since some NAT gateways pass through IP "
16622 "timestamp values, one IP can appear to have non-increasing timestamps. See "
16623 "RFC 1323 (PAWS), RFC 6191."
16624 msgstr ""
16625
16626 #. type: TP
16627 #: build/C/man7/tcp.7:790
16628 #, no-wrap
16629 msgid "I<tcp_tw_reuse> (Boolean; default: disabled; since Linux 2.4.19/2.6)"
16630 msgstr ""
16631
16632 #.  Since 2.4.19/2.5.43
16633 #
16634 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16635 #. type: Plain text
16636 #: build/C/man7/tcp.7:798
16637 msgid ""
16638 "Allow to reuse TIME_WAIT sockets for new connections when it is safe from "
16639 "protocol viewpoint.  It should not be changed without advice/request of "
16640 "technical experts."
16641 msgstr ""
16642
16643 #. type: TP
16644 #: build/C/man7/tcp.7:798
16645 #, no-wrap
16646 msgid "I<tcp_vegas_cong_avoid> (Boolean; default: disabled; Linux 2.2 to 2.6.13)"
16647 msgstr ""
16648
16649 #.  Since 2.1.8; removed in 2.6.13
16650 #
16651 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16652 #. type: Plain text
16653 #: build/C/man7/tcp.7:809
16654 msgid ""
16655 "Enable TCP Vegas congestion avoidance algorithm.  TCP Vegas is a "
16656 "sender-side-only change to TCP that anticipates the onset of congestion by "
16657 "estimating the bandwidth.  TCP Vegas adjusts the sending rate by modifying "
16658 "the congestion window.  TCP Vegas should provide less packet loss, but it is "
16659 "not as aggressive as TCP Reno."
16660 msgstr ""
16661
16662 #. type: TP
16663 #: build/C/man7/tcp.7:809
16664 #, no-wrap
16665 msgid "I<tcp_westwood> (Boolean; default: disabled; Linux 2.4.26/2.6.3 to 2.6.13)"
16666 msgstr ""
16667
16668 #. type: Plain text
16669 #: build/C/man7/tcp.7:821
16670 msgid ""
16671 "Enable TCP Westwood+ congestion control algorithm.  TCP Westwood+ is a "
16672 "sender-side-only modification of the TCP Reno protocol stack that optimizes "
16673 "the performance of TCP congestion control.  It is based on end-to-end "
16674 "bandwidth estimation to set congestion window and slow start threshold after "
16675 "a congestion episode.  Using this estimation, TCP Westwood+ adaptively sets "
16676 "a slow start threshold and a congestion window which takes into account the "
16677 "bandwidth used at the time congestion is experienced.  TCP Westwood+ "
16678 "significantly increases fairness with respect to TCP Reno in wired networks "
16679 "and throughput over wireless links."
16680 msgstr ""
16681
16682 #. type: TP
16683 #: build/C/man7/tcp.7:821
16684 #, no-wrap
16685 msgid "I<tcp_window_scaling> (Boolean; default: enabled; since Linux 2.2)"
16686 msgstr ""
16687
16688 #.  Since 2.1.36
16689 #. type: Plain text
16690 #: build/C/man7/tcp.7:835
16691 msgid ""
16692 "Enable RFC\\ 1323 TCP window scaling.  This feature allows the use of a "
16693 "large window (E<gt> 64K) on a TCP connection, should the other end support "
16694 "it.  Normally, the 16 bit window length field in the TCP header limits the "
16695 "window size to less than 64K bytes.  If larger windows are desired, "
16696 "applications can increase the size of their socket buffers and the window "
16697 "scaling option will be employed.  If I<tcp_window_scaling> is disabled, TCP "
16698 "will not negotiate the use of window scaling with the other end during "
16699 "connection setup."
16700 msgstr ""
16701
16702 #. type: TP
16703 #: build/C/man7/tcp.7:835
16704 #, no-wrap
16705 msgid "I<tcp_wmem> (since Linux 2.4)"
16706 msgstr ""
16707
16708 #.  Since 2.4.0-test7
16709 #. type: Plain text
16710 #: build/C/man7/tcp.7:843
16711 msgid ""
16712 "This is a vector of 3 integers: [min, default, max].  These parameters are "
16713 "used by TCP to regulate send buffer sizes.  TCP dynamically adjusts the size "
16714 "of the send buffer from the default values listed below, in the range of "
16715 "these values, depending on memory available."
16716 msgstr ""
16717
16718 #. type: Plain text
16719 #: build/C/man7/tcp.7:854
16720 msgid ""
16721 "Minimum size of the send buffer used by each TCP socket.  The default value "
16722 "is the system page size.  (On Linux 2.4, the default value is 4K bytes.)  "
16723 "This value is used to ensure that in memory pressure mode, allocations below "
16724 "this size will still succeed.  This is not used to bound the size of the "
16725 "send buffer declared using B<SO_SNDBUF> on a socket."
16726 msgstr ""
16727
16728 #.  True in Linux 2.4 and 2.6
16729 #. type: Plain text
16730 #: build/C/man7/tcp.7:868
16731 msgid ""
16732 "The default size of the send buffer for a TCP socket.  This value overwrites "
16733 "the initial default buffer size from the generic global "
16734 "I</proc/sys/net/core/wmem_default> defined for all protocols.  The default "
16735 "value is 16K bytes.  If larger send buffer sizes are desired, this value "
16736 "should be increased (to affect all sockets).  To employ large TCP windows, "
16737 "the I</proc/sys/net/ipv4/tcp_window_scaling> must be set to a nonzero value "
16738 "(default)."
16739 msgstr ""
16740
16741 #. type: Plain text
16742 #: build/C/man7/tcp.7:877
16743 msgid ""
16744 "The maximum size of the send buffer used by each TCP socket.  This value "
16745 "does not override the value in I</proc/sys/net/core/wmem_max>.  This is not "
16746 "used to limit the size of the send buffer declared using B<SO_SNDBUF> on a "
16747 "socket.  The default value is calculated using the formula"
16748 msgstr ""
16749
16750 #. type: Plain text
16751 #: build/C/man7/tcp.7:879
16752 #, no-wrap
16753 msgid "    max(65536, min(4MB, I<tcp_mem>[1]*PAGE_SIZE/128))\n"
16754 msgstr ""
16755
16756 #. type: Plain text
16757 #: build/C/man7/tcp.7:882
16758 msgid ""
16759 "(On Linux 2.4, the default value is 128K bytes, lowered 64K depending on "
16760 "low-memory systems.)"
16761 msgstr ""
16762
16763 #. type: TP
16764 #: build/C/man7/tcp.7:883
16765 #, no-wrap
16766 msgid ""
16767 "I<tcp_workaround_signed_windows> (Boolean; default: disabled; since Linux "
16768 "2.6.26)"
16769 msgstr ""
16770
16771 #. type: Plain text
16772 #: build/C/man7/tcp.7:889
16773 msgid ""
16774 "If enabled, assume that no receipt of a window-scaling option means that the "
16775 "remote TCP is broken and treats the window as a signed quantity.  If "
16776 "disabled, assume that the remote TCP is not broken even if we do not receive "
16777 "a window scaling option from it."
16778 msgstr ""
16779
16780 #.  or SOL_TCP on Linux
16781 #. type: Plain text
16782 #: build/C/man7/tcp.7:907
16783 msgid ""
16784 "To set or get a TCP socket option, call B<getsockopt>(2)  to read or "
16785 "B<setsockopt>(2)  to write the option with the option level argument set to "
16786 "B<IPPROTO_TCP>.  Unless otherwise noted, I<optval> is a pointer to an "
16787 "I<int>.  In addition, most B<IPPROTO_IP> socket options are valid on TCP "
16788 "sockets.  For more information see B<ip>(7)."
16789 msgstr ""
16790
16791 #. type: TP
16792 #: build/C/man7/tcp.7:907
16793 #, no-wrap
16794 msgid "B<TCP_CONGESTION> (since Linux 2.6.13)"
16795 msgstr ""
16796
16797 #.          commit 5f8ef48d240963093451bcf83df89f1a1364f51d
16798 #.          Author: Stephen Hemminger <shemminger@osdl.org>
16799 #. type: Plain text
16800 #: build/C/man7/tcp.7:923
16801 msgid ""
16802 "The argument for this option is a string.  This option allows the caller to "
16803 "set the TCP congestion control algorithm to be used, on a per-socket basis.  "
16804 "Unprivileged processes are restricted to choosing one of the algorithms in "
16805 "I<tcp_allowed_congestion_control> (described above).  Privileged processes "
16806 "(B<CAP_NET_ADMIN>)  can choose from any of the available congestion-control "
16807 "algorithms (see the description of I<tcp_available_congestion_control> "
16808 "above)."
16809 msgstr ""
16810
16811 #. type: TP
16812 #: build/C/man7/tcp.7:923
16813 #, no-wrap
16814 msgid "B<TCP_CORK> (since Linux 2.2)"
16815 msgstr ""
16816
16817 #.  precisely: since 2.1.127
16818 #. type: Plain text
16819 #: build/C/man7/tcp.7:939
16820 msgid ""
16821 "If set, don't send out partial frames.  All queued partial frames are sent "
16822 "when the option is cleared again.  This is useful for prepending headers "
16823 "before calling B<sendfile>(2), or for throughput optimization.  As currently "
16824 "implemented, there is a 200 millisecond ceiling on the time for which output "
16825 "is corked by B<TCP_CORK>.  If this ceiling is reached, then queued data is "
16826 "automatically transmitted.  This option can be combined with B<TCP_NODELAY> "
16827 "only since Linux 2.5.71.  This option should not be used in code intended to "
16828 "be portable."
16829 msgstr ""
16830
16831 #. type: TP
16832 #: build/C/man7/tcp.7:939
16833 #, no-wrap
16834 msgid "B<TCP_DEFER_ACCEPT> (since Linux 2.4)"
16835 msgstr ""
16836
16837 #.  Precisely: since 2.3.38
16838 #.  Useful references:
16839 #.  http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
16840 #.  http://unix.stackexchange.com/questions/94104/real-world-use-of-tcp-defer-accept
16841 #. type: Plain text
16842 #: build/C/man7/tcp.7:950
16843 msgid ""
16844 "Allow a listener to be awakened only when data arrives on the socket.  Takes "
16845 "an integer value (seconds), this can bound the maximum number of attempts "
16846 "TCP will make to complete the connection.  This option should not be used in "
16847 "code intended to be portable."
16848 msgstr ""
16849
16850 #. type: TP
16851 #: build/C/man7/tcp.7:950
16852 #, no-wrap
16853 msgid "B<TCP_INFO> (since Linux 2.4)"
16854 msgstr ""
16855
16856 #. type: Plain text
16857 #: build/C/man7/tcp.7:956
16858 msgid ""
16859 "Used to collect information about this socket.  The kernel returns a "
16860 "I<struct tcp_info> as defined in the file I</usr/include/linux/tcp.h>.  This "
16861 "option should not be used in code intended to be portable."
16862 msgstr ""
16863
16864 #. type: TP
16865 #: build/C/man7/tcp.7:956
16866 #, no-wrap
16867 msgid "B<TCP_KEEPCNT> (since Linux 2.4)"
16868 msgstr ""
16869
16870 #.  Precisely: since 2.3.18
16871 #. type: Plain text
16872 #: build/C/man7/tcp.7:963
16873 msgid ""
16874 "The maximum number of keepalive probes TCP should send before dropping the "
16875 "connection.  This option should not be used in code intended to be portable."
16876 msgstr ""
16877
16878 #. type: TP
16879 #: build/C/man7/tcp.7:963
16880 #, no-wrap
16881 msgid "B<TCP_KEEPIDLE> (since Linux 2.4)"
16882 msgstr ""
16883
16884 #.  Precisely: since 2.3.18
16885 #. type: Plain text
16886 #: build/C/man7/tcp.7:972
16887 msgid ""
16888 "The time (in seconds) the connection needs to remain idle before TCP starts "
16889 "sending keepalive probes, if the socket option B<SO_KEEPALIVE> has been set "
16890 "on this socket.  This option should not be used in code intended to be "
16891 "portable."
16892 msgstr ""
16893
16894 #. type: TP
16895 #: build/C/man7/tcp.7:972
16896 #, no-wrap
16897 msgid "B<TCP_KEEPINTVL> (since Linux 2.4)"
16898 msgstr ""
16899
16900 #.  Precisely: since 2.3.18
16901 #. type: Plain text
16902 #: build/C/man7/tcp.7:977
16903 msgid ""
16904 "The time (in seconds) between individual keepalive probes.  This option "
16905 "should not be used in code intended to be portable."
16906 msgstr ""
16907
16908 #. type: TP
16909 #: build/C/man7/tcp.7:977
16910 #, no-wrap
16911 msgid "B<TCP_LINGER2> (since Linux 2.4)"
16912 msgstr ""
16913
16914 #.  Precisely: since 2.3.41
16915 #. type: Plain text
16916 #: build/C/man7/tcp.7:989
16917 msgid ""
16918 "The lifetime of orphaned FIN_WAIT2 state sockets.  This option can be used "
16919 "to override the system-wide setting in the file "
16920 "I</proc/sys/net/ipv4/tcp_fin_timeout> for this socket.  This is not to be "
16921 "confused with the B<socket>(7)  level option B<SO_LINGER>.  This option "
16922 "should not be used in code intended to be portable."
16923 msgstr ""
16924
16925 #. type: TP
16926 #: build/C/man7/tcp.7:989
16927 #, no-wrap
16928 msgid "B<TCP_MAXSEG>"
16929 msgstr ""
16930
16931 #.  Present in Linux 1.0
16932 #. type: Plain text
16933 #: build/C/man7/tcp.7:999
16934 msgid ""
16935 "The maximum segment size for outgoing TCP packets.  In Linux 2.2 and "
16936 "earlier, and in Linux 2.6.28 and later, if this option is set before "
16937 "connection establishment, it also changes the MSS value announced to the "
16938 "other end in the initial packet.  Values greater than the (eventual) "
16939 "interface MTU have no effect.  TCP will also impose its minimum and maximum "
16940 "bounds over the value provided."
16941 msgstr ""
16942
16943 #. type: TP
16944 #: build/C/man7/tcp.7:999
16945 #, no-wrap
16946 msgid "B<TCP_NODELAY>"
16947 msgstr ""
16948
16949 #.  Present in Linux 1.0
16950 #. type: Plain text
16951 #: build/C/man7/tcp.7:1016
16952 msgid ""
16953 "If set, disable the Nagle algorithm.  This means that segments are always "
16954 "sent as soon as possible, even if there is only a small amount of data.  "
16955 "When not set, data is buffered until there is a sufficient amount to send "
16956 "out, thereby avoiding the frequent sending of small packets, which results "
16957 "in poor utilization of the network.  This option is overridden by "
16958 "B<TCP_CORK>; however, setting this option forces an explicit flush of "
16959 "pending output, even if B<TCP_CORK> is currently set."
16960 msgstr ""
16961
16962 #. type: TP
16963 #: build/C/man7/tcp.7:1016
16964 #, no-wrap
16965 msgid "B<TCP_QUICKACK> (since Linux 2.4.4)"
16966 msgstr ""
16967
16968 #. type: Plain text
16969 #: build/C/man7/tcp.7:1031
16970 msgid ""
16971 "Enable quickack mode if set or disable quickack mode if cleared.  In "
16972 "quickack mode, acks are sent immediately, rather than delayed if needed in "
16973 "accordance to normal TCP operation.  This flag is not permanent, it only "
16974 "enables a switch to or from quickack mode.  Subsequent operation of the TCP "
16975 "protocol will once again enter/leave quickack mode depending on internal "
16976 "protocol processing and factors such as delayed ack timeouts occurring and "
16977 "data transfer.  This option should not be used in code intended to be "
16978 "portable."
16979 msgstr ""
16980
16981 #. type: TP
16982 #: build/C/man7/tcp.7:1031
16983 #, no-wrap
16984 msgid "B<TCP_SYNCNT> (since Linux 2.4)"
16985 msgstr ""
16986
16987 #.  Precisely: since 2.3.18
16988 #. type: Plain text
16989 #: build/C/man7/tcp.7:1038
16990 msgid ""
16991 "Set the number of SYN retransmits that TCP should send before aborting the "
16992 "attempt to connect.  It cannot exceed 255.  This option should not be used "
16993 "in code intended to be portable."
16994 msgstr ""
16995
16996 #. type: TP
16997 #: build/C/man7/tcp.7:1038
16998 #, no-wrap
16999 msgid "B<TCP_USER_TIMEOUT> (since Linux 2.6.37)"
17000 msgstr ""
17001
17002 #.          commit dca43c75e7e545694a9dd6288553f55c53e2a3a3
17003 #.          Author: Jerry Chu <hkchu@google.com>
17004 #.  The following text taken nearly verbatim from Jerry Chu's (excellent)
17005 #.  commit message.
17006 #. type: Plain text
17007 #: build/C/man7/tcp.7:1056
17008 msgid ""
17009 "This option takes an I<unsigned int> as an argument.  When the value is "
17010 "greater than 0, it specifies the maximum amount of time in milliseconds that "
17011 "transmitted data may remain unacknowledged before TCP will forcibly close "
17012 "the corresponding connection and return B<ETIMEDOUT> to the application.  If "
17013 "the option value is specified as 0, TCP will to use the system default."
17014 msgstr ""
17015
17016 #. type: Plain text
17017 #: build/C/man7/tcp.7:1063
17018 msgid ""
17019 "Increasing user timeouts allows a TCP connection to survive extended periods "
17020 "without end-to-end connectivity.  Decreasing user timeouts allows "
17021 "applications to \"fail fast\", if so desired.  Otherwise, failure may take "
17022 "up to 20 minutes with the current system defaults in a normal WAN "
17023 "environment."
17024 msgstr ""
17025
17026 #. type: Plain text
17027 #: build/C/man7/tcp.7:1073
17028 msgid ""
17029 "This option can be set during any state of a TCP connection, but is "
17030 "effective only during the synchronized states of a connection (ESTABLISHED, "
17031 "FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK).  Moreover, when "
17032 "used with the TCP keepalive (B<SO_KEEPALIVE>)  option, B<TCP_USER_TIMEOUT> "
17033 "will override keepalive to determine when to close a connection due to "
17034 "keepalive failure."
17035 msgstr ""
17036
17037 #. type: Plain text
17038 #: build/C/man7/tcp.7:1076
17039 msgid ""
17040 "The option has no effect on when TCP retransmits a packet, nor when a "
17041 "keepalive probe is sent."
17042 msgstr ""
17043
17044 #. type: Plain text
17045 #: build/C/man7/tcp.7:1080
17046 msgid ""
17047 "This option, like many others, will be inherited by the socket returned by "
17048 "B<accept>(2), if it was set on the listening socket."
17049 msgstr ""
17050
17051 #. type: Plain text
17052 #: build/C/man7/tcp.7:1083
17053 msgid ""
17054 "Further details on the user timeout feature can be found in RFC\\ 793 and "
17055 "RFC\\ 5482 (\"TCP User Timeout Option\")."
17056 msgstr ""
17057
17058 #. type: TP
17059 #: build/C/man7/tcp.7:1083
17060 #, no-wrap
17061 msgid "B<TCP_WINDOW_CLAMP> (since Linux 2.4)"
17062 msgstr ""
17063
17064 #.  Precisely: since 2.3.41
17065 #. type: Plain text
17066 #: build/C/man7/tcp.7:1090
17067 msgid ""
17068 "Bound the size of the advertised window to this value.  The kernel imposes a "
17069 "minimum size of SOCK_MIN_RCVBUF/2.  This option should not be used in code "
17070 "intended to be portable."
17071 msgstr ""
17072
17073 #. type: SS
17074 #: build/C/man7/tcp.7:1090 build/C/man7/unix.7:260
17075 #, no-wrap
17076 msgid "Sockets API"
17077 msgstr ""
17078
17079 #. type: Plain text
17080 #: build/C/man7/tcp.7:1099
17081 msgid ""
17082 "TCP provides limited support for out-of-band data, in the form of (a single "
17083 "byte of) urgent data.  In Linux this means if the other end sends newer "
17084 "out-of-band data the older urgent data is inserted as normal data into the "
17085 "stream (even when B<SO_OOBINLINE> is not set).  This differs from BSD-based "
17086 "stacks."
17087 msgstr ""
17088
17089 #. type: Plain text
17090 #: build/C/man7/tcp.7:1106
17091 msgid ""
17092 "Linux uses the BSD compatible interpretation of the urgent pointer field by "
17093 "default.  This violates RFC\\ 1122, but is required for interoperability "
17094 "with other stacks.  It can be changed via I</proc/sys/net/ipv4/tcp_stdurg>."
17095 msgstr ""
17096
17097 #. type: Plain text
17098 #: build/C/man7/tcp.7:1111
17099 msgid ""
17100 "It is possible to peek at out-of-band data using the B<recv>(2)  B<MSG_PEEK> "
17101 "flag."
17102 msgstr ""
17103
17104 #. type: Plain text
17105 #: build/C/man7/tcp.7:1127
17106 msgid ""
17107 "Since version 2.4, Linux supports the use of B<MSG_TRUNC> in the I<flags> "
17108 "argument of B<recv>(2)  (and B<recvmsg>(2)).  This flag causes the received "
17109 "bytes of data to be discarded, rather than passed back in a caller-supplied "
17110 "buffer.  Since Linux 2.4.4, B<MSG_TRUNC> also has this effect when used in "
17111 "conjunction with B<MSG_OOB> to receive out-of-band data."
17112 msgstr ""
17113
17114 #. type: Plain text
17115 #: build/C/man7/tcp.7:1133 build/C/man7/unix.7:373
17116 msgid ""
17117 "The following B<ioctl>(2)  calls return information in I<value>.  The "
17118 "correct syntax is:"
17119 msgstr ""
17120
17121 #. type: Plain text
17122 #: build/C/man7/tcp.7:1138
17123 #, no-wrap
17124 msgid ""
17125 "B<int>I< value>B<;>\n"
17126 "I<error>B< = ioctl(>I<tcp_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
17127 msgstr ""
17128
17129 #. type: Plain text
17130 #: build/C/man7/tcp.7:1143
17131 msgid "I<ioctl_type> is one of the following:"
17132 msgstr ""
17133
17134 #. type: TP
17135 #: build/C/man7/tcp.7:1143 build/C/man7/unix.7:383
17136 #, no-wrap
17137 msgid "B<SIOCINQ>"
17138 msgstr ""
17139
17140 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
17141 #.  filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
17142 #.  SIOCOUTQ also has an effect for UNIX domain sockets, but not
17143 #.  quite what userland might expect. It seems to return the number
17144 #.  of bytes allocated for buffers containing pending output.
17145 #.  That number is normally larger than the number of bytes of pending
17146 #.  output. Since this info is, from userland's point of view, imprecise,
17147 #.  and it may well change, probably best not to document this now.
17148 #. type: Plain text
17149 #: build/C/man7/tcp.7:1159 build/C/man7/unix.7:405
17150 msgid ""
17151 "Returns the amount of queued unread data in the receive buffer.  The socket "
17152 "must not be in LISTEN state, otherwise an error (B<EINVAL>)  is returned.  "
17153 "B<SIOCINQ> is defined in I<E<lt>linux/sockios.hE<gt>>.  Alternatively, you "
17154 "can use the synonymous B<FIONREAD>, defined in I<E<lt>sys/ioctl.hE<gt>>."
17155 msgstr ""
17156
17157 #. type: TP
17158 #: build/C/man7/tcp.7:1159
17159 #, no-wrap
17160 msgid "B<SIOCATMARK>"
17161 msgstr ""
17162
17163 #. type: Plain text
17164 #: build/C/man7/tcp.7:1164
17165 msgid ""
17166 "Returns true (i.e., I<value> is nonzero) if the inbound data stream is at "
17167 "the urgent mark."
17168 msgstr ""
17169
17170 #. type: Plain text
17171 #: build/C/man7/tcp.7:1180
17172 msgid ""
17173 "If the B<SO_OOBINLINE> socket option is set, and B<SIOCATMARK> returns true, "
17174 "then the next read from the socket will return the urgent data.  If the "
17175 "B<SO_OOBINLINE> socket option is not set, and B<SIOCATMARK> returns true, "
17176 "then the next read from the socket will return the bytes following the "
17177 "urgent data (to actually read the urgent data requires the B<recv(MSG_OOB)> "
17178 "flag)."
17179 msgstr ""
17180
17181 #. type: Plain text
17182 #: build/C/man7/tcp.7:1194
17183 msgid ""
17184 "Note that a read never reads across the urgent mark.  If an application is "
17185 "informed of the presence of urgent data via B<select>(2)  (using the "
17186 "I<exceptfds> argument) or through delivery of a B<SIGURG> signal, then it "
17187 "can advance up to the mark using a loop which repeatedly tests B<SIOCATMARK> "
17188 "and performs a read (requesting any number of bytes) as long as "
17189 "B<SIOCATMARK> returns false."
17190 msgstr ""
17191
17192 #. type: TP
17193 #: build/C/man7/tcp.7:1194
17194 #, no-wrap
17195 msgid "B<SIOCOUTQ>"
17196 msgstr ""
17197
17198 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
17199 #.  filed 2010-09-10, may cause SIOCOUTQ to be defined in glibc headers
17200 #. type: Plain text
17201 #: build/C/man7/tcp.7:1210
17202 msgid ""
17203 "Returns the amount of unsent data in the socket send queue.  The socket must "
17204 "not be in LISTEN state, otherwise an error (B<EINVAL>)  is returned.  "
17205 "B<SIOCOUTQ> is defined in I<E<lt>linux/sockios.hE<gt>>.  Alternatively, you "
17206 "can use the synonymous B<TIOCOUTQ>, defined in I<E<lt>sys/ioctl.hE<gt>>."
17207 msgstr ""
17208
17209 #. type: Plain text
17210 #: build/C/man7/tcp.7:1215
17211 msgid ""
17212 "When a network error occurs, TCP tries to resend the packet.  If it doesn't "
17213 "succeed after some time, either B<ETIMEDOUT> or the last received error on "
17214 "this connection is reported."
17215 msgstr ""
17216
17217 #. type: Plain text
17218 #: build/C/man7/tcp.7:1226
17219 msgid ""
17220 "Some applications require a quicker error notification.  This can be enabled "
17221 "with the B<IPPROTO_IP> level B<IP_RECVERR> socket option.  When this option "
17222 "is enabled, all incoming errors are immediately passed to the user program.  "
17223 "Use this option with care \\(em it makes TCP less tolerant to routing "
17224 "changes and other normal network conditions."
17225 msgstr ""
17226
17227 #. type: TP
17228 #: build/C/man7/tcp.7:1227
17229 #, no-wrap
17230 msgid "B<EAFNOTSUPPORT>"
17231 msgstr ""
17232
17233 #. type: Plain text
17234 #: build/C/man7/tcp.7:1233
17235 msgid "Passed socket address type in I<sin_family> was not B<AF_INET>."
17236 msgstr ""
17237
17238 #. type: Plain text
17239 #: build/C/man7/tcp.7:1237
17240 msgid ""
17241 "The other end closed the socket unexpectedly or a read is executed on a shut "
17242 "down socket."
17243 msgstr ""
17244
17245 #. type: TP
17246 #: build/C/man7/tcp.7:1237
17247 #, no-wrap
17248 msgid "B<ETIMEDOUT>"
17249 msgstr ""
17250
17251 #. type: Plain text
17252 #: build/C/man7/tcp.7:1240
17253 msgid "The other end didn't acknowledge retransmitted data after some time."
17254 msgstr ""
17255
17256 #. type: Plain text
17257 #: build/C/man7/tcp.7:1244
17258 msgid ""
17259 "Any errors defined for B<ip>(7)  or the generic socket layer may also be "
17260 "returned for TCP."
17261 msgstr ""
17262
17263 #. type: Plain text
17264 #: build/C/man7/tcp.7:1251
17265 msgid ""
17266 "Support for Explicit Congestion Notification, zero-copy B<sendfile>(2), "
17267 "reordering support and some SACK extensions (DSACK) were introduced in 2.4.  "
17268 "Support for forward acknowledgement (FACK), TIME_WAIT recycling, and "
17269 "per-connection keepalive socket options were introduced in 2.3."
17270 msgstr ""
17271
17272 #. type: Plain text
17273 #: build/C/man7/tcp.7:1253
17274 msgid "Not all errors are documented."
17275 msgstr ""
17276
17277 #.  Only a single Linux kernel version is described
17278 #.  Info for 2.2 was lost. Should be added again,
17279 #.  or put into a separate page.
17280 #.  .SH AUTHORS
17281 #.  This man page was originally written by Andi Kleen.
17282 #.  It was updated for 2.4 by Nivedita Singhvi with input from
17283 #.  Alexey Kuznetsov's Documentation/networking/ip-sysctl.txt
17284 #.  document.
17285 #. type: Plain text
17286 #: build/C/man7/tcp.7:1263
17287 msgid "IPv6 is not described."
17288 msgstr ""
17289
17290 #. type: Plain text
17291 #: build/C/man7/tcp.7:1275
17292 msgid ""
17293 "B<accept>(2), B<bind>(2), B<connect>(2), B<getsockopt>(2), B<listen>(2), "
17294 "B<recvmsg>(2), B<sendfile>(2), B<sendmsg>(2), B<socket>(2), B<ip>(7), "
17295 "B<socket>(7)"
17296 msgstr ""
17297
17298 #. type: Plain text
17299 #: build/C/man7/tcp.7:1277
17300 msgid "RFC\\ 793 for the TCP specification."
17301 msgstr ""
17302
17303 #. type: Plain text
17304 #: build/C/man7/tcp.7:1279
17305 msgid ""
17306 "RFC\\ 1122 for the TCP requirements and a description of the Nagle "
17307 "algorithm."
17308 msgstr ""
17309
17310 #. type: Plain text
17311 #: build/C/man7/tcp.7:1281
17312 msgid "RFC\\ 1323 for TCP timestamp and window scaling options."
17313 msgstr ""
17314
17315 #. type: Plain text
17316 #: build/C/man7/tcp.7:1283
17317 msgid "RFC\\ 1337 for a description of TIME_WAIT assassination hazards."
17318 msgstr ""
17319
17320 #. type: Plain text
17321 #: build/C/man7/tcp.7:1285
17322 msgid "RFC\\ 3168 for a description of Explicit Congestion Notification."
17323 msgstr ""
17324
17325 #. type: Plain text
17326 #: build/C/man7/tcp.7:1287
17327 msgid "RFC\\ 2581 for TCP congestion control algorithms."
17328 msgstr ""
17329
17330 #. type: Plain text
17331 #: build/C/man7/tcp.7:1289
17332 msgid "RFC\\ 2018 and RFC\\ 2883 for SACK and extensions to SACK."
17333 msgstr ""
17334
17335 #. type: TH
17336 #: build/C/man7/udp.7:12
17337 #, no-wrap
17338 msgid "UDP"
17339 msgstr ""
17340
17341 #. type: TH
17342 #: build/C/man7/udp.7:12
17343 #, no-wrap
17344 msgid "2013-07-31"
17345 msgstr ""
17346
17347 #. type: Plain text
17348 #: build/C/man7/udp.7:15
17349 msgid "udp - User Datagram Protocol for IPv4"
17350 msgstr ""
17351
17352 #. type: Plain text
17353 #: build/C/man7/udp.7:21
17354 msgid "B<#include E<lt>netinet/udp.hE<gt>>"
17355 msgstr ""
17356
17357 #. type: Plain text
17358 #: build/C/man7/udp.7:23
17359 msgid "B<udp_socket = socket(AF_INET, SOCK_DGRAM, 0);>"
17360 msgstr ""
17361
17362 #. type: Plain text
17363 #: build/C/man7/udp.7:29
17364 msgid ""
17365 "This is an implementation of the User Datagram Protocol described in RFC\\ "
17366 "768.  It implements a connectionless, unreliable datagram packet service.  "
17367 "Packets may be reordered or duplicated before they arrive.  UDP generates "
17368 "and checks checksums to catch transmission errors."
17369 msgstr ""
17370
17371 #. type: Plain text
17372 #: build/C/man7/udp.7:58
17373 msgid ""
17374 "When a UDP socket is created, its local and remote addresses are "
17375 "unspecified.  Datagrams can be sent immediately using B<sendto>(2)  or "
17376 "B<sendmsg>(2)  with a valid destination address as an argument.  When "
17377 "B<connect>(2)  is called on the socket, the default destination address is "
17378 "set and datagrams can now be sent using B<send>(2)  or B<write>(2)  without "
17379 "specifying a destination address.  It is still possible to send to other "
17380 "destinations by passing an address to B<sendto>(2)  or B<sendmsg>(2).  In "
17381 "order to receive packets, the socket can be bound to a local address first "
17382 "by using B<bind>(2).  Otherwise, the socket layer will automatically assign "
17383 "a free local port out of the range defined by "
17384 "I</proc/sys/net/ipv4/ip_local_port_range> and bind the socket to "
17385 "B<INADDR_ANY>."
17386 msgstr ""
17387
17388 #. type: Plain text
17389 #: build/C/man7/udp.7:66
17390 msgid ""
17391 "All receive operations return only one packet.  When the packet is smaller "
17392 "than the passed buffer, only that much data is returned; when it is bigger, "
17393 "the packet is truncated and the B<MSG_TRUNC> flag is set.  B<MSG_WAITALL> is "
17394 "not supported."
17395 msgstr ""
17396
17397 #. type: Plain text
17398 #: build/C/man7/udp.7:75
17399 msgid ""
17400 "IP options may be sent or received using the socket options described in "
17401 "B<ip>(7).  They are processed by the kernel only when the appropriate "
17402 "I</proc> parameter is enabled (but still passed to the user even when it is "
17403 "turned off).  See B<ip>(7)."
17404 msgstr ""
17405
17406 #. type: Plain text
17407 #: build/C/man7/udp.7:80
17408 msgid ""
17409 "When the B<MSG_DONTROUTE> flag is set on sending, the destination address "
17410 "must refer to a local interface address and the packet is sent only to that "
17411 "interface."
17412 msgstr ""
17413
17414 #. type: Plain text
17415 #: build/C/man7/udp.7:98
17416 msgid ""
17417 "By default, Linux UDP does path MTU (Maximum Transmission Unit) discovery.  "
17418 "This means the kernel will keep track of the MTU to a specific target IP "
17419 "address and return B<EMSGSIZE> when a UDP packet write exceeds it.  When "
17420 "this happens, the application should decrease the packet size.  Path MTU "
17421 "discovery can be also turned off using the B<IP_MTU_DISCOVER> socket option "
17422 "or the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file; see B<ip>(7)  for "
17423 "details.  When turned off, UDP will fragment outgoing UDP packets that "
17424 "exceed the interface MTU.  However, disabling it is not recommended for "
17425 "performance and reliability reasons."
17426 msgstr ""
17427
17428 #. type: Plain text
17429 #: build/C/man7/udp.7:103
17430 msgid "UDP uses the IPv4 I<sockaddr_in> address format described in B<ip>(7)."
17431 msgstr ""
17432
17433 #. type: Plain text
17434 #: build/C/man7/udp.7:114
17435 msgid ""
17436 "All fatal errors will be passed to the user as an error return even when the "
17437 "socket is not connected.  This includes asynchronous errors received from "
17438 "the network.  You may get an error for an earlier packet that was sent on "
17439 "the same socket.  This behavior differs from many other BSD socket "
17440 "implementations which don't pass any errors unless the socket is connected.  "
17441 "Linux's behavior is mandated by B<RFC\\ 1122>."
17442 msgstr ""
17443
17444 #. type: Plain text
17445 #: build/C/man7/udp.7:128
17446 msgid ""
17447 "For compatibility with legacy code, in Linux 2.0 and 2.2 it was possible to "
17448 "set the B<SO_BSDCOMPAT> B<SOL_SOCKET> option to receive remote errors only "
17449 "when the socket has been connected (except for B<EPROTO> and B<EMSGSIZE>).  "
17450 "Locally generated errors are always passed.  Support for this socket option "
17451 "was removed in later kernels; see B<socket>(7)  for further information."
17452 msgstr ""
17453
17454 #. type: Plain text
17455 #: build/C/man7/udp.7:137
17456 msgid ""
17457 "When the B<IP_RECVERR> option is enabled, all errors are stored in the "
17458 "socket error queue, and can be received by B<recvmsg>(2)  with the "
17459 "B<MSG_ERRQUEUE> flag set."
17460 msgstr ""
17461
17462 #. type: Plain text
17463 #: build/C/man7/udp.7:140
17464 msgid ""
17465 "System-wide UDP parameter settings can be accessed by files in the directory "
17466 "I</proc/sys/net/ipv4/>."
17467 msgstr ""
17468
17469 #. type: TP
17470 #: build/C/man7/udp.7:140
17471 #, no-wrap
17472 msgid "I<udp_mem> (since Linux 2.6.25)"
17473 msgstr ""
17474
17475 #. type: Plain text
17476 #: build/C/man7/udp.7:144
17477 msgid ""
17478 "This is a vector of three integers governing the number of pages allowed for "
17479 "queueing by all UDP sockets."
17480 msgstr ""
17481
17482 #. type: Plain text
17483 #: build/C/man7/udp.7:151
17484 msgid ""
17485 "Below this number of pages, UDP is not bothered about its memory appetite.  "
17486 "When the amount of memory allocated by UDP exceeds this number, UDP starts "
17487 "to moderate memory usage."
17488 msgstr ""
17489
17490 #. type: Plain text
17491 #: build/C/man7/udp.7:157
17492 msgid ""
17493 "This value was introduced to follow the format of I<tcp_mem> (see "
17494 "B<tcp>(7))."
17495 msgstr ""
17496
17497 #. type: Plain text
17498 #: build/C/man7/udp.7:160
17499 msgid "Number of pages allowed for queueing by all UDP sockets."
17500 msgstr ""
17501
17502 #. type: Plain text
17503 #: build/C/man7/udp.7:164
17504 msgid ""
17505 "Defaults values for these three items are calculated at boot time from the "
17506 "amount of available memory."
17507 msgstr ""
17508
17509 #. type: TP
17510 #: build/C/man7/udp.7:164
17511 #, no-wrap
17512 msgid "I<udp_rmem_min> (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
17513 msgstr ""
17514
17515 #. type: Plain text
17516 #: build/C/man7/udp.7:171
17517 msgid ""
17518 "Minimal size, in bytes, of receive buffers used by UDP sockets in "
17519 "moderation.  Each UDP socket is able to use the size for receiving data, "
17520 "even if total pages of UDP sockets exceed I<udp_mem> pressure."
17521 msgstr ""
17522
17523 #. type: TP
17524 #: build/C/man7/udp.7:171
17525 #, no-wrap
17526 msgid "I<udp_wmem_min> (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
17527 msgstr ""
17528
17529 #. type: Plain text
17530 #: build/C/man7/udp.7:178
17531 msgid ""
17532 "Minimal size, in bytes, of send buffer used by UDP sockets in moderation.  "
17533 "Each UDP socket is able to use the size for sending data, even if total "
17534 "pages of UDP sockets exceed I<udp_mem> pressure."
17535 msgstr ""
17536
17537 #. type: Plain text
17538 #: build/C/man7/udp.7:189
17539 msgid ""
17540 "To set or get a UDP socket option, call B<getsockopt>(2)  to read or "
17541 "B<setsockopt>(2)  to write the option with the option level argument set to "
17542 "B<IPPROTO_UDP>.  Unless otherwise noted, I<optval> is a pointer to an "
17543 "I<int>."
17544 msgstr ""
17545
17546 #. type: TP
17547 #: build/C/man7/udp.7:189
17548 #, no-wrap
17549 msgid "B<UDP_CORK> (since Linux 2.5.44)"
17550 msgstr ""
17551
17552 #.  FIXME document UDP_ENCAP (new in kernel 2.5.67)
17553 #.  From include/linux/udp.h:
17554 #.  /* UDP encapsulation types */
17555 #.  #define UDP_ENCAP_ESPINUDP_NON_IKE      1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
17556 #.  #define UDP_ENCAP_ESPINUDP      2 /* draft-ietf-ipsec-udp-encaps-06 */
17557 #.  #define UDP_ENCAP_L2TPINUDP     3 /* rfc2661 */
17558 #. type: Plain text
17559 #: build/C/man7/udp.7:202
17560 msgid ""
17561 "If this option is enabled, then all data output on this socket is "
17562 "accumulated into a single datagram that is transmitted when the option is "
17563 "disabled.  This option should not be used in code intended to be portable."
17564 msgstr ""
17565
17566 #. type: Plain text
17567 #: build/C/man7/udp.7:206
17568 msgid "These ioctls can be accessed using B<ioctl>(2).  The correct syntax is:"
17569 msgstr ""
17570
17571 #. type: Plain text
17572 #: build/C/man7/udp.7:211
17573 #, no-wrap
17574 msgid ""
17575 "B<int>I< value>B<;>\n"
17576 "I<error>B< = ioctl(>I<udp_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
17577 msgstr ""
17578
17579 #. type: TP
17580 #: build/C/man7/udp.7:213
17581 #, no-wrap
17582 msgid "B<FIONREAD> (B<SIOCINQ>)"
17583 msgstr ""
17584
17585 #.  See http://www.securiteam.com/unixfocus/5KP0I15IKO.html
17586 #.  "GNUnet DoS (UDP Socket Unreachable)", 14 May 2006
17587 #. type: Plain text
17588 #: build/C/man7/udp.7:231
17589 msgid ""
17590 "Gets a pointer to an integer as argument.  Returns the size of the next "
17591 "pending datagram in the integer in bytes, or 0 when no datagram is pending.  "
17592 "B<Warning:> Using B<FIONREAD>, it is impossible to distinguish the case "
17593 "where no datagram is pending from the case where the next pending datagram "
17594 "contains zero bytes of data.  It is safer to use B<select>(2), B<poll>(2), "
17595 "or B<epoll>(7)  to distinguish these cases."
17596 msgstr ""
17597
17598 #. type: TP
17599 #: build/C/man7/udp.7:231
17600 #, no-wrap
17601 msgid "B<TIOCOUTQ> (B<SIOCOUTQ>)"
17602 msgstr ""
17603
17604 #. type: Plain text
17605 #: build/C/man7/udp.7:235
17606 msgid ""
17607 "Returns the number of data bytes in the local send queue.  Only supported "
17608 "with Linux 2.4 and above."
17609 msgstr ""
17610
17611 #. type: Plain text
17612 #: build/C/man7/udp.7:241
17613 msgid ""
17614 "In addition, all ioctls documented in B<ip>(7)  and B<socket>(7)  are "
17615 "supported."
17616 msgstr ""
17617
17618 #. type: Plain text
17619 #: build/C/man7/udp.7:247
17620 msgid ""
17621 "All errors documented for B<socket>(7)  or B<ip>(7)  may be returned by a "
17622 "send or receive on a UDP socket."
17623 msgstr ""
17624
17625 #. type: TP
17626 #: build/C/man7/udp.7:247 build/C/man7/unix.7:410
17627 #, no-wrap
17628 msgid "B<ECONNREFUSED>"
17629 msgstr ""
17630
17631 #. type: Plain text
17632 #: build/C/man7/udp.7:251
17633 msgid ""
17634 "No receiver was associated with the destination address.  This might be "
17635 "caused by a previous packet sent over the socket."
17636 msgstr ""
17637
17638 #.  .SH CREDITS
17639 #.  This man page was written by Andi Kleen.
17640 #. type: Plain text
17641 #: build/C/man7/udp.7:256
17642 msgid "B<IP_RECVERR> is a new feature in Linux 2.2."
17643 msgstr ""
17644
17645 #. type: Plain text
17646 #: build/C/man7/udp.7:261
17647 msgid "B<ip>(7), B<raw>(7), B<socket>(7), B<udplite>(7)"
17648 msgstr ""
17649
17650 #. type: Plain text
17651 #: build/C/man7/udp.7:263
17652 msgid "RFC\\ 768 for the User Datagram Protocol."
17653 msgstr ""
17654
17655 #. type: Plain text
17656 #: build/C/man7/udp.7:265
17657 msgid "RFC\\ 1122 for the host requirements."
17658 msgstr ""
17659
17660 #. type: Plain text
17661 #: build/C/man7/udp.7:267
17662 msgid "RFC\\ 1191 for a description of path MTU discovery."
17663 msgstr ""
17664
17665 #. type: TH
17666 #: build/C/man7/udplite.7:27
17667 #, no-wrap
17668 msgid "UDPLITE"
17669 msgstr ""
17670
17671 #. type: Plain text
17672 #: build/C/man7/udplite.7:30
17673 msgid "udplite - Lightweight User Datagram Protocol"
17674 msgstr ""
17675
17676 #. type: Plain text
17677 #: build/C/man7/udplite.7:38
17678 msgid "B<sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);>"
17679 msgstr ""
17680
17681 #. type: Plain text
17682 #: build/C/man7/udplite.7:41
17683 msgid ""
17684 "This is an implementation of the Lightweight User Datagram Protocol "
17685 "(UDP-Lite), as described in RFC\\ 3828."
17686 msgstr ""
17687
17688 #. type: Plain text
17689 #: build/C/man7/udplite.7:47
17690 msgid ""
17691 "UDP-Lite is an extension of UDP (RFC\\ 768) to support variable-length "
17692 "checksums.  This has advantages for some types of multimedia transport that "
17693 "may be able to make use of slightly damaged datagrams, rather than having "
17694 "them discarded by lower-layer protocols."
17695 msgstr ""
17696
17697 #. type: Plain text
17698 #: build/C/man7/udplite.7:53
17699 msgid ""
17700 "The variable-length checksum coverage is set via a B<setsockopt>(2)  "
17701 "option.  If this option is not set, the only difference to UDP is in using a "
17702 "different IP protocol identifier (IANA number 136)."
17703 msgstr ""
17704
17705 #. type: Plain text
17706 #: build/C/man7/udplite.7:58
17707 msgid ""
17708 "The UDP-Lite implementation is a full extension of B<udp>(7)\\(emthat is, it "
17709 "shares the same API and API behavior, and in addition offers two socket "
17710 "options to control the checksum coverage."
17711 msgstr ""
17712
17713 #. type: Plain text
17714 #: build/C/man7/udplite.7:67
17715 msgid ""
17716 "UDP-Litev4 uses the I<sockaddr_in> address format described in B<ip>(7).  "
17717 "UDP-Litev6 uses the I<sockaddr_in6> address format described in B<ipv6>(7)."
17718 msgstr ""
17719
17720 #. type: Plain text
17721 #: build/C/man7/udplite.7:80
17722 msgid ""
17723 "To set or get a UDP-Lite socket option, call B<getsockopt>(2)  to read or "
17724 "B<setsockopt>(2)  to write the option with the option level argument set to "
17725 "B<IPPROTO_UDPLITE>.  In addition, all B<IPPROTO_UDP> socket options are "
17726 "valid on a UDP-Lite socket.  See B<udp>(7)  for more information."
17727 msgstr ""
17728
17729 #. type: Plain text
17730 #: build/C/man7/udplite.7:82
17731 msgid "The following two options are specific to UDP-Lite."
17732 msgstr ""
17733
17734 #. type: TP
17735 #: build/C/man7/udplite.7:82
17736 #, no-wrap
17737 msgid "B<UDPLITE_SEND_CSCOV>"
17738 msgstr ""
17739
17740 #. type: Plain text
17741 #: build/C/man7/udplite.7:87
17742 msgid ""
17743 "This option sets the sender checksum coverage and takes an I<int> as "
17744 "argument, with a checksum coverage value in the range 0..2^16-1."
17745 msgstr ""
17746
17747 #. type: Plain text
17748 #: build/C/man7/udplite.7:91
17749 msgid ""
17750 "A value of 0 means that the entire datagram is always covered.  Values from "
17751 "1-7 are illegal (RFC\\ 3828, 3.1) and are rounded up to the minimum coverage "
17752 "of 8."
17753 msgstr ""
17754
17755 #. type: Plain text
17756 #: build/C/man7/udplite.7:97
17757 msgid ""
17758 "With regard to IPv6 jumbograms (RFC\\ 2675), the UDP-Litev6 checksum "
17759 "coverage is limited to the first 2^16-1 octets, as per RFC\\ 3828, 3.5.  "
17760 "Higher values are therefore silently truncated to 2^16-1.  If in doubt, the "
17761 "current coverage value can always be queried using B<getsockopt>(2)."
17762 msgstr ""
17763
17764 #. type: TP
17765 #: build/C/man7/udplite.7:97
17766 #, no-wrap
17767 msgid "B<UDPLITE_RECV_CSCOV>"
17768 msgstr ""
17769
17770 #. type: Plain text
17771 #: build/C/man7/udplite.7:108
17772 msgid ""
17773 "This is the receiver-side analogue and uses the same argument format and "
17774 "value range as B<UDPLITE_SEND_CSCOV>.  This option is not required to enable "
17775 "traffic with partial checksum coverage.  Its function is that of a traffic "
17776 "filter: when enabled, it instructs the kernel to drop all packets which have "
17777 "a coverage I<less> than the specified coverage value."
17778 msgstr ""
17779
17780 #.  SO_NO_CHECK exists and is supported by UDPv4, but is
17781 #.  commented out in socket(7), hence also commented out here
17782 #. .PP
17783 #. Since UDP-Lite mandates checksums, checksumming can not be disabled
17784 #. via the
17785 #. .B SO_NO_CHECK
17786 #. option from
17787 #. .BR socket (7).
17788 #. type: Plain text
17789 #: build/C/man7/udplite.7:121
17790 msgid ""
17791 "When the value of B<UDPLITE_RECV_CSCOV> exceeds the actual packet coverage, "
17792 "incoming packets are silently dropped, but may generate a warning message in "
17793 "the system log."
17794 msgstr ""
17795
17796 #. type: Plain text
17797 #: build/C/man7/udplite.7:126
17798 msgid ""
17799 "All errors documented for B<udp>(7)  may be returned.  UDP-Lite does not add "
17800 "further errors."
17801 msgstr ""
17802
17803 #. type: Plain text
17804 #: build/C/man7/udplite.7:129
17805 msgid "I</proc/net/snmp> - basic UDP-Litev4 statistics counters."
17806 msgstr ""
17807
17808 #. type: Plain text
17809 #: build/C/man7/udplite.7:132
17810 msgid "I</proc/net/snmp6> - basic UDP-Litev6 statistics counters."
17811 msgstr ""
17812
17813 #. type: Plain text
17814 #: build/C/man7/udplite.7:134
17815 msgid "UDP-Litev4/v6 first appeared in Linux 2.6.20."
17816 msgstr ""
17817
17818 #.  FIXME . remove this section once glibc supports UDP-Lite
17819 #. type: Plain text
17820 #: build/C/man7/udplite.7:137
17821 msgid "Where glibc support is missing, the following definitions are needed:"
17822 msgstr ""
17823
17824 #.  The following two are defined in the kernel in linux/net/udplite.h
17825 #. type: Plain text
17826 #: build/C/man7/udplite.7:144
17827 #, no-wrap
17828 msgid ""
17829 "#define IPPROTO_UDPLITE     136\n"
17830 "#define UDPLITE_SEND_CSCOV  10\n"
17831 "#define UDPLITE_RECV_CSCOV  11\n"
17832 msgstr ""
17833
17834 #. type: Plain text
17835 #: build/C/man7/udplite.7:151
17836 msgid "B<ip>(7), B<ipv6>(7), B<socket>(7), B<udp>(7)"
17837 msgstr ""
17838
17839 #. type: Plain text
17840 #: build/C/man7/udplite.7:153
17841 msgid "RFC\\ 3828 for the Lightweight User Datagram Protocol (UDP-Lite)."
17842 msgstr ""
17843
17844 #. type: Plain text
17845 #: build/C/man7/udplite.7:156
17846 msgid "I<Documentation/networking/udplite.txt> in the Linux kernel source tree"
17847 msgstr ""
17848
17849 #. type: TH
17850 #: build/C/man7/unix.7:20
17851 #, no-wrap
17852 msgid "UNIX"
17853 msgstr ""
17854
17855 #. type: Plain text
17856 #: build/C/man7/unix.7:23
17857 msgid "unix - sockets for local interprocess communication"
17858 msgstr ""
17859
17860 #. type: Plain text
17861 #: build/C/man7/unix.7:27
17862 msgid "B<#include E<lt>sys/un.hE<gt>>"
17863 msgstr ""
17864
17865 #. type: Plain text
17866 #: build/C/man7/unix.7:29
17867 msgid "I<unix_socket>B< = socket(AF_UNIX, type, 0);>"
17868 msgstr ""
17869
17870 #. type: Plain text
17871 #: build/C/man7/unix.7:31
17872 msgid "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>"
17873 msgstr ""
17874
17875 #. type: Plain text
17876 #: build/C/man7/unix.7:42
17877 msgid ""
17878 "The B<AF_UNIX> (also known as B<AF_LOCAL>)  socket family is used to "
17879 "communicate between processes on the same machine efficiently.  "
17880 "Traditionally, UNIX domain sockets can be either unnamed, or bound to a "
17881 "filesystem pathname (marked as being of type socket).  Linux also supports "
17882 "an abstract namespace which is independent of the filesystem."
17883 msgstr ""
17884
17885 #. type: Plain text
17886 #: build/C/man7/unix.7:54
17887 msgid ""
17888 "Valid socket types in the UNIX domain are: B<SOCK_STREAM>, for a "
17889 "stream-oriented socket; B<SOCK_DGRAM>, for a datagram-oriented socket that "
17890 "preserves message boundaries (as on most UNIX implementations, UNIX domain "
17891 "datagram sockets are always reliable and don't reorder datagrams); and "
17892 "(since Linux 2.6.4)  B<SOCK_SEQPACKET>, for a connection-oriented socket "
17893 "that preserves message boundaries and delivers messages in the order that "
17894 "they were sent."
17895 msgstr ""
17896
17897 #. type: Plain text
17898 #: build/C/man7/unix.7:57
17899 msgid ""
17900 "UNIX domain sockets support passing file descriptors or process credentials "
17901 "to other processes using ancillary data."
17902 msgstr ""
17903
17904 #. type: Plain text
17905 #: build/C/man7/unix.7:59
17906 msgid "A UNIX domain socket address is represented in the following structure:"
17907 msgstr ""
17908
17909 #. type: Plain text
17910 #: build/C/man7/unix.7:63
17911 #, no-wrap
17912 msgid "#define UNIX_PATH_MAX    108\n"
17913 msgstr ""
17914
17915 #. type: Plain text
17916 #: build/C/man7/unix.7:68
17917 #, no-wrap
17918 msgid ""
17919 "struct sockaddr_un {\n"
17920 "    sa_family_t sun_family;               /* AF_UNIX */\n"
17921 "    char        sun_path[UNIX_PATH_MAX];  /* pathname */\n"
17922 "};\n"
17923 msgstr ""
17924
17925 #. type: Plain text
17926 #: build/C/man7/unix.7:75
17927 msgid "The I<sun_family> field always contains B<AF_UNIX>."
17928 msgstr ""
17929
17930 #. type: Plain text
17931 #: build/C/man7/unix.7:91
17932 msgid ""
17933 "Various systems calls (for example, B<bind>(2), B<connect>(2), and "
17934 "B<sendto>(2))  take a I<sockaddr_un> argument as input.  Some other system "
17935 "calls (for example, B<getsockname>(2), B<getpeername>(2), B<recvfrom>(2), "
17936 "and B<accept>(2))  return an argument of this type."
17937 msgstr ""
17938
17939 #. type: Plain text
17940 #: build/C/man7/unix.7:95
17941 msgid "Three types of address are distinguished in the I<sockaddr_un> structure:"
17942 msgstr ""
17943
17944 #. type: Plain text
17945 #: build/C/man7/unix.7:103
17946 msgid ""
17947 "I<pathname>: a UNIX domain socket can be bound to a null-terminated "
17948 "filesystem pathname using B<bind>(2).  When the address of a pathname socket "
17949 "is returned (by one of the system calls noted above), its length is"
17950 msgstr ""
17951
17952 #. type: Plain text
17953 #: build/C/man7/unix.7:105
17954 #, no-wrap
17955 msgid "    offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
17956 msgstr ""
17957
17958 #. type: Plain text
17959 #: build/C/man7/unix.7:118
17960 msgid ""
17961 "and I<sun_path> contains the null-terminated pathname.  (On Linux, the above "
17962 "B<offsetof>()  expression equates to the same value as "
17963 "I<sizeof(sa_family_t)>, but some other implementations include other fields "
17964 "before I<sun_path>, so the B<offsetof>()  expression more portably describes "
17965 "the size of the address structure.)"
17966 msgstr ""
17967
17968 #. type: Plain text
17969 #: build/C/man7/unix.7:120
17970 msgid "For further details of pathname sockets, see below."
17971 msgstr ""
17972
17973 #.  There is quite some variation across implementations: FreeBSD
17974 #.  says the length is 16 bytes, HP-UX 11 says it's zero bytes.
17975 #. type: Plain text
17976 #: build/C/man7/unix.7:136
17977 msgid ""
17978 "I<unnamed>: A stream socket that has not been bound to a pathname using "
17979 "B<bind>(2)  has no name.  Likewise, the two sockets created by "
17980 "B<socketpair>(2)  are unnamed.  When the address of an unnamed socket is "
17981 "returned, its length is I<sizeof(sa_family_t)>, and I<sun_path> should not "
17982 "be inspected."
17983 msgstr ""
17984
17985 #. type: Plain text
17986 #: build/C/man7/unix.7:159
17987 msgid ""
17988 "I<abstract>: an abstract socket address is distinguished (from a pathname "
17989 "socket)  by the fact that I<sun_path[0]> is a null byte (\\(aq\\e0\\(aq).  "
17990 "The socket's address in this namespace is given by the additional bytes in "
17991 "I<sun_path> that are covered by the specified length of the address "
17992 "structure.  (Null bytes in the name have no special significance.)  The name "
17993 "has no connection with filesystem pathnames.  When the address of an "
17994 "abstract socket is returned, the returned I<addrlen> is greater than "
17995 "I<sizeof(sa_family_t)> (i.e., greater than 2), and the name of the socket is "
17996 "contained in the first I<(addrlen - sizeof(sa_family_t))> bytes of "
17997 "I<sun_path>.  The abstract socket namespace is a nonportable Linux "
17998 "extension."
17999 msgstr ""
18000
18001 #. type: SS
18002 #: build/C/man7/unix.7:159
18003 #, no-wrap
18004 msgid "Pathname sockets"
18005 msgstr ""
18006
18007 #. type: Plain text
18008 #: build/C/man7/unix.7:162
18009 msgid ""
18010 "When binding a socket to a pathname, a few rules should be observed for "
18011 "maximum portability and ease of coding:"
18012 msgstr ""
18013
18014 #. type: Plain text
18015 #: build/C/man7/unix.7:166
18016 msgid "The pathname in I<sun_path> should be null-terminated."
18017 msgstr ""
18018
18019 #. type: Plain text
18020 #: build/C/man7/unix.7:170
18021 msgid ""
18022 "The length of the pathname, including the terminating null byte, should not "
18023 "exceed the size of I<sun_path>."
18024 msgstr ""
18025
18026 #. type: Plain text
18027 #: build/C/man7/unix.7:176
18028 msgid ""
18029 "The I<addrlen> argument that describes the enclosing I<sockaddr_un> "
18030 "structure should have a value of at least:"
18031 msgstr ""
18032
18033 #. type: Plain text
18034 #: build/C/man7/unix.7:179
18035 #, no-wrap
18036 msgid "    offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
18037 msgstr ""
18038
18039 #. type: Plain text
18040 #: build/C/man7/unix.7:185
18041 msgid ""
18042 "or, more simply, I<addrlen> can be specified as I<sizeof(struct "
18043 "sockaddr_un)>."
18044 msgstr ""
18045
18046 #.  Linux does this, including for the case where the supplied path
18047 #.  is 108 bytes
18048 #. type: Plain text
18049 #: build/C/man7/unix.7:193
18050 msgid ""
18051 "There is some variation in how implementations handle UNIX domain socket "
18052 "addresses that do not follow the above rules.  For example, some (but not "
18053 "all) implementations append a null terminator if none is present in the "
18054 "supplied I<sun_path>."
18055 msgstr ""
18056
18057 #.  HP-UX
18058 #.  Modern BSDs generally have 104, Tru64 and AIX have 104,
18059 #.  Solaris and Irix have 108
18060 #. type: Plain text
18061 #: build/C/man7/unix.7:202
18062 msgid ""
18063 "When coding portable applications, keep in mind that some implementations "
18064 "have I<sun_path> as short as 92 bytes."
18065 msgstr ""
18066
18067 #. type: Plain text
18068 #: build/C/man7/unix.7:220
18069 msgid ""
18070 "Various system calls (B<accept>(2), B<recvfrom>(2), B<getsockname>(2), "
18071 "B<getpeername>(2))  return socket address structures.  When applied to UNIX "
18072 "domain sockets, the value-result I<addrlen> argument supplied to the call "
18073 "should be initialized as above.  Upon return, the argument is set to "
18074 "indicate the I<actual> size of the address structure.  The caller should "
18075 "check the value returned in this argument: if the output value exceeds the "
18076 "input value, then there is no guarantee that a null terminator is present in "
18077 "I<sun_path>.  (See BUGS.)"
18078 msgstr ""
18079
18080 #. type: Plain text
18081 #: build/C/man7/unix.7:233
18082 msgid ""
18083 "For historical reasons, these socket options are specified with a "
18084 "B<SOL_SOCKET> type even though they are B<AF_UNIX> specific.  They can be "
18085 "set with B<setsockopt>(2)  and read with B<getsockopt>(2)  by specifying "
18086 "B<SOL_SOCKET> as the socket family."
18087 msgstr ""
18088
18089 #. type: TP
18090 #: build/C/man7/unix.7:233
18091 #, no-wrap
18092 msgid "B<SO_PASSCRED>"
18093 msgstr ""
18094
18095 #. type: Plain text
18096 #: build/C/man7/unix.7:240
18097 msgid ""
18098 "Enables the receiving of the credentials of the sending process in an "
18099 "ancillary message.  When this option is set and the socket is not yet "
18100 "connected a unique name in the abstract namespace will be generated "
18101 "automatically.  Expects an integer boolean flag."
18102 msgstr ""
18103
18104 #. type: SS
18105 #: build/C/man7/unix.7:240
18106 #, no-wrap
18107 msgid "Autobind feature"
18108 msgstr ""
18109
18110 #.  i.e., sizeof(short)
18111 #. type: Plain text
18112 #: build/C/man7/unix.7:260
18113 msgid ""
18114 "If a B<bind>(2)  call specifies I<addrlen> as I<sizeof(sa_family_t)>, or the "
18115 "B<SO_PASSCRED> socket option was specified for a socket that was not "
18116 "explicitly bound to an address, then the socket is autobound to an abstract "
18117 "address.  The address consists of a null byte followed by 5 bytes in the "
18118 "character set I<[0-9a-f]>.  Thus, there is a limit of 2^20 autobind "
18119 "addresses.  (From Linux 2.1.15, when the autobind feature was added, 8 bytes "
18120 "were used, and the limit was thus 2^32 autobind addresses.  The change to 5 "
18121 "bytes came in Linux 2.3.15.)"
18122 msgstr ""
18123
18124 #. type: Plain text
18125 #: build/C/man7/unix.7:263
18126 msgid ""
18127 "The following paragraphs describe domain-specific details and unsupported "
18128 "features of the sockets API for UNIX domain sockets on Linux."
18129 msgstr ""
18130
18131 #. type: Plain text
18132 #: build/C/man7/unix.7:271
18133 msgid ""
18134 "UNIX domain sockets do not support the transmission of out-of-band data (the "
18135 "B<MSG_OOB> flag for B<send>(2)  and B<recv>(2))."
18136 msgstr ""
18137
18138 #. type: Plain text
18139 #: build/C/man7/unix.7:276
18140 msgid "The B<send>(2)  B<MSG_MORE> flag is not supported by UNIX domain sockets."
18141 msgstr ""
18142
18143 #. type: Plain text
18144 #: build/C/man7/unix.7:284
18145 msgid ""
18146 "The use of B<MSG_TRUNC> in the I<flags> argument of B<recv>(2)  is not "
18147 "supported by UNIX domain sockets."
18148 msgstr ""
18149
18150 #. type: Plain text
18151 #: build/C/man7/unix.7:296
18152 msgid ""
18153 "The B<SO_SNDBUF> socket option does have an effect for UNIX domain sockets, "
18154 "but the B<SO_RCVBUF> option does not.  For datagram sockets, the "
18155 "B<SO_SNDBUF> value imposes an upper limit on the size of outgoing "
18156 "datagrams.  This limit is calculated as the doubled (see B<socket>(7))  "
18157 "option value less 32 bytes used for overhead."
18158 msgstr ""
18159
18160 #. type: SS
18161 #: build/C/man7/unix.7:296
18162 #, no-wrap
18163 msgid "Ancillary messages"
18164 msgstr ""
18165
18166 #. type: Plain text
18167 #: build/C/man7/unix.7:318
18168 msgid ""
18169 "Ancillary data is sent and received using B<sendmsg>(2)  and B<recvmsg>(2).  "
18170 "For historical reasons the ancillary message types listed below are "
18171 "specified with a B<SOL_SOCKET> type even though they are B<AF_UNIX> "
18172 "specific.  To send them set the I<cmsg_level> field of the struct I<cmsghdr> "
18173 "to B<SOL_SOCKET> and the I<cmsg_type> field to the type.  For more "
18174 "information see B<cmsg>(3)."
18175 msgstr ""
18176
18177 #. type: TP
18178 #: build/C/man7/unix.7:318
18179 #, no-wrap
18180 msgid "B<SCM_RIGHTS>"
18181 msgstr ""
18182
18183 #. type: Plain text
18184 #: build/C/man7/unix.7:324
18185 msgid ""
18186 "Send or receive a set of open file descriptors from another process.  The "
18187 "data portion contains an integer array of the file descriptors.  The passed "
18188 "file descriptors behave as though they have been created with B<dup>(2)."
18189 msgstr ""
18190
18191 #. type: TP
18192 #: build/C/man7/unix.7:324
18193 #, no-wrap
18194 msgid "B<SCM_CREDENTIALS>"
18195 msgstr ""
18196
18197 #. type: Plain text
18198 #: build/C/man7/unix.7:334
18199 msgid ""
18200 "Send or receive UNIX credentials.  This can be used for authentication.  The "
18201 "credentials are passed as a I<struct ucred> ancillary message.  Thus "
18202 "structure is defined in I<E<lt>sys/socket.hE<gt>> as follows:"
18203 msgstr ""
18204
18205 #. type: Plain text
18206 #: build/C/man7/unix.7:342
18207 #, no-wrap
18208 msgid ""
18209 "struct ucred {\n"
18210 "    pid_t pid;    /* process ID of the sending process */\n"
18211 "    uid_t uid;    /* user ID of the sending process */\n"
18212 "    gid_t gid;    /* group ID of the sending process */\n"
18213 "};\n"
18214 msgstr ""
18215
18216 #. type: Plain text
18217 #: build/C/man7/unix.7:351
18218 msgid ""
18219 "Since glibc 2.8, the B<_GNU_SOURCE> feature test macro must be defined "
18220 "(before including I<any> header files) in order to obtain the definition of "
18221 "this structure."
18222 msgstr ""
18223
18224 #. type: Plain text
18225 #: build/C/man7/unix.7:367
18226 msgid ""
18227 "The credentials which the sender specifies are checked by the kernel.  A "
18228 "process with effective user ID 0 is allowed to specify values that do not "
18229 "match its own.  The sender must specify its own process ID (unless it has "
18230 "the capability B<CAP_SYS_ADMIN>), its user ID, effective user ID, or saved "
18231 "set-user-ID (unless it has B<CAP_SETUID>), and its group ID, effective group "
18232 "ID, or saved set-group-ID (unless it has B<CAP_SETGID>).  To receive a "
18233 "I<struct ucred> message the B<SO_PASSCRED> option must be enabled on the "
18234 "socket."
18235 msgstr ""
18236
18237 #. type: Plain text
18238 #: build/C/man7/unix.7:378
18239 #, no-wrap
18240 msgid ""
18241 "B<int>I< value>B<;>\n"
18242 "I<error>B< = ioctl(>I<unix_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
18243 msgstr ""
18244
18245 #. type: Plain text
18246 #: build/C/man7/unix.7:383
18247 msgid "I<ioctl_type> can be:"
18248 msgstr ""
18249
18250 #. type: Plain text
18251 #: build/C/man7/unix.7:410
18252 msgid ""
18253 "The specified local address is already in use or the filesystem socket "
18254 "object already exists."
18255 msgstr ""
18256
18257 #. type: Plain text
18258 #: build/C/man7/unix.7:416
18259 msgid ""
18260 "The remote address specified by B<connect>(2)  was not a listening socket.  "
18261 "This error can also occur if the target pathname is not a socket."
18262 msgstr ""
18263
18264 #. type: TP
18265 #: build/C/man7/unix.7:416
18266 #, no-wrap
18267 msgid "B<ECONNRESET>"
18268 msgstr ""
18269
18270 #. type: Plain text
18271 #: build/C/man7/unix.7:419
18272 msgid "Remote socket was unexpectedly closed."
18273 msgstr ""
18274
18275 #. type: Plain text
18276 #: build/C/man7/unix.7:422
18277 msgid "User memory address was not valid."
18278 msgstr ""
18279
18280 #. type: Plain text
18281 #: build/C/man7/unix.7:431
18282 msgid ""
18283 "Invalid argument passed.  A common cause is that the value B<AF_UNIX> was "
18284 "not specified in the I<sun_type> field of passed addresses, or the socket "
18285 "was in an invalid state for the applied operation."
18286 msgstr ""
18287
18288 #. type: Plain text
18289 #: build/C/man7/unix.7:436
18290 msgid ""
18291 "B<connect>(2)  called on an already connected socket or a target address was "
18292 "specified on a connected socket."
18293 msgstr ""
18294
18295 #. type: Plain text
18296 #: build/C/man7/unix.7:441
18297 msgid ""
18298 "The pathname in the remote address specified to B<connect>(2)  did not "
18299 "exist."
18300 msgstr ""
18301
18302 #. type: TP
18303 #: build/C/man7/unix.7:441
18304 #, no-wrap
18305 msgid "B<ENOMEM>"
18306 msgstr ""
18307
18308 #. type: Plain text
18309 #: build/C/man7/unix.7:447
18310 msgid "Socket operation needs a target address, but the socket is not connected."
18311 msgstr ""
18312
18313 #. type: Plain text
18314 #: build/C/man7/unix.7:451
18315 msgid ""
18316 "Stream operation called on non-stream oriented socket or tried to use the "
18317 "out-of-band data option."
18318 msgstr ""
18319
18320 #. type: Plain text
18321 #: build/C/man7/unix.7:455
18322 msgid "The sender passed invalid credentials in the I<struct ucred>."
18323 msgstr ""
18324
18325 #. type: Plain text
18326 #: build/C/man7/unix.7:467
18327 msgid ""
18328 "Remote socket was closed on a stream socket.  If enabled, a B<SIGPIPE> is "
18329 "sent as well.  This can be avoided by passing the B<MSG_NOSIGNAL> flag to "
18330 "B<sendmsg>(2)  or B<recvmsg>(2)."
18331 msgstr ""
18332
18333 #. type: TP
18334 #: build/C/man7/unix.7:467
18335 #, no-wrap
18336 msgid "B<EPROTONOSUPPORT>"
18337 msgstr ""
18338
18339 #. type: Plain text
18340 #: build/C/man7/unix.7:471
18341 msgid "Passed protocol is not B<AF_UNIX>."
18342 msgstr ""
18343
18344 #. type: TP
18345 #: build/C/man7/unix.7:471
18346 #, no-wrap
18347 msgid "B<EPROTOTYPE>"
18348 msgstr ""
18349
18350 #. type: Plain text
18351 #: build/C/man7/unix.7:477
18352 msgid ""
18353 "Remote socket does not match the local socket type (B<SOCK_DGRAM> versus "
18354 "B<SOCK_STREAM>)"
18355 msgstr ""
18356
18357 #. type: Plain text
18358 #: build/C/man7/unix.7:480
18359 msgid "Unknown socket type."
18360 msgstr ""
18361
18362 #. type: Plain text
18363 #: build/C/man7/unix.7:484
18364 msgid ""
18365 "Other errors can be generated by the generic socket layer or by the "
18366 "filesystem while generating a filesystem socket object.  See the appropriate "
18367 "manual pages for more information."
18368 msgstr ""
18369
18370 #. type: Plain text
18371 #: build/C/man7/unix.7:490
18372 msgid ""
18373 "B<SCM_CREDENTIALS> and the abstract namespace were introduced with Linux 2.2 "
18374 "and should not be used in portable programs.  (Some BSD-derived systems also "
18375 "support credential passing, but the implementation details differ.)"
18376 msgstr ""
18377
18378 #. type: Plain text
18379 #: build/C/man7/unix.7:501
18380 msgid ""
18381 "In the Linux implementation, sockets which are visible in the filesystem "
18382 "honor the permissions of the directory they are in.  Their owner, group, and "
18383 "permissions can be changed.  Creation of a new socket will fail if the "
18384 "process does not have write and search (execute) permission on the directory "
18385 "the socket is created in.  Connecting to the socket object requires "
18386 "read/write permission.  This behavior differs from many BSD-derived systems "
18387 "which ignore permissions for UNIX domain sockets.  Portable programs should "
18388 "not rely on this feature for security."
18389 msgstr ""
18390
18391 #. type: Plain text
18392 #: build/C/man7/unix.7:509
18393 msgid ""
18394 "Binding to a socket with a filename creates a socket in the filesystem that "
18395 "must be deleted by the caller when it is no longer needed (using "
18396 "B<unlink>(2)).  The usual UNIX close-behind semantics apply; the socket can "
18397 "be unlinked at any time and will be finally removed from the filesystem when "
18398 "the last reference to it is closed."
18399 msgstr ""
18400
18401 #. type: Plain text
18402 #: build/C/man7/unix.7:518
18403 msgid ""
18404 "To pass file descriptors or credentials over a B<SOCK_STREAM>, you need to "
18405 "send or receive at least one byte of nonancillary data in the same "
18406 "B<sendmsg>(2)  or B<recvmsg>(2)  call."
18407 msgstr ""
18408
18409 #. type: Plain text
18410 #: build/C/man7/unix.7:521
18411 msgid "UNIX domain stream sockets do not support the notion of out-of-band data."
18412 msgstr ""
18413
18414 #.  The behavior on Solaris is quite similar.
18415 #. type: Plain text
18416 #: build/C/man7/unix.7:546
18417 msgid ""
18418 "When binding a socket to an address, Linux is one of the implementations "
18419 "that appends a null terminator if none is supplied in I<sun_path>.  In most "
18420 "cases this is unproblematic: when the socket address is retrieved, it will "
18421 "be one byte longer than that supplied when the socket was bound.  However, "
18422 "there is one case where confusing behavior can result: if 108 non-null bytes "
18423 "are supplied when a socket is bound, then the addition of the null "
18424 "terminator takes the length of the pathname beyond I<sizeof(sun_path)>.  "
18425 "Consequently, when retrieving the socket address (for example, via "
18426 "B<accept>(2)), if the input I<addrlen> argument for the retrieving call is "
18427 "specified as I<sizeof(struct sockaddr_un)>, then the returned address "
18428 "structure I<won't> have a null terminator in I<sun_path>."
18429 msgstr ""
18430
18431 #.  i.e., traditional BSD
18432 #. type: Plain text
18433 #: build/C/man7/unix.7:556
18434 msgid ""
18435 "In addition, some implementations don't require a null terminator when "
18436 "binding a socket (the I<addrlen> argument is used to determine the length of "
18437 "I<sun_path>)  and when the socket address is retrieved on these "
18438 "implementations, there is no null terminator in I<sun_path>."
18439 msgstr ""
18440
18441 #. type: Plain text
18442 #: build/C/man7/unix.7:561
18443 msgid ""
18444 "Applications that retrieve socket addresses can (portably) code to handle "
18445 "the possibility that there is no null terminator in I<sun_path> by "
18446 "respecting the fact that the number of valid bytes in the pathname is:"
18447 msgstr ""
18448
18449 #.  The following patch to amend kernel behavior was rejected:
18450 #.  http://thread.gmane.org/gmane.linux.kernel.api/2437
18451 #.  Subject: [patch] Fix handling of overlength pathname in AF_UNIX sun_path
18452 #.  2012-04-17
18453 #.  And there was a related discussion in the Austin list:
18454 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/5735
18455 #.  Subject: Having a sun_path with no null terminator
18456 #.  2012-04-18
18457 #
18458 #.  FIXME . Track http://austingroupbugs.net/view.php?id=561
18459 #. type: Plain text
18460 #: build/C/man7/unix.7:573
18461 #, no-wrap
18462 msgid "    strnlen(addr.sun_path, addrlen - offsetof(sockaddr_un, sun_path))\n"
18463 msgstr ""
18464
18465 #. type: Plain text
18466 #: build/C/man7/unix.7:585
18467 msgid ""
18468 "Alternatively, an application can retrieve the socket address by allocating "
18469 "a buffer of size I<sizeof(struct sockaddr_un)+1> that is zeroed out before "
18470 "the retrieval.  The retrieving call can specify I<addrlen> as "
18471 "I<sizeof(struct sockaddr_un)>, and the extra zero byte ensures that there "
18472 "will be a null terminator for the string returned in I<sun_path>:"
18473 msgstr ""
18474
18475 #. type: Plain text
18476 #: build/C/man7/unix.7:589
18477 #, no-wrap
18478 msgid "void *addrp;\n"
18479 msgstr ""
18480
18481 #. type: Plain text
18482 #: build/C/man7/unix.7:595
18483 #, no-wrap
18484 msgid ""
18485 "addrlen = sizeof(struct sockaddr_un);\n"
18486 "addrp = malloc(addrlen + 1);\n"
18487 "if (addrp == NULL)\n"
18488 "    /* Handle error */ ;\n"
18489 "memset(addrp, 0, addrlen + 1);\n"
18490 msgstr ""
18491
18492 #. type: Plain text
18493 #: build/C/man7/unix.7:598
18494 #, no-wrap
18495 msgid ""
18496 "if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == -1)\n"
18497 "    /* handle error */ ;\n"
18498 msgstr ""
18499
18500 #. type: Plain text
18501 #: build/C/man7/unix.7:600
18502 #, no-wrap
18503 msgid ""
18504 "printf(\"sun_path = %s\\en\", ((struct sockaddr_un *) "
18505 "addrp)-E<gt>sun_path);\n"
18506 msgstr ""
18507
18508 #. type: Plain text
18509 #: build/C/man7/unix.7:608
18510 msgid ""
18511 "This sort of messiness can be avoided if it is guaranteed that the "
18512 "applications that I<create> pathname sockets follow the rules outlined above "
18513 "under I<Pathname sockets>."
18514 msgstr ""
18515
18516 #. type: Plain text
18517 #: build/C/man7/unix.7:611
18518 msgid "See B<bind>(2)."
18519 msgstr ""
18520
18521 #. type: Plain text
18522 #: build/C/man7/unix.7:616
18523 msgid "For an example of the use of B<SCM_RIGHTS> see B<cmsg>(3)."
18524 msgstr ""
18525
18526 #. type: Plain text
18527 #: build/C/man7/unix.7:625
18528 msgid ""
18529 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
18530 "B<capabilities>(7), B<credentials>(7), B<socket>(7)"
18531 msgstr ""
18532
18533 #. type: TH
18534 #: build/C/man7/x25.7:12
18535 #, no-wrap
18536 msgid "X25"
18537 msgstr ""
18538
18539 #. type: Plain text
18540 #: build/C/man7/x25.7:15
18541 msgid "x25 - ITU-T X.25 / ISO-8208 protocol interface."
18542 msgstr ""
18543
18544 #. type: Plain text
18545 #: build/C/man7/x25.7:19
18546 msgid "B<#include E<lt>linux/x25.hE<gt>>"
18547 msgstr ""
18548
18549 #. type: Plain text
18550 #: build/C/man7/x25.7:21
18551 msgid "B<x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);>"
18552 msgstr ""
18553
18554 #. type: Plain text
18555 #: build/C/man7/x25.7:30
18556 msgid ""
18557 "X25 sockets provide an interface to the X.25 packet layer protocol.  This "
18558 "allows applications to communicate over a public X.25 data network as "
18559 "standardized by International Telecommunication Union's recommendation X.25 "
18560 "(X.25 DTE-DCE mode).  X25 sockets can also be used for communication without "
18561 "an intermediate X.25 network (X.25 DTE-DTE mode) as described in ISO-8208."
18562 msgstr ""
18563
18564 #. type: Plain text
18565 #: build/C/man7/x25.7:47
18566 msgid ""
18567 "Message boundaries are preserved \\(em a B<read>(2)  from a socket will "
18568 "retrieve the same chunk of data as output with the corresponding B<write>(2)  "
18569 "to the peer socket.  When necessary, the kernel takes care of segmenting and "
18570 "reassembling long messages by means of the X.25 M-bit.  There is no "
18571 "hard-coded upper limit for the message size.  However, reassembling of a "
18572 "long message might fail if there is a temporary lack of system resources or "
18573 "when other constraints (such as socket memory or buffer size limits) become "
18574 "effective.  If that occurs, the X.25 connection will be reset."
18575 msgstr ""
18576
18577 #. type: SS
18578 #: build/C/man7/x25.7:47
18579 #, no-wrap
18580 msgid "Socket addresses"
18581 msgstr ""
18582
18583 #. type: Plain text
18584 #: build/C/man7/x25.7:54
18585 msgid ""
18586 "The B<AF_X25> socket address family uses the I<struct sockaddr_x25> for "
18587 "representing network addresses as defined in ITU-T recommendation X.121."
18588 msgstr ""
18589
18590 #. type: Plain text
18591 #: build/C/man7/x25.7:61
18592 #, no-wrap
18593 msgid ""
18594 "struct sockaddr_x25 {\n"
18595 "    sa_family_t sx25_family;    /* must be AF_X25 */\n"
18596 "    x25_address sx25_addr;      /* X.121 Address */\n"
18597 "};\n"
18598 msgstr ""
18599
18600 #. type: Plain text
18601 #: build/C/man7/x25.7:72
18602 msgid ""
18603 "I<sx25_addr> contains a char array I<x25_addr[]> to be interpreted as a "
18604 "null-terminated string.  I<sx25_addr.x25_addr[]> consists of up to 15 (not "
18605 "counting the terminating null byte) ASCII characters forming the X.121 "
18606 "address.  Only the decimal digit characters from \\(aq0\\(aq to \\(aq9\\(aq "
18607 "are allowed."
18608 msgstr ""
18609
18610 #. type: Plain text
18611 #: build/C/man7/x25.7:81
18612 msgid ""
18613 "The following X.25-specific socket options can be set by using "
18614 "B<setsockopt>(2)  and read with B<getsockopt>(2)  with the I<level> argument "
18615 "set to B<SOL_X25>."
18616 msgstr ""
18617
18618 #. type: TP
18619 #: build/C/man7/x25.7:81
18620 #, no-wrap
18621 msgid "B<X25_QBITINCL>"
18622 msgstr ""
18623
18624 #. type: Plain text
18625 #: build/C/man7/x25.7:100
18626 msgid ""
18627 "Controls whether the X.25 Q-bit (Qualified Data Bit) is accessible by the "
18628 "user.  It expects an integer argument.  If set to 0 (default), the Q-bit is "
18629 "never set for outgoing packets and the Q-bit of incoming packets is "
18630 "ignored.  If set to 1, an additional first byte is prepended to each message "
18631 "read from or written to the socket.  For data read from the socket, a 0 "
18632 "first byte indicates that the Q-bits of the corresponding incoming data "
18633 "packets were not set.  A first byte with value 1 indicates that the Q-bit of "
18634 "the corresponding incoming data packets was set.  If the first byte of the "
18635 "data written to the socket is 1, the Q-bit of the corresponding outgoing "
18636 "data packets will be set.  If the first byte is 0, the Q-bit will not be "
18637 "set."
18638 msgstr ""
18639
18640 #. type: Plain text
18641 #: build/C/man7/x25.7:102
18642 msgid "The AF_X25 protocol family is a new feature of Linux 2.2."
18643 msgstr ""
18644
18645 #. type: Plain text
18646 #: build/C/man7/x25.7:105
18647 msgid "Plenty, as the X.25 PLP implementation is B<CONFIG_EXPERIMENTAL>."
18648 msgstr ""
18649
18650 #. type: Plain text
18651 #: build/C/man7/x25.7:107
18652 msgid "This man page is incomplete."
18653 msgstr ""
18654
18655 #. type: Plain text
18656 #: build/C/man7/x25.7:114
18657 msgid ""
18658 "There is no dedicated application programmer's header file yet; you need to "
18659 "include the kernel header file I<E<lt>linux/x25.hE<gt>>.  "
18660 "B<CONFIG_EXPERIMENTAL> might also imply that future versions of the "
18661 "interface are not binary compatible."
18662 msgstr ""
18663
18664 #. type: Plain text
18665 #: build/C/man7/x25.7:118
18666 msgid ""
18667 "X.25 N-Reset events are not propagated to the user process yet.  Thus, if a "
18668 "reset occurred, data might be lost without notice."
18669 msgstr ""
18670
18671 #. type: Plain text
18672 #: build/C/man7/x25.7:121
18673 msgid "B<socket>(2), B<socket>(7)"
18674 msgstr ""
18675
18676 #. type: Plain text
18677 #: build/C/man7/x25.7:127
18678 msgid ""
18679 "Jonathan Simon Naylor: \\(lqThe Re-Analysis and Re-Implementation of "
18680 "X.25.\\(rq The URL is E<.UR "
18681 "ftp://ftp.pspt.fi\\:/pub\\:/ham\\:/linux\\:/ax25\\:/x25doc.tgz> E<.UE .>"
18682 msgstr ""