OSDN Git Service

LDP: Update POT and ja.po to LDP v3.68
[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: 2014-06-08 01:30+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_ntop.3:26 build/C/man3/inet_pton.3:27 build/C/man3/inet_net_pton.3:26 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:18 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:43 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_ntop.3:26 build/C/man3/inet_pton.3:27 build/C/man3/inet_net_pton.3:26 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:18 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:44 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_ntop.3:27 build/C/man3/inet_pton.3:28 build/C/man3/inet_net_pton.3:27 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:19 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:75 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_ntop.3:36 build/C/man3/inet_pton.3:36 build/C/man3/inet_net_pton.3:61 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:29 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:1126 build/C/man7/udp.7:202 build/C/man7/unix.7:284
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:363 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:1243 build/C/man7/udp.7:251 build/C/man7/udplite.7:132 build/C/man7/unix.7:401 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:145 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:402 build/C/man7/netdevice.7:359 build/C/man7/packet.7:613 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:1250 build/C/man7/udplite.7:134 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:217 build/C/man7/ddp.7:249 build/C/man3/endian.3:151 build/C/man3/ether_aton.3:149 build/C/man5/gai.conf.5:93 build/C/man3/getaddrinfo.3:827 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_ntop.3:118 build/C/man3/inet_pton.3:215 build/C/man3/inet_net_pton.3:390 build/C/man7/ip.7:1272 build/C/man7/ipv6.7:413 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:644 build/C/man5/protocols.5:81 build/C/man7/raw.7:269 build/C/man3/rcmd.3:285 build/C/man5/resolv.conf.5:290 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:1262 build/C/man7/udp.7:256 build/C/man7/udplite.7:146 build/C/man7/unix.7:445 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:222 build/C/man7/ddp.7:254 build/C/man3/endian.3:153 build/C/man3/ether_aton.3:151 build/C/man5/gai.conf.5:96 build/C/man3/getaddrinfo.3:837 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_ntop.3:122 build/C/man3/inet_pton.3:219 build/C/man3/inet_net_pton.3:393 build/C/man7/ip.7:1290 build/C/man7/ipv6.7:420 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:667 build/C/man5/protocols.5:86 build/C/man7/raw.7:282 build/C/man3/rcmd.3:293 build/C/man5/resolv.conf.5:297 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:1288 build/C/man7/udp.7:267 build/C/man7/udplite.7:156 build/C/man7/unix.7:454 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:230 build/C/man7/ddp.7:262 build/C/man3/endian.3:161 build/C/man3/ether_aton.3:159 build/C/man5/gai.conf.5:104 build/C/man3/getaddrinfo.3:845 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_ntop.3:130 build/C/man3/inet_pton.3:227 build/C/man3/inet_net_pton.3:401 build/C/man7/ip.7:1298 build/C/man7/ipv6.7:428 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:675 build/C/man5/protocols.5:94 build/C/man7/raw.7:290 build/C/man3/rcmd.3:301 build/C/man5/resolv.conf.5:305 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:1296 build/C/man7/udp.7:275 build/C/man7/udplite.7:164 build/C/man7/unix.7:462 build/C/man7/x25.7:135
577 msgid ""
578 "This page is part of release 3.68 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:43 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:47 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_ntop.3:29 build/C/man3/inet_pton.3:30 build/C/man3/inet_net_pton.3:29 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:21 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_ntop.3:32 build/C/man3/inet_pton.3:33 build/C/man3/inet_net_pton.3:32
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/ether_aton.3:128 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:143 build/C/man3/getaddrinfo.3:594 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_ntop.3:100 build/C/man3/inet_pton.3:129 build/C/man3/inet_net_pton.3:159 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/man7/ddp.7:12
730 #, no-wrap
731 msgid "2008-11-20"
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:23 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 the SUSv2.  B<CMSG_ALIGN>()  "
880 "is a 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:599 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_pton.3:131 build/C/man3/inet_net_pton.3:165 build/C/man7/ip.7:1183 build/C/man7/ipv6.7:392 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:550 build/C/man7/raw.7:187 build/C/man3/setnetgrent.3:103 build/C/man2/shutdown.2:95 build/C/man7/unix.7:407
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:622 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_ntop.3:115 build/C/man3/inet_pton.3:156 build/C/man3/inet_net_pton.3:247 build/C/man5/nss.5:100 build/C/man7/unix.7:437
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:203
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 "char buf[CMSG_SPACE(sizeof myfds)];  /* ancillary data buffer */\n"
963 "int *fdptr;\n"
964 msgstr ""
965
966 #. type: Plain text
967 #: build/C/man3/cmsg.3:215
968 #, no-wrap
969 msgid ""
970 "msg.msg_control = buf;\n"
971 "msg.msg_controllen = sizeof buf;\n"
972 "cmsg = CMSG_FIRSTHDR(&msg);\n"
973 "cmsg-E<gt>cmsg_level = SOL_SOCKET;\n"
974 "cmsg-E<gt>cmsg_type = SCM_RIGHTS;\n"
975 "cmsg-E<gt>cmsg_len = CMSG_LEN(sizeof(int) * NUM_FD);\n"
976 "/* Initialize the payload: */\n"
977 "fdptr = (int *) CMSG_DATA(cmsg);\n"
978 "memcpy(fdptr, myfds, NUM_FD * sizeof(int));\n"
979 "/* Sum of the length of all control messages in the buffer: */\n"
980 "msg.msg_controllen = cmsg-E<gt>cmsg_len;\n"
981 msgstr ""
982
983 #. type: Plain text
984 #: build/C/man3/cmsg.3:220
985 msgid "B<recvmsg>(2), B<sendmsg>(2)"
986 msgstr ""
987
988 #. type: Plain text
989 #: build/C/man3/cmsg.3:222
990 msgid "RFC\\ 2292"
991 msgstr ""
992
993 #. type: TH
994 #: build/C/man7/ddp.7:12
995 #, no-wrap
996 msgid "DDP"
997 msgstr ""
998
999 #. type: Plain text
1000 #: build/C/man7/ddp.7:15
1001 msgid "ddp - Linux AppleTalk protocol implementation"
1002 msgstr ""
1003
1004 #. type: Plain text
1005 #: build/C/man7/ddp.7:19
1006 msgid "B<#include E<lt>netatalk/at.hE<gt>>"
1007 msgstr ""
1008
1009 #. type: Plain text
1010 #: build/C/man7/ddp.7:21
1011 msgid "I<ddp_socket>B< = socket(AF_APPLETALK, SOCK_DGRAM, 0);>"
1012 msgstr ""
1013
1014 #. type: Plain text
1015 #: build/C/man7/ddp.7:23
1016 msgid "I<raw_socket>B< = socket(AF_APPLETALK, SOCK_RAW, >I<protocol>B<);>"
1017 msgstr ""
1018
1019 #. type: Plain text
1020 #: build/C/man7/ddp.7:34
1021 msgid ""
1022 "Linux implements the AppleTalk protocols described in I<Inside AppleTalk>.  "
1023 "Only the DDP layer and AARP are present in the kernel.  They are designed to "
1024 "be used via the B<netatalk> protocol libraries.  This page documents the "
1025 "interface for those who wish or need to use the DDP layer directly."
1026 msgstr ""
1027
1028 #. type: Plain text
1029 #: build/C/man7/ddp.7:39
1030 msgid ""
1031 "The communication between AppleTalk and the user program works using a "
1032 "BSD-compatible socket interface.  For more information on sockets, see "
1033 "B<socket>(7)."
1034 msgstr ""
1035
1036 #. type: Plain text
1037 #: build/C/man7/ddp.7:60
1038 msgid ""
1039 "An AppleTalk socket is created by calling the B<socket>(2)  function with a "
1040 "B<AF_APPLETALK> socket family argument.  Valid socket types are "
1041 "B<SOCK_DGRAM> to open a B<ddp> socket or B<SOCK_RAW> to open a B<raw> "
1042 "socket.  I<protocol> is the AppleTalk protocol to be received or sent.  For "
1043 "B<SOCK_RAW> you must specify B<ATPROTO_DDP>."
1044 msgstr ""
1045
1046 #. type: Plain text
1047 #: build/C/man7/ddp.7:65
1048 msgid ""
1049 "Raw sockets may be opened only by a process with effective user ID 0 or when "
1050 "the process has the B<CAP_NET_RAW> capability."
1051 msgstr ""
1052
1053 #. type: SS
1054 #: 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:55
1055 #, no-wrap
1056 msgid "Address format"
1057 msgstr ""
1058
1059 #. type: Plain text
1060 #: build/C/man7/ddp.7:68
1061 msgid ""
1062 "An AppleTalk socket address is defined as a combination of a network number, "
1063 "a node number, and a port number."
1064 msgstr ""
1065
1066 #. type: Plain text
1067 #: build/C/man7/ddp.7:75
1068 #, no-wrap
1069 msgid ""
1070 "struct at_addr {\n"
1071 "    unsigned short s_net;\n"
1072 "    unsigned char  s_node;\n"
1073 "};\n"
1074 msgstr ""
1075
1076 #. type: Plain text
1077 #: build/C/man7/ddp.7:81
1078 #, no-wrap
1079 msgid ""
1080 "struct sockaddr_atalk {\n"
1081 "    sa_family_t    sat_family;    /* address family */\n"
1082 "    unsigned char  sat_port;      /* port */\n"
1083 "    struct at_addr sat_addr;      /* net/node */\n"
1084 "};\n"
1085 msgstr ""
1086
1087 #.  FIXME this doesn't make sense [johnl]
1088 #. type: Plain text
1089 #: build/C/man7/ddp.7:120
1090 msgid ""
1091 "I<sat_family> is always set to B<AF_APPLETALK>.  I<sat_port> contains the "
1092 "port.  The port numbers below 129 are known as I<reserved ports>.  Only "
1093 "processes with the effective user ID 0 or the B<CAP_NET_BIND_SERVICE> "
1094 "capability may B<bind>(2)  to these sockets.  I<sat_addr> is the host "
1095 "address.  The I<net> member of I<struct at_addr> contains the host network "
1096 "in network byte order.  The value of B<AT_ANYNET> is a wildcard and also "
1097 "implies \\(lqthis network.\\(rq The I<node> member of I<struct at_addr> "
1098 "contains the host node number.  The value of B<AT_ANYNODE> is a wildcard and "
1099 "also implies \\(lqthis node.\\(rq The value of B<ATADDR_BCAST> is a link "
1100 "local broadcast address."
1101 msgstr ""
1102
1103 #. type: SS
1104 #: 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:888 build/C/man7/udp.7:178 build/C/man7/udplite.7:67 build/C/man7/unix.7:137 build/C/man7/x25.7:72
1105 #, no-wrap
1106 msgid "Socket options"
1107 msgstr ""
1108
1109 #. type: Plain text
1110 #: build/C/man7/ddp.7:122
1111 msgid "No protocol-specific socket options are supported."
1112 msgstr ""
1113
1114 #. type: Plain text
1115 #: build/C/man7/ddp.7:128
1116 msgid ""
1117 "IP supports a set of I</proc> interfaces to configure some global AppleTalk "
1118 "parameters.  The parameters can be accessed by reading or writing files in "
1119 "the directory I</proc/sys/net/atalk/>."
1120 msgstr ""
1121
1122 #. type: TP
1123 #: build/C/man7/ddp.7:128
1124 #, no-wrap
1125 msgid "I<aarp-expiry-time>"
1126 msgstr ""
1127
1128 #. type: Plain text
1129 #: build/C/man7/ddp.7:131
1130 msgid "The time interval (in seconds) before an AARP cache entry expires."
1131 msgstr ""
1132
1133 #. type: TP
1134 #: build/C/man7/ddp.7:131
1135 #, no-wrap
1136 msgid "I<aarp-resolve-time>"
1137 msgstr ""
1138
1139 #. type: Plain text
1140 #: build/C/man7/ddp.7:134
1141 msgid "The time interval (in seconds) before an AARP cache entry is resolved."
1142 msgstr ""
1143
1144 #. type: TP
1145 #: build/C/man7/ddp.7:134
1146 #, no-wrap
1147 msgid "I<aarp-retransmit-limit>"
1148 msgstr ""
1149
1150 #. type: Plain text
1151 #: build/C/man7/ddp.7:138
1152 msgid ""
1153 "The number of retransmissions of an AARP query before the node is declared "
1154 "dead."
1155 msgstr ""
1156
1157 #. type: TP
1158 #: build/C/man7/ddp.7:138
1159 #, no-wrap
1160 msgid "I<aarp-tick-time>"
1161 msgstr ""
1162
1163 #. type: Plain text
1164 #: build/C/man7/ddp.7:141
1165 msgid "The timer rate (in seconds) for the timer driving AARP."
1166 msgstr ""
1167
1168 #. type: Plain text
1169 #: build/C/man7/ddp.7:144
1170 msgid ""
1171 "The default values match the specification and should never need to be "
1172 "changed."
1173 msgstr ""
1174
1175 #.  FIXME Add a section about multicasting
1176 #. type: Plain text
1177 #: build/C/man7/ddp.7:149
1178 msgid "All ioctls described in B<socket>(7)  apply to DDP."
1179 msgstr ""
1180
1181 #. type: SH
1182 #: 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_ntop.3:91 build/C/man3/inet_net_pton.3:145 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:1225 build/C/man7/udp.7:241 build/C/man7/udplite.7:121 build/C/man7/unix.7:322
1183 #, no-wrap
1184 msgid "ERRORS"
1185 msgstr ""
1186
1187 #. type: TP
1188 #: build/C/man7/ddp.7:153 build/C/man7/ip.7:1096 build/C/man7/raw.7:145
1189 #, no-wrap
1190 msgid "B<EACCES>"
1191 msgstr ""
1192
1193 #. type: Plain text
1194 #: build/C/man7/ddp.7:160
1195 msgid ""
1196 "The user tried to execute an operation without the necessary permissions.  "
1197 "These include sending to a broadcast address without having the broadcast "
1198 "flag set, and trying to bind to a reserved port without effective user ID 0 "
1199 "or B<CAP_NET_BIND_SERVICE>."
1200 msgstr ""
1201
1202 #. type: TP
1203 #: build/C/man7/ddp.7:160 build/C/man7/ip.7:1112 build/C/man7/unix.7:323
1204 #, no-wrap
1205 msgid "B<EADDRINUSE>"
1206 msgstr ""
1207
1208 #. type: Plain text
1209 #: build/C/man7/ddp.7:163 build/C/man7/ip.7:1115
1210 msgid "Tried to bind to an address already in use."
1211 msgstr ""
1212
1213 #. type: TP
1214 #: build/C/man7/ddp.7:163 build/C/man7/ip.7:1115 build/C/man7/packet.7:497
1215 #, no-wrap
1216 msgid "B<EADDRNOTAVAIL>"
1217 msgstr ""
1218
1219 #. type: Plain text
1220 #: build/C/man7/ddp.7:167 build/C/man7/ip.7:1119
1221 msgid ""
1222 "A nonexistent interface was requested or the requested source address was "
1223 "not local."
1224 msgstr ""
1225
1226 #. type: TP
1227 #: build/C/man7/ddp.7:167 build/C/man7/ip.7:1119
1228 #, no-wrap
1229 msgid "B<EAGAIN>"
1230 msgstr ""
1231
1232 #. type: Plain text
1233 #: build/C/man7/ddp.7:170 build/C/man7/ip.7:1122
1234 msgid "Operation on a nonblocking socket would block."
1235 msgstr ""
1236
1237 #. type: TP
1238 #: build/C/man7/ddp.7:170 build/C/man7/ip.7:1122
1239 #, no-wrap
1240 msgid "B<EALREADY>"
1241 msgstr ""
1242
1243 #. type: Plain text
1244 #: build/C/man7/ddp.7:173
1245 msgid "A connection operation on a nonblocking socket is already in progress."
1246 msgstr ""
1247
1248 #. type: TP
1249 #: build/C/man7/ddp.7:173 build/C/man7/ip.7:1125
1250 #, no-wrap
1251 msgid "B<ECONNABORTED>"
1252 msgstr ""
1253
1254 #. type: Plain text
1255 #: build/C/man7/ddp.7:177 build/C/man7/ip.7:1129
1256 msgid "A connection was closed during an B<accept>(2)."
1257 msgstr ""
1258
1259 #. type: TP
1260 #: build/C/man7/ddp.7:177 build/C/man7/ip.7:1129
1261 #, no-wrap
1262 msgid "B<EHOSTUNREACH>"
1263 msgstr ""
1264
1265 #. type: Plain text
1266 #: build/C/man7/ddp.7:180
1267 msgid "No routing table entry matches the destination address."
1268 msgstr ""
1269
1270 #. type: TP
1271 #: 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:339
1272 #, no-wrap
1273 msgid "B<EINVAL>"
1274 msgstr ""
1275
1276 #. type: Plain text
1277 #: build/C/man7/ddp.7:183
1278 msgid "Invalid argument passed."
1279 msgstr ""
1280
1281 #. type: TP
1282 #: build/C/man7/ddp.7:183 build/C/man7/ip.7:1140 build/C/man7/unix.7:348
1283 #, no-wrap
1284 msgid "B<EISCONN>"
1285 msgstr ""
1286
1287 #. type: Plain text
1288 #: build/C/man7/ddp.7:187 build/C/man7/ip.7:1144
1289 msgid "B<connect>(2)  was called on an already connected socket."
1290 msgstr ""
1291
1292 #. type: TP
1293 #: 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
1294 #, no-wrap
1295 msgid "B<EMSGSIZE>"
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: build/C/man7/ddp.7:190
1300 msgid "Datagram is bigger than the DDP MTU."
1301 msgstr ""
1302
1303 #. type: TP
1304 #: build/C/man7/ddp.7:190 build/C/man7/ipv6.7:353 build/C/man7/packet.7:515
1305 #, no-wrap
1306 msgid "B<ENODEV>"
1307 msgstr ""
1308
1309 #. type: Plain text
1310 #: build/C/man7/ddp.7:193
1311 msgid "Network device not available or not capable of sending IP."
1312 msgstr ""
1313
1314 #. type: TP
1315 #: 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:353
1316 #, no-wrap
1317 msgid "B<ENOENT>"
1318 msgstr ""
1319
1320 #. type: Plain text
1321 #: build/C/man7/ddp.7:197 build/C/man7/ip.7:1156
1322 msgid "B<SIOCGSTAMP> was called on a socket where no packet arrived."
1323 msgstr ""
1324
1325 #. type: TP
1326 #: build/C/man7/ddp.7:197
1327 #, no-wrap
1328 msgid "B<ENOMEM> and B<ENOBUFS>"
1329 msgstr ""
1330
1331 #. type: Plain text
1332 #: build/C/man7/ddp.7:200
1333 msgid "Not enough memory available."
1334 msgstr ""
1335
1336 #. type: TP
1337 #: build/C/man7/ddp.7:200 build/C/man7/ip.7:1156
1338 #, no-wrap
1339 msgid "B<ENOPKG>"
1340 msgstr ""
1341
1342 #. type: Plain text
1343 #: build/C/man7/ddp.7:203 build/C/man7/ip.7:1159
1344 msgid "A kernel subsystem was not configured."
1345 msgstr ""
1346
1347 #. type: TP
1348 #: build/C/man7/ddp.7:203 build/C/man7/ip.7:1159
1349 #, no-wrap
1350 msgid "B<ENOPROTOOPT> and B<EOPNOTSUPP>"
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: build/C/man7/ddp.7:206 build/C/man7/ip.7:1162
1355 msgid "Invalid socket option passed."
1356 msgstr ""
1357
1358 #. type: TP
1359 #: 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:361
1360 #, no-wrap
1361 msgid "B<ENOTCONN>"
1362 msgstr ""
1363
1364 #. type: Plain text
1365 #: build/C/man7/ddp.7:210 build/C/man7/ip.7:1166
1366 msgid ""
1367 "The operation is defined only on a connected socket, but the socket wasn't "
1368 "connected."
1369 msgstr ""
1370
1371 #. type: TP
1372 #: 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:368
1373 #, no-wrap
1374 msgid "B<EPERM>"
1375 msgstr ""
1376
1377 #. type: Plain text
1378 #: build/C/man7/ddp.7:215
1379 msgid ""
1380 "User doesn't have permission to set high priority, make a configuration "
1381 "change, or send signals to the requested process or group."
1382 msgstr ""
1383
1384 #. type: TP
1385 #: build/C/man7/ddp.7:215 build/C/man7/ip.7:1170 build/C/man7/tcp.7:1232 build/C/man7/unix.7:372
1386 #, no-wrap
1387 msgid "B<EPIPE>"
1388 msgstr ""
1389
1390 #. type: Plain text
1391 #: build/C/man7/ddp.7:218 build/C/man7/ip.7:1173
1392 msgid "The connection was unexpectedly closed or shut down by the other end."
1393 msgstr ""
1394
1395 #. type: TP
1396 #: build/C/man7/ddp.7:218 build/C/man7/ip.7:1173 build/C/man7/unix.7:394
1397 #, no-wrap
1398 msgid "B<ESOCKTNOSUPPORT>"
1399 msgstr ""
1400
1401 #. type: Plain text
1402 #: build/C/man7/ddp.7:221
1403 msgid "The socket was unconfigured, or an unknown socket type was requested."
1404 msgstr ""
1405
1406 #. type: Plain text
1407 #: build/C/man7/ddp.7:226
1408 msgid ""
1409 "AppleTalk is supported by Linux 2.0 or higher.  The I</proc> interfaces "
1410 "exist since Linux 2.2."
1411 msgstr ""
1412
1413 #. type: Plain text
1414 #: build/C/man7/ddp.7:232
1415 msgid ""
1416 "Be very careful with the B<SO_BROADCAST> option - it is not privileged in "
1417 "Linux.  It is easy to overload the network with careless sending to "
1418 "broadcast addresses."
1419 msgstr ""
1420
1421 #. type: SS
1422 #: build/C/man7/ddp.7:232 build/C/man7/ip.7:1232 build/C/man7/packet.7:581
1423 #, no-wrap
1424 msgid "Compatibility"
1425 msgstr ""
1426
1427 #. type: Plain text
1428 #: build/C/man7/ddp.7:239
1429 msgid ""
1430 "The basic AppleTalk socket interface is compatible with B<netatalk> on "
1431 "BSD-derived systems.  Many BSD systems fail to check B<SO_BROADCAST> when "
1432 "sending broadcast frames; this can lead to compatibility problems."
1433 msgstr ""
1434
1435 #. type: Plain text
1436 #: build/C/man7/ddp.7:244
1437 msgid ""
1438 "The raw socket mode is unique to Linux and exists to support the alternative "
1439 "CAP package and AppleTalk monitoring tools more easily."
1440 msgstr ""
1441
1442 #. type: Plain text
1443 #: build/C/man7/ddp.7:246 build/C/man7/ip.7:1247
1444 msgid "There are too many inconsistent error values."
1445 msgstr ""
1446
1447 #. type: Plain text
1448 #: build/C/man7/ddp.7:249
1449 msgid ""
1450 "The ioctls used to configure routing tables, devices, AARP tables and other "
1451 "devices are not yet described."
1452 msgstr ""
1453
1454 #. type: Plain text
1455 #: build/C/man7/ddp.7:254
1456 msgid "B<recvmsg>(2), B<sendmsg>(2), B<capabilities>(7), B<socket>(7)"
1457 msgstr ""
1458
1459 #. type: TH
1460 #: build/C/man3/endian.3:28
1461 #, no-wrap
1462 msgid "ENDIAN"
1463 msgstr ""
1464
1465 #. type: TH
1466 #: 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
1467 #, no-wrap
1468 msgid "2010-09-10"
1469 msgstr ""
1470
1471 #. type: Plain text
1472 #: build/C/man3/endian.3:33
1473 msgid ""
1474 "htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, "
1475 "htobe64, htole64, be64toh, le64toh - convert values between host and "
1476 "big-/little-endian byte order"
1477 msgstr ""
1478
1479 #. type: Plain text
1480 #: build/C/man3/endian.3:37
1481 #, no-wrap
1482 msgid ""
1483 "B<#define _BSD_SOURCE>             /* See feature_test_macros(7) */\n"
1484 "B<#include E<lt>endian.hE<gt>>\n"
1485 msgstr ""
1486
1487 #. type: Plain text
1488 #: build/C/man3/endian.3:42
1489 #, no-wrap
1490 msgid ""
1491 "B<uint16_t htobe16(uint16_t >I<host_16bits>B<);>\n"
1492 "B<uint16_t htole16(uint16_t >I<host_16bits>B<);>\n"
1493 "B<uint16_t be16toh(uint16_t >I<big_endian_16bits>B<);>\n"
1494 "B<uint16_t le16toh(uint16_t >I<little_endian_16bits>B<);>\n"
1495 msgstr ""
1496
1497 #. type: Plain text
1498 #: build/C/man3/endian.3:47
1499 #, no-wrap
1500 msgid ""
1501 "B<uint32_t htobe32(uint32_t >I<host_32bits>B<);>\n"
1502 "B<uint32_t htole32(uint32_t >I<host_32bits>B<);>\n"
1503 "B<uint32_t be32toh(uint32_t >I<big_endian_32bits>B<);>\n"
1504 "B<uint32_t le32toh(uint32_t >I<little_endian_32bits>B<);>\n"
1505 msgstr ""
1506
1507 #. type: Plain text
1508 #: build/C/man3/endian.3:52
1509 #, no-wrap
1510 msgid ""
1511 "B<uint64_t htobe64(uint64_t >I<host_64bits>B<);>\n"
1512 "B<uint64_t htole64(uint64_t >I<host_64bits>B<);>\n"
1513 "B<uint64_t be64toh(uint64_t >I<big_endian_64bits>B<);>\n"
1514 "B<uint64_t le64toh(uint64_t >I<little_endian_64bits>B<);>\n"
1515 msgstr ""
1516
1517 #. type: Plain text
1518 #: build/C/man3/endian.3:57
1519 msgid ""
1520 "These functions convert the byte encoding of integer values from the byte "
1521 "order that the current CPU (the \"host\") uses, to and from little-endian "
1522 "and big-endian byte order."
1523 msgstr ""
1524
1525 #. type: Plain text
1526 #: build/C/man3/endian.3:62
1527 msgid ""
1528 "The number, I<nn>, in the name of each function indicates the size of "
1529 "integer handled by the function, either 16, 32, or 64 bits."
1530 msgstr ""
1531
1532 #. type: Plain text
1533 #: build/C/man3/endian.3:65
1534 msgid ""
1535 "The functions with names of the form \"htobeI<nn>\" convert from host byte "
1536 "order to big-endian order."
1537 msgstr ""
1538
1539 #. type: Plain text
1540 #: build/C/man3/endian.3:68
1541 msgid ""
1542 "The functions with names of the form \"htoleI<nn>\" convert from host byte "
1543 "order to little-endian order."
1544 msgstr ""
1545
1546 #. type: Plain text
1547 #: build/C/man3/endian.3:71
1548 msgid ""
1549 "The functions with names of the form \"beI<nn>toh\" convert from big-endian "
1550 "order to host byte order."
1551 msgstr ""
1552
1553 #. type: Plain text
1554 #: build/C/man3/endian.3:74
1555 msgid ""
1556 "The functions with names of the form \"leI<nn>toh\" convert from "
1557 "little-endian order to host byte order."
1558 msgstr ""
1559
1560 #. type: Plain text
1561 #: build/C/man3/endian.3:76
1562 msgid "These functions were added to glibc in version 2.9."
1563 msgstr ""
1564
1565 #. type: Plain text
1566 #: build/C/man3/endian.3:91
1567 msgid ""
1568 "These functions are nonstandard.  Similar functions are present on the BSDs, "
1569 "where the required header file is I<E<lt>sys/endian.hE<gt>> instead of "
1570 "I<E<lt>endian.hE<gt>>.  Unfortunately, NetBSD, FreeBSD, and glibc haven't "
1571 "followed the original OpenBSD naming convention for these functions, whereby "
1572 "the I<nn> component always appears at the end of the function name (thus, "
1573 "for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs "
1574 "\"betoh32\" is \"be32toh\")."
1575 msgstr ""
1576
1577 #. type: Plain text
1578 #: build/C/man3/endian.3:99
1579 msgid ""
1580 "These functions are similar to the older B<byteorder>(3)  family of "
1581 "functions.  For example, B<be32toh>()  is identical to B<ntohl>()."
1582 msgstr ""
1583
1584 #. type: Plain text
1585 #: build/C/man3/endian.3:107
1586 msgid ""
1587 "The advantage of the B<byteorder>(3)  functions is that they are standard "
1588 "functions available on all UNIX systems.  On the other hand, the fact that "
1589 "they were designed for use in the context of TCP/IP means that they lack the "
1590 "64-bit and little-endian variants described in this page."
1591 msgstr ""
1592
1593 #. type: Plain text
1594 #: build/C/man3/endian.3:114
1595 msgid ""
1596 "The program below display the results of converting an integer from host "
1597 "byte order to both little-endian and big-endian byte order.  Since host byte "
1598 "order is either little-endian or big-endian, only one of these conversions "
1599 "will have an effect.  When we run this program on a little-endian system "
1600 "such as x86-32, we see the following:"
1601 msgstr ""
1602
1603 #. type: Plain text
1604 #: build/C/man3/endian.3:121
1605 #, no-wrap
1606 msgid ""
1607 "$ B<./a.out>\n"
1608 "x.u32 = 0x44332211\n"
1609 "htole32(x.u32) = 0x44332211\n"
1610 "htobe32(x.u32) = 0x11223344\n"
1611 msgstr ""
1612
1613 #. type: SS
1614 #: 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_pton.3:173 build/C/man3/inet_net_pton.3:331
1615 #, no-wrap
1616 msgid "Program source"
1617 msgstr ""
1618
1619 #. type: Plain text
1620 #: build/C/man3/endian.3:130
1621 #, no-wrap
1622 msgid ""
1623 "#include E<lt>endian.hE<gt>\n"
1624 "#include E<lt>stdint.hE<gt>\n"
1625 "#include E<lt>stdio.hE<gt>\n"
1626 "#include E<lt>stdlib.hE<gt>\n"
1627 msgstr ""
1628
1629 #. type: Plain text
1630 #: build/C/man3/endian.3:138
1631 #, no-wrap
1632 msgid ""
1633 "int\n"
1634 "main(int argc, char *argv[])\n"
1635 "{\n"
1636 "    union {\n"
1637 "        uint32_t u32;\n"
1638 "        uint8_t arr[4];\n"
1639 "    } x;\n"
1640 msgstr ""
1641
1642 #. type: Plain text
1643 #: build/C/man3/endian.3:143
1644 #, no-wrap
1645 msgid ""
1646 "    x.arr[0] = 0x11;\t/* Lowest-address byte */\n"
1647 "    x.arr[1] = 0x22;\n"
1648 "    x.arr[2] = 0x33;\n"
1649 "    x.arr[3] = 0x44;\t/* Highest-address byte */\n"
1650 msgstr ""
1651
1652 #. type: Plain text
1653 #: build/C/man3/endian.3:147
1654 #, no-wrap
1655 msgid ""
1656 "    printf(\"x.u32 = 0x%x\\en\", x.u32);\n"
1657 "    printf(\"htole32(x.u32) = 0x%x\\en\", htole32(x.u32));\n"
1658 "    printf(\"htobe32(x.u32) = 0x%x\\en\", htobe32(x.u32));\n"
1659 msgstr ""
1660
1661 #. type: Plain text
1662 #: build/C/man3/endian.3:150 build/C/man3/getaddrinfo.3:826 build/C/man3/getprotoent_r.3:236 build/C/man3/getservent_r.3:240 build/C/man3/inet_pton.3:214 build/C/man3/inet_net_pton.3:389
1663 #, no-wrap
1664 msgid ""
1665 "    exit(EXIT_SUCCESS);\n"
1666 "}\n"
1667 msgstr ""
1668
1669 #. type: Plain text
1670 #: build/C/man3/endian.3:153
1671 msgid "B<byteorder>(3)"
1672 msgstr ""
1673
1674 #. type: TH
1675 #: build/C/man3/ether_aton.3:31
1676 #, no-wrap
1677 msgid "ETHER_ATON"
1678 msgstr ""
1679
1680 #. type: TH
1681 #: build/C/man3/ether_aton.3:31
1682 #, no-wrap
1683 msgid "2013-07-04"
1684 msgstr ""
1685
1686 #. type: Plain text
1687 #: build/C/man3/ether_aton.3:35
1688 msgid ""
1689 "ether_aton, ether_ntoa, ether_ntohost, ether_hostton, ether_line, "
1690 "ether_ntoa_r, ether_aton_r - Ethernet address manipulation routines"
1691 msgstr ""
1692
1693 #. type: Plain text
1694 #: build/C/man3/ether_aton.3:38
1695 #, no-wrap
1696 msgid "B<#include E<lt>netinet/ether.hE<gt>>\n"
1697 msgstr ""
1698
1699 #. type: Plain text
1700 #: build/C/man3/ether_aton.3:40
1701 #, no-wrap
1702 msgid "B<char *ether_ntoa(const struct ether_addr *>I<addr>B<);>\n"
1703 msgstr ""
1704
1705 #. type: Plain text
1706 #: build/C/man3/ether_aton.3:42
1707 #, no-wrap
1708 msgid "B<struct ether_addr *ether_aton(const char *>I<asc>B<);>\n"
1709 msgstr ""
1710
1711 #. type: Plain text
1712 #: build/C/man3/ether_aton.3:44
1713 #, no-wrap
1714 msgid ""
1715 "B<int ether_ntohost(char *>I<hostname>B<, const struct ether_addr "
1716 "*>I<addr>B<);>\n"
1717 msgstr ""
1718
1719 #. type: Plain text
1720 #: build/C/man3/ether_aton.3:46
1721 #, no-wrap
1722 msgid ""
1723 "B<int ether_hostton(const char *>I<hostname>B<, struct ether_addr "
1724 "*>I<addr>B<);>\n"
1725 msgstr ""
1726
1727 #. type: Plain text
1728 #: build/C/man3/ether_aton.3:49
1729 #, no-wrap
1730 msgid ""
1731 "B<int ether_line(const char *>I<line>B<, struct ether_addr *>I<addr>B<,>\n"
1732 "B<               char *>I<hostname>B<);>\n"
1733 msgstr ""
1734
1735 #. type: Plain text
1736 #: build/C/man3/ether_aton.3:51 build/C/man3/gethostbyname.3:70
1737 #, no-wrap
1738 msgid "/* GNU extensions */\n"
1739 msgstr ""
1740
1741 #. type: Plain text
1742 #: build/C/man3/ether_aton.3:53
1743 #, no-wrap
1744 msgid ""
1745 "B<char *ether_ntoa_r(const struct ether_addr *>I<addr>B<, char "
1746 "*>I<buf>B<);>\n"
1747 msgstr ""
1748
1749 #. type: Plain text
1750 #: build/C/man3/ether_aton.3:56
1751 #, no-wrap
1752 msgid ""
1753 "B<struct ether_addr *ether_aton_r(const char *>I<asc>B<,>\n"
1754 "B<                                struct ether_addr *>I<addr>B<);>\n"
1755 msgstr ""
1756
1757 #. type: Plain text
1758 #: build/C/man3/ether_aton.3:67
1759 msgid ""
1760 "B<ether_aton>()  converts the 48-bit Ethernet host address I<asc> from the "
1761 "standard hex-digits-and-colons notation into binary data in network byte "
1762 "order and returns a pointer to it in a statically allocated buffer, which "
1763 "subsequent calls will overwrite.  B<ether_aton>()  returns NULL if the "
1764 "address is invalid."
1765 msgstr ""
1766
1767 #. type: Plain text
1768 #: build/C/man3/ether_aton.3:76
1769 msgid ""
1770 "The B<ether_ntoa>()  function converts the Ethernet host address I<addr> "
1771 "given in network byte order to a string in standard hex-digits-and-colons "
1772 "notation, omitting leading zeros.  The string is returned in a statically "
1773 "allocated buffer, which subsequent calls will overwrite."
1774 msgstr ""
1775
1776 #. type: Plain text
1777 #: build/C/man3/ether_aton.3:83
1778 msgid ""
1779 "The B<ether_ntohost>()  function maps an Ethernet address to the "
1780 "corresponding hostname in I</etc/ethers> and returns nonzero if it cannot be "
1781 "found."
1782 msgstr ""
1783
1784 #. type: Plain text
1785 #: build/C/man3/ether_aton.3:90
1786 msgid ""
1787 "The B<ether_hostton>()  function maps a hostname to the corresponding "
1788 "Ethernet address in I</etc/ethers> and returns nonzero if it cannot be "
1789 "found."
1790 msgstr ""
1791
1792 #. type: Plain text
1793 #: build/C/man3/ether_aton.3:102
1794 msgid ""
1795 "The B<ether_line>()  function parses a line in I</etc/ethers> format "
1796 "(ethernet address followed by whitespace followed by hostname; \\(aq#\\(aq "
1797 "introduces a comment) and returns an address and hostname pair, or nonzero "
1798 "if it cannot be parsed.  The buffer pointed to by I<hostname> must be "
1799 "sufficiently long, for example, have the same length as I<line>."
1800 msgstr ""
1801
1802 #. type: Plain text
1803 #: build/C/man3/ether_aton.3:113
1804 msgid ""
1805 "The functions B<ether_ntoa_r>()  and B<ether_aton_r>()  are reentrant "
1806 "thread-safe versions of B<ether_ntoa>()  and B<ether_aton>()  respectively, "
1807 "and do not use static buffers."
1808 msgstr ""
1809
1810 #. type: Plain text
1811 #: build/C/man3/ether_aton.3:119
1812 msgid "The structure I<ether_addr> is defined in I<E<lt>net/ethernet.hE<gt>> as:"
1813 msgstr ""
1814
1815 #. type: Plain text
1816 #: build/C/man3/ether_aton.3:125
1817 #, no-wrap
1818 msgid ""
1819 "struct ether_addr {\n"
1820 "    uint8_t ether_addr_octet[6];\n"
1821 "}\n"
1822 msgstr ""
1823
1824 #. type: Plain text
1825 #: build/C/man3/ether_aton.3:134
1826 msgid "The B<ether_aton>()  and B<ether_ntoa>()  functions are not thread-safe."
1827 msgstr ""
1828
1829 #. type: Plain text
1830 #: build/C/man3/ether_aton.3:143
1831 msgid ""
1832 "The B<ether_ntohost>(), B<ether_hostton>(), B<ether_line>(), "
1833 "B<ether_ntoa_r>()  and B<ether_aton_r>()  functions are thread-safe."
1834 msgstr ""
1835
1836 #. type: Plain text
1837 #: build/C/man3/ether_aton.3:145
1838 msgid "4.3BSD, SunOS."
1839 msgstr ""
1840
1841 #. type: Plain text
1842 #: build/C/man3/ether_aton.3:149
1843 msgid "The glibc 2.2.5 implementation of B<ether_line>()  is broken."
1844 msgstr ""
1845
1846 #. type: Plain text
1847 #: build/C/man3/ether_aton.3:151
1848 msgid "B<ethers>(5)"
1849 msgstr ""
1850
1851 #. type: TH
1852 #: build/C/man5/gai.conf.5:19
1853 #, no-wrap
1854 msgid "GAI.CONF"
1855 msgstr ""
1856
1857 #. type: TH
1858 #: build/C/man5/gai.conf.5:19 build/C/man5/nss.5:19
1859 #, no-wrap
1860 msgid "2013-02-13"
1861 msgstr ""
1862
1863 #. type: Plain text
1864 #: build/C/man5/gai.conf.5:22
1865 msgid "gai.conf - getaddrinfo(3) configuration file"
1866 msgstr ""
1867
1868 #. type: Plain text
1869 #: build/C/man5/gai.conf.5:36
1870 msgid ""
1871 "A call to B<getaddrinfo>(3)  might return multiple answers.  According to "
1872 "RFC\\ 3484 these answers must be sorted so that the answer with the highest "
1873 "success rate is first in the list.  The RFC provides an algorithm for the "
1874 "sorting.  The static rules are not always adequate, though.  For this "
1875 "reason, the RFC also requires that system administrators should have the "
1876 "possibility to dynamically change the sorting.  For the glibc "
1877 "implementation, this can be achieved with the I</etc/gai.conf> file."
1878 msgstr ""
1879
1880 #. type: Plain text
1881 #: build/C/man5/gai.conf.5:40
1882 msgid ""
1883 "Each line in the configuration file consists of a keyword and its "
1884 "parameters.  White spaces in any place are ignored.  Lines starting with "
1885 "\\(aq#\\(aq are comments and are ignored."
1886 msgstr ""
1887
1888 #. type: Plain text
1889 #: build/C/man5/gai.conf.5:42
1890 msgid "The keywords currently recognized are:"
1891 msgstr ""
1892
1893 #. type: TP
1894 #: build/C/man5/gai.conf.5:42
1895 #, no-wrap
1896 msgid "B<label> I<netmask> I<precedence>"
1897 msgstr ""
1898
1899 #. type: Plain text
1900 #: build/C/man5/gai.conf.5:51
1901 msgid ""
1902 "The value is added to the label table used in the RFC\\ 3484 sorting.  If "
1903 "any B<label> definition is present in the configuration file is present, the "
1904 "default table is not used.  All the label definitions of the default table "
1905 "which are to be maintained have to be duplicated.  Following the keyword, "
1906 "the line has to contain a network mask and a label value."
1907 msgstr ""
1908
1909 #. type: TP
1910 #: build/C/man5/gai.conf.5:51
1911 #, no-wrap
1912 msgid "B<precedence> I<netmask> I<precedence>"
1913 msgstr ""
1914
1915 #. type: Plain text
1916 #: build/C/man5/gai.conf.5:58
1917 msgid ""
1918 "This keyword is similar to B<label>, but instead the value is added to the "
1919 "precedence table as specified in RFC\\ 3484.  Once again, the presence of a "
1920 "single B<precedence> line in the configuration file causes the default table "
1921 "to not be used."
1922 msgstr ""
1923
1924 #. type: TP
1925 #: build/C/man5/gai.conf.5:58
1926 #, no-wrap
1927 msgid "B<reload> E<lt>B<yes>|B<no>E<gt>"
1928 msgstr ""
1929
1930 #. type: Plain text
1931 #: build/C/man5/gai.conf.5:67
1932 msgid ""
1933 "This keyword controls whether a process checks whether the configuration "
1934 "file has been changed since the last time it was read.  If the value is "
1935 "\"B<yes>\", the file is reread.  This might cause problems in multithreaded "
1936 "applications and is generally a bad idea.  The default is \"B<no>\"."
1937 msgstr ""
1938
1939 #. type: TP
1940 #: build/C/man5/gai.conf.5:67
1941 #, no-wrap
1942 msgid "B<scopev4> I<mask> I<value>"
1943 msgstr ""
1944
1945 #. type: Plain text
1946 #: build/C/man5/gai.conf.5:72
1947 msgid ""
1948 "Add another rule to the RFC\\ 3484 scope table for IPv4 address.  By "
1949 "default, the scope IDs described in section 3.2 in RFC\\ 3438 are used.  "
1950 "Changing these defaults should hardly ever be necessary."
1951 msgstr ""
1952
1953 #. type: SH
1954 #: build/C/man5/gai.conf.5:72 build/C/man3/getaddrinfo.3:592 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:287 build/C/man3/resolver.3:267 build/C/man5/services.5:185 build/C/man3/setnetgrent.3:88 build/C/man7/udplite.7:126
1955 #, no-wrap
1956 msgid "FILES"
1957 msgstr ""
1958
1959 #. type: Plain text
1960 #: build/C/man5/gai.conf.5:74 build/C/man3/getaddrinfo.3:594
1961 msgid "I</etc/gai.conf>"
1962 msgstr ""
1963
1964 #. type: Plain text
1965 #: build/C/man5/gai.conf.5:77
1966 msgid ""
1967 "The default table according to RFC\\ 3484 would be specified with the "
1968 "following configuration file:"
1969 msgstr ""
1970
1971 #. type: Plain text
1972 #: build/C/man5/gai.conf.5:89
1973 #, no-wrap
1974 msgid ""
1975 "label  ::1/128       0\n"
1976 "label  ::/0          1\n"
1977 "label  2002::/16     2\n"
1978 "label ::/96          3\n"
1979 "label ::ffff:0:0/96  4\n"
1980 "precedence  ::1/128       50\n"
1981 "precedence  ::/0          40\n"
1982 "precedence  2002::/16     30\n"
1983 "precedence ::/96          20\n"
1984 "precedence ::ffff:0:0/96  10\n"
1985 msgstr ""
1986
1987 #. type: Plain text
1988 #: build/C/man5/gai.conf.5:96
1989 msgid "B<getaddrinfo>(3), RFC\\ 3484"
1990 msgstr ""
1991
1992 #. type: TH
1993 #: build/C/man3/getaddrinfo.3:43
1994 #, no-wrap
1995 msgid "GETADDRINFO"
1996 msgstr ""
1997
1998 #. type: TH
1999 #: build/C/man3/getaddrinfo.3:43
2000 #, no-wrap
2001 msgid "2014-04-06"
2002 msgstr ""
2003
2004 #. type: Plain text
2005 #: build/C/man3/getaddrinfo.3:47
2006 msgid ""
2007 "getaddrinfo, freeaddrinfo, gai_strerror - network address and service "
2008 "translation"
2009 msgstr ""
2010
2011 #. type: Plain text
2012 #: build/C/man3/getaddrinfo.3:52 build/C/man3/getipnodebyname.3:35
2013 #, no-wrap
2014 msgid ""
2015 "B<#include E<lt>sys/types.hE<gt>>\n"
2016 "B<#include E<lt>sys/socket.hE<gt>>\n"
2017 "B<#include E<lt>netdb.hE<gt>>\n"
2018 msgstr ""
2019
2020 #. type: Plain text
2021 #: build/C/man3/getaddrinfo.3:56
2022 #, no-wrap
2023 msgid ""
2024 "B<int getaddrinfo(const char *>I<node>B<, const char *>I<service>B<,>\n"
2025 "B<                const struct addrinfo *>I<hints>B<,>\n"
2026 "B<                struct addrinfo **>I<res>B<);>\n"
2027 msgstr ""
2028
2029 #. type: Plain text
2030 #: build/C/man3/getaddrinfo.3:58
2031 #, no-wrap
2032 msgid "B<void freeaddrinfo(struct addrinfo *>I<res>B<);>\n"
2033 msgstr ""
2034
2035 #. type: Plain text
2036 #: build/C/man3/getaddrinfo.3:60
2037 #, no-wrap
2038 msgid "B<const char *gai_strerror(int >I<errcode>B<);>\n"
2039 msgstr ""
2040
2041 #. type: Plain text
2042 #: build/C/man3/getaddrinfo.3:65 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
2043 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2044 msgstr ""
2045
2046 #. type: Plain text
2047 #: build/C/man3/getaddrinfo.3:71
2048 msgid "B<getaddrinfo>(), B<freeaddrinfo>(), B<gai_strerror>():"
2049 msgstr ""
2050
2051 #. type: Plain text
2052 #: build/C/man3/getaddrinfo.3:73
2053 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2054 msgstr ""
2055
2056 #.  .BR getipnodebyname (3),
2057 #.  .BR getipnodebyaddr (3),
2058 #. type: Plain text
2059 #: build/C/man3/getaddrinfo.3:100
2060 msgid ""
2061 "Given I<node> and I<service>, which identify an Internet host and a service, "
2062 "B<getaddrinfo>()  returns one or more I<addrinfo> structures, each of which "
2063 "contains an Internet address that can be specified in a call to B<bind>(2)  "
2064 "or B<connect>(2).  The B<getaddrinfo>()  function combines the functionality "
2065 "provided by the B<gethostbyname>(3)  and B<getservbyname>(3)  functions into "
2066 "a single interface, but unlike the latter functions, B<getaddrinfo>()  is "
2067 "reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies."
2068 msgstr ""
2069
2070 #. type: Plain text
2071 #: build/C/man3/getaddrinfo.3:106
2072 msgid ""
2073 "The I<addrinfo> structure used by B<getaddrinfo>()  contains the following "
2074 "fields:"
2075 msgstr ""
2076
2077 #. type: Plain text
2078 #: build/C/man3/getaddrinfo.3:119
2079 #, no-wrap
2080 msgid ""
2081 "struct addrinfo {\n"
2082 "    int              ai_flags;\n"
2083 "    int              ai_family;\n"
2084 "    int              ai_socktype;\n"
2085 "    int              ai_protocol;\n"
2086 "    socklen_t        ai_addrlen;\n"
2087 "    struct sockaddr *ai_addr;\n"
2088 "    char            *ai_canonname;\n"
2089 "    struct addrinfo *ai_next;\n"
2090 "};\n"
2091 msgstr ""
2092
2093 #. type: Plain text
2094 #: build/C/man3/getaddrinfo.3:141
2095 msgid ""
2096 "The I<hints> argument points to an I<addrinfo> structure that specifies "
2097 "criteria for selecting the socket address structures returned in the list "
2098 "pointed to by I<res>.  If I<hints> is not NULL it points to an I<addrinfo> "
2099 "structure whose I<ai_family>, I<ai_socktype>, and I<ai_protocol> specify "
2100 "criteria that limit the set of socket addresses returned by "
2101 "B<getaddrinfo>(), as follows:"
2102 msgstr ""
2103
2104 #. type: TP
2105 #: build/C/man3/getaddrinfo.3:141
2106 #, no-wrap
2107 msgid "I<ai_family>"
2108 msgstr ""
2109
2110 #. type: Plain text
2111 #: build/C/man3/getaddrinfo.3:157
2112 msgid ""
2113 "This field specifies the desired address family for the returned addresses.  "
2114 "Valid values for this field include B<AF_INET> and B<AF_INET6>.  The value "
2115 "B<AF_UNSPEC> indicates that B<getaddrinfo>()  should return socket addresses "
2116 "for any address family (either IPv4 or IPv6, for example) that can be used "
2117 "with I<node> and I<service>."
2118 msgstr ""
2119
2120 #. type: TP
2121 #: build/C/man3/getaddrinfo.3:157
2122 #, no-wrap
2123 msgid "I<ai_socktype>"
2124 msgstr ""
2125
2126 #. type: Plain text
2127 #: build/C/man3/getaddrinfo.3:166
2128 msgid ""
2129 "This field specifies the preferred socket type, for example B<SOCK_STREAM> "
2130 "or B<SOCK_DGRAM>.  Specifying 0 in this field indicates that socket "
2131 "addresses of any type can be returned by B<getaddrinfo>()."
2132 msgstr ""
2133
2134 #. type: TP
2135 #: build/C/man3/getaddrinfo.3:166
2136 #, no-wrap
2137 msgid "I<ai_protocol>"
2138 msgstr ""
2139
2140 #. type: Plain text
2141 #: build/C/man3/getaddrinfo.3:172
2142 msgid ""
2143 "This field specifies the protocol for the returned socket addresses.  "
2144 "Specifying 0 in this field indicates that socket addresses with any protocol "
2145 "can be returned by B<getaddrinfo>()."
2146 msgstr ""
2147
2148 #. type: TP
2149 #: build/C/man3/getaddrinfo.3:172
2150 #, no-wrap
2151 msgid "I<ai_flags>"
2152 msgstr ""
2153
2154 #. type: Plain text
2155 #: build/C/man3/getaddrinfo.3:176
2156 msgid ""
2157 "This field specifies additional options, described below.  Multiple flags "
2158 "are specified by bitwise OR-ing them together."
2159 msgstr ""
2160
2161 #. type: Plain text
2162 #: build/C/man3/getaddrinfo.3:180
2163 msgid ""
2164 "All the other fields in the structure pointed to by I<hints> must contain "
2165 "either 0 or a null pointer, as appropriate."
2166 msgstr ""
2167
2168 #. type: Plain text
2169 #: build/C/man3/getaddrinfo.3:215
2170 msgid ""
2171 "Specifying I<hints> as NULL is equivalent to setting I<ai_socktype> and "
2172 "I<ai_protocol> to 0; I<ai_family> to B<AF_UNSPEC>; and I<ai_flags> to "
2173 "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)>.  (POSIX specifies different defaults "
2174 "for I<ai_flags>; see NOTES.)  I<node> specifies either a numerical network "
2175 "address (for IPv4, numbers-and-dots notation as supported by "
2176 "B<inet_aton>(3); for IPv6, hexadecimal string format as supported by "
2177 "B<inet_pton>(3)), or a network hostname, whose network addresses are looked "
2178 "up and resolved.  If I<hints.ai_flags> contains the B<AI_NUMERICHOST> flag, "
2179 "then I<node> must be a numerical network address.  The B<AI_NUMERICHOST> "
2180 "flag suppresses any potentially lengthy network host address lookups."
2181 msgstr ""
2182
2183 #. type: Plain text
2184 #: build/C/man3/getaddrinfo.3:240
2185 msgid ""
2186 "If the B<AI_PASSIVE> flag is specified in I<hints.ai_flags>, and I<node> is "
2187 "NULL, then the returned socket addresses will be suitable for B<bind>(2)ing "
2188 "a socket that will B<accept>(2)  connections.  The returned socket address "
2189 "will contain the \"wildcard address\" (B<INADDR_ANY> for IPv4 addresses, "
2190 "B<IN6ADDR_ANY_INIT> for IPv6 address).  The wildcard address is used by "
2191 "applications (typically servers)  that intend to accept connections on any "
2192 "of the hosts's network addresses.  If I<node> is not NULL, then the "
2193 "B<AI_PASSIVE> flag is ignored."
2194 msgstr ""
2195
2196 #. type: Plain text
2197 #: build/C/man3/getaddrinfo.3:260
2198 msgid ""
2199 "If the B<AI_PASSIVE> flag is not set in I<hints.ai_flags>, then the returned "
2200 "socket addresses will be suitable for use with B<connect>(2), B<sendto>(2), "
2201 "or B<sendmsg>(2).  If I<node> is NULL, then the network address will be set "
2202 "to the loopback interface address (B<INADDR_LOOPBACK> for IPv4 addresses, "
2203 "B<IN6ADDR_LOOPBACK_INIT> for IPv6 address); this is used by applications "
2204 "that intend to communicate with peers running on the same host."
2205 msgstr ""
2206
2207 #. type: Plain text
2208 #: build/C/man3/getaddrinfo.3:283
2209 msgid ""
2210 "I<service> sets the port in each returned address structure.  If this "
2211 "argument is a service name (see B<services>(5)), it is translated to the "
2212 "corresponding port number.  This argument can also be specified as a decimal "
2213 "number, which is simply converted to binary.  If I<service> is NULL, then "
2214 "the port number of the returned socket addresses will be left "
2215 "uninitialized.  If B<AI_NUMERICSERV> is specified in I<hints.ai_flags> and "
2216 "I<service> is not NULL, then I<service> must point to a string containing a "
2217 "numeric port number.  This flag is used to inhibit the invocation of a name "
2218 "resolution service in cases where it is known not to be required."
2219 msgstr ""
2220
2221 #. type: Plain text
2222 #: build/C/man3/getaddrinfo.3:289
2223 msgid "Either I<node> or I<service>, but not both, may be NULL."
2224 msgstr ""
2225
2226 #. type: Plain text
2227 #: build/C/man3/getaddrinfo.3:305
2228 msgid ""
2229 "The B<getaddrinfo>()  function allocates and initializes a linked list of "
2230 "I<addrinfo> structures, one for each network address that matches I<node> "
2231 "and I<service>, subject to any restrictions imposed by I<hints>, and returns "
2232 "a pointer to the start of the list in I<res>.  The items in the linked list "
2233 "are linked by the I<ai_next> field."
2234 msgstr ""
2235
2236 #. type: Plain text
2237 #: build/C/man3/getaddrinfo.3:327
2238 msgid ""
2239 "There are several reasons why the linked list may have more than one "
2240 "I<addrinfo> structure, including: the network host is multihomed, accessible "
2241 "over multiple protocols (e.g., both B<AF_INET> and B<AF_INET6>); or the same "
2242 "service is available from multiple socket types (one B<SOCK_STREAM> address "
2243 "and another B<SOCK_DGRAM> address, for example).  Normally, the application "
2244 "should try using the addresses in the order in which they are returned.  The "
2245 "sorting function used within B<getaddrinfo>()  is defined in RFC\\ 3484; the "
2246 "order can be tweaked for a particular system by editing I</etc/gai.conf> "
2247 "(available since glibc 2.5)."
2248 msgstr ""
2249
2250 #.  In glibc prior to 2.3.4, the ai_canonname of each addrinfo
2251 #.  structure was set pointing to the canonical name; that was
2252 #.  more than POSIX.1-2001 specified, or other implementations provided.
2253 #.  MTK, Aug 05
2254 #. type: Plain text
2255 #: build/C/man3/getaddrinfo.3:342
2256 msgid ""
2257 "If I<hints.ai_flags> includes the B<AI_CANONNAME> flag, then the "
2258 "I<ai_canonname> field of the first of the I<addrinfo> structures in the "
2259 "returned list is set to point to the official name of the host."
2260 msgstr ""
2261
2262 #. type: Plain text
2263 #: build/C/man3/getaddrinfo.3:346
2264 msgid ""
2265 "The remaining fields of each returned I<addrinfo> structure are initialized "
2266 "as follows:"
2267 msgstr ""
2268
2269 #. type: IP
2270 #: build/C/man3/getaddrinfo.3:346 build/C/man3/getaddrinfo.3:369 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:74 build/C/man7/unix.7:91 build/C/man7/unix.7:111
2271 #, no-wrap
2272 msgid "*"
2273 msgstr ""
2274
2275 #. type: Plain text
2276 #: build/C/man3/getaddrinfo.3:369
2277 msgid ""
2278 "The I<ai_family>, I<ai_socktype>, and I<ai_protocol> fields return the "
2279 "socket creation parameters (i.e., these fields have the same meaning as the "
2280 "corresponding arguments of B<socket>(2)).  For example, I<ai_family> might "
2281 "return B<AF_INET> or B<AF_INET6>; I<ai_socktype> might return B<SOCK_DGRAM> "
2282 "or B<SOCK_STREAM>; and I<ai_protocol> returns the protocol for the socket."
2283 msgstr ""
2284
2285 #. type: Plain text
2286 #: build/C/man3/getaddrinfo.3:376
2287 msgid ""
2288 "A pointer to the socket address is placed in the I<ai_addr> field, and the "
2289 "length of the socket address, in bytes, is placed in the I<ai_addrlen> "
2290 "field."
2291 msgstr ""
2292
2293 #. type: Plain text
2294 #: build/C/man3/getaddrinfo.3:395
2295 msgid ""
2296 "If I<hints.ai_flags> includes the B<AI_ADDRCONFIG> flag, then IPv4 addresses "
2297 "are returned in the list pointed to by I<res> only if the local system has "
2298 "at least one IPv4 address configured, and IPv6 addresses are returned only "
2299 "if the local system has at least one IPv6 address configured.  The loopback "
2300 "address is not considered for this case as valid as a configured address.  "
2301 "This flag is useful on, for example, IPv4-only systems, to ensure that "
2302 "B<getaddrinfo>()  does not return IPv6 socket addresses that would always "
2303 "fail in B<connect>(2)  or B<bind>(2)."
2304 msgstr ""
2305
2306 #. type: Plain text
2307 #: build/C/man3/getaddrinfo.3:420
2308 msgid ""
2309 "If I<hints.ai_flags> specifies the B<AI_V4MAPPED> flag, and "
2310 "I<hints.ai_family> was specified as B<AF_INET6>, and no matching IPv6 "
2311 "addresses could be found, then return IPv4-mapped IPv6 addresses in the list "
2312 "pointed to by I<res>.  If both B<AI_V4MAPPED> and B<AI_ALL> are specified in "
2313 "I<hints.ai_flags>, then return both IPv6 and IPv4-mapped IPv6 addresses in "
2314 "the list pointed to by I<res>.  B<AI_ALL> is ignored if B<AI_V4MAPPED> is "
2315 "not also specified."
2316 msgstr ""
2317
2318 #. type: Plain text
2319 #: build/C/man3/getaddrinfo.3:426
2320 msgid ""
2321 "The B<freeaddrinfo>()  function frees the memory that was allocated for the "
2322 "dynamically allocated linked list I<res>."
2323 msgstr ""
2324
2325 #. type: SS
2326 #: build/C/man3/getaddrinfo.3:426
2327 #, no-wrap
2328 msgid "Extensions to getaddrinfo() for Internationalized Domain Names"
2329 msgstr ""
2330
2331 #. type: Plain text
2332 #: build/C/man3/getaddrinfo.3:435
2333 msgid ""
2334 "Starting with glibc 2.3.4, B<getaddrinfo>()  has been extended to "
2335 "selectively allow the incoming and outgoing hostnames to be transparently "
2336 "converted to and from the Internationalized Domain Name (IDN) format (see "
2337 "RFC 3490, I<Internationalizing Domain Names in Applications (IDNA)>).  Four "
2338 "new flags are defined:"
2339 msgstr ""
2340
2341 #. type: TP
2342 #: build/C/man3/getaddrinfo.3:435
2343 #, no-wrap
2344 msgid "B<AI_IDN>"
2345 msgstr ""
2346
2347 #. type: Plain text
2348 #: build/C/man3/getaddrinfo.3:441
2349 msgid ""
2350 "If this flag is specified, then the node name given in I<node> is converted "
2351 "to IDN format if necessary.  The source encoding is that of the current "
2352 "locale."
2353 msgstr ""
2354
2355 #.  Implementation Detail:
2356 #.  To minimize effects on system performance the implementation might
2357 #.  want to check whether the input string contains any non-ASCII
2358 #.  characters.  If there are none the IDN step can be skipped completely.
2359 #.  On systems which allow not-ASCII safe encodings for a locale this
2360 #.  might be a problem.
2361 #. type: Plain text
2362 #: build/C/man3/getaddrinfo.3:453
2363 msgid ""
2364 "If the input name contains non-ASCII characters, then the IDN encoding is "
2365 "used.  Those parts of the node name (delimited by dots) that contain "
2366 "non-ASCII characters are encoded using ASCII Compatible Encoding (ACE)  "
2367 "before being passed to the name resolution functions."
2368 msgstr ""
2369
2370 #. type: TP
2371 #: build/C/man3/getaddrinfo.3:453
2372 #, no-wrap
2373 msgid "B<AI_CANONIDN>"
2374 msgstr ""
2375
2376 #. type: Plain text
2377 #: build/C/man3/getaddrinfo.3:465
2378 msgid ""
2379 "After a successful name lookup, and if the B<AI_CANONNAME> flag was "
2380 "specified, B<getaddrinfo>()  will return the canonical name of the node "
2381 "corresponding to the I<addrinfo> structure value passed back.  The return "
2382 "value is an exact copy of the value returned by the name resolution "
2383 "function."
2384 msgstr ""
2385
2386 #
2387 #. Implementation Detail:
2388 #. If no component of the returned name starts with xn\-\- the IDN
2389 #. step can be skipped, therefore avoiding unnecessary slowdowns.
2390 #. type: Plain text
2391 #: build/C/man3/getaddrinfo.3:478
2392 msgid ""
2393 "If the name is encoded using ACE, then it will contain the I<xn--> prefix "
2394 "for one or more components of the name.  To convert these components into a "
2395 "readable form the B<AI_CANONIDN> flag can be passed in addition to "
2396 "B<AI_CANONNAME>.  The resulting string is encoded using the current locale's "
2397 "encoding."
2398 msgstr ""
2399
2400 #. type: TP
2401 #: build/C/man3/getaddrinfo.3:478
2402 #, no-wrap
2403 msgid "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
2404 msgstr ""
2405
2406 #. type: Plain text
2407 #: build/C/man3/getaddrinfo.3:485 build/C/man3/getnameinfo.3:139
2408 msgid ""
2409 "Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned "
2410 "Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make "
2411 "sure it is a STD3 conforming hostname)  flags respectively to be used in the "
2412 "IDNA handling."
2413 msgstr ""
2414
2415 #. type: SH
2416 #: build/C/man3/getaddrinfo.3:485 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_ntop.3:83 build/C/man3/inet_pton.3:116 build/C/man3/inet_net_pton.3:130 build/C/man3/rcmd.3:239 build/C/man3/resolver.3:245 build/C/man3/setnetgrent.3:86 build/C/man2/shutdown.2:69
2417 #, no-wrap
2418 msgid "RETURN VALUE"
2419 msgstr ""
2420
2421 #.  FIXME glibc defines the following additional errors, some which
2422 #.  can probably be returned by getaddrinfo(); they need to
2423 #.  be documented.
2424 #.  #ifdef __USE_GNU
2425 #.  #define EAI_INPROGRESS  -100  /* Processing request in progress.  */
2426 #.  #define EAI_CANCELED    -101  /* Request canceled.  */
2427 #.  #define EAI_NOTCANCELED -102  /* Request not canceled.  */
2428 #.  #define EAI_ALLDONE     -103  /* All requests done.  */
2429 #.  #define EAI_INTR        -104  /* Interrupted by a signal.  */
2430 #.  #define EAI_IDN_ENCODE  -105  /* IDN encoding failed.  */
2431 #.  #endif
2432 #. type: Plain text
2433 #: build/C/man3/getaddrinfo.3:499
2434 msgid ""
2435 "B<getaddrinfo>()  returns 0 if it succeeds, or one of the following nonzero "
2436 "error codes:"
2437 msgstr ""
2438
2439 #. type: TP
2440 #: build/C/man3/getaddrinfo.3:499
2441 #, no-wrap
2442 msgid "B<EAI_ADDRFAMILY>"
2443 msgstr ""
2444
2445 #.  Not in SUSv3
2446 #. type: Plain text
2447 #: build/C/man3/getaddrinfo.3:504
2448 msgid ""
2449 "The specified network host does not have any network addresses in the "
2450 "requested address family."
2451 msgstr ""
2452
2453 #. type: TP
2454 #: build/C/man3/getaddrinfo.3:504 build/C/man3/getaddrinfo_a.3:247 build/C/man3/getaddrinfo_a.3:264 build/C/man3/getnameinfo.3:155
2455 #, no-wrap
2456 msgid "B<EAI_AGAIN>"
2457 msgstr ""
2458
2459 #. type: Plain text
2460 #: build/C/man3/getaddrinfo.3:508
2461 msgid "The name server returned a temporary failure indication.  Try again later."
2462 msgstr ""
2463
2464 #. type: TP
2465 #: build/C/man3/getaddrinfo.3:508 build/C/man3/getnameinfo.3:159
2466 #, no-wrap
2467 msgid "B<EAI_BADFLAGS>"
2468 msgstr ""
2469
2470 #. type: Plain text
2471 #: build/C/man3/getaddrinfo.3:518
2472 msgid ""
2473 "I<hints.ai_flags> contains invalid flags; or, I<hints.ai_flags> included "
2474 "B<AI_CANONNAME> and I<name> was NULL."
2475 msgstr ""
2476
2477 #. type: TP
2478 #: build/C/man3/getaddrinfo.3:518 build/C/man3/getnameinfo.3:164
2479 #, no-wrap
2480 msgid "B<EAI_FAIL>"
2481 msgstr ""
2482
2483 #. type: Plain text
2484 #: build/C/man3/getaddrinfo.3:521
2485 msgid "The name server returned a permanent failure indication."
2486 msgstr ""
2487
2488 #. type: TP
2489 #: build/C/man3/getaddrinfo.3:521 build/C/man3/getnameinfo.3:167
2490 #, no-wrap
2491 msgid "B<EAI_FAMILY>"
2492 msgstr ""
2493
2494 #. type: Plain text
2495 #: build/C/man3/getaddrinfo.3:524
2496 msgid "The requested address family is not supported."
2497 msgstr ""
2498
2499 #. type: TP
2500 #: build/C/man3/getaddrinfo.3:524 build/C/man3/getaddrinfo_a.3:252 build/C/man3/getnameinfo.3:171
2501 #, no-wrap
2502 msgid "B<EAI_MEMORY>"
2503 msgstr ""
2504
2505 #. type: Plain text
2506 #: build/C/man3/getaddrinfo.3:527 build/C/man3/getaddrinfo_a.3:255 build/C/man3/getnameinfo.3:174 build/C/man7/unix.7:361
2507 msgid "Out of memory."
2508 msgstr ""
2509
2510 #. type: TP
2511 #: build/C/man3/getaddrinfo.3:527
2512 #, no-wrap
2513 msgid "B<EAI_NODATA>"
2514 msgstr ""
2515
2516 #.  Not in SUSv3
2517 #. type: Plain text
2518 #: build/C/man3/getaddrinfo.3:532
2519 msgid ""
2520 "The specified network host exists, but does not have any network addresses "
2521 "defined."
2522 msgstr ""
2523
2524 #. type: TP
2525 #: build/C/man3/getaddrinfo.3:532 build/C/man3/getnameinfo.3:174
2526 #, no-wrap
2527 msgid "B<EAI_NONAME>"
2528 msgstr ""
2529
2530 #. type: Plain text
2531 #: build/C/man3/getaddrinfo.3:549
2532 msgid ""
2533 "The I<node> or I<service> is not known; or both I<node> and I<service> are "
2534 "NULL; or B<AI_NUMERICSERV> was specified in I<hints.ai_flags> and I<service> "
2535 "was not a numeric port-number string."
2536 msgstr ""
2537
2538 #. type: TP
2539 #: build/C/man3/getaddrinfo.3:549
2540 #, no-wrap
2541 msgid "B<EAI_SERVICE>"
2542 msgstr ""
2543
2544 #. type: Plain text
2545 #: build/C/man3/getaddrinfo.3:570
2546 msgid ""
2547 "The requested service is not available for the requested socket type.  It "
2548 "may be available through another socket type.  For example, this error could "
2549 "occur if I<service> was \"shell\" (a service available only on stream "
2550 "sockets), and either I<hints.ai_protocol> was B<IPPROTO_UDP>, or "
2551 "I<hints.ai_socktype> was B<SOCK_DGRAM>; or the error could occur if "
2552 "I<service> was not NULL, and I<hints.ai_socktype> was B<SOCK_RAW> (a socket "
2553 "type that does not support the concept of services)."
2554 msgstr ""
2555
2556 #. type: TP
2557 #: build/C/man3/getaddrinfo.3:570
2558 #, no-wrap
2559 msgid "B<EAI_SOCKTYPE>"
2560 msgstr ""
2561
2562 #. type: Plain text
2563 #: build/C/man3/getaddrinfo.3:582
2564 msgid ""
2565 "The requested socket type is not supported.  This could occur, for example, "
2566 "if I<hints.ai_socktype> and I<hints.ai_protocol> are inconsistent (e.g., "
2567 "B<SOCK_DGRAM> and B<IPPROTO_TCP>, respectively)."
2568 msgstr ""
2569
2570 #. type: TP
2571 #: build/C/man3/getaddrinfo.3:582 build/C/man3/getaddrinfo_a.3:255 build/C/man3/getnameinfo.3:187
2572 #, no-wrap
2573 msgid "B<EAI_SYSTEM>"
2574 msgstr ""
2575
2576 #. type: Plain text
2577 #: build/C/man3/getaddrinfo.3:587
2578 msgid "Other system error, check I<errno> for details."
2579 msgstr ""
2580
2581 #. type: Plain text
2582 #: build/C/man3/getaddrinfo.3:592
2583 msgid ""
2584 "The B<gai_strerror>()  function translates these error codes to a human "
2585 "readable string, suitable for error reporting."
2586 msgstr ""
2587
2588 #. type: Plain text
2589 #: build/C/man3/getaddrinfo.3:599
2590 msgid "POSIX.1-2001.  The B<getaddrinfo>()  function is documented in RFC\\ 2553."
2591 msgstr ""
2592
2593 #. type: Plain text
2594 #: build/C/man3/getaddrinfo.3:604
2595 msgid ""
2596 "B<getaddrinfo>()  supports the I<address>B<%>I<scope-id> notation for "
2597 "specifying the IPv6 scope-ID."
2598 msgstr ""
2599
2600 #. type: Plain text
2601 #: build/C/man3/getaddrinfo.3:612
2602 msgid ""
2603 "B<AI_ADDRCONFIG>, B<AI_ALL>, and B<AI_V4MAPPED> are available since glibc "
2604 "2.3.3.  B<AI_NUMERICSERV> is available since glibc 2.3.4."
2605 msgstr ""
2606
2607 #. type: Plain text
2608 #: build/C/man3/getaddrinfo.3:622
2609 msgid ""
2610 "According to POSIX.1-2001, specifying I<hints> as NULL should cause "
2611 "I<ai_flags> to be assumed as 0.  The GNU C library instead assumes a value "
2612 "of B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)> for this case, since this value is "
2613 "considered an improvement on the specification."
2614 msgstr ""
2615
2616 #.  getnameinfo.3 refers to this example
2617 #.  socket.2 refers to this example
2618 #.  bind.2 refers to this example
2619 #.  connect.2 refers to this example
2620 #.  recvfrom.2 refers to this example
2621 #.  sendto.2 refers to this example
2622 #. type: Plain text
2623 #: build/C/man3/getaddrinfo.3:636
2624 msgid ""
2625 "The following programs demonstrate the use of B<getaddrinfo>(), "
2626 "B<gai_strerror>(), B<freeaddrinfo>(), and B<getnameinfo>(3).  The programs "
2627 "are an echo server and client for UDP datagrams."
2628 msgstr ""
2629
2630 #. type: SS
2631 #: build/C/man3/getaddrinfo.3:636
2632 #, no-wrap
2633 msgid "Server program"
2634 msgstr ""
2635
2636 #. type: Plain text
2637 #: build/C/man3/getaddrinfo.3:646
2638 #, no-wrap
2639 msgid ""
2640 "#include E<lt>sys/types.hE<gt>\n"
2641 "#include E<lt>stdio.hE<gt>\n"
2642 "#include E<lt>stdlib.hE<gt>\n"
2643 "#include E<lt>unistd.hE<gt>\n"
2644 "#include E<lt>string.hE<gt>\n"
2645 "#include E<lt>sys/socket.hE<gt>\n"
2646 "#include E<lt>netdb.hE<gt>\n"
2647 msgstr ""
2648
2649 #. type: Plain text
2650 #: build/C/man3/getaddrinfo.3:648 build/C/man3/getaddrinfo.3:743
2651 #, no-wrap
2652 msgid "#define BUF_SIZE 500\n"
2653 msgstr ""
2654
2655 #. type: Plain text
2656 #: build/C/man3/getaddrinfo.3:659
2657 #, no-wrap
2658 msgid ""
2659 "int\n"
2660 "main(int argc, char *argv[])\n"
2661 "{\n"
2662 "    struct addrinfo hints;\n"
2663 "    struct addrinfo *result, *rp;\n"
2664 "    int sfd, s;\n"
2665 "    struct sockaddr_storage peer_addr;\n"
2666 "    socklen_t peer_addr_len;\n"
2667 "    ssize_t nread;\n"
2668 "    char buf[BUF_SIZE];\n"
2669 msgstr ""
2670
2671 #. type: Plain text
2672 #: build/C/man3/getaddrinfo.3:664
2673 #, no-wrap
2674 msgid ""
2675 "    if (argc != 2) {\n"
2676 "        fprintf(stderr, \"Usage: %s port\\en\", argv[0]);\n"
2677 "        exit(EXIT_FAILURE);\n"
2678 "    }\n"
2679 msgstr ""
2680
2681 #. type: Plain text
2682 #: build/C/man3/getaddrinfo.3:673
2683 #, no-wrap
2684 msgid ""
2685 "    memset(&hints, 0, sizeof(struct addrinfo));\n"
2686 "    hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */\n"
2687 "    hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
2688 "    hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */\n"
2689 "    hints.ai_protocol = 0;          /* Any protocol */\n"
2690 "    hints.ai_canonname = NULL;\n"
2691 "    hints.ai_addr = NULL;\n"
2692 "    hints.ai_next = NULL;\n"
2693 msgstr ""
2694
2695 #. type: Plain text
2696 #: build/C/man3/getaddrinfo.3:679
2697 #, no-wrap
2698 msgid ""
2699 "    s = getaddrinfo(NULL, argv[1], &hints, &result);\n"
2700 "    if (s != 0) {\n"
2701 "        fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n"
2702 "        exit(EXIT_FAILURE);\n"
2703 "    }\n"
2704 msgstr ""
2705
2706 #. type: Plain text
2707 #: build/C/man3/getaddrinfo.3:684
2708 #, no-wrap
2709 msgid ""
2710 "    /* getaddrinfo() returns a list of address structures.\n"
2711 "       Try each address until we successfully bind(2).\n"
2712 "       If socket(2) (or bind(2)) fails, we (close the socket\n"
2713 "       and) try the next address. */\n"
2714 msgstr ""
2715
2716 #. type: Plain text
2717 #: build/C/man3/getaddrinfo.3:690
2718 #, no-wrap
2719 msgid ""
2720 "    for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
2721 "        sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
2722 "                rp-E<gt>ai_protocol);\n"
2723 "        if (sfd == -1)\n"
2724 "            continue;\n"
2725 msgstr ""
2726
2727 #. type: Plain text
2728 #: build/C/man3/getaddrinfo.3:693
2729 #, no-wrap
2730 msgid ""
2731 "        if (bind(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) == 0)\n"
2732 "            break;                  /* Success */\n"
2733 msgstr ""
2734
2735 #. type: Plain text
2736 #: build/C/man3/getaddrinfo.3:696 build/C/man3/getaddrinfo.3:789
2737 #, no-wrap
2738 msgid ""
2739 "        close(sfd);\n"
2740 "    }\n"
2741 msgstr ""
2742
2743 #. type: Plain text
2744 #: build/C/man3/getaddrinfo.3:701
2745 #, no-wrap
2746 msgid ""
2747 "    if (rp == NULL) {               /* No address succeeded */\n"
2748 "        fprintf(stderr, \"Could not bind\\en\");\n"
2749 "        exit(EXIT_FAILURE);\n"
2750 "    }\n"
2751 msgstr ""
2752
2753 #. type: Plain text
2754 #: build/C/man3/getaddrinfo.3:703 build/C/man3/getaddrinfo.3:796
2755 #, no-wrap
2756 msgid "    freeaddrinfo(result);           /* No longer needed */\n"
2757 msgstr ""
2758
2759 #. type: Plain text
2760 #: build/C/man3/getaddrinfo.3:705
2761 #, no-wrap
2762 msgid "    /* Read datagrams and echo them back to sender */\n"
2763 msgstr ""
2764
2765 #. type: Plain text
2766 #: build/C/man3/getaddrinfo.3:712
2767 #, no-wrap
2768 msgid ""
2769 "    for (;;) {\n"
2770 "        peer_addr_len = sizeof(struct sockaddr_storage);\n"
2771 "        nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n"
2772 "                (struct sockaddr *) &peer_addr, &peer_addr_len);\n"
2773 "        if (nread == -1)\n"
2774 "            continue;               /* Ignore failed request */\n"
2775 msgstr ""
2776
2777 #. type: Plain text
2778 #: build/C/man3/getaddrinfo.3:714
2779 #, no-wrap
2780 msgid "        char host[NI_MAXHOST], service[NI_MAXSERV];\n"
2781 msgstr ""
2782
2783 #. type: Plain text
2784 #: build/C/man3/getaddrinfo.3:723
2785 #, no-wrap
2786 msgid ""
2787 "        s = getnameinfo((struct sockaddr *) &peer_addr,\n"
2788 "                        peer_addr_len, host, NI_MAXHOST,\n"
2789 "                        service, NI_MAXSERV, NI_NUMERICSERV);\n"
2790 "       if (s == 0)\n"
2791 "            printf(\"Received %zd bytes from %s:%s\\en\",\n"
2792 "                    nread, host, service);\n"
2793 "        else\n"
2794 "            fprintf(stderr, \"getnameinfo: %s\\en\", gai_strerror(s));\n"
2795 msgstr ""
2796
2797 #. type: Plain text
2798 #: build/C/man3/getaddrinfo.3:730
2799 #, no-wrap
2800 msgid ""
2801 "        if (sendto(sfd, buf, nread, 0,\n"
2802 "                    (struct sockaddr *) &peer_addr,\n"
2803 "                    peer_addr_len) != nread)\n"
2804 "            fprintf(stderr, \"Error sending response\\en\");\n"
2805 "    }\n"
2806 "}\n"
2807 msgstr ""
2808
2809 #. type: SS
2810 #: build/C/man3/getaddrinfo.3:731
2811 #, no-wrap
2812 msgid "Client program"
2813 msgstr ""
2814
2815 #. type: Plain text
2816 #: build/C/man3/getaddrinfo.3:741
2817 #, no-wrap
2818 msgid ""
2819 "#include E<lt>sys/types.hE<gt>\n"
2820 "#include E<lt>sys/socket.hE<gt>\n"
2821 "#include E<lt>netdb.hE<gt>\n"
2822 "#include E<lt>stdio.hE<gt>\n"
2823 "#include E<lt>stdlib.hE<gt>\n"
2824 "#include E<lt>unistd.hE<gt>\n"
2825 "#include E<lt>string.hE<gt>\n"
2826 msgstr ""
2827
2828 #. type: Plain text
2829 #: build/C/man3/getaddrinfo.3:753
2830 #, no-wrap
2831 msgid ""
2832 "int\n"
2833 "main(int argc, char *argv[])\n"
2834 "{\n"
2835 "    struct addrinfo hints;\n"
2836 "    struct addrinfo *result, *rp;\n"
2837 "    int sfd, s, j;\n"
2838 "    size_t len;\n"
2839 "    ssize_t nread;\n"
2840 "    char buf[BUF_SIZE];\n"
2841 msgstr ""
2842
2843 #. type: Plain text
2844 #: build/C/man3/getaddrinfo.3:758
2845 #, no-wrap
2846 msgid ""
2847 "    if (argc E<lt> 3) {\n"
2848 "        fprintf(stderr, \"Usage: %s host port msg...\\en\", argv[0]);\n"
2849 "        exit(EXIT_FAILURE);\n"
2850 "    }\n"
2851 msgstr ""
2852
2853 #. type: Plain text
2854 #: build/C/man3/getaddrinfo.3:760
2855 #, no-wrap
2856 msgid "    /* Obtain address(es) matching host/port */\n"
2857 msgstr ""
2858
2859 #. type: Plain text
2860 #: build/C/man3/getaddrinfo.3:766
2861 #, no-wrap
2862 msgid ""
2863 "    memset(&hints, 0, sizeof(struct addrinfo));\n"
2864 "    hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */\n"
2865 "    hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
2866 "    hints.ai_flags = 0;\n"
2867 "    hints.ai_protocol = 0;          /* Any protocol */\n"
2868 msgstr ""
2869
2870 #. type: Plain text
2871 #: build/C/man3/getaddrinfo.3:772
2872 #, no-wrap
2873 msgid ""
2874 "    s = getaddrinfo(argv[1], argv[2], &hints, &result);\n"
2875 "    if (s != 0) {\n"
2876 "        fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n"
2877 "        exit(EXIT_FAILURE);\n"
2878 "    }\n"
2879 msgstr ""
2880
2881 #. type: Plain text
2882 #: build/C/man3/getaddrinfo.3:777
2883 #, no-wrap
2884 msgid ""
2885 "    /* getaddrinfo() returns a list of address structures.\n"
2886 "       Try each address until we successfully connect(2).\n"
2887 "       If socket(2) (or connect(2)) fails, we (close the socket\n"
2888 "       and) try the next address. */\n"
2889 msgstr ""
2890
2891 #. type: Plain text
2892 #: build/C/man3/getaddrinfo.3:783
2893 #, no-wrap
2894 msgid ""
2895 "    for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
2896 "        sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
2897 "                     rp-E<gt>ai_protocol);\n"
2898 "        if (sfd == -1)\n"
2899 "            continue;\n"
2900 msgstr ""
2901
2902 #. type: Plain text
2903 #: build/C/man3/getaddrinfo.3:786
2904 #, no-wrap
2905 msgid ""
2906 "        if (connect(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) != -1)\n"
2907 "            break;                  /* Success */\n"
2908 msgstr ""
2909
2910 #. type: Plain text
2911 #: build/C/man3/getaddrinfo.3:794
2912 #, no-wrap
2913 msgid ""
2914 "    if (rp == NULL) {               /* No address succeeded */\n"
2915 "        fprintf(stderr, \"Could not connect\\en\");\n"
2916 "        exit(EXIT_FAILURE);\n"
2917 "    }\n"
2918 msgstr ""
2919
2920 #. type: Plain text
2921 #: build/C/man3/getaddrinfo.3:799
2922 #, no-wrap
2923 msgid ""
2924 "    /* Send remaining command-line arguments as separate\n"
2925 "       datagrams, and read responses from server */\n"
2926 msgstr ""
2927
2928 #. type: Plain text
2929 #: build/C/man3/getaddrinfo.3:803
2930 #, no-wrap
2931 msgid ""
2932 "    for (j = 3; j E<lt> argc; j++) {\n"
2933 "        len = strlen(argv[j]) + 1;\n"
2934 "                /* +1 for terminating null byte */\n"
2935 msgstr ""
2936
2937 #. type: Plain text
2938 #: build/C/man3/getaddrinfo.3:809
2939 #, no-wrap
2940 msgid ""
2941 "        if (len + 1 E<gt> BUF_SIZE) {\n"
2942 "            fprintf(stderr,\n"
2943 "                    \"Ignoring long message in argument %d\\en\", j);\n"
2944 "            continue;\n"
2945 "        }\n"
2946 msgstr ""
2947
2948 #. type: Plain text
2949 #: build/C/man3/getaddrinfo.3:814
2950 #, no-wrap
2951 msgid ""
2952 "        if (write(sfd, argv[j], len) != len) {\n"
2953 "            fprintf(stderr, \"partial/failed write\\en\");\n"
2954 "            exit(EXIT_FAILURE);\n"
2955 "        }\n"
2956 msgstr ""
2957
2958 #. type: Plain text
2959 #: build/C/man3/getaddrinfo.3:820
2960 #, no-wrap
2961 msgid ""
2962 "        nread = read(sfd, buf, BUF_SIZE);\n"
2963 "        if (nread == -1) {\n"
2964 "            perror(\"read\");\n"
2965 "            exit(EXIT_FAILURE);\n"
2966 "        }\n"
2967 msgstr ""
2968
2969 #. type: Plain text
2970 #: build/C/man3/getaddrinfo.3:823
2971 #, no-wrap
2972 msgid ""
2973 "        printf(\"Received %zd bytes: %s\\en\", nread, buf);\n"
2974 "    }\n"
2975 msgstr ""
2976
2977 #.  .BR getipnodebyaddr (3),
2978 #.  .BR getipnodebyname (3),
2979 #. type: Plain text
2980 #: build/C/man3/getaddrinfo.3:837
2981 msgid ""
2982 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<inet>(3), "
2983 "B<gai.conf>(5), B<hostname>(7), B<ip>(7)"
2984 msgstr ""
2985
2986 #. type: TH
2987 #: build/C/man3/getaddrinfo_a.3:29
2988 #, no-wrap
2989 msgid "GETADDRINFO_A"
2990 msgstr ""
2991
2992 #. type: TH
2993 #: 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
2994 #, no-wrap
2995 msgid "2014-05-28"
2996 msgstr ""
2997
2998 #. type: Plain text
2999 #: build/C/man3/getaddrinfo_a.3:33
3000 msgid ""
3001 "getaddrinfo_a, gai_suspend, gai_error, gai_cancel - asynchronous network "
3002 "address and service translation"
3003 msgstr ""
3004
3005 #. type: Plain text
3006 #: build/C/man3/getaddrinfo_a.3:37
3007 #, no-wrap
3008 msgid ""
3009 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
3010 "B<#include E<lt>netdb.hE<gt>>\n"
3011 msgstr ""
3012
3013 #. type: Plain text
3014 #: build/C/man3/getaddrinfo_a.3:40
3015 #, no-wrap
3016 msgid ""
3017 "B<int getaddrinfo_a(int >I<mode>B<, struct gaicb *>I<list[]>B<,>\n"
3018 "B<                int >I<nitems>B<, struct sigevent *>I<sevp>B<);>\n"
3019 msgstr ""
3020
3021 #. type: Plain text
3022 #: build/C/man3/getaddrinfo_a.3:43
3023 #, no-wrap
3024 msgid ""
3025 "B<int gai_suspend(const struct gaicb * const >I<list[]>B<, int "
3026 ">I<nitems>B<,>\n"
3027 "B<                const struct timespec *>I<timeout>B<);>\n"
3028 msgstr ""
3029
3030 #. type: Plain text
3031 #: build/C/man3/getaddrinfo_a.3:45
3032 #, no-wrap
3033 msgid "B<int gai_error(struct gaicb *>I<req>B<);>\n"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man3/getaddrinfo_a.3:47
3038 #, no-wrap
3039 msgid "B<int gai_cancel(struct gaicb *>I<req>B<);>\n"
3040 msgstr ""
3041
3042 #. type: Plain text
3043 #: build/C/man3/getaddrinfo_a.3:49
3044 #, no-wrap
3045 msgid "Link with I<-lanl>.\n"
3046 msgstr ""
3047
3048 #. type: Plain text
3049 #: build/C/man3/getaddrinfo_a.3:57
3050 msgid ""
3051 "The B<getaddrinfo_a>()  function performs the same task as "
3052 "B<getaddrinfo>(3), but allows multiple name look-ups to be performed "
3053 "asynchronously, with optional notification on completion of look-up "
3054 "operations."
3055 msgstr ""
3056
3057 #. type: Plain text
3058 #: build/C/man3/getaddrinfo_a.3:61
3059 msgid "The I<mode> argument has one of the following values:"
3060 msgstr ""
3061
3062 #. type: TP
3063 #: build/C/man3/getaddrinfo_a.3:61
3064 #, no-wrap
3065 msgid "B<GAI_WAIT>"
3066 msgstr ""
3067
3068 #. type: Plain text
3069 #: build/C/man3/getaddrinfo_a.3:65
3070 msgid ""
3071 "Perform the look-ups synchronously.  The call blocks until the look-ups have "
3072 "completed."
3073 msgstr ""
3074
3075 #. type: TP
3076 #: build/C/man3/getaddrinfo_a.3:65
3077 #, no-wrap
3078 msgid "B<GAI_NOWAIT>"
3079 msgstr ""
3080
3081 #. type: Plain text
3082 #: build/C/man3/getaddrinfo_a.3:73
3083 msgid ""
3084 "Perform the look-ups asynchronously.  The call returns immediately, and the "
3085 "requests are resolved in the background.  See the discussion of the I<sevp> "
3086 "argument below."
3087 msgstr ""
3088
3089 #. type: Plain text
3090 #: build/C/man3/getaddrinfo_a.3:88
3091 msgid ""
3092 "The array I<list> specifies the look-up requests to process.  The I<nitems> "
3093 "argument specifies the number of elements in I<list>.  The requested look-up "
3094 "operations are started in parallel.  NULL elements in I<list> are ignored.  "
3095 "Each request is described by a I<gaicb> structure, defined as follows:"
3096 msgstr ""
3097
3098 #. type: Plain text
3099 #: build/C/man3/getaddrinfo_a.3:97
3100 #, no-wrap
3101 msgid ""
3102 "struct gaicb {\n"
3103 "    const char            *ar_name;\n"
3104 "    const char            *ar_service;\n"
3105 "    const struct addrinfo *ar_request;\n"
3106 "    struct addrinfo       *ar_result;\n"
3107 "};\n"
3108 msgstr ""
3109
3110 #. type: Plain text
3111 #: build/C/man3/getaddrinfo_a.3:128
3112 msgid ""
3113 "The elements of this structure correspond to the arguments of "
3114 "B<getaddrinfo>(3).  Thus, I<ar_name> corresponds to the I<node> argument and "
3115 "I<ar_service> to the I<service> argument, identifying an Internet host and a "
3116 "service.  The I<ar_request> element corresponds to the I<hints> argument, "
3117 "specifying the criteria for selecting the returned socket address "
3118 "structures.  Finally, I<ar_result> corresponds to the I<res> argument; you "
3119 "do not need to initialize this element, it will be automatically set when "
3120 "the request is resolved.  The I<addrinfo> structure referenced by the last "
3121 "two elements is described in B<getaddrinfo>(3)."
3122 msgstr ""
3123
3124 #. type: Plain text
3125 #: build/C/man3/getaddrinfo_a.3:144
3126 msgid ""
3127 "When I<mode> is specified as B<GAI_NOWAIT>, notifications about resolved "
3128 "requests can be obtained by employing the I<sigevent> structure pointed to "
3129 "by the I<sevp> argument.  For the definition and general details of this "
3130 "structure, see B<sigevent>(7).  The I<sevp-E<gt>sigev_notify> field can have "
3131 "the following values:"
3132 msgstr ""
3133
3134 #. type: TP
3135 #: build/C/man3/getaddrinfo_a.3:144
3136 #, no-wrap
3137 msgid "B<SIGEV_NONE>"
3138 msgstr ""
3139
3140 #. type: Plain text
3141 #: build/C/man3/getaddrinfo_a.3:147
3142 msgid "Don't provide any notification."
3143 msgstr ""
3144
3145 #. type: TP
3146 #: build/C/man3/getaddrinfo_a.3:147
3147 #, no-wrap
3148 msgid "B<SIGEV_SIGNAL>"
3149 msgstr ""
3150
3151 #.  si_pid and si_uid are also set, to the values of the calling process,
3152 #.  which doesn't provide useful information, so we'll skip mentioning it.
3153 #. type: Plain text
3154 #: build/C/man3/getaddrinfo_a.3:163
3155 msgid ""
3156 "When a look-up completes, generate the signal I<sigev_signo> for the "
3157 "process.  See B<sigevent>(7)  for general details.  The I<si_code> field of "
3158 "the I<siginfo_t> structure will be set to B<SI_ASYNCNL>."
3159 msgstr ""
3160
3161 #. type: TP
3162 #: build/C/man3/getaddrinfo_a.3:163
3163 #, no-wrap
3164 msgid "B<SIGEV_THREAD>"
3165 msgstr ""
3166
3167 #. type: Plain text
3168 #: build/C/man3/getaddrinfo_a.3:171
3169 msgid ""
3170 "When a look-up completes, invoke I<sigev_notify_function> as if it were the "
3171 "start function of a new thread.  See B<sigevent>(7)  for details."
3172 msgstr ""
3173
3174 #. type: Plain text
3175 #: build/C/man3/getaddrinfo_a.3:180
3176 msgid ""
3177 "For B<SIGEV_SIGNAL> and B<SIGEV_THREAD>, it may be useful to point "
3178 "I<sevp-E<gt>sigev_value.sival_ptr> to I<list>."
3179 msgstr ""
3180
3181 #. type: Plain text
3182 #: build/C/man3/getaddrinfo_a.3:191
3183 msgid ""
3184 "The B<gai_suspend>()  function suspends execution of the calling thread, "
3185 "waiting for the completion of one or more requests in the array I<list>.  "
3186 "The I<nitems> argument specifies the size of the array I<list>.  The call "
3187 "blocks until one of the following occurs:"
3188 msgstr ""
3189
3190 #. type: Plain text
3191 #: build/C/man3/getaddrinfo_a.3:195
3192 msgid "One or more of the operations in I<list> completes."
3193 msgstr ""
3194
3195 #. type: Plain text
3196 #: build/C/man3/getaddrinfo_a.3:197
3197 msgid "The call is interrupted by a signal that is caught."
3198 msgstr ""
3199
3200 #. type: Plain text
3201 #: build/C/man3/getaddrinfo_a.3:210
3202 msgid ""
3203 "The time interval specified in I<timeout> elapses.  This argument specifies "
3204 "a timeout in seconds plus nanoseconds (see B<nanosleep>(2)  for details of "
3205 "the I<timespec> structure).  If I<timeout> is NULL, then the call blocks "
3206 "indefinitely (until one of the events above occurs)."
3207 msgstr ""
3208
3209 #. type: Plain text
3210 #: build/C/man3/getaddrinfo_a.3:215
3211 msgid ""
3212 "No explicit indication of which request was completed is given; you must "
3213 "determine which request(s) have completed by iterating with B<gai_error>()  "
3214 "over the list of requests."
3215 msgstr ""
3216
3217 #. type: Plain text
3218 #: build/C/man3/getaddrinfo_a.3:225
3219 msgid ""
3220 "The B<gai_error>()  function returns the status of the request I<req>: "
3221 "either B<EAI_INPROGRESS> if the request was not completed yet, 0 if it was "
3222 "handled successfully, or an error code if the request could not be resolved."
3223 msgstr ""
3224
3225 #. type: Plain text
3226 #: build/C/man3/getaddrinfo_a.3:242
3227 msgid ""
3228 "The B<gai_cancel>()  function cancels the request I<req>.  If the request "
3229 "has been canceled successfully, the error status of the request will be set "
3230 "to B<EAI_CANCELLED> and normal asynchronous notification will be performed.  "
3231 "The request cannot be canceled if it is currently being processed; in that "
3232 "case, it will be handled as if B<gai_cancel>()  has never been called.  If "
3233 "I<req> is NULL, an attempt is made to cancel all outstanding requests that "
3234 "the process has made."
3235 msgstr ""
3236
3237 #. type: Plain text
3238 #: build/C/man3/getaddrinfo_a.3:247
3239 msgid ""
3240 "The B<getaddrinfo_a>()  function returns 0 if all of the requests have been "
3241 "enqueued successfully, or one of the following nonzero error codes:"
3242 msgstr ""
3243
3244 #. type: Plain text
3245 #: build/C/man3/getaddrinfo_a.3:252
3246 msgid ""
3247 "The resources necessary to enqueue the look-up requests were not available.  "
3248 "The application may check the error status of each request to determine "
3249 "which ones failed."
3250 msgstr ""
3251
3252 #. type: Plain text
3253 #: build/C/man3/getaddrinfo_a.3:259
3254 msgid "I<mode> is invalid."
3255 msgstr ""
3256
3257 #. type: Plain text
3258 #: build/C/man3/getaddrinfo_a.3:264
3259 msgid ""
3260 "The B<gai_suspend>()  function returns 0 if at least one of the listed "
3261 "requests has been completed.  Otherwise, it returns one of the following "
3262 "nonzero error codes:"
3263 msgstr ""
3264
3265 #. type: Plain text
3266 #: build/C/man3/getaddrinfo_a.3:267
3267 msgid "The given timeout expired before any of the requests could be completed."
3268 msgstr ""
3269
3270 #. type: TP
3271 #: build/C/man3/getaddrinfo_a.3:267 build/C/man3/getaddrinfo_a.3:297
3272 #, no-wrap
3273 msgid "B<EAI_ALLDONE>"
3274 msgstr ""
3275
3276 #. type: Plain text
3277 #: build/C/man3/getaddrinfo_a.3:270
3278 msgid "There were no actual requests given to the function."
3279 msgstr ""
3280
3281 #. type: TP
3282 #: build/C/man3/getaddrinfo_a.3:270
3283 #, no-wrap
3284 msgid "B<EAI_INTR>"
3285 msgstr ""
3286
3287 #. type: Plain text
3288 #: build/C/man3/getaddrinfo_a.3:275
3289 msgid ""
3290 "A signal has interrupted the function.  Note that this interruption might "
3291 "have been caused by signal notification of some completed look-up request."
3292 msgstr ""
3293
3294 #. type: Plain text
3295 #: build/C/man3/getaddrinfo_a.3:287
3296 msgid ""
3297 "The B<gai_error>()  function can return B<EAI_INPROGRESS> for an unfinished "
3298 "look-up request, 0 for a successfully completed look-up (as described "
3299 "above), one of the error codes that could be returned by B<getaddrinfo>(3), "
3300 "or the error code B<EAI_CANCELLED> if the request has been canceled "
3301 "explicitly before it could be finished."
3302 msgstr ""
3303
3304 #. type: Plain text
3305 #: build/C/man3/getaddrinfo_a.3:291
3306 msgid "The B<gai_cancel>()  function can return one of these values:"
3307 msgstr ""
3308
3309 #. type: TP
3310 #: build/C/man3/getaddrinfo_a.3:291
3311 #, no-wrap
3312 msgid "B<EAI_CANCELLED>"
3313 msgstr ""
3314
3315 #. type: Plain text
3316 #: build/C/man3/getaddrinfo_a.3:294
3317 msgid "The request has been canceled successfully."
3318 msgstr ""
3319
3320 #. type: TP
3321 #: build/C/man3/getaddrinfo_a.3:294
3322 #, no-wrap
3323 msgid "B<EAI_NOTCANCELLED>"
3324 msgstr ""
3325
3326 #. type: Plain text
3327 #: build/C/man3/getaddrinfo_a.3:297
3328 msgid "The request has not been canceled."
3329 msgstr ""
3330
3331 #. type: Plain text
3332 #: build/C/man3/getaddrinfo_a.3:300
3333 msgid "The request has already completed."
3334 msgstr ""
3335
3336 #. type: Plain text
3337 #: build/C/man3/getaddrinfo_a.3:305 build/C/man3/getnameinfo.3:197
3338 msgid ""
3339 "The B<gai_strerror>(3)  function translates these error codes to a human "
3340 "readable string, suitable for error reporting."
3341 msgstr ""
3342
3343 #. type: Plain text
3344 #: build/C/man3/getaddrinfo_a.3:308
3345 msgid ""
3346 "These functions are GNU extensions; they first appeared in glibc in version "
3347 "2.2.3."
3348 msgstr ""
3349
3350 #. type: Plain text
3351 #: build/C/man3/getaddrinfo_a.3:314
3352 msgid ""
3353 "The interface of B<getaddrinfo_a>()  was modeled after the B<lio_listio>(3)  "
3354 "interface."
3355 msgstr ""
3356
3357 #. type: Plain text
3358 #: build/C/man3/getaddrinfo_a.3:318
3359 msgid ""
3360 "Two examples are provided: a simple example that resolves several requests "
3361 "in parallel synchronously, and a complex example showing some of the "
3362 "asynchronous capabilities."
3363 msgstr ""
3364
3365 #. type: SS
3366 #: build/C/man3/getaddrinfo_a.3:318
3367 #, no-wrap
3368 msgid "Synchronous example"
3369 msgstr ""
3370
3371 #. type: Plain text
3372 #: build/C/man3/getaddrinfo_a.3:323
3373 msgid ""
3374 "The program below simply resolves several hostnames in parallel, giving a "
3375 "speed-up compared to resolving the hostnames sequentially using "
3376 "B<getaddrinfo>(3).  The program might be used like this:"
3377 msgstr ""
3378
3379 #. type: Plain text
3380 #: build/C/man3/getaddrinfo_a.3:330
3381 #, no-wrap
3382 msgid ""
3383 "$ B<./a.out ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz>\n"
3384 "ftp.us.kernel.org: 128.30.2.36\n"
3385 "enoent.linuxfoundation.org: Name or service not known\n"
3386 "gnu.cz: 87.236.197.13\n"
3387 msgstr ""
3388
3389 #. type: Plain text
3390 #: build/C/man3/getaddrinfo_a.3:334
3391 msgid "Here is the program source code"
3392 msgstr ""
3393
3394 #. type: Plain text
3395 #: build/C/man3/getaddrinfo_a.3:341 build/C/man3/getaddrinfo_a.3:430
3396 #, no-wrap
3397 msgid ""
3398 "#define _GNU_SOURCE\n"
3399 "#include E<lt>netdb.hE<gt>\n"
3400 "#include E<lt>stdio.hE<gt>\n"
3401 "#include E<lt>stdlib.hE<gt>\n"
3402 "#include E<lt>string.hE<gt>\n"
3403 msgstr ""
3404
3405 #. type: Plain text
3406 #: build/C/man3/getaddrinfo_a.3:349
3407 #, no-wrap
3408 msgid ""
3409 "int\n"
3410 "main(int argc, char *argv[])\n"
3411 "{\n"
3412 "    int i, ret;\n"
3413 "    struct gaicb *reqs[argc - 1];\n"
3414 "    char host[NI_MAXHOST];\n"
3415 "    struct addrinfo *res;\n"
3416 msgstr ""
3417
3418 #. type: Plain text
3419 #: build/C/man3/getaddrinfo_a.3:354
3420 #, no-wrap
3421 msgid ""
3422 "    if (argc E<lt> 2) {\n"
3423 "        fprintf(stderr, \"Usage: %s HOST...\\en\", argv[0]);\n"
3424 "        exit(EXIT_FAILURE);\n"
3425 "    }\n"
3426 msgstr ""
3427
3428 #. type: Plain text
3429 #: build/C/man3/getaddrinfo_a.3:364
3430 #, no-wrap
3431 msgid ""
3432 "    for (i = 0; i E<lt> argc - 1; i++) {\n"
3433 "        reqs[i] = malloc(sizeof(*reqs[0]));\n"
3434 "        if (reqs[i] == NULL) {\n"
3435 "            perror(\"malloc\");\n"
3436 "            exit(EXIT_FAILURE);\n"
3437 "        }\n"
3438 "        memset(reqs[i], 0, sizeof(*reqs[0]));\n"
3439 "        reqs[i]-E<gt>ar_name = argv[i + 1];\n"
3440 "    }\n"
3441 msgstr ""
3442
3443 #. type: Plain text
3444 #: build/C/man3/getaddrinfo_a.3:371
3445 #, no-wrap
3446 msgid ""
3447 "    ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL);\n"
3448 "    if (ret != 0) {\n"
3449 "        fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
3450 "                gai_strerror(ret));\n"
3451 "        exit(EXIT_FAILURE);\n"
3452 "    }\n"
3453 msgstr ""
3454
3455 #. type: Plain text
3456 #: build/C/man3/getaddrinfo_a.3:377
3457 #, no-wrap
3458 msgid ""
3459 "    for (i = 0; i E<lt> argc - 1; i++) {\n"
3460 "        printf(\"%s: \", reqs[i]-E<gt>ar_name);\n"
3461 "        ret = gai_error(reqs[i]);\n"
3462 "        if (ret == 0) {\n"
3463 "            res = reqs[i]-E<gt>ar_result;\n"
3464 msgstr ""
3465
3466 #. type: Plain text
3467 #: build/C/man3/getaddrinfo_a.3:387
3468 #, no-wrap
3469 msgid ""
3470 "            ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
3471 "                    host, sizeof(host),\n"
3472 "                    NULL, 0, NI_NUMERICHOST);\n"
3473 "            if (ret != 0) {\n"
3474 "                fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
3475 "                        gai_strerror(ret));\n"
3476 "                exit(EXIT_FAILURE);\n"
3477 "            }\n"
3478 "            puts(host);\n"
3479 msgstr ""
3480
3481 #. type: Plain text
3482 #: build/C/man3/getaddrinfo_a.3:394
3483 #, no-wrap
3484 msgid ""
3485 "        } else {\n"
3486 "            puts(gai_strerror(ret));\n"
3487 "        }\n"
3488 "    }\n"
3489 "    exit(EXIT_SUCCESS);\n"
3490 "}\n"
3491 msgstr ""
3492
3493 #. type: SS
3494 #: build/C/man3/getaddrinfo_a.3:395
3495 #, no-wrap
3496 msgid "Asynchronous example"
3497 msgstr ""
3498
3499 #. type: Plain text
3500 #: build/C/man3/getaddrinfo_a.3:400
3501 msgid ""
3502 "This example shows a simple interactive B<getaddrinfo_a>()  front-end.  The "
3503 "notification facility is not demonstrated."
3504 msgstr ""
3505
3506 #. type: Plain text
3507 #: build/C/man3/getaddrinfo_a.3:402
3508 msgid "An example session might look like this:"
3509 msgstr ""
3510
3511 #. type: Plain text
3512 #: build/C/man3/getaddrinfo_a.3:419
3513 #, no-wrap
3514 msgid ""
3515 "$ B<./a.out>\n"
3516 "E<gt> a ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz\n"
3517 "E<gt> c 2\n"
3518 "[2] gnu.cz: Request not canceled\n"
3519 "E<gt> w 0 1\n"
3520 "[00] ftp.us.kernel.org: Finished\n"
3521 "E<gt> l\n"
3522 "[00] ftp.us.kernel.org: 216.165.129.139\n"
3523 "[01] enoent.linuxfoundation.org: Processing request in progress\n"
3524 "[02] gnu.cz: 87.236.197.13\n"
3525 "E<gt> l\n"
3526 "[00] ftp.us.kernel.org: 216.165.129.139\n"
3527 "[01] enoent.linuxfoundation.org: Name or service not known\n"
3528 "[02] gnu.cz: 87.236.197.13\n"
3529 msgstr ""
3530
3531 #. type: Plain text
3532 #: build/C/man3/getaddrinfo_a.3:423
3533 msgid "The program source is as follows:"
3534 msgstr ""
3535
3536 #. type: Plain text
3537 #: build/C/man3/getaddrinfo_a.3:433
3538 #, no-wrap
3539 msgid ""
3540 "static struct gaicb **reqs = NULL;\n"
3541 "static int nreqs = 0;\n"
3542 msgstr ""
3543
3544 #. type: Plain text
3545 #: build/C/man3/getaddrinfo_a.3:438
3546 #, no-wrap
3547 msgid ""
3548 "static char *\n"
3549 "getcmd(void)\n"
3550 "{\n"
3551 "    static char buf[256];\n"
3552 msgstr ""
3553
3554 #. type: Plain text
3555 #: build/C/man3/getaddrinfo_a.3:442
3556 #, no-wrap
3557 msgid ""
3558 "    fputs(\"E<gt> \", stdout); fflush(stdout);\n"
3559 "    if (fgets(buf, sizeof(buf), stdin) == NULL)\n"
3560 "        return NULL;\n"
3561 msgstr ""
3562
3563 #. type: Plain text
3564 #: build/C/man3/getaddrinfo_a.3:445
3565 #, no-wrap
3566 msgid ""
3567 "    if (buf[strlen(buf) - 1] == \\(aq\\en\\(aq)\n"
3568 "        buf[strlen(buf) - 1] = 0;\n"
3569 msgstr ""
3570
3571 #. type: Plain text
3572 #: build/C/man3/getaddrinfo_a.3:448
3573 #, no-wrap
3574 msgid ""
3575 "    return buf;\n"
3576 "}\n"
3577 msgstr ""
3578
3579 #. type: Plain text
3580 #: build/C/man3/getaddrinfo_a.3:456
3581 #, no-wrap
3582 msgid ""
3583 "/* Add requests for specified hostnames */\n"
3584 "static void\n"
3585 "add_requests(void)\n"
3586 "{\n"
3587 "    int nreqs_base = nreqs;\n"
3588 "    char *host;\n"
3589 "    int ret;\n"
3590 msgstr ""
3591
3592 #. type: Plain text
3593 #: build/C/man3/getaddrinfo_a.3:460
3594 #, no-wrap
3595 msgid ""
3596 "    while ((host = strtok(NULL, \" \"))) {\n"
3597 "        nreqs++;\n"
3598 "        reqs = realloc(reqs, nreqs * sizeof(reqs[0]));\n"
3599 msgstr ""
3600
3601 #. type: Plain text
3602 #: build/C/man3/getaddrinfo_a.3:464
3603 #, no-wrap
3604 msgid ""
3605 "        reqs[nreqs - 1] = calloc(1, sizeof(*reqs[0]));\n"
3606 "        reqs[nreqs - 1]-E<gt>ar_name = strdup(host);\n"
3607 "    }\n"
3608 msgstr ""
3609
3610 #. type: Plain text
3611 #: build/C/man3/getaddrinfo_a.3:466
3612 #, no-wrap
3613 msgid "    /* Queue nreqs_base..nreqs requests. */\n"
3614 msgstr ""
3615
3616 #. type: Plain text
3617 #: build/C/man3/getaddrinfo_a.3:475
3618 #, no-wrap
3619 msgid ""
3620 "    ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],\n"
3621 "                        nreqs - nreqs_base, NULL);\n"
3622 "    if (ret) {\n"
3623 "        fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
3624 "                gai_strerror(ret));\n"
3625 "        exit(EXIT_FAILURE);\n"
3626 "    }\n"
3627 "}\n"
3628 msgstr ""
3629
3630 #. type: Plain text
3631 #: build/C/man3/getaddrinfo_a.3:484
3632 #, no-wrap
3633 msgid ""
3634 "/* Wait until at least one of specified requests completes */\n"
3635 "static void\n"
3636 "wait_requests(void)\n"
3637 "{\n"
3638 "    char *id;\n"
3639 "    int i, ret, n;\n"
3640 "    struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));\n"
3641 "                /* NULL elements are ignored by gai_suspend(). */\n"
3642 msgstr ""
3643
3644 #. type: Plain text
3645 #: build/C/man3/getaddrinfo_a.3:487 build/C/man3/getaddrinfo_a.3:524
3646 #, no-wrap
3647 msgid ""
3648 "    while ((id = strtok(NULL, \" \")) != NULL) {\n"
3649 "        n = atoi(id);\n"
3650 msgstr ""
3651
3652 #. type: Plain text
3653 #: build/C/man3/getaddrinfo_a.3:492 build/C/man3/getaddrinfo_a.3:529
3654 #, no-wrap
3655 msgid ""
3656 "        if (n E<gt>= nreqs) {\n"
3657 "            printf(\"Bad request number: %s\\en\", id);\n"
3658 "            return;\n"
3659 "        }\n"
3660 msgstr ""
3661
3662 #. type: Plain text
3663 #: build/C/man3/getaddrinfo_a.3:495
3664 #, no-wrap
3665 msgid ""
3666 "        wait_reqs[n] = reqs[n];\n"
3667 "    }\n"
3668 msgstr ""
3669
3670 #. type: Plain text
3671 #: build/C/man3/getaddrinfo_a.3:501
3672 #, no-wrap
3673 msgid ""
3674 "    ret = gai_suspend(wait_reqs, nreqs, NULL);\n"
3675 "    if (ret) {\n"
3676 "        printf(\"gai_suspend(): %s\\en\", gai_strerror(ret));\n"
3677 "        return;\n"
3678 "    }\n"
3679 msgstr ""
3680
3681 #. type: Plain text
3682 #: build/C/man3/getaddrinfo_a.3:505
3683 #, no-wrap
3684 msgid ""
3685 "    for (i = 0; i E<lt> nreqs; i++) {\n"
3686 "        if (wait_reqs[i] == NULL)\n"
3687 "            continue;\n"
3688 msgstr ""
3689
3690 #. type: Plain text
3691 #: build/C/man3/getaddrinfo_a.3:509
3692 #, no-wrap
3693 msgid ""
3694 "        ret = gai_error(reqs[i]);\n"
3695 "        if (ret == EAI_INPROGRESS)\n"
3696 "            continue;\n"
3697 msgstr ""
3698
3699 #. type: Plain text
3700 #: build/C/man3/getaddrinfo_a.3:514
3701 #, no-wrap
3702 msgid ""
3703 "        printf(\"[%02d] %s: %s\\en\", i, reqs[i]-E<gt>ar_name,\n"
3704 "               ret == 0 ? \"Finished\" : gai_strerror(ret));\n"
3705 "    }\n"
3706 "}\n"
3707 msgstr ""
3708
3709 #. type: Plain text
3710 #: build/C/man3/getaddrinfo_a.3:521
3711 #, no-wrap
3712 msgid ""
3713 "/* Cancel specified requests */\n"
3714 "static void\n"
3715 "cancel_requests(void)\n"
3716 "{\n"
3717 "    char *id;\n"
3718 "    int ret, n;\n"
3719 msgstr ""
3720
3721 #. type: Plain text
3722 #: build/C/man3/getaddrinfo_a.3:535
3723 #, no-wrap
3724 msgid ""
3725 "        ret = gai_cancel(reqs[n]);\n"
3726 "        printf(\"[%s] %s: %s\\en\", id, reqs[atoi(id)]-E<gt>ar_name,\n"
3727 "               gai_strerror(ret));\n"
3728 "    }\n"
3729 "}\n"
3730 msgstr ""
3731
3732 #. type: Plain text
3733 #: build/C/man3/getaddrinfo_a.3:543
3734 #, no-wrap
3735 msgid ""
3736 "/* List all requests */\n"
3737 "static void\n"
3738 "list_requests(void)\n"
3739 "{\n"
3740 "    int i, ret;\n"
3741 "    char host[NI_MAXHOST];\n"
3742 "    struct addrinfo *res;\n"
3743 msgstr ""
3744
3745 #. type: Plain text
3746 #: build/C/man3/getaddrinfo_a.3:547
3747 #, no-wrap
3748 msgid ""
3749 "    for (i = 0; i E<lt> nreqs; i++) {\n"
3750 "        printf(\"[%02d] %s: \", i, reqs[i]-E<gt>ar_name);\n"
3751 "        ret = gai_error(reqs[i]);\n"
3752 msgstr ""
3753
3754 #. type: Plain text
3755 #: build/C/man3/getaddrinfo_a.3:550
3756 #, no-wrap
3757 msgid ""
3758 "        if (!ret) {\n"
3759 "            res = reqs[i]-E<gt>ar_result;\n"
3760 msgstr ""
3761
3762 #. type: Plain text
3763 #: build/C/man3/getaddrinfo_a.3:565
3764 #, no-wrap
3765 msgid ""
3766 "            ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
3767 "                              host, sizeof(host),\n"
3768 "                              NULL, 0, NI_NUMERICHOST);\n"
3769 "            if (ret) {\n"
3770 "                fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
3771 "                        gai_strerror(ret));\n"
3772 "                exit(EXIT_FAILURE);\n"
3773 "            }\n"
3774 "            puts(host);\n"
3775 "        } else {\n"
3776 "            puts(gai_strerror(ret));\n"
3777 "        }\n"
3778 "    }\n"
3779 "}\n"
3780 msgstr ""
3781
3782 #. type: Plain text
3783 #: build/C/man3/getaddrinfo_a.3:571
3784 #, no-wrap
3785 msgid ""
3786 "int\n"
3787 "main(int argc, char *argv[])\n"
3788 "{\n"
3789 "    char *cmdline;\n"
3790 "    char *cmd;\n"
3791 msgstr ""
3792
3793 #. type: Plain text
3794 #: build/C/man3/getaddrinfo_a.3:574
3795 #, no-wrap
3796 msgid ""
3797 "    while ((cmdline = getcmd()) != NULL) {\n"
3798 "        cmd = strtok(cmdline, \" \");\n"
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man3/getaddrinfo_a.3:599
3803 #, no-wrap
3804 msgid ""
3805 "        if (cmd == NULL) {\n"
3806 "            list_requests();\n"
3807 "        } else {\n"
3808 "            switch (cmd[0]) {\n"
3809 "            case \\(aqa\\(aq:\n"
3810 "                add_requests();\n"
3811 "                break;\n"
3812 "            case \\(aqw\\(aq:\n"
3813 "                wait_requests();\n"
3814 "                break;\n"
3815 "            case \\(aqc\\(aq:\n"
3816 "                cancel_requests();\n"
3817 "                break;\n"
3818 "            case \\(aql\\(aq:\n"
3819 "                list_requests();\n"
3820 "                break;\n"
3821 "            default:\n"
3822 "                fprintf(stderr, \"Bad command: %c\\en\", cmd[0]);\n"
3823 "                break;\n"
3824 "            }\n"
3825 "        }\n"
3826 "    }\n"
3827 "    exit(EXIT_SUCCESS);\n"
3828 "}\n"
3829 msgstr ""
3830
3831 #. type: Plain text
3832 #: build/C/man3/getaddrinfo_a.3:607
3833 msgid ""
3834 "B<getaddrinfo>(3), B<inet>(3), B<lio_listio>(3), B<hostname>(7), B<ip>(7), "
3835 "B<sigevent>(7)"
3836 msgstr ""
3837
3838 #. type: TH
3839 #: build/C/man1/getent.1:24
3840 #, no-wrap
3841 msgid "GETENT"
3842 msgstr ""
3843
3844 #. type: TH
3845 #: build/C/man1/getent.1:24
3846 #, no-wrap
3847 msgid "2013-03-15"
3848 msgstr ""
3849
3850 #. type: TH
3851 #: build/C/man1/getent.1:24
3852 #, no-wrap
3853 msgid "User Commands"
3854 msgstr ""
3855
3856 #. type: Plain text
3857 #: build/C/man1/getent.1:27
3858 msgid "getent - get entries from Name Service Switch libraries"
3859 msgstr ""
3860
3861 #. type: Plain text
3862 #: build/C/man1/getent.1:30
3863 msgid "B<getent> I<database> [I<key> ...]"
3864 msgstr ""
3865
3866 #. type: Plain text
3867 #: build/C/man1/getent.1:45
3868 msgid ""
3869 "The B<getent> command displays entries from databases supported by the Name "
3870 "Service Switch libraries, which are configured in I</etc/nsswitch.conf>.  If "
3871 "one or more I<key> arguments are provided, then only the entries that match "
3872 "the supplied keys will be displayed.  Otherwise, if no I<key> is provided, "
3873 "all entries will be displayed (unless the database does not support "
3874 "enumeration)."
3875 msgstr ""
3876
3877 #. type: Plain text
3878 #: build/C/man1/getent.1:49
3879 msgid ""
3880 "The I<database> may be any of those supported by the GNU C Library, listed "
3881 "below:"
3882 msgstr ""
3883
3884 #. type: TP
3885 #: build/C/man1/getent.1:50
3886 #, no-wrap
3887 msgid "B<ahosts>"
3888 msgstr ""
3889
3890 #. type: Plain text
3891 #: build/C/man1/getent.1:71
3892 msgid ""
3893 "When no I<key> is provided, use B<sethostent>(3), B<gethostent>(3), and "
3894 "B<endhostent>(3)  to enumerate the hosts database.  This is identical to "
3895 "using B<hosts>.  When one or more I<key> arguments are provided, pass each "
3896 "I<key> in succession to B<getaddrinfo>(3)  with the address family "
3897 "B<AF_UNSPEC>, enumerating each socket address structure returned."
3898 msgstr ""
3899
3900 #. type: TP
3901 #: build/C/man1/getent.1:71
3902 #, no-wrap
3903 msgid "B<ahostsv4>"
3904 msgstr ""
3905
3906 #. type: Plain text
3907 #: build/C/man1/getent.1:77
3908 msgid "Same as B<ahosts>, but use the address family B<AF_INET>."
3909 msgstr ""
3910
3911 #. type: TP
3912 #: build/C/man1/getent.1:77
3913 #, no-wrap
3914 msgid "B<ahostsv6>"
3915 msgstr ""
3916
3917 #. type: Plain text
3918 #: build/C/man1/getent.1:88
3919 msgid ""
3920 "Same as B<ahosts>, but use the address family B<AF_INET6>.  The call to "
3921 "B<getaddrinfo>(3)  in this case includes the B<AI_V4MAPPED> flag."
3922 msgstr ""
3923
3924 #. type: TP
3925 #: build/C/man1/getent.1:88 build/C/man5/nsswitch.conf.5:44
3926 #, no-wrap
3927 msgid "B<aliases>"
3928 msgstr ""
3929
3930 #. type: Plain text
3931 #: build/C/man1/getent.1:105
3932 msgid ""
3933 "When no I<key> is provided, use B<setaliasent>(3), B<getaliasent>(3), and "
3934 "B<endaliasent>(3)  to enumerate the aliases database.  When one or more "
3935 "I<key> arguments are provided, pass each I<key> in succession to "
3936 "B<getaliasbyname>(3)  and display the result."
3937 msgstr ""
3938
3939 #. type: TP
3940 #: build/C/man1/getent.1:105 build/C/man5/nsswitch.conf.5:49
3941 #, no-wrap
3942 msgid "B<ethers>"
3943 msgstr ""
3944
3945 #. type: Plain text
3946 #: build/C/man1/getent.1:121
3947 msgid ""
3948 "When one or more I<key> arguments are provided, pass each I<key> in "
3949 "succession to B<ether_aton>(3)  and B<ether_hostton>(3)  until a result is "
3950 "obtained, and display the result.  Enumeration is not supported on "
3951 "B<ethers>, so a I<key> must be provided."
3952 msgstr ""
3953
3954 #. type: TP
3955 #: build/C/man1/getent.1:121 build/C/man5/nsswitch.conf.5:52
3956 #, no-wrap
3957 msgid "B<group>"
3958 msgstr ""
3959
3960 #. type: Plain text
3961 #: build/C/man1/getent.1:142
3962 msgid ""
3963 "When no I<key> is provided, use B<setgrent>(3), B<getgrent>(3), and "
3964 "B<endgrent>(3)  to enumerate the group database.  When one or more I<key> "
3965 "arguments are provided, pass each numeric I<key> to B<getgrgid>(3)  and each "
3966 "nonnumeric I<key> to B<getgrnam>(3)  and display the result."
3967 msgstr ""
3968
3969 #. type: TP
3970 #: build/C/man1/getent.1:142
3971 #, no-wrap
3972 msgid "B<gshadow>"
3973 msgstr ""
3974
3975 #. type: Plain text
3976 #: build/C/man1/getent.1:159
3977 msgid ""
3978 "When no I<key> is provided, use B<setsgent>(3), B<getsgent>(3), and "
3979 "B<endsgent>(3)  to enumerate the gshadow database.  When one or more I<key> "
3980 "arguments are provided, pass each I<key> in succession to B<getsgnam>(3)  "
3981 "and display the result."
3982 msgstr ""
3983
3984 #. type: TP
3985 #: build/C/man1/getent.1:159 build/C/man5/nsswitch.conf.5:57
3986 #, no-wrap
3987 msgid "B<hosts>"
3988 msgstr ""
3989
3990 #. type: Plain text
3991 #: build/C/man1/getent.1:182
3992 msgid ""
3993 "When no I<key> is provided, use B<sethostent>(3), B<gethostent>(3), and "
3994 "B<endhostent>(3)  to enumerate the hosts database.  When one or more I<key> "
3995 "arguments are provided, pass each I<key> to B<gethostbyaddr>(3)  or "
3996 "B<gethostbyname2>(3), depending on whether a call to B<inet_pton>(3)  "
3997 "indicates that the I<key> is an IPv6 or IPv4 address or not, and display the "
3998 "result."
3999 msgstr ""
4000
4001 #. type: TP
4002 #: build/C/man1/getent.1:182 build/C/man5/nsswitch.conf.5:62
4003 #, no-wrap
4004 msgid "B<initgroups>"
4005 msgstr ""
4006
4007 #. type: Plain text
4008 #: build/C/man1/getent.1:196
4009 msgid ""
4010 "When one or more I<key> arguments are provided, pass each I<key> in "
4011 "succession to B<getgrouplist>(3)  and display the result.  Enumeration is "
4012 "not supported on B<initgroups>, so a I<key> must be provided."
4013 msgstr ""
4014
4015 #. type: TP
4016 #: build/C/man1/getent.1:196 build/C/man5/nsswitch.conf.5:67
4017 #, no-wrap
4018 msgid "B<netgroup>"
4019 msgstr ""
4020
4021 #. type: Plain text
4022 #: build/C/man1/getent.1:222
4023 msgid ""
4024 "When one I<key> is provided, pass the I<key> to B<setnetgrent>(3)  and, "
4025 "using B<getnetgrent>(3)  display the resulting string triple (I<hostname>, "
4026 "I<username>, I<domainname>).  Alternatively, three I<keys> may be provided, "
4027 "which are interpreted as the I<hostname>, I<username> and I<domainname> to "
4028 "match to a netgroup name via B<innetgr>(3).  Enumeration is not supported on "
4029 "B<netgroup>, so either one or three I<keys> must be provided."
4030 msgstr ""
4031
4032 #. type: TP
4033 #: build/C/man1/getent.1:222 build/C/man5/nsswitch.conf.5:71
4034 #, no-wrap
4035 msgid "B<networks>"
4036 msgstr ""
4037
4038 #. type: Plain text
4039 #: build/C/man1/getent.1:243
4040 msgid ""
4041 "When no I<key> is provided, use B<setnetent>(3), B<getnetent>(3), and "
4042 "B<endnetent>(3)  to enumerate the networks database.  When one or more "
4043 "I<key> arguments are provided, pass each numeric I<key> to "
4044 "B<getnetbyaddr>(3)  and each nonnumeric I<key> to B<getnetbyname>(3)  and "
4045 "display the result."
4046 msgstr ""
4047
4048 #. type: TP
4049 #: build/C/man1/getent.1:243 build/C/man5/nsswitch.conf.5:76
4050 #, no-wrap
4051 msgid "B<passwd>"
4052 msgstr ""
4053
4054 #. type: Plain text
4055 #: build/C/man1/getent.1:264
4056 msgid ""
4057 "When no I<key> is provided, use B<setpwent>(3), B<getpwent>(3), and "
4058 "B<endpwent>(3)  to enumerate the passwd database.  When one or more I<key> "
4059 "arguments are provided, pass each numeric I<key> to B<getpwuid>(3)  and each "
4060 "nonnumeric I<key> to B<getpwnam>(3)  and display the result."
4061 msgstr ""
4062
4063 #. type: TP
4064 #: build/C/man1/getent.1:264 build/C/man5/nsswitch.conf.5:81
4065 #, no-wrap
4066 msgid "B<protocols>"
4067 msgstr ""
4068
4069 #. type: Plain text
4070 #: build/C/man1/getent.1:285
4071 msgid ""
4072 "When no I<key> is provided, use B<setprotoent>(3), B<getprotoent>(3), and "
4073 "B<endprotoent>(3)  to enumerate the protocols database.  When one or more "
4074 "I<key> arguments are provided, pass each numeric I<key> to "
4075 "B<getprotobynumber>(3)  and each nonnumeric I<key> to B<getprotobyname>(3)  "
4076 "and display the result."
4077 msgstr ""
4078
4079 #. type: TP
4080 #: build/C/man1/getent.1:285 build/C/man5/nsswitch.conf.5:89
4081 #, no-wrap
4082 msgid "B<rpc>"
4083 msgstr ""
4084
4085 #. type: Plain text
4086 #: build/C/man1/getent.1:306
4087 msgid ""
4088 "When no I<key> is provided, use B<setrpcent>(3), B<getrpcent>(3), and "
4089 "B<endrpcent>(3)  to enumerate the rpc database.  When one or more I<key> "
4090 "arguments are provided, pass each numeric I<key> to B<getrpcbynumber>(3)  "
4091 "and each nonnumeric I<key> to B<getrpcbyname>(3)  and display the result."
4092 msgstr ""
4093
4094 #. type: TP
4095 #: build/C/man1/getent.1:306 build/C/man5/nsswitch.conf.5:94
4096 #, no-wrap
4097 msgid "B<services>"
4098 msgstr ""
4099
4100 #. type: Plain text
4101 #: build/C/man1/getent.1:327
4102 msgid ""
4103 "When no I<key> is provided, use B<setservent>(3), B<getservent>(3), and "
4104 "B<endservent>(3)  to enumerate the services database.  When one or more "
4105 "I<key> arguments are provided, pass each numeric I<key> to "
4106 "B<getservbynumber>(3)  and each nonnumeric I<key> to B<getservbyname>(3)  "
4107 "and display the result."
4108 msgstr ""
4109
4110 #. type: TP
4111 #: build/C/man1/getent.1:327 build/C/man5/nsswitch.conf.5:99
4112 #, no-wrap
4113 msgid "B<shadow>"
4114 msgstr ""
4115
4116 #. type: Plain text
4117 #: build/C/man1/getent.1:344
4118 msgid ""
4119 "When no I<key> is provided, use B<setspent>(3), B<getspent>(3), and "
4120 "B<endspent>(3)  to enumerate the shadow database.  When one or more I<key> "
4121 "arguments are provided, pass each I<key> in succession to B<getspnam>(3)  "
4122 "and display the result."
4123 msgstr ""
4124
4125 #. type: SH
4126 #: build/C/man1/getent.1:345
4127 #, no-wrap
4128 msgid "EXIT STATUS"
4129 msgstr ""
4130
4131 #. type: Plain text
4132 #: build/C/man1/getent.1:348
4133 msgid "One of the following exit values can be returned by B<getent>:"
4134 msgstr ""
4135
4136 #. type: TP
4137 #: build/C/man1/getent.1:349
4138 #, no-wrap
4139 msgid "B<0>"
4140 msgstr ""
4141
4142 #. type: Plain text
4143 #: build/C/man1/getent.1:352
4144 msgid "Command completed successfully."
4145 msgstr ""
4146
4147 #. type: TP
4148 #: build/C/man1/getent.1:352
4149 #, no-wrap
4150 msgid "B<1>"
4151 msgstr ""
4152
4153 #. type: Plain text
4154 #: build/C/man1/getent.1:357
4155 msgid "Missing arguments, or I<database> unknown."
4156 msgstr ""
4157
4158 #. type: TP
4159 #: build/C/man1/getent.1:357
4160 #, no-wrap
4161 msgid "B<2>"
4162 msgstr ""
4163
4164 #. type: Plain text
4165 #: build/C/man1/getent.1:363
4166 msgid "One or more supplied I<key> could not be found in the I<database>."
4167 msgstr ""
4168
4169 #. type: TP
4170 #: build/C/man1/getent.1:363
4171 #, no-wrap
4172 msgid "B<3>"
4173 msgstr ""
4174
4175 #. type: Plain text
4176 #: build/C/man1/getent.1:367
4177 msgid "Enumeration not supported on this I<database>."
4178 msgstr ""
4179
4180 #. type: Plain text
4181 #: build/C/man1/getent.1:370
4182 msgid "B<nsswitch.conf>(5)"
4183 msgstr ""
4184
4185 #. type: TH
4186 #: build/C/man3/gethostbyname.3:38
4187 #, no-wrap
4188 msgid "GETHOSTBYNAME"
4189 msgstr ""
4190
4191 #. type: TH
4192 #: build/C/man3/gethostbyname.3:38
4193 #, no-wrap
4194 msgid "2014-03-11"
4195 msgstr ""
4196
4197 #. type: Plain text
4198 #: build/C/man3/gethostbyname.3:46
4199 msgid ""
4200 "gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno, "
4201 "herror, hstrerror, gethostbyaddr_r, gethostbyname2, gethostbyname2_r, "
4202 "gethostbyname_r, gethostent_r - get network host entry"
4203 msgstr ""
4204
4205 #. type: Plain text
4206 #: build/C/man3/gethostbyname.3:50
4207 #, no-wrap
4208 msgid ""
4209 "B<#include E<lt>netdb.hE<gt>>\n"
4210 "B<extern int h_errno;>\n"
4211 msgstr ""
4212
4213 #. type: Plain text
4214 #: build/C/man3/gethostbyname.3:52
4215 #, no-wrap
4216 msgid "B<struct hostent *gethostbyname(const char *>I<name>B<);>\n"
4217 msgstr ""
4218
4219 #. type: Plain text
4220 #: build/C/man3/gethostbyname.3:56
4221 #, no-wrap
4222 msgid ""
4223 "B<#include E<lt>sys/socket.hE<gt>>       /* for AF_INET */\n"
4224 "B<struct hostent *gethostbyaddr(const void *>I<addr>B<,>\n"
4225 "B<                              socklen_t >I<len>B<, int >I<type>B<);>\n"
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man3/gethostbyname.3:58
4230 #, no-wrap
4231 msgid "B<void sethostent(int >I<stayopen>B<);>\n"
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man3/gethostbyname.3:60
4236 #, no-wrap
4237 msgid "B<void endhostent(void);>\n"
4238 msgstr ""
4239
4240 #. type: Plain text
4241 #: build/C/man3/gethostbyname.3:62
4242 #, no-wrap
4243 msgid "B<void herror(const char *>I<s>B<);>\n"
4244 msgstr ""
4245
4246 #. type: Plain text
4247 #: build/C/man3/gethostbyname.3:64
4248 #, no-wrap
4249 msgid "B<const char *hstrerror(int >I<err>B<);>\n"
4250 msgstr ""
4251
4252 #. type: Plain text
4253 #: build/C/man3/gethostbyname.3:66
4254 #, no-wrap
4255 msgid "/* System V/POSIX extension */\n"
4256 msgstr ""
4257
4258 #. type: Plain text
4259 #: build/C/man3/gethostbyname.3:68
4260 #, no-wrap
4261 msgid "B<struct hostent *gethostent(void);>\n"
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man3/gethostbyname.3:72
4266 #, no-wrap
4267 msgid "B<struct hostent *gethostbyname2(const char *>I<name>B<, int >I<af>B<);>\n"
4268 msgstr ""
4269
4270 #. type: Plain text
4271 #: build/C/man3/gethostbyname.3:76
4272 #, no-wrap
4273 msgid ""
4274 "B<int gethostent_r(>\n"
4275 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4276 ">I<buflen>B<,>\n"
4277 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4278 msgstr ""
4279
4280 #. type: Plain text
4281 #: build/C/man3/gethostbyname.3:80
4282 #, no-wrap
4283 msgid ""
4284 "B<int gethostbyaddr_r(const void *>I<addr>B<, socklen_t >I<len>B<, int "
4285 ">I<type>B<,>\n"
4286 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4287 ">I<buflen>B<,>\n"
4288 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4289 msgstr ""
4290
4291 #. type: Plain text
4292 #: build/C/man3/gethostbyname.3:84
4293 #, no-wrap
4294 msgid ""
4295 "B<int gethostbyname_r(const char *>I<name>B<,>\n"
4296 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4297 ">I<buflen>B<,>\n"
4298 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4299 msgstr ""
4300
4301 #. type: Plain text
4302 #: build/C/man3/gethostbyname.3:88
4303 #, no-wrap
4304 msgid ""
4305 "B<int gethostbyname2_r(const char *>I<name>B<, int >I<af,>\n"
4306 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4307 ">I<buflen>B<,>\n"
4308 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man3/gethostbyname.3:102
4313 msgid ""
4314 "B<gethostbyname2>(), B<gethostent_r>(), B<gethostbyaddr_r>(), "
4315 "B<gethostbyname_r>(), B<gethostbyname2_r>():"
4316 msgstr ""
4317
4318 #. type: Plain text
4319 #: 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
4320 msgid "_BSD_SOURCE || _SVID_SOURCE"
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man3/gethostbyname.3:108
4325 msgid "B<herror>(), B<hstrerror>():"
4326 msgstr ""
4327
4328 #. type: TP
4329 #: build/C/man3/gethostbyname.3:109
4330 #, no-wrap
4331 msgid "Since glibc 2.8:"
4332 msgstr ""
4333
4334 #. type: TP
4335 #: build/C/man3/gethostbyname.3:112
4336 #, no-wrap
4337 msgid "Before glibc 2.8:"
4338 msgstr ""
4339
4340 #. type: Plain text
4341 #: build/C/man3/gethostbyname.3:115 build/C/man3/gethostbyname.3:126
4342 msgid "none"
4343 msgstr ""
4344
4345 #. type: Plain text
4346 #: build/C/man3/gethostbyname.3:118
4347 msgid "B<h_errno>:"
4348 msgstr ""
4349
4350 #. type: TP
4351 #: build/C/man3/gethostbyname.3:119
4352 #, no-wrap
4353 msgid "Since glibc 2.12:"
4354 msgstr ""
4355
4356 #. type: Plain text
4357 #: build/C/man3/gethostbyname.3:123
4358 #, no-wrap
4359 msgid ""
4360 "_BSD_SOURCE || _SVID_SOURCE ||\n"
4361 "    (_POSIX_C_SOURCE E<lt> 200809L && _XOPEN_SOURCE E<lt> 700)\n"
4362 msgstr ""
4363
4364 #. type: TP
4365 #: build/C/man3/gethostbyname.3:123
4366 #, no-wrap
4367 msgid "Before glibc 2.12:"
4368 msgstr ""
4369
4370 #. type: Plain text
4371 #: build/C/man3/gethostbyname.3:143
4372 msgid ""
4373 "The B<gethostbyname*>(), B<gethostbyaddr*>(), B<herror>(), and "
4374 "B<hstrerror>()  functions are obsolete.  Applications should use "
4375 "B<getaddrinfo>(3), B<getnameinfo>(3), and B<gai_strerror>(3)  instead."
4376 msgstr ""
4377
4378 #. type: Plain text
4379 #: build/C/man3/gethostbyname.3:184
4380 msgid ""
4381 "The B<gethostbyname>()  function returns a structure of type I<hostent> for "
4382 "the given host I<name>.  Here I<name> is either a hostname, or an IPv4 "
4383 "address in standard dot notation (as for B<inet_addr>(3)), or an IPv6 "
4384 "address in colon (and possibly dot) notation.  (See RFC\\ 1884 for the "
4385 "description of IPv6 addresses.)  If I<name> is an IPv4 or IPv6 address, no "
4386 "lookup is performed and B<gethostbyname>()  simply copies I<name> into the "
4387 "I<h_name> field and its I<struct in_addr> equivalent into the "
4388 "I<h_addr_list[0]> field of the returned I<hostent> structure.  If I<name> "
4389 "doesn't end in a dot and the environment variable B<HOSTALIASES> is set, the "
4390 "alias file pointed to by B<HOSTALIASES> will first be searched for I<name> "
4391 "(see B<hostname>(7)  for the file format).  The current domain and its "
4392 "parents are searched unless I<name> ends in a dot."
4393 msgstr ""
4394
4395 #. type: Plain text
4396 #: build/C/man3/gethostbyname.3:200
4397 msgid ""
4398 "The B<gethostbyaddr>()  function returns a structure of type I<hostent> for "
4399 "the given host address I<addr> of length I<len> and address type I<type>.  "
4400 "Valid address types are B<AF_INET> and B<AF_INET6>.  The host address "
4401 "argument is a pointer to a struct of a type depending on the address type, "
4402 "for example a I<struct in_addr *> (probably obtained via a call to "
4403 "B<inet_addr>(3))  for address type B<AF_INET>."
4404 msgstr ""
4405
4406 #. type: Plain text
4407 #: build/C/man3/gethostbyname.3:207
4408 msgid ""
4409 "The B<sethostent>()  function specifies, if I<stayopen> is true (1), that a "
4410 "connected TCP socket should be used for the name server queries and that the "
4411 "connection should remain open during successive queries.  Otherwise, name "
4412 "server queries will use UDP datagrams."
4413 msgstr ""
4414
4415 #. type: Plain text
4416 #: build/C/man3/gethostbyname.3:212
4417 msgid ""
4418 "The B<endhostent>()  function ends the use of a TCP connection for name "
4419 "server queries."
4420 msgstr ""
4421
4422 #. type: Plain text
4423 #: build/C/man3/gethostbyname.3:217
4424 msgid ""
4425 "The (obsolete)  B<herror>()  function prints the error message associated "
4426 "with the current value of I<h_errno> on I<stderr>."
4427 msgstr ""
4428
4429 #. type: Plain text
4430 #: build/C/man3/gethostbyname.3:222
4431 msgid ""
4432 "The (obsolete)  B<hstrerror>()  function takes an error number (typically "
4433 "I<h_errno>) and returns the corresponding message string."
4434 msgstr ""
4435
4436 #.  (See
4437 #.  .BR resolv+ (8)).
4438 #. type: Plain text
4439 #: build/C/man3/gethostbyname.3:239
4440 msgid ""
4441 "The domain name queries carried out by B<gethostbyname>()  and "
4442 "B<gethostbyaddr>()  use a combination of any or all of the name server "
4443 "B<named>(8), a broken out line from I</etc/hosts>, and the Network "
4444 "Information Service (NIS or YP), depending upon the contents of the I<order> "
4445 "line in I</etc/host.conf>.  The default action is to query B<named>(8), "
4446 "followed by I</etc/hosts>."
4447 msgstr ""
4448
4449 #. type: Plain text
4450 #: build/C/man3/gethostbyname.3:241
4451 msgid "The I<hostent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
4452 msgstr ""
4453
4454 #. type: Plain text
4455 #: build/C/man3/gethostbyname.3:253
4456 #, no-wrap
4457 msgid ""
4458 "struct hostent {\n"
4459 "    char  *h_name;            /* official name of host */\n"
4460 "    char **h_aliases;         /* alias list */\n"
4461 "    int    h_addrtype;        /* host address type */\n"
4462 "    int    h_length;          /* length of address */\n"
4463 "    char **h_addr_list;       /* list of addresses */\n"
4464 "}\n"
4465 "#define h_addr h_addr_list[0] /* for backward compatibility */\n"
4466 msgstr ""
4467
4468 #. type: Plain text
4469 #: build/C/man3/gethostbyname.3:257
4470 msgid "The members of the I<hostent> structure are:"
4471 msgstr ""
4472
4473 #. type: TP
4474 #: build/C/man3/gethostbyname.3:257 build/C/man3/getipnodebyname.3:210
4475 #, no-wrap
4476 msgid "I<h_name>"
4477 msgstr ""
4478
4479 #. type: Plain text
4480 #: build/C/man3/gethostbyname.3:260
4481 msgid "The official name of the host."
4482 msgstr ""
4483
4484 #. type: TP
4485 #: build/C/man3/gethostbyname.3:260 build/C/man3/getipnodebyname.3:213
4486 #, no-wrap
4487 msgid "I<h_aliases>"
4488 msgstr ""
4489
4490 #. type: Plain text
4491 #: build/C/man3/gethostbyname.3:263
4492 msgid "An array of alternative names for the host, terminated by a null pointer."
4493 msgstr ""
4494
4495 #. type: TP
4496 #: build/C/man3/gethostbyname.3:263 build/C/man3/getipnodebyname.3:217
4497 #, no-wrap
4498 msgid "I<h_addrtype>"
4499 msgstr ""
4500
4501 #. type: Plain text
4502 #: build/C/man3/gethostbyname.3:270
4503 msgid "The type of address; always B<AF_INET> or B<AF_INET6> at present."
4504 msgstr ""
4505
4506 #. type: TP
4507 #: build/C/man3/gethostbyname.3:270 build/C/man3/getipnodebyname.3:239
4508 #, no-wrap
4509 msgid "I<h_length>"
4510 msgstr ""
4511
4512 #. type: Plain text
4513 #: build/C/man3/gethostbyname.3:273
4514 msgid "The length of the address in bytes."
4515 msgstr ""
4516
4517 #. type: TP
4518 #: build/C/man3/gethostbyname.3:273 build/C/man3/getipnodebyname.3:253
4519 #, no-wrap
4520 msgid "I<h_addr_list>"
4521 msgstr ""
4522
4523 #. type: Plain text
4524 #: build/C/man3/gethostbyname.3:277
4525 msgid ""
4526 "An array of pointers to network addresses for the host (in network byte "
4527 "order), terminated by a null pointer."
4528 msgstr ""
4529
4530 #. type: TP
4531 #: build/C/man3/gethostbyname.3:277
4532 #, no-wrap
4533 msgid "I<h_addr>"
4534 msgstr ""
4535
4536 #. type: Plain text
4537 #: build/C/man3/gethostbyname.3:280
4538 msgid "The first address in I<h_addr_list> for backward compatibility."
4539 msgstr ""
4540
4541 #. type: Plain text
4542 #: build/C/man3/gethostbyname.3:292
4543 msgid ""
4544 "The B<gethostbyname>()  and B<gethostbyaddr>()  functions return the "
4545 "I<hostent> structure or a null pointer if an error occurs.  On error, the "
4546 "I<h_errno> variable holds an error number.  When non-NULL, the return value "
4547 "may point at static data, see the notes below."
4548 msgstr ""
4549
4550 #. type: Plain text
4551 #: build/C/man3/gethostbyname.3:294
4552 msgid "The variable I<h_errno> can have the following values:"
4553 msgstr ""
4554
4555 #. type: TP
4556 #: build/C/man3/gethostbyname.3:294 build/C/man3/getipnodebyname.3:190
4557 #, no-wrap
4558 msgid "B<HOST_NOT_FOUND>"
4559 msgstr ""
4560
4561 #. type: Plain text
4562 #: build/C/man3/gethostbyname.3:297
4563 msgid "The specified host is unknown."
4564 msgstr ""
4565
4566 #. type: TP
4567 #: build/C/man3/gethostbyname.3:297
4568 #, no-wrap
4569 msgid "B<NO_ADDRESS> or B<NO_DATA>"
4570 msgstr ""
4571
4572 #. type: Plain text
4573 #: build/C/man3/gethostbyname.3:300
4574 msgid "The requested name is valid but does not have an IP address."
4575 msgstr ""
4576
4577 #. type: TP
4578 #: build/C/man3/gethostbyname.3:300 build/C/man3/getipnodebyname.3:199
4579 #, no-wrap
4580 msgid "B<NO_RECOVERY>"
4581 msgstr ""
4582
4583 #. type: Plain text
4584 #: build/C/man3/gethostbyname.3:303
4585 msgid "A nonrecoverable name server error occurred."
4586 msgstr ""
4587
4588 #. type: TP
4589 #: build/C/man3/gethostbyname.3:303 build/C/man3/getipnodebyname.3:202
4590 #, no-wrap
4591 msgid "B<TRY_AGAIN>"
4592 msgstr ""
4593
4594 #. type: Plain text
4595 #: build/C/man3/gethostbyname.3:307
4596 msgid ""
4597 "A temporary error occurred on an authoritative name server.  Try again "
4598 "later."
4599 msgstr ""
4600
4601 #. type: TP
4602 #: build/C/man3/gethostbyname.3:308 build/C/man5/host.conf.5:181
4603 #, no-wrap
4604 msgid "I</etc/host.conf>"
4605 msgstr ""
4606
4607 #. type: Plain text
4608 #: build/C/man3/gethostbyname.3:311
4609 msgid "resolver configuration file"
4610 msgstr ""
4611
4612 #. type: Plain text
4613 #: build/C/man3/gethostbyname.3:311 build/C/man5/host.conf.5:187 build/C/man5/hosts.5:88
4614 #, no-wrap
4615 msgid "I</etc/hosts>"
4616 msgstr ""
4617
4618 #. type: Plain text
4619 #: build/C/man3/gethostbyname.3:314
4620 msgid "host database file"
4621 msgstr ""
4622
4623 #. type: Plain text
4624 #: build/C/man3/gethostbyname.3:314 build/C/man5/nsswitch.conf.5:306 build/C/man3/setnetgrent.3:92
4625 #, no-wrap
4626 msgid "I</etc/nsswitch.conf>"
4627 msgstr ""
4628
4629 #. type: Plain text
4630 #: build/C/man3/gethostbyname.3:317
4631 msgid "name service switch configuration"
4632 msgstr ""
4633
4634 #. type: Plain text
4635 #: build/C/man3/gethostbyname.3:341
4636 msgid ""
4637 "POSIX.1-2001 specifies B<gethostbyname>(), B<gethostbyaddr>(), "
4638 "B<sethostent>(), B<endhostent>(), B<gethostent>(), and I<h_errno>; "
4639 "B<gethostbyname>(), B<gethostbyaddr>(), and I<h_errno> are marked "
4640 "obsolescent in that standard.  POSIX.1-2008 removes the specifications of "
4641 "B<gethostbyname>(), B<gethostbyaddr>(), and I<h_errno>, recommending the use "
4642 "of B<getaddrinfo>(3)  and B<getnameinfo>(3)  instead."
4643 msgstr ""
4644
4645 #. type: Plain text
4646 #: build/C/man3/gethostbyname.3:351
4647 msgid ""
4648 "The functions B<gethostbyname>()  and B<gethostbyaddr>()  may return "
4649 "pointers to static data, which may be overwritten by later calls.  Copying "
4650 "the I<struct hostent> does not suffice, since it contains pointers; a deep "
4651 "copy is required."
4652 msgstr ""
4653
4654 #. type: Plain text
4655 #: build/C/man3/gethostbyname.3:375
4656 msgid ""
4657 "In the original BSD implementation the I<len> argument of B<gethostbyname>()  "
4658 "was an I<int>.  The SUSv2 standard is buggy and declares the I<len> argument "
4659 "of B<gethostbyaddr>()  to be of type I<size_t>.  (That is wrong, because it "
4660 "has to be I<int>, and I<size_t> is not.  POSIX.1-2001 makes it I<socklen_t>, "
4661 "which is OK.)  See also B<accept>(2)."
4662 msgstr ""
4663
4664 #. type: Plain text
4665 #: build/C/man3/gethostbyname.3:381
4666 msgid ""
4667 "The BSD prototype for B<gethostbyaddr>()  uses I<const char\\ *> for the "
4668 "first argument."
4669 msgstr ""
4670
4671 #. type: SS
4672 #: build/C/man3/gethostbyname.3:381
4673 #, no-wrap
4674 msgid "System V/POSIX extension"
4675 msgstr ""
4676
4677 #.  e.g., Linux, FreeBSD, UnixWare, HP-UX
4678 #.  e.g., FreeBSD, AIX
4679 #. type: Plain text
4680 #: build/C/man3/gethostbyname.3:398
4681 msgid ""
4682 "POSIX requires the B<gethostent>()  call, that should return the next entry "
4683 "in the host data base.  When using DNS/BIND this does not make much sense, "
4684 "but it may be reasonable if the host data base is a file that can be read "
4685 "line by line.  On many systems a routine of this name reads from the file "
4686 "I</etc/hosts>.  It may be available only when the library was built without "
4687 "DNS support.  The glibc version will ignore ipv6 entries.  This function is "
4688 "not reentrant, and glibc adds a reentrant version B<gethostent_r>()."
4689 msgstr ""
4690
4691 #. type: SS
4692 #: build/C/man3/gethostbyname.3:398
4693 #, no-wrap
4694 msgid "GNU extensions"
4695 msgstr ""
4696
4697 #. type: Plain text
4698 #: build/C/man3/gethostbyname.3:404
4699 msgid ""
4700 "Glibc2 also has a B<gethostbyname2>()  that works like B<gethostbyname>(), "
4701 "but permits to specify the address family to which the address must belong."
4702 msgstr ""
4703
4704 #. type: Plain text
4705 #: build/C/man3/gethostbyname.3:438
4706 msgid ""
4707 "Glibc2 also has reentrant versions B<gethostent_r>(), B<gethostbyaddr_r>(), "
4708 "B<gethostbyname_r>()  and B<gethostbyname2_r>().  The caller supplies a "
4709 "I<hostent> structure I<ret> which will be filled in on success, and a "
4710 "temporary work buffer I<buf> of size I<buflen>.  After the call, I<result> "
4711 "will point to the result on success.  In case of an error or if no entry is "
4712 "found I<result> will be NULL.  The functions return 0 on success and a "
4713 "nonzero error number on failure.  In addition to the errors returned by the "
4714 "nonreentrant versions of these functions, if I<buf> is too small, the "
4715 "functions will return B<ERANGE>, and the call should be retried with a "
4716 "larger buffer.  The global variable I<h_errno> is not modified, but the "
4717 "address of a variable in which to store error numbers is passed in "
4718 "I<h_errnop>."
4719 msgstr ""
4720
4721 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973
4722 #. type: Plain text
4723 #: build/C/man3/gethostbyname.3:443
4724 msgid ""
4725 "B<gethostbyname>()  does not recognize components of a dotted IPv4 address "
4726 "string that are expressed in hexadecimal."
4727 msgstr ""
4728
4729 #.  .BR getipnodebyaddr (3),
4730 #.  .BR getipnodebyname (3),
4731 #.  .BR resolv+ (8)
4732 #. type: Plain text
4733 #: build/C/man3/gethostbyname.3:457
4734 msgid ""
4735 "B<getaddrinfo>(3), B<getnameinfo>(3), B<inet>(3), B<inet_ntop>(3), "
4736 "B<inet_pton>(3), B<resolver>(3), B<hosts>(5), B<nsswitch.conf>(5), "
4737 "B<hostname>(7), B<named>(8)"
4738 msgstr ""
4739
4740 #. type: TH
4741 #: build/C/man3/getipnodebyname.3:26
4742 #, no-wrap
4743 msgid "GETIPNODEBYNAME"
4744 msgstr ""
4745
4746 #. type: TH
4747 #: build/C/man3/getipnodebyname.3:26
4748 #, no-wrap
4749 msgid "2010-09-04"
4750 msgstr ""
4751
4752 #. type: Plain text
4753 #: build/C/man3/getipnodebyname.3:30
4754 msgid ""
4755 "getipnodebyname, getipnodebyaddr, freehostent - get network hostnames and "
4756 "addresses"
4757 msgstr ""
4758
4759 #. type: Plain text
4760 #: build/C/man3/getipnodebyname.3:38
4761 #, no-wrap
4762 msgid ""
4763 "B<struct hostent *getipnodebyname(const char *>I<name>B<, int >I<af>B<,>\n"
4764 "B<                                int >I<flags>B<, int *>I<error_num>B<);>\n"
4765 msgstr ""
4766
4767 #. type: Plain text
4768 #: build/C/man3/getipnodebyname.3:41
4769 #, no-wrap
4770 msgid ""
4771 "B<struct hostent *getipnodebyaddr(const void *>I<addr>B<, size_t "
4772 ">I<len>B<,>\n"
4773 "B<                                int >I<af>B<, int *>I<error_num>B<);>\n"
4774 msgstr ""
4775
4776 #. type: Plain text
4777 #: build/C/man3/getipnodebyname.3:43
4778 #, no-wrap
4779 msgid "B<void freehostent(struct hostent *>I<ip>B<);>\n"
4780 msgstr ""
4781
4782 #. type: Plain text
4783 #: build/C/man3/getipnodebyname.3:51
4784 msgid ""
4785 "These functions are deprecated (and unavailable in glibc).  Use "
4786 "B<getaddrinfo>(3)  and B<getnameinfo>(3)  instead."
4787 msgstr ""
4788
4789 #. type: Plain text
4790 #: build/C/man3/getipnodebyname.3:59
4791 msgid ""
4792 "The B<getipnodebyname>()  and B<getipnodebyaddr>()  functions return the "
4793 "names and addresses of a network host.  These functions return a pointer to "
4794 "the following structure:"
4795 msgstr ""
4796
4797 #. type: Plain text
4798 #: build/C/man3/getipnodebyname.3:69
4799 #, no-wrap
4800 msgid ""
4801 "struct hostent {\n"
4802 "    char  *h_name;\n"
4803 "    char **h_aliases;\n"
4804 "    int    h_addrtype;\n"
4805 "    int    h_length;\n"
4806 "    char **h_addr_list;\n"
4807 "};\n"
4808 msgstr ""
4809
4810 #. type: Plain text
4811 #: build/C/man3/getipnodebyname.3:82
4812 msgid ""
4813 "These functions replace the B<gethostbyname>(3)  and B<gethostbyaddr>(3)  "
4814 "functions, which could access only the IPv4 network address family.  The "
4815 "B<getipnodebyname>()  and B<getipnodebyaddr>()  functions can access "
4816 "multiple network address families."
4817 msgstr ""
4818
4819 #. type: Plain text
4820 #: build/C/man3/getipnodebyname.3:93
4821 msgid ""
4822 "Unlike the B<gethostby> functions, these functions return pointers to "
4823 "dynamically allocated memory.  The B<freehostent>()  function is used to "
4824 "release the dynamically allocated memory after the caller no longer needs "
4825 "the I<hostent> structure."
4826 msgstr ""
4827
4828 #. type: SS
4829 #: build/C/man3/getipnodebyname.3:93
4830 #, no-wrap
4831 msgid "getipnodebyname() arguments"
4832 msgstr ""
4833
4834 #. type: Plain text
4835 #: build/C/man3/getipnodebyname.3:104
4836 msgid ""
4837 "The B<getipnodebyname>()  function looks up network addresses for the host "
4838 "specified by the I<name> argument.  The I<af> argument specifies one of the "
4839 "following values:"
4840 msgstr ""
4841
4842 #. type: TP
4843 #: 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
4844 #, no-wrap
4845 msgid "B<AF_INET>"
4846 msgstr ""
4847
4848 #. type: Plain text
4849 #: build/C/man3/getipnodebyname.3:110
4850 msgid ""
4851 "The I<name> argument points to a dotted-quad IPv4 address or a name of an "
4852 "IPv4 network host."
4853 msgstr ""
4854
4855 #. type: TP
4856 #: 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
4857 #, no-wrap
4858 msgid "B<AF_INET6>"
4859 msgstr ""
4860
4861 #. type: Plain text
4862 #: build/C/man3/getipnodebyname.3:116
4863 msgid ""
4864 "The I<name> argument points to a hexadecimal IPv6 address or a name of an "
4865 "IPv6 network host."
4866 msgstr ""
4867
4868 #. type: Plain text
4869 #: build/C/man3/getipnodebyname.3:125
4870 msgid ""
4871 "The I<flags> argument specifies additional options.  More than one option "
4872 "can be specified by bitwise OR-ing them together.  I<flags> should be set to "
4873 "0 if no options are desired."
4874 msgstr ""
4875
4876 #. type: TP
4877 #: build/C/man3/getipnodebyname.3:125
4878 #, no-wrap
4879 msgid "B<AI_V4MAPPED>"
4880 msgstr ""
4881
4882 #. type: Plain text
4883 #: build/C/man3/getipnodebyname.3:132
4884 msgid ""
4885 "This flag is used with B<AF_INET6> to request a query for IPv4 addresses "
4886 "instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 "
4887 "addresses."
4888 msgstr ""
4889
4890 #. type: TP
4891 #: build/C/man3/getipnodebyname.3:132
4892 #, no-wrap
4893 msgid "B<AI_ALL>"
4894 msgstr ""
4895
4896 #. type: Plain text
4897 #: build/C/man3/getipnodebyname.3:138
4898 msgid ""
4899 "This flag is used with B<AI_V4MAPPED> to request a query for both IPv4 and "
4900 "IPv6 addresses.  Any IPv4 address found will be mapped to an IPv6 address."
4901 msgstr ""
4902
4903 #. type: TP
4904 #: build/C/man3/getipnodebyname.3:138
4905 #, no-wrap
4906 msgid "B<AI_ADDRCONFIG>"
4907 msgstr ""
4908
4909 #. type: Plain text
4910 #: build/C/man3/getipnodebyname.3:150
4911 msgid ""
4912 "This flag is used with B<AF_INET6> to further request that queries for IPv6 "
4913 "addresses should not be made unless the system has at least one IPv6 address "
4914 "assigned to a network interface, and that queries for IPv4 addresses should "
4915 "not be made unless the system has at least one IPv4 address assigned to a "
4916 "network interface.  This flag may be used by itself or with the "
4917 "B<AI_V4MAPPED> flag."
4918 msgstr ""
4919
4920 #. type: TP
4921 #: build/C/man3/getipnodebyname.3:150
4922 #, no-wrap
4923 msgid "B<AI_DEFAULT>"
4924 msgstr ""
4925
4926 #. type: Plain text
4927 #: build/C/man3/getipnodebyname.3:154
4928 msgid "This flag is equivalent to B<(AI_ADDRCONFIG | AI_V4MAPPED)>."
4929 msgstr ""
4930
4931 #. type: SS
4932 #: build/C/man3/getipnodebyname.3:154
4933 #, no-wrap
4934 msgid "getipnodebyaddr() arguments"
4935 msgstr ""
4936
4937 #. type: Plain text
4938 #: build/C/man3/getipnodebyname.3:166
4939 msgid ""
4940 "The B<getipnodebyaddr>()  function looks up the name of the host whose "
4941 "network address is specified by the I<addr> argument.  The I<af> argument "
4942 "specifies one of the following values:"
4943 msgstr ""
4944
4945 #. type: Plain text
4946 #: build/C/man3/getipnodebyname.3:176
4947 msgid ""
4948 "The I<addr> argument points to a I<struct in_addr> and I<len> must be set to "
4949 "I<sizeof(struct in_addr)>."
4950 msgstr ""
4951
4952 #. type: Plain text
4953 #: build/C/man3/getipnodebyname.3:186
4954 msgid ""
4955 "The I<addr> argument points to a I<struct in6_addr> and I<len> must be set "
4956 "to I<sizeof(struct in6_addr)>."
4957 msgstr ""
4958
4959 #. type: Plain text
4960 #: build/C/man3/getipnodebyname.3:190
4961 msgid ""
4962 "NULL is returned if an error occurred, and I<error_num> will contain an "
4963 "error code from the following list:"
4964 msgstr ""
4965
4966 #. type: Plain text
4967 #: build/C/man3/getipnodebyname.3:193
4968 msgid "The hostname or network address was not found."
4969 msgstr ""
4970
4971 #. type: TP
4972 #: build/C/man3/getipnodebyname.3:193
4973 #, no-wrap
4974 msgid "B<NO_ADDRESS>"
4975 msgstr ""
4976
4977 #. type: Plain text
4978 #: build/C/man3/getipnodebyname.3:199
4979 msgid ""
4980 "The domain name server recognized the network address or name, but no answer "
4981 "was returned.  This can happen if the network host has only IPv4 addresses "
4982 "and a request has been made for IPv6 information only, or vice versa."
4983 msgstr ""
4984
4985 #. type: Plain text
4986 #: build/C/man3/getipnodebyname.3:202
4987 msgid "The domain name server returned a permanent failure response."
4988 msgstr ""
4989
4990 #. type: Plain text
4991 #: build/C/man3/getipnodebyname.3:206
4992 msgid ""
4993 "The domain name server returned a temporary failure response.  You might "
4994 "have better luck next time."
4995 msgstr ""
4996
4997 #. type: Plain text
4998 #: build/C/man3/getipnodebyname.3:210
4999 msgid ""
5000 "A successful query returns a pointer to a I<hostent> structure that contains "
5001 "the following fields:"
5002 msgstr ""
5003
5004 #. type: Plain text
5005 #: build/C/man3/getipnodebyname.3:213
5006 msgid "This is the official name of this network host."
5007 msgstr ""
5008
5009 #. type: Plain text
5010 #: build/C/man3/getipnodebyname.3:217
5011 msgid ""
5012 "This is an array of pointers to unofficial aliases for the same host.  The "
5013 "array is terminated by a null pointer."
5014 msgstr ""
5015
5016 #. type: Plain text
5017 #: build/C/man3/getipnodebyname.3:239
5018 msgid ""
5019 "This is a copy of the I<af> argument to B<getipnodebyname>()  or "
5020 "B<getipnodebyaddr>().  I<h_addrtype> will always be B<AF_INET> if the I<af> "
5021 "argument was B<AF_INET>.  I<h_addrtype> will always be B<AF_INET6> if the "
5022 "I<af> argument was B<AF_INET6>."
5023 msgstr ""
5024
5025 #. type: Plain text
5026 #: build/C/man3/getipnodebyname.3:253
5027 msgid ""
5028 "This field will be set to I<sizeof(struct in_addr)> if I<h_addrtype> is "
5029 "B<AF_INET>, and to I<sizeof(struct in6_addr)> if I<h_addrtype> is "
5030 "B<AF_INET6>."
5031 msgstr ""
5032
5033 #. type: Plain text
5034 #: build/C/man3/getipnodebyname.3:258
5035 msgid ""
5036 "This is an array of one or more pointers to network address structures for "
5037 "the network host.  The array is terminated by a null pointer."
5038 msgstr ""
5039
5040 #.  Not in POSIX.1-2001.
5041 #. type: Plain text
5042 #: build/C/man3/getipnodebyname.3:261
5043 msgid "RFC\\ 2553."
5044 msgstr ""
5045
5046 #. type: Plain text
5047 #: build/C/man3/getipnodebyname.3:266
5048 msgid ""
5049 "These functions were present in glibc 2.1.91-95, but were removed again.  "
5050 "Several UNIX-like systems support them, but all call them deprecated."
5051 msgstr ""
5052
5053 #. type: Plain text
5054 #: build/C/man3/getipnodebyname.3:271
5055 msgid "B<getaddrinfo>(3), B<getnameinfo>(3), B<inet_ntop>(3), B<inet_pton>(3)"
5056 msgstr ""
5057
5058 #. type: TH
5059 #: build/C/man3/getnameinfo.3:10
5060 #, no-wrap
5061 msgid "GETNAMEINFO"
5062 msgstr ""
5063
5064 #. type: Plain text
5065 #: build/C/man3/getnameinfo.3:13
5066 msgid "getnameinfo - address-to-name translation in protocol-independent manner"
5067 msgstr ""
5068
5069 #. type: Plain text
5070 #: build/C/man3/getnameinfo.3:17
5071 #, no-wrap
5072 msgid ""
5073 "B<#include E<lt>sys/socket.hE<gt>>\n"
5074 "B<#include E<lt>netdb.hE<gt>>\n"
5075 msgstr ""
5076
5077 #. type: Plain text
5078 #: build/C/man3/getnameinfo.3:21
5079 #, no-wrap
5080 msgid ""
5081 "B<int getnameinfo(const struct sockaddr *>I<sa>B<, socklen_t >I<salen>B<,>\n"
5082 "B<                char *>I<host>B<, socklen_t >I<hostlen>B<,>\n"
5083 "B<                char *>I<serv>B<, socklen_t >I<servlen>B<, int "
5084 ">I<flags>B<);>\n"
5085 msgstr ""
5086
5087 #. type: Plain text
5088 #: build/C/man3/getnameinfo.3:31
5089 msgid ""
5090 "B<getnameinfo>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
5091 "_POSIX_SOURCE"
5092 msgstr ""
5093
5094 #. type: Plain text
5095 #: build/C/man3/getnameinfo.3:47
5096 msgid ""
5097 "The B<getnameinfo>()  function is the inverse of B<getaddrinfo>(3): it "
5098 "converts a socket address to a corresponding host and service, in a "
5099 "protocol-independent manner.  It combines the functionality of "
5100 "B<gethostbyaddr>(3)  and B<getservbyport>(3), but unlike those functions, "
5101 "B<getnameinfo>()  is reentrant and allows programs to eliminate "
5102 "IPv4-versus-IPv6 dependencies."
5103 msgstr ""
5104
5105 #. type: Plain text
5106 #: build/C/man3/getnameinfo.3:70
5107 msgid ""
5108 "The I<sa> argument is a pointer to a generic socket address structure (of "
5109 "type I<sockaddr_in> or I<sockaddr_in6>)  of size I<salen> that holds the "
5110 "input IP address and port number.  The arguments I<host> and I<serv> are "
5111 "pointers to caller-allocated buffers (of size I<hostlen> and I<servlen> "
5112 "respectively) into which B<getnameinfo>()  places null-terminated strings "
5113 "containing the host and service names respectively."
5114 msgstr ""
5115
5116 #. type: Plain text
5117 #: build/C/man3/getnameinfo.3:83
5118 msgid ""
5119 "The caller can specify that no hostname (or no service name)  is required by "
5120 "providing a NULL I<host> (or I<serv>)  argument or a zero I<hostlen> (or "
5121 "I<servlen>)  argument.  However, at least one of hostname or service name "
5122 "must be requested."
5123 msgstr ""
5124
5125 #. type: Plain text
5126 #: build/C/man3/getnameinfo.3:89
5127 msgid "The I<flags> argument modifies the behavior of B<getnameinfo>()  as follows:"
5128 msgstr ""
5129
5130 #. type: TP
5131 #: build/C/man3/getnameinfo.3:89
5132 #, no-wrap
5133 msgid "B<NI_NAMEREQD>"
5134 msgstr ""
5135
5136 #. type: Plain text
5137 #: build/C/man3/getnameinfo.3:92
5138 msgid "If set, then an error is returned if the hostname cannot be determined."
5139 msgstr ""
5140
5141 #. type: TP
5142 #: build/C/man3/getnameinfo.3:92
5143 #, no-wrap
5144 msgid "B<NI_DGRAM>"
5145 msgstr ""
5146
5147 #. type: Plain text
5148 #: build/C/man3/getnameinfo.3:98
5149 msgid ""
5150 "If set, then the service is datagram (UDP) based rather than stream (TCP) "
5151 "based.  This is required for the few ports (512-514)  that have different "
5152 "services for UDP and TCP."
5153 msgstr ""
5154
5155 #. type: TP
5156 #: build/C/man3/getnameinfo.3:98
5157 #, no-wrap
5158 msgid "B<NI_NOFQDN>"
5159 msgstr ""
5160
5161 #. type: Plain text
5162 #: build/C/man3/getnameinfo.3:102
5163 msgid ""
5164 "If set, return only the hostname part of the fully qualified domain name for "
5165 "local hosts."
5166 msgstr ""
5167
5168 #. type: TP
5169 #: build/C/man3/getnameinfo.3:102
5170 #, no-wrap
5171 msgid "B<NI_NUMERICHOST>"
5172 msgstr ""
5173
5174 #.  For example, by calling
5175 #.  .BR inet_ntop ()
5176 #.  instead of
5177 #.  .BR gethostbyaddr ().
5178 #.  POSIX.1-2003 has NI_NUMERICSCOPE, but glibc doesn't have it.
5179 #. type: Plain text
5180 #: build/C/man3/getnameinfo.3:112
5181 msgid ""
5182 "If set, then the numeric form of the hostname is returned.  (When not set, "
5183 "this will still happen in case the node's name cannot be determined.)"
5184 msgstr ""
5185
5186 #. type: TP
5187 #: build/C/man3/getnameinfo.3:112
5188 #, no-wrap
5189 msgid "B<NI_NUMERICSERV>"
5190 msgstr ""
5191
5192 #. type: Plain text
5193 #: build/C/man3/getnameinfo.3:117
5194 msgid ""
5195 "If set, then the numeric form of the service address is returned.  (When not "
5196 "set, this will still happen in case the service's name cannot be "
5197 "determined.)"
5198 msgstr ""
5199
5200 #. type: SS
5201 #: build/C/man3/getnameinfo.3:117
5202 #, no-wrap
5203 msgid "Extensions to getnameinfo() for Internationalized Domain Names"
5204 msgstr ""
5205
5206 #. type: Plain text
5207 #: build/C/man3/getnameinfo.3:126
5208 msgid ""
5209 "Starting with glibc 2.3.4, B<getnameinfo>()  has been extended to "
5210 "selectively allow hostnames to be transparently converted to and from the "
5211 "Internationalized Domain Name (IDN) format (see RFC 3490, "
5212 "I<Internationalizing Domain Names in Applications (IDNA)>).  Three new flags "
5213 "are defined:"
5214 msgstr ""
5215
5216 #. type: TP
5217 #: build/C/man3/getnameinfo.3:126
5218 #, no-wrap
5219 msgid "B<NI_IDN>"
5220 msgstr ""
5221
5222 #. type: Plain text
5223 #: build/C/man3/getnameinfo.3:132
5224 msgid ""
5225 "If this flag is used, then the name found in the lookup process is converted "
5226 "from IDN format to the locale's encoding if necessary.  ASCII-only names are "
5227 "not affected by the conversion, which makes this flag usable in existing "
5228 "programs and environments."
5229 msgstr ""
5230
5231 #. type: TP
5232 #: build/C/man3/getnameinfo.3:132
5233 #, no-wrap
5234 msgid "B<NI_IDN_ALLOW_UNASSIGNED>, B<NI_IDN_USE_STD3_ASCII_RULES>"
5235 msgstr ""
5236
5237 #.  FIXME glibc defines the following additional errors, some which
5238 #.  can probably be returned by getnameinfo(); they need to
5239 #.  be documented.
5240 #.  #ifdef __USE_GNU
5241 #.  #define EAI_INPROGRESS  -100  /* Processing request in progress.  */
5242 #.  #define EAI_CANCELED    -101  /* Request canceled.  */
5243 #.  #define EAI_NOTCANCELED -102  /* Request not canceled.  */
5244 #.  #define EAI_ALLDONE     -103  /* All requests done.  */
5245 #.  #define EAI_INTR        -104  /* Interrupted by a signal.  */
5246 #.  #define EAI_IDN_ENCODE  -105  /* IDN encoding failed.  */
5247 #.  #endif
5248 #. type: Plain text
5249 #: build/C/man3/getnameinfo.3:155
5250 msgid ""
5251 "On success 0 is returned, and node and service names, if requested, are "
5252 "filled with null-terminated strings, possibly truncated to fit the specified "
5253 "buffer lengths.  On error, one of the following nonzero error codes is "
5254 "returned:"
5255 msgstr ""
5256
5257 #. type: Plain text
5258 #: build/C/man3/getnameinfo.3:159
5259 msgid "The name could not be resolved at this time.  Try again later."
5260 msgstr ""
5261
5262 #. type: Plain text
5263 #: build/C/man3/getnameinfo.3:164
5264 msgid "The I<flags> argument has an invalid value."
5265 msgstr ""
5266
5267 #. type: Plain text
5268 #: build/C/man3/getnameinfo.3:167
5269 msgid "A nonrecoverable error occurred."
5270 msgstr ""
5271
5272 #. type: Plain text
5273 #: build/C/man3/getnameinfo.3:171
5274 msgid ""
5275 "The address family was not recognized, or the address length was invalid for "
5276 "the specified family."
5277 msgstr ""
5278
5279 #. type: Plain text
5280 #: build/C/man3/getnameinfo.3:180
5281 msgid ""
5282 "The name does not resolve for the supplied arguments.  B<NI_NAMEREQD> is set "
5283 "and the host's name cannot be located, or neither hostname nor service name "
5284 "were requested."
5285 msgstr ""
5286
5287 #. type: TP
5288 #: build/C/man3/getnameinfo.3:180
5289 #, no-wrap
5290 msgid "B<EAI_OVERFLOW>"
5291 msgstr ""
5292
5293 #. type: Plain text
5294 #: build/C/man3/getnameinfo.3:187
5295 msgid "The buffer pointed to by I<host> or I<serv> was too small."
5296 msgstr ""
5297
5298 #. type: Plain text
5299 #: build/C/man3/getnameinfo.3:192
5300 msgid "A system error occurred.  The error code can be found in I<errno>."
5301 msgstr ""
5302
5303 #. type: Plain text
5304 #: build/C/man3/getnameinfo.3:199
5305 msgid "/etc/hosts"
5306 msgstr ""
5307
5308 #. type: Plain text
5309 #: build/C/man3/getnameinfo.3:201
5310 msgid "/etc/nsswitch.conf"
5311 msgstr ""
5312
5313 #. type: Plain text
5314 #: build/C/man3/getnameinfo.3:203
5315 msgid "/etc/resolv.conf"
5316 msgstr ""
5317
5318 #. type: Plain text
5319 #: build/C/man3/getnameinfo.3:206
5320 msgid "B<getnameinfo>()  is provided in glibc since version 2.1."
5321 msgstr ""
5322
5323 #. type: Plain text
5324 #: build/C/man3/getnameinfo.3:208
5325 msgid "RFC\\ 2553, POSIX.1-2001."
5326 msgstr ""
5327
5328 #. type: Plain text
5329 #: build/C/man3/getnameinfo.3:213
5330 msgid ""
5331 "In order to assist the programmer in choosing reasonable sizes for the "
5332 "supplied buffers, I<E<lt>netdb.hE<gt>> defines the constants"
5333 msgstr ""
5334
5335 #. type: Plain text
5336 #: build/C/man3/getnameinfo.3:218
5337 #, no-wrap
5338 msgid ""
5339 "#define NI_MAXHOST      1025\n"
5340 "#define NI_MAXSERV      32\n"
5341 msgstr ""
5342
5343 #. type: Plain text
5344 #: build/C/man3/getnameinfo.3:228
5345 msgid ""
5346 "Since glibc 2.8, these definitions are exposed only if one of the feature "
5347 "test macros B<_BSD_SOURCE>, B<_SVID_SOURCE>, or B<_GNU_SOURCE> is defined."
5348 msgstr ""
5349
5350 #. type: Plain text
5351 #: build/C/man3/getnameinfo.3:236
5352 msgid ""
5353 "The former is the constant B<MAXDNAME> in recent versions of BIND's "
5354 "I<E<lt>arpa/nameser.hE<gt>> header file.  The latter is a guess based on the "
5355 "services listed in the current Assigned Numbers RFC."
5356 msgstr ""
5357
5358 #. type: Plain text
5359 #: build/C/man3/getnameinfo.3:243
5360 msgid ""
5361 "Before glibc version 2.2, the I<hostlen> and I<servlen> arguments were typed "
5362 "as I<size_t>."
5363 msgstr ""
5364
5365 #. type: Plain text
5366 #: build/C/man3/getnameinfo.3:248
5367 msgid ""
5368 "The following code tries to get the numeric hostname and service name, for a "
5369 "given socket address.  Note that there is no hardcoded reference to a "
5370 "particular address family."
5371 msgstr ""
5372
5373 #. type: Plain text
5374 #: build/C/man3/getnameinfo.3:254
5375 #, no-wrap
5376 msgid ""
5377 "struct sockaddr *sa;    /* input */\n"
5378 "socklen_t len;         /* input */\n"
5379 "char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];\n"
5380 msgstr ""
5381
5382 #. type: Plain text
5383 #: build/C/man3/getnameinfo.3:258
5384 #, no-wrap
5385 msgid ""
5386 "if (getnameinfo(sa, len, hbuf, sizeof(hbuf), sbuf,\n"
5387 "            sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0)\n"
5388 "    printf(\"host=%s, serv=%s\\en\", hbuf, sbuf);\n"
5389 msgstr ""
5390
5391 #. type: Plain text
5392 #: build/C/man3/getnameinfo.3:263
5393 msgid ""
5394 "The following version checks if the socket address has a reverse address "
5395 "mapping."
5396 msgstr ""
5397
5398 #. type: Plain text
5399 #: build/C/man3/getnameinfo.3:269
5400 #, no-wrap
5401 msgid ""
5402 "struct sockaddr *sa;    /* input */\n"
5403 "socklen_t len;         /* input */\n"
5404 "char hbuf[NI_MAXHOST];\n"
5405 msgstr ""
5406
5407 #. type: Plain text
5408 #: build/C/man3/getnameinfo.3:275
5409 #, no-wrap
5410 msgid ""
5411 "if (getnameinfo(sa, len, hbuf, sizeof(hbuf),\n"
5412 "            NULL, 0, NI_NAMEREQD))\n"
5413 "    printf(\"could not resolve hostname\");\n"
5414 "else\n"
5415 "    printf(\"host=%s\\en\", hbuf);\n"
5416 msgstr ""
5417
5418 #. type: Plain text
5419 #: build/C/man3/getnameinfo.3:282
5420 msgid ""
5421 "An example program using B<getnameinfo>()  can be found in "
5422 "B<getaddrinfo>(3)."
5423 msgstr ""
5424
5425 #. type: Plain text
5426 #: build/C/man3/getnameinfo.3:297
5427 msgid ""
5428 "B<accept>(2), B<getpeername>(2), B<getsockname>(2), B<recvfrom>(2), "
5429 "B<socket>(2), B<getaddrinfo>(3), B<gethostbyaddr>(3), B<getservbyname>(3), "
5430 "B<getservbyport>(3), B<inet_ntop>(3), B<hosts>(5), B<services>(5), "
5431 "B<hostname>(7), B<named>(8)"
5432 msgstr ""
5433
5434 #. type: Plain text
5435 #: build/C/man3/getnameinfo.3:301
5436 msgid ""
5437 "R. Gilligan, S. Thomson, J. Bound and W. Stevens, I<Basic Socket Interface "
5438 "Extensions for IPv6>, RFC\\ 2553, March 1999."
5439 msgstr ""
5440
5441 #. type: Plain text
5442 #: build/C/man3/getnameinfo.3:307
5443 msgid ""
5444 "Tatsuya Jinmei and Atsushi Onoe, I<An Extension of Format for IPv6 Scoped "
5445 "Addresses>, internet draft, work in progress E<.UR "
5446 "ftp://ftp.ietf.org\\:/internet-drafts\\:/draft-ietf-ipngwg-scopedaddr-format-02.txt> "
5447 "E<.UE .>"
5448 msgstr ""
5449
5450 #. type: Plain text
5451 #: build/C/man3/getnameinfo.3:312
5452 msgid ""
5453 "Craig Metz, I<Protocol Independence Using the Sockets API>, Proceedings of "
5454 "the freenix track: 2000 USENIX annual technical conference, June 2000"
5455 msgstr ""
5456
5457 #. type: Plain text
5458 #: build/C/man3/getnameinfo.3:315
5459 msgid ""
5460 "E<.UR "
5461 "http://www.usenix.org\\:/publications\\:/library\\:/proceedings\\:/usenix2000\\:/freenix\\:/metzprotocol.html> "
5462 "E<.UE .>"
5463 msgstr ""
5464
5465 #. type: TH
5466 #: build/C/man3/getnetent.3:30
5467 #, no-wrap
5468 msgid "GETNETENT"
5469 msgstr ""
5470
5471 #. type: TH
5472 #: build/C/man3/getnetent.3:30 build/C/man3/getprotoent.3:30 build/C/man3/getservent.3:34
5473 #, no-wrap
5474 msgid "2008-08-19"
5475 msgstr ""
5476
5477 #. type: Plain text
5478 #: build/C/man3/getnetent.3:34
5479 msgid ""
5480 "getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent - get network "
5481 "entry"
5482 msgstr ""
5483
5484 #. type: Plain text
5485 #: 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
5486 #, no-wrap
5487 msgid "B<#include E<lt>netdb.hE<gt>>\n"
5488 msgstr ""
5489
5490 #. type: Plain text
5491 #: build/C/man3/getnetent.3:39
5492 #, no-wrap
5493 msgid "B<struct netent *getnetent(void);>\n"
5494 msgstr ""
5495
5496 #. type: Plain text
5497 #: build/C/man3/getnetent.3:41
5498 #, no-wrap
5499 msgid "B<struct netent *getnetbyname(const char *>I<name>B<);>\n"
5500 msgstr ""
5501
5502 #. type: Plain text
5503 #: build/C/man3/getnetent.3:43
5504 #, no-wrap
5505 msgid "B<struct netent *getnetbyaddr(uint32_t >I<net>B<, int >I<type>B<);>\n"
5506 msgstr ""
5507
5508 #. type: Plain text
5509 #: build/C/man3/getnetent.3:45
5510 #, no-wrap
5511 msgid "B<void setnetent(int >I<stayopen>B<);>\n"
5512 msgstr ""
5513
5514 #. type: Plain text
5515 #: build/C/man3/getnetent.3:47
5516 #, no-wrap
5517 msgid "B<void endnetent(void);>\n"
5518 msgstr ""
5519
5520 #. type: Plain text
5521 #: build/C/man3/getnetent.3:57
5522 msgid ""
5523 "The B<getnetent>()  function reads the next entry from the networks database "
5524 "and returns a I<netent> structure containing the broken-out fields from the "
5525 "entry.  A connection is opened to the database if necessary."
5526 msgstr ""
5527
5528 #. type: Plain text
5529 #: build/C/man3/getnetent.3:66
5530 msgid ""
5531 "The B<getnetbyname>()  function returns a I<netent> structure for the entry "
5532 "from the database that matches the network I<name>."
5533 msgstr ""
5534
5535 #. type: Plain text
5536 #: build/C/man3/getnetent.3:80
5537 msgid ""
5538 "The B<getnetbyaddr>()  function returns a I<netent> structure for the entry "
5539 "from the database that matches the network number I<net> of type I<type>.  "
5540 "The I<net> argument must be in host byte order."
5541 msgstr ""
5542
5543 #. type: Plain text
5544 #: build/C/man3/getnetent.3:92
5545 msgid ""
5546 "The B<setnetent>()  function opens a connection to the database, and sets "
5547 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
5548 "connection to the database will not be closed between calls to one of the "
5549 "B<getnet*>()  functions."
5550 msgstr ""
5551
5552 #. type: Plain text
5553 #: build/C/man3/getnetent.3:96
5554 msgid "The B<endnetent>()  function closes the connection to the database."
5555 msgstr ""
5556
5557 #. type: Plain text
5558 #: build/C/man3/getnetent.3:102
5559 msgid "The I<netent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
5560 msgstr ""
5561
5562 #. type: Plain text
5563 #: build/C/man3/getnetent.3:111
5564 #, no-wrap
5565 msgid ""
5566 "struct netent {\n"
5567 "    char      *n_name;     /* official network name */\n"
5568 "    char     **n_aliases;  /* alias list */\n"
5569 "    int        n_addrtype; /* net address type */\n"
5570 "    uint32_t   n_net;      /* network number */\n"
5571 "}\n"
5572 msgstr ""
5573
5574 #. type: Plain text
5575 #: build/C/man3/getnetent.3:117
5576 msgid "The members of the I<netent> structure are:"
5577 msgstr ""
5578
5579 #. type: TP
5580 #: build/C/man3/getnetent.3:117
5581 #, no-wrap
5582 msgid "I<n_name>"
5583 msgstr ""
5584
5585 #. type: Plain text
5586 #: build/C/man3/getnetent.3:120
5587 msgid "The official name of the network."
5588 msgstr ""
5589
5590 #. type: TP
5591 #: build/C/man3/getnetent.3:120
5592 #, no-wrap
5593 msgid "I<n_aliases>"
5594 msgstr ""
5595
5596 #. type: Plain text
5597 #: build/C/man3/getnetent.3:123
5598 msgid "A NULL-terminated list of alternative names for the network."
5599 msgstr ""
5600
5601 #. type: TP
5602 #: build/C/man3/getnetent.3:123
5603 #, no-wrap
5604 msgid "I<n_addrtype>"
5605 msgstr ""
5606
5607 #. type: Plain text
5608 #: build/C/man3/getnetent.3:127
5609 msgid "The type of the network number; always B<AF_INET>."
5610 msgstr ""
5611
5612 #. type: TP
5613 #: build/C/man3/getnetent.3:127
5614 #, no-wrap
5615 msgid "I<n_net>"
5616 msgstr ""
5617
5618 #. type: Plain text
5619 #: build/C/man3/getnetent.3:130
5620 msgid "The network number in host byte order."
5621 msgstr ""
5622
5623 #. type: Plain text
5624 #: build/C/man3/getnetent.3:141
5625 msgid ""
5626 "The B<getnetent>(), B<getnetbyname>()  and B<getnetbyaddr>()  functions "
5627 "return a pointer to a statically allocated I<netent> structure, or a null "
5628 "pointer if an error occurs or the end of the file is reached."
5629 msgstr ""
5630
5631 #. type: TP
5632 #: build/C/man3/getnetent.3:142 build/C/man5/networks.5:71
5633 #, no-wrap
5634 msgid "I</etc/networks>"
5635 msgstr ""
5636
5637 #. type: Plain text
5638 #: build/C/man3/getnetent.3:145
5639 msgid "networks database file"
5640 msgstr ""
5641
5642 #. type: Plain text
5643 #: build/C/man3/getnetent.3:147 build/C/man3/getprotoent.3:142 build/C/man3/getservent.3:159
5644 msgid "4.3BSD, POSIX.1-2001."
5645 msgstr ""
5646
5647 #. type: Plain text
5648 #: build/C/man3/getnetent.3:154
5649 msgid ""
5650 "In glibc versions before 2.2, the I<net> argument of B<getnetbyaddr>()  was "
5651 "of type I<long>."
5652 msgstr ""
5653
5654 #.  .BR networks (5)
5655 #. type: Plain text
5656 #: build/C/man3/getnetent.3:159
5657 msgid "B<getnetent_r>(3), B<getprotoent>(3), B<getservent>(3)"
5658 msgstr ""
5659
5660 #. type: Plain text
5661 #: build/C/man3/getnetent.3:161
5662 msgid "RFC\\ 1101"
5663 msgstr ""
5664
5665 #. type: TH
5666 #: build/C/man3/getnetent_r.3:26
5667 #, no-wrap
5668 msgid "GETNETENT_R"
5669 msgstr ""
5670
5671 #. type: Plain text
5672 #: build/C/man3/getnetent_r.3:30
5673 msgid "getnetent_r, getnetbyname_r, getnetbyaddr_r - get network entry (reentrant)"
5674 msgstr ""
5675
5676 #. type: Plain text
5677 #: build/C/man3/getnetent_r.3:37
5678 #, no-wrap
5679 msgid ""
5680 "B<int getnetent_r(struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5681 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5682 "B<                int *>I<h_errnop>B<);>\n"
5683 msgstr ""
5684
5685 #. type: Plain text
5686 #: build/C/man3/getnetent_r.3:42
5687 #, no-wrap
5688 msgid ""
5689 "B<int getnetbyname_r(const char *>I<name>B<,>\n"
5690 "B<                struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5691 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5692 "B<                int *>I<h_errnop>B<);>\n"
5693 msgstr ""
5694
5695 #. type: Plain text
5696 #: build/C/man3/getnetent_r.3:47
5697 #, no-wrap
5698 msgid ""
5699 "B<int getnetbyaddr_r(uint32_t >I<net>B<, int >I<type>B<,>\n"
5700 "B<                struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5701 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5702 "B<                int *>I<h_errnop>B<);>\n"
5703 msgstr ""
5704
5705 #. type: Plain text
5706 #: build/C/man3/getnetent_r.3:58
5707 msgid "B<getnetent_r>(), B<getnetbyname_r>(), B<getnetbyaddr_r>():"
5708 msgstr ""
5709
5710 #. type: Plain text
5711 #: build/C/man3/getnetent_r.3:79
5712 msgid ""
5713 "The B<getnetent_r>(), B<getnetbyname_r>(), and B<getnetbyaddr_r>()  "
5714 "functions are the reentrant equivalents of, respectively, B<getnetent>(3), "
5715 "B<getnetbyname>(3), and B<getnetbynumber>(3).  They differ in the way that "
5716 "the I<netent> structure is returned, and in the function calling signature "
5717 "and return value.  This manual page describes just the differences from the "
5718 "nonreentrant functions."
5719 msgstr ""
5720
5721 #. type: Plain text
5722 #: build/C/man3/getnetent_r.3:85
5723 msgid ""
5724 "Instead of returning a pointer to a statically allocated I<netent> structure "
5725 "as the function result, these functions copy the structure into the location "
5726 "pointed to by I<result_buf>."
5727 msgstr ""
5728
5729 #.  I can find no information on the required/recommended buffer size;
5730 #.  the nonreentrant functions use a 1024 byte buffer -- mtk.
5731 #. type: Plain text
5732 #: build/C/man3/getnetent_r.3:102
5733 msgid ""
5734 "The I<buf> array is used to store the string fields pointed to by the "
5735 "returned I<netent> structure.  (The nonreentrant functions allocate these "
5736 "strings in static storage.)  The size of this array is specified in "
5737 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
5738 "and the caller must try again with a larger buffer.  (A buffer of length "
5739 "1024 bytes should be sufficient for most applications.)"
5740 msgstr ""
5741
5742 #. type: Plain text
5743 #: build/C/man3/getnetent_r.3:110
5744 msgid ""
5745 "If the function call successfully obtains a network record, then I<*result> "
5746 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
5747 msgstr ""
5748
5749 #.  getnetent.3 doesn't document any use of h_errno, but nevertheless
5750 #.  the nonreentrant functions no seem to set h_errno.
5751 #. type: Plain text
5752 #: build/C/man3/getnetent_r.3:118
5753 msgid ""
5754 "The buffer pointed to by I<h_errnop> is used to return the value that would "
5755 "be stored in the global variable I<h_errno> by the nonreentrant versions of "
5756 "these functions."
5757 msgstr ""
5758
5759 #. type: Plain text
5760 #: build/C/man3/getnetent_r.3:121 build/C/man3/getprotoent_r.3:111
5761 msgid ""
5762 "On success, these functions return 0.  On error, they return one of the "
5763 "positive error numbers listed in ERRORS."
5764 msgstr ""
5765
5766 #. type: Plain text
5767 #: build/C/man3/getnetent_r.3:129
5768 msgid ""
5769 "On error, record not found (B<getnetbyname_r>(), B<getnetbyaddr_r>()), or "
5770 "end of input (B<getnetent_r>())  I<result> is set to NULL."
5771 msgstr ""
5772
5773 #. type: Plain text
5774 #: build/C/man3/getnetent_r.3:134
5775 msgid "(B<getnetent_r>())  No more records in database."
5776 msgstr ""
5777
5778 #. type: TP
5779 #: build/C/man3/getnetent_r.3:134 build/C/man3/getprotoent_r.3:124 build/C/man3/getservent_r.3:123
5780 #, no-wrap
5781 msgid "B<ERANGE>"
5782 msgstr ""
5783
5784 #. type: Plain text
5785 #: build/C/man3/getnetent_r.3:141 build/C/man3/getprotoent_r.3:131 build/C/man3/getservent_r.3:130
5786 msgid ""
5787 "I<buf> is too small.  Try again with a larger buffer (and increased "
5788 "I<buflen>)."
5789 msgstr ""
5790
5791 #. type: Plain text
5792 #: build/C/man3/getnetent_r.3:145 build/C/man3/getprotoent_r.3:135 build/C/man3/getservent_r.3:134
5793 msgid ""
5794 "These functions are GNU extensions.  Functions with similar names exist on "
5795 "some other systems, though typically with different calling signatures."
5796 msgstr ""
5797
5798 #. type: Plain text
5799 #: build/C/man3/getnetent_r.3:148
5800 msgid "B<getnetent>(3), B<networks>(5)"
5801 msgstr ""
5802
5803 #. type: TH
5804 #: build/C/man2/getpeername.2:42
5805 #, no-wrap
5806 msgid "GETPEERNAME"
5807 msgstr ""
5808
5809 #. type: TH
5810 #: build/C/man2/getpeername.2:42 build/C/man5/nsswitch.conf.5:25
5811 #, no-wrap
5812 msgid "2013-02-12"
5813 msgstr ""
5814
5815 #. type: Plain text
5816 #: build/C/man2/getpeername.2:45
5817 msgid "getpeername - get name of connected peer socket"
5818 msgstr ""
5819
5820 #. type: Plain text
5821 #: build/C/man2/getpeername.2:50
5822 msgid ""
5823 "B<int getpeername(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t "
5824 "*>I<addrlen>B<);>"
5825 msgstr ""
5826
5827 #. type: Plain text
5828 #: build/C/man2/getpeername.2:63
5829 msgid ""
5830 "B<getpeername>()  returns the address of the peer connected to the socket "
5831 "I<sockfd>, in the buffer pointed to by I<addr>.  The I<addrlen> argument "
5832 "should be initialized to indicate the amount of space pointed to by "
5833 "I<addr>.  On return it contains the actual size of the name returned (in "
5834 "bytes).  The name is truncated if the buffer provided is too small."
5835 msgstr ""
5836
5837 #. type: Plain text
5838 #: build/C/man2/getpeername.2:68
5839 msgid ""
5840 "The returned address is truncated if the buffer provided is too small; in "
5841 "this case, I<addrlen> will return a value greater than was supplied to the "
5842 "call."
5843 msgstr ""
5844
5845 #. type: Plain text
5846 #: build/C/man2/getpeername.2:73 build/C/man2/shutdown.2:74
5847 msgid ""
5848 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5849 "appropriately."
5850 msgstr ""
5851
5852 #. type: TP
5853 #: build/C/man2/getpeername.2:74 build/C/man2/shutdown.2:75
5854 #, no-wrap
5855 msgid "B<EBADF>"
5856 msgstr ""
5857
5858 #. type: Plain text
5859 #: build/C/man2/getpeername.2:79
5860 msgid "The argument I<sockfd> is not a valid descriptor."
5861 msgstr ""
5862
5863 #. type: TP
5864 #: build/C/man2/getpeername.2:79 build/C/man7/packet.7:500 build/C/man7/raw.7:149 build/C/man7/unix.7:336
5865 #, no-wrap
5866 msgid "B<EFAULT>"
5867 msgstr ""
5868
5869 #. type: Plain text
5870 #: build/C/man2/getpeername.2:85
5871 msgid ""
5872 "The I<addr> argument points to memory not in a valid part of the process "
5873 "address space."
5874 msgstr ""
5875
5876 #. type: Plain text
5877 #: build/C/man2/getpeername.2:89
5878 msgid "I<addrlen> is invalid (e.g., is negative)."
5879 msgstr ""
5880
5881 #. type: TP
5882 #: build/C/man2/getpeername.2:89 build/C/man7/packet.7:512
5883 #, no-wrap
5884 msgid "B<ENOBUFS>"
5885 msgstr ""
5886
5887 #. type: Plain text
5888 #: build/C/man2/getpeername.2:93
5889 msgid ""
5890 "Insufficient resources were available in the system to perform the "
5891 "operation."
5892 msgstr ""
5893
5894 #. type: Plain text
5895 #: build/C/man2/getpeername.2:96
5896 msgid "The socket is not connected."
5897 msgstr ""
5898
5899 #. type: TP
5900 #: build/C/man2/getpeername.2:96 build/C/man2/shutdown.2:87
5901 #, no-wrap
5902 msgid "B<ENOTSOCK>"
5903 msgstr ""
5904
5905 #. type: Plain text
5906 #: build/C/man2/getpeername.2:101
5907 msgid "The argument I<sockfd> is a file, not a socket."
5908 msgstr ""
5909
5910 #. type: Plain text
5911 #: build/C/man2/getpeername.2:105
5912 msgid ""
5913 "SVr4, 4.4BSD (the B<getpeername>()  function call first appeared in 4.2BSD), "
5914 "POSIX.1-2001."
5915 msgstr ""
5916
5917 #. type: Plain text
5918 #: build/C/man2/getpeername.2:116
5919 msgid ""
5920 "The third argument of B<getpeername>()  is in reality an I<int\\ *> (and "
5921 "this is what 4.x BSD and libc4 and libc5 have).  Some POSIX confusion "
5922 "resulted in the present I<socklen_t>, also used by glibc.  See also "
5923 "B<accept>(2)."
5924 msgstr ""
5925
5926 #. type: Plain text
5927 #: build/C/man2/getpeername.2:143
5928 msgid ""
5929 "For stream sockets, once a B<connect>(2)  has been performed, either socket "
5930 "can call B<getpeername>()  to obtain the address of the peer socket.  On the "
5931 "other hand, datagram sockets are connectionless.  Calling B<connect>(2)  on "
5932 "a datagram socket merely sets the peer address for outgoing datagrams sent "
5933 "with B<write>(2)  or B<recv>(2).  The caller of B<connect>(2)  can use "
5934 "B<getpeername>()  to obtain the peer address that it earlier set for the "
5935 "socket.  However, the peer socket is unaware of this information, and "
5936 "calling B<getpeername>()  on the peer socket will return no useful "
5937 "information (unless a B<connect>(2)  call was also executed on the peer).  "
5938 "Note also that the receiver of a datagram can obtain the address of the "
5939 "sender when using B<recvfrom>(2)."
5940 msgstr ""
5941
5942 #. type: Plain text
5943 #: build/C/man2/getpeername.2:150
5944 msgid ""
5945 "B<accept>(2), B<bind>(2), B<getsockname>(2), B<ip>(7), B<socket>(7), "
5946 "B<unix>(7)"
5947 msgstr ""
5948
5949 #. type: TH
5950 #: build/C/man3/getprotoent.3:30
5951 #, no-wrap
5952 msgid "GETPROTOENT"
5953 msgstr ""
5954
5955 #. type: Plain text
5956 #: build/C/man3/getprotoent.3:34
5957 msgid ""
5958 "getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent - "
5959 "get protocol entry"
5960 msgstr ""
5961
5962 #. type: Plain text
5963 #: build/C/man3/getprotoent.3:39
5964 #, no-wrap
5965 msgid "B<struct protoent *getprotoent(void);>\n"
5966 msgstr ""
5967
5968 #. type: Plain text
5969 #: build/C/man3/getprotoent.3:41
5970 #, no-wrap
5971 msgid "B<struct protoent *getprotobyname(const char *>I<name>B<);>\n"
5972 msgstr ""
5973
5974 #. type: Plain text
5975 #: build/C/man3/getprotoent.3:43
5976 #, no-wrap
5977 msgid "B<struct protoent *getprotobynumber(int >I<proto>B<);>\n"
5978 msgstr ""
5979
5980 #. type: Plain text
5981 #: build/C/man3/getprotoent.3:45
5982 #, no-wrap
5983 msgid "B<void setprotoent(int >I<stayopen>B<);>\n"
5984 msgstr ""
5985
5986 #. type: Plain text
5987 #: build/C/man3/getprotoent.3:47
5988 #, no-wrap
5989 msgid "B<void endprotoent(void);>\n"
5990 msgstr ""
5991
5992 #. type: Plain text
5993 #: build/C/man3/getprotoent.3:58
5994 msgid ""
5995 "The B<getprotoent>()  function reads the next entry from the protocols "
5996 "database (see B<protocols>(5))  and returns a I<protoent> structure "
5997 "containing the broken-out fields from the entry.  A connection is opened to "
5998 "the database if necessary."
5999 msgstr ""
6000
6001 #. type: Plain text
6002 #: build/C/man3/getprotoent.3:68
6003 msgid ""
6004 "The B<getprotobyname>()  function returns a I<protoent> structure for the "
6005 "entry from the database that matches the protocol name I<name>.  A "
6006 "connection is opened to the database if necessary."
6007 msgstr ""
6008
6009 #. type: Plain text
6010 #: build/C/man3/getprotoent.3:78
6011 msgid ""
6012 "The B<getprotobynumber>()  function returns a I<protoent> structure for the "
6013 "entry from the database that matches the protocol number I<number>.  A "
6014 "connection is opened to the database if necessary."
6015 msgstr ""
6016
6017 #. type: Plain text
6018 #: build/C/man3/getprotoent.3:90
6019 msgid ""
6020 "The B<setprotoent>()  function opens a connection to the database, and sets "
6021 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
6022 "connection to the database will not be closed between calls to one of the "
6023 "B<getproto*>()  functions."
6024 msgstr ""
6025
6026 #. type: Plain text
6027 #: build/C/man3/getprotoent.3:94
6028 msgid "The B<endprotoent>()  function closes the connection to the database."
6029 msgstr ""
6030
6031 #. type: Plain text
6032 #: build/C/man3/getprotoent.3:100
6033 msgid "The I<protoent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
6034 msgstr ""
6035
6036 #. type: Plain text
6037 #: build/C/man3/getprotoent.3:108
6038 #, no-wrap
6039 msgid ""
6040 "struct protoent {\n"
6041 "    char  *p_name;       /* official protocol name */\n"
6042 "    char **p_aliases;    /* alias list */\n"
6043 "    int    p_proto;      /* protocol number */\n"
6044 "}\n"
6045 msgstr ""
6046
6047 #. type: Plain text
6048 #: build/C/man3/getprotoent.3:114
6049 msgid "The members of the I<protoent> structure are:"
6050 msgstr ""
6051
6052 #. type: TP
6053 #: build/C/man3/getprotoent.3:114
6054 #, no-wrap
6055 msgid "I<p_name>"
6056 msgstr ""
6057
6058 #. type: Plain text
6059 #: build/C/man3/getprotoent.3:117
6060 msgid "The official name of the protocol."
6061 msgstr ""
6062
6063 #. type: TP
6064 #: build/C/man3/getprotoent.3:117
6065 #, no-wrap
6066 msgid "I<p_aliases>"
6067 msgstr ""
6068
6069 #. type: Plain text
6070 #: build/C/man3/getprotoent.3:120
6071 msgid "A NULL-terminated list of alternative names for the protocol."
6072 msgstr ""
6073
6074 #. type: TP
6075 #: build/C/man3/getprotoent.3:120
6076 #, no-wrap
6077 msgid "I<p_proto>"
6078 msgstr ""
6079
6080 #. type: Plain text
6081 #: build/C/man3/getprotoent.3:123
6082 msgid "The protocol number."
6083 msgstr ""
6084
6085 #. type: Plain text
6086 #: build/C/man3/getprotoent.3:134
6087 msgid ""
6088 "The B<getprotoent>(), B<getprotobyname>()  and B<getprotobynumber>()  "
6089 "functions return a pointer to a statically allocated I<protoent> structure, "
6090 "or a null pointer if an error occurs or the end of the file is reached."
6091 msgstr ""
6092
6093 #. type: TP
6094 #: build/C/man3/getprotoent.3:136 build/C/man5/protocols.5:78
6095 #, no-wrap
6096 msgid "I</etc/protocols>"
6097 msgstr ""
6098
6099 #. type: Plain text
6100 #: build/C/man3/getprotoent.3:139
6101 msgid "protocol database file"
6102 msgstr ""
6103
6104 #. type: Plain text
6105 #: build/C/man3/getprotoent.3:147
6106 msgid "B<getnetent>(3), B<getprotoent_r>(3), B<getservent>(3), B<protocols>(5)"
6107 msgstr ""
6108
6109 #. type: TH
6110 #: build/C/man3/getprotoent_r.3:26
6111 #, no-wrap
6112 msgid "GETPROTOENT_R"
6113 msgstr ""
6114
6115 #. type: Plain text
6116 #: build/C/man3/getprotoent_r.3:30
6117 msgid ""
6118 "getprotoent_r, getprotobyname_r, getprotobynumber_r - get protocol entry "
6119 "(reentrant)"
6120 msgstr ""
6121
6122 #. type: Plain text
6123 #: build/C/man3/getprotoent_r.3:36
6124 #, no-wrap
6125 msgid ""
6126 "B<int getprotoent_r(struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6127 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6128 msgstr ""
6129
6130 #. type: Plain text
6131 #: build/C/man3/getprotoent_r.3:40
6132 #, no-wrap
6133 msgid ""
6134 "B<int getprotobyname_r(const char *>I<name>B<,>\n"
6135 "B<                struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6136 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6137 msgstr ""
6138
6139 #. type: Plain text
6140 #: build/C/man3/getprotoent_r.3:44
6141 #, no-wrap
6142 msgid ""
6143 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
6144 "B<                struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6145 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6146 msgstr ""
6147
6148 #. type: Plain text
6149 #: build/C/man3/getprotoent_r.3:55
6150 msgid "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
6151 msgstr ""
6152
6153 #. type: Plain text
6154 #: build/C/man3/getprotoent_r.3:76
6155 msgid ""
6156 "The B<getprotoent_r>(), B<getprotobyname_r>(), and B<getprotobynumber_r>()  "
6157 "functions are the reentrant equivalents of, respectively, B<getprotoent>(3), "
6158 "B<getprotobyname>(3), and B<getprotobynumber>(3).  They differ in the way "
6159 "that the I<protoent> structure is returned, and in the function calling "
6160 "signature and return value.  This manual page describes just the differences "
6161 "from the nonreentrant functions."
6162 msgstr ""
6163
6164 #. type: Plain text
6165 #: build/C/man3/getprotoent_r.3:82
6166 msgid ""
6167 "Instead of returning a pointer to a statically allocated I<protoent> "
6168 "structure as the function result, these functions copy the structure into "
6169 "the location pointed to by I<result_buf>."
6170 msgstr ""
6171
6172 #.  I can find no information on the required/recommended buffer size;
6173 #.  the nonreentrant functions use a 1024 byte buffer.
6174 #.  The 1024 byte value is also what the Solaris man page suggests. -- mtk
6175 #. type: Plain text
6176 #: build/C/man3/getprotoent_r.3:100
6177 msgid ""
6178 "The I<buf> array is used to store the string fields pointed to by the "
6179 "returned I<protoent> structure.  (The nonreentrant functions allocate these "
6180 "strings in static storage.)  The size of this array is specified in "
6181 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
6182 "and the caller must try again with a larger buffer.  (A buffer of length "
6183 "1024 bytes should be sufficient for most applications.)"
6184 msgstr ""
6185
6186 #. type: Plain text
6187 #: build/C/man3/getprotoent_r.3:108
6188 msgid ""
6189 "If the function call successfully obtains a protocol record, then I<*result> "
6190 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
6191 msgstr ""
6192
6193 #. type: Plain text
6194 #: build/C/man3/getprotoent_r.3:119
6195 msgid ""
6196 "On error, record not found (B<getprotobyname_r>(), B<getprotobynumber_r>()), "
6197 "or end of input (B<getprotoent_r>())  I<result> is set to NULL."
6198 msgstr ""
6199
6200 #. type: Plain text
6201 #: build/C/man3/getprotoent_r.3:124
6202 msgid "(B<getprotoent_r>())  No more records in database."
6203 msgstr ""
6204
6205 #. type: Plain text
6206 #: build/C/man3/getprotoent_r.3:149
6207 msgid ""
6208 "The program below uses B<getprotobyname_r>()  to retrieve the protocol "
6209 "record for the protocol named in its first command-line argument.  If a "
6210 "second (integer) command-line argument is supplied, it is used as the "
6211 "initial value for I<buflen>; if B<getprotobyname_r>()  fails with the error "
6212 "B<ERANGE>, the program retries with larger buffer sizes.  The following "
6213 "shell session shows a couple of sample runs:"
6214 msgstr ""
6215
6216 #. type: Plain text
6217 #: build/C/man3/getprotoent_r.3:160
6218 #, no-wrap
6219 msgid ""
6220 "$B< ./a.out tcp 1>\n"
6221 "ERANGE! Retrying with larger buffer\n"
6222 "getprotobyname_r() returned: 0 (success)  (buflen=78)\n"
6223 "p_name=tcp; p_proto=6; aliases=TCP\n"
6224 "$B< ./a.out xxx 1>\n"
6225 "ERANGE! Retrying with larger buffer\n"
6226 "getprotobyname_r() returned: 0 (success)  (buflen=100)\n"
6227 "Call failed/record not found\n"
6228 msgstr ""
6229
6230 #. type: Plain text
6231 #: build/C/man3/getprotoent_r.3:172 build/C/man3/getservent_r.3:170
6232 #, no-wrap
6233 msgid ""
6234 "#define _GNU_SOURCE\n"
6235 "#include E<lt>ctype.hE<gt>\n"
6236 "#include E<lt>netdb.hE<gt>\n"
6237 "#include E<lt>stdlib.hE<gt>\n"
6238 "#include E<lt>stdio.hE<gt>\n"
6239 "#include E<lt>errno.hE<gt>\n"
6240 "#include E<lt>string.hE<gt>\n"
6241 msgstr ""
6242
6243 #. type: Plain text
6244 #: build/C/man3/getprotoent_r.3:174 build/C/man3/getservent_r.3:172
6245 #, no-wrap
6246 msgid "#define MAX_BUF 10000\n"
6247 msgstr ""
6248
6249 #. type: Plain text
6250 #: build/C/man3/getprotoent_r.3:183
6251 #, no-wrap
6252 msgid ""
6253 "int\n"
6254 "main(int argc, char *argv[])\n"
6255 "{\n"
6256 "    int buflen, erange_cnt, s;\n"
6257 "    struct protoent result_buf;\n"
6258 "    struct protoent *result;\n"
6259 "    char buf[MAX_BUF];\n"
6260 "    char **p;\n"
6261 msgstr ""
6262
6263 #. type: Plain text
6264 #: build/C/man3/getprotoent_r.3:188
6265 #, no-wrap
6266 msgid ""
6267 "    if (argc E<lt> 2) {\n"
6268 "        printf(\"Usage: %s proto-name [buflen]\\en\", argv[0]);\n"
6269 "        exit(EXIT_FAILURE);\n"
6270 "    }\n"
6271 msgstr ""
6272
6273 #. type: Plain text
6274 #: build/C/man3/getprotoent_r.3:192
6275 #, no-wrap
6276 msgid ""
6277 "    buflen = 1024;\n"
6278 "    if (argc E<gt> 2)\n"
6279 "        buflen = atoi(argv[2]);\n"
6280 msgstr ""
6281
6282 #. type: Plain text
6283 #: build/C/man3/getprotoent_r.3:197 build/C/man3/getservent_r.3:200
6284 #, no-wrap
6285 msgid ""
6286 "    if (buflen E<gt> MAX_BUF) {\n"
6287 "        printf(\"Exceeded buffer limit (%d)\\en\", MAX_BUF);\n"
6288 "        exit(EXIT_FAILURE);\n"
6289 "    }\n"
6290 msgstr ""
6291
6292 #. type: Plain text
6293 #: build/C/man3/getprotoent_r.3:206
6294 #, no-wrap
6295 msgid ""
6296 "    erange_cnt = 0;\n"
6297 "    do {\n"
6298 "        s = getprotobyname_r(argv[1], &result_buf,\n"
6299 "                     buf, buflen, &result);\n"
6300 "        if (s == ERANGE) {\n"
6301 "            if (erange_cnt == 0)\n"
6302 "                printf(\"ERANGE! Retrying with larger buffer\\en\");\n"
6303 "            erange_cnt++;\n"
6304 msgstr ""
6305
6306 #. type: Plain text
6307 #: build/C/man3/getprotoent_r.3:209 build/C/man3/getservent_r.3:212
6308 #, no-wrap
6309 msgid ""
6310 "            /* Increment a byte at a time so we can see exactly\n"
6311 "               what size buffer was required */\n"
6312 msgstr ""
6313
6314 #. type: Plain text
6315 #: build/C/man3/getprotoent_r.3:211 build/C/man3/getservent_r.3:214
6316 #, no-wrap
6317 msgid "            buflen++;\n"
6318 msgstr ""
6319
6320 #. type: Plain text
6321 #: build/C/man3/getprotoent_r.3:218 build/C/man3/getservent_r.3:221
6322 #, no-wrap
6323 msgid ""
6324 "            if (buflen E<gt> MAX_BUF) {\n"
6325 "                printf(\"Exceeded buffer limit (%d)\\en\", MAX_BUF);\n"
6326 "                exit(EXIT_FAILURE);\n"
6327 "            }\n"
6328 "        }\n"
6329 "    } while (s == ERANGE);\n"
6330 msgstr ""
6331
6332 #. type: Plain text
6333 #: build/C/man3/getprotoent_r.3:222
6334 #, no-wrap
6335 msgid ""
6336 "    printf(\"getprotobyname_r() returned: %s  (buflen=%d)\\en\",\n"
6337 "            (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
6338 "            strerror(s), buflen);\n"
6339 msgstr ""
6340
6341 #. type: Plain text
6342 #: build/C/man3/getprotoent_r.3:227 build/C/man3/getservent_r.3:230
6343 #, no-wrap
6344 msgid ""
6345 "    if (s != 0 || result == NULL) {\n"
6346 "        printf(\"Call failed/record not found\\en\");\n"
6347 "        exit(EXIT_FAILURE);\n"
6348 "    }\n"
6349 msgstr ""
6350
6351 #. type: Plain text
6352 #: build/C/man3/getprotoent_r.3:233
6353 #, no-wrap
6354 msgid ""
6355 "    printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
6356 "                result_buf.p_name, result_buf.p_proto);\n"
6357 "    for (p = result_buf.p_aliases; *p != NULL; p++)\n"
6358 "        printf(\"%s \", *p);\n"
6359 "    printf(\"\\en\");\n"
6360 msgstr ""
6361
6362 #. type: Plain text
6363 #: build/C/man3/getprotoent_r.3:240
6364 msgid "B<getprotoent>(3), B<protocols>(5)"
6365 msgstr ""
6366
6367 #. type: TH
6368 #: build/C/man3/getservent.3:34
6369 #, no-wrap
6370 msgid "GETSERVENT"
6371 msgstr ""
6372
6373 #. type: Plain text
6374 #: build/C/man3/getservent.3:38
6375 msgid ""
6376 "getservent, getservbyname, getservbyport, setservent, endservent - get "
6377 "service entry"
6378 msgstr ""
6379
6380 #. type: Plain text
6381 #: build/C/man3/getservent.3:43
6382 #, no-wrap
6383 msgid "B<struct servent *getservent(void);>\n"
6384 msgstr ""
6385
6386 #. type: Plain text
6387 #: build/C/man3/getservent.3:45
6388 #, no-wrap
6389 msgid ""
6390 "B<struct servent *getservbyname(const char *>I<name>B<, const char "
6391 "*>I<proto>B<);>\n"
6392 msgstr ""
6393
6394 #. type: Plain text
6395 #: build/C/man3/getservent.3:47
6396 #, no-wrap
6397 msgid "B<struct servent *getservbyport(int >I<port>B<, const char *>I<proto>B<);>\n"
6398 msgstr ""
6399
6400 #. type: Plain text
6401 #: build/C/man3/getservent.3:49
6402 #, no-wrap
6403 msgid "B<void setservent(int >I<stayopen>B<);>\n"
6404 msgstr ""
6405
6406 #. type: Plain text
6407 #: build/C/man3/getservent.3:51
6408 #, no-wrap
6409 msgid "B<void endservent(void);>\n"
6410 msgstr ""
6411
6412 #. type: Plain text
6413 #: build/C/man3/getservent.3:62
6414 msgid ""
6415 "The B<getservent>()  function reads the next entry from the services "
6416 "database (see B<services>(5))  and returns a I<servent> structure containing "
6417 "the broken-out fields from the entry.  A connection is opened to the "
6418 "database if necessary."
6419 msgstr ""
6420
6421 #. type: Plain text
6422 #: build/C/man3/getservent.3:77
6423 msgid ""
6424 "The B<getservbyname>()  function returns a I<servent> structure for the "
6425 "entry from the database that matches the service I<name> using protocol "
6426 "I<proto>.  If I<proto> is NULL, any protocol will be matched.  A connection "
6427 "is opened to the database if necessary."
6428 msgstr ""
6429
6430 #. type: Plain text
6431 #: build/C/man3/getservent.3:93
6432 msgid ""
6433 "The B<getservbyport>()  function returns a I<servent> structure for the "
6434 "entry from the database that matches the port I<port> (given in network byte "
6435 "order)  using protocol I<proto>.  If I<proto> is NULL, any protocol will be "
6436 "matched.  A connection is opened to the database if necessary."
6437 msgstr ""
6438
6439 #. type: Plain text
6440 #: build/C/man3/getservent.3:105
6441 msgid ""
6442 "The B<setservent>()  function opens a connection to the database, and sets "
6443 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
6444 "connection to the database will not be closed between calls to one of the "
6445 "B<getserv*>()  functions."
6446 msgstr ""
6447
6448 #. type: Plain text
6449 #: build/C/man3/getservent.3:109
6450 msgid "The B<endservent>()  function closes the connection to the database."
6451 msgstr ""
6452
6453 #. type: Plain text
6454 #: build/C/man3/getservent.3:115
6455 msgid "The I<servent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
6456 msgstr ""
6457
6458 #. type: Plain text
6459 #: build/C/man3/getservent.3:124
6460 #, no-wrap
6461 msgid ""
6462 "struct servent {\n"
6463 "    char  *s_name;       /* official service name */\n"
6464 "    char **s_aliases;    /* alias list */\n"
6465 "    int    s_port;       /* port number */\n"
6466 "    char  *s_proto;      /* protocol to use */\n"
6467 "}\n"
6468 msgstr ""
6469
6470 #. type: Plain text
6471 #: build/C/man3/getservent.3:130
6472 msgid "The members of the I<servent> structure are:"
6473 msgstr ""
6474
6475 #. type: TP
6476 #: build/C/man3/getservent.3:130
6477 #, no-wrap
6478 msgid "I<s_name>"
6479 msgstr ""
6480
6481 #. type: Plain text
6482 #: build/C/man3/getservent.3:133
6483 msgid "The official name of the service."
6484 msgstr ""
6485
6486 #. type: TP
6487 #: build/C/man3/getservent.3:133
6488 #, no-wrap
6489 msgid "I<s_aliases>"
6490 msgstr ""
6491
6492 #. type: Plain text
6493 #: build/C/man3/getservent.3:136
6494 msgid "A NULL-terminated list of alternative names for the service."
6495 msgstr ""
6496
6497 #. type: TP
6498 #: build/C/man3/getservent.3:136
6499 #, no-wrap
6500 msgid "I<s_port>"
6501 msgstr ""
6502
6503 #. type: Plain text
6504 #: build/C/man3/getservent.3:139
6505 msgid "The port number for the service given in network byte order."
6506 msgstr ""
6507
6508 #. type: TP
6509 #: build/C/man3/getservent.3:139
6510 #, no-wrap
6511 msgid "I<s_proto>"
6512 msgstr ""
6513
6514 #. type: Plain text
6515 #: build/C/man3/getservent.3:142
6516 msgid "The name of the protocol to use with this service."
6517 msgstr ""
6518
6519 #. type: Plain text
6520 #: build/C/man3/getservent.3:153
6521 msgid ""
6522 "The B<getservent>(), B<getservbyname>()  and B<getservbyport>()  functions "
6523 "return a pointer to a statically allocated I<servent> structure, or NULL if "
6524 "an error occurs or the end of the file is reached."
6525 msgstr ""
6526
6527 #. type: TP
6528 #: build/C/man3/getservent.3:154 build/C/man5/services.5:186
6529 #, no-wrap
6530 msgid "I</etc/services>"
6531 msgstr ""
6532
6533 #. type: Plain text
6534 #: build/C/man3/getservent.3:157
6535 msgid "services database file"
6536 msgstr ""
6537
6538 #. type: Plain text
6539 #: build/C/man3/getservent.3:164
6540 msgid "B<getnetent>(3), B<getprotoent>(3), B<getservent_r>(3), B<services>(5)"
6541 msgstr ""
6542
6543 #. type: TH
6544 #: build/C/man3/getservent_r.3:26
6545 #, no-wrap
6546 msgid "GETSERVENT_R"
6547 msgstr ""
6548
6549 #. type: Plain text
6550 #: build/C/man3/getservent_r.3:30
6551 msgid ""
6552 "getservent_r, getservbyname_r, getservbyport_r - get service entry "
6553 "(reentrant)"
6554 msgstr ""
6555
6556 #. type: Plain text
6557 #: build/C/man3/getservent_r.3:36
6558 #, no-wrap
6559 msgid ""
6560 "B<int getservent_r(struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6561 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6562 msgstr ""
6563
6564 #. type: Plain text
6565 #: build/C/man3/getservent_r.3:40
6566 #, no-wrap
6567 msgid ""
6568 "B<int getservbyname_r(const char *>I<name>B<, const char *>I<proto>B<,>\n"
6569 "B<                struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6570 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6571 msgstr ""
6572
6573 #. type: Plain text
6574 #: build/C/man3/getservent_r.3:44
6575 #, no-wrap
6576 msgid ""
6577 "B<int getservbyport_r(int >I<port>B<, const char *>I<proto>B<,>\n"
6578 "B<                struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6579 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6580 msgstr ""
6581
6582 #. type: Plain text
6583 #: build/C/man3/getservent_r.3:55
6584 msgid "B<getservent_r>(), B<getservbyname_r>(), B<getservbyport_r>():"
6585 msgstr ""
6586
6587 #. type: Plain text
6588 #: build/C/man3/getservent_r.3:76
6589 msgid ""
6590 "The B<getservent_r>(), B<getservbyname_r>(), and B<getservbyport_r>()  "
6591 "functions are the reentrant equivalents of, respectively, B<getservent>(3), "
6592 "B<getservbyname>(3), and B<getservbyport>(3).  They differ in the way that "
6593 "the I<servent> structure is returned, and in the function calling signature "
6594 "and return value.  This manual page describes just the differences from the "
6595 "nonreentrant functions."
6596 msgstr ""
6597
6598 #. type: Plain text
6599 #: build/C/man3/getservent_r.3:82
6600 msgid ""
6601 "Instead of returning a pointer to a statically allocated I<servent> "
6602 "structure as the function result, these functions copy the structure into "
6603 "the location pointed to by I<result_buf>."
6604 msgstr ""
6605
6606 #.  I can find no information on the required/recommended buffer size;
6607 #.  the nonreentrant functions use a 1024 byte buffer -- mtk.
6608 #. type: Plain text
6609 #: build/C/man3/getservent_r.3:99
6610 msgid ""
6611 "The I<buf> array is used to store the string fields pointed to by the "
6612 "returned I<servent> structure.  (The nonreentrant functions allocate these "
6613 "strings in static storage.)  The size of this array is specified in "
6614 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
6615 "and the caller must try again with a larger buffer.  (A buffer of length "
6616 "1024 bytes should be sufficient for most applications.)"
6617 msgstr ""
6618
6619 #. type: Plain text
6620 #: build/C/man3/getservent_r.3:107
6621 msgid ""
6622 "If the function call successfully obtains a service record, then I<*result> "
6623 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
6624 msgstr ""
6625
6626 #. type: Plain text
6627 #: build/C/man3/getservent_r.3:110
6628 msgid ""
6629 "On success, these functions return 0.  On error, they return one of the "
6630 "positive error numbers listed in errors."
6631 msgstr ""
6632
6633 #. type: Plain text
6634 #: build/C/man3/getservent_r.3:118
6635 msgid ""
6636 "On error, record not found (B<getservbyname_r>(), B<getservbyport_r>()), or "
6637 "end of input (B<getservent_r>())  I<result> is set to NULL."
6638 msgstr ""
6639
6640 #. type: Plain text
6641 #: build/C/man3/getservent_r.3:123
6642 msgid "(B<getservent_r>())  No more records in database."
6643 msgstr ""
6644
6645 #. type: Plain text
6646 #: build/C/man3/getservent_r.3:148
6647 msgid ""
6648 "The program below uses B<getservbyport_r>()  to retrieve the service record "
6649 "for the port and protocol named in its first command-line argument.  If a "
6650 "third (integer) command-line argument is supplied, it is used as the initial "
6651 "value for I<buflen>; if B<getservbyport_r>()  fails with the error "
6652 "B<ERANGE>, the program retries with larger buffer sizes.  The following "
6653 "shell session shows a couple of sample runs:"
6654 msgstr ""
6655
6656 #. type: Plain text
6657 #: build/C/man3/getservent_r.3:158
6658 #, no-wrap
6659 msgid ""
6660 "$B< ./a.out 7 tcp 1>\n"
6661 "ERANGE! Retrying with larger buffer\n"
6662 "getservbyport_r() returned: 0 (success)  (buflen=87)\n"
6663 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
6664 "$B< ./a.out 77777 tcp>\n"
6665 "getservbyport_r() returned: 0 (success)  (buflen=1024)\n"
6666 "Call failed/record not found\n"
6667 msgstr ""
6668
6669 #. type: Plain text
6670 #: build/C/man3/getservent_r.3:182
6671 #, no-wrap
6672 msgid ""
6673 "int\n"
6674 "main(int argc, char *argv[])\n"
6675 "{\n"
6676 "    int buflen, erange_cnt, port, s;\n"
6677 "    struct servent result_buf;\n"
6678 "    struct servent *result;\n"
6679 "    char buf[MAX_BUF];\n"
6680 "    char *protop;\n"
6681 "    char **p;\n"
6682 msgstr ""
6683
6684 #. type: Plain text
6685 #: build/C/man3/getservent_r.3:187
6686 #, no-wrap
6687 msgid ""
6688 "    if (argc E<lt> 3) {\n"
6689 "        printf(\"Usage: %s port-num proto-name [buflen]\\en\", argv[0]);\n"
6690 "        exit(EXIT_FAILURE);\n"
6691 "    }\n"
6692 msgstr ""
6693
6694 #. type: Plain text
6695 #: build/C/man3/getservent_r.3:191
6696 #, no-wrap
6697 msgid ""
6698 "    port = htons(atoi(argv[1]));\n"
6699 "    protop = (strcmp(argv[2], \"null\") == 0 ||\n"
6700 "              strcmp(argv[2], \"NULL\") == 0) ?  NULL : argv[2];\n"
6701 msgstr ""
6702
6703 #. type: Plain text
6704 #: build/C/man3/getservent_r.3:195
6705 #, no-wrap
6706 msgid ""
6707 "    buflen = 1024;\n"
6708 "    if (argc E<gt> 3)\n"
6709 "        buflen = atoi(argv[3]);\n"
6710 msgstr ""
6711
6712 #. type: Plain text
6713 #: build/C/man3/getservent_r.3:209
6714 #, no-wrap
6715 msgid ""
6716 "    erange_cnt = 0;\n"
6717 "    do {\n"
6718 "        s = getservbyport_r(port, protop, &result_buf,\n"
6719 "                     buf, buflen, &result);\n"
6720 "        if (s == ERANGE) {\n"
6721 "            if (erange_cnt == 0)\n"
6722 "                printf(\"ERANGE! Retrying with larger buffer\\en\");\n"
6723 "            erange_cnt++;\n"
6724 msgstr ""
6725
6726 #. type: Plain text
6727 #: build/C/man3/getservent_r.3:225
6728 #, no-wrap
6729 msgid ""
6730 "    printf(\"getservbyport_r() returned: %s  (buflen=%d)\\en\",\n"
6731 "            (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
6732 "            strerror(s), buflen);\n"
6733 msgstr ""
6734
6735 #. type: Plain text
6736 #: build/C/man3/getservent_r.3:237
6737 #, no-wrap
6738 msgid ""
6739 "    printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
6740 "                result_buf.s_name, result_buf.s_proto,\n"
6741 "                ntohs(result_buf.s_port));\n"
6742 "    for (p = result_buf.s_aliases; *p != NULL; p++)\n"
6743 "        printf(\"%s \", *p);\n"
6744 "    printf(\"\\en\");\n"
6745 msgstr ""
6746
6747 #. type: Plain text
6748 #: build/C/man3/getservent_r.3:244
6749 msgid "B<getservent>(3), B<services>(5)"
6750 msgstr ""
6751
6752 #. type: TH
6753 #: build/C/man5/host.conf.5:26
6754 #, no-wrap
6755 msgid "HOST.CONF"
6756 msgstr ""
6757
6758 #. type: TH
6759 #: build/C/man5/host.conf.5:26
6760 #, no-wrap
6761 msgid "2003-08-23"
6762 msgstr ""
6763
6764 #. type: TH
6765 #: build/C/man5/host.conf.5:26 build/C/man5/networks.5:26
6766 #, no-wrap
6767 msgid "Linux System Administration"
6768 msgstr ""
6769
6770 #. type: Plain text
6771 #: build/C/man5/host.conf.5:29
6772 msgid "host.conf - resolver configuration file"
6773 msgstr ""
6774
6775 #. type: Plain text
6776 #: build/C/man5/host.conf.5:38
6777 msgid ""
6778 "The file I</etc/host.conf> contains configuration information specific to "
6779 "the resolver library.  It should contain one configuration keyword per line, "
6780 "followed by appropriate configuration information.  The keywords recognized "
6781 "are I<order>, I<trim>, I<multi>, I<nospoof>, I<spoof>, and I<reorder>.  "
6782 "These keywords are described below."
6783 msgstr ""
6784
6785 #. type: TP
6786 #: build/C/man5/host.conf.5:38
6787 #, no-wrap
6788 msgid "I<order>"
6789 msgstr ""
6790
6791 #. type: Plain text
6792 #: build/C/man5/host.conf.5:44
6793 msgid ""
6794 "This keyword specifies how host lookups are to be performed.  It should be "
6795 "followed by one or more lookup methods, separated by commas.  Valid methods "
6796 "are I<bind>, I<hosts>, and I<nis>."
6797 msgstr ""
6798
6799 #. type: TP
6800 #: build/C/man5/host.conf.5:44
6801 #, no-wrap
6802 msgid "I<trim>"
6803 msgstr ""
6804
6805 #. type: Plain text
6806 #: build/C/man5/host.conf.5:61
6807 msgid ""
6808 "This keyword may be listed more than once.  Each time it should be followed "
6809 "by a list of domains, separated by colons (\\(aq:\\(aq), semicolons "
6810 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot.  When set, the "
6811 "resolv+ library will automatically trim the given domain name from the end "
6812 "of any hostname resolved via DNS.  This is intended for use with local hosts "
6813 "and domains.  (Related note: trim will not affect hostnames gathered via NIS "
6814 "or the hosts file.  Care should be taken to ensure that the first hostname "
6815 "for each entry in the hosts file is fully qualified or unqualified, as "
6816 "appropriate for the local installation.)"
6817 msgstr ""
6818
6819 #. type: TP
6820 #: build/C/man5/host.conf.5:61
6821 #, no-wrap
6822 msgid "I<multi>"
6823 msgstr ""
6824
6825 #. type: Plain text
6826 #: build/C/man5/host.conf.5:76
6827 msgid ""
6828 "Valid values are I<on> and I<off>.  If set to I<on>, the resolv+ library "
6829 "will return all valid addresses for a host that appears in the I</etc/hosts> "
6830 "file, instead of only the first.  This is I<off> by default, as it may cause "
6831 "a substantial performance loss at sites with large hosts files."
6832 msgstr ""
6833
6834 #. type: TP
6835 #: build/C/man5/host.conf.5:76
6836 #, no-wrap
6837 msgid "I<nospoof>"
6838 msgstr ""
6839
6840 #. type: Plain text
6841 #: build/C/man5/host.conf.5:91
6842 msgid ""
6843 "Valid values are I<on> and I<off>.  If set to I<on>, the resolv+ library "
6844 "will attempt to prevent hostname spoofing to enhance the security of "
6845 "B<rlogin> and B<rsh>.  It works as follows: after performing a host address "
6846 "lookup, resolv+ will perform a hostname lookup for that address.  If the two "
6847 "hostnames do not match, the query will fail.  The default value is I<off>."
6848 msgstr ""
6849
6850 #. type: TP
6851 #: build/C/man5/host.conf.5:91
6852 #, no-wrap
6853 msgid "I<spoofalert>"
6854 msgstr ""
6855
6856 #. type: Plain text
6857 #: build/C/man5/host.conf.5:103
6858 msgid ""
6859 "Valid values are I<on> and I<off>.  If this option is set to I<on> and the "
6860 "I<nospoof> option is also set, resolv+ will log a warning of the error via "
6861 "the syslog facility.  The default value is I<off>."
6862 msgstr ""
6863
6864 #. type: TP
6865 #: build/C/man5/host.conf.5:103
6866 #, no-wrap
6867 msgid "I<spoof>"
6868 msgstr ""
6869
6870 #. type: Plain text
6871 #: build/C/man5/host.conf.5:122
6872 msgid ""
6873 "Valid values are I<off>, I<nowarn> and I<warn>.  If this option is set to "
6874 "I<off>, spoofed addresses are permitted and no warnings will be emitted via "
6875 "the syslog facility.  If this option is set to I<warn>, resolv+ will attempt "
6876 "to prevent hostname spoofing to enhance the security and log a warning of "
6877 "the error via the syslog facility.  If this option is set to I<nowarn>, the "
6878 "resolv+ library will attempt to prevent hostname spoofing to enhance the "
6879 "security but not emit warnings via the syslog facility.  Setting this option "
6880 "to anything else is equal to setting it to I<nowarn>."
6881 msgstr ""
6882
6883 #. type: TP
6884 #: build/C/man5/host.conf.5:122
6885 #, no-wrap
6886 msgid "I<reorder>"
6887 msgstr ""
6888
6889 #. type: Plain text
6890 #: build/C/man5/host.conf.5:135
6891 msgid ""
6892 "Valid values are I<on> and I<off>.  If set to I<on>, resolv+ will attempt to "
6893 "reorder host addresses so that local addresses (i.e., on the same subnet) "
6894 "are listed first when a B<gethostbyname>(3)  is performed.  Reordering is "
6895 "done for all lookup methods.  The default value is I<off>."
6896 msgstr ""
6897
6898 #. type: SH
6899 #: build/C/man5/host.conf.5:135
6900 #, no-wrap
6901 msgid "ENVIRONMENT"
6902 msgstr ""
6903
6904 #. type: Plain text
6905 #: build/C/man5/host.conf.5:139
6906 msgid ""
6907 "There are six environment variables that can be used to allow users to "
6908 "override the behavior which is configured in I</etc/host.conf>."
6909 msgstr ""
6910
6911 #. type: TP
6912 #: build/C/man5/host.conf.5:139
6913 #, no-wrap
6914 msgid "B<RESOLV_HOST_CONF>"
6915 msgstr ""
6916
6917 #. type: Plain text
6918 #: build/C/man5/host.conf.5:143
6919 msgid ""
6920 "If set, this variable points to a file that should be read instead of "
6921 "I</etc/host.conf>."
6922 msgstr ""
6923
6924 #. type: TP
6925 #: build/C/man5/host.conf.5:143
6926 #, no-wrap
6927 msgid "B<RESOLV_SERV_ORDER>"
6928 msgstr ""
6929
6930 #. type: Plain text
6931 #: build/C/man5/host.conf.5:148
6932 msgid "Overrides the I<order> command."
6933 msgstr ""
6934
6935 #. type: TP
6936 #: build/C/man5/host.conf.5:148
6937 #, no-wrap
6938 msgid "B<RESOLV_SPOOF_CHECK>"
6939 msgstr ""
6940
6941 #. type: Plain text
6942 #: build/C/man5/host.conf.5:157
6943 msgid ""
6944 "Overrides the I<nospoof>, I<spoofalert> and I<spoof> commands in the same "
6945 "way as the I<spoof> command is parsed.  Valid values are I<off>, I<nowarn> "
6946 "and I<warn>."
6947 msgstr ""
6948
6949 #. type: TP
6950 #: build/C/man5/host.conf.5:157
6951 #, no-wrap
6952 msgid "B<RESOLV_MULTI>"
6953 msgstr ""
6954
6955 #. type: Plain text
6956 #: build/C/man5/host.conf.5:162
6957 msgid "Overrides the I<multi> command."
6958 msgstr ""
6959
6960 #. type: TP
6961 #: build/C/man5/host.conf.5:162
6962 #, no-wrap
6963 msgid "B<RESOLV_REORDER>"
6964 msgstr ""
6965
6966 #. type: Plain text
6967 #: build/C/man5/host.conf.5:167
6968 msgid "Overrides the I<reorder> command."
6969 msgstr ""
6970
6971 #. type: TP
6972 #: build/C/man5/host.conf.5:167
6973 #, no-wrap
6974 msgid "B<RESOLV_ADD_TRIM_DOMAINS>"
6975 msgstr ""
6976
6977 #. type: Plain text
6978 #: build/C/man5/host.conf.5:172
6979 msgid ""
6980 "A list of domains, separated by colons (\\(aq:\\(aq), semicolons "
6981 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot, which will be "
6982 "added to the list of domains that should be trimmed."
6983 msgstr ""
6984
6985 #. type: TP
6986 #: build/C/man5/host.conf.5:172
6987 #, no-wrap
6988 msgid "B<RESOLV_OVERRIDE_TRIM_DOMAINS>"
6989 msgstr ""
6990
6991 #. type: Plain text
6992 #: build/C/man5/host.conf.5:180
6993 msgid ""
6994 "A list of domains, separated by colons (\\(aq:\\(aq), semicolons "
6995 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot, which will "
6996 "replace the list of domains that should be trimmed.  Overrides the I<trim> "
6997 "command."
6998 msgstr ""
6999
7000 #. type: Plain text
7001 #: build/C/man5/host.conf.5:184 build/C/man5/host.conf.5:187
7002 msgid "Resolver configuration file"
7003 msgstr ""
7004
7005 #. type: TP
7006 #: build/C/man5/host.conf.5:184
7007 #, no-wrap
7008 msgid "I</etc/resolv.conf>"
7009 msgstr ""
7010
7011 #. type: Plain text
7012 #: build/C/man5/host.conf.5:190
7013 msgid "Local hosts database"
7014 msgstr ""
7015
7016 #. type: Plain text
7017 #: build/C/man5/host.conf.5:199
7018 msgid ""
7019 "The following differences exist compared to the original implementation.  A "
7020 "new command I<spoof> and a new environment variable B<RESOLV_SPOOF_CHECK> "
7021 "can take arguments like I<off>, I<nowarn> and I<warn>.  Line comments can "
7022 "appear anywhere and not only at the beginning of a line."
7023 msgstr ""
7024
7025 #. type: Plain text
7026 #: build/C/man5/host.conf.5:204
7027 msgid "B<gethostbyname>(3), B<hostname>(7), B<named>(8), B<resolv+>(8)"
7028 msgstr ""
7029
7030 #. type: TH
7031 #: build/C/man7/hostname.7:39
7032 #, no-wrap
7033 msgid "HOSTNAME"
7034 msgstr ""
7035
7036 #. type: TH
7037 #: build/C/man7/hostname.7:39
7038 #, no-wrap
7039 msgid "2010-11-07"
7040 msgstr ""
7041
7042 #. type: Plain text
7043 #: build/C/man7/hostname.7:42
7044 msgid "hostname - hostname resolution description"
7045 msgstr ""
7046
7047 #. type: Plain text
7048 #: build/C/man7/hostname.7:46
7049 msgid ""
7050 "Hostnames are domains, where a domain is a hierarchical, dot-separated list "
7051 "of subdomains; for example, the machine monet, in the Berkeley subdomain of "
7052 "the EDU domain would be represented as \"monet.Berkeley.EDU\"."
7053 msgstr ""
7054
7055 #. type: Plain text
7056 #: build/C/man7/hostname.7:55
7057 msgid ""
7058 "Hostnames are often used with network client and server programs, which must "
7059 "generally translate the name to an address for use.  (This task is generally "
7060 "performed by either B<getaddrinfo>(3)  or the obsolete B<gethostbyname>(3).)  "
7061 "Hostnames are resolved by the Internet name resolver in the following "
7062 "fashion."
7063 msgstr ""
7064
7065 #. type: Plain text
7066 #: build/C/man7/hostname.7:68
7067 msgid ""
7068 "If the name consists of a single component, that is, contains no dot, and if "
7069 "the environment variable B<HOSTALIASES> is set to the name of a file, that "
7070 "file is searched for any string matching the input hostname.  The file "
7071 "should consist of lines made up of two white-space separated strings, the "
7072 "first of which is the hostname alias, and the second of which is the "
7073 "complete hostname to be substituted for that alias.  If a case-insensitive "
7074 "match is found between the hostname to be resolved and the first field of a "
7075 "line in the file, the substituted name is looked up with no further "
7076 "processing."
7077 msgstr ""
7078
7079 #. type: Plain text
7080 #: build/C/man7/hostname.7:72
7081 msgid ""
7082 "If the input name ends with a trailing dot, the trailing dot is removed, and "
7083 "the remaining name is looked up with no further processing."
7084 msgstr ""
7085
7086 #. type: Plain text
7087 #: build/C/man7/hostname.7:85
7088 msgid ""
7089 "If the input name does not end with a trailing dot, it is looked up by "
7090 "searching through a list of domains until a match is found.  The default "
7091 "search list includes first the local domain, then its parent domains with at "
7092 "least 2 name components (longest first).  For example, in the domain "
7093 "CS.Berkeley.EDU, the name lithium.CChem will be checked first as "
7094 "lithium.CChem.CS.Berkeley.EDU and then as lithium.CChem.Berkeley.EDU.  "
7095 "Lithium.CChem.EDU will not be tried, as there is only one component "
7096 "remaining from the local domain.  The search path can be changed from the "
7097 "default by a system-wide configuration file (see B<resolver>(5))."
7098 msgstr ""
7099
7100 #.  .SH HISTORY
7101 #.  Hostname appeared in
7102 #.  4.2BSD.
7103 #. type: Plain text
7104 #: build/C/man7/hostname.7:93
7105 msgid "B<gethostbyname>(3), B<resolver>(5), B<mailaddr>(7), B<named>(8)"
7106 msgstr ""
7107
7108 #. type: TH
7109 #: build/C/man5/hosts.5:27
7110 #, no-wrap
7111 msgid "HOSTS"
7112 msgstr ""
7113
7114 #. type: TH
7115 #: build/C/man5/hosts.5:27
7116 #, no-wrap
7117 msgid "2002-06-16"
7118 msgstr ""
7119
7120 #. type: Plain text
7121 #: build/C/man5/hosts.5:30
7122 msgid "hosts - static table lookup for hostnames"
7123 msgstr ""
7124
7125 #. type: Plain text
7126 #: build/C/man5/hosts.5:32
7127 msgid "B</etc/hosts>"
7128 msgstr ""
7129
7130 #. type: Plain text
7131 #: build/C/man5/hosts.5:40
7132 msgid ""
7133 "This manual page describes the format of the I</etc/hosts> file.  This file "
7134 "is a simple text file that associates IP addresses with hostnames, one line "
7135 "per IP address.  For each host a single line should be present with the "
7136 "following information:"
7137 msgstr ""
7138
7139 #. type: Plain text
7140 #: build/C/man5/hosts.5:43
7141 msgid "IP_address canonical_hostname [aliases...]"
7142 msgstr ""
7143
7144 #. type: Plain text
7145 #: build/C/man5/hosts.5:56
7146 msgid ""
7147 "Fields of the entry are separated by any number of blanks and/or tab "
7148 "characters.  Text from a \"#\" character until the end of the line is a "
7149 "comment, and is ignored.  Host names may contain only alphanumeric "
7150 "characters, minus signs (\"-\"), and periods (\".\").  They must begin with "
7151 "an alphabetic character and end with an alphanumeric character.  Optional "
7152 "aliases provide for name changes, alternate spellings, shorter hostnames, or "
7153 "generic hostnames (for example, I<localhost>)."
7154 msgstr ""
7155
7156 #. type: Plain text
7157 #: build/C/man5/hosts.5:64
7158 msgid ""
7159 "The Berkeley Internet Name Domain (BIND) Server implements the Internet name "
7160 "server for UNIX systems.  It augments or replaces the I</etc/hosts> file or "
7161 "hostname lookup, and frees a host from relying on I</etc/hosts> being up to "
7162 "date and complete."
7163 msgstr ""
7164
7165 #. type: Plain text
7166 #: build/C/man5/hosts.5:67
7167 msgid ""
7168 "In modern systems, even though the host table has been superseded by DNS, it "
7169 "is still widely used for:"
7170 msgstr ""
7171
7172 #. type: TP
7173 #: build/C/man5/hosts.5:67
7174 #, no-wrap
7175 msgid "B<bootstrapping>"
7176 msgstr ""
7177
7178 #. type: Plain text
7179 #: build/C/man5/hosts.5:73
7180 msgid ""
7181 "Most systems have a small host table containing the name and address "
7182 "information for important hosts on the local network.  This is useful when "
7183 "DNS is not running, for example during system bootup."
7184 msgstr ""
7185
7186 #. type: TP
7187 #: build/C/man5/hosts.5:73
7188 #, no-wrap
7189 msgid "B<NIS>"
7190 msgstr ""
7191
7192 #. type: Plain text
7193 #: build/C/man5/hosts.5:79
7194 msgid ""
7195 "Sites that use NIS use the host table as input to the NIS host database.  "
7196 "Even though NIS can be used with DNS, most NIS sites still use the host "
7197 "table with an entry for all local hosts as a backup."
7198 msgstr ""
7199
7200 #. type: TP
7201 #: build/C/man5/hosts.5:79
7202 #, no-wrap
7203 msgid "B<isolated nodes>"
7204 msgstr ""
7205
7206 #. type: Plain text
7207 #: build/C/man5/hosts.5:86
7208 msgid ""
7209 "Very small sites that are isolated from the network use the host table "
7210 "instead of DNS.  If the local information rarely changes, and the network is "
7211 "not connected to the Internet, DNS offers little advantage."
7212 msgstr ""
7213
7214 #. type: Plain text
7215 #: build/C/man5/hosts.5:91
7216 msgid ""
7217 "Modifications to this file normally take effect immediately, except in cases "
7218 "where the file is cached by applications."
7219 msgstr ""
7220
7221 #. type: SS
7222 #: build/C/man5/hosts.5:91
7223 #, no-wrap
7224 msgid "Historical notes"
7225 msgstr ""
7226
7227 #. type: Plain text
7228 #: build/C/man5/hosts.5:94
7229 msgid ""
7230 "RFC\\ 952 gave the original format for the host table, though it has since "
7231 "changed."
7232 msgstr ""
7233
7234 #. type: Plain text
7235 #: build/C/man5/hosts.5:107
7236 msgid ""
7237 "Before the advent of DNS, the host table was the only way of resolving "
7238 "hostnames on the fledgling Internet.  Indeed, this file could be created "
7239 "from the official host data base maintained at the Network Information "
7240 "Control Center (NIC), though local changes were often required to bring it "
7241 "up to date regarding unofficial aliases and/or unknown hosts.  The NIC no "
7242 "longer maintains the hosts.txt files, though looking around at the time of "
7243 "writing (circa 2000), there are historical hosts.txt files on the WWW.  I "
7244 "just found three, from 92, 94, and 95."
7245 msgstr ""
7246
7247 #. type: Plain text
7248 #: build/C/man5/hosts.5:114
7249 #, no-wrap
7250 msgid ""
7251 "127.0.0.1       localhost\n"
7252 "192.168.1.10    foo.mydomain.org       foo\n"
7253 "192.168.1.13    bar.mydomain.org       bar\n"
7254 "146.82.138.7    master.debian.org      master\n"
7255 "209.237.226.90  www.opensource.org\n"
7256 msgstr ""
7257
7258 #. type: Plain text
7259 #: build/C/man5/hosts.5:121
7260 msgid "B<hostname>(1), B<resolver>(3), B<resolver>(5), B<hostname>(7), B<named>(8)"
7261 msgstr ""
7262
7263 #.  .SH AUTHOR
7264 #.  This manual page was written by Manoj Srivastava <srivasta@debian.org>,
7265 #.  for the Debian GNU/Linux system.
7266 #. type: Plain text
7267 #: build/C/man5/hosts.5:126
7268 msgid "Internet RFC\\ 952"
7269 msgstr ""
7270
7271 #. type: TH
7272 #: build/C/man5/hosts.equiv.5:6
7273 #, no-wrap
7274 msgid "HOSTS.EQUIV"
7275 msgstr ""
7276
7277 #. type: TH
7278 #: build/C/man5/hosts.equiv.5:6
7279 #, no-wrap
7280 msgid "2003-08-24"
7281 msgstr ""
7282
7283 #. type: Plain text
7284 #: build/C/man5/hosts.equiv.5:11
7285 msgid ""
7286 "/etc/hosts.equiv - list of hosts and users that are granted \"trusted\" B<r> "
7287 "command access to your system"
7288 msgstr ""
7289
7290 #. type: Plain text
7291 #: build/C/man5/hosts.equiv.5:22
7292 msgid ""
7293 "The B<hosts.equiv> file allows or denies hosts and users to use the "
7294 "B<r>-commands (e.g., B<rlogin>, B<rsh>, or B<rcp>)  without supplying a "
7295 "password."
7296 msgstr ""
7297
7298 #. type: Plain text
7299 #: build/C/man5/hosts.equiv.5:24
7300 msgid "The file uses the following format:"
7301 msgstr ""
7302
7303 #. type: TP
7304 #: build/C/man5/hosts.equiv.5:24
7305 #, no-wrap
7306 msgid "I<[ + | - ]> I<[hostname]> I<[username]>"
7307 msgstr ""
7308
7309 #. type: Plain text
7310 #: build/C/man5/hosts.equiv.5:43
7311 msgid ""
7312 "The I<hostname> is the name of a host which is logically equivalent to the "
7313 "local host.  Users logged into that host are allowed to access like-named "
7314 "user accounts on the local host without supplying a password.  The "
7315 "I<hostname> may be (optionally) preceded by a plus (+) sign.  If the plus "
7316 "sign is used alone, it allows any host to access your system.  You can "
7317 "explicitly deny access to a host by preceding the I<hostname> by a minus (-) "
7318 "sign.  Users from that host must always supply a password.  For security "
7319 "reasons you should always use the FQDN of the hostname and not the short "
7320 "hostname."
7321 msgstr ""
7322
7323 #. type: Plain text
7324 #: build/C/man5/hosts.equiv.5:61
7325 msgid ""
7326 "The I<username> entry grants a specific user access to all user accounts "
7327 "(except root) without supplying a password.  That means the user is NOT "
7328 "restricted to like-named accounts.  The I<username> may be (optionally) "
7329 "preceded by a plus (+) sign.  You can also explicitly deny access to a "
7330 "specific user by preceding the I<username> with a minus (-) sign.  This says "
7331 "that the user is not trusted no matter what other entries for that host "
7332 "exist."
7333 msgstr ""
7334
7335 #. type: Plain text
7336 #: build/C/man5/hosts.equiv.5:63
7337 msgid "Netgroups can be specified by preceding the netgroup by an @ sign."
7338 msgstr ""
7339
7340 #. type: Plain text
7341 #: build/C/man5/hosts.equiv.5:69
7342 msgid ""
7343 "Be extremely careful when using the plus (+) sign.  A simple typographical "
7344 "error could result in a standalone plus sign.  A standalone plus sign is a "
7345 "wildcard character that means \"any host\"!"
7346 msgstr ""
7347
7348 #. type: Plain text
7349 #: build/C/man5/hosts.equiv.5:71
7350 msgid "I</etc/hosts.equiv>"
7351 msgstr ""
7352
7353 #. type: Plain text
7354 #: build/C/man5/hosts.equiv.5:76
7355 msgid ""
7356 "Some systems will honor the contents of this file only when it has owner "
7357 "root and no write permission for anybody else.  Some exceptionally paranoid "
7358 "systems even require that there be no other hard links to the file."
7359 msgstr ""
7360
7361 #. type: Plain text
7362 #: build/C/man5/hosts.equiv.5:84
7363 msgid ""
7364 "Modern systems use the Pluggable Authentication Modules library (PAM).  With "
7365 "PAM a standalone plus sign is considered a wildcard character which means "
7366 "\"any host\" only when the word I<promiscuous> is added to the auth "
7367 "component line in your PAM file for the particular service (e.g., "
7368 "B<rlogin>)."
7369 msgstr ""
7370
7371 #. type: Plain text
7372 #: build/C/man5/hosts.equiv.5:88
7373 msgid "B<rhosts>(5), B<rlogind>(8), B<rshd>(8)"
7374 msgstr ""
7375
7376 #. type: TH
7377 #: build/C/man7/icmp.7:12
7378 #, no-wrap
7379 msgid "ICMP"
7380 msgstr ""
7381
7382 #. type: TH
7383 #: build/C/man7/icmp.7:12 build/C/man8/nscd.8:23 build/C/man7/raw.7:13 build/C/man7/unix.7:18
7384 #, no-wrap
7385 msgid "2012-05-10"
7386 msgstr ""
7387
7388 #. type: Plain text
7389 #: build/C/man7/icmp.7:15
7390 msgid "icmp - Linux IPv4 ICMP kernel module."
7391 msgstr ""
7392
7393 #. type: Plain text
7394 #: build/C/man7/icmp.7:23
7395 msgid ""
7396 "This kernel protocol module implements the Internet Control Message Protocol "
7397 "defined in RFC\\ 792.  It is used to signal error conditions and for "
7398 "diagnosis.  The user doesn't interact directly with this module; instead it "
7399 "communicates with the other protocols in the kernel and these pass the ICMP "
7400 "errors to the application layers.  The kernel ICMP module also answers ICMP "
7401 "requests."
7402 msgstr ""
7403
7404 #. type: Plain text
7405 #: build/C/man7/icmp.7:35
7406 msgid ""
7407 "A user protocol may receive ICMP packets for all local sockets by opening a "
7408 "raw socket with the protocol B<IPPROTO_ICMP>.  See B<raw>(7)  for more "
7409 "information.  The types of ICMP packets passed to the socket can be filtered "
7410 "using the B<ICMP_FILTER> socket option.  ICMP packets are always processed "
7411 "by the kernel too, even when passed to a user socket."
7412 msgstr ""
7413
7414 #. type: Plain text
7415 #: build/C/man7/icmp.7:41
7416 msgid ""
7417 "Linux limits the rate of ICMP error packets to each destination.  "
7418 "B<ICMP_REDIRECT> and B<ICMP_DEST_UNREACH> are also limited by the "
7419 "destination route of the incoming packets."
7420 msgstr ""
7421
7422 #.  FIXME better description needed
7423 #. type: Plain text
7424 #: build/C/man7/icmp.7:54
7425 msgid ""
7426 "ICMP supports a set of I</proc> interfaces to configure some global IP "
7427 "parameters.  The parameters can be accessed by reading or writing files in "
7428 "the directory I</proc/sys/net/ipv4/>.  Most of these parameters are rate "
7429 "limitations for specific ICMP types.  Linux 2.2 uses a token bucket filter "
7430 "to limit ICMPs.  The value is the timeout in jiffies until the token bucket "
7431 "filter is cleared after a burst.  A jiffy is a system dependent unit, "
7432 "usually 10ms on i386 and about 1ms on alpha and ia64."
7433 msgstr ""
7434
7435 #. type: TP
7436 #: build/C/man7/icmp.7:54
7437 #, no-wrap
7438 msgid "I<icmp_destunreach_rate> (Linux 2.2 to 2.4.9)"
7439 msgstr ""
7440
7441 #.  Precisely: from 2.1.102
7442 #. type: Plain text
7443 #: build/C/man7/icmp.7:63
7444 msgid ""
7445 "Maximum rate to send ICMP Destination Unreachable packets.  This limits the "
7446 "rate at which packets are sent to any individual route or destination.  The "
7447 "limit does not affect sending of B<ICMP_FRAG_NEEDED> packets needed for path "
7448 "MTU discovery."
7449 msgstr ""
7450
7451 #. type: TP
7452 #: build/C/man7/icmp.7:63
7453 #, no-wrap
7454 msgid "I<icmp_echo_ignore_all> (since Linux 2.2)"
7455 msgstr ""
7456
7457 #.  Precisely: 2.1.68
7458 #. type: Plain text
7459 #: build/C/man7/icmp.7:69
7460 msgid "If this value is nonzero, Linux will ignore all B<ICMP_ECHO> requests."
7461 msgstr ""
7462
7463 #. type: TP
7464 #: build/C/man7/icmp.7:69
7465 #, no-wrap
7466 msgid "I<icmp_echo_ignore_broadcasts> (since Linux 2.2)"
7467 msgstr ""
7468
7469 #.  Precisely: from 2.1.68
7470 #. type: Plain text
7471 #: build/C/man7/icmp.7:75
7472 msgid ""
7473 "If this value is nonzero, Linux will ignore all B<ICMP_ECHO> packets sent to "
7474 "broadcast addresses."
7475 msgstr ""
7476
7477 #. type: TP
7478 #: build/C/man7/icmp.7:75
7479 #, no-wrap
7480 msgid "I<icmp_echoreply_rate> (Linux 2.2 to 2.4.9)"
7481 msgstr ""
7482
7483 #.  Precisely: from 2.1.102
7484 #. type: Plain text
7485 #: build/C/man7/icmp.7:83
7486 msgid ""
7487 "Maximum rate for sending B<ICMP_ECHOREPLY> packets in response to "
7488 "B<ICMP_ECHOREQUEST> packets."
7489 msgstr ""
7490
7491 #. type: TP
7492 #: build/C/man7/icmp.7:83
7493 #, no-wrap
7494 msgid ""
7495 "I<icmp_errors_use_inbound_ifaddr> (Boolean; default: disabled; since Linux "
7496 "2.6.12)"
7497 msgstr ""
7498
7499 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7500 #. type: Plain text
7501 #: build/C/man7/icmp.7:88
7502 msgid ""
7503 "If disabled, ICMP error messages are sent with the primary address of the "
7504 "exiting interface."
7505 msgstr ""
7506
7507 #. type: Plain text
7508 #: build/C/man7/icmp.7:94
7509 msgid ""
7510 "If enabled, the message will be sent with the primary address of the "
7511 "interface that received the packet that caused the ICMP error.  This is the "
7512 "behavior that many network administrators will expect from a router.  And it "
7513 "can make debugging complicated network layouts much easier."
7514 msgstr ""
7515
7516 #. type: Plain text
7517 #: build/C/man7/icmp.7:98
7518 msgid ""
7519 "Note that if no primary address exists for the interface selected, then the "
7520 "primary address of the first non-loopback interface that has one will be "
7521 "used regardless of this setting."
7522 msgstr ""
7523
7524 #. type: TP
7525 #: build/C/man7/icmp.7:98
7526 #, no-wrap
7527 msgid ""
7528 "I<icmp_ignore_bogus_error_responses> (Boolean; default: disabled; since "
7529 "Linux 2.2)"
7530 msgstr ""
7531
7532 #.  precisely: since 2.1.32
7533 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7534 #. type: Plain text
7535 #: build/C/man7/icmp.7:106
7536 msgid ""
7537 "Some routers violate RFC1122 by sending bogus responses to broadcast "
7538 "frames.  Such violations are normally logged via a kernel warning.  If this "
7539 "parameter is enabled, the kernel will not give such warnings, which will "
7540 "avoid log file clutter."
7541 msgstr ""
7542
7543 #. type: TP
7544 #: build/C/man7/icmp.7:106
7545 #, no-wrap
7546 msgid "I<icmp_paramprob_rate> (Linux 2.2 to 2.4.9)"
7547 msgstr ""
7548
7549 #.  Precisely: from 2.1.102
7550 #. type: Plain text
7551 #: build/C/man7/icmp.7:113
7552 msgid ""
7553 "Maximum rate for sending B<ICMP_PARAMETERPROB> packets.  These packets are "
7554 "sent when a packet arrives with an invalid IP header."
7555 msgstr ""
7556
7557 #. type: TP
7558 #: build/C/man7/icmp.7:113
7559 #, no-wrap
7560 msgid "I<icmp_ratelimit> (integer; default: 1000; since Linux 2.4.10)"
7561 msgstr ""
7562
7563 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7564 #. type: Plain text
7565 #: build/C/man7/icmp.7:121
7566 msgid ""
7567 "Limit the maximum rates for sending ICMP packets whose type matches "
7568 "I<icmp_ratemask> (see below) to specific targets.  0 to disable any "
7569 "limiting, otherwise the minimum space between responses in milliseconds."
7570 msgstr ""
7571
7572 #. type: TP
7573 #: build/C/man7/icmp.7:121
7574 #, no-wrap
7575 msgid "I<icmp_ratemask> (integer; default: see below; since Linux 2.4.10)"
7576 msgstr ""
7577
7578 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7579 #. type: Plain text
7580 #: build/C/man7/icmp.7:125
7581 msgid "Mask made of ICMP types for which rates are being limited."
7582 msgstr ""
7583
7584 #. type: Plain text
7585 #: build/C/man7/icmp.7:127
7586 msgid "Significant bits: IHGFEDCBA9876543210"
7587 msgstr ""
7588
7589 #. type: Plain text
7590 #: build/C/man7/icmp.7:129
7591 msgid "Default mask: 0000001100000011000 (0x1818)"
7592 msgstr ""
7593
7594 #. type: Plain text
7595 #: build/C/man7/icmp.7:132
7596 msgid "Bit definitions (see the Linux kernel source file I<include/linux/icmp.h>):"
7597 msgstr ""
7598
7599 #. type: tbl table
7600 #: build/C/man7/icmp.7:136
7601 #, no-wrap
7602 msgid "0 Echo Reply\n"
7603 msgstr ""
7604
7605 #. type: tbl table
7606 #: build/C/man7/icmp.7:137
7607 #, no-wrap
7608 msgid "3 Destination Unreachable *\n"
7609 msgstr ""
7610
7611 #. type: tbl table
7612 #: build/C/man7/icmp.7:138
7613 #, no-wrap
7614 msgid "4 Source Quench *\n"
7615 msgstr ""
7616
7617 #. type: tbl table
7618 #: build/C/man7/icmp.7:139
7619 #, no-wrap
7620 msgid "5 Redirect\n"
7621 msgstr ""
7622
7623 #. type: tbl table
7624 #: build/C/man7/icmp.7:140
7625 #, no-wrap
7626 msgid "8 Echo Request\n"
7627 msgstr ""
7628
7629 #. type: tbl table
7630 #: build/C/man7/icmp.7:141
7631 #, no-wrap
7632 msgid "B Time Exceeded *\n"
7633 msgstr ""
7634
7635 #. type: tbl table
7636 #: build/C/man7/icmp.7:142
7637 #, no-wrap
7638 msgid "C Parameter Problem *\n"
7639 msgstr ""
7640
7641 #. type: tbl table
7642 #: build/C/man7/icmp.7:143
7643 #, no-wrap
7644 msgid "D Timestamp Request\n"
7645 msgstr ""
7646
7647 #. type: tbl table
7648 #: build/C/man7/icmp.7:144
7649 #, no-wrap
7650 msgid "E Timestamp Reply\n"
7651 msgstr ""
7652
7653 #. type: tbl table
7654 #: build/C/man7/icmp.7:145
7655 #, no-wrap
7656 msgid "F Info Request\n"
7657 msgstr ""
7658
7659 #. type: tbl table
7660 #: build/C/man7/icmp.7:146
7661 #, no-wrap
7662 msgid "G Info Reply\n"
7663 msgstr ""
7664
7665 #. type: tbl table
7666 #: build/C/man7/icmp.7:147
7667 #, no-wrap
7668 msgid "H Address Mask Request\n"
7669 msgstr ""
7670
7671 #. type: tbl table
7672 #: build/C/man7/icmp.7:148
7673 #, no-wrap
7674 msgid "I Address Mask Reply\n"
7675 msgstr ""
7676
7677 #. type: Plain text
7678 #: build/C/man7/icmp.7:154
7679 msgid ""
7680 "The bits marked with an asterisk are rate limited by default (see the "
7681 "default mask above)."
7682 msgstr ""
7683
7684 #. type: TP
7685 #: build/C/man7/icmp.7:154
7686 #, no-wrap
7687 msgid "I<icmp_timeexceed_rate> (Linux 2.2 to 2.4.9)"
7688 msgstr ""
7689
7690 #. type: Plain text
7691 #: build/C/man7/icmp.7:161
7692 msgid ""
7693 "Maximum rate for sending B<ICMP_TIME_EXCEEDED> packets.  These packets are "
7694 "sent to prevent loops when a packet has crossed too many hops."
7695 msgstr ""
7696
7697 #. type: Plain text
7698 #: build/C/man7/icmp.7:165
7699 msgid "Support for the B<ICMP_ADDRESS> request was removed in 2.2."
7700 msgstr ""
7701
7702 #. type: Plain text
7703 #: build/C/man7/icmp.7:169
7704 msgid "Support for B<ICMP_SOURCE_QUENCH> was removed in Linux 2.2."
7705 msgstr ""
7706
7707 #.  not really true ATM
7708 #.  .PP
7709 #.  Linux ICMP should be compliant to RFC 1122.
7710 #. type: Plain text
7711 #: build/C/man7/icmp.7:177
7712 msgid ""
7713 "As many other implementations don't support B<IPPROTO_ICMP> raw sockets, "
7714 "this feature should not be relied on in portable programs."
7715 msgstr ""
7716
7717 #. type: Plain text
7718 #: build/C/man7/icmp.7:182
7719 msgid ""
7720 "B<ICMP_REDIRECT> packets are not sent when Linux is not acting as a router.  "
7721 "They are also accepted only from the old gateway defined in the routing "
7722 "table and the redirect routes are expired after some time."
7723 msgstr ""
7724
7725 #. type: Plain text
7726 #: build/C/man7/icmp.7:186
7727 msgid ""
7728 "The 64-bit timestamp returned by B<ICMP_TIMESTAMP> is in milliseconds since "
7729 "the Epoch, 1970-01-01 00:00:00 +0000 (UTC)."
7730 msgstr ""
7731
7732 #. type: Plain text
7733 #: build/C/man7/icmp.7:191
7734 msgid ""
7735 "Linux ICMP internally uses a raw socket to send ICMPs.  This raw socket may "
7736 "appear in B<netstat>(8)  output with a zero inode."
7737 msgstr ""
7738
7739 #. type: Plain text
7740 #: build/C/man7/icmp.7:193
7741 msgid "B<ip>(7)"
7742 msgstr ""
7743
7744 #. type: Plain text
7745 #: build/C/man7/icmp.7:195
7746 msgid "RFC\\ 792 for a description of the ICMP protocol."
7747 msgstr ""
7748
7749 #. type: TH
7750 #: build/C/man3/inet.3:42
7751 #, no-wrap
7752 msgid "INET"
7753 msgstr ""
7754
7755 #. type: Plain text
7756 #: build/C/man3/inet.3:46
7757 msgid ""
7758 "inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, "
7759 "inet_netof - Internet address manipulation routines"
7760 msgstr ""
7761
7762 #. type: Plain text
7763 #: build/C/man3/inet.3:51
7764 #, no-wrap
7765 msgid ""
7766 "B<#include E<lt>sys/socket.hE<gt>>\n"
7767 "B<#include E<lt>netinet/in.hE<gt>>\n"
7768 "B<#include E<lt>arpa/inet.hE<gt>>\n"
7769 msgstr ""
7770
7771 #. type: Plain text
7772 #: build/C/man3/inet.3:53
7773 #, no-wrap
7774 msgid "B<int inet_aton(const char *>I<cp>B<, struct in_addr *>I<inp>B<);>\n"
7775 msgstr ""
7776
7777 #. type: Plain text
7778 #: build/C/man3/inet.3:55
7779 #, no-wrap
7780 msgid "B<in_addr_t inet_addr(const char *>I<cp>B<);>\n"
7781 msgstr ""
7782
7783 #. type: Plain text
7784 #: build/C/man3/inet.3:57
7785 #, no-wrap
7786 msgid "B<in_addr_t inet_network(const char *>I<cp>B<);>\n"
7787 msgstr ""
7788
7789 #. type: Plain text
7790 #: build/C/man3/inet.3:59
7791 #, no-wrap
7792 msgid "B<char *inet_ntoa(struct in_addr >I<in>B<);>\n"
7793 msgstr ""
7794
7795 #. type: Plain text
7796 #: build/C/man3/inet.3:61
7797 #, no-wrap
7798 msgid ""
7799 "B<struct in_addr inet_makeaddr(in_addr_t >I<net>B<, in_addr_t "
7800 ">I<host>B<);>\n"
7801 msgstr ""
7802
7803 #. type: Plain text
7804 #: build/C/man3/inet.3:63
7805 #, no-wrap
7806 msgid "B<in_addr_t inet_lnaof(struct in_addr >I<in>B<);>\n"
7807 msgstr ""
7808
7809 #. type: Plain text
7810 #: build/C/man3/inet.3:65
7811 #, no-wrap
7812 msgid "B<in_addr_t inet_netof(struct in_addr >I<in>B<);>\n"
7813 msgstr ""
7814
7815 #. type: Plain text
7816 #: build/C/man3/inet.3:75
7817 msgid "B<inet_aton>(), B<inet_ntoa>(): _BSD_SOURCE || _SVID_SOURCE"
7818 msgstr ""
7819
7820 #. type: Plain text
7821 #: build/C/man3/inet.3:85
7822 msgid ""
7823 "B<inet_aton>()  converts the Internet host address I<cp> from the IPv4 "
7824 "numbers-and-dots notation into binary form (in network byte order)  and "
7825 "stores it in the structure that I<inp> points to.  B<inet_aton>()  returns "
7826 "nonzero if the address is valid, zero if not.  The address supplied in I<cp> "
7827 "can have one of the following forms:"
7828 msgstr ""
7829
7830 #. type: TP
7831 #: build/C/man3/inet.3:85
7832 #, no-wrap
7833 msgid "I<a.b.c.d>"
7834 msgstr ""
7835
7836 #. type: Plain text
7837 #: build/C/man3/inet.3:89
7838 msgid ""
7839 "Each of the four numeric parts specifies a byte of the address; the bytes "
7840 "are assigned in left-to-right order to produce the binary address."
7841 msgstr ""
7842
7843 #. type: TP
7844 #: build/C/man3/inet.3:89
7845 #, no-wrap
7846 msgid "I<a.b.c>"
7847 msgstr ""
7848
7849 #. type: Plain text
7850 #: build/C/man3/inet.3:102
7851 msgid ""
7852 "Parts I<a> and I<b> specify the first two bytes of the binary address.  Part "
7853 "I<c> is interpreted as a 16-bit value that defines the rightmost two bytes "
7854 "of the binary address.  This notation is suitable for specifying (outmoded) "
7855 "Class B network addresses."
7856 msgstr ""
7857
7858 #. type: TP
7859 #: build/C/man3/inet.3:102
7860 #, no-wrap
7861 msgid "I<a.b>"
7862 msgstr ""
7863
7864 #. type: Plain text
7865 #: build/C/man3/inet.3:113
7866 msgid ""
7867 "Part I<a> specifies the first byte of the binary address.  Part I<b> is "
7868 "interpreted as a 24-bit value that defines the rightmost three bytes of the "
7869 "binary address.  This notation is suitable for specifying (outmoded) Class A "
7870 "network addresses."
7871 msgstr ""
7872
7873 #. type: TP
7874 #: build/C/man3/inet.3:113
7875 #, no-wrap
7876 msgid "I<a>"
7877 msgstr ""
7878
7879 #. type: Plain text
7880 #: build/C/man3/inet.3:119
7881 msgid ""
7882 "The value I<a> is interpreted as a 32-bit value that is stored directly into "
7883 "the binary address without any byte rearrangement."
7884 msgstr ""
7885
7886 #. type: Plain text
7887 #: build/C/man3/inet.3:132
7888 msgid ""
7889 "In all of the above forms, components of the dotted address can be specified "
7890 "in decimal, octal (with a leading I<0>), or hexadecimal, with a leading "
7891 "I<0X>).  Addresses in any of these forms are collectively termed I<IPV4 "
7892 "numbers-and-dots notation>.  The form that uses exactly four decimal numbers "
7893 "is referred to as I<IPv4 dotted-decimal notation> (or sometimes: I<IPv4 "
7894 "dotted-quad notation>)."
7895 msgstr ""
7896
7897 #. type: Plain text
7898 #: build/C/man3/inet.3:140
7899 msgid ""
7900 "B<inet_aton>()  returns 1 if the supplied string was successfully "
7901 "interpreted, or 0 if the string is invalid (B<errno> is I<not> set on "
7902 "error)."
7903 msgstr ""
7904
7905 #. type: Plain text
7906 #: build/C/man3/inet.3:157
7907 msgid ""
7908 "The B<inet_addr>()  function converts the Internet host address I<cp> from "
7909 "IPv4 numbers-and-dots notation into binary data in network byte order.  If "
7910 "the input is invalid, B<INADDR_NONE> (usually -1) is returned.  Use of this "
7911 "function is problematic because -1 is a valid address (255.255.255.255).  "
7912 "Avoid its use in favor of B<inet_aton>(), B<inet_pton>(3), or "
7913 "B<getaddrinfo>(3), which provide a cleaner way to indicate error return."
7914 msgstr ""
7915
7916 #. type: Plain text
7917 #: build/C/man3/inet.3:167
7918 msgid ""
7919 "The B<inet_network>()  function converts I<cp>, a string in IPv4 "
7920 "numbers-and-dots notation, into a number in host byte order suitable for use "
7921 "as an Internet network address.  On success, the converted address is "
7922 "returned.  If the input is invalid, -1 is returned."
7923 msgstr ""
7924
7925 #. type: Plain text
7926 #: build/C/man3/inet.3:175
7927 msgid ""
7928 "The B<inet_ntoa>()  function converts the Internet host address I<in>, given "
7929 "in network byte order, to a string in IPv4 dotted-decimal notation.  The "
7930 "string is returned in a statically allocated buffer, which subsequent calls "
7931 "will overwrite."
7932 msgstr ""
7933
7934 #. type: Plain text
7935 #: build/C/man3/inet.3:181
7936 msgid ""
7937 "The B<inet_lnaof>()  function returns the local network address part of the "
7938 "Internet address I<in>.  The returned value is in host byte order."
7939 msgstr ""
7940
7941 #. type: Plain text
7942 #: build/C/man3/inet.3:187
7943 msgid ""
7944 "The B<inet_netof>()  function returns the network number part of the "
7945 "Internet address I<in>.  The returned value is in host byte order."
7946 msgstr ""
7947
7948 #. type: Plain text
7949 #: build/C/man3/inet.3:198
7950 msgid ""
7951 "The B<inet_makeaddr>()  function is the converse of B<inet_netof>()  and "
7952 "B<inet_lnaof>().  It returns an Internet host address in network byte order, "
7953 "created by combining the network number I<net> with the local address "
7954 "I<host>, both in host byte order."
7955 msgstr ""
7956
7957 #. type: Plain text
7958 #: build/C/man3/inet.3:208
7959 msgid ""
7960 "The structure I<in_addr> as used in B<inet_ntoa>(), B<inet_makeaddr>(), "
7961 "B<inet_lnaof>()  and B<inet_netof>()  is defined in "
7962 "I<E<lt>netinet/in.hE<gt>> as:"
7963 msgstr ""
7964
7965 #. type: Plain text
7966 #: build/C/man3/inet.3:212
7967 #, no-wrap
7968 msgid "typedef uint32_t in_addr_t;\n"
7969 msgstr ""
7970
7971 #. type: Plain text
7972 #: build/C/man3/inet.3:216
7973 #, no-wrap
7974 msgid ""
7975 "struct in_addr {\n"
7976 "    in_addr_t s_addr;\n"
7977 "};\n"
7978 msgstr ""
7979
7980 #. type: Plain text
7981 #: build/C/man3/inet.3:226
7982 msgid ""
7983 "4.3BSD.  B<inet_addr>()  and B<inet_ntoa>()  are specified in POSIX.1-2001.  "
7984 "B<inet_aton>()  is not specified in POSIX.1-2001, but is available on most "
7985 "systems."
7986 msgstr ""
7987
7988 #. type: Plain text
7989 #: build/C/man3/inet.3:230
7990 msgid ""
7991 "On the i386 the host byte order is Least Significant Byte first (little "
7992 "endian), whereas the network byte order, as used on the Internet, is Most "
7993 "Significant Byte first (big endian)."
7994 msgstr ""
7995
7996 #. type: Plain text
7997 #: build/C/man3/inet.3:239
7998 msgid ""
7999 "B<inet_lnaof>(), B<inet_netof>(), and B<inet_makeaddr>()  are legacy "
8000 "functions that assume they are dealing with I<classful network addresses>.  "
8001 "Classful networking divides IPv4 network addresses into host and network "
8002 "components at byte boundaries, as follows:"
8003 msgstr ""
8004
8005 #. type: TP
8006 #: build/C/man3/inet.3:239
8007 #, no-wrap
8008 msgid "Class A"
8009 msgstr ""
8010
8011 #. type: Plain text
8012 #: build/C/man3/inet.3:245
8013 msgid ""
8014 "This address type is indicated by the value 0 in the most significant bit of "
8015 "the (network byte ordered) address.  The network address is contained in the "
8016 "most significant byte, and the host address occupies the remaining three "
8017 "bytes."
8018 msgstr ""
8019
8020 #. type: TP
8021 #: build/C/man3/inet.3:245
8022 #, no-wrap
8023 msgid "Class B"
8024 msgstr ""
8025
8026 #. type: Plain text
8027 #: build/C/man3/inet.3:251
8028 msgid ""
8029 "This address type is indicated by the binary value 10 in the most "
8030 "significant two bits of the address.  The network address is contained in "
8031 "the two most significant bytes, and the host address occupies the remaining "
8032 "two bytes."
8033 msgstr ""
8034
8035 #. type: TP
8036 #: build/C/man3/inet.3:251
8037 #, no-wrap
8038 msgid "Class C"
8039 msgstr ""
8040
8041 #. type: Plain text
8042 #: build/C/man3/inet.3:257
8043 msgid ""
8044 "This address type is indicated by the binary value 110 in the most "
8045 "significant three bits of the address.  The network address is contained in "
8046 "the three most significant bytes, and the host address occupies the "
8047 "remaining byte."
8048 msgstr ""
8049
8050 #. type: Plain text
8051 #: build/C/man3/inet.3:262
8052 msgid ""
8053 "Classful network addresses are now obsolete, having been superseded by "
8054 "Classless Inter-Domain Routing (CIDR), which divides addresses into network "
8055 "and host components at arbitrary bit (rather than byte) boundaries."
8056 msgstr ""
8057
8058 #. type: Plain text
8059 #: build/C/man3/inet.3:269
8060 msgid ""
8061 "An example of the use of B<inet_aton>()  and B<inet_ntoa>()  is shown "
8062 "below.  Here are some example runs:"
8063 msgstr ""
8064
8065 #. type: Plain text
8066 #: build/C/man3/inet.3:276
8067 #, no-wrap
8068 msgid ""
8069 "$B< ./a.out 226.000.000.037>      # Last byte is in octal\n"
8070 "226.0.0.31\n"
8071 "$B< ./a.out 0x7f.1         >      # First byte is in hex\n"
8072 "127.0.0.1\n"
8073 msgstr ""
8074
8075 #. type: Plain text
8076 #: build/C/man3/inet.3:285
8077 #, no-wrap
8078 msgid ""
8079 "#define _BSD_SOURCE\n"
8080 "#include E<lt>arpa/inet.hE<gt>\n"
8081 "#include E<lt>stdio.hE<gt>\n"
8082 "#include E<lt>stdlib.hE<gt>\n"
8083 msgstr ""
8084
8085 #. type: Plain text
8086 #: build/C/man3/inet.3:290
8087 #, no-wrap
8088 msgid ""
8089 "int\n"
8090 "main(int argc, char *argv[])\n"
8091 "{\n"
8092 "    struct in_addr addr;\n"
8093 msgstr ""
8094
8095 #. type: Plain text
8096 #: build/C/man3/inet.3:295
8097 #, no-wrap
8098 msgid ""
8099 "    if (argc != 2) {\n"
8100 "        fprintf(stderr, \"%s E<lt>dotted-addressE<gt>\\en\", argv[0]);\n"
8101 "        exit(EXIT_FAILURE);\n"
8102 "    }\n"
8103 msgstr ""
8104
8105 #. type: Plain text
8106 #: build/C/man3/inet.3:300
8107 #, no-wrap
8108 msgid ""
8109 "    if (inet_aton(argv[1], &addr) == 0) {\n"
8110 "        fprintf(stderr, \"Invalid address\\en\");\n"
8111 "        exit(EXIT_FAILURE);\n"
8112 "    }\n"
8113 msgstr ""
8114
8115 #. type: Plain text
8116 #: build/C/man3/inet.3:304
8117 #, no-wrap
8118 msgid ""
8119 "    printf(\"%s\\en\", inet_ntoa(addr));\n"
8120 "    exit(EXIT_SUCCESS);\n"
8121 "}\n"
8122 msgstr ""
8123
8124 #. type: Plain text
8125 #: build/C/man3/inet.3:316
8126 msgid ""
8127 "B<byteorder>(3), B<getaddrinfo>(3), B<gethostbyname>(3), B<getnameinfo>(3), "
8128 "B<getnetent>(3), B<inet_net_pton>(3), B<inet_ntop>(3), B<inet_pton>(3), "
8129 "B<hosts>(5), B<networks>(5)"
8130 msgstr ""
8131
8132 #. type: TH
8133 #: build/C/man3/inet_ntop.3:26
8134 #, no-wrap
8135 msgid "INET_NTOP"
8136 msgstr ""
8137
8138 #. type: TH
8139 #: build/C/man3/inet_ntop.3:26
8140 #, no-wrap
8141 msgid "2008-11-11"
8142 msgstr ""
8143
8144 #. type: Plain text
8145 #: build/C/man3/inet_ntop.3:29
8146 msgid "inet_ntop - convert IPv4 and IPv6 addresses from binary to text form"
8147 msgstr ""
8148
8149 #. type: Plain text
8150 #: build/C/man3/inet_ntop.3:35
8151 #, no-wrap
8152 msgid ""
8153 "B<const char *inet_ntop(int >I<af>B<, const void *>I<src>B<,>\n"
8154 "B<                      char *>I<dst>B<, socklen_t >I<size>B<);>\n"
8155 msgstr ""
8156
8157 #. type: Plain text
8158 #: build/C/man3/inet_ntop.3:48
8159 msgid ""
8160 "This function converts the network address structure I<src> in the I<af> "
8161 "address family into a character string.  The resulting string is copied to "
8162 "the buffer pointed to by I<dst>, which must be a non-null pointer.  The "
8163 "caller specifies the number of bytes available in this buffer in the "
8164 "argument I<size>."
8165 msgstr ""
8166
8167 #. type: Plain text
8168 #: build/C/man3/inet_ntop.3:57
8169 msgid ""
8170 "B<inet_ntop>()  extends the B<inet_ntoa>(3)  function to support multiple "
8171 "address families, B<inet_ntoa>(3)  is now considered to be deprecated in "
8172 "favor of B<inet_ntop>().  The following address families are currently "
8173 "supported:"
8174 msgstr ""
8175
8176 #. type: Plain text
8177 #: build/C/man3/inet_ntop.3:70
8178 msgid ""
8179 "I<src> points to a I<struct in_addr> (in network byte order)  which is "
8180 "converted to an IPv4 network address in the dotted-decimal format, "
8181 "\"I<ddd.ddd.ddd.ddd>\".  The buffer I<dst> must be at least "
8182 "B<INET_ADDRSTRLEN> bytes long."
8183 msgstr ""
8184
8185 #. type: Plain text
8186 #: build/C/man3/inet_ntop.3:83
8187 msgid ""
8188 "I<src> points to a I<struct in6_addr> (in network byte order)  which is "
8189 "converted to a representation of this address in the most appropriate IPv6 "
8190 "network address format for this address.  The buffer I<dst> must be at least "
8191 "B<INET6_ADDRSTRLEN> bytes long."
8192 msgstr ""
8193
8194 #. type: Plain text
8195 #: build/C/man3/inet_ntop.3:91
8196 msgid ""
8197 "On success, B<inet_ntop>()  returns a non-null pointer to I<dst>.  NULL is "
8198 "returned if there was an error, with I<errno> set to indicate the error."
8199 msgstr ""
8200
8201 #. type: TP
8202 #: build/C/man3/inet_ntop.3:92 build/C/man3/inet_net_pton.3:146
8203 #, no-wrap
8204 msgid "B<EAFNOSUPPORT>"
8205 msgstr ""
8206
8207 #. type: Plain text
8208 #: build/C/man3/inet_ntop.3:96
8209 msgid "I<af> was not a valid address family."
8210 msgstr ""
8211
8212 #. type: TP
8213 #: build/C/man3/inet_ntop.3:96
8214 #, no-wrap
8215 msgid "B<ENOSPC>"
8216 msgstr ""
8217
8218 #. type: Plain text
8219 #: build/C/man3/inet_ntop.3:100
8220 msgid "The converted address string would exceed the size given by I<size>."
8221 msgstr ""
8222
8223 #.  2.1.3: size_t, 2.1.91: socklen_t
8224 #. type: Plain text
8225 #: build/C/man3/inet_ntop.3:112
8226 msgid ""
8227 "POSIX.1-2001.  Note that RFC\\ 2553 defines a prototype where the last "
8228 "argument I<size> is of type I<size_t>.  Many systems follow RFC\\ 2553.  "
8229 "Glibc 2.0 and 2.1 have I<size_t>, but 2.2 and later have I<socklen_t>."
8230 msgstr ""
8231
8232 #. type: Plain text
8233 #: build/C/man3/inet_ntop.3:115
8234 msgid "B<AF_INET6> converts IPv4-mapped IPv6 addresses into an IPv6 format."
8235 msgstr ""
8236
8237 #. type: Plain text
8238 #: build/C/man3/inet_ntop.3:118
8239 msgid "See B<inet_pton>(3)."
8240 msgstr ""
8241
8242 #. type: Plain text
8243 #: build/C/man3/inet_ntop.3:122
8244 msgid "B<getnameinfo>(3), B<inet>(3), B<inet_pton>(3)"
8245 msgstr ""
8246
8247 #. type: TH
8248 #: build/C/man3/inet_pton.3:27
8249 #, no-wrap
8250 msgid "INET_PTON"
8251 msgstr ""
8252
8253 #. type: TH
8254 #: build/C/man3/inet_pton.3:27
8255 #, no-wrap
8256 msgid "2008-06-18"
8257 msgstr ""
8258
8259 #. type: Plain text
8260 #: build/C/man3/inet_pton.3:30
8261 msgid "inet_pton - convert IPv4 and IPv6 addresses from text to binary form"
8262 msgstr ""
8263
8264 #. type: Plain text
8265 #: build/C/man3/inet_pton.3:35
8266 #, no-wrap
8267 msgid "B<int inet_pton(int >I<af>B<, const char *>I<src>B<, void *>I<dst>B<);>\n"
8268 msgstr ""
8269
8270 #. type: Plain text
8271 #: build/C/man3/inet_pton.3:51
8272 msgid ""
8273 "This function converts the character string I<src> into a network address "
8274 "structure in the I<af> address family, then copies the network address "
8275 "structure to I<dst>.  The I<af> argument must be either B<AF_INET> or "
8276 "B<AF_INET6>."
8277 msgstr ""
8278
8279 #. type: Plain text
8280 #: build/C/man3/inet_pton.3:53
8281 msgid "The following address families are currently supported:"
8282 msgstr ""
8283
8284 #. type: Plain text
8285 #: build/C/man3/inet_pton.3:67
8286 msgid ""
8287 "I<src> points to a character string containing an IPv4 network address in "
8288 "dotted-decimal format, \"I<ddd.ddd.ddd.ddd>\", where I<ddd> is a decimal "
8289 "number of up to three digits in the range 0 to 255.  The address is "
8290 "converted to a I<struct in_addr> and copied to I<dst>, which must be "
8291 "I<sizeof(struct in_addr)> (4) bytes (32 bits) long."
8292 msgstr ""
8293
8294 #. type: Plain text
8295 #: build/C/man3/inet_pton.3:79
8296 msgid ""
8297 "I<src> points to a character string containing an IPv6 network address.  The "
8298 "address is converted to a I<struct in6_addr> and copied to I<dst>, which "
8299 "must be I<sizeof(struct in6_addr)> (16) bytes (128 bits) long.  The allowed "
8300 "formats for IPv6 addresses follow these rules:"
8301 msgstr ""
8302
8303 #. type: IP
8304 #: build/C/man3/inet_pton.3:80
8305 #, no-wrap
8306 msgid "1."
8307 msgstr ""
8308
8309 #. type: Plain text
8310 #: build/C/man3/inet_pton.3:87
8311 msgid ""
8312 "The preferred format is I<x:x:x:x:x:x:x:x>.  This form consists of eight "
8313 "hexadecimal numbers, each of which expresses a 16-bit value (i.e., each I<x> "
8314 "can be up to 4 hex digits)."
8315 msgstr ""
8316
8317 #. type: IP
8318 #: build/C/man3/inet_pton.3:87
8319 #, no-wrap
8320 msgid "2."
8321 msgstr ""
8322
8323 #. type: Plain text
8324 #: build/C/man3/inet_pton.3:100
8325 msgid ""
8326 "A series of contiguous zero values in the preferred format can be "
8327 "abbreviated to I<::>.  Only one instance of I<::> can occur in an address.  "
8328 "For example, the loopback address I<0:0:0:0:0:0:0:1> can be abbreviated as "
8329 "I<::1>.  The wildcard address, consisting of all zeros, can be written as "
8330 "I<::>."
8331 msgstr ""
8332
8333 #. type: IP
8334 #: build/C/man3/inet_pton.3:100
8335 #, no-wrap
8336 msgid "3."
8337 msgstr ""
8338
8339 #. type: Plain text
8340 #: build/C/man3/inet_pton.3:113
8341 msgid ""
8342 "An alternate format is useful for expressing IPv4-mapped IPv6 addresses.  "
8343 "This form is written as I<x:x:x:x:x:x:d.d.d.d>, where the six leading I<x>s "
8344 "are hexadecimal values that define the six most-significant 16-bit pieces of "
8345 "the address (i.e., 96 bits), and the I<d>s express a value in dotted-decimal "
8346 "notation that defines the least significant 32 bits of the address.  An "
8347 "example of such an address is I<::FFFF:204.152.189.116>."
8348 msgstr ""
8349
8350 #. type: Plain text
8351 #: build/C/man3/inet_pton.3:116
8352 msgid "See RFC 2373 for further details on the representation of IPv6 addresses."
8353 msgstr ""
8354
8355 #. type: Plain text
8356 #: build/C/man3/inet_pton.3:129
8357 msgid ""
8358 "B<inet_pton>()  returns 1 on success (network address was successfully "
8359 "converted).  0 is returned if I<src> does not contain a character string "
8360 "representing a valid network address in the specified address family.  If "
8361 "I<af> does not contain a valid address family, -1 is returned and I<errno> "
8362 "is set to B<EAFNOSUPPORT>."
8363 msgstr ""
8364
8365 #. type: Plain text
8366 #: build/C/man3/inet_pton.3:150
8367 msgid ""
8368 "Unlike B<inet_aton>(3)  and B<inet_addr>(3), B<inet_pton>()  supports IPv6 "
8369 "addresses.  On the other hand, B<inet_pton>()  accepts only IPv4 addresses "
8370 "in dotted-decimal notation, whereas B<inet_aton>(3)  and B<inet_addr>(3)  "
8371 "allow the more general numbers-and-dots notation (hexadecimal and octal "
8372 "number formats, and formats that don't require all four bytes to be "
8373 "explicitly written).  For an interface that handles both IPv6 addresses, and "
8374 "IPv4 addresses in numbers-and-dots notation, see B<getaddrinfo>(3)."
8375 msgstr ""
8376
8377 #. type: Plain text
8378 #: build/C/man3/inet_pton.3:156
8379 msgid ""
8380 "B<AF_INET6> does not recognize IPv4 addresses.  An explicit IPv4-mapped IPv6 "
8381 "address must be supplied in I<src> instead."
8382 msgstr ""
8383
8384 #. type: Plain text
8385 #: build/C/man3/inet_pton.3:162
8386 msgid ""
8387 "The program below demonstrates the use of B<inet_pton>()  and "
8388 "B<inet_ntop>(3).  Here are some example runs:"
8389 msgstr ""
8390
8391 #. type: Plain text
8392 #: build/C/man3/inet_pton.3:171
8393 #, no-wrap
8394 msgid ""
8395 "$B< ./a.out i6 0:0:0:0:0:0:0:0>\n"
8396 "::\n"
8397 "$B< ./a.out i6 1:0:0:0:0:0:0:8>\n"
8398 "1::8\n"
8399 "$B< ./a.out i6 0:0:0:0:0:FFFF:204.152.189.116>\n"
8400 "::ffff:204.152.189.116\n"
8401 msgstr ""
8402
8403 #. type: Plain text
8404 #: build/C/man3/inet_pton.3:180
8405 #, no-wrap
8406 msgid ""
8407 "#include E<lt>arpa/inet.hE<gt>\n"
8408 "#include E<lt>stdio.hE<gt>\n"
8409 "#include E<lt>stdlib.hE<gt>\n"
8410 "#include E<lt>string.hE<gt>\n"
8411 msgstr ""
8412
8413 #. type: Plain text
8414 #: build/C/man3/inet_pton.3:187
8415 #, no-wrap
8416 msgid ""
8417 "int\n"
8418 "main(int argc, char *argv[])\n"
8419 "{\n"
8420 "    unsigned char buf[sizeof(struct in6_addr)];\n"
8421 "    int domain, s;\n"
8422 "    char str[INET6_ADDRSTRLEN];\n"
8423 msgstr ""
8424
8425 #. type: Plain text
8426 #: build/C/man3/inet_pton.3:192
8427 #, no-wrap
8428 msgid ""
8429 "    if (argc != 3) {\n"
8430 "        fprintf(stderr, \"Usage: %s {i4|i6|E<lt>numE<gt>} string\\en\", "
8431 "argv[0]);\n"
8432 "        exit(EXIT_FAILURE);\n"
8433 "    }\n"
8434 msgstr ""
8435
8436 #. type: Plain text
8437 #: build/C/man3/inet_pton.3:195
8438 #, no-wrap
8439 msgid ""
8440 "    domain = (strcmp(argv[1], \"i4\") == 0) ? AF_INET :\n"
8441 "             (strcmp(argv[1], \"i6\") == 0) ? AF_INET6 : atoi(argv[1]);\n"
8442 msgstr ""
8443
8444 #. type: Plain text
8445 #: build/C/man3/inet_pton.3:204
8446 #, no-wrap
8447 msgid ""
8448 "    s = inet_pton(domain, argv[2], buf);\n"
8449 "    if (s E<lt>= 0) {\n"
8450 "        if (s == 0)\n"
8451 "            fprintf(stderr, \"Not in presentation format\");\n"
8452 "        else\n"
8453 "            perror(\"inet_pton\");\n"
8454 "        exit(EXIT_FAILURE);\n"
8455 "    }\n"
8456 msgstr ""
8457
8458 #. type: Plain text
8459 #: build/C/man3/inet_pton.3:209
8460 #, no-wrap
8461 msgid ""
8462 "    if (inet_ntop(domain, buf, str, INET6_ADDRSTRLEN) == NULL) {\n"
8463 "        perror(\"inet_ntop\");\n"
8464 "        exit(EXIT_FAILURE);\n"
8465 "    }\n"
8466 msgstr ""
8467
8468 #. type: Plain text
8469 #: build/C/man3/inet_pton.3:211
8470 #, no-wrap
8471 msgid "    printf(\"%s\\en\", str);\n"
8472 msgstr ""
8473
8474 #. type: Plain text
8475 #: build/C/man3/inet_pton.3:219
8476 msgid "B<getaddrinfo>(3), B<inet>(3), B<inet_ntop>(3)"
8477 msgstr ""
8478
8479 #. type: TH
8480 #: build/C/man3/inet_net_pton.3:26
8481 #, no-wrap
8482 msgid "INET_NET_PTON"
8483 msgstr ""
8484
8485 #. type: Plain text
8486 #: build/C/man3/inet_net_pton.3:29
8487 msgid "inet_net_pton, inet_net_ntop - Internet network number conversion"
8488 msgstr ""
8489
8490 #. type: Plain text
8491 #: build/C/man3/inet_net_pton.3:35
8492 #, no-wrap
8493 msgid ""
8494 "B<int inet_net_pton(int >I<af>B<, const char *>I<pres>B<,>\n"
8495 "B<                  void *>I<netp>B<, size_t >I<nsize>B<);>\n"
8496 msgstr ""
8497
8498 #. type: Plain text
8499 #: build/C/man3/inet_net_pton.3:38
8500 #, no-wrap
8501 msgid ""
8502 "B<char *inet_net_ntop(int >I<af>B<, const void *>I<netp>B<, int "
8503 ">I<bits>B<,>\n"
8504 "B<                    char *>I<pres>B<, size_t >I<psize>B<);>\n"
8505 msgstr ""
8506
8507 #. type: Plain text
8508 #: build/C/man3/inet_net_pton.3:41 build/C/man3/resolver.3:85
8509 msgid "Link with I<-lresolv>."
8510 msgstr ""
8511
8512 #. type: Plain text
8513 #: build/C/man3/inet_net_pton.3:49
8514 msgid "B<inet_net_pton>(), B<inet_net_ntop>():"
8515 msgstr ""
8516
8517 #. type: TP
8518 #: build/C/man3/inet_net_pton.3:52
8519 #, no-wrap
8520 msgid "Since glibc 2.20:"
8521 msgstr ""
8522
8523 #. type: Plain text
8524 #: build/C/man3/inet_net_pton.3:55
8525 msgid "_DEFAULT_SOURCE"
8526 msgstr ""
8527
8528 #. type: TP
8529 #: build/C/man3/inet_net_pton.3:55
8530 #, no-wrap
8531 msgid "Before glibc 2.20:"
8532 msgstr ""
8533
8534 #. type: Plain text
8535 #: build/C/man3/inet_net_pton.3:64
8536 msgid ""
8537 "These functions convert network numbers between presentation (i.e., "
8538 "printable) format and network (i.e., binary) format."
8539 msgstr ""
8540
8541 #. type: Plain text
8542 #: build/C/man3/inet_net_pton.3:70
8543 msgid ""
8544 "For both functions, I<af> specifies the address family for the conversion; "
8545 "the only supported value is B<AF_INET>."
8546 msgstr ""
8547
8548 #. type: SS
8549 #: build/C/man3/inet_net_pton.3:70
8550 #, no-wrap
8551 msgid "inet_net_pton()"
8552 msgstr ""
8553
8554 #. type: Plain text
8555 #: build/C/man3/inet_net_pton.3:89
8556 msgid ""
8557 "The B<inet_net_pton>()  function converts I<pres>, a null-terminated string "
8558 "containing an Internet network number in presentation format to network "
8559 "format.  The result of the conversion, which is in network byte order, is "
8560 "placed in the buffer pointed to by I<net>.  (The I<netp> argument typically "
8561 "points to an I<in_addr> structure.)  The I<nsize> argument specifies the "
8562 "number of bytes available in I<netp>."
8563 msgstr ""
8564
8565 #. type: Plain text
8566 #: build/C/man3/inet_net_pton.3:97
8567 msgid ""
8568 "On success, B<inet_net_pton>()  returns the number of bits in the network "
8569 "number field of the result placed in I<netp>.  For a discussion of the input "
8570 "presentation format and the return value, see NOTES."
8571 msgstr ""
8572
8573 #. type: Plain text
8574 #: build/C/man3/inet_net_pton.3:107
8575 msgid ""
8576 "I<Note>: the buffer pointed to by I<netp> should be zeroed out before "
8577 "calling B<inet_net_pton>(), since the call writes only as many bytes as are "
8578 "required for the network number (or as are explicitly specified by I<pres>), "
8579 "which may be less than the number of bytes in a complete network address."
8580 msgstr ""
8581
8582 #. type: SS
8583 #: build/C/man3/inet_net_pton.3:107
8584 #, no-wrap
8585 msgid "inet_net_ntop()"
8586 msgstr ""
8587
8588 #. type: Plain text
8589 #: build/C/man3/inet_net_pton.3:119
8590 msgid ""
8591 "The B<inet_net_ntop>()  function converts the network number in the buffer "
8592 "pointed to by I<netp> to presentation format; I<*netp> is interpreted as a "
8593 "value in network byte order.  The I<bits> argument specifies the number of "
8594 "bits in the network number in I<*netp>."
8595 msgstr ""
8596
8597 #. type: Plain text
8598 #: build/C/man3/inet_net_pton.3:130
8599 msgid ""
8600 "The null-terminated presentation-format string is placed in the buffer "
8601 "pointed to by I<pres>.  The I<psize> argument specifies the number of bytes "
8602 "available in I<pres>.  The presentation string is in CIDR format: a "
8603 "dotted-decimal number representing the network address, followed by a slash, "
8604 "and the size of the network number in bits."
8605 msgstr ""
8606
8607 #. type: Plain text
8608 #: build/C/man3/inet_net_pton.3:137
8609 msgid ""
8610 "On success, B<inet_net_pton>()  returns the number of bits in the network "
8611 "number.  On error, it returns -1, and I<errno> is set to indicate the cause "
8612 "of the error."
8613 msgstr ""
8614
8615 #. type: Plain text
8616 #: build/C/man3/inet_net_pton.3:145
8617 msgid ""
8618 "On success, B<inet_net_ntop>()  returns I<pres>.  On error, it returns NULL, "
8619 "and I<errno> is set to indicate the cause of the error."
8620 msgstr ""
8621
8622 #. type: Plain text
8623 #: build/C/man3/inet_net_pton.3:151
8624 msgid "I<af> specified a value other than B<AF_INET>."
8625 msgstr ""
8626
8627 #. type: Plain text
8628 #: build/C/man3/inet_net_pton.3:154
8629 msgid "The size of the output buffer was insufficient."
8630 msgstr ""
8631
8632 #. type: Plain text
8633 #: build/C/man3/inet_net_pton.3:159
8634 msgid "(B<inet_net_pton>())  I<pres> was not in correct presentation format."
8635 msgstr ""
8636
8637 #. type: Plain text
8638 #: build/C/man3/inet_net_pton.3:165
8639 msgid ""
8640 "The B<inet_net_pton>()  and B<inet_net_ntop>()  functions are nonstandard, "
8641 "but widely available."
8642 msgstr ""
8643
8644 #. type: SS
8645 #: build/C/man3/inet_net_pton.3:166
8646 #, no-wrap
8647 msgid "Input presentation format for inet_net_pton()"
8648 msgstr ""
8649
8650 #. type: Plain text
8651 #: build/C/man3/inet_net_pton.3:170
8652 msgid ""
8653 "The network number may be specified either as a hexadecimal value or in "
8654 "dotted-decimal notation."
8655 msgstr ""
8656
8657 #.  If the hexadecimal string is short, the remaining nibbles are zeroed.
8658 #. type: Plain text
8659 #: build/C/man3/inet_net_pton.3:175
8660 msgid ""
8661 "Hexadecimal values are indicated by an initial \"0x\" or \"0X\".  The "
8662 "hexadecimal digits populate the nibbles (half octets) of the network number "
8663 "from left to right in network byte order."
8664 msgstr ""
8665
8666 #. type: Plain text
8667 #: build/C/man3/inet_net_pton.3:179
8668 msgid ""
8669 "In dotted-decimal notation, up to four octets are specified, as decimal "
8670 "numbers separated by dots.  Thus, any of the following forms are accepted:"
8671 msgstr ""
8672
8673 #. type: Plain text
8674 #: build/C/man3/inet_net_pton.3:184
8675 #, no-wrap
8676 msgid ""
8677 "    a.b.c.d\n"
8678 "    a.b.c\n"
8679 "    a.b\n"
8680 "    a\n"
8681 msgstr ""
8682
8683 #.  Reading other man pages, some other implementations treat
8684 #.      'c' in a.b.c as a 16-bit number that populates right-most two bytes
8685 #.      'b' in a.b as a 24-bit number that populates right-most three bytes
8686 #. type: Plain text
8687 #: build/C/man3/inet_net_pton.3:192
8688 msgid ""
8689 "Each part is a number in the range 0 to 255 that populates one byte of the "
8690 "resulting network number, going from left to right, in network-byte (big "
8691 "endian) order.  Where a part is omitted, the resulting byte in the network "
8692 "number is zero."
8693 msgstr ""
8694
8695 #. type: Plain text
8696 #: build/C/man3/inet_net_pton.3:197
8697 msgid ""
8698 "For either hexadecimal or dotted-decimal format, the network number can "
8699 "optionally be followed by a slash and a number in the range 0 to 32, which "
8700 "specifies the size of the network number in bits."
8701 msgstr ""
8702
8703 #. type: SS
8704 #: build/C/man3/inet_net_pton.3:197
8705 #, no-wrap
8706 msgid "Return value of inet_net_pton()"
8707 msgstr ""
8708
8709 #. type: Plain text
8710 #: build/C/man3/inet_net_pton.3:207
8711 msgid ""
8712 "The return value of B<inet_net_pton>()  is the number of bits in the network "
8713 "number field.  If the input presentation string terminates with a slash and "
8714 "an explicit size value, then that size becomes the return value of "
8715 "B<inet_net_pton>().  Otherwise, the return value, I<bits>, is inferred as "
8716 "follows:"
8717 msgstr ""
8718
8719 #. type: Plain text
8720 #: build/C/man3/inet_net_pton.3:213
8721 msgid ""
8722 "If the most significant byte of the network number is greater than or equal "
8723 "to 240, then I<bits> is 32."
8724 msgstr ""
8725
8726 #. type: Plain text
8727 #: build/C/man3/inet_net_pton.3:220
8728 msgid ""
8729 "Otherwise, if the most significant byte of the network number is greater "
8730 "than or equal to 224, then I<bits> is 4."
8731 msgstr ""
8732
8733 #. type: Plain text
8734 #: build/C/man3/inet_net_pton.3:227
8735 msgid ""
8736 "Otherwise, if the most significant byte of the network number is greater "
8737 "than or equal to 192, then I<bits> is 24."
8738 msgstr ""
8739
8740 #. type: Plain text
8741 #: build/C/man3/inet_net_pton.3:234
8742 msgid ""
8743 "Otherwise, if the most significant byte of the network number is greater "
8744 "than or equal to 128, then I<bits> is 16."
8745 msgstr ""
8746
8747 #. type: Plain text
8748 #: build/C/man3/inet_net_pton.3:238
8749 msgid "Otherwise, I<bits> is 8."
8750 msgstr ""
8751
8752 #. type: Plain text
8753 #: build/C/man3/inet_net_pton.3:247
8754 msgid ""
8755 "If the resulting I<bits> value from the above steps is greater than or equal "
8756 "to 8, but the number of octets specified in the network number exceed "
8757 "I<bits/8>, then I<bits> is set to 8 times the number of octets actually "
8758 "specified."
8759 msgstr ""
8760
8761 #. type: Plain text
8762 #: build/C/man3/inet_net_pton.3:261
8763 msgid ""
8764 "The program below demonstrates the use of B<inet_net_pton>()  and "
8765 "B<inet_net_ntop>().  It uses B<inet_net_pton>()  to convert the presentation "
8766 "format network address provided in its first command-line argument to binary "
8767 "form, displays the return value from B<inet_net_pton>().  It then uses "
8768 "B<inet_net_ntop>()  to convert the binary form back to presentation format, "
8769 "and displays the resulting string."
8770 msgstr ""
8771
8772 #. type: Plain text
8773 #: build/C/man3/inet_net_pton.3:275
8774 msgid ""
8775 "In order to demonstrate that B<inet_net_pton>()  may not write to all bytes "
8776 "of its I<netp> argument, the program allows an optional second command-line "
8777 "argument, a number used to initialize the buffer before B<inet_net_pton>()  "
8778 "is called.  As its final line of output, the program displays all of the "
8779 "bytes of the buffer returned by B<inet_net_pton>()  allowing the user to see "
8780 "which bytes have not been touched by B<inet_net_pton>()."
8781 msgstr ""
8782
8783 #. type: Plain text
8784 #: build/C/man3/inet_net_pton.3:279
8785 msgid ""
8786 "An example run, showing that B<inet_net_pton>()  infers the number of bits "
8787 "in the network number:"
8788 msgstr ""
8789
8790 #. type: Plain text
8791 #: build/C/man3/inet_net_pton.3:286
8792 #, no-wrap
8793 msgid ""
8794 "$ B<./a.out 193.168>\n"
8795 "inet_net_pton() returned: 24\n"
8796 "inet_net_ntop() yielded:  193.168.0/24\n"
8797 "Raw address:              c1a80000\n"
8798 msgstr ""
8799
8800 #. type: Plain text
8801 #: build/C/man3/inet_net_pton.3:292
8802 msgid ""
8803 "Demonstrate that B<inet_net_pton>()  does not zero out unused bytes in its "
8804 "result buffer:"
8805 msgstr ""
8806
8807 #. type: Plain text
8808 #: build/C/man3/inet_net_pton.3:299
8809 #, no-wrap
8810 msgid ""
8811 "$ B<./a.out 193.168 0xffffffff>\n"
8812 "inet_net_pton() returned: 24\n"
8813 "inet_net_ntop() yielded:  193.168.0/24\n"
8814 "Raw address:              c1a800ff\n"
8815 msgstr ""
8816
8817 #. type: Plain text
8818 #: build/C/man3/inet_net_pton.3:307
8819 msgid ""
8820 "Demonstrate that B<inet_net_pton>()  will widen the inferred size of the "
8821 "network number, if the supplied number of bytes in the presentation string "
8822 "exceeds the inferred value:"
8823 msgstr ""
8824
8825 #. type: Plain text
8826 #: build/C/man3/inet_net_pton.3:314
8827 #, no-wrap
8828 msgid ""
8829 "$ B<./a.out 193.168.1.128>\n"
8830 "inet_net_pton() returned: 32\n"
8831 "inet_net_ntop() yielded:  193.168.1.128/32\n"
8832 "Raw address:              c1a80180\n"
8833 msgstr ""
8834
8835 #. type: Plain text
8836 #: build/C/man3/inet_net_pton.3:322
8837 msgid ""
8838 "Explicitly specifying the size of the network number overrides any inference "
8839 "about its size (but any extra bytes that are explicitly specified will still "
8840 "be used by B<inet_net_pton>(): to populate the result buffer):"
8841 msgstr ""
8842
8843 #. type: Plain text
8844 #: build/C/man3/inet_net_pton.3:329
8845 #, no-wrap
8846 msgid ""
8847 "$ B<./a.out 193.168.1.128/24>\n"
8848 "inet_net_pton() returned: 24\n"
8849 "inet_net_ntop() yielded:  193.168.1/24\n"
8850 "Raw address:              c1a80180\n"
8851 msgstr ""
8852
8853 #. type: Plain text
8854 #: build/C/man3/inet_net_pton.3:334
8855 #, no-wrap
8856 msgid "/* Link with \"-lresolv\" */\n"
8857 msgstr ""
8858
8859 #. type: Plain text
8860 #: build/C/man3/inet_net_pton.3:338
8861 #, no-wrap
8862 msgid ""
8863 "#include E<lt>arpa/inet.hE<gt>\n"
8864 "#include E<lt>stdio.hE<gt>\n"
8865 "#include E<lt>stdlib.hE<gt>\n"
8866 msgstr ""
8867
8868 #. type: Plain text
8869 #: build/C/man3/inet_net_pton.3:341
8870 #, no-wrap
8871 msgid ""
8872 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8873 "                        } while (0)\n"
8874 msgstr ""
8875
8876 #. type: Plain text
8877 #: build/C/man3/inet_net_pton.3:348
8878 #, no-wrap
8879 msgid ""
8880 "int\n"
8881 "main(int argc, char *argv[])\n"
8882 "{\n"
8883 "    char buf[100];\n"
8884 "    struct in_addr addr;\n"
8885 "    int bits;\n"
8886 msgstr ""
8887
8888 #. type: Plain text
8889 #: build/C/man3/inet_net_pton.3:355
8890 #, no-wrap
8891 msgid ""
8892 "    if (argc E<lt> 2) {\n"
8893 "        fprintf(stderr,\n"
8894 "                \"Usage: %s presentation-form [addr-init-value]\\en\",\n"
8895 "                argv[0]);\n"
8896 "        exit(EXIT_FAILURE);\n"
8897 "    }\n"
8898 msgstr ""
8899
8900 #. type: Plain text
8901 #: build/C/man3/inet_net_pton.3:361
8902 #, no-wrap
8903 msgid ""
8904 "    /* If argv[2] is supplied (a numeric value), use it to initialize\n"
8905 "       the output buffer given to inet_net_pton(), so that we can see\n"
8906 "       that inet_net_pton() initializes only those bytes needed for\n"
8907 "       the network number. If argv[2] is not supplied, then initialize\n"
8908 "       the buffer to zero (as is recommended practice). */\n"
8909 msgstr ""
8910
8911 #. type: Plain text
8912 #: build/C/man3/inet_net_pton.3:363
8913 #, no-wrap
8914 msgid "    addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
8915 msgstr ""
8916
8917 #. type: Plain text
8918 #: build/C/man3/inet_net_pton.3:365
8919 #, no-wrap
8920 msgid "    /* Convert presentation network number in argv[1] to binary */\n"
8921 msgstr ""
8922
8923 #. type: Plain text
8924 #: build/C/man3/inet_net_pton.3:369
8925 #, no-wrap
8926 msgid ""
8927 "    bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
8928 "    if (bits == -1)\n"
8929 "        errExit(\"inet_net_ntop\");\n"
8930 msgstr ""
8931
8932 #. type: Plain text
8933 #: build/C/man3/inet_net_pton.3:371
8934 #, no-wrap
8935 msgid "    printf(\"inet_net_pton() returned: %d\\en\", bits);\n"
8936 msgstr ""
8937
8938 #. type: Plain text
8939 #: build/C/man3/inet_net_pton.3:374
8940 #, no-wrap
8941 msgid ""
8942 "    /* Convert binary format back to presentation, using \\(aqbits\\(aq\n"
8943 "       returned by inet_net_pton() */\n"
8944 msgstr ""
8945
8946 #. type: Plain text
8947 #: build/C/man3/inet_net_pton.3:377
8948 #, no-wrap
8949 msgid ""
8950 "    if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
8951 "        errExit(\"inet_net_ntop\");\n"
8952 msgstr ""
8953
8954 #. type: Plain text
8955 #: build/C/man3/inet_net_pton.3:379
8956 #, no-wrap
8957 msgid "    printf(\"inet_net_ntop() yielded:  %s\\en\", buf);\n"
8958 msgstr ""
8959
8960 #. type: Plain text
8961 #: build/C/man3/inet_net_pton.3:384
8962 #, no-wrap
8963 msgid ""
8964 "    /* Display \\(aqaddr\\(aq in raw form (in network byte order), so we "
8965 "can\n"
8966 "       see bytes not displayed by inet_net_ntop(); some of those bytes\n"
8967 "       may not have been touched by inet_net_ntop(), and so will still\n"
8968 "       have any initial value that was specified in argv[2]. */\n"
8969 msgstr ""
8970
8971 #. type: Plain text
8972 #: build/C/man3/inet_net_pton.3:386
8973 #, no-wrap
8974 msgid "    printf(\"Raw address:              %x\\en\", htonl(addr.s_addr));\n"
8975 msgstr ""
8976
8977 #. type: Plain text
8978 #: build/C/man3/inet_net_pton.3:393
8979 msgid "B<inet>(3), B<networks>(5)"
8980 msgstr ""
8981
8982 #. type: TH
8983 #: build/C/man7/ip.7:36
8984 #, no-wrap
8985 msgid "IP"
8986 msgstr ""
8987
8988 #. type: TH
8989 #: build/C/man7/ip.7:36
8990 #, no-wrap
8991 msgid "2014-05-10"
8992 msgstr ""
8993
8994 #. type: Plain text
8995 #: build/C/man7/ip.7:39
8996 msgid "ip - Linux IPv4 protocol implementation"
8997 msgstr ""
8998
8999 #. type: Plain text
9000 #: 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
9001 msgid "B<#include E<lt>netinet/in.hE<gt>>"
9002 msgstr ""
9003
9004 #. type: Plain text
9005 #: build/C/man7/ip.7:47
9006 msgid "B<#include E<lt>netinet/ip.hE<gt> >/* superset of previous */"
9007 msgstr ""
9008
9009 #. type: Plain text
9010 #: build/C/man7/ip.7:49
9011 msgid "I<tcp_socket>B< = socket(AF_INET, SOCK_STREAM, 0);>"
9012 msgstr ""
9013
9014 #. type: Plain text
9015 #: build/C/man7/ip.7:51
9016 msgid "I<udp_socket>B< = socket(AF_INET, SOCK_DGRAM, 0);>"
9017 msgstr ""
9018
9019 #. type: Plain text
9020 #: build/C/man7/ip.7:53
9021 msgid "I<raw_socket>B< = socket(AF_INET, SOCK_RAW, >I<protocol>B<);>"
9022 msgstr ""
9023
9024 #.  FIXME has someone verified that 2.1 is really 1812 compliant?
9025 #. type: Plain text
9026 #: build/C/man7/ip.7:60
9027 msgid ""
9028 "Linux implements the Internet Protocol, version 4, described in RFC\\ 791 "
9029 "and RFC\\ 1122.  B<ip> contains a level 2 multicasting implementation "
9030 "conforming to RFC\\ 1112.  It also contains an IP router including a packet "
9031 "filter."
9032 msgstr ""
9033
9034 #. type: Plain text
9035 #: build/C/man7/ip.7:64
9036 msgid ""
9037 "The programming interface is BSD-sockets compatible.  For more information "
9038 "on sockets, see B<socket>(7)."
9039 msgstr ""
9040
9041 #. type: Plain text
9042 #: build/C/man7/ip.7:95
9043 msgid ""
9044 "An IP socket is created by calling the B<socket>(2)  function as "
9045 "B<socket(AF_INET, >I<socket_type>B<, >I<protocol>B<)>.  Valid socket types "
9046 "are B<SOCK_STREAM> to open a B<tcp>(7)  socket, B<SOCK_DGRAM> to open a "
9047 "B<udp>(7)  socket, or B<SOCK_RAW> to open a B<raw>(7)  socket to access the "
9048 "IP protocol directly.  I<protocol> is the IP protocol in the IP header to be "
9049 "received or sent.  The only valid values for I<protocol> are 0 and "
9050 "B<IPPROTO_TCP> for TCP sockets, and 0 and B<IPPROTO_UDP> for UDP sockets.  "
9051 "For B<SOCK_RAW> you may specify a valid IANA IP protocol defined in RFC\\ "
9052 "1700 assigned numbers."
9053 msgstr ""
9054
9055 #. type: Plain text
9056 #: build/C/man7/ip.7:117
9057 msgid ""
9058 "When a process wants to receive new incoming packets or connections, it "
9059 "should bind a socket to a local interface address using B<bind>(2).  In this "
9060 "case, only one IP socket may be bound to any given local (address, port) "
9061 "pair.  When B<INADDR_ANY> is specified in the bind call, the socket will be "
9062 "bound to I<all> local interfaces.  When B<listen>(2)  is called on an "
9063 "unbound socket, the socket is automatically bound to a random free port with "
9064 "the local address set to B<INADDR_ANY>.  When B<connect>(2)  is called on an "
9065 "unbound socket, the socket is automatically bound to a random free port or "
9066 "to a usable shared port with the local address set to B<INADDR_ANY>."
9067 msgstr ""
9068
9069 #. type: Plain text
9070 #: build/C/man7/ip.7:123
9071 msgid ""
9072 "A TCP local socket address that has been bound is unavailable for some time "
9073 "after closing, unless the B<SO_REUSEADDR> flag has been set.  Care should be "
9074 "taken when using this flag as it makes TCP less reliable."
9075 msgstr ""
9076
9077 #. type: Plain text
9078 #: build/C/man7/ip.7:134
9079 msgid ""
9080 "An IP socket address is defined as a combination of an IP interface address "
9081 "and a 16-bit port number.  The basic IP protocol does not supply port "
9082 "numbers, they are implemented by higher level protocols like B<udp>(7)  and "
9083 "B<tcp>(7).  On raw sockets I<sin_port> is set to the IP protocol."
9084 msgstr ""
9085
9086 #. type: Plain text
9087 #: build/C/man7/ip.7:142
9088 #, no-wrap
9089 msgid ""
9090 "struct sockaddr_in {\n"
9091 "    sa_family_t    sin_family; /* address family: AF_INET */\n"
9092 "    in_port_t      sin_port;   /* port in network byte order */\n"
9093 "    struct in_addr sin_addr;   /* internet address */\n"
9094 "};\n"
9095 msgstr ""
9096
9097 #. type: Plain text
9098 #: build/C/man7/ip.7:147
9099 #, no-wrap
9100 msgid ""
9101 "/* Internet address. */\n"
9102 "struct in_addr {\n"
9103 "    uint32_t       s_addr;     /* address in network byte order */\n"
9104 "};\n"
9105 msgstr ""
9106
9107 #. type: Plain text
9108 #: build/C/man7/ip.7:172
9109 msgid ""
9110 "I<sin_family> is always set to B<AF_INET>.  This is required; in Linux 2.2 "
9111 "most networking functions return B<EINVAL> when this setting is missing.  "
9112 "I<sin_port> contains the port in network byte order.  The port numbers below "
9113 "1024 are called I<privileged ports> (or sometimes: I<reserved ports>).  Only "
9114 "privileged processes (i.e., those having the B<CAP_NET_BIND_SERVICE> "
9115 "capability) may B<bind>(2)  to these sockets.  Note that the raw IPv4 "
9116 "protocol as such has no concept of a port, they are implemented only by "
9117 "higher protocols like B<tcp>(7)  and B<udp>(7)."
9118 msgstr ""
9119
9120 #. type: Plain text
9121 #: build/C/man7/ip.7:191
9122 msgid ""
9123 "I<sin_addr> is the IP host address.  The I<s_addr> member of I<struct "
9124 "in_addr> contains the host interface address in network byte order.  "
9125 "I<in_addr> should be assigned one of the B<INADDR_*> values (e.g., "
9126 "B<INADDR_ANY>)  or set using the B<inet_aton>(3), B<inet_addr>(3), "
9127 "B<inet_makeaddr>(3)  library functions or directly with the name resolver "
9128 "(see B<gethostbyname>(3))."
9129 msgstr ""
9130
9131 #.  Leave a loophole for XTP @)
9132 #. type: Plain text
9133 #: build/C/man7/ip.7:203
9134 msgid ""
9135 "IPv4 addresses are divided into unicast, broadcast and multicast addresses.  "
9136 "Unicast addresses specify a single interface of a host, broadcast addresses "
9137 "specify all hosts on a network and multicast addresses address all hosts in "
9138 "a multicast group.  Datagrams to broadcast addresses can be sent or received "
9139 "only when the B<SO_BROADCAST> socket flag is set.  In the current "
9140 "implementation, connection-oriented sockets are allowed to use only unicast "
9141 "addresses."
9142 msgstr ""
9143
9144 #. type: Plain text
9145 #: build/C/man7/ip.7:211
9146 msgid ""
9147 "Note that the address and the port are always stored in network byte order.  "
9148 "In particular, this means that you need to call B<htons>(3)  on the number "
9149 "that is assigned to a port.  All address/port manipulation functions in the "
9150 "standard library work in network byte order."
9151 msgstr ""
9152
9153 #. type: Plain text
9154 #: build/C/man7/ip.7:224
9155 msgid ""
9156 "There are several special addresses: B<INADDR_LOOPBACK> (127.0.0.1)  always "
9157 "refers to the local host via the loopback device; B<INADDR_ANY> (0.0.0.0)  "
9158 "means any address for binding; B<INADDR_BROADCAST> (255.255.255.255)  means "
9159 "any host and has the same effect on bind as B<INADDR_ANY> for historical "
9160 "reasons."
9161 msgstr ""
9162
9163 #.  or SOL_IP on Linux
9164 #. type: Plain text
9165 #: build/C/man7/ip.7:233
9166 msgid ""
9167 "IP supports some protocol-specific socket options that can be set with "
9168 "B<setsockopt>(2)  and read with B<getsockopt>(2).  The socket option level "
9169 "for IP is B<IPPROTO_IP>.  A boolean integer flag is zero when it is false, "
9170 "otherwise true."
9171 msgstr ""
9172
9173 #. type: TP
9174 #: build/C/man7/ip.7:233
9175 #, no-wrap
9176 msgid "B<IP_ADD_MEMBERSHIP> (since Linux 1.2)"
9177 msgstr ""
9178
9179 #. type: Plain text
9180 #: build/C/man7/ip.7:239
9181 msgid "Join a multicast group.  Argument is an I<ip_mreqn> structure."
9182 msgstr ""
9183
9184 #. type: Plain text
9185 #: build/C/man7/ip.7:249
9186 #, no-wrap
9187 msgid ""
9188 "struct ip_mreqn {\n"
9189 "    struct in_addr imr_multiaddr; /* IP multicast group\n"
9190 "                                     address */\n"
9191 "    struct in_addr imr_address;   /* IP address of local\n"
9192 "                                     interface */\n"
9193 "    int            imr_ifindex;   /* interface index */\n"
9194 "};\n"
9195 msgstr ""
9196
9197 #.  (i.e., within the 224.0.0.0-239.255.255.255 range)
9198 #. type: Plain text
9199 #: build/C/man7/ip.7:270
9200 msgid ""
9201 "I<imr_multiaddr> contains the address of the multicast group the application "
9202 "wants to join or leave.  It must be a valid multicast address (or "
9203 "B<setsockopt>(2)  fails with the error B<EINVAL>).  I<imr_address> is the "
9204 "address of the local interface with which the system should join the "
9205 "multicast group; if it is equal to B<INADDR_ANY>, an appropriate interface "
9206 "is chosen by the system.  I<imr_ifindex> is the interface index of the "
9207 "interface that should join/leave the I<imr_multiaddr> group, or 0 to "
9208 "indicate any interface."
9209 msgstr ""
9210
9211 #. type: Plain text
9212 #: build/C/man7/ip.7:285
9213 msgid ""
9214 "The I<ip_mreqn> structure is available only since Linux 2.2.  For "
9215 "compatibility, the old I<ip_mreq> structure (present since Linux 1.2) is "
9216 "still supported; it differs from I<ip_mreqn> only by not including the "
9217 "I<imr_ifindex> field.  Only valid as a B<setsockopt>(2)."
9218 msgstr ""
9219
9220 #. type: TP
9221 #: build/C/man7/ip.7:285
9222 #, no-wrap
9223 msgid "B<IP_ADD_SOURCE_MEMBERSHIP> (since Linux 2.4.22 / 2.5.68)"
9224 msgstr ""
9225
9226 #. type: Plain text
9227 #: build/C/man7/ip.7:292
9228 msgid ""
9229 "Join a multicast group and allow receiving data only from a specified "
9230 "source.  Argument is an I<ip_mreq_source> structure."
9231 msgstr ""
9232
9233 #. type: Plain text
9234 #: build/C/man7/ip.7:303
9235 #, no-wrap
9236 msgid ""
9237 "struct ip_mreq_source {\n"
9238 "    struct in_addr imr_multiaddr;  /* IP multicast group\n"
9239 "                                      address */\n"
9240 "    struct in_addr imr_interface;  /* IP address of local\n"
9241 "                                      interface */\n"
9242 "    struct in_addr imr_sourceaddr; /* IP address of\n"
9243 "                                      multicast source */\n"
9244 "};\n"
9245 msgstr ""
9246
9247 #. type: Plain text
9248 #: build/C/man7/ip.7:324
9249 msgid ""
9250 "The I<ip_mreq_source> structure is similar to I<ip_mreqn> described under "
9251 "B<IP_ADD_MEMBERSIP>.  The I<imr_multiaddr> field contains the address of the "
9252 "multicast group the application wants to join or leave.  The "
9253 "I<imr_interface> field is the address of the local interface with which the "
9254 "system should join the multicast group.  Finally, the I<imr_sourceaddr> "
9255 "field contains the address of the source the application wants to receive "
9256 "data from."
9257 msgstr ""
9258
9259 #. type: Plain text
9260 #: build/C/man7/ip.7:327
9261 msgid ""
9262 "This option can be used multiple times to allow receiving data from more "
9263 "than one source."
9264 msgstr ""
9265
9266 #. type: TP
9267 #: build/C/man7/ip.7:327
9268 #, no-wrap
9269 msgid "B<IP_BLOCK_SOURCE> (since Linux 2.4.22 / 2.5.68)"
9270 msgstr ""
9271
9272 #. type: Plain text
9273 #: build/C/man7/ip.7:335
9274 msgid ""
9275 "Stop receiving multicast data from a specific source in a given group.  This "
9276 "is valid only after the application has subscribed to the multicast group "
9277 "using either B<IP_ADD_MEMBERSHIP> or B<IP_ADD_SOURCE_MEMBERSHIP>."
9278 msgstr ""
9279
9280 #. type: Plain text
9281 #: build/C/man7/ip.7:340 build/C/man7/ip.7:362 build/C/man7/ip.7:926
9282 msgid ""
9283 "Argument is an I<ip_mreq_source> structure as described under "
9284 "B<IP_ADD_SOURCE_MEMBERSHIP>."
9285 msgstr ""
9286
9287 #. type: TP
9288 #: build/C/man7/ip.7:340
9289 #, no-wrap
9290 msgid "B<IP_DROP_MEMBERSHIP> (since Linux 1.2)"
9291 msgstr ""
9292
9293 #. type: Plain text
9294 #: build/C/man7/ip.7:349
9295 msgid ""
9296 "Leave a multicast group.  Argument is an I<ip_mreqn> or I<ip_mreq> structure "
9297 "similar to B<IP_ADD_MEMBERSHIP>."
9298 msgstr ""
9299
9300 #. type: TP
9301 #: build/C/man7/ip.7:349
9302 #, no-wrap
9303 msgid "B<IP_DROP_SOURCE_MEMBERSHIP> (since Linux 2.4.22 / 2.5.68)"
9304 msgstr ""
9305
9306 #. type: Plain text
9307 #: build/C/man7/ip.7:357
9308 msgid ""
9309 "Leave a source-specific group\\(emthat is, stop receiving data from a given "
9310 "multicast group that come from a given source.  If the application has "
9311 "subscribed to multiple sources within the same group, data from the "
9312 "remaining sources will still be delivered.  To stop receiving data from all "
9313 "sources at once, use B<IP_LEAVE_GROUP>."
9314 msgstr ""
9315
9316 #. type: TP
9317 #: build/C/man7/ip.7:362
9318 #, no-wrap
9319 msgid "B<IP_FREEBIND> (since Linux 2.4)"
9320 msgstr ""
9321
9322 #.  Precisely: 2.4.0-test10
9323 #. type: Plain text
9324 #: build/C/man7/ip.7:375
9325 msgid ""
9326 "If enabled, this boolean option allows binding to an IP address that is "
9327 "nonlocal or does not (yet) exist.  This permits listening on a socket, "
9328 "without requiring the underlying network interface or the specified dynamic "
9329 "IP address to be up at the time that the application is trying to bind to "
9330 "it.  This option is the per-socket equivalent of the I<ip_nonlocal_bind> "
9331 "I</proc> interface described below."
9332 msgstr ""
9333
9334 #. type: TP
9335 #: build/C/man7/ip.7:375
9336 #, no-wrap
9337 msgid "B<IP_HDRINCL> (since Linux 2.0)"
9338 msgstr ""
9339
9340 #. type: Plain text
9341 #: build/C/man7/ip.7:391
9342 msgid ""
9343 "If enabled, the user supplies an IP header in front of the user data.  Only "
9344 "valid for B<SOCK_RAW> sockets.  See B<raw>(7)  for more information.  When "
9345 "this flag is enabled the values set by B<IP_OPTIONS>, B<IP_TTL> and "
9346 "B<IP_TOS> are ignored."
9347 msgstr ""
9348
9349 #. type: TP
9350 #: build/C/man7/ip.7:391
9351 #, no-wrap
9352 msgid "B<IP_MSFILTER> (since Linux 2.4.22 / 2.5.68)"
9353 msgstr ""
9354
9355 #. type: Plain text
9356 #: build/C/man7/ip.7:397
9357 msgid ""
9358 "This option provides access to the advanced full-state filtering API.  "
9359 "Argument is an I<ip_msfilter> structure."
9360 msgstr ""
9361
9362 #. type: Plain text
9363 #: build/C/man7/ip.7:406
9364 #, no-wrap
9365 msgid ""
9366 "struct ip_msfilter {\n"
9367 "    struct in_addr imsf_multiaddr; /* IP multicast group\n"
9368 "                                      address */\n"
9369 "    struct in_addr imsf_interface; /* IP address of local\n"
9370 "                                      interface */\n"
9371 "    uint32_t       imsf_fmode;     /* Filter-mode */\n"
9372 msgstr ""
9373
9374 #. type: Plain text
9375 #: build/C/man7/ip.7:412
9376 #, no-wrap
9377 msgid ""
9378 "    uint32_t       imsf_numsrc;    /* Number of sources in\n"
9379 "                                      the following array */\n"
9380 "    struct in_addr imsf_slist[1];  /* Array of source\n"
9381 "                                      addresses */\n"
9382 "};\n"
9383 msgstr ""
9384
9385 #. type: Plain text
9386 #: build/C/man7/ip.7:427
9387 msgid ""
9388 "There are two macros, B<MCAST_INCLUDE> and B<MCAST_EXCLUDE>, which can be "
9389 "used to specify the filtering mode.  Additionally, the "
9390 "B<IP_MSFILTER_SIZE>(n)  macro exists to determine how much memory is needed "
9391 "to store I<ip_msfilter> structure with I<n> sources in the source list."
9392 msgstr ""
9393
9394 #. type: Plain text
9395 #: build/C/man7/ip.7:430
9396 msgid "For the full description of multicast source filtering refer to RFC 3376."
9397 msgstr ""
9398
9399 #. type: TP
9400 #: build/C/man7/ip.7:430
9401 #, no-wrap
9402 msgid "B<IP_MTU> (since Linux 2.2)"
9403 msgstr ""
9404
9405 #.  Precisely: 2.1.124
9406 #. type: Plain text
9407 #: build/C/man7/ip.7:438
9408 msgid ""
9409 "Retrieve the current known path MTU of the current socket.  Valid only when "
9410 "the socket has been connected.  Returns an integer.  Only valid as a "
9411 "B<getsockopt>(2)."
9412 msgstr ""
9413
9414 #. type: TP
9415 #: build/C/man7/ip.7:438
9416 #, no-wrap
9417 msgid "B<IP_MTU_DISCOVER> (since Linux 2.2)"
9418 msgstr ""
9419
9420 #.  Precisely: 2.1.124
9421 #. type: Plain text
9422 #: build/C/man7/ip.7:459
9423 msgid ""
9424 "Set or receive the Path MTU Discovery setting for a socket.  When enabled, "
9425 "Linux will perform Path MTU Discovery as defined in RFC\\ 1191 on "
9426 "B<SOCK_STREAM> sockets.  For non-B<SOCK_STREAM> sockets, B<IP_PMTUDISC_DO> "
9427 "forces the don't-fragment flag to be set on all outgoing packets.  It is the "
9428 "user's responsibility to packetize the data in MTU-sized chunks and to do "
9429 "the retransmits if necessary.  The kernel will reject (with B<EMSGSIZE>)  "
9430 "datagrams that are bigger than the known path MTU.  B<IP_PMTUDISC_WANT> will "
9431 "fragment a datagram if needed according to the path MTU, or will set the "
9432 "don't-fragment flag otherwise."
9433 msgstr ""
9434
9435 #. type: Plain text
9436 #: build/C/man7/ip.7:467
9437 msgid ""
9438 "The system-wide default can be toggled between B<IP_PMTUDISC_WANT> and "
9439 "B<IP_PMTUDISC_DONT> by writing (respectively, zero and nonzero values) to "
9440 "the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file."
9441 msgstr ""
9442
9443 #. type: tbl table
9444 #: build/C/man7/ip.7:471
9445 #, no-wrap
9446 msgid "Path MTU discovery value:Meaning\n"
9447 msgstr ""
9448
9449 #. type: tbl table
9450 #: build/C/man7/ip.7:472
9451 #, no-wrap
9452 msgid "IP_PMTUDISC_WANT:Use per-route settings.\n"
9453 msgstr ""
9454
9455 #. type: tbl table
9456 #: build/C/man7/ip.7:473
9457 #, no-wrap
9458 msgid "IP_PMTUDISC_DONT:Never do Path MTU Discovery.\n"
9459 msgstr ""
9460
9461 #. type: tbl table
9462 #: build/C/man7/ip.7:474
9463 #, no-wrap
9464 msgid "IP_PMTUDISC_DO:Always do Path MTU Discovery.\n"
9465 msgstr ""
9466
9467 #. type: tbl table
9468 #: build/C/man7/ip.7:475
9469 #, no-wrap
9470 msgid "IP_PMTUDISC_PROBE:Set DF but ignore Path MTU.\n"
9471 msgstr ""
9472
9473 #. type: Plain text
9474 #: build/C/man7/ip.7:493
9475 msgid ""
9476 "When PMTU discovery is enabled, the kernel automatically keeps track of the "
9477 "path MTU per destination host.  When it is connected to a specific peer with "
9478 "B<connect>(2), the currently known path MTU can be retrieved conveniently "
9479 "using the B<IP_MTU> socket option (e.g., after an B<EMSGSIZE> error "
9480 "occurred).  The path MTU may change over time.  For connectionless sockets "
9481 "with many destinations, the new MTU for a given destination can also be "
9482 "accessed using the error queue (see B<IP_RECVERR>).  A new error will be "
9483 "queued for every incoming MTU update."
9484 msgstr ""
9485
9486 #. type: Plain text
9487 #: build/C/man7/ip.7:498
9488 msgid ""
9489 "While MTU discovery is in progress, initial packets from datagram sockets "
9490 "may be dropped.  Applications using UDP should be aware of this and not take "
9491 "it into account for their packet retransmit strategy."
9492 msgstr ""
9493
9494 #.  FIXME this is an ugly hack
9495 #. type: Plain text
9496 #: build/C/man7/ip.7:503
9497 msgid ""
9498 "To bootstrap the path MTU discovery process on unconnected sockets, it is "
9499 "possible to start with a big datagram size (up to 64K-headers bytes long) "
9500 "and let it shrink by updates of the path MTU."
9501 msgstr ""
9502
9503 #. type: Plain text
9504 #: build/C/man7/ip.7:512
9505 msgid ""
9506 "To get an initial estimate of the path MTU, connect a datagram socket to the "
9507 "destination address using B<connect>(2)  and retrieve the MTU by calling "
9508 "B<getsockopt>(2)  with the B<IP_MTU> option."
9509 msgstr ""
9510
9511 #. type: Plain text
9512 #: build/C/man7/ip.7:524
9513 msgid ""
9514 "It is possible to implement RFC 4821 MTU probing with B<SOCK_DGRAM> or "
9515 "B<SOCK_RAW> sockets by setting a value of B<IP_PMTUDISC_PROBE> (available "
9516 "since Linux 2.6.22).  This is also particularly useful for diagnostic tools "
9517 "such as B<tracepath>(8)  that wish to deliberately send probe packets larger "
9518 "than the observed Path MTU."
9519 msgstr ""
9520
9521 #. type: TP
9522 #: build/C/man7/ip.7:524
9523 #, no-wrap
9524 msgid "B<IP_MULTICAST_ALL> (since Linux 2.6.31)"
9525 msgstr ""
9526
9527 #. type: Plain text
9528 #: build/C/man7/ip.7:538
9529 msgid ""
9530 "This option can be used to modify the delivery policy of multicast messages "
9531 "to sockets bound to the wildcard B<INADDR_ANY> address.  The argument is a "
9532 "boolean integer (defaults to 1).  If set to 1, the socket will receive "
9533 "messages from all the groups that have been joined globally on the whole "
9534 "system.  Otherwise, it will deliver messages only from the groups that have "
9535 "been explicitly joined (for example via the B<IP_ADD_MEMBERSHIP> option) on "
9536 "this particular socket."
9537 msgstr ""
9538
9539 #. type: TP
9540 #: build/C/man7/ip.7:538
9541 #, no-wrap
9542 msgid "B<IP_MULTICAST_IF> (since Linux 1.2)"
9543 msgstr ""
9544
9545 #.  net: IP_MULTICAST_IF setsockopt now recognizes struct mreq
9546 #.  Commit: 3a084ddb4bf299a6e898a9a07c89f3917f0713f7
9547 #. type: Plain text
9548 #: build/C/man7/ip.7:550
9549 msgid ""
9550 "Set the local device for a multicast socket.  Argument is an I<ip_mreqn> or "
9551 "I<ip_mreq> (since Linux 3.5)  structure similar to B<IP_ADD_MEMBERSHIP>."
9552 msgstr ""
9553
9554 #. type: Plain text
9555 #: build/C/man7/ip.7:554
9556 msgid "When an invalid socket option is passed, B<ENOPROTOOPT> is returned."
9557 msgstr ""
9558
9559 #. type: TP
9560 #: build/C/man7/ip.7:554
9561 #, no-wrap
9562 msgid "B<IP_MULTICAST_LOOP> (since Linux 1.2)"
9563 msgstr ""
9564
9565 #. type: Plain text
9566 #: build/C/man7/ip.7:558
9567 msgid ""
9568 "Set or read a boolean integer argument that determines whether sent "
9569 "multicast packets should be looped back to the local sockets."
9570 msgstr ""
9571
9572 #. type: TP
9573 #: build/C/man7/ip.7:558
9574 #, no-wrap
9575 msgid "B<IP_MULTICAST_TTL> (since Linux 1.2)"
9576 msgstr ""
9577
9578 #. type: Plain text
9579 #: build/C/man7/ip.7:566
9580 msgid ""
9581 "Set or read the time-to-live value of outgoing multicast packets for this "
9582 "socket.  It is very important for multicast packets to set the smallest TTL "
9583 "possible.  The default is 1 which means that multicast packets don't leave "
9584 "the local network unless the user program explicitly requests it.  Argument "
9585 "is an integer."
9586 msgstr ""
9587
9588 #. type: TP
9589 #: build/C/man7/ip.7:566
9590 #, no-wrap
9591 msgid "B<IP_NODEFRAG> (since Linux 2.6.36)"
9592 msgstr ""
9593
9594 #. type: Plain text
9595 #: build/C/man7/ip.7:574
9596 msgid ""
9597 "If enabled (argument is nonzero), the reassembly of outgoing packets is "
9598 "disabled in the netfilter layer.  This option is valid only for B<SOCK_RAW> "
9599 "sockets.  The argument is an integer."
9600 msgstr ""
9601
9602 #. type: TP
9603 #: build/C/man7/ip.7:574
9604 #, no-wrap
9605 msgid "B<IP_OPTIONS> (since Linux 2.0)"
9606 msgstr ""
9607
9608 #.  Precisely: 1.3.30
9609 #. type: Plain text
9610 #: build/C/man7/ip.7:603
9611 msgid ""
9612 "Set or get the IP options to be sent with every packet from this socket.  "
9613 "The arguments are a pointer to a memory buffer containing the options and "
9614 "the option length.  The B<setsockopt>(2)  call sets the IP options "
9615 "associated with a socket.  The maximum option size for IPv4 is 40 bytes.  "
9616 "See RFC\\ 791 for the allowed options.  When the initial connection request "
9617 "packet for a B<SOCK_STREAM> socket contains IP options, the IP options will "
9618 "be set automatically to the options from the initial packet with routing "
9619 "headers reversed.  Incoming packets are not allowed to change options after "
9620 "the connection is established.  The processing of all incoming source "
9621 "routing options is disabled by default and can be enabled by using the "
9622 "I<accept_source_route> I</proc> interface.  Other options like timestamps "
9623 "are still handled.  For datagram sockets, IP options can be only set by the "
9624 "local user.  Calling B<getsockopt>(2)  with B<IP_OPTIONS> puts the current "
9625 "IP options used for sending into the supplied buffer."
9626 msgstr ""
9627
9628 #. type: TP
9629 #: build/C/man7/ip.7:603
9630 #, no-wrap
9631 msgid "B<IP_PKTINFO> (since Linux 2.2)"
9632 msgstr ""
9633
9634 #.  Precisely: 2.1.68
9635 #. type: Plain text
9636 #: build/C/man7/ip.7:620
9637 msgid ""
9638 "Pass an B<IP_PKTINFO> ancillary message that contains a I<pktinfo> structure "
9639 "that supplies some information about the incoming packet.  This only works "
9640 "for datagram oriented sockets.  The argument is a flag that tells the socket "
9641 "whether the B<IP_PKTINFO> message should be passed or not.  The message "
9642 "itself can only be sent/retrieved as control message with a packet using "
9643 "B<recvmsg>(2)  or B<sendmsg>(2)."
9644 msgstr ""
9645
9646 #. type: Plain text
9647 #: build/C/man7/ip.7:629
9648 #, no-wrap
9649 msgid ""
9650 "struct in_pktinfo {\n"
9651 "    unsigned int   ipi_ifindex;  /* Interface index */\n"
9652 "    struct in_addr ipi_spec_dst; /* Local address */\n"
9653 "    struct in_addr ipi_addr;     /* Header Destination\n"
9654 "                                    address */\n"
9655 "};\n"
9656 msgstr ""
9657
9658 #.  FIXME elaborate on that.
9659 #.  This field is grossly misnamed
9660 #. type: Plain text
9661 #: build/C/man7/ip.7:654
9662 msgid ""
9663 "I<ipi_ifindex> is the unique index of the interface the packet was received "
9664 "on.  I<ipi_spec_dst> is the local address of the packet and I<ipi_addr> is "
9665 "the destination address in the packet header.  If B<IP_PKTINFO> is passed to "
9666 "B<sendmsg>(2)  and I<ipi_spec_dst> is not zero, then it is used as the local "
9667 "source address for the routing table lookup and for setting up IP source "
9668 "route options.  When I<ipi_ifindex> is not zero, the primary local address "
9669 "of the interface specified by the index overwrites I<ipi_spec_dst> for the "
9670 "routing table lookup."
9671 msgstr ""
9672
9673 #. type: TP
9674 #: build/C/man7/ip.7:654
9675 #, no-wrap
9676 msgid "B<IP_RECVERR> (since Linux 2.2)"
9677 msgstr ""
9678
9679 #.  Precisely: 2.1.15
9680 #.  or SOL_IP on Linux
9681 #. type: Plain text
9682 #: build/C/man7/ip.7:676
9683 msgid ""
9684 "Enable extended reliable error message passing.  When enabled on a datagram "
9685 "socket, all generated errors will be queued in a per-socket error queue.  "
9686 "When the user receives an error from a socket operation, the errors can be "
9687 "received by calling B<recvmsg>(2)  with the B<MSG_ERRQUEUE> flag set.  The "
9688 "I<sock_extended_err> structure describing the error will be passed in an "
9689 "ancillary message with the type B<IP_RECVERR> and the level B<IPPROTO_IP>.  "
9690 "This is useful for reliable error handling on unconnected sockets.  The "
9691 "received data portion of the error queue contains the error packet."
9692 msgstr ""
9693
9694 #. type: Plain text
9695 #: build/C/man7/ip.7:682
9696 msgid "The B<IP_RECVERR> control message contains a I<sock_extended_err> structure:"
9697 msgstr ""
9698
9699 #. type: Plain text
9700 #: build/C/man7/ip.7:690
9701 #, no-wrap
9702 msgid ""
9703 "#define SO_EE_ORIGIN_NONE    0\n"
9704 "#define SO_EE_ORIGIN_LOCAL   1\n"
9705 "#define SO_EE_ORIGIN_ICMP    2\n"
9706 "#define SO_EE_ORIGIN_ICMP6   3\n"
9707 msgstr ""
9708
9709 #. type: Plain text
9710 #: build/C/man7/ip.7:701
9711 #, no-wrap
9712 msgid ""
9713 "struct sock_extended_err {\n"
9714 "    uint32_t ee_errno;   /* error number */\n"
9715 "    uint8_t  ee_origin;  /* where the error originated */\n"
9716 "    uint8_t  ee_type;    /* type */\n"
9717 "    uint8_t  ee_code;    /* code */\n"
9718 "    uint8_t  ee_pad;\n"
9719 "    uint32_t ee_info;    /* additional information */\n"
9720 "    uint32_t ee_data;    /* other data */\n"
9721 "    /* More data may follow */\n"
9722 "};\n"
9723 msgstr ""
9724
9725 #. type: Plain text
9726 #: build/C/man7/ip.7:703
9727 #, no-wrap
9728 msgid "struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);\n"
9729 msgstr ""
9730
9731 #. type: Plain text
9732 #: build/C/man7/ip.7:726
9733 msgid ""
9734 "I<ee_errno> contains the I<errno> number of the queued error.  I<ee_origin> "
9735 "is the origin code of where the error originated.  The other fields are "
9736 "protocol-specific.  The macro B<SO_EE_OFFENDER> returns a pointer to the "
9737 "address of the network object where the error originated from given a "
9738 "pointer to the ancillary message.  If this address is not known, the "
9739 "I<sa_family> member of the I<sockaddr> contains B<AF_UNSPEC> and the other "
9740 "fields of the I<sockaddr> are undefined."
9741 msgstr ""
9742
9743 #.  FIXME . Is it a good idea to document that? It is a dubious feature.
9744 #.  On
9745 #.  .B SOCK_STREAM
9746 #.  sockets,
9747 #.  .B IP_RECVERR
9748 #.  has slightly different semantics. Instead of
9749 #.  saving the errors for the next timeout, it passes all incoming
9750 #.  errors immediately to the user.
9751 #.  This might be useful for very short-lived TCP connections which
9752 #.  need fast error handling. Use this option with care:
9753 #.  it makes TCP unreliable
9754 #.  by not allowing it to recover properly from routing
9755 #.  shifts and other normal
9756 #.  conditions and breaks the protocol specification.
9757 #. type: Plain text
9758 #: build/C/man7/ip.7:785
9759 msgid ""
9760 "IP uses the I<sock_extended_err> structure as follows: I<ee_origin> is set "
9761 "to B<SO_EE_ORIGIN_ICMP> for errors received as an ICMP packet, or "
9762 "B<SO_EE_ORIGIN_LOCAL> for locally generated errors.  Unknown values should "
9763 "be ignored.  I<ee_type> and I<ee_code> are set from the type and code fields "
9764 "of the ICMP header.  I<ee_info> contains the discovered MTU for B<EMSGSIZE> "
9765 "errors.  The message also contains the I<sockaddr_in of the node> caused the "
9766 "error, which can be accessed with the B<SO_EE_OFFENDER> macro.  The "
9767 "I<sin_family> field of the B<SO_EE_OFFENDER> address is B<AF_UNSPEC> when "
9768 "the source was unknown.  When the error originated from the network, all IP "
9769 "options (B<IP_OPTIONS>, B<IP_TTL>, etc.) enabled on the socket and contained "
9770 "in the error packet are passed as control messages.  The payload of the "
9771 "packet causing the error is returned as normal payload.  Note that TCP has "
9772 "no error queue; B<MSG_ERRQUEUE> is not permitted on B<SOCK_STREAM> sockets.  "
9773 "B<IP_RECVERR> is valid for TCP, but all errors are returned by socket "
9774 "function return or B<SO_ERROR> only."
9775 msgstr ""
9776
9777 #. type: Plain text
9778 #: build/C/man7/ip.7:790
9779 msgid ""
9780 "For raw sockets, B<IP_RECVERR> enables passing of all received ICMP errors "
9781 "to the application, otherwise errors are only reported on connected sockets"
9782 msgstr ""
9783
9784 #. type: Plain text
9785 #: build/C/man7/ip.7:794
9786 msgid ""
9787 "It sets or retrieves an integer boolean flag.  B<IP_RECVERR> defaults to "
9788 "off."
9789 msgstr ""
9790
9791 #. type: TP
9792 #: build/C/man7/ip.7:794
9793 #, no-wrap
9794 msgid "B<IP_RECVOPTS> (since Linux 2.2)"
9795 msgstr ""
9796
9797 #.  Precisely: 2.1.15
9798 #. type: Plain text
9799 #: build/C/man7/ip.7:805
9800 msgid ""
9801 "Pass all incoming IP options to the user in a B<IP_OPTIONS> control "
9802 "message.  The routing header and other options are already filled in for the "
9803 "local host.  Not supported for B<SOCK_STREAM> sockets."
9804 msgstr ""
9805
9806 #. type: TP
9807 #: build/C/man7/ip.7:805
9808 #, no-wrap
9809 msgid "B<IP_RECVORIGDSTADDR> (since Linux 2.6.29)"
9810 msgstr ""
9811
9812 #.  commit e8b2dfe9b4501ed0047459b2756ba26e5a940a69
9813 #. type: Plain text
9814 #: build/C/man7/ip.7:816
9815 msgid ""
9816 "This boolean option enables the B<IP_ORIGDSTADDR> ancillary message in "
9817 "B<recvmsg>(2), in which the kernel returns the original destination address "
9818 "of the datagram being received.  The ancillary message contains a I<struct "
9819 "sockaddr_in>."
9820 msgstr ""
9821
9822 #. type: TP
9823 #: build/C/man7/ip.7:816
9824 #, no-wrap
9825 msgid "B<IP_RECVTOS> (since Linux 2.2)"
9826 msgstr ""
9827
9828 #.  Precisely: 2.1.68
9829 #. type: Plain text
9830 #: build/C/man7/ip.7:825
9831 msgid ""
9832 "If enabled, the B<IP_TOS> ancillary message is passed with incoming "
9833 "packets.  It contains a byte which specifies the Type of Service/Precedence "
9834 "field of the packet header.  Expects a boolean integer flag."
9835 msgstr ""
9836
9837 #. type: TP
9838 #: build/C/man7/ip.7:825
9839 #, no-wrap
9840 msgid "B<IP_RECVTTL> (since Linux 2.2)"
9841 msgstr ""
9842
9843 #.  Precisely: 2.1.68
9844 #. type: Plain text
9845 #: build/C/man7/ip.7:835
9846 msgid ""
9847 "When this flag is set, pass a B<IP_TTL> control message with the time to "
9848 "live field of the received packet as a byte.  Not supported for "
9849 "B<SOCK_STREAM> sockets."
9850 msgstr ""
9851
9852 #. type: TP
9853 #: build/C/man7/ip.7:835
9854 #, no-wrap
9855 msgid "B<IP_RETOPTS> (since Linux 2.2)"
9856 msgstr ""
9857
9858 #.  Precisely: 2.1.15
9859 #. type: Plain text
9860 #: build/C/man7/ip.7:842
9861 msgid ""
9862 "Identical to B<IP_RECVOPTS>, but returns raw unprocessed options with "
9863 "timestamp and route record options not filled in for this hop."
9864 msgstr ""
9865
9866 #. type: TP
9867 #: build/C/man7/ip.7:842
9868 #, no-wrap
9869 msgid "B<IP_ROUTER_ALERT> (since Linux 2.2)"
9870 msgstr ""
9871
9872 #.  Precisely: 2.1.68
9873 #. type: Plain text
9874 #: build/C/man7/ip.7:854
9875 msgid ""
9876 "Pass all to-be forwarded packets with the IP Router Alert option set to this "
9877 "socket.  Only valid for raw sockets.  This is useful, for instance, for "
9878 "user-space RSVP daemons.  The tapped packets are not forwarded by the "
9879 "kernel; it is the user's responsibility to send them out again.  Socket "
9880 "binding is ignored, such packets are only filtered by protocol.  Expects an "
9881 "integer flag."
9882 msgstr ""
9883
9884 #. type: TP
9885 #: build/C/man7/ip.7:854
9886 #, no-wrap
9887 msgid "B<IP_TOS> (since Linux 1.0)"
9888 msgstr ""
9889
9890 #.  FIXME elaborate on this
9891 #.  Needs CAP_NET_ADMIN
9892 #.  Boolean
9893 #.  Since Linux 2.6.27
9894 #.  Author: KOVACS Krisztian <hidden@sch.bme.hu>
9895 #.  http://lwn.net/Articles/252545/
9896 #. type: Plain text
9897 #: build/C/man7/ip.7:888
9898 msgid ""
9899 "Set or receive the Type-Of-Service (TOS) field that is sent with every IP "
9900 "packet originating from this socket.  It is used to prioritize packets on "
9901 "the network.  TOS is a byte.  There are some standard TOS flags defined: "
9902 "B<IPTOS_LOWDELAY> to minimize delays for interactive traffic, "
9903 "B<IPTOS_THROUGHPUT> to optimize throughput, B<IPTOS_RELIABILITY> to optimize "
9904 "for reliability, B<IPTOS_MINCOST> should be used for \"filler data\" where "
9905 "slow transmission doesn't matter.  At most one of these TOS values can be "
9906 "specified.  Other bits are invalid and shall be cleared.  Linux sends "
9907 "B<IPTOS_LOWDELAY> datagrams first by default, but the exact behavior depends "
9908 "on the configured queueing discipline.  Some high priority levels may "
9909 "require superuser privileges (the B<CAP_NET_ADMIN> capability).  The "
9910 "priority can also be set in a protocol independent way by the "
9911 "(B<SOL_SOCKET>, B<SO_PRIORITY>)  socket option (see B<socket>(7))."
9912 msgstr ""
9913
9914 #. type: TP
9915 #: build/C/man7/ip.7:888
9916 #, no-wrap
9917 msgid "B<IP_TRANSPARENT> (since Linux 2.6.24)"
9918 msgstr ""
9919
9920 #.  commit f5715aea4564f233767ea1d944b2637a5fd7cd2e
9921 #.      This patch introduces the IP_TRANSPARENT socket option: enabling that
9922 #.      will make the IPv4 routing omit the non-local source address check on
9923 #.      output. Setting IP_TRANSPARENT requires NET_ADMIN capability.
9924 #.  http://lwn.net/Articles/252545/
9925 #. type: Plain text
9926 #: build/C/man7/ip.7:908
9927 msgid ""
9928 "Setting this boolean option enables transparent proxying on this socket.  "
9929 "This socket option allows the calling application to bind to a nonlocal IP "
9930 "address and operate both as a client and a server with the foreign address "
9931 "as the local endpoint.  NOTE: this requires that routing be set up in a way "
9932 "that packets going to the foreign address are routed through the TProxy box "
9933 "(i.e., the system hosting the application that employs the B<IP_TRANSPARENT> "
9934 "socket option).  Enabling this socket option requires superuser privileges "
9935 "(the B<CAP_NET_ADMIN> capability)."
9936 msgstr ""
9937
9938 #. type: Plain text
9939 #: build/C/man7/ip.7:911
9940 msgid ""
9941 "TProxy redirection with the iptables TPROXY target also requires that this "
9942 "option be set on the redirected socket."
9943 msgstr ""
9944
9945 #. type: TP
9946 #: build/C/man7/ip.7:911
9947 #, no-wrap
9948 msgid "B<IP_TTL> (since Linux 1.0)"
9949 msgstr ""
9950
9951 #. type: Plain text
9952 #: build/C/man7/ip.7:915
9953 msgid ""
9954 "Set or retrieve the current time-to-live field that is used in every packet "
9955 "sent from this socket."
9956 msgstr ""
9957
9958 #. type: TP
9959 #: build/C/man7/ip.7:915
9960 #, no-wrap
9961 msgid "B<IP_UNBLOCK_SOURCE> (since Linux 2.4.22 / 2.5.68)"
9962 msgstr ""
9963
9964 #. type: Plain text
9965 #: build/C/man7/ip.7:921
9966 msgid ""
9967 "Unblock previously blocked multicast source.  Returns B<EADDRNOTAVAIL> when "
9968 "given source is not being blocked."
9969 msgstr ""
9970
9971 #.  FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented:
9972 #.      ip_queue_maxlen
9973 #.      ip_conntrack_max
9974 #. type: Plain text
9975 #: build/C/man7/ip.7:942
9976 msgid ""
9977 "The IP protocol supports a set of I</proc> interfaces to configure some "
9978 "global parameters.  The parameters can be accessed by reading or writing "
9979 "files in the directory I</proc/sys/net/ipv4/>.  Interfaces described as "
9980 "I<Boolean> take an integer value, with a nonzero value (\"true\") meaning "
9981 "that the corresponding option is enabled, and a zero value (\"false\")  "
9982 "meaning that the option is disabled."
9983 msgstr ""
9984
9985 #. type: TP
9986 #: build/C/man7/ip.7:942
9987 #, no-wrap
9988 msgid "I<ip_always_defrag> (Boolean; since Linux 2.2.13)"
9989 msgstr ""
9990
9991 #. type: Plain text
9992 #: build/C/man7/ip.7:948
9993 msgid ""
9994 "[New with kernel 2.2.13; in earlier kernel versions this feature was "
9995 "controlled at compile time by the B<CONFIG_IP_ALWAYS_DEFRAG> option; this "
9996 "option is not present in 2.4.x and later]"
9997 msgstr ""
9998
9999 #. type: Plain text
10000 #: build/C/man7/ip.7:955
10001 msgid ""
10002 "When this boolean flag is enabled (not equal 0), incoming fragments (parts "
10003 "of IP packets that arose when some host between origin and destination "
10004 "decided that the packets were too large and cut them into pieces) will be "
10005 "reassembled (defragmented) before being processed, even if they are about to "
10006 "be forwarded."
10007 msgstr ""
10008
10009 #. type: Plain text
10010 #: build/C/man7/ip.7:962
10011 msgid ""
10012 "Only enable if running either a firewall that is the sole link to your "
10013 "network or a transparent proxy; never ever use it for a normal router or "
10014 "host.  Otherwise, fragmented communication can be disturbed if the fragments "
10015 "travel over different links.  Defragmentation also has a large memory and "
10016 "CPU time cost."
10017 msgstr ""
10018
10019 #. type: Plain text
10020 #: build/C/man7/ip.7:966
10021 msgid ""
10022 "This is automagically turned on when masquerading or transparent proxying "
10023 "are configured."
10024 msgstr ""
10025
10026 #. type: TP
10027 #: build/C/man7/ip.7:966
10028 #, no-wrap
10029 msgid "I<ip_autoconfig> (since Linux 2.2 to 2.6.17)"
10030 msgstr ""
10031
10032 #.  Precisely: since 2.1.68
10033 #.  FIXME document ip_autoconfig
10034 #. type: Plain text
10035 #: build/C/man7/ip.7:972
10036 msgid "Not documented."
10037 msgstr ""
10038
10039 #. type: TP
10040 #: build/C/man7/ip.7:972
10041 #, no-wrap
10042 msgid "I<ip_default_ttl> (integer; default: 64; since Linux 2.2)"
10043 msgstr ""
10044
10045 #.  Precisely: 2.1.15
10046 #. type: Plain text
10047 #: build/C/man7/ip.7:980
10048 msgid ""
10049 "Set the default time-to-live value of outgoing packets.  This can be changed "
10050 "per socket with the B<IP_TTL> option."
10051 msgstr ""
10052
10053 #. type: TP
10054 #: build/C/man7/ip.7:980
10055 #, no-wrap
10056 msgid "I<ip_dynaddr> (Boolean; default: disabled; since Linux 2.0.31)"
10057 msgstr ""
10058
10059 #. type: Plain text
10060 #: build/C/man7/ip.7:987
10061 msgid ""
10062 "Enable dynamic socket address and masquerading entry rewriting on interface "
10063 "address change.  This is useful for dialup interface with changing IP "
10064 "addresses.  0 means no rewriting, 1 turns it on and 2 enables verbose mode."
10065 msgstr ""
10066
10067 #. type: TP
10068 #: build/C/man7/ip.7:987
10069 #, no-wrap
10070 msgid "I<ip_forward> (Boolean; default: disabled; since Linux 1.2)"
10071 msgstr ""
10072
10073 #. type: Plain text
10074 #: build/C/man7/ip.7:992
10075 msgid ""
10076 "Enable IP forwarding with a boolean flag.  IP forwarding can be also set on "
10077 "a per-interface basis."
10078 msgstr ""
10079
10080 #. type: TP
10081 #: build/C/man7/ip.7:992
10082 #, no-wrap
10083 msgid "I<ip_local_port_range> (since Linux 2.2)"
10084 msgstr ""
10085
10086 #.  Precisely: since 2.1.68
10087 #. type: Plain text
10088 #: build/C/man7/ip.7:1000
10089 msgid ""
10090 "This file contains two integers that define the default local port range "
10091 "allocated to sockets that are not explicitly bound to a port number\\(emthat "
10092 "is, the range used for I<ephemeral ports>.  An ephemeral port is allocated "
10093 "to a socket in the following circumstances:"
10094 msgstr ""
10095
10096 #. type: Plain text
10097 #: build/C/man7/ip.7:1004
10098 msgid ""
10099 "the port number in a socket address is specified as 0 when calling "
10100 "B<bind>(2);"
10101 msgstr ""
10102
10103 #. type: Plain text
10104 #: build/C/man7/ip.7:1007
10105 msgid "B<listen>(2)  is called on a stream socket that was not previously bound;"
10106 msgstr ""
10107
10108 #. type: Plain text
10109 #: build/C/man7/ip.7:1010
10110 msgid "B<connect>(2)  was called on a socket that was not not previously bound;"
10111 msgstr ""
10112
10113 #. type: Plain text
10114 #: build/C/man7/ip.7:1013
10115 msgid ""
10116 "B<sendto>(2)  is called on a datagram socket that was not not previously "
10117 "bound."
10118 msgstr ""
10119
10120 #. type: Plain text
10121 #: build/C/man7/ip.7:1020
10122 msgid ""
10123 "Allocation of ephemeral ports starts with the first number in "
10124 "I<ip_local_port_range> and ends with the second number.  If the range of "
10125 "ephemeral ports is exhausted, then the relevant system call returns an error "
10126 "(but see BUGS)"
10127 msgstr ""
10128
10129 #. type: Plain text
10130 #: build/C/man7/ip.7:1031
10131 msgid ""
10132 "Note that the port range in I<ip_local_port_range> should not conflict with "
10133 "the ports used by masquerading (although the case is handled).  Also, "
10134 "arbitrary choices may cause problems with some firewall packet filters that "
10135 "make assumptions about the local ports in use.  The first number should be "
10136 "at least greater than 1024, or better, greater than 4096, to avoid clashes "
10137 "with well known ports and to minimize firewall problems."
10138 msgstr ""
10139
10140 #. type: TP
10141 #: build/C/man7/ip.7:1031
10142 #, no-wrap
10143 msgid "I<ip_no_pmtu_disc> (Boolean; default: disabled; since Linux 2.2)"
10144 msgstr ""
10145
10146 #.  Precisely: 2.1.15
10147 #
10148 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10149 #. type: Plain text
10150 #: build/C/man7/ip.7:1043
10151 msgid ""
10152 "If enabled, don't do Path MTU Discovery for TCP sockets by default.  Path "
10153 "MTU discovery may fail if misconfigured firewalls (that drop all ICMP "
10154 "packets) or misconfigured interfaces (e.g., a point-to-point link where the "
10155 "both ends don't agree on the MTU) are on the path.  It is better to fix the "
10156 "broken routers on the path than to turn off Path MTU Discovery globally, "
10157 "because not doing it incurs a high cost to the network."
10158 msgstr ""
10159
10160 #. type: TP
10161 #: build/C/man7/ip.7:1043
10162 #, no-wrap
10163 msgid "I<ip_nonlocal_bind> (Boolean; default: disabled; since Linux 2.4)"
10164 msgstr ""
10165
10166 #.  Precisely: patch-2.4.0-test10
10167 #
10168 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10169 #. type: Plain text
10170 #: build/C/man7/ip.7:1052
10171 msgid ""
10172 "If set, allows processes to B<bind>(2)  to nonlocal IP addresses, which can "
10173 "be quite useful, but may break some applications."
10174 msgstr ""
10175
10176 #. type: TP
10177 #: build/C/man7/ip.7:1052
10178 #, no-wrap
10179 msgid "I<ip6frag_time> (integer; default: 30)"
10180 msgstr ""
10181
10182 #
10183 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10184 #. type: Plain text
10185 #: build/C/man7/ip.7:1057
10186 msgid "Time in seconds to keep an IPv6 fragment in memory."
10187 msgstr ""
10188
10189 #. type: TP
10190 #: build/C/man7/ip.7:1057
10191 #, no-wrap
10192 msgid "I<ip6frag_secret_interval> (integer; default: 600)"
10193 msgstr ""
10194
10195 #. type: Plain text
10196 #: build/C/man7/ip.7:1061
10197 msgid ""
10198 "Regeneration interval (in seconds) of the hash secret (or lifetime for the "
10199 "hash secret) for IPv6 fragments."
10200 msgstr ""
10201
10202 #. type: TP
10203 #: build/C/man7/ip.7:1061
10204 #, no-wrap
10205 msgid "I<ipfrag_high_thresh> (integer), I<ipfrag_low_thresh> (integer)"
10206 msgstr ""
10207
10208 #. type: Plain text
10209 #: build/C/man7/ip.7:1068
10210 msgid ""
10211 "If the amount of queued IP fragments reaches I<ipfrag_high_thresh>, the "
10212 "queue is pruned down to I<ipfrag_low_thresh>.  Contains an integer with the "
10213 "number of bytes."
10214 msgstr ""
10215
10216 #. type: TP
10217 #: build/C/man7/ip.7:1068
10218 #, no-wrap
10219 msgid "I<neigh/*>"
10220 msgstr ""
10221
10222 #.  FIXME Document the conf/*/* interfaces
10223 #.  FIXME Document the route/* interfaces
10224 #.  FIXME document them all
10225 #. type: Plain text
10226 #: build/C/man7/ip.7:1075
10227 msgid "See B<arp>(7)."
10228 msgstr ""
10229
10230 #.  2006-04-02, mtk
10231 #.  commented out the following because ipchains is obsolete
10232 #.  .PP
10233 #.  The ioctls to configure firewalling are documented in
10234 #.  .BR ipfw (4)
10235 #.  from the
10236 #.  .B ipchains
10237 #.  package.
10238 #. type: Plain text
10239 #: build/C/man7/ip.7:1088
10240 msgid "All ioctls described in B<socket>(7)  apply to B<ip>."
10241 msgstr ""
10242
10243 #.  FIXME Add a discussion of multicasting
10244 #. type: Plain text
10245 #: build/C/man7/ip.7:1092
10246 msgid ""
10247 "Ioctls to configure generic device parameters are described in "
10248 "B<netdevice>(7)."
10249 msgstr ""
10250
10251 #. type: Plain text
10252 #: build/C/man7/ip.7:1112
10253 msgid ""
10254 "The user tried to execute an operation without the necessary permissions.  "
10255 "These include: sending a packet to a broadcast address without having the "
10256 "B<SO_BROADCAST> flag set; sending a packet via a I<prohibit> route; "
10257 "modifying firewall settings without superuser privileges (the "
10258 "B<CAP_NET_ADMIN> capability); binding to a privileged port without superuser "
10259 "privileges (the B<CAP_NET_BIND_SERVICE> capability)."
10260 msgstr ""
10261
10262 #. type: Plain text
10263 #: build/C/man7/ip.7:1125
10264 msgid "An connection operation on a nonblocking socket is already in progress."
10265 msgstr ""
10266
10267 #. type: Plain text
10268 #: build/C/man7/ip.7:1134
10269 msgid ""
10270 "No valid routing table entry matches the destination address.  This error "
10271 "can be caused by a ICMP message from a remote router or for the local "
10272 "routing table."
10273 msgstr ""
10274
10275 #. type: Plain text
10276 #: build/C/man7/ip.7:1140
10277 msgid ""
10278 "Invalid argument passed.  For send operations this can be caused by sending "
10279 "to a I<blackhole> route."
10280 msgstr ""
10281
10282 #. type: Plain text
10283 #: build/C/man7/ip.7:1147
10284 msgid "Datagram is bigger than an MTU on the path and it cannot be fragmented."
10285 msgstr ""
10286
10287 #. type: TP
10288 #: build/C/man7/ip.7:1147
10289 #, no-wrap
10290 msgid "B<ENOBUFS>, B<ENOMEM>"
10291 msgstr ""
10292
10293 #. type: Plain text
10294 #: build/C/man7/ip.7:1152
10295 msgid ""
10296 "Not enough free memory.  This often means that the memory allocation is "
10297 "limited by the socket buffer limits, not by the system memory, but this is "
10298 "not 100% consistent."
10299 msgstr ""
10300
10301 #. type: Plain text
10302 #: build/C/man7/ip.7:1170
10303 msgid ""
10304 "User doesn't have permission to set high priority, change configuration, or "
10305 "send signals to the requested process or group."
10306 msgstr ""
10307
10308 #. type: Plain text
10309 #: build/C/man7/ip.7:1176
10310 msgid "The socket is not configured or an unknown socket type was requested."
10311 msgstr ""
10312
10313 #. type: Plain text
10314 #: build/C/man7/ip.7:1183
10315 msgid ""
10316 "Other errors may be generated by the overlaying protocols; see B<tcp>(7), "
10317 "B<raw>(7), B<udp>(7)  and B<socket>(7)."
10318 msgstr ""
10319
10320 #.  IP_PASSSEC is Linux-specific
10321 #.  IP_XFRM_POLICY is Linux-specific
10322 #.  IP_IPSEC_POLICY is a nonstandard extension, also present on some BSDs
10323 #. type: Plain text
10324 #: build/C/man7/ip.7:1198
10325 msgid ""
10326 "B<IP_FREEBIND>, B<IP_MSFILTER>, B<IP_MTU>, B<IP_MTU_DISCOVER>, "
10327 "B<IP_RECVORIGDSTADDR>, B<IP_PKTINFO>, B<IP_RECVERR>, B<IP_ROUTER_ALERT>, and "
10328 "B<IP_TRANSPARENT> are Linux-specific."
10329 msgstr ""
10330
10331 #. type: Plain text
10332 #: build/C/man7/ip.7:1207
10333 msgid ""
10334 "Be very careful with the B<SO_BROADCAST> option - it is not privileged in "
10335 "Linux.  It is easy to overload the network with careless broadcasts.  For "
10336 "new application protocols it is better to use a multicast group instead of "
10337 "broadcasting.  Broadcasting is discouraged."
10338 msgstr ""
10339
10340 #. type: Plain text
10341 #: build/C/man7/ip.7:1217
10342 msgid ""
10343 "Some other BSD sockets implementations provide B<IP_RCVDSTADDR> and "
10344 "B<IP_RECVIF> socket options to get the destination address and the interface "
10345 "of received datagrams.  Linux has the more general B<IP_PKTINFO> for the "
10346 "same task."
10347 msgstr ""
10348
10349 #. type: Plain text
10350 #: build/C/man7/ip.7:1226
10351 msgid ""
10352 "Some BSD sockets implementations also provide an B<IP_RECVTTL> option, but "
10353 "an ancillary message with type B<IP_RECVTTL> is passed with the incoming "
10354 "packet.  This is different from the B<IP_TTL> option used in Linux."
10355 msgstr ""
10356
10357 #. type: Plain text
10358 #: build/C/man7/ip.7:1232
10359 msgid ""
10360 "Using B<SOL_IP> socket options level isn't portable, BSD-based stacks use "
10361 "B<IPPROTO_IP> level."
10362 msgstr ""
10363
10364 #. type: Plain text
10365 #: build/C/man7/ip.7:1245
10366 msgid ""
10367 "For compatibility with Linux 2.0, the obsolete B<socket(AF_INET, "
10368 "SOCK_PACKET, >I<protocol>B<)> syntax is still supported to open a "
10369 "B<packet>(7)  socket.  This is deprecated and should be replaced by "
10370 "B<socket(AF_PACKET, SOCK_RAW, >I<protocol>B<)> instead.  The main difference "
10371 "is the new I<sockaddr_ll> address structure for generic link layer "
10372 "information instead of the old B<sockaddr_pkt>."
10373 msgstr ""
10374
10375 #. type: Plain text
10376 #: build/C/man7/ip.7:1255
10377 msgid ""
10378 "The error used to diagnose exhaustion of the ephemeral port range differs "
10379 "across the various system calls (B<connect>(2), B<bind>(2), B<listen>(2), "
10380 "B<sendto>(2))  that can assign ephemeral ports."
10381 msgstr ""
10382
10383 #.  .PP
10384 #.  Some versions of glibc forget to declare
10385 #.  .IR in_pktinfo .
10386 #.  Workaround currently is to copy it into your program from this man page.
10387 #. type: Plain text
10388 #: build/C/man7/ip.7:1262
10389 msgid ""
10390 "The ioctls to configure IP-specific interface options and ARP tables are not "
10391 "described."
10392 msgstr ""
10393
10394 #.  .SH AUTHORS
10395 #.  This man page was written by Andi Kleen.
10396 #. type: Plain text
10397 #: build/C/man7/ip.7:1272
10398 msgid ""
10399 "Receiving the original destination address with B<MSG_ERRQUEUE> in "
10400 "I<msg_name> by B<recvmsg>(2)  does not work in some 2.2 kernels."
10401 msgstr ""
10402
10403 #. type: Plain text
10404 #: build/C/man7/ip.7:1285
10405 msgid ""
10406 "B<recvmsg>(2), B<sendmsg>(2), B<byteorder>(3), B<ipfw>(4), "
10407 "B<capabilities>(7), B<icmp>(7), B<ipv6>(7), B<netlink>(7), B<raw>(7), "
10408 "B<socket>(7), B<tcp>(7), B<udp>(7)"
10409 msgstr ""
10410
10411 #.  FIXME autobind INADDR REUSEADDR
10412 #. type: Plain text
10413 #: build/C/man7/ip.7:1290
10414 msgid ""
10415 "RFC\\ 791 for the original IP specification.  RFC\\ 1122 for the IPv4 host "
10416 "requirements.  RFC\\ 1812 for the IPv4 router requirements."
10417 msgstr ""
10418
10419 #. type: TH
10420 #: build/C/man7/ipv6.7:86
10421 #, no-wrap
10422 msgid "IPV6"
10423 msgstr ""
10424
10425 #. type: TH
10426 #: build/C/man7/ipv6.7:86
10427 #, no-wrap
10428 msgid "2012-12-16"
10429 msgstr ""
10430
10431 #. type: Plain text
10432 #: build/C/man7/ipv6.7:89
10433 msgid "ipv6 - Linux IPv6 protocol implementation"
10434 msgstr ""
10435
10436 #. type: Plain text
10437 #: build/C/man7/ipv6.7:95
10438 msgid "I<tcp6_socket>B< = socket(AF_INET6, SOCK_STREAM, 0);>"
10439 msgstr ""
10440
10441 #. type: Plain text
10442 #: build/C/man7/ipv6.7:97
10443 msgid "I<raw6_socket>B< = socket(AF_INET6, SOCK_RAW, >I<protocol>B<);>"
10444 msgstr ""
10445
10446 #. type: Plain text
10447 #: build/C/man7/ipv6.7:99
10448 msgid "I<udp6_socket>B< = socket(AF_INET6, SOCK_DGRAM, >I<protocol>B<);>"
10449 msgstr ""
10450
10451 #. type: Plain text
10452 #: build/C/man7/ipv6.7:106
10453 msgid ""
10454 "Linux 2.2 optionally implements the Internet Protocol, version 6.  This man "
10455 "page contains a description of the IPv6 basic API as implemented by the "
10456 "Linux kernel and glibc 2.1.  The interface is based on the BSD sockets "
10457 "interface; see B<socket>(7)."
10458 msgstr ""
10459
10460 #. type: Plain text
10461 #: build/C/man7/ipv6.7:111
10462 msgid ""
10463 "The IPv6 API aims to be mostly compatible with the IPv4 API (see B<ip>(7)).  "
10464 "Only differences are described in this man page."
10465 msgstr ""
10466
10467 #. type: Plain text
10468 #: build/C/man7/ipv6.7:123
10469 msgid ""
10470 "To bind an B<AF_INET6> socket to any process, the local address should be "
10471 "copied from the I<in6addr_any> variable which has I<in6_addr> type.  In "
10472 "static initializations, B<IN6ADDR_ANY_INIT> may also be used, which expands "
10473 "to a constant expression.  Both of them are in network byte order."
10474 msgstr ""
10475
10476 #. type: Plain text
10477 #: build/C/man7/ipv6.7:130
10478 msgid ""
10479 "The IPv6 loopback address (::1) is available in the global "
10480 "I<in6addr_loopback> variable.  For initializations, B<IN6ADDR_LOOPBACK_INIT> "
10481 "should be used."
10482 msgstr ""
10483
10484 #. type: Plain text
10485 #: build/C/man7/ipv6.7:137
10486 msgid ""
10487 "IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 "
10488 "address type; thus a program only needs to support this API type to support "
10489 "both protocols.  This is handled transparently by the address handling "
10490 "functions in the C library."
10491 msgstr ""
10492
10493 #. type: Plain text
10494 #: build/C/man7/ipv6.7:142
10495 msgid ""
10496 "IPv4 and IPv6 share the local port space.  When you get an IPv4 connection "
10497 "or packet to a IPv6 socket, its source address will be mapped to v6 and it "
10498 "will be mapped to v6."
10499 msgstr ""
10500
10501 #. type: Plain text
10502 #: build/C/man7/ipv6.7:152
10503 #, no-wrap
10504 msgid ""
10505 "struct sockaddr_in6 {\n"
10506 "    sa_family_t     sin6_family;   /* AF_INET6 */\n"
10507 "    in_port_t       sin6_port;     /* port number */\n"
10508 "    uint32_t        sin6_flowinfo; /* IPv6 flow information */\n"
10509 "    struct in6_addr sin6_addr;     /* IPv6 address */\n"
10510 "    uint32_t        sin6_scope_id; /* Scope ID (new in 2.4) */\n"
10511 "};\n"
10512 msgstr ""
10513
10514 #. type: Plain text
10515 #: build/C/man7/ipv6.7:156
10516 #, no-wrap
10517 msgid ""
10518 "struct in6_addr {\n"
10519 "    unsigned char   s6_addr[16];   /* IPv6 address */\n"
10520 "};\n"
10521 msgstr ""
10522
10523 #. type: Plain text
10524 #: build/C/man7/ipv6.7:178
10525 msgid ""
10526 "I<sin6_family> is always set to B<AF_INET6>; I<sin6_port> is the protocol "
10527 "port (see I<sin_port> in B<ip>(7)); I<sin6_flowinfo> is the IPv6 flow "
10528 "identifier; I<sin6_addr> is the 128-bit IPv6 address.  I<sin6_scope_id> is "
10529 "an ID depending on the scope of the address.  It is new in Linux 2.4.  Linux "
10530 "supports it only for link-local addresses, in that case I<sin6_scope_id> "
10531 "contains the interface index (see B<netdevice>(7))"
10532 msgstr ""
10533
10534 #. type: Plain text
10535 #: build/C/man7/ipv6.7:184
10536 msgid ""
10537 "IPv6 supports several address types: unicast to address a single host, "
10538 "multicast to address a group of hosts, anycast to address the nearest member "
10539 "of a group of hosts (not implemented in Linux), IPv4-on-IPv6 to address a "
10540 "IPv4 host, and other reserved address types."
10541 msgstr ""
10542
10543 #. type: Plain text
10544 #: build/C/man7/ipv6.7:190
10545 msgid ""
10546 "The address notation for IPv6 is a group of 8 4-digit hexadecimal numbers, "
10547 "separated with a \\(aq:\\(aq.  \\&\"::\" stands for a string of 0 bits.  "
10548 "Special addresses are ::1 for loopback and ::FFFF:E<lt>IPv4 addressE<gt> for "
10549 "IPv4-mapped-on-IPv6."
10550 msgstr ""
10551
10552 #. type: Plain text
10553 #: build/C/man7/ipv6.7:192
10554 msgid "The port space of IPv6 is shared with IPv4."
10555 msgstr ""
10556
10557 #. type: Plain text
10558 #: build/C/man7/ipv6.7:200
10559 msgid ""
10560 "IPv6 supports some protocol-specific socket options that can be set with "
10561 "B<setsockopt>(2)  and read with B<getsockopt>(2).  The socket option level "
10562 "for IPv6 is B<IPPROTO_IPV6>.  A boolean integer flag is zero when it is "
10563 "false, otherwise true."
10564 msgstr ""
10565
10566 #. type: TP
10567 #: build/C/man7/ipv6.7:200
10568 #, no-wrap
10569 msgid "B<IPV6_ADDRFORM>"
10570 msgstr ""
10571
10572 #. type: Plain text
10573 #: build/C/man7/ipv6.7:214
10574 msgid ""
10575 "Turn an B<AF_INET6> socket into a socket of a different address family.  "
10576 "Only B<AF_INET> is currently supported for that.  It is allowed only for "
10577 "IPv6 sockets that are connected and bound to a v4-mapped-on-v6 address.  The "
10578 "argument is a pointer to an integer containing B<AF_INET>.  This is useful "
10579 "to pass v4-mapped sockets as file descriptors to programs that don't know "
10580 "how to deal with the IPv6 API."
10581 msgstr ""
10582
10583 #. type: TP
10584 #: build/C/man7/ipv6.7:214
10585 #, no-wrap
10586 msgid "B<IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP>"
10587 msgstr ""
10588
10589 #. type: Plain text
10590 #: build/C/man7/ipv6.7:219
10591 msgid ""
10592 "Control membership in multicast groups.  Argument is a pointer to a I<struct "
10593 "ipv6_mreq>."
10594 msgstr ""
10595
10596 #. type: TP
10597 #: build/C/man7/ipv6.7:219
10598 #, no-wrap
10599 msgid "B<IPV6_MTU>"
10600 msgstr ""
10601
10602 #. type: Plain text
10603 #: build/C/man7/ipv6.7:225
10604 msgid ""
10605 "B<getsockopt>(): Retrieve the current known path MTU of the current socket.  "
10606 "Only valid when the socket has been connected.  Returns an integer."
10607 msgstr ""
10608
10609 #. type: Plain text
10610 #: build/C/man7/ipv6.7:231
10611 msgid ""
10612 "B<setsockopt>(): Set the MTU to be used for the socket.  The MTU is limited "
10613 "by the device MTU or the path MTU when path MTU discovery is enabled.  "
10614 "Argument is a pointer to integer."
10615 msgstr ""
10616
10617 #. type: TP
10618 #: build/C/man7/ipv6.7:231
10619 #, no-wrap
10620 msgid "B<IPV6_MTU_DISCOVER>"
10621 msgstr ""
10622
10623 #. type: Plain text
10624 #: build/C/man7/ipv6.7:239
10625 msgid ""
10626 "Control path-MTU discovery on the socket.  See B<IP_MTU_DISCOVER> in "
10627 "B<ip>(7)  for details."
10628 msgstr ""
10629
10630 #. type: TP
10631 #: build/C/man7/ipv6.7:239
10632 #, no-wrap
10633 msgid "B<IPV6_MULTICAST_HOPS>"
10634 msgstr ""
10635
10636 #. type: Plain text
10637 #: build/C/man7/ipv6.7:246
10638 msgid ""
10639 "Set the multicast hop limit for the socket.  Argument is a pointer to an "
10640 "integer.  -1 in the value means use the route default, otherwise it should "
10641 "be between 0 and 255."
10642 msgstr ""
10643
10644 #. type: TP
10645 #: build/C/man7/ipv6.7:246
10646 #, no-wrap
10647 msgid "B<IPV6_MULTICAST_IF>"
10648 msgstr ""
10649
10650 #. type: Plain text
10651 #: build/C/man7/ipv6.7:257
10652 msgid ""
10653 "Set the device for outgoing multicast packets on the socket.  This is "
10654 "allowed only for B<SOCK_DGRAM> and B<SOCK_RAW> socket.  The argument is a "
10655 "pointer to an interface index (see B<netdevice>(7))  in an integer."
10656 msgstr ""
10657
10658 #. type: TP
10659 #: build/C/man7/ipv6.7:257
10660 #, no-wrap
10661 msgid "B<IPV6_MULTICAST_LOOP>"
10662 msgstr ""
10663
10664 #. type: Plain text
10665 #: build/C/man7/ipv6.7:261
10666 msgid ""
10667 "Control whether the socket sees multicast packets that it has send itself.  "
10668 "Argument is a pointer to boolean."
10669 msgstr ""
10670
10671 #. type: TP
10672 #: build/C/man7/ipv6.7:261
10673 #, no-wrap
10674 msgid "B<IPV6_RECVPKTINFO> (since Linux 2.6.14)"
10675 msgstr ""
10676
10677 #. type: Plain text
10678 #: build/C/man7/ipv6.7:275
10679 msgid ""
10680 "Set delivery of the B<IPV6_PKTINFO> control message on incoming datagrams.  "
10681 "Such control messages contain a I<struct in6_pktinfo>, as per RFC 3542.  "
10682 "Only allowed for B<SOCK_DGRAM> or B<SOCK_RAW> sockets.  Argument is a "
10683 "pointer to a boolean value in an integer."
10684 msgstr ""
10685
10686 #. type: Plain text
10687 #: build/C/man7/ipv6.7:278
10688 #, no-wrap
10689 msgid ""
10690 "B<IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPTS, IPV6_HOPOPTS, IPV6_FLOWINFO, "
10691 "IPV6_HOPLIMIT>\n"
10692 msgstr ""
10693
10694 #. type: Plain text
10695 #: build/C/man7/ipv6.7:303
10696 msgid ""
10697 "Set delivery of control messages for incoming datagrams containing extension "
10698 "headers from the received packet.  B<IPV6_RTHDR> delivers the routing "
10699 "header, B<IPV6_AUTHHDR> delivers the authentication header, B<IPV6_DSTOPTS> "
10700 "delivers the destination options, B<IPV6_HOPOPTS> delivers the hop options, "
10701 "B<IPV6_FLOWINFO> delivers an integer containing the flow ID, "
10702 "B<IPV6_HOPLIMIT> delivers an integer containing the hop count of the "
10703 "packet.  The control messages have the same type as the socket option.  All "
10704 "these header options can also be set for outgoing packets by putting the "
10705 "appropriate control message into the control buffer of B<sendmsg>(2).  Only "
10706 "allowed for B<SOCK_DGRAM> or B<SOCK_RAW> sockets.  Argument is a pointer to "
10707 "a boolean value."
10708 msgstr ""
10709
10710 #. type: TP
10711 #: build/C/man7/ipv6.7:303
10712 #, no-wrap
10713 msgid "B<IPV6_RECVERR>"
10714 msgstr ""
10715
10716 #. type: Plain text
10717 #: build/C/man7/ipv6.7:312
10718 msgid ""
10719 "Control receiving of asynchronous error options.  See B<IP_RECVERR> in "
10720 "B<ip>(7)  for details.  Argument is a pointer to boolean."
10721 msgstr ""
10722
10723 #. type: TP
10724 #: build/C/man7/ipv6.7:312
10725 #, no-wrap
10726 msgid "B<IPV6_ROUTER_ALERT>"
10727 msgstr ""
10728
10729 #. type: Plain text
10730 #: build/C/man7/ipv6.7:327
10731 msgid ""
10732 "Pass forwarded packets containing a router alert hop-by-hop option to this "
10733 "socket.  Only allowed for B<SOCK_RAW> sockets.  The tapped packets are not "
10734 "forwarded by the kernel, it is the user's responsibility to send them out "
10735 "again.  Argument is a pointer to an integer.  A positive integer indicates a "
10736 "router alert option value to intercept.  Packets carrying a router alert "
10737 "option with a value field containing this integer will be delivered to the "
10738 "socket.  A negative integer disables delivery of packets with router alert "
10739 "options to this socket."
10740 msgstr ""
10741
10742 #. type: TP
10743 #: build/C/man7/ipv6.7:327
10744 #, no-wrap
10745 msgid "B<IPV6_UNICAST_HOPS>"
10746 msgstr ""
10747
10748 #. type: Plain text
10749 #: build/C/man7/ipv6.7:333
10750 msgid ""
10751 "Set the unicast hop limit for the socket.  Argument is a pointer to an "
10752 "integer.  -1 in the value means use the route default, otherwise it should "
10753 "be between 0 and 255."
10754 msgstr ""
10755
10756 #. type: TP
10757 #: build/C/man7/ipv6.7:333
10758 #, no-wrap
10759 msgid "B<IPV6_V6ONLY> (since Linux 2.4.21 and 2.6)"
10760 msgstr ""
10761
10762 #.  See RFC 3493
10763 #. type: Plain text
10764 #: build/C/man7/ipv6.7:340
10765 msgid ""
10766 "If this flag is set to true (nonzero), then the socket is restricted to "
10767 "sending and receiving IPv6 packets only.  In this case, an IPv4 and an IPv6 "
10768 "application can bind to a single port at the same time."
10769 msgstr ""
10770
10771 #. type: Plain text
10772 #: build/C/man7/ipv6.7:344
10773 msgid ""
10774 "If this flag is set to false (zero), then the socket can be used to send and "
10775 "receive packets to and from an IPv6 address or an IPv4-mapped IPv6 address."
10776 msgstr ""
10777
10778 #. type: Plain text
10779 #: build/C/man7/ipv6.7:346
10780 msgid "The argument is a pointer to a boolean value in an integer."
10781 msgstr ""
10782
10783 #.  FLOWLABEL_MGR, FLOWINFO_SEND
10784 #. type: Plain text
10785 #: build/C/man7/ipv6.7:351
10786 msgid ""
10787 "The default value for this flag is defined by the contents of the file "
10788 "I</proc/sys/net/ipv6/bindv6only>.  The default value for that file is 0 "
10789 "(false)."
10790 msgstr ""
10791
10792 #. type: Plain text
10793 #: build/C/man7/ipv6.7:363
10794 msgid ""
10795 "The user tried to B<bind>(2)  to a link-local IPv6 address, but the "
10796 "I<sin6_scope_id> in the supplied I<sockaddr_in6> structure is not a valid "
10797 "interface index."
10798 msgstr ""
10799
10800 #. type: Plain text
10801 #: build/C/man7/ipv6.7:368
10802 msgid ""
10803 "The older I<libinet6> libc5 based IPv6 API implementation for Linux is not "
10804 "described here and may vary in details."
10805 msgstr ""
10806
10807 #. type: Plain text
10808 #: build/C/man7/ipv6.7:384
10809 msgid ""
10810 "Linux 2.4 will break binary compatibility for the I<sockaddr_in6> for 64-bit "
10811 "hosts by changing the alignment of I<in6_addr> and adding an additional "
10812 "I<sin6_scope_id> field.  The kernel interfaces stay compatible, but a "
10813 "program including I<sockaddr_in6> or I<in6_addr> into other structures may "
10814 "not be.  This is not a problem for 32-bit hosts like i386."
10815 msgstr ""
10816
10817 #. type: Plain text
10818 #: build/C/man7/ipv6.7:392
10819 msgid ""
10820 "The I<sin6_flowinfo> field is new in Linux 2.4.  It is transparently "
10821 "passed/read by the kernel when the passed address length contains it.  Some "
10822 "programs that pass a longer address buffer and then check the outgoing "
10823 "address length may break."
10824 msgstr ""
10825
10826 #. type: Plain text
10827 #: build/C/man7/ipv6.7:402
10828 msgid ""
10829 "The I<sockaddr_in6> structure is bigger than the generic I<sockaddr>.  "
10830 "Programs that assume that all address types can be stored safely in a "
10831 "I<struct sockaddr> need to be changed to use I<struct sockaddr_storage> for "
10832 "that instead."
10833 msgstr ""
10834
10835 #. type: Plain text
10836 #: build/C/man7/ipv6.7:407
10837 msgid ""
10838 "The IPv6 extended API as in RFC\\ 2292 is currently only partly implemented; "
10839 "although the 2.2 kernel has near complete support for receiving options, the "
10840 "macros for generating IPv6 options are missing in glibc 2.1."
10841 msgstr ""
10842
10843 #. type: Plain text
10844 #: build/C/man7/ipv6.7:409
10845 msgid "IPSec support for EH and AH headers is missing."
10846 msgstr ""
10847
10848 #. type: Plain text
10849 #: build/C/man7/ipv6.7:411
10850 msgid "Flow label management is not complete and not documented here."
10851 msgstr ""
10852
10853 #. type: Plain text
10854 #: build/C/man7/ipv6.7:413
10855 msgid "This man page is not complete."
10856 msgstr ""
10857
10858 #. type: Plain text
10859 #: build/C/man7/ipv6.7:416
10860 msgid "B<cmsg>(3), B<ip>(7)"
10861 msgstr ""
10862
10863 #. type: Plain text
10864 #: build/C/man7/ipv6.7:420
10865 msgid ""
10866 "RFC\\ 2553: IPv6 BASIC API; Linux tries to be compliant to this.  RFC\\ "
10867 "2460: IPv6 specification."
10868 msgstr ""
10869
10870 #. type: TH
10871 #: build/C/man7/netdevice.7:18
10872 #, no-wrap
10873 msgid "NETDEVICE"
10874 msgstr ""
10875
10876 #. type: TH
10877 #: build/C/man7/netdevice.7:18
10878 #, no-wrap
10879 msgid "2014-01-24"
10880 msgstr ""
10881
10882 #. type: Plain text
10883 #: build/C/man7/netdevice.7:21
10884 msgid "netdevice - low-level access to Linux network devices"
10885 msgstr ""
10886
10887 #. type: Plain text
10888 #: build/C/man7/netdevice.7:23
10889 msgid "B<#include E<lt>sys/ioctl.hE<gt>>"
10890 msgstr ""
10891
10892 #. type: Plain text
10893 #: build/C/man7/netdevice.7:25
10894 msgid "B<#include E<lt>net/if.hE<gt>>"
10895 msgstr ""
10896
10897 #. type: Plain text
10898 #: build/C/man7/netdevice.7:28
10899 msgid ""
10900 "This man page describes the sockets interface which is used to configure "
10901 "network devices."
10902 msgstr ""
10903
10904 #. type: Plain text
10905 #: build/C/man7/netdevice.7:35
10906 msgid ""
10907 "Linux supports some standard ioctls to configure network devices.  They can "
10908 "be used on any socket's file descriptor regardless of the family or type.  "
10909 "Most of them pass an I<ifreq> structure:"
10910 msgstr ""
10911
10912 #. type: Plain text
10913 #: build/C/man7/netdevice.7:56
10914 #, no-wrap
10915 msgid ""
10916 "struct ifreq {\n"
10917 "    char ifr_name[IFNAMSIZ]; /* Interface name */\n"
10918 "    union {\n"
10919 "        struct sockaddr ifr_addr;\n"
10920 "        struct sockaddr ifr_dstaddr;\n"
10921 "        struct sockaddr ifr_broadaddr;\n"
10922 "        struct sockaddr ifr_netmask;\n"
10923 "        struct sockaddr ifr_hwaddr;\n"
10924 "        short           ifr_flags;\n"
10925 "        int             ifr_ifindex;\n"
10926 "        int             ifr_metric;\n"
10927 "        int             ifr_mtu;\n"
10928 "        struct ifmap    ifr_map;\n"
10929 "        char            ifr_slave[IFNAMSIZ];\n"
10930 "        char            ifr_newname[IFNAMSIZ];\n"
10931 "        char           *ifr_data;\n"
10932 "    };\n"
10933 "};\n"
10934 msgstr ""
10935
10936 #. type: Plain text
10937 #: build/C/man7/netdevice.7:64
10938 msgid ""
10939 "Normally, the user specifies which device to affect by setting I<ifr_name> "
10940 "to the name of the interface.  All other members of the structure may share "
10941 "memory."
10942 msgstr ""
10943
10944 #. type: Plain text
10945 #: build/C/man7/netdevice.7:72
10946 msgid ""
10947 "If an ioctl is marked as privileged, then using it requires an effective "
10948 "user ID of 0 or the B<CAP_NET_ADMIN> capability.  If this is not the case, "
10949 "B<EPERM> will be returned."
10950 msgstr ""
10951
10952 #. type: TP
10953 #: build/C/man7/netdevice.7:72
10954 #, no-wrap
10955 msgid "B<SIOCGIFNAME>"
10956 msgstr ""
10957
10958 #. type: Plain text
10959 #: build/C/man7/netdevice.7:80
10960 msgid ""
10961 "Given the I<ifr_ifindex>, return the name of the interface in I<ifr_name>.  "
10962 "This is the only ioctl which returns its result in I<ifr_name>."
10963 msgstr ""
10964
10965 #. type: TP
10966 #: build/C/man7/netdevice.7:80
10967 #, no-wrap
10968 msgid "B<SIOCGIFINDEX>"
10969 msgstr ""
10970
10971 #. type: Plain text
10972 #: build/C/man7/netdevice.7:84
10973 msgid "Retrieve the interface index of the interface into I<ifr_ifindex>."
10974 msgstr ""
10975
10976 #. type: TP
10977 #: build/C/man7/netdevice.7:84
10978 #, no-wrap
10979 msgid "B<SIOCGIFFLAGS>, B<SIOCSIFFLAGS>"
10980 msgstr ""
10981
10982 #.  Do not right adjust text blocks in tables
10983 #. type: Plain text
10984 #: build/C/man7/netdevice.7:90
10985 msgid ""
10986 "Get or set the active flag word of the device.  I<ifr_flags> contains a bit "
10987 "mask of the following values:"
10988 msgstr ""
10989
10990 #. type: tbl table
10991 #: build/C/man7/netdevice.7:95
10992 #, no-wrap
10993 msgid "Device flags\n"
10994 msgstr ""
10995
10996 #. type: tbl table
10997 #: build/C/man7/netdevice.7:96
10998 #, no-wrap
10999 msgid "IFF_UP:Interface is running.\n"
11000 msgstr ""
11001
11002 #. type: tbl table
11003 #: build/C/man7/netdevice.7:97
11004 #, no-wrap
11005 msgid "IFF_BROADCAST:Valid broadcast address set.\n"
11006 msgstr ""
11007
11008 #. type: tbl table
11009 #: build/C/man7/netdevice.7:98
11010 #, no-wrap
11011 msgid "IFF_DEBUG:Internal debugging flag.\n"
11012 msgstr ""
11013
11014 #. type: tbl table
11015 #: build/C/man7/netdevice.7:99
11016 #, no-wrap
11017 msgid "IFF_LOOPBACK:Interface is a loopback interface.\n"
11018 msgstr ""
11019
11020 #. type: tbl table
11021 #: build/C/man7/netdevice.7:100
11022 #, no-wrap
11023 msgid "IFF_POINTOPOINT:Interface is a point-to-point link.\n"
11024 msgstr ""
11025
11026 #. type: tbl table
11027 #: build/C/man7/netdevice.7:101
11028 #, no-wrap
11029 msgid "IFF_RUNNING:Resources allocated.\n"
11030 msgstr ""
11031
11032 #. type: tbl table
11033 #: build/C/man7/netdevice.7:102
11034 #, no-wrap
11035 msgid "IFF_NOARP:T{\n"
11036 msgstr ""
11037
11038 #. type: tbl table
11039 #: build/C/man7/netdevice.7:103
11040 #, no-wrap
11041 msgid "No arp protocol, L2 destination address not set.\n"
11042 msgstr ""
11043
11044 #. type: tbl table
11045 #: build/C/man7/netdevice.7:104 build/C/man7/netdevice.7:115
11046 #, no-wrap
11047 msgid "T}\n"
11048 msgstr ""
11049
11050 #. type: tbl table
11051 #: build/C/man7/netdevice.7:105
11052 #, no-wrap
11053 msgid "IFF_PROMISC:Interface is in promiscuous mode.\n"
11054 msgstr ""
11055
11056 #. type: tbl table
11057 #: build/C/man7/netdevice.7:106
11058 #, no-wrap
11059 msgid "IFF_NOTRAILERS:Avoid use of trailers.\n"
11060 msgstr ""
11061
11062 #. type: tbl table
11063 #: build/C/man7/netdevice.7:107
11064 #, no-wrap
11065 msgid "IFF_ALLMULTI:Receive all multicast packets.\n"
11066 msgstr ""
11067
11068 #. type: tbl table
11069 #: build/C/man7/netdevice.7:108
11070 #, no-wrap
11071 msgid "IFF_MASTER:Master of a load balancing bundle.\n"
11072 msgstr ""
11073
11074 #. type: tbl table
11075 #: build/C/man7/netdevice.7:109
11076 #, no-wrap
11077 msgid "IFF_SLAVE:Slave of a load balancing bundle.\n"
11078 msgstr ""
11079
11080 #. type: tbl table
11081 #: build/C/man7/netdevice.7:110
11082 #, no-wrap
11083 msgid "IFF_MULTICAST:Supports multicast\n"
11084 msgstr ""
11085
11086 #. type: tbl table
11087 #: build/C/man7/netdevice.7:111
11088 #, no-wrap
11089 msgid "IFF_PORTSEL:Is able to select media type via ifmap.\n"
11090 msgstr ""
11091
11092 #. type: tbl table
11093 #: build/C/man7/netdevice.7:112
11094 #, no-wrap
11095 msgid "IFF_AUTOMEDIA:Auto media selection active.\n"
11096 msgstr ""
11097
11098 #. type: tbl table
11099 #: build/C/man7/netdevice.7:113
11100 #, no-wrap
11101 msgid "IFF_DYNAMIC:T{\n"
11102 msgstr ""
11103
11104 #. type: tbl table
11105 #: build/C/man7/netdevice.7:114
11106 #, no-wrap
11107 msgid "The addresses are lost when the interface goes down.\n"
11108 msgstr ""
11109
11110 #. type: tbl table
11111 #: build/C/man7/netdevice.7:116
11112 #, no-wrap
11113 msgid "IFF_LOWER_UP:Driver signals L1 up (since Linux 2.6.17)\n"
11114 msgstr ""
11115
11116 #. type: tbl table
11117 #: build/C/man7/netdevice.7:117
11118 #, no-wrap
11119 msgid "IFF_DORMANT:Driver signals dormant (since Linux 2.6.17)\n"
11120 msgstr ""
11121
11122 #. type: tbl table
11123 #: build/C/man7/netdevice.7:118
11124 #, no-wrap
11125 msgid "IFF_ECHO:Echo sent packets (since Linux 2.6.25)\n"
11126 msgstr ""
11127
11128 #. type: Plain text
11129 #: build/C/man7/netdevice.7:124
11130 msgid ""
11131 "Setting the active flag word is a privileged operation, but any process may "
11132 "read it."
11133 msgstr ""
11134
11135 #. type: TP
11136 #: build/C/man7/netdevice.7:124
11137 #, no-wrap
11138 msgid "B<SIOCGIFPFLAGS>, B<SIOCSIFPFLAGS>"
11139 msgstr ""
11140
11141 #. type: Plain text
11142 #: build/C/man7/netdevice.7:129
11143 msgid ""
11144 "Get or set extended (private) flags for the device.  I<ifr_flags> contains a "
11145 "bit mask of the following values:"
11146 msgstr ""
11147
11148 #. type: tbl table
11149 #: build/C/man7/netdevice.7:133
11150 #, no-wrap
11151 msgid "Private flags\n"
11152 msgstr ""
11153
11154 #. type: tbl table
11155 #: build/C/man7/netdevice.7:134
11156 #, no-wrap
11157 msgid "IFF_802_1Q_VLAN:Interface is 802.1Q VLAN device.\n"
11158 msgstr ""
11159
11160 #. type: tbl table
11161 #: build/C/man7/netdevice.7:135
11162 #, no-wrap
11163 msgid "IFF_EBRIDGE:Interface is Ethernet bridging device.\n"
11164 msgstr ""
11165
11166 #. type: tbl table
11167 #: build/C/man7/netdevice.7:136
11168 #, no-wrap
11169 msgid "IFF_SLAVE_INACTIVE:Interface is inactive bonding slave.\n"
11170 msgstr ""
11171
11172 #. type: tbl table
11173 #: build/C/man7/netdevice.7:137
11174 #, no-wrap
11175 msgid "IFF_MASTER_8023AD:Interface is 802.3ad bonding master.\n"
11176 msgstr ""
11177
11178 #. type: tbl table
11179 #: build/C/man7/netdevice.7:138
11180 #, no-wrap
11181 msgid "IFF_MASTER_ALB:Interface is balanced-alb bonding master.\n"
11182 msgstr ""
11183
11184 #. type: tbl table
11185 #: build/C/man7/netdevice.7:139
11186 #, no-wrap
11187 msgid "IFF_BONDING:Interface is a bonding master or slave.\n"
11188 msgstr ""
11189
11190 #. type: tbl table
11191 #: build/C/man7/netdevice.7:140
11192 #, no-wrap
11193 msgid "IFF_SLAVE_NEEDARP:Interface needs ARPs for validation.\n"
11194 msgstr ""
11195
11196 #. type: tbl table
11197 #: build/C/man7/netdevice.7:141
11198 #, no-wrap
11199 msgid "IFF_ISATAP:Interface is RFC4214 ISATAP interface.\n"
11200 msgstr ""
11201
11202 #. type: Plain text
11203 #: build/C/man7/netdevice.7:145
11204 msgid "Setting the extended (private) interface flags is a privileged operation."
11205 msgstr ""
11206
11207 #. type: TP
11208 #: build/C/man7/netdevice.7:145
11209 #, no-wrap
11210 msgid "B<SIOCGIFADDR>, B<SIOCSIFADDR>"
11211 msgstr ""
11212
11213 #. type: Plain text
11214 #: build/C/man7/netdevice.7:153
11215 msgid ""
11216 "Get or set the address of the device using I<ifr_addr>.  Setting the "
11217 "interface address is a privileged operation.  For compatibility, only "
11218 "B<AF_INET> addresses are accepted or returned."
11219 msgstr ""
11220
11221 #. type: TP
11222 #: build/C/man7/netdevice.7:153
11223 #, no-wrap
11224 msgid "B<SIOCGIFDSTADDR>, B<SIOCSIFDSTADDR>"
11225 msgstr ""
11226
11227 #. type: Plain text
11228 #: build/C/man7/netdevice.7:161
11229 msgid ""
11230 "Get or set the destination address of a point-to-point device using "
11231 "I<ifr_dstaddr>.  For compatibility, only B<AF_INET> addresses are accepted "
11232 "or returned.  Setting the destination address is a privileged operation."
11233 msgstr ""
11234
11235 #. type: TP
11236 #: build/C/man7/netdevice.7:161
11237 #, no-wrap
11238 msgid "B<SIOCGIFBRDADDR>, B<SIOCSIFBRDADDR>"
11239 msgstr ""
11240
11241 #. type: Plain text
11242 #: build/C/man7/netdevice.7:169
11243 msgid ""
11244 "Get or set the broadcast address for a device using I<ifr_brdaddr>.  For "
11245 "compatibility, only B<AF_INET> addresses are accepted or returned.  Setting "
11246 "the broadcast address is a privileged operation."
11247 msgstr ""
11248
11249 #. type: TP
11250 #: build/C/man7/netdevice.7:169
11251 #, no-wrap
11252 msgid "B<SIOCGIFNETMASK>, B<SIOCSIFNETMASK>"
11253 msgstr ""
11254
11255 #. type: Plain text
11256 #: build/C/man7/netdevice.7:177
11257 msgid ""
11258 "Get or set the network mask for a device using I<ifr_netmask>.  For "
11259 "compatibility, only B<AF_INET> addresses are accepted or returned.  Setting "
11260 "the network mask is a privileged operation."
11261 msgstr ""
11262
11263 #. type: TP
11264 #: build/C/man7/netdevice.7:177
11265 #, no-wrap
11266 msgid "B<SIOCGIFMETRIC>, B<SIOCSIFMETRIC>"
11267 msgstr ""
11268
11269 #. type: Plain text
11270 #: build/C/man7/netdevice.7:186
11271 msgid ""
11272 "Get or set the metric of the device using I<ifr_metric>.  This is currently "
11273 "not implemented; it sets I<ifr_metric> to 0 if you attempt to read it and "
11274 "returns B<EOPNOTSUPP> if you attempt to set it."
11275 msgstr ""
11276
11277 #. type: TP
11278 #: build/C/man7/netdevice.7:186
11279 #, no-wrap
11280 msgid "B<SIOCGIFMTU>, B<SIOCSIFMTU>"
11281 msgstr ""
11282
11283 #. type: Plain text
11284 #: build/C/man7/netdevice.7:193
11285 msgid ""
11286 "Get or set the MTU (Maximum Transfer Unit) of a device using I<ifr_mtu>.  "
11287 "Setting the MTU is a privileged operation.  Setting the MTU to too small "
11288 "values may cause kernel crashes."
11289 msgstr ""
11290
11291 #. type: TP
11292 #: build/C/man7/netdevice.7:193
11293 #, no-wrap
11294 msgid "B<SIOCGIFHWADDR>, B<SIOCSIFHWADDR>"
11295 msgstr ""
11296
11297 #. type: Plain text
11298 #: build/C/man7/netdevice.7:204
11299 msgid ""
11300 "Get or set the hardware address of a device using I<ifr_hwaddr>.  The "
11301 "hardware address is specified in a struct I<sockaddr>.  I<sa_family> "
11302 "contains the ARPHRD_* device type, I<sa_data> the L2 hardware address "
11303 "starting from byte 0.  Setting the hardware address is a privileged "
11304 "operation."
11305 msgstr ""
11306
11307 #. type: TP
11308 #: build/C/man7/netdevice.7:204
11309 #, no-wrap
11310 msgid "B<SIOCSIFHWBROADCAST>"
11311 msgstr ""
11312
11313 #. type: Plain text
11314 #: build/C/man7/netdevice.7:209
11315 msgid ""
11316 "Set the hardware broadcast address of a device from I<ifr_hwaddr>.  This is "
11317 "a privileged operation."
11318 msgstr ""
11319
11320 #. type: TP
11321 #: build/C/man7/netdevice.7:209
11322 #, no-wrap
11323 msgid "B<SIOCGIFMAP>, B<SIOCSIFMAP>"
11324 msgstr ""
11325
11326 #. type: Plain text
11327 #: build/C/man7/netdevice.7:214
11328 msgid ""
11329 "Get or set the interface's hardware parameters using I<ifr_map>.  Setting "
11330 "the parameters is a privileged operation."
11331 msgstr ""
11332
11333 #. type: Plain text
11334 #: build/C/man7/netdevice.7:225
11335 #, no-wrap
11336 msgid ""
11337 "struct ifmap {\n"
11338 "    unsigned long   mem_start;\n"
11339 "    unsigned long   mem_end;\n"
11340 "    unsigned short  base_addr;\n"
11341 "    unsigned char   irq;\n"
11342 "    unsigned char   dma;\n"
11343 "    unsigned char   port;\n"
11344 "};\n"
11345 msgstr ""
11346
11347 #. type: Plain text
11348 #: build/C/man7/netdevice.7:230
11349 msgid ""
11350 "The interpretation of the ifmap structure depends on the device driver and "
11351 "the architecture."
11352 msgstr ""
11353
11354 #. type: TP
11355 #: build/C/man7/netdevice.7:230
11356 #, no-wrap
11357 msgid "B<SIOCADDMULTI>, B<SIOCDELMULTI>"
11358 msgstr ""
11359
11360 #. type: Plain text
11361 #: build/C/man7/netdevice.7:239
11362 msgid ""
11363 "Add an address to or delete an address from the device's link layer "
11364 "multicast filters using I<ifr_hwaddr>.  These are privileged operations.  "
11365 "See also B<packet>(7)  for an alternative."
11366 msgstr ""
11367
11368 #. type: TP
11369 #: build/C/man7/netdevice.7:239
11370 #, no-wrap
11371 msgid "B<SIOCGIFTXQLEN>, B<SIOCSIFTXQLEN>"
11372 msgstr ""
11373
11374 #. type: Plain text
11375 #: build/C/man7/netdevice.7:244
11376 msgid ""
11377 "Get or set the transmit queue length of a device using I<ifr_qlen>.  Setting "
11378 "the transmit queue length is a privileged operation."
11379 msgstr ""
11380
11381 #. type: TP
11382 #: build/C/man7/netdevice.7:244
11383 #, no-wrap
11384 msgid "B<SIOCSIFNAME>"
11385 msgstr ""
11386
11387 #. type: Plain text
11388 #: build/C/man7/netdevice.7:253
11389 msgid ""
11390 "Changes the name of the interface specified in I<ifr_name> to "
11391 "I<ifr_newname>.  This is a privileged operation.  It is allowed only when "
11392 "the interface is not up."
11393 msgstr ""
11394
11395 #. type: TP
11396 #: build/C/man7/netdevice.7:253
11397 #, no-wrap
11398 msgid "B<SIOCGIFCONF>"
11399 msgstr ""
11400
11401 #. type: Plain text
11402 #: build/C/man7/netdevice.7:263
11403 msgid ""
11404 "Return a list of interface (transport layer) addresses.  This currently "
11405 "means only addresses of the B<AF_INET> (IPv4) family for compatibility.  "
11406 "Unlike the others, this ioctl passes an I<ifconf> structure:"
11407 msgstr ""
11408
11409 #. type: Plain text
11410 #: build/C/man7/netdevice.7:273
11411 #, no-wrap
11412 msgid ""
11413 "struct ifconf {\n"
11414 "    int                 ifc_len; /* size of buffer */\n"
11415 "    union {\n"
11416 "        char           *ifc_buf; /* buffer address */\n"
11417 "        struct ifreq   *ifc_req; /* array of structures */\n"
11418 "    };\n"
11419 "};\n"
11420 msgstr ""
11421
11422 #. type: Plain text
11423 #: build/C/man7/netdevice.7:299
11424 msgid ""
11425 "If I<ifc_req> is NULL, B<SIOCGIFCONF> returns the necessary buffer size in "
11426 "bytes for receiving all available addresses in I<ifc_len>.  Otherwise, "
11427 "I<ifc_req> contains a pointer to an array of I<ifreq> structures to be "
11428 "filled with all currently active L3 interface addresses.  I<ifc_len> "
11429 "contains the size of the array in bytes.  Within each I<ifreq> structure, "
11430 "I<ifr_name> will receive the interface name, and I<ifr_addr> the address.  "
11431 "The actual number of bytes transferred is returned in I<ifc_len>."
11432 msgstr ""
11433
11434 #. type: Plain text
11435 #: build/C/man7/netdevice.7:315
11436 msgid ""
11437 "If the size specified by I<ifc_len> is insufficient to store all the "
11438 "addresses, the kernel will skip the exceeding ones and return success.  "
11439 "There is no reliable way of detecting this condition once it has occurred.  "
11440 "It is therefore recommended to either determine the necessary buffer size "
11441 "beforehand by calling B<SIOCGIFCONF> with I<ifc_req> set to NULL, or to "
11442 "retry the call with a bigger buffer whenever I<ifc_len> upon return differs "
11443 "by less than I<sizeof(struct ifreq)> from its original value."
11444 msgstr ""
11445
11446 #.  Slaving isn't supported in 2.2
11447 #.  .
11448 #.  .TP
11449 #.  .BR SIOCGIFSLAVE ", " SIOCSIFSLAVE
11450 #.  Get or set the slave device using
11451 #.  .IR ifr_slave .
11452 #.  Setting the slave device is a privileged operation.
11453 #.  .PP
11454 #.  FIXME add amateur radio stuff.
11455 #. type: Plain text
11456 #: build/C/man7/netdevice.7:332
11457 msgid ""
11458 "If an error occurs accessing the I<ifconf> or I<ifreq> structures, B<EFAULT> "
11459 "will be returned."
11460 msgstr ""
11461
11462 #. type: Plain text
11463 #: build/C/man7/netdevice.7:338
11464 msgid ""
11465 "Most protocols support their own ioctls to configure protocol-specific "
11466 "interface options.  See the protocol man pages for a description.  For "
11467 "configuring IP addresses, see B<ip>(7)."
11468 msgstr ""
11469
11470 #. type: Plain text
11471 #: build/C/man7/netdevice.7:341
11472 msgid ""
11473 "In addition, some devices support private ioctls.  These are not described "
11474 "here."
11475 msgstr ""
11476
11477 #. type: Plain text
11478 #: build/C/man7/netdevice.7:349
11479 msgid ""
11480 "Strictly speaking, B<SIOCGIFCONF> and the other ioctls that accept or return "
11481 "only B<AF_INET> socket addresses, are IP-specific and belong in B<ip>(7)."
11482 msgstr ""
11483
11484 #. type: Plain text
11485 #: build/C/man7/netdevice.7:354
11486 msgid ""
11487 "The names of interfaces with no addresses or that don't have the "
11488 "B<IFF_RUNNING> flag set can be found via I</proc/net/dev>."
11489 msgstr ""
11490
11491 #. type: Plain text
11492 #: build/C/man7/netdevice.7:359
11493 msgid ""
11494 "Local IPv6 IP addresses can be found via I</proc/net> or via "
11495 "B<rtnetlink>(7)."
11496 msgstr ""
11497
11498 #. type: Plain text
11499 #: build/C/man7/netdevice.7:365
11500 msgid ""
11501 "glibc 2.1 is missing the I<ifr_newname> macro in I<E<lt>net/if.hE<gt>>.  Add "
11502 "the following to your program as a workaround:"
11503 msgstr ""
11504
11505 #. type: Plain text
11506 #: build/C/man7/netdevice.7:371
11507 #, no-wrap
11508 msgid ""
11509 "#ifndef ifr_newname\n"
11510 "#define ifr_newname     ifr_ifru.ifru_slave\n"
11511 "#endif\n"
11512 msgstr ""
11513
11514 #. type: Plain text
11515 #: build/C/man7/netdevice.7:378
11516 msgid "B<proc>(5), B<capabilities>(7), B<ip>(7), B<rtnetlink>(7)"
11517 msgstr ""
11518
11519 #. type: TH
11520 #: build/C/man5/networks.5:26
11521 #, no-wrap
11522 msgid "NETWORKS"
11523 msgstr ""
11524
11525 #. type: TH
11526 #: build/C/man5/networks.5:26
11527 #, no-wrap
11528 msgid "2008-09-04"
11529 msgstr ""
11530
11531 #. type: TH
11532 #: build/C/man5/networks.5:26
11533 #, no-wrap
11534 msgid "GNU/Linux"
11535 msgstr ""
11536
11537 #. type: Plain text
11538 #: build/C/man5/networks.5:29
11539 msgid "networks - network name information"
11540 msgstr ""
11541
11542 #. type: Plain text
11543 #: build/C/man5/networks.5:35
11544 msgid ""
11545 "The file I</etc/networks> is a plain ASCII file that describes known DARPA "
11546 "networks and symbolic names for these networks.  Each line represents a "
11547 "network and has the following structure:"
11548 msgstr ""
11549
11550 #. type: Plain text
11551 #: build/C/man5/networks.5:38
11552 msgid "I<name number aliases ...>"
11553 msgstr ""
11554
11555 #. type: Plain text
11556 #: build/C/man5/networks.5:46
11557 msgid ""
11558 "where the fields are delimited by spaces or tabs.  Empty lines are ignored.  "
11559 "The hash character (B<#>) indicates the start of a comment: this character, "
11560 "and the remaining characters up to the end of the current line, are ignored "
11561 "by library functions that process the file."
11562 msgstr ""
11563
11564 #. type: Plain text
11565 #: build/C/man5/networks.5:48 build/C/man5/protocols.5:59
11566 msgid "The field descriptions are:"
11567 msgstr ""
11568
11569 #. type: TP
11570 #: build/C/man5/networks.5:48
11571 #, no-wrap
11572 msgid "I<name>"
11573 msgstr ""
11574
11575 #. type: Plain text
11576 #: build/C/man5/networks.5:53
11577 msgid ""
11578 "The symbolic name for the network.  Network names can contain any printable "
11579 "characters except white-space characters or the comment character."
11580 msgstr ""
11581
11582 #. type: TP
11583 #: build/C/man5/networks.5:53 build/C/man5/protocols.5:67
11584 #, no-wrap
11585 msgid "I<number>"
11586 msgstr ""
11587
11588 #. type: Plain text
11589 #: build/C/man5/networks.5:58
11590 msgid ""
11591 "The official number for this network in numbers-and-dots notation (see "
11592 "B<inet>(3)).  The trailing \".0\" (for the host component of the network "
11593 "address) may be omitted."
11594 msgstr ""
11595
11596 #. type: TP
11597 #: build/C/man5/networks.5:58 build/C/man5/protocols.5:71 build/C/man5/services.5:120
11598 #, no-wrap
11599 msgid "I<aliases>"
11600 msgstr ""
11601
11602 #. type: Plain text
11603 #: build/C/man5/networks.5:61
11604 msgid "Optional aliases for the network."
11605 msgstr ""
11606
11607 #. type: Plain text
11608 #: build/C/man5/networks.5:70
11609 msgid ""
11610 "This file is read by the B<route>(8)  and B<netstat>(8)  utilities.  Only "
11611 "Class A, B or C networks are supported, partitioned networks (i.e., "
11612 "network/26 or network/28) are not supported by this facility."
11613 msgstr ""
11614
11615 #. type: Plain text
11616 #: build/C/man5/networks.5:74
11617 msgid "The networks definition file."
11618 msgstr ""
11619
11620 #. type: Plain text
11621 #: build/C/man5/networks.5:80
11622 msgid ""
11623 "B<getnetbyaddr>(3), B<getnetbyname>(3), B<getnetent>(3), B<netstat>(8), "
11624 "B<route>(8)"
11625 msgstr ""
11626
11627 #. type: TH
11628 #: build/C/man8/nscd.8:23
11629 #, no-wrap
11630 msgid "NSCD"
11631 msgstr ""
11632
11633 #. type: Plain text
11634 #: build/C/man8/nscd.8:26
11635 msgid "nscd - name service cache daemon"
11636 msgstr ""
11637
11638 #. type: Plain text
11639 #: build/C/man8/nscd.8:34
11640 msgid ""
11641 "Nscd is a daemon that provides a cache for the most common name service "
11642 "requests.  The default configuration file, I</etc/nscd.conf>, determines the "
11643 "behavior of the cache daemon.  See B<nscd.conf>(5)."
11644 msgstr ""
11645
11646 #. type: Plain text
11647 #: build/C/man8/nscd.8:47
11648 msgid ""
11649 "Nscd provides caching for accesses of the B<passwd>(5), B<group>(5), and "
11650 "B<hosts>(5)  databases through standard libc interfaces, such as "
11651 "B<getpwnam>(3), B<getpwuid>(3), B<getgrnam>(3), B<getgrgid>(3), "
11652 "B<gethostbyname>(3), and others."
11653 msgstr ""
11654
11655 #. type: Plain text
11656 #: build/C/man8/nscd.8:56
11657 msgid ""
11658 "There are two caches for each database: a positive one for items found, and "
11659 "a negative one for items not found.  Each cache has a separate TTL "
11660 "(time-to-live)  period for its data.  Note that the shadow file is "
11661 "specifically not cached.  B<getspnam>(3)  calls remain uncached as a result."
11662 msgstr ""
11663
11664 #. type: SH
11665 #: build/C/man8/nscd.8:56
11666 #, no-wrap
11667 msgid "OPTIONS"
11668 msgstr ""
11669
11670 #. type: TP
11671 #: build/C/man8/nscd.8:57
11672 #, no-wrap
11673 msgid "B<--help>"
11674 msgstr ""
11675
11676 #. type: Plain text
11677 #: build/C/man8/nscd.8:60
11678 msgid "will give you a list with all options and what they do."
11679 msgstr ""
11680
11681 #. type: Plain text
11682 #: build/C/man8/nscd.8:83
11683 msgid ""
11684 "The daemon will try to watch for changes in configuration files appropriate "
11685 "for each database (e.g., I</etc/passwd> for the I<passwd> database or "
11686 "I</etc/hosts> and I</etc/resolv.conf> for the I<hosts> database), and flush "
11687 "the cache when these are changed.  However, this will happen only after a "
11688 "short delay (unless the B<inotify>(7)  mechanism is available and glibc 2.9 "
11689 "or later is available), and this auto-detection does not cover configuration "
11690 "files required by nonstandard NSS modules, if any are specified in "
11691 "I</etc/nsswitch.conf>.  In that case, you need to run the following command "
11692 "after changing the configuration file of the database so that B<nscd> "
11693 "invalidates its cache:"
11694 msgstr ""
11695
11696 #. type: Plain text
11697 #: build/C/man8/nscd.8:85
11698 #, no-wrap
11699 msgid "    $ B<nscd -i> I<E<lt>databaseE<gt>>\n"
11700 msgstr ""
11701
11702 #.  .SH AUTHOR
11703 #.  .B nscd
11704 #.  was written by Thorsten Kukuk and Ulrich Drepper.
11705 #. type: Plain text
11706 #: build/C/man8/nscd.8:91
11707 msgid "B<nscd.conf>(5), B<nsswitch.conf>(5)"
11708 msgstr ""
11709
11710 #. type: TH
11711 #: build/C/man5/nscd.conf.5:20
11712 #, no-wrap
11713 msgid "NSCD.CONF"
11714 msgstr ""
11715
11716 #. type: TH
11717 #: build/C/man5/nscd.conf.5:20
11718 #, no-wrap
11719 msgid "2014-02-07"
11720 msgstr ""
11721
11722 #. type: Plain text
11723 #: build/C/man5/nscd.conf.5:23
11724 msgid "/etc/nscd.conf - name service cache daemon configuration file"
11725 msgstr ""
11726
11727 #. type: Plain text
11728 #: build/C/man5/nscd.conf.5:36
11729 msgid ""
11730 "The file I</etc/nscd.conf> is read from B<nscd>(8)  at startup.  Each line "
11731 "specifies either an attribute and a value, or an attribute, service, and a "
11732 "value.  Fields are separated either by SPACE or TAB characters.  A "
11733 "\\(aq#\\(aq (number sign) indicates the beginning of a comment; following "
11734 "characters, up to the end of the line, are not interpreted by nscd."
11735 msgstr ""
11736
11737 #. type: Plain text
11738 #: build/C/man5/nscd.conf.5:39
11739 msgid ""
11740 "Valid services are I<passwd>, I<group>, I<hosts>, I<services>, or "
11741 "I<netgroup>."
11742 msgstr ""
11743
11744 #. type: Plain text
11745 #: build/C/man5/nscd.conf.5:42
11746 msgid "B<logfile> I<debug-file-name>"
11747 msgstr ""
11748
11749 #. type: Plain text
11750 #: build/C/man5/nscd.conf.5:44
11751 msgid "Specifies name of the file to which debug info should be written."
11752 msgstr ""
11753
11754 #. type: Plain text
11755 #: build/C/man5/nscd.conf.5:48
11756 msgid "B<debug-level> I<value>"
11757 msgstr ""
11758
11759 #. type: Plain text
11760 #: build/C/man5/nscd.conf.5:51
11761 msgid "Sets the desired debug level.  The default is 0."
11762 msgstr ""
11763
11764 #. type: Plain text
11765 #: build/C/man5/nscd.conf.5:55
11766 msgid "B<threads> I<number>"
11767 msgstr ""
11768
11769 #. type: Plain text
11770 #: build/C/man5/nscd.conf.5:59
11771 msgid ""
11772 "This is the number of threads that are started to wait for requests.  At "
11773 "least five threads will always be created."
11774 msgstr ""
11775
11776 #. type: Plain text
11777 #: build/C/man5/nscd.conf.5:63
11778 msgid "B<max-threads> I<number>"
11779 msgstr ""
11780
11781 #. type: Plain text
11782 #: build/C/man5/nscd.conf.5:66
11783 msgid "Specifies the maximum number of threads.  The default is 32."
11784 msgstr ""
11785
11786 #. type: Plain text
11787 #: build/C/man5/nscd.conf.5:70
11788 msgid "B<server-user> I<user>"
11789 msgstr ""
11790
11791 #. type: Plain text
11792 #: build/C/man5/nscd.conf.5:74
11793 msgid ""
11794 "If this option is set, nscd will run as this user and not as root.  If a "
11795 "separate cache for every user is used (-S parameter), this option is "
11796 "ignored."
11797 msgstr ""
11798
11799 #. type: Plain text
11800 #: build/C/man5/nscd.conf.5:78
11801 msgid "B<stat-user> I<user>"
11802 msgstr ""
11803
11804 #. type: Plain text
11805 #: build/C/man5/nscd.conf.5:80
11806 msgid "Specifies the user who is allowed to request statistics."
11807 msgstr ""
11808
11809 #. type: Plain text
11810 #: build/C/man5/nscd.conf.5:85
11811 msgid "B<reload-count> unlimited | I<number>"
11812 msgstr ""
11813
11814 #. type: Plain text
11815 #: build/C/man5/nscd.conf.5:89
11816 msgid ""
11817 "Limit on the number of times a cached entry gets reloaded without being used "
11818 "before it gets removed.  The default is 5."
11819 msgstr ""
11820
11821 #. type: Plain text
11822 #: build/C/man5/nscd.conf.5:93
11823 msgid "B<paranoia> I<E<lt>yes|noE<gt>>"
11824 msgstr ""
11825
11826 #. type: Plain text
11827 #: build/C/man5/nscd.conf.5:96
11828 msgid ""
11829 "Enabling paranoia mode causes nscd to restart itself periodically.  The "
11830 "default is no."
11831 msgstr ""
11832
11833 #. type: Plain text
11834 #: build/C/man5/nscd.conf.5:100
11835 msgid "B<restart-interval> I<time>"
11836 msgstr ""
11837
11838 #. type: Plain text
11839 #: build/C/man5/nscd.conf.5:108
11840 msgid ""
11841 "Sets the restart interval to I<time> seconds if periodic restart is enabled "
11842 "by enabling B<paranoia> mode.  The default is 3600."
11843 msgstr ""
11844
11845 #. type: Plain text
11846 #: build/C/man5/nscd.conf.5:113
11847 msgid "B<enable-cache> I<service> I<E<lt>yes|noE<gt>>"
11848 msgstr ""
11849
11850 #. type: Plain text
11851 #: build/C/man5/nscd.conf.5:118
11852 msgid "Enables or disables the specified I<service> cache.  The default is no."
11853 msgstr ""
11854
11855 #. type: Plain text
11856 #: build/C/man5/nscd.conf.5:123
11857 msgid "B<positive-time-to-live> I<service> I<value>"
11858 msgstr ""
11859
11860 #. type: Plain text
11861 #: build/C/man5/nscd.conf.5:131
11862 msgid ""
11863 "Sets the TTL (time-to-live) for positive entries (successful queries)  in "
11864 "the specified cache for I<service>.  I<Value> is in seconds.  Larger values "
11865 "increase cache hit rates and reduce mean response times, but increase "
11866 "problems with cache coherence."
11867 msgstr ""
11868
11869 #. type: Plain text
11870 #: build/C/man5/nscd.conf.5:136
11871 msgid "B<negative-time-to-live> I<service> I<value>"
11872 msgstr ""
11873
11874 #. type: Plain text
11875 #: build/C/man5/nscd.conf.5:146
11876 msgid ""
11877 "Sets the TTL (time-to-live) for negative entries (unsuccessful queries)  in "
11878 "the specified cache for I<service>.  I<Value> is in seconds.  Can result in "
11879 "significant performance improvements if there are several files owned by "
11880 "UIDs (user IDs) not in system databases (for example untarring the Linux "
11881 "kernel sources as root); should be kept small to reduce cache coherency "
11882 "problems."
11883 msgstr ""
11884
11885 #. type: Plain text
11886 #: build/C/man5/nscd.conf.5:151
11887 msgid "B<suggested-size> I<service> I<value>"
11888 msgstr ""
11889
11890 #. type: Plain text
11891 #: build/C/man5/nscd.conf.5:156
11892 msgid ""
11893 "This is the internal hash table size, I<value> should remain a prime number "
11894 "for optimum efficiency.  The default is 211."
11895 msgstr ""
11896
11897 #. type: Plain text
11898 #: build/C/man5/nscd.conf.5:161
11899 msgid "B<check-files> I<service> I<E<lt>yes|noE<gt>>"
11900 msgstr ""
11901
11902 #. type: Plain text
11903 #: build/C/man5/nscd.conf.5:173
11904 msgid ""
11905 "Enables or disables checking the file belonging to the specified I<service> "
11906 "for changes.  The files are I</etc/passwd>, I</etc/group>, I</etc/hosts>, "
11907 "I</etc/services> and I</etc/netgroup>.  The default is yes."
11908 msgstr ""
11909
11910 #. type: Plain text
11911 #: build/C/man5/nscd.conf.5:178
11912 msgid "B<persistent> I<service> I<E<lt>yes|noE<gt>>"
11913 msgstr ""
11914
11915 #. type: Plain text
11916 #: build/C/man5/nscd.conf.5:185
11917 msgid ""
11918 "Keep the content of the cache for I<service> over server restarts; useful "
11919 "when B<paranoia> mode is set.  The default is no."
11920 msgstr ""
11921
11922 #. type: Plain text
11923 #: build/C/man5/nscd.conf.5:190
11924 msgid "B<shared> I<service> I<E<lt>yes|noE<gt>>"
11925 msgstr ""
11926
11927 #. type: Plain text
11928 #: build/C/man5/nscd.conf.5:197
11929 msgid ""
11930 "The memory mapping of the nscd databases for I<service> is shared with the "
11931 "clients so that they can directly search in them instead of having to ask "
11932 "the daemon over the socket each time a lookup is performed.  The default is "
11933 "no."
11934 msgstr ""
11935
11936 #. type: Plain text
11937 #: build/C/man5/nscd.conf.5:202
11938 msgid "B<max-db-size> I<service> I<bytes>"
11939 msgstr ""
11940
11941 #. type: Plain text
11942 #: build/C/man5/nscd.conf.5:206
11943 msgid ""
11944 "The maximum allowable size, in bytes, of the database files for the "
11945 "I<service>.  The default is 33554432."
11946 msgstr ""
11947
11948 #. type: Plain text
11949 #: build/C/man5/nscd.conf.5:211
11950 msgid "B<auto-propagate> I<service> I<E<lt>yes|noE<gt>>"
11951 msgstr ""
11952
11953 #. type: Plain text
11954 #: build/C/man5/nscd.conf.5:231
11955 msgid ""
11956 "When set to I<no> for I<passwd> or I<group> service, then the I<.byname> "
11957 "requests are not added to I<passwd.byuid> or I<group.bygid> cache.  This can "
11958 "help with tables containing multiple records for the same ID.  The default "
11959 "is yes.  This option is valid only for services I<passwd> and I<group>."
11960 msgstr ""
11961
11962 #. type: Plain text
11963 #: build/C/man5/nscd.conf.5:239
11964 msgid ""
11965 "The default values stated in this manual page originate from the source code "
11966 "of B<nscd>(8)  and are used if not overridden in the configuration file.  "
11967 "The default values used in the configuration file of your distribution might "
11968 "differ."
11969 msgstr ""
11970
11971 #.  .SH AUTHOR
11972 #.  .B nscd
11973 #.  was written by Thorsten Kukuk and Ulrich Drepper.
11974 #. type: Plain text
11975 #: build/C/man5/nscd.conf.5:244
11976 msgid "B<nscd>(8)"
11977 msgstr ""
11978
11979 #. type: TH
11980 #: build/C/man5/nss.5:19
11981 #, no-wrap
11982 msgid "NSS"
11983 msgstr ""
11984
11985 #. type: Plain text
11986 #: build/C/man5/nss.5:22
11987 msgid "nss - Name Service Switch configuration file"
11988 msgstr ""
11989
11990 #. type: Plain text
11991 #: build/C/man5/nss.5:29
11992 msgid ""
11993 "Each call to a function which retrieves data from a system database like the "
11994 "password or group database is handled by the Name Service Switch "
11995 "implementation in the GNU C library.  The various services provided are "
11996 "implemented by independent modules, each of which naturally varies widely "
11997 "from the other."
11998 msgstr ""
11999
12000 #. type: Plain text
12001 #: build/C/man5/nss.5:38
12002 msgid ""
12003 "The default implementations coming with the GNU C library are by default "
12004 "conservative and do not use unsafe data.  This might be very costly in some "
12005 "situations, especially when the databases are large.  Some modules allow the "
12006 "system administrator to request taking shortcuts if these are known to be "
12007 "safe.  It is then the system administrator's responsibility to ensure the "
12008 "assumption is correct."
12009 msgstr ""
12010
12011 #. type: Plain text
12012 #: build/C/man5/nss.5:42
12013 msgid ""
12014 "There are other modules where the implementation changed over time.  If an "
12015 "implementation used to sacrifice speed for memory consumption, it might "
12016 "create problems if the preference is switched."
12017 msgstr ""
12018
12019 #. type: Plain text
12020 #: build/C/man5/nss.5:51
12021 msgid ""
12022 "The I</etc/default/nss> file contains a number of variable assignments.  "
12023 "Each variable controls the behavior of one or more NSS modules.  White "
12024 "spaces are ignored.  Lines beginning with \\(aq#\\(aq are treated as "
12025 "comments."
12026 msgstr ""
12027
12028 #. type: Plain text
12029 #: build/C/man5/nss.5:53
12030 msgid "The variables currently recognized are:"
12031 msgstr ""
12032
12033 #. type: TP
12034 #: build/C/man5/nss.5:53
12035 #, no-wrap
12036 msgid "B<NETID_AUTHORITATIVE => I<TRUE>|I<FALSE>"
12037 msgstr ""
12038
12039 #. type: Plain text
12040 #: build/C/man5/nss.5:68
12041 msgid ""
12042 "If set to TRUE, the NIS backend for the B<initgroups>(3)  function will "
12043 "accept the information from the I<netid.byname> NIS map as authoritative.  "
12044 "This can speed up the function significantly if the I<group.byname> map is "
12045 "large.  The content of the I<netid.byname> map is used B<as is>.  The system "
12046 "administrator has to make sure it is correctly generated."
12047 msgstr ""
12048
12049 #. type: TP
12050 #: build/C/man5/nss.5:68
12051 #, no-wrap
12052 msgid "B<SERVICES_AUTHORITATIVE => I<TRUE>|I<FALSE>"
12053 msgstr ""
12054
12055 #. type: Plain text
12056 #: build/C/man5/nss.5:80
12057 msgid ""
12058 "If set to TRUE, the NIS backend for the B<getservbyname>(3)  and "
12059 "B<getservbyname_r>(3)  functions will assume that the "
12060 "I<services.byservicename> NIS map exists and is authoritative, particularly "
12061 "that it contains both keys with /proto and without /proto for both primary "
12062 "service names and service aliases.  The system administrator has to make "
12063 "sure it is correctly generated."
12064 msgstr ""
12065
12066 #. type: TP
12067 #: build/C/man5/nss.5:80
12068 #, no-wrap
12069 msgid "B<SETENT_BATCH_READ => I<TRUE>|I<FALSE>"
12070 msgstr ""
12071
12072 #. type: Plain text
12073 #: build/C/man5/nss.5:98
12074 msgid ""
12075 "If set to TRUE, the NIS backend for the B<setpwent>(3)  and B<setgrent>(3)  "
12076 "functions will read the entire database at once and then hand out the "
12077 "requests one by one from memory with every corresponding B<getpwent>(3)  or "
12078 "B<getgrent>(3)  call respectively.  Otherwise, each B<getpwent>(3)  or "
12079 "B<getgrent>(3)  call might result in a network communication with the server "
12080 "to get the next entry."
12081 msgstr ""
12082
12083 #. type: Plain text
12084 #: build/C/man5/nss.5:100
12085 msgid "I</etc/default/nss>"
12086 msgstr ""
12087
12088 #. type: Plain text
12089 #: build/C/man5/nss.5:102
12090 msgid "The default configuration corresponds to the following configuration file:"
12091 msgstr ""
12092
12093 #.  .SH AUTHOR
12094 #.  Ulrich Drepper <drepper@redhat.com>
12095 #. type: Plain text
12096 #: build/C/man5/nss.5:110
12097 #, no-wrap
12098 msgid ""
12099 "NETID_AUTHORITATIVE=FALSE\n"
12100 "SERVICES_AUTHORITATIVE=FALSE\n"
12101 "SETENT_BATCH_READ=FALSE\n"
12102 msgstr ""
12103
12104 #. type: Plain text
12105 #: build/C/man5/nss.5:112
12106 msgid "I<nsswitch.conf>"
12107 msgstr ""
12108
12109 #. type: TH
12110 #: build/C/man5/nsswitch.conf.5:25
12111 #, no-wrap
12112 msgid "NSSWITCH.CONF"
12113 msgstr ""
12114
12115 #. type: Plain text
12116 #: build/C/man5/nsswitch.conf.5:28
12117 msgid "nsswitch.conf - Name Service Switch configuration file"
12118 msgstr ""
12119
12120 #. type: Plain text
12121 #: build/C/man5/nsswitch.conf.5:36
12122 msgid ""
12123 "The Name Service Switch (NSS) configuration file, I</etc/nsswitch.conf>, is "
12124 "used by the GNU C Library to determine the sources from which to obtain "
12125 "name-service information in a range of categories, and in what order.  Each "
12126 "category of information is identified by a database name."
12127 msgstr ""
12128
12129 #. type: Plain text
12130 #: build/C/man5/nsswitch.conf.5:42
12131 msgid ""
12132 "The file is plain ASCII text, with columns separated by spaces or tab "
12133 "characters.  The first column specifies the database name.  The remaining "
12134 "columns describe the order of sources to query and a limited set of actions "
12135 "that can be performed by lookup result."
12136 msgstr ""
12137
12138 #. type: Plain text
12139 #: build/C/man5/nsswitch.conf.5:44
12140 msgid "The following databases are understood by the GNU C Library:"
12141 msgstr ""
12142
12143 #. type: Plain text
12144 #: build/C/man5/nsswitch.conf.5:49
12145 msgid "Mail aliases, used by B<getaliasent>(3)  and related functions."
12146 msgstr ""
12147
12148 #. type: Plain text
12149 #: build/C/man5/nsswitch.conf.5:52
12150 msgid "Ethernet numbers."
12151 msgstr ""
12152
12153 #. type: Plain text
12154 #: build/C/man5/nsswitch.conf.5:57
12155 msgid "Groups of users, used by B<getgrent>(3)  and related functions."
12156 msgstr ""
12157
12158 #. type: Plain text
12159 #: build/C/man5/nsswitch.conf.5:62
12160 msgid "Host names and numbers, used by B<gethostbyname>(3)  and related functions."
12161 msgstr ""
12162
12163 #. type: Plain text
12164 #: build/C/man5/nsswitch.conf.5:67
12165 msgid "Supplementary group access list, used by B<getgrouplist>(3)  function."
12166 msgstr ""
12167
12168 #. type: Plain text
12169 #: build/C/man5/nsswitch.conf.5:71
12170 msgid ""
12171 "Network-wide list of hosts and users, used for access rules.  C libraries "
12172 "before glibc 2.1 supported netgroups only over NIS."
12173 msgstr ""
12174
12175 #. type: Plain text
12176 #: build/C/man5/nsswitch.conf.5:76
12177 msgid "Network names and numbers, used by B<getnetent>(3)  and related functions."
12178 msgstr ""
12179
12180 #. type: Plain text
12181 #: build/C/man5/nsswitch.conf.5:81
12182 msgid "User passwords, used by B<getpwent>(3)  and related functions."
12183 msgstr ""
12184
12185 #. type: Plain text
12186 #: build/C/man5/nsswitch.conf.5:86
12187 msgid "Network protocols, used by B<getprotoent>(3)  and related functions."
12188 msgstr ""
12189
12190 #. type: TP
12191 #: build/C/man5/nsswitch.conf.5:86
12192 #, no-wrap
12193 msgid "B<publickey>"
12194 msgstr ""
12195
12196 #. type: Plain text
12197 #: build/C/man5/nsswitch.conf.5:89
12198 msgid "Public and secret keys for Secure_RPC used by NFS and NIS+."
12199 msgstr ""
12200
12201 #. type: Plain text
12202 #: build/C/man5/nsswitch.conf.5:94
12203 msgid ""
12204 "Remote procedure call names and numbers, used by B<getrpcbyname>(3)  and "
12205 "related functions."
12206 msgstr ""
12207
12208 #. type: Plain text
12209 #: build/C/man5/nsswitch.conf.5:99
12210 msgid "Network services, used by B<getservent>(3)  and related functions."
12211 msgstr ""
12212
12213 #. type: Plain text
12214 #: build/C/man5/nsswitch.conf.5:104
12215 msgid "Shadow user passwords, used by B<getspnam>(3)  and related functions."
12216 msgstr ""
12217
12218 #. type: Plain text
12219 #: build/C/man5/nsswitch.conf.5:108
12220 msgid "Here is an example I</etc/nsswitch.conf> file:"
12221 msgstr ""
12222
12223 #. type: TP
12224 #: build/C/man5/nsswitch.conf.5:111
12225 #, no-wrap
12226 msgid "passwd:"
12227 msgstr ""
12228
12229 #. type: Plain text
12230 #: build/C/man5/nsswitch.conf.5:114 build/C/man5/nsswitch.conf.5:117 build/C/man5/nsswitch.conf.5:120
12231 msgid "compat"
12232 msgstr ""
12233
12234 #. type: TP
12235 #: build/C/man5/nsswitch.conf.5:114
12236 #, no-wrap
12237 msgid "group:"
12238 msgstr ""
12239
12240 #. type: TP
12241 #: build/C/man5/nsswitch.conf.5:117
12242 #, no-wrap
12243 msgid "shadow:"
12244 msgstr ""
12245
12246 #. type: TP
12247 #: build/C/man5/nsswitch.conf.5:121
12248 #, no-wrap
12249 msgid "hosts:"
12250 msgstr ""
12251
12252 #. type: Plain text
12253 #: build/C/man5/nsswitch.conf.5:124
12254 msgid "dns [!UNAVAIL=return] files"
12255 msgstr ""
12256
12257 #. type: TP
12258 #: build/C/man5/nsswitch.conf.5:124
12259 #, no-wrap
12260 msgid "networks:"
12261 msgstr ""
12262
12263 #. type: Plain text
12264 #: 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
12265 msgid "nis [NOTFOUND=return] files"
12266 msgstr ""
12267
12268 #. type: TP
12269 #: build/C/man5/nsswitch.conf.5:127
12270 #, no-wrap
12271 msgid "ethers:"
12272 msgstr ""
12273
12274 #. type: TP
12275 #: build/C/man5/nsswitch.conf.5:130
12276 #, no-wrap
12277 msgid "protocols:"
12278 msgstr ""
12279
12280 #. type: TP
12281 #: build/C/man5/nsswitch.conf.5:133
12282 #, no-wrap
12283 msgid "rpc:"
12284 msgstr ""
12285
12286 #. type: TP
12287 #: build/C/man5/nsswitch.conf.5:136
12288 #, no-wrap
12289 msgid "services:"
12290 msgstr ""
12291
12292 #. type: Plain text
12293 #: build/C/man5/nsswitch.conf.5:144
12294 msgid "The first column is the database name.  The remaining columns specify:"
12295 msgstr ""
12296
12297 #. type: Plain text
12298 #: build/C/man5/nsswitch.conf.5:148
12299 msgid ""
12300 "One or more service specifications, for example, \"files\", \"db\", or "
12301 "\"nis\".  The order of the services on the line determines the order in "
12302 "which those services will be queried, in turn, until a result is found."
12303 msgstr ""
12304
12305 #. type: Plain text
12306 #: build/C/man5/nsswitch.conf.5:151
12307 msgid ""
12308 "Optional actions to perform if a particular result is obtained from the "
12309 "preceding service, for example, \"[NOTFOUND=return]\"."
12310 msgstr ""
12311
12312 #. type: Plain text
12313 #: build/C/man5/nsswitch.conf.5:177
12314 msgid ""
12315 "The service specifications supported on your system depend on the presence "
12316 "of shared libraries, and are therefore extensible.  Libraries called "
12317 "I</lib/libnss_SERVICE.so.>B<X> will provide the named I<SERVICE>.  On a "
12318 "standard installation, you can use \"files\", \"db\", \"nis\", and "
12319 "\"nisplus\".  For the B<hosts> database, you can additionally specify "
12320 "\"dns\".  For the B<passwd>, B<group>, and B<shadow> databases, you can "
12321 "additionally specify \"compat\" (see B<Compatibility mode> below).  The "
12322 "version number B<X> may be 1 for glibc 2.0, or 2 for glibc 2.1 and later.  "
12323 "On systems with additional libraries installed, you may have access to "
12324 "further services such as \"hesiod\", \"ldap\", \"winbind\" and \"wins\"."
12325 msgstr ""
12326
12327 #. type: Plain text
12328 #: build/C/man5/nsswitch.conf.5:182
12329 msgid ""
12330 "An action may also be specified following a service specification.  The "
12331 "action modifies the behavior following a result obtained from the preceding "
12332 "data source.  Action items take the general form:"
12333 msgstr ""
12334
12335 #. type: Plain text
12336 #: build/C/man5/nsswitch.conf.5:185
12337 msgid "[I<STATUS>=I<ACTION>]"
12338 msgstr ""
12339
12340 #. type: Plain text
12341 #: build/C/man5/nsswitch.conf.5:187
12342 msgid "[!I<STATUS>=I<ACTION>]"
12343 msgstr ""
12344
12345 #. type: Plain text
12346 #: build/C/man5/nsswitch.conf.5:190
12347 msgid "where"
12348 msgstr ""
12349
12350 #. type: Plain text
12351 #: build/C/man5/nsswitch.conf.5:201
12352 msgid "I<STATUS> =E<gt> B<success> | B<notfound> | B<unavail> | B<tryagain>"
12353 msgstr ""
12354
12355 #. type: Plain text
12356 #: build/C/man5/nsswitch.conf.5:207
12357 msgid "I<ACTION> =E<gt> B<return> | B<continue>"
12358 msgstr ""
12359
12360 #. type: Plain text
12361 #: build/C/man5/nsswitch.conf.5:212
12362 msgid ""
12363 "The ! negates the test, matching all possible results except the one "
12364 "specified.  The case of the keywords is not significant."
12365 msgstr ""
12366
12367 #. type: Plain text
12368 #: build/C/man5/nsswitch.conf.5:217
12369 msgid ""
12370 "The I<STATUS> value is matched against the result of the lookup function "
12371 "called by the preceding service specification, and can be one of:"
12372 msgstr ""
12373
12374 #. type: TP
12375 #: build/C/man5/nsswitch.conf.5:218
12376 #, no-wrap
12377 msgid "B<success>"
12378 msgstr ""
12379
12380 #. type: Plain text
12381 #: build/C/man5/nsswitch.conf.5:222
12382 msgid ""
12383 "No error occurred and the requested entry is returned.  The default action "
12384 "for this condition is \"return\"."
12385 msgstr ""
12386
12387 #. type: TP
12388 #: build/C/man5/nsswitch.conf.5:222
12389 #, no-wrap
12390 msgid "B<notfound>"
12391 msgstr ""
12392
12393 #. type: Plain text
12394 #: build/C/man5/nsswitch.conf.5:226
12395 msgid ""
12396 "The lookup succeeded, but the requested entry was not found.  The default "
12397 "action for this condition is \"continue\"."
12398 msgstr ""
12399
12400 #. type: TP
12401 #: build/C/man5/nsswitch.conf.5:226
12402 #, no-wrap
12403 msgid "B<unavail>"
12404 msgstr ""
12405
12406 #. type: Plain text
12407 #: build/C/man5/nsswitch.conf.5:233
12408 msgid ""
12409 "The service is permanently unavailable.  This can mean either that the "
12410 "required file cannot be read, or, for network services, that the server is "
12411 "not available or does not allow queries.  The default action for this "
12412 "condition is \"continue\"."
12413 msgstr ""
12414
12415 #. type: TP
12416 #: build/C/man5/nsswitch.conf.5:233
12417 #, no-wrap
12418 msgid "B<tryagain>"
12419 msgstr ""
12420
12421 #. type: Plain text
12422 #: build/C/man5/nsswitch.conf.5:239
12423 msgid ""
12424 "The service is temporarily unavailable.  This could mean a file is locked or "
12425 "a server currently cannot accept more connections.  The default action for "
12426 "this condition is \"continue\"."
12427 msgstr ""
12428
12429 #. type: Plain text
12430 #: build/C/man5/nsswitch.conf.5:244
12431 msgid "The I<ACTION> value can be one of:"
12432 msgstr ""
12433
12434 #. type: TP
12435 #: build/C/man5/nsswitch.conf.5:245
12436 #, no-wrap
12437 msgid "B<return>"
12438 msgstr ""
12439
12440 #. type: Plain text
12441 #: build/C/man5/nsswitch.conf.5:257
12442 msgid ""
12443 "Return a result now.  Do not call any further lookup functions.  However, "
12444 "for compatibility reasons, if this is the selected action for the B<group> "
12445 "database and the B<notfound> status, and the configuration file does not "
12446 "contain the B<initgroups> line, the next lookup function is always called, "
12447 "without affecting the search result."
12448 msgstr ""
12449
12450 #. type: TP
12451 #: build/C/man5/nsswitch.conf.5:257
12452 #, no-wrap
12453 msgid "B<continue>"
12454 msgstr ""
12455
12456 #. type: Plain text
12457 #: build/C/man5/nsswitch.conf.5:260
12458 msgid "Call the next lookup function."
12459 msgstr ""
12460
12461 #. type: SS
12462 #: build/C/man5/nsswitch.conf.5:261
12463 #, no-wrap
12464 msgid "Compatibility mode (compat)"
12465 msgstr ""
12466
12467 #. type: Plain text
12468 #: build/C/man5/nsswitch.conf.5:267
12469 msgid ""
12470 "The NSS \"compat\" service is similar to \"files\" except that it "
12471 "additionally permits special entries in I</etc/passwd> for granting users or "
12472 "members of netgroups access to the system.  The following entries are valid "
12473 "in this mode:"
12474 msgstr ""
12475
12476 #. type: TP
12477 #: build/C/man5/nsswitch.conf.5:268
12478 #, no-wrap
12479 msgid "B<+>I<user>"
12480 msgstr ""
12481
12482 #. type: Plain text
12483 #: build/C/man5/nsswitch.conf.5:273
12484 msgid "Include the specified I<user> from the NIS passwd map."
12485 msgstr ""
12486
12487 #. type: TP
12488 #: build/C/man5/nsswitch.conf.5:273
12489 #, no-wrap
12490 msgid "B<+@>I<netgroup>"
12491 msgstr ""
12492
12493 #. type: Plain text
12494 #: build/C/man5/nsswitch.conf.5:277
12495 msgid "Include all users in the given I<netgroup>."
12496 msgstr ""
12497
12498 #. type: TP
12499 #: build/C/man5/nsswitch.conf.5:277
12500 #, no-wrap
12501 msgid "B<->I<user>"
12502 msgstr ""
12503
12504 #. type: Plain text
12505 #: build/C/man5/nsswitch.conf.5:282
12506 msgid "Exclude the specified I<user> from the NIS passwd map."
12507 msgstr ""
12508
12509 #. type: TP
12510 #: build/C/man5/nsswitch.conf.5:282
12511 #, no-wrap
12512 msgid "B<-@>I<netgroup>"
12513 msgstr ""
12514
12515 #. type: Plain text
12516 #: build/C/man5/nsswitch.conf.5:286
12517 msgid "Exclude all users in the given I<netgroup>."
12518 msgstr ""
12519
12520 #. type: TP
12521 #: build/C/man5/nsswitch.conf.5:286
12522 #, no-wrap
12523 msgid "B<+>"
12524 msgstr ""
12525
12526 #. type: Plain text
12527 #: build/C/man5/nsswitch.conf.5:290
12528 msgid ""
12529 "Include every user, except previously excluded ones, from the NIS passwd "
12530 "map."
12531 msgstr ""
12532
12533 #. type: Plain text
12534 #: build/C/man5/nsswitch.conf.5:298
12535 msgid ""
12536 "By default the source is \"nis\", but this may be overridden by specifying "
12537 "\"nisplus\" as the source for the pseudo-databases B<passwd_compat>, "
12538 "B<group_compat>, and B<shadow_compat>."
12539 msgstr ""
12540
12541 #. type: Plain text
12542 #: build/C/man5/nsswitch.conf.5:305
12543 msgid ""
12544 "A service named I<SERVICE> is implemented by a shared object library named "
12545 "I<libnss_SERVICE.so.>B<X> that resides in I</lib>."
12546 msgstr ""
12547
12548 #. type: Plain text
12549 #: build/C/man5/nsswitch.conf.5:310
12550 msgid "NSS configuration file."
12551 msgstr ""
12552
12553 #. type: TP
12554 #: build/C/man5/nsswitch.conf.5:310
12555 #, no-wrap
12556 msgid "I</lib/libnss_compat.so.>B<X>"
12557 msgstr ""
12558
12559 #. type: Plain text
12560 #: build/C/man5/nsswitch.conf.5:313
12561 msgid "implements \"compat\" source."
12562 msgstr ""
12563
12564 #. type: TP
12565 #: build/C/man5/nsswitch.conf.5:313
12566 #, no-wrap
12567 msgid "I</lib/libnss_db.so.>B<X>"
12568 msgstr ""
12569
12570 #. type: Plain text
12571 #: build/C/man5/nsswitch.conf.5:316
12572 msgid "implements \"db\" source."
12573 msgstr ""
12574
12575 #. type: TP
12576 #: build/C/man5/nsswitch.conf.5:316
12577 #, no-wrap
12578 msgid "I</lib/libnss_dns.so.>B<X>"
12579 msgstr ""
12580
12581 #. type: Plain text
12582 #: build/C/man5/nsswitch.conf.5:319
12583 msgid "implements \"dns\" source."
12584 msgstr ""
12585
12586 #. type: TP
12587 #: build/C/man5/nsswitch.conf.5:319
12588 #, no-wrap
12589 msgid "I</lib/libnss_files.so.>B<X>"
12590 msgstr ""
12591
12592 #. type: Plain text
12593 #: build/C/man5/nsswitch.conf.5:322
12594 msgid "implements \"files\" source."
12595 msgstr ""
12596
12597 #. type: TP
12598 #: build/C/man5/nsswitch.conf.5:322
12599 #, no-wrap
12600 msgid "I</lib/libnss_hesiod.so.>B<X>"
12601 msgstr ""
12602
12603 #. type: Plain text
12604 #: build/C/man5/nsswitch.conf.5:325
12605 msgid "implements \"hesiod\" source."
12606 msgstr ""
12607
12608 #. type: TP
12609 #: build/C/man5/nsswitch.conf.5:325
12610 #, no-wrap
12611 msgid "I</lib/libnss_nis.so.>B<X>"
12612 msgstr ""
12613
12614 #. type: Plain text
12615 #: build/C/man5/nsswitch.conf.5:328
12616 msgid "implements \"nis\" source."
12617 msgstr ""
12618
12619 #. type: TP
12620 #: build/C/man5/nsswitch.conf.5:328
12621 #, no-wrap
12622 msgid "I</lib/libnss_nisplus.so.>B<X>"
12623 msgstr ""
12624
12625 #. type: Plain text
12626 #: build/C/man5/nsswitch.conf.5:331
12627 msgid "implements \"nisplus\" source."
12628 msgstr ""
12629
12630 #. type: Plain text
12631 #: build/C/man5/nsswitch.conf.5:339
12632 msgid ""
12633 "Within each process that uses B<nsswitch.conf>, the entire file is read only "
12634 "once.  If the file is later changed, the process will continue using the old "
12635 "configuration."
12636 msgstr ""
12637
12638 #. type: Plain text
12639 #: build/C/man5/nsswitch.conf.5:352
12640 msgid ""
12641 "Traditionally, there was only a single source for service information, often "
12642 "in the form of a single configuration file (e.g., I</etc/passwd>).  However, "
12643 "as other name services, such as the Network Information Service (NIS) and "
12644 "the Domain Name Service (DNS), became popular, a method was needed that "
12645 "would be more flexible than fixed search orders coded into the C library.  "
12646 "The Name Service Switch mechanism, which was based on the mechanism used by "
12647 "Sun Microsystems in the Solaris 2 C library, introduced a cleaner solution "
12648 "to the problem."
12649 msgstr ""
12650
12651 #. type: Plain text
12652 #: build/C/man5/nsswitch.conf.5:355
12653 msgid "B<getent>(1), B<nss>(5)"
12654 msgstr ""
12655
12656 #. type: TH
12657 #: build/C/man7/packet.7:12
12658 #, no-wrap
12659 msgid "PACKET"
12660 msgstr ""
12661
12662 #. type: TH
12663 #: build/C/man7/packet.7:12
12664 #, no-wrap
12665 msgid "2014-04-28"
12666 msgstr ""
12667
12668 #. type: Plain text
12669 #: build/C/man7/packet.7:15
12670 msgid "packet - packet interface on device level"
12671 msgstr ""
12672
12673 #. type: Plain text
12674 #: build/C/man7/packet.7:18
12675 #, no-wrap
12676 msgid "B<#include E<lt>sys/socket.hE<gt>>\n"
12677 msgstr ""
12678
12679 #. type: Plain text
12680 #: build/C/man7/packet.7:20
12681 #, no-wrap
12682 msgid "B<#include E<lt>netpacket/packet.hE<gt>>\n"
12683 msgstr ""
12684
12685 #. type: Plain text
12686 #: build/C/man7/packet.7:22
12687 #, no-wrap
12688 msgid "B<#include E<lt>net/ethernet.hE<gt> /* the L2 protocols */>\n"
12689 msgstr ""
12690
12691 #. type: Plain text
12692 #: build/C/man7/packet.7:24
12693 #, no-wrap
12694 msgid ""
12695 "B<packet_socket = socket(AF_PACKET, int >I<socket_type>B<, int "
12696 ">I<protocol>B<);>\n"
12697 msgstr ""
12698
12699 #. type: Plain text
12700 #: build/C/man7/packet.7:30
12701 msgid ""
12702 "Packet sockets are used to receive or send raw packets at the device driver "
12703 "(OSI Layer 2) level.  They allow the user to implement protocol modules in "
12704 "user space on top of the physical layer."
12705 msgstr ""
12706
12707 #. type: Plain text
12708 #: build/C/man7/packet.7:51
12709 msgid ""
12710 "The I<socket_type> is either B<SOCK_RAW> for raw packets including the "
12711 "link-level header or B<SOCK_DGRAM> for cooked packets with the link-level "
12712 "header removed.  The link-level header information is available in a common "
12713 "format in a I<sockaddr_ll>.  I<protocol> is the IEEE 802.3 protocol number "
12714 "in network byte order.  See the I<E<lt>linux/if_ether.hE<gt>> include file "
12715 "for a list of allowed protocols.  When protocol is set to "
12716 "B<htons(ETH_P_ALL)> then all protocols are received.  All incoming packets "
12717 "of that protocol type will be passed to the packet socket before they are "
12718 "passed to the protocols implemented in the kernel."
12719 msgstr ""
12720
12721 #. type: Plain text
12722 #: build/C/man7/packet.7:55
12723 msgid ""
12724 "Only processes with effective UID 0 or the B<CAP_NET_RAW> capability may "
12725 "open packet sockets."
12726 msgstr ""
12727
12728 #. type: Plain text
12729 #: build/C/man7/packet.7:73
12730 msgid ""
12731 "B<SOCK_RAW> packets are passed to and from the device driver without any "
12732 "changes in the packet data.  When receiving a packet, the address is still "
12733 "parsed and passed in a standard I<sockaddr_ll> address structure.  When "
12734 "transmitting a packet, the user supplied buffer should contain the physical "
12735 "layer header.  That packet is then queued unmodified to the network driver "
12736 "of the interface defined by the destination address.  Some device drivers "
12737 "always add other headers.  B<SOCK_RAW> is similar to but not compatible with "
12738 "the obsolete B<AF_INET/SOCK_PACKET> of Linux 2.0."
12739 msgstr ""
12740
12741 #. type: Plain text
12742 #: build/C/man7/packet.7:83
12743 msgid ""
12744 "B<SOCK_DGRAM> operates on a slightly higher level.  The physical header is "
12745 "removed before the packet is passed to the user.  Packets sent through a "
12746 "B<SOCK_DGRAM> packet socket get a suitable physical layer header based on "
12747 "the information in the I<sockaddr_ll> destination address before they are "
12748 "queued."
12749 msgstr ""
12750
12751 #. type: Plain text
12752 #: build/C/man7/packet.7:96
12753 msgid ""
12754 "By default all packets of the specified protocol type are passed to a packet "
12755 "socket.  To get packets only from a specific interface use B<bind>(2)  "
12756 "specifying an address in a I<struct sockaddr_ll> to bind the packet socket "
12757 "to an interface.  Only the I<sll_protocol> and the I<sll_ifindex> address "
12758 "fields are used for purposes of binding."
12759 msgstr ""
12760
12761 #. type: Plain text
12762 #: build/C/man7/packet.7:100
12763 msgid "The B<connect>(2)  operation is not supported on packet sockets."
12764 msgstr ""
12765
12766 #. type: Plain text
12767 #: build/C/man7/packet.7:109
12768 msgid ""
12769 "When the B<MSG_TRUNC> flag is passed to B<recvmsg>(2), B<recv>(2), "
12770 "B<recvfrom>(2)  the real length of the packet on the wire is always "
12771 "returned, even when it is longer than the buffer."
12772 msgstr ""
12773
12774 #. type: SS
12775 #: build/C/man7/packet.7:109
12776 #, no-wrap
12777 msgid "Address types"
12778 msgstr ""
12779
12780 #. type: Plain text
12781 #: build/C/man7/packet.7:113
12782 msgid "The I<sockaddr_ll> is a device independent physical layer address."
12783 msgstr ""
12784
12785 #. type: Plain text
12786 #: build/C/man7/packet.7:125
12787 #, no-wrap
12788 msgid ""
12789 "struct sockaddr_ll {\n"
12790 "    unsigned short sll_family;   /* Always AF_PACKET */\n"
12791 "    unsigned short sll_protocol; /* Physical layer protocol */\n"
12792 "    int            sll_ifindex;  /* Interface number */\n"
12793 "    unsigned short sll_hatype;   /* ARP hardware type */\n"
12794 "    unsigned char  sll_pkttype;  /* Packet type */\n"
12795 "    unsigned char  sll_halen;    /* Length of address */\n"
12796 "    unsigned char  sll_addr[8];  /* Physical layer address */\n"
12797 "};\n"
12798 msgstr ""
12799
12800 #. type: Plain text
12801 #: build/C/man7/packet.7:164
12802 msgid ""
12803 "I<sll_protocol> is the standard ethernet protocol type in network byte order "
12804 "as defined in the I<E<lt>linux/if_ether.hE<gt>> include file.  It defaults "
12805 "to the socket's protocol.  I<sll_ifindex> is the interface index of the "
12806 "interface (see B<netdevice>(7)); 0 matches any interface (only permitted for "
12807 "binding).  I<sll_hatype> is an ARP type as defined in the "
12808 "I<E<lt>linux/if_arp.hE<gt>> include file.  I<sll_pkttype> contains the "
12809 "packet type.  Valid types are B<PACKET_HOST> for a packet addressed to the "
12810 "local host, B<PACKET_BROADCAST> for a physical layer broadcast packet, "
12811 "B<PACKET_MULTICAST> for a packet sent to a physical layer multicast address, "
12812 "B<PACKET_OTHERHOST> for a packet to some other host that has been caught by "
12813 "a device driver in promiscuous mode, and B<PACKET_OUTGOING> for a packet "
12814 "originated from the local host that is looped back to a packet socket.  "
12815 "These types make sense only for receiving.  I<sll_addr> and I<sll_halen> "
12816 "contain the physical layer (e.g., IEEE 802.3) address and its length.  The "
12817 "exact interpretation depends on the device."
12818 msgstr ""
12819
12820 #. type: Plain text
12821 #: build/C/man7/packet.7:180
12822 msgid ""
12823 "When you send packets it is enough to specify I<sll_family>, I<sll_addr>, "
12824 "I<sll_halen>, I<sll_ifindex>.  The other fields should be 0.  I<sll_hatype> "
12825 "and I<sll_pkttype> are set on received packets for your information.  For "
12826 "bind only I<sll_protocol> and I<sll_ifindex> are used."
12827 msgstr ""
12828
12829 #. type: Plain text
12830 #: build/C/man7/packet.7:185
12831 msgid ""
12832 "Packet socket options are configured by calling B<setsockopt>(2)  with level "
12833 "B<SOL_PACKET>."
12834 msgstr ""
12835
12836 #. type: TP
12837 #: build/C/man7/packet.7:185
12838 #, no-wrap
12839 msgid "B<PACKET_ADD_MEMBERSHIP>"
12840 msgstr ""
12841
12842 #. type: TP
12843 #: build/C/man7/packet.7:188
12844 #, no-wrap
12845 msgid "B<PACKET_DROP_MEMBERSHIP>"
12846 msgstr ""
12847
12848 #. type: Plain text
12849 #: build/C/man7/packet.7:200
12850 msgid ""
12851 "Packet sockets can be used to configure physical layer multicasting and "
12852 "promiscuous mode.  B<PACKET_ADD_MEMBERSHIP> adds a binding and "
12853 "B<PACKET_DROP_MEMBERSHIP> drops it.  They both expect a I<packet_mreq> "
12854 "structure as argument:"
12855 msgstr ""
12856
12857 #. type: Plain text
12858 #: build/C/man7/packet.7:209
12859 #, no-wrap
12860 msgid ""
12861 "struct packet_mreq {\n"
12862 "    int            mr_ifindex;    /* interface index */\n"
12863 "    unsigned short mr_type;       /* action */\n"
12864 "    unsigned short mr_alen;       /* address length */\n"
12865 "    unsigned char  mr_address[8]; /* physical layer address */\n"
12866 "};\n"
12867 msgstr ""
12868
12869 #. type: Plain text
12870 #: build/C/man7/packet.7:230
12871 msgid ""
12872 "B<mr_ifindex> contains the interface index for the interface whose status "
12873 "should be changed.  The B<mr_type> parameter specifies which action to "
12874 "perform.  B<PACKET_MR_PROMISC> enables receiving all packets on a shared "
12875 "medium (often known as \"promiscuous mode\"), B<PACKET_MR_MULTICAST> binds "
12876 "the socket to the physical layer multicast group specified in B<mr_address> "
12877 "and B<mr_alen>, and B<PACKET_MR_ALLMULTI> sets the socket up to receive all "
12878 "multicast packets arriving at the interface."
12879 msgstr ""
12880
12881 #. type: Plain text
12882 #: build/C/man7/packet.7:236
12883 msgid ""
12884 "In addition, the traditional ioctls B<SIOCSIFFLAGS>, B<SIOCADDMULTI>, "
12885 "B<SIOCDELMULTI> can be used for the same purpose."
12886 msgstr ""
12887
12888 #. type: TP
12889 #: build/C/man7/packet.7:236
12890 #, no-wrap
12891 msgid "B<PACKET_AUXDATA> (since Linux 2.6.21)"
12892 msgstr ""
12893
12894 #.  commit 8dc4194474159660d7f37c495e3fc3f10d0db8cc
12895 #. type: Plain text
12896 #: build/C/man7/packet.7:246
12897 msgid ""
12898 "If this binary option is enabled, the packet socket passes a metadata "
12899 "structure along with each packet in the B<recvmsg>(2)  control field.  The "
12900 "structure can be read with B<cmsg>(3).  It is defined as"
12901 msgstr ""
12902
12903 #. type: Plain text
12904 #: build/C/man7/packet.7:258
12905 #, no-wrap
12906 msgid ""
12907 "struct tpacket_auxdata {\n"
12908 "    __u32 tp_status;\n"
12909 "    __u32 tp_len;      /* packet length */\n"
12910 "    __u32 tp_snaplen;  /* captured length */\n"
12911 "    __u16 tp_mac;\n"
12912 "    __u16 tp_net;\n"
12913 "    __u16 tp_vlan_tci;\n"
12914 "    __u16 tp_padding;\n"
12915 "};\n"
12916 msgstr ""
12917
12918 #. type: TP
12919 #: build/C/man7/packet.7:260
12920 #, no-wrap
12921 msgid "B<PACKET_FANOUT> (since Linux 3.1)"
12922 msgstr ""
12923
12924 #.  commit dc99f600698dcac69b8f56dda9a8a00d645c5ffc
12925 #. type: Plain text
12926 #: build/C/man7/packet.7:282
12927 msgid ""
12928 "To scale processing across threads, packet sockets can form a fanout group.  "
12929 "In this mode, each matching packet is enqueued onto only one socket in the "
12930 "group.  A socket joins a fanout group by calling B<setsockopt>(2)  with "
12931 "level B<SOL_PACKET> and option B<PACKET_FANOUT>.  Each network namespace can "
12932 "have up to 65536 independent groups.  A socket selects a group by encoding "
12933 "the ID in the first 16 bits of the integer option value.  The first packet "
12934 "socket to join a group implicitly creates it.  To successfully join an "
12935 "existing group, subsequent packet sockets must have the same protocol, "
12936 "device settings, fanout mode and flags (see below).  Packet sockets can "
12937 "leave a fanout group only by closing the socket.  The group is deleted when "
12938 "the last socket is closed."
12939 msgstr ""
12940
12941 #.  commit 2d36097d26b5991d71a2cf4a20c1a158f0f1bfcd
12942 #. type: Plain text
12943 #: build/C/man7/packet.7:305
12944 msgid ""
12945 "Fanout supports multiple algorithms to spread traffic between sockets.  The "
12946 "default mode, B<PACKET_FANOUT_HASH>, sends packets from the same flow to the "
12947 "same socket to maintain per-flow ordering.  For each packet, it chooses a "
12948 "socket by taking the packet flow hash modulo the number of sockets in the "
12949 "group, where a flow hash is a hash over network-layer address and optional "
12950 "transport-layer port fields.  The load-balance mode B<PACKET_FANOUT_LB> "
12951 "implements a round-robin algorithm.  B<PACKET_FANOUT_CPU> selects the socket "
12952 "based on the CPU that the packet arrived on.  B<PACKET_FANOUT_ROLLOVER> "
12953 "processes all data on a single socket, moves to the next when one becomes "
12954 "backlogged.  B<PACKET_FANOUT_RND> selects the socket using a pseudo-random "
12955 "number generator.  B<PACKET_FANOUT_QM> (available since Linux 3.14)  selects "
12956 "the socket using the recorded queue_mapping of the received skb."
12957 msgstr ""
12958
12959 #. type: Plain text
12960 #: build/C/man7/packet.7:320
12961 msgid ""
12962 "Fanout modes can take additional options.  IP fragmentation causes packets "
12963 "from the same flow to have different flow hashes.  The flag "
12964 "B<PACKET_FANOUT_FLAG_DEFRAG>, if set, causes packet to be defragmented "
12965 "before fanout is applied, to preserve order even in this case.  Fanout mode "
12966 "and options are communicated in the second 16 bits of the integer option "
12967 "value.  The flag B<PACKET_FANOUT_FLAG_ROLLOVER> enables the roll over "
12968 "mechanism as a backup strategy: if the original fanout algorithm selects a "
12969 "backlogged socket, the packet rolls over to the next available one."
12970 msgstr ""
12971
12972 #. type: TP
12973 #: build/C/man7/packet.7:320
12974 #, no-wrap
12975 msgid "B<PACKET_LOSS> (with B<PACKET_TX_RING>)"
12976 msgstr ""
12977
12978 #. type: Plain text
12979 #: build/C/man7/packet.7:343
12980 msgid ""
12981 "When a malformed packet is encountered on a transmit ring, the default is to "
12982 "reset its I<tp_status> to B<TP_STATUS_WRONG_FORMAT> and abort the "
12983 "transmission immediately.  The malformed packet blocks itself and "
12984 "subsequently enqueued packets from being sent.  The format error must be "
12985 "fixed, the associated I<tp_status> reset to B<TP_STATUS_SEND_REQUEST>, and "
12986 "the transmission process restarted via B<send>(2).  However, if "
12987 "B<PACKET_LOSS> is set, any malformed packet will be skipped, its "
12988 "I<tp_status> reset to B<TP_STATUS_AVAILABLE>, and the transmission process "
12989 "continued."
12990 msgstr ""
12991
12992 #. type: TP
12993 #: build/C/man7/packet.7:343
12994 #, no-wrap
12995 msgid "B<PACKET_RESERVE> (with B<PACKET_RX_RING>)"
12996 msgstr ""
12997
12998 #. type: Plain text
12999 #: build/C/man7/packet.7:348
13000 msgid ""
13001 "By default, a packet receive ring writes packets immediately following the "
13002 "metadata structure and alignment padding.  This integer option reserves "
13003 "additional headroom."
13004 msgstr ""
13005
13006 #. type: TP
13007 #: build/C/man7/packet.7:348
13008 #, no-wrap
13009 msgid "B<PACKET_RX_RING>"
13010 msgstr ""
13011
13012 #. type: Plain text
13013 #: build/C/man7/packet.7:394
13014 msgid ""
13015 "Create a memory-mapped ring buffer for asynchronous packet reception.  The "
13016 "packet socket reserves a contiguous region of application address space, "
13017 "lays it out into an array of packet slots and copies packets (up to "
13018 "I<tp_snaplen>)  into subsequent slots.  Each packet is preceded by a "
13019 "metadata structure similar to I<tpacket_auxdata>.  The protocol fields "
13020 "encode the offset to the data from the start of the metadata header.  "
13021 "I<tp_net> stores the offset to the network layer.  If the packet socket is "
13022 "of type B<SOCK_DGRAM>, then I<tp_mac> is the same.  If it is of type "
13023 "B<SOCK_RAW>, then that field stores the offset to the link-layer frame.  "
13024 "Packet socket and application communicate the head and tail of the ring "
13025 "through the I<tp_status> field.  The packet socket owns all slots with "
13026 "I<tp_status> equal to B<TP_STATUS_KERNEL>.  After filling a slot, it changes "
13027 "the status of the slot to transfer ownership to the application.  During "
13028 "normal operation, the new I<tp_status> value has at least the "
13029 "B<TP_STATUS_USER> bit set to signal that a received packet has been stored.  "
13030 "When the application has finished processing a packet, it transfers "
13031 "ownership of the slot back to the socket by setting I<tp_status> equal to "
13032 "B<TP_STATUS_KERNEL>.  Packet sockets implement multiple variants of the "
13033 "packet ring.  The implementation details are described in "
13034 "I<Documentation/networking/packet_mmap.txt> in the Linux kernel source tree."
13035 msgstr ""
13036
13037 #. type: TP
13038 #: build/C/man7/packet.7:394
13039 #, no-wrap
13040 msgid "B<PACKET_STATISTICS>"
13041 msgstr ""
13042
13043 #. type: Plain text
13044 #: build/C/man7/packet.7:397
13045 msgid "Retrieve packet socket statistics in the form of a structure"
13046 msgstr ""
13047
13048 #. type: Plain text
13049 #: build/C/man7/packet.7:404
13050 #, no-wrap
13051 msgid ""
13052 "struct tpacket_stats {\n"
13053 "    unsigned int tp_packets;  /* Total packet count */\n"
13054 "    unsigned int tp_drops;    /* Dropped packet count */\n"
13055 "};\n"
13056 msgstr ""
13057
13058 #. type: Plain text
13059 #: build/C/man7/packet.7:410
13060 msgid ""
13061 "Receiving statistics resets the internal counters.  The statistics structure "
13062 "differs when using a ring of variant B<TPACKET_V3>."
13063 msgstr ""
13064
13065 #. type: TP
13066 #: build/C/man7/packet.7:410
13067 #, no-wrap
13068 msgid "B<PACKET_TIMESTAMP> (with B<PACKET_RX_RING>; since Linux 2.6.36)"
13069 msgstr ""
13070
13071 #.  commit 614f60fa9d73a9e8fdff3df83381907fea7c5649
13072 #. type: Plain text
13073 #: build/C/man7/packet.7:420
13074 msgid ""
13075 "The packet receive ring always stores a timestamp in the metadata header.  "
13076 "By default, this is a software generated timestamp generated when the packet "
13077 "is copied into the ring.  This integer option selects the type of "
13078 "timestamp.  Besides the default, it support the two hardware formats "
13079 "described in I<Documentation/networking/timestamping.txt> in the Linux "
13080 "kernel source tree."
13081 msgstr ""
13082
13083 #. type: TP
13084 #: build/C/man7/packet.7:420
13085 #, no-wrap
13086 msgid "B<PACKET_TX_RING> (since Linux 2.6.31)"
13087 msgstr ""
13088
13089 #.  commit 69e3c75f4d541a6eb151b3ef91f34033cb3ad6e1
13090 #. type: Plain text
13091 #: build/C/man7/packet.7:455
13092 msgid ""
13093 "Create a memory-mapped ring buffer for packet transmission.  This option is "
13094 "similar to B<PACKET_RX_RING> and takes the same arguments.  The application "
13095 "writes packets into slots with I<tp_status> equal to B<TP_STATUS_AVAILABLE> "
13096 "and schedules them for transmission by changing I<tp_status> to "
13097 "B<TP_STATUS_SEND_REQUEST>.  When packets are ready to be transmitted, the "
13098 "application calls B<send>(2)  or a variant thereof.  The I<buf> and I<len> "
13099 "fields of this call are ignored.  If an address is passed using B<sendto>(2)  "
13100 "or B<sendmsg>(2), then that overrides the socket default.  On successful "
13101 "transmission, the socket resets I<tp_status> to B<TP_STATUS_AVAILABLE>.  It "
13102 "immediately aborts the transmission on error unless B<PACKET_LOSS> is set."
13103 msgstr ""
13104
13105 #. type: TP
13106 #: build/C/man7/packet.7:455
13107 #, no-wrap
13108 msgid "B<PACKET_VERSION> (with B<PACKET_RX_RING>; since Linux 2.6.27)"
13109 msgstr ""
13110
13111 #.  commit bbd6ef87c544d88c30e4b762b1b61ef267a7d279
13112 #. type: Plain text
13113 #: build/C/man7/packet.7:464
13114 msgid ""
13115 "By default, B<PACKET_RX_RING> creates a packet receive ring of variant "
13116 "B<TPACKET_V1>.  To create another variant, configure the desired variant by "
13117 "setting this integer option before creating the ring."
13118 msgstr ""
13119
13120 #. type: TP
13121 #: build/C/man7/packet.7:464
13122 #, no-wrap
13123 msgid "B<PACKET_QDISC_BYPASS> (since Linux 3.14)"
13124 msgstr ""
13125
13126 #.  commit d346a3fae3ff1d99f5d0c819bf86edf9094a26a1
13127 #. type: Plain text
13128 #: build/C/man7/packet.7:479
13129 msgid ""
13130 "By default, packets sent through packet sockets pass through the kernel's "
13131 "qdisc (traffic control) layer, which is fine for the vast majority of use "
13132 "cases.  For traffic generator appliances using packet sockets that intend to "
13133 "brute-force flood the network\\(emfor example, to test devices under load in "
13134 "a similar fashion to pktgen\\(emthis layer can be bypassed by setting this "
13135 "integer option to 1.  A side effect is that packet buffering in the qdisc "
13136 "layer is avoided, which will lead to increased drops when network device "
13137 "transmit queues are busy; therefore, use at your own risk."
13138 msgstr ""
13139
13140 #.  FIXME Document SIOCGSTAMPNS
13141 #. type: Plain text
13142 #: build/C/man7/packet.7:486
13143 msgid ""
13144 "B<SIOCGSTAMP> can be used to receive the timestamp of the last received "
13145 "packet.  Argument is a I<struct timeval> variable."
13146 msgstr ""
13147
13148 #. type: Plain text
13149 #: build/C/man7/packet.7:492
13150 msgid ""
13151 "In addition, all standard ioctls defined in B<netdevice>(7)  and "
13152 "B<socket>(7)  are valid on packet sockets."
13153 msgstr ""
13154
13155 #. type: SS
13156 #: build/C/man7/packet.7:492 build/C/man7/raw.7:131 build/C/man7/tcp.7:1209 build/C/man7/udp.7:103
13157 #, no-wrap
13158 msgid "Error handling"
13159 msgstr ""
13160
13161 #. type: Plain text
13162 #: build/C/man7/packet.7:496
13163 msgid ""
13164 "Packet sockets do no error handling other than errors occurred while passing "
13165 "the packet to the device driver.  They don't have the concept of a pending "
13166 "error."
13167 msgstr ""
13168
13169 #. type: Plain text
13170 #: build/C/man7/packet.7:500
13171 msgid "Unknown multicast group address passed."
13172 msgstr ""
13173
13174 #. type: Plain text
13175 #: build/C/man7/packet.7:503
13176 msgid "User passed invalid memory address."
13177 msgstr ""
13178
13179 #. type: Plain text
13180 #: build/C/man7/packet.7:506 build/C/man7/raw.7:155
13181 msgid "Invalid argument."
13182 msgstr ""
13183
13184 #. type: Plain text
13185 #: build/C/man7/packet.7:509
13186 msgid "Packet is bigger than interface MTU."
13187 msgstr ""
13188
13189 #. type: TP
13190 #: build/C/man7/packet.7:509
13191 #, no-wrap
13192 msgid "B<ENETDOWN>"
13193 msgstr ""
13194
13195 #. type: Plain text
13196 #: build/C/man7/packet.7:512
13197 msgid "Interface is not up."
13198 msgstr ""
13199
13200 #. type: Plain text
13201 #: build/C/man7/packet.7:515
13202 msgid "Not enough memory to allocate the packet."
13203 msgstr ""
13204
13205 #. type: Plain text
13206 #: build/C/man7/packet.7:518
13207 msgid "Unknown device name or interface index specified in interface address."
13208 msgstr ""
13209
13210 #. type: Plain text
13211 #: build/C/man7/packet.7:521
13212 msgid "No packet received."
13213 msgstr ""
13214
13215 #. type: Plain text
13216 #: build/C/man7/packet.7:524
13217 msgid "No interface address passed."
13218 msgstr ""
13219
13220 #. type: TP
13221 #: build/C/man7/packet.7:524
13222 #, no-wrap
13223 msgid "B<ENXIO>"
13224 msgstr ""
13225
13226 #. type: Plain text
13227 #: build/C/man7/packet.7:527
13228 msgid "Interface address contained an invalid interface index."
13229 msgstr ""
13230
13231 #. type: Plain text
13232 #: build/C/man7/packet.7:530
13233 msgid "User has insufficient privileges to carry out this operation."
13234 msgstr ""
13235
13236 #. type: Plain text
13237 #: build/C/man7/packet.7:532
13238 msgid "In addition, other errors may be generated by the low-level driver."
13239 msgstr ""
13240
13241 #. type: Plain text
13242 #: build/C/man7/packet.7:537
13243 msgid ""
13244 "B<AF_PACKET> is a new feature in Linux 2.2.  Earlier Linux versions "
13245 "supported only B<SOCK_PACKET>."
13246 msgstr ""
13247
13248 #. type: Plain text
13249 #: build/C/man7/packet.7:542
13250 msgid ""
13251 "The include file I<E<lt>netpacket/packet.hE<gt>> is present since glibc "
13252 "2.1.  Older systems need:"
13253 msgstr ""
13254
13255 #. type: Plain text
13256 #: build/C/man7/packet.7:548
13257 #, no-wrap
13258 msgid ""
13259 "#include E<lt>asm/types.hE<gt>\n"
13260 "#include E<lt>linux/if_packet.hE<gt>\n"
13261 "#include E<lt>linux/if_ether.hE<gt>  /* The L2 protocols */\n"
13262 msgstr ""
13263
13264 #. type: Plain text
13265 #: build/C/man7/packet.7:558
13266 msgid ""
13267 "For portable programs it is suggested to use B<AF_PACKET> via B<pcap>(3); "
13268 "although this covers only a subset of the B<AF_PACKET> features."
13269 msgstr ""
13270
13271 #. type: Plain text
13272 #: build/C/man7/packet.7:579
13273 msgid ""
13274 "The B<SOCK_DGRAM> packet sockets make no attempt to create or parse the IEEE "
13275 "802.2 LLC header for a IEEE 802.3 frame.  When B<ETH_P_802_3> is specified "
13276 "as protocol for sending the kernel creates the 802.3 frame and fills out the "
13277 "length field; the user has to supply the LLC header to get a fully "
13278 "conforming packet.  Incoming 802.3 packets are not multiplexed on the "
13279 "DSAP/SSAP protocol fields; instead they are supplied to the user as protocol "
13280 "B<ETH_P_802_2> with the LLC header prefixed.  It is thus not possible to "
13281 "bind to B<ETH_P_802_3>; bind to B<ETH_P_802_2> instead and do the protocol "
13282 "multiplex yourself.  The default for sending is the standard Ethernet DIX "
13283 "encapsulation with the protocol filled in."
13284 msgstr ""
13285
13286 #. type: Plain text
13287 #: build/C/man7/packet.7:581
13288 msgid "Packet sockets are not subject to the input or output firewall chains."
13289 msgstr ""
13290
13291 #. type: Plain text
13292 #: build/C/man7/packet.7:591
13293 msgid ""
13294 "In Linux 2.0, the only way to get a packet socket was by calling "
13295 "B<socket(AF_INET, SOCK_PACKET, >I<protocol>B<)>.  This is still supported "
13296 "but strongly deprecated.  The main difference between the two methods is "
13297 "that B<SOCK_PACKET> uses the old I<struct sockaddr_pkt> to specify an "
13298 "interface, which doesn't provide physical layer independence."
13299 msgstr ""
13300
13301 #. type: Plain text
13302 #: build/C/man7/packet.7:599
13303 #, no-wrap
13304 msgid ""
13305 "struct sockaddr_pkt {\n"
13306 "    unsigned short spkt_family;\n"
13307 "    unsigned char  spkt_device[14];\n"
13308 "    unsigned short spkt_protocol;\n"
13309 "};\n"
13310 msgstr ""
13311
13312 #. type: Plain text
13313 #: build/C/man7/packet.7:611
13314 msgid ""
13315 "I<spkt_family> contains the device type, I<spkt_protocol> is the IEEE 802.3 "
13316 "protocol type as defined in I<E<lt>sys/if_ether.hE<gt>> and I<spkt_device> "
13317 "is the device name as a null-terminated string, for example, eth0."
13318 msgstr ""
13319
13320 #. type: Plain text
13321 #: build/C/man7/packet.7:613
13322 msgid "This structure is obsolete and should not be used in new code."
13323 msgstr ""
13324
13325 #. type: Plain text
13326 #: build/C/man7/packet.7:617
13327 msgid ""
13328 "glibc 2.1 does not have a define for B<SOL_PACKET>.  The suggested "
13329 "workaround is to use:"
13330 msgstr ""
13331
13332 #. type: Plain text
13333 #: build/C/man7/packet.7:623
13334 #, no-wrap
13335 msgid ""
13336 "#ifndef SOL_PACKET\n"
13337 "#define SOL_PACKET 263\n"
13338 "#endif\n"
13339 msgstr ""
13340
13341 #. type: Plain text
13342 #: build/C/man7/packet.7:628
13343 msgid ""
13344 "This is fixed in later glibc versions and also does not occur on libc5 "
13345 "systems."
13346 msgstr ""
13347
13348 #. type: Plain text
13349 #: build/C/man7/packet.7:630
13350 msgid "The IEEE 802.2/803.3 LLC handling could be considered as a bug."
13351 msgstr ""
13352
13353 #. type: Plain text
13354 #: build/C/man7/packet.7:632
13355 msgid "Socket filters are not documented."
13356 msgstr ""
13357
13358 #.  .SH CREDITS
13359 #.  This man page was written by Andi Kleen with help from Matthew Wilcox.
13360 #.  AF_PACKET in Linux 2.2 was implemented
13361 #.  by Alexey Kuznetsov, based on code by Alan Cox and others.
13362 #. type: Plain text
13363 #: build/C/man7/packet.7:644
13364 msgid ""
13365 "The B<MSG_TRUNC> B<recvmsg>(2)  extension is an ugly hack and should be "
13366 "replaced by a control message.  There is currently no way to get the "
13367 "original destination address of packets via B<SOCK_DGRAM>."
13368 msgstr ""
13369
13370 #. type: Plain text
13371 #: build/C/man7/packet.7:651
13372 msgid ""
13373 "B<socket>(2), B<pcap>(3), B<capabilities>(7), B<ip>(7), B<raw>(7), "
13374 "B<socket>(7)"
13375 msgstr ""
13376
13377 #. type: Plain text
13378 #: build/C/man7/packet.7:654
13379 msgid ""
13380 "RFC\\ 894 for the standard IP Ethernet encapsulation.  RFC\\ 1700 for the "
13381 "IEEE 802.3 IP encapsulation."
13382 msgstr ""
13383
13384 #. type: Plain text
13385 #: build/C/man7/packet.7:658
13386 msgid "The I<E<lt>linux/if_ether.hE<gt>> include file for physical layer protocols."
13387 msgstr ""
13388
13389 #. type: Plain text
13390 #: build/C/man7/packet.7:667
13391 msgid ""
13392 "The Linux kernel source tree.  I</Documentation/networking/filter.txt> "
13393 "describes how to apply Berkeley Packet Filters to packet sockets.  "
13394 "I</tools/testing/selftests/net/psock_tpacket.c> contains example source code "
13395 "for all available versions of B<PACKET_RX_RING> and B<PACKET_TX_RING>."
13396 msgstr ""
13397
13398 #. type: TH
13399 #: build/C/man5/protocols.5:29
13400 #, no-wrap
13401 msgid "PROTOCOLS"
13402 msgstr ""
13403
13404 #. type: TH
13405 #: build/C/man5/protocols.5:29 build/C/man7/x25.7:12
13406 #, no-wrap
13407 msgid "2012-08-05"
13408 msgstr ""
13409
13410 #. type: Plain text
13411 #: build/C/man5/protocols.5:32
13412 msgid "protocols - protocols definition file"
13413 msgstr ""
13414
13415 #. type: Plain text
13416 #: build/C/man5/protocols.5:40
13417 msgid ""
13418 "This file is a plain ASCII file, describing the various DARPA internet "
13419 "protocols that are available from the TCP/IP subsystem.  It should be "
13420 "consulted instead of using the numbers in the ARPA include files, or, even "
13421 "worse, just guessing them.  These numbers will occur in the protocol field "
13422 "of any IP header."
13423 msgstr ""
13424
13425 #.  .. by the DDN Network Information Center.
13426 #. type: Plain text
13427 #: build/C/man5/protocols.5:46
13428 msgid ""
13429 "Keep this file untouched since changes would result in incorrect IP "
13430 "packages.  Protocol numbers and names are specified by the IANA (Internet "
13431 "Assigned Numbers Authority)."
13432 msgstr ""
13433
13434 #. type: Plain text
13435 #: build/C/man5/protocols.5:48
13436 msgid "Each line is of the following format:"
13437 msgstr ""
13438
13439 #. type: Plain text
13440 #: build/C/man5/protocols.5:51
13441 msgid "I<protocol number aliases ...>"
13442 msgstr ""
13443
13444 #. type: Plain text
13445 #: build/C/man5/protocols.5:57
13446 msgid ""
13447 "where the fields are delimited by spaces or tabs.  Empty lines are ignored.  "
13448 "If a line contains a hash mark (#), the hash mark and the part of the line "
13449 "following it are ignored."
13450 msgstr ""
13451
13452 #. type: TP
13453 #: build/C/man5/protocols.5:59 build/C/man5/services.5:109
13454 #, no-wrap
13455 msgid "I<protocol>"
13456 msgstr ""
13457
13458 #. type: Plain text
13459 #: build/C/man5/protocols.5:67
13460 msgid "the native name for the protocol.  For example I<ip>, I<tcp>, or I<udp>."
13461 msgstr ""
13462
13463 #. type: Plain text
13464 #: build/C/man5/protocols.5:71
13465 msgid ""
13466 "the official number for this protocol as it will appear within the IP "
13467 "header."
13468 msgstr ""
13469
13470 #. type: Plain text
13471 #: build/C/man5/protocols.5:74
13472 msgid "optional aliases for the protocol."
13473 msgstr ""
13474
13475 #.  The following is not true as at glibc 2.8 (a line with a comma is
13476 #.  ignored by getservent()); it's not clear if/when it was ever true.
13477 #.    As a backward compatibility feature, the slash (/) between the
13478 #.    .I port
13479 #.    number and
13480 #.    .I protocol
13481 #.    name can in fact be either a slash or a comma (,).
13482 #.    Use of the comma in
13483 #.    modern installations is deprecated.
13484 #. type: Plain text
13485 #: build/C/man5/protocols.5:77 build/C/man5/services.5:165
13486 msgid ""
13487 "This file might be distributed over a network using a network-wide naming "
13488 "service like Yellow Pages/NIS or BIND/Hesiod."
13489 msgstr ""
13490
13491 #. type: Plain text
13492 #: build/C/man5/protocols.5:81
13493 msgid "The protocols definition file."
13494 msgstr ""
13495
13496 #. type: Plain text
13497 #: build/C/man5/protocols.5:83
13498 msgid "B<getprotoent>(3)"
13499 msgstr ""
13500
13501 #. type: Plain text
13502 #: build/C/man5/protocols.5:86
13503 msgid "E<.UR http://www.iana.org\\:/assignments\\:/protocol-numbers> E<.UE>"
13504 msgstr ""
13505
13506 #. type: TH
13507 #: build/C/man7/raw.7:13
13508 #, no-wrap
13509 msgid "RAW"
13510 msgstr ""
13511
13512 #. type: Plain text
13513 #: build/C/man7/raw.7:16
13514 msgid "raw - Linux IPv4 raw sockets"
13515 msgstr ""
13516
13517 #. type: Plain text
13518 #: build/C/man7/raw.7:22
13519 msgid "B<raw_socket = socket(AF_INET, SOCK_RAW, int >I<protocol>B<);>"
13520 msgstr ""
13521
13522 #. type: Plain text
13523 #: build/C/man7/raw.7:26
13524 msgid ""
13525 "Raw sockets allow new IPv4 protocols to be implemented in user space.  A raw "
13526 "socket receives or sends the raw datagram not including link level headers."
13527 msgstr ""
13528
13529 #. type: Plain text
13530 #: build/C/man7/raw.7:32
13531 msgid ""
13532 "The IPv4 layer generates an IP header when sending a packet unless the "
13533 "B<IP_HDRINCL> socket option is enabled on the socket.  When it is enabled, "
13534 "the packet must contain an IP header.  For receiving the IP header is always "
13535 "included in the packet."
13536 msgstr ""
13537
13538 #. type: Plain text
13539 #: build/C/man7/raw.7:36
13540 msgid ""
13541 "Only processes with an effective user ID of 0 or the B<CAP_NET_RAW> "
13542 "capability are allowed to open raw sockets."
13543 msgstr ""
13544
13545 #. type: Plain text
13546 #: build/C/man7/raw.7:43
13547 msgid ""
13548 "All packets or errors matching the I<protocol> number specified for the raw "
13549 "socket are passed to this socket.  For a list of the allowed protocols see "
13550 "RFC\\ 1700 assigned numbers and B<getprotobyname>(3)."
13551 msgstr ""
13552
13553 #. type: Plain text
13554 #: build/C/man7/raw.7:53
13555 msgid ""
13556 "A protocol of B<IPPROTO_RAW> implies enabled B<IP_HDRINCL> and is able to "
13557 "send any IP protocol that is specified in the passed header.  Receiving of "
13558 "all IP protocols via B<IPPROTO_RAW> is not possible using raw sockets."
13559 msgstr ""
13560
13561 #. type: tbl table
13562 #: build/C/man7/raw.7:58
13563 #, no-wrap
13564 msgid "IP Header fields modified on sending by B<IP_HDRINCL>\n"
13565 msgstr ""
13566
13567 #. type: tbl table
13568 #: build/C/man7/raw.7:59
13569 #, no-wrap
13570 msgid "IP Checksum:Always filled in.\n"
13571 msgstr ""
13572
13573 #. type: tbl table
13574 #: build/C/man7/raw.7:60
13575 #, no-wrap
13576 msgid "Source Address:Filled in when zero.\n"
13577 msgstr ""
13578
13579 #. type: tbl table
13580 #: build/C/man7/raw.7:61
13581 #, no-wrap
13582 msgid "Packet Id:Filled in when zero.\n"
13583 msgstr ""
13584
13585 #. type: tbl table
13586 #: build/C/man7/raw.7:62
13587 #, no-wrap
13588 msgid "Total Length:Always filled in.\n"
13589 msgstr ""
13590
13591 #. type: Plain text
13592 #: build/C/man7/raw.7:76
13593 msgid ""
13594 "If B<IP_HDRINCL> is specified and the IP header has a nonzero destination "
13595 "address, then the destination address of the socket is used to route the "
13596 "packet.  When B<MSG_DONTROUTE> is specified, the destination address should "
13597 "refer to a local interface, otherwise a routing table lookup is done anyway "
13598 "but gatewayed routes are ignored."
13599 msgstr ""
13600
13601 #. type: Plain text
13602 #: build/C/man7/raw.7:84
13603 msgid ""
13604 "If B<IP_HDRINCL> isn't set, then IP header options can be set on raw sockets "
13605 "with B<setsockopt>(2); see B<ip>(7)  for more information."
13606 msgstr ""
13607
13608 #. type: Plain text
13609 #: build/C/man7/raw.7:89
13610 msgid ""
13611 "In Linux 2.2, all IP header fields and options can be set using IP socket "
13612 "options.  This means raw sockets are usually needed only for new protocols "
13613 "or protocols with no user interface (like ICMP)."
13614 msgstr ""
13615
13616 #. type: Plain text
13617 #: build/C/man7/raw.7:93
13618 msgid ""
13619 "When a packet is received, it is passed to any raw sockets which have been "
13620 "bound to its protocol before it is passed to other protocol handlers (e.g., "
13621 "kernel protocol modules)."
13622 msgstr ""
13623
13624 #. type: Plain text
13625 #: build/C/man7/raw.7:109
13626 msgid ""
13627 "Raw sockets use the standard I<sockaddr_in> address structure defined in "
13628 "B<ip>(7).  The I<sin_port> field could be used to specify the IP protocol "
13629 "number, but it is ignored for sending in Linux 2.2 and should be always set "
13630 "to 0 (see BUGS).  For incoming packets, I<sin_port> is set to the protocol "
13631 "of the packet.  See the I<E<lt>netinet/in.hE<gt>> include file for valid IP "
13632 "protocols."
13633 msgstr ""
13634
13635 #.  Or SOL_RAW on Linux
13636 #. type: Plain text
13637 #: build/C/man7/raw.7:118
13638 msgid ""
13639 "Raw socket options can be set with B<setsockopt>(2)  and read with "
13640 "B<getsockopt>(2)  by passing the B<IPPROTO_RAW> family flag."
13641 msgstr ""
13642
13643 #. type: TP
13644 #: build/C/man7/raw.7:118
13645 #, no-wrap
13646 msgid "B<ICMP_FILTER>"
13647 msgstr ""
13648
13649 #. type: Plain text
13650 #: build/C/man7/raw.7:126
13651 msgid ""
13652 "Enable a special filter for raw sockets bound to the B<IPPROTO_ICMP> "
13653 "protocol.  The value has a bit set for each ICMP message type which should "
13654 "be filtered out.  The default is to filter no ICMP messages."
13655 msgstr ""
13656
13657 #. type: Plain text
13658 #: build/C/man7/raw.7:131
13659 msgid ""
13660 "In addition, all B<ip>(7)  B<IPPROTO_IP> socket options valid for datagram "
13661 "sockets are supported."
13662 msgstr ""
13663
13664 #. type: Plain text
13665 #: build/C/man7/raw.7:144
13666 msgid ""
13667 "Errors originating from the network are passed to the user only when the "
13668 "socket is connected or the B<IP_RECVERR> flag is enabled.  For connected "
13669 "sockets, only B<EMSGSIZE> and B<EPROTO> are passed for compatibility.  With "
13670 "B<IP_RECVERR>, all network errors are saved in the error queue."
13671 msgstr ""
13672
13673 #. type: Plain text
13674 #: build/C/man7/raw.7:149
13675 msgid ""
13676 "User tried to send to a broadcast address without having the broadcast flag "
13677 "set on the socket."
13678 msgstr ""
13679
13680 #. type: Plain text
13681 #: build/C/man7/raw.7:152
13682 msgid "An invalid memory address was supplied."
13683 msgstr ""
13684
13685 #. type: Plain text
13686 #: build/C/man7/raw.7:162
13687 msgid ""
13688 "Packet too big.  Either Path MTU Discovery is enabled (the "
13689 "B<IP_MTU_DISCOVER> socket flag) or the packet size exceeds the maximum "
13690 "allowed IPv4 packet size of 64KB."
13691 msgstr ""
13692
13693 #. type: TP
13694 #: build/C/man7/raw.7:162 build/C/man7/unix.7:364
13695 #, no-wrap
13696 msgid "B<EOPNOTSUPP>"
13697 msgstr ""
13698
13699 #. type: Plain text
13700 #: build/C/man7/raw.7:166
13701 msgid "Invalid flag has been passed to a socket call (like B<MSG_OOB>)."
13702 msgstr ""
13703
13704 #. type: Plain text
13705 #: build/C/man7/raw.7:172
13706 msgid ""
13707 "The user doesn't have permission to open raw sockets.  Only processes with "
13708 "an effective user ID of 0 or the B<CAP_NET_RAW> attribute may do that."
13709 msgstr ""
13710
13711 #. type: TP
13712 #: build/C/man7/raw.7:172
13713 #, no-wrap
13714 msgid "B<EPROTO>"
13715 msgstr ""
13716
13717 #. type: Plain text
13718 #: build/C/man7/raw.7:175
13719 msgid "An ICMP error has arrived reporting a parameter problem."
13720 msgstr ""
13721
13722 #. type: Plain text
13723 #: build/C/man7/raw.7:181
13724 msgid ""
13725 "B<IP_RECVERR> and B<ICMP_FILTER> are new in Linux 2.2.  They are Linux "
13726 "extensions and should not be used in portable programs."
13727 msgstr ""
13728
13729 #. type: Plain text
13730 #: build/C/man7/raw.7:187
13731 msgid ""
13732 "Linux 2.0 enabled some bug-to-bug compatibility with BSD in the raw socket "
13733 "code when the B<SO_BSDCOMPAT> socket option was set \\(em since Linux 2.2, "
13734 "this option no longer has that effect."
13735 msgstr ""
13736
13737 #. type: Plain text
13738 #: build/C/man7/raw.7:205
13739 msgid ""
13740 "By default, raw sockets do path MTU (Maximum Transmission Unit) discovery.  "
13741 "This means the kernel will keep track of the MTU to a specific target IP "
13742 "address and return B<EMSGSIZE> when a raw packet write exceeds it.  When "
13743 "this happens, the application should decrease the packet size.  Path MTU "
13744 "discovery can be also turned off using the B<IP_MTU_DISCOVER> socket option "
13745 "or the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file, see B<ip>(7)  for "
13746 "details.  When turned off, raw sockets will fragment outgoing packets that "
13747 "exceed the interface MTU.  However, disabling it is not recommended for "
13748 "performance and reliability reasons."
13749 msgstr ""
13750
13751 #. type: Plain text
13752 #: build/C/man7/raw.7:214
13753 msgid ""
13754 "A raw socket can be bound to a specific local address using the B<bind>(2)  "
13755 "call.  If it isn't bound, all packets with the specified IP protocol are "
13756 "received.  In addition, a RAW socket can be bound to a specific network "
13757 "device using B<SO_BINDTODEVICE>; see B<socket>(7)."
13758 msgstr ""
13759
13760 #. type: Plain text
13761 #: build/C/man7/raw.7:225
13762 msgid ""
13763 "An B<IPPROTO_RAW> socket is send only.  If you really want to receive all IP "
13764 "packets, use a B<packet>(7)  socket with the B<ETH_P_IP> protocol.  Note "
13765 "that packet sockets don't reassemble IP fragments, unlike raw sockets."
13766 msgstr ""
13767
13768 #. type: Plain text
13769 #: build/C/man7/raw.7:231
13770 msgid ""
13771 "If you want to receive all ICMP packets for a datagram socket, it is often "
13772 "better to use B<IP_RECVERR> on that particular socket; see B<ip>(7)."
13773 msgstr ""
13774
13775 #. type: Plain text
13776 #: build/C/man7/raw.7:238
13777 msgid ""
13778 "Raw sockets may tap all IP protocols in Linux, even protocols like ICMP or "
13779 "TCP which have a protocol module in the kernel.  In this case, the packets "
13780 "are passed to both the kernel module and the raw socket(s).  This should not "
13781 "be relied upon in portable programs, many other BSD socket implementation "
13782 "have limitations here."
13783 msgstr ""
13784
13785 #. type: Plain text
13786 #: build/C/man7/raw.7:243
13787 msgid ""
13788 "Linux never changes headers passed from the user (except for filling in some "
13789 "zeroed fields as described for B<IP_HDRINCL>).  This differs from many other "
13790 "implementations of raw sockets."
13791 msgstr ""
13792
13793 #. type: Plain text
13794 #: build/C/man7/raw.7:246
13795 msgid ""
13796 "RAW sockets are generally rather unportable and should be avoided in "
13797 "programs intended to be portable."
13798 msgstr ""
13799
13800 #. type: Plain text
13801 #: build/C/man7/raw.7:252
13802 msgid ""
13803 "Sending on raw sockets should take the IP protocol from I<sin_port>; this "
13804 "ability was lost in Linux 2.2.  The workaround is to use B<IP_HDRINCL>."
13805 msgstr ""
13806
13807 #. type: Plain text
13808 #: build/C/man7/raw.7:254
13809 msgid "Transparent proxy extensions are not described."
13810 msgstr ""
13811
13812 #. type: Plain text
13813 #: build/C/man7/raw.7:259
13814 msgid ""
13815 "When the B<IP_HDRINCL> option is set, datagrams will not be fragmented and "
13816 "are limited to the interface MTU."
13817 msgstr ""
13818
13819 #.  .SH AUTHORS
13820 #.  This man page was written by Andi Kleen.
13821 #. type: Plain text
13822 #: build/C/man7/raw.7:269
13823 msgid ""
13824 "Setting the IP protocol for sending in I<sin_port> got lost in Linux 2.2.  "
13825 "The protocol that the socket was bound to or that was specified in the "
13826 "initial B<socket>(2)  call is always used."
13827 msgstr ""
13828
13829 #. type: Plain text
13830 #: build/C/man7/raw.7:275
13831 msgid "B<recvmsg>(2), B<sendmsg>(2), B<capabilities>(7), B<ip>(7), B<socket>(7)"
13832 msgstr ""
13833
13834 #. type: Plain text
13835 #: build/C/man7/raw.7:282
13836 msgid ""
13837 "B<RFC\\ 1191> for path MTU discovery.  B<RFC\\ 791> and the "
13838 "I<E<lt>linux/ip.hE<gt>> header file for the IP protocol."
13839 msgstr ""
13840
13841 #. type: TH
13842 #: build/C/man3/rcmd.3:43
13843 #, no-wrap
13844 msgid "RCMD"
13845 msgstr ""
13846
13847 #. type: Plain text
13848 #: build/C/man3/rcmd.3:48
13849 msgid ""
13850 "rcmd, rresvport, iruserok, ruserok, rcmd_af, rresvport_af, iruserok_af, "
13851 "ruserok_af - routines for returning a stream to a remote command"
13852 msgstr ""
13853
13854 #. type: Plain text
13855 #: build/C/man3/rcmd.3:51
13856 #, no-wrap
13857 msgid ""
13858 "B<#include E<lt>netdb.hE<gt> \\ \\ >/* Or E<lt>unistd.hE<gt> on some systems "
13859 "*/\n"
13860 msgstr ""
13861
13862 #. type: Plain text
13863 #: build/C/man3/rcmd.3:54
13864 #, no-wrap
13865 msgid ""
13866 "B<int rcmd(char **>I<ahost>B<, unsigned short >I<inport>B<, const char "
13867 "*>I<locuser>B<, >\n"
13868 "B<         const char *>I<remuser>B<, const char *>I<cmd>B<, int "
13869 "*>I<fd2p>B<);>\n"
13870 msgstr ""
13871
13872 #. type: Plain text
13873 #: build/C/man3/rcmd.3:56
13874 #, no-wrap
13875 msgid "B<int rresvport(int *>I<port>B<);>\n"
13876 msgstr ""
13877
13878 #. type: Plain text
13879 #: build/C/man3/rcmd.3:59
13880 #, no-wrap
13881 msgid ""
13882 "B<int iruserok(uint32_t >I<raddr>B<, int >I<superuser>B<, >\n"
13883 "B<             const char *>I<ruser>B<, const char *>I<luser>B<);>\n"
13884 msgstr ""
13885
13886 #. type: Plain text
13887 #: build/C/man3/rcmd.3:62
13888 #, no-wrap
13889 msgid ""
13890 "B<int ruserok(const char *>I<rhost>B<, int >I<superuser>B<, >\n"
13891 "B<            const char *>I<ruser>B<, const char *>I<luser>B<);>\n"
13892 msgstr ""
13893
13894 #. type: Plain text
13895 #: build/C/man3/rcmd.3:66
13896 #, no-wrap
13897 msgid ""
13898 "B<int rcmd_af(char **>I<ahost>B<, unsigned short >I<inport>B<, const char "
13899 "*>I<locuser>B<, >\n"
13900 "B<            const char *>I<remuser>B<, const char *>I<cmd>B<, int "
13901 "*>I<fd2p>B<,>\n"
13902 "B<            sa_family_t >I<af>B<);>\n"
13903 msgstr ""
13904
13905 #. type: Plain text
13906 #: build/C/man3/rcmd.3:68
13907 #, no-wrap
13908 msgid "B<int rresvport_af(int *>I<port>B<, sa_family_t >I<af>B<);>\n"
13909 msgstr ""
13910
13911 #. type: Plain text
13912 #: build/C/man3/rcmd.3:72
13913 #, no-wrap
13914 msgid ""
13915 "B<int iruserok_af(const void *>I<raddr>B<, int >I<superuser>B<, >\n"
13916 "B<                const char *>I<ruser>B<, const char *>I<luser>B<, "
13917 "sa_family_t >I<af>B<);>\n"
13918 msgstr ""
13919
13920 #. type: Plain text
13921 #: build/C/man3/rcmd.3:76
13922 #, no-wrap
13923 msgid ""
13924 "B<int ruserok_af(const char *>I<rhost>B<, int >I<superuser>B<, >\n"
13925 "B<               const char *>I<ruser>B<, const char *>I<luser>B<, "
13926 "sa_family_t >I<af>B<);>\n"
13927 msgstr ""
13928
13929 #. type: Plain text
13930 #: build/C/man3/rcmd.3:92
13931 msgid ""
13932 "B<rcmd>(), B<rcmd_af>(), B<rresvport>(), B<rresvport_af>(), B<iruserok>(), "
13933 "B<iruserok_af>(), B<ruserok>(), B<ruserok_af>(): _BSD_SOURCE"
13934 msgstr ""
13935
13936 #. type: Plain text
13937 #: build/C/man3/rcmd.3:113
13938 msgid ""
13939 "The B<rcmd>()  function is used by the superuser to execute a command on a "
13940 "remote machine using an authentication scheme based on privileged port "
13941 "numbers.  The B<rresvport>()  function returns a descriptor to a socket with "
13942 "an address in the privileged port space.  The B<iruserok>()  and "
13943 "B<ruserok>()  functions are used by servers to authenticate clients "
13944 "requesting service with B<rcmd>().  All four functions are used by the "
13945 "B<rshd>(8)  server (among others)."
13946 msgstr ""
13947
13948 #. type: SS
13949 #: build/C/man3/rcmd.3:113
13950 #, no-wrap
13951 msgid "rcmd()"
13952 msgstr ""
13953
13954 #. type: Plain text
13955 #: build/C/man3/rcmd.3:129
13956 msgid ""
13957 "The B<rcmd>()  function looks up the host I<*ahost> using "
13958 "B<gethostbyname>(3), returning -1 if the host does not exist.  Otherwise, "
13959 "I<*ahost> is set to the standard name of the host and a connection is "
13960 "established to a server residing at the well-known Internet port I<inport>."
13961 msgstr ""
13962
13963 #. type: Plain text
13964 #: build/C/man3/rcmd.3:158
13965 msgid ""
13966 "If the connection succeeds, a socket in the Internet domain of type "
13967 "B<SOCK_STREAM> is returned to the caller, and given to the remote command as "
13968 "I<stdin> and I<stdout>.  If I<fd2p> is nonzero, then an auxiliary channel to "
13969 "a control process will be set up, and a descriptor for it will be placed in "
13970 "I<*fd2p>.  The control process will return diagnostic output from the "
13971 "command (unit 2) on this channel, and will also accept bytes on this channel "
13972 "as being UNIX signal numbers, to be forwarded to the process group of the "
13973 "command.  If I<fd2p> is 0, then the I<stderr> (unit 2 of the remote command) "
13974 "will be made the same as the I<stdout> and no provision is made for sending "
13975 "arbitrary signals to the remote process, although you may be able to get its "
13976 "attention by using out-of-band data."
13977 msgstr ""
13978
13979 #. type: Plain text
13980 #: build/C/man3/rcmd.3:161
13981 msgid "The protocol is described in detail in B<rshd>(8)."
13982 msgstr ""
13983
13984 #. type: SS
13985 #: build/C/man3/rcmd.3:161
13986 #, no-wrap
13987 msgid "rresvport()"
13988 msgstr ""
13989
13990 #. type: Plain text
13991 #: build/C/man3/rcmd.3:183
13992 msgid ""
13993 "The B<rresvport>()  function is used to obtain a socket with a privileged "
13994 "port bound to it.  This socket is suitable for use by B<rcmd>()  and several "
13995 "other functions.  Privileged ports are those in the range 0 to 1023.  Only a "
13996 "privileged process (B<CAP_NET_BIND_SERVICE>)  is allowed to bind to a "
13997 "privileged port.  In the glibc implementation, this function restricts its "
13998 "search to the ports from 512 to 1023.  The I<port> argument is value-result: "
13999 "the value it supplies to the call is used as the starting point for a "
14000 "circular search of the port range; on (successful) return, it contains the "
14001 "port number that was bound to."
14002 msgstr ""
14003
14004 #. type: SS
14005 #: build/C/man3/rcmd.3:183
14006 #, no-wrap
14007 msgid "iruserok() and ruserok()"
14008 msgstr ""
14009
14010 #. type: Plain text
14011 #: build/C/man3/rcmd.3:201
14012 msgid ""
14013 "The B<iruserok>()  and B<ruserok>()  functions take a remote host's IP "
14014 "address or name, respectively, two usernames and a flag indicating whether "
14015 "the local user's name is that of the superuser.  Then, if the user is I<not> "
14016 "the superuser, it checks the I</etc/hosts.equiv> file.  If that lookup is "
14017 "not done, or is unsuccessful, the I<.rhosts> in the local user's home "
14018 "directory is checked to see if the request for service is allowed."
14019 msgstr ""
14020
14021 #. type: Plain text
14022 #: build/C/man3/rcmd.3:217
14023 msgid ""
14024 "If this file does not exist, is not a regular file, is owned by anyone other "
14025 "than the user or the superuser, or is writable by anyone other than the "
14026 "owner, the check automatically fails.  Zero is returned if the machine name "
14027 "is listed in the I<hosts.equiv> file, or the host and remote username are "
14028 "found in the I<.rhosts> file; otherwise B<iruserok>()  and B<ruserok>()  "
14029 "return -1.  If the local domain (as obtained from B<gethostname>(2))  is the "
14030 "same as the remote domain, only the machine name need be specified."
14031 msgstr ""
14032
14033 #. type: Plain text
14034 #: build/C/man3/rcmd.3:223
14035 msgid ""
14036 "If the IP address of the remote host is known, B<iruserok>()  should be used "
14037 "in preference to B<ruserok>(), as it does not require trusting the DNS "
14038 "server for the remote host's domain."
14039 msgstr ""
14040
14041 #. type: SS
14042 #: build/C/man3/rcmd.3:223
14043 #, no-wrap
14044 msgid "*_af() variants"
14045 msgstr ""
14046
14047 #. type: Plain text
14048 #: build/C/man3/rcmd.3:239
14049 msgid ""
14050 "All of the functions described above work with IPv4 (B<AF_INET>)  sockets.  "
14051 "The \"_af\" variants take an extra argument that allows the socket address "
14052 "family to be specified.  For these functions, the I<af> argument can be "
14053 "specified as B<AF_INET> or B<AF_INET6>.  In addition, B<rcmd_af>()  supports "
14054 "the use of B<AF_UNSPEC>."
14055 msgstr ""
14056
14057 #. type: Plain text
14058 #: build/C/man3/rcmd.3:245
14059 msgid ""
14060 "The B<rcmd>()  function returns a valid socket descriptor on success.  It "
14061 "returns -1 on error and prints a diagnostic message on the standard error."
14062 msgstr ""
14063
14064 #. type: Plain text
14065 #: build/C/man3/rcmd.3:256
14066 msgid ""
14067 "The B<rresvport>()  function returns a valid, bound socket descriptor on "
14068 "success.  It returns -1 on error with the global value I<errno> set "
14069 "according to the reason for failure.  The error code B<EAGAIN> is overloaded "
14070 "to mean \"All network ports in use.\""
14071 msgstr ""
14072
14073 #. type: Plain text
14074 #: build/C/man3/rcmd.3:262
14075 msgid ""
14076 "For information on the return from B<ruserok>()  and B<iruserok>(), see "
14077 "above."
14078 msgstr ""
14079
14080 #. type: Plain text
14081 #: build/C/man3/rcmd.3:270
14082 msgid ""
14083 "The functions B<iruserok_af>(), B<rcmd_af>(), B<rresvport_af>(), and "
14084 "B<ruserok_af>()  functions are provide in glibc since version 2.2."
14085 msgstr ""
14086
14087 #. type: Plain text
14088 #: build/C/man3/rcmd.3:278
14089 msgid ""
14090 "Not in POSIX.1-2001.  Present on the BSDs, Solaris, and many other systems.  "
14091 "These functions appeared in 4.2BSD.  The \"_af\" variants are more recent "
14092 "additions, and are not present on as wide a range of systems."
14093 msgstr ""
14094
14095 #.  Bug filed 25 Nov 2007:
14096 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=5399
14097 #. type: Plain text
14098 #: build/C/man3/rcmd.3:285
14099 msgid ""
14100 "B<iruserok>()  and B<iruserok_af>()  are declared in glibc headers only "
14101 "since version 2.12."
14102 msgstr ""
14103
14104 #. type: Plain text
14105 #: build/C/man3/rcmd.3:293
14106 msgid ""
14107 "B<rlogin>(1), B<rsh>(1), B<intro>(2), B<rexec>(3), B<rexecd>(8), "
14108 "B<rlogind>(8), B<rshd>(8)"
14109 msgstr ""
14110
14111 #. type: TH
14112 #: build/C/man5/resolv.conf.5:23
14113 #, no-wrap
14114 msgid "RESOLV.CONF"
14115 msgstr ""
14116
14117 #. type: TH
14118 #: build/C/man5/resolv.conf.5:23
14119 #, no-wrap
14120 msgid "2014-02-22"
14121 msgstr ""
14122
14123 #. type: Plain text
14124 #: build/C/man5/resolv.conf.5:27
14125 msgid "resolv.conf - resolver configuration file"
14126 msgstr ""
14127
14128 #. type: Plain text
14129 #: build/C/man5/resolv.conf.5:29
14130 msgid "B</etc/resolv.conf>"
14131 msgstr ""
14132
14133 #. type: Plain text
14134 #: build/C/man5/resolv.conf.5:41
14135 msgid ""
14136 "The I<resolver> is a set of routines in the C library that provide access to "
14137 "the Internet Domain Name System (DNS).  The resolver configuration file "
14138 "contains information that is read by the resolver routines the first time "
14139 "they are invoked by a process.  The file is designed to be human readable "
14140 "and contains a list of keywords with values that provide various types of "
14141 "resolver information.  The configuration file is considered a trusted source "
14142 "of DNS information (e.g., DNSSEC AD-bit information will be returned "
14143 "unmodified from this source)."
14144 msgstr ""
14145
14146 #. type: Plain text
14147 #: build/C/man5/resolv.conf.5:46
14148 msgid ""
14149 "If this file does not exist, only the name server on the local machine will "
14150 "be queried; the domain name is determined from the hostname and the domain "
14151 "search path is constructed from the domain name."
14152 msgstr ""
14153
14154 #. type: Plain text
14155 #: build/C/man5/resolv.conf.5:48
14156 msgid "The different configuration options are:"
14157 msgstr ""
14158
14159 #. type: TP
14160 #: build/C/man5/resolv.conf.5:48
14161 #, no-wrap
14162 msgid "B<nameserver> Name server IP address"
14163 msgstr ""
14164
14165 #. type: Plain text
14166 #: build/C/man5/resolv.conf.5:65
14167 msgid ""
14168 "Internet address of a name server that the resolver should query, either an "
14169 "IPv4 address (in dot notation), or an IPv6 address in colon (and possibly "
14170 "dot) notation as per RFC 2373.  Up to B<MAXNS> (currently 3, see "
14171 "I<E<lt>resolv.hE<gt>>) name servers may be listed, one per keyword.  If "
14172 "there are multiple servers, the resolver library queries them in the order "
14173 "listed.  If no B<nameserver> entries are present, the default is to use the "
14174 "name server on the local machine.  (The algorithm used is to try a name "
14175 "server, and if the query times out, try the next, until out of name servers, "
14176 "then repeat trying all the name servers until a maximum number of retries "
14177 "are made.)"
14178 msgstr ""
14179
14180 #. type: TP
14181 #: build/C/man5/resolv.conf.5:65
14182 #, no-wrap
14183 msgid "B<domain> Local domain name."
14184 msgstr ""
14185
14186 #. type: Plain text
14187 #: build/C/man5/resolv.conf.5:76
14188 msgid ""
14189 "Most queries for names within this domain can use short names relative to "
14190 "the local domain.  If set to \\(aq.\\(aq, the root domain is considered.  If "
14191 "no B<domain> entry is present, the domain is determined from the local "
14192 "hostname returned by B<gethostname>(2); the domain part is taken to be "
14193 "everything after the first \\(aq.\\(aq.  Finally, if the hostname does not "
14194 "contain a domain part, the root domain is assumed."
14195 msgstr ""
14196
14197 #. type: TP
14198 #: build/C/man5/resolv.conf.5:76
14199 #, no-wrap
14200 msgid "B<search> Search list for host-name lookup."
14201 msgstr ""
14202
14203 #.  When having a resolv.conv with a line
14204 #.   search subdomain.domain.tld domain.tld
14205 #.  and doing a hostlookup, for example by
14206 #.   ping host.anothersubdomain
14207 #.  it sends dns-requests for
14208 #.   host.anothersubdomain.
14209 #.   host.anothersubdomain.subdomain.domain.tld.
14210 #.   host.anothersubdomain.domain.tld.
14211 #.  thus not only causing unnecessary traffic for the root-dns-servers
14212 #.  but broadcasting information to the outside and making man-in-the-middle
14213 #.  attacks possible.
14214 #. type: Plain text
14215 #: build/C/man5/resolv.conf.5:106
14216 msgid ""
14217 "The search list is normally determined from the local domain name; by "
14218 "default, it contains only the local domain name.  This may be changed by "
14219 "listing the desired domain search path following the I<search> keyword with "
14220 "spaces or tabs separating the names.  Resolver queries having fewer than "
14221 "I<ndots> dots (default is 1) in them will be attempted using each component "
14222 "of the search path in turn until a match is found.  For environments with "
14223 "multiple subdomains please read B<options ndots:>I<n> below to avoid "
14224 "man-in-the-middle attacks and unnecessary traffic for the root-dns-servers.  "
14225 "Note that this process may be slow and will generate a lot of network "
14226 "traffic if the servers for the listed domains are not local, and that "
14227 "queries will time out if no server is available for one of the domains."
14228 msgstr ""
14229
14230 #. type: Plain text
14231 #: build/C/man5/resolv.conf.5:109
14232 msgid ""
14233 "The search list is currently limited to six domains with a total of 256 "
14234 "characters."
14235 msgstr ""
14236
14237 #. type: TP
14238 #: build/C/man5/resolv.conf.5:109
14239 #, no-wrap
14240 msgid "B<sortlist>"
14241 msgstr ""
14242
14243 #. type: Plain text
14244 #: build/C/man5/resolv.conf.5:122
14245 msgid ""
14246 "This option allows addresses returned by B<gethostbyname>(3)  to be sorted.  "
14247 "A sortlist is specified by IP-address-netmask pairs.  The netmask is "
14248 "optional and defaults to the natural netmask of the net.  The IP address and "
14249 "optional network pairs are separated by slashes.  Up to 10 pairs may be "
14250 "specified.  Here is an example:"
14251 msgstr ""
14252
14253 #. type: Plain text
14254 #: build/C/man5/resolv.conf.5:125
14255 msgid "sortlist 130.155.160.0/255.255.240.0 130.155.0.0"
14256 msgstr ""
14257
14258 #. type: TP
14259 #: build/C/man5/resolv.conf.5:127
14260 #, no-wrap
14261 msgid "B<options>"
14262 msgstr ""
14263
14264 #. type: Plain text
14265 #: build/C/man5/resolv.conf.5:131
14266 msgid ""
14267 "Options allows certain internal resolver variables to be modified.  The "
14268 "syntax is"
14269 msgstr ""
14270
14271 #. type: Plain text
14272 #: build/C/man5/resolv.conf.5:134
14273 msgid "B<options> I<option> I<...>"
14274 msgstr ""
14275
14276 #. type: Plain text
14277 #: build/C/man5/resolv.conf.5:136
14278 msgid "where I<option> is one of the following:"
14279 msgstr ""
14280
14281 #. type: TP
14282 #: build/C/man5/resolv.conf.5:136
14283 #, no-wrap
14284 msgid "B<debug>"
14285 msgstr ""
14286
14287 #.  Since glibc 2.2?
14288 #. type: Plain text
14289 #: build/C/man5/resolv.conf.5:145
14290 msgid ""
14291 "sets B<RES_DEBUG> in I<_res.options> (effective only if glibc was built with "
14292 "debug support; see B<resolver>(3))."
14293 msgstr ""
14294
14295 #. type: TP
14296 #: build/C/man5/resolv.conf.5:145
14297 #, no-wrap
14298 msgid "B<ndots:>I<n>"
14299 msgstr ""
14300
14301 #.  Since glibc 2.2
14302 #. type: Plain text
14303 #: build/C/man5/resolv.conf.5:159
14304 msgid ""
14305 "sets a threshold for the number of dots which must appear in a name given to "
14306 "B<res_query>(3)  (see B<resolver>(3))  before an I<initial absolute query> "
14307 "will be made.  The default for I<n> is 1, meaning that if there are any dots "
14308 "in a name, the name will be tried first as an absolute name before any "
14309 "I<search list> elements are appended to it.  The value for this option is "
14310 "silently capped to 15."
14311 msgstr ""
14312
14313 #. type: TP
14314 #: build/C/man5/resolv.conf.5:159
14315 #, no-wrap
14316 msgid "B<timeout:>I<n>"
14317 msgstr ""
14318
14319 #.  Since glibc 2.2
14320 #. type: Plain text
14321 #: build/C/man5/resolv.conf.5:170
14322 msgid ""
14323 "sets the amount of time the resolver will wait for a response from a remote "
14324 "name server before retrying the query via a different name server.  Measured "
14325 "in seconds, the default is B<RES_TIMEOUT> (currently 5, see "
14326 "I<E<lt>resolv.hE<gt>>).  The value for this option is silently capped to 30."
14327 msgstr ""
14328
14329 #. type: TP
14330 #: build/C/man5/resolv.conf.5:170
14331 #, no-wrap
14332 msgid "B<attempts:>I<n>"
14333 msgstr ""
14334
14335 #. type: Plain text
14336 #: build/C/man5/resolv.conf.5:179
14337 msgid ""
14338 "sets the number of times the resolver will send a query to its name servers "
14339 "before giving up and returning an error to the calling application.  The "
14340 "default is B<RES_DFLRETRY> (currently 2, see I<E<lt>resolv.hE<gt>>).  The "
14341 "value for this option is silently capped to 5."
14342 msgstr ""
14343
14344 #. type: TP
14345 #: build/C/man5/resolv.conf.5:179
14346 #, no-wrap
14347 msgid "B<rotate>"
14348 msgstr ""
14349
14350 #.  Since glibc 2.2
14351 #. type: Plain text
14352 #: build/C/man5/resolv.conf.5:189
14353 msgid ""
14354 "sets B<RES_ROTATE> in I<_res.options>, which causes round-robin selection of "
14355 "name servers from among those listed.  This has the effect of spreading the "
14356 "query load among all listed servers, rather than having all clients try the "
14357 "first listed server first every time."
14358 msgstr ""
14359
14360 #. type: TP
14361 #: build/C/man5/resolv.conf.5:189
14362 #, no-wrap
14363 msgid "B<no-check-names>"
14364 msgstr ""
14365
14366 #.  since glibc 2.2
14367 #. type: Plain text
14368 #: build/C/man5/resolv.conf.5:199
14369 msgid ""
14370 "sets B<RES_NOCHECKNAME> in I<_res.options>, which disables the modern BIND "
14371 "checking of incoming hostnames and mail names for invalid characters such as "
14372 "underscore (_), non-ASCII, or control characters."
14373 msgstr ""
14374
14375 #. type: TP
14376 #: build/C/man5/resolv.conf.5:199
14377 #, no-wrap
14378 msgid "B<inet6>"
14379 msgstr ""
14380
14381 #.  Since glibc 2.2
14382 #. type: Plain text
14383 #: build/C/man5/resolv.conf.5:210
14384 msgid ""
14385 "sets B<RES_USE_INET6> in I<_res.options>.  This has the effect of trying a "
14386 "AAAA query before an A query inside the B<gethostbyname>(3)  function, and "
14387 "of mapping IPv4 responses in IPv6 \"tunneled form\" if no AAAA records are "
14388 "found but an A record set exists."
14389 msgstr ""
14390
14391 #. type: TP
14392 #: build/C/man5/resolv.conf.5:210
14393 #, no-wrap
14394 msgid "B<ip6-bytestring> (since glibc 2.3.4)"
14395 msgstr ""
14396
14397 #. type: Plain text
14398 #: build/C/man5/resolv.conf.5:219
14399 msgid ""
14400 "sets B<RES_USE_BSTRING> in I<_res.options>.  This causes reverse IPv6 "
14401 "lookups to be made using the bit-label format described in RFC\\ 2673; if "
14402 "this option is not set, then nibble format is used."
14403 msgstr ""
14404
14405 #. type: TP
14406 #: build/C/man5/resolv.conf.5:219
14407 #, no-wrap
14408 msgid "B<ip6-dotint>/B<no-ip6-dotint> (since glibc 2.3.4)"
14409 msgstr ""
14410
14411 #. type: Plain text
14412 #: build/C/man5/resolv.conf.5:236
14413 msgid ""
14414 "Clear/set B<RES_NOIP6DOTINT> in I<_res.options>.  When this option is clear "
14415 "(B<ip6-dotint>), reverse IPv6 lookups are made in the (deprecated)  "
14416 "I<ip6.int> zone; when this option is set (B<no-ip6-dotint>), reverse IPv6 "
14417 "lookups are made in the I<ip6.arpa> zone by default.  This option is set by "
14418 "default."
14419 msgstr ""
14420
14421 #. type: TP
14422 #: build/C/man5/resolv.conf.5:236
14423 #, no-wrap
14424 msgid "B<edns0> (since glibc 2.6)"
14425 msgstr ""
14426
14427 #. type: Plain text
14428 #: build/C/man5/resolv.conf.5:243
14429 msgid ""
14430 "sets B<RES_USE_EDNSO> in I<_res.options>.  This enables support for the DNS "
14431 "extensions described in RFC\\ 2671."
14432 msgstr ""
14433
14434 #. type: TP
14435 #: build/C/man5/resolv.conf.5:243
14436 #, no-wrap
14437 msgid "B<single-request> (since glibc 2.10)"
14438 msgstr ""
14439
14440 #. type: Plain text
14441 #: build/C/man5/resolv.conf.5:256
14442 msgid ""
14443 "sets B<RES_SNGLKUP> in I<_res.options>.  By default, glibc performs IPv4 and "
14444 "IPv6 lookups in parallel since version 2.9.  Some appliance DNS servers "
14445 "cannot handle these queries properly and make the requests time out.  This "
14446 "option disables the behavior and makes glibc perform the IPv6 and IPv4 "
14447 "requests sequentially (at the cost of some slowdown of the resolving "
14448 "process)."
14449 msgstr ""
14450
14451 #. type: TP
14452 #: build/C/man5/resolv.conf.5:256
14453 #, no-wrap
14454 msgid "B<single-request-reopen> (since glibc 2.9)"
14455 msgstr ""
14456
14457 #. type: Plain text
14458 #: build/C/man5/resolv.conf.5:264
14459 msgid ""
14460 "The resolver uses the same socket for the A and AAAA requests.  Some "
14461 "hardware mistakenly sends back only one reply.  When that happens the client "
14462 "system will sit and wait for the second reply.  Turning this option on "
14463 "changes this behavior so that if two requests from the same port are not "
14464 "handled correctly it will close the socket and open a new one before sending "
14465 "the second request."
14466 msgstr ""
14467
14468 #. type: Plain text
14469 #: build/C/man5/resolv.conf.5:269
14470 msgid ""
14471 "The I<domain> and I<search> keywords are mutually exclusive.  If more than "
14472 "one instance of these keywords is present, the last instance wins."
14473 msgstr ""
14474
14475 #. type: Plain text
14476 #: build/C/man5/resolv.conf.5:274
14477 msgid ""
14478 "The I<search> keyword of a system's I<resolv.conf> file can be overridden on "
14479 "a per-process basis by setting the environment variable B<LOCALDOMAIN> to a "
14480 "space-separated list of search domains."
14481 msgstr ""
14482
14483 #. type: Plain text
14484 #: build/C/man5/resolv.conf.5:280
14485 msgid ""
14486 "The I<options> keyword of a system's I<resolv.conf> file can be amended on a "
14487 "per-process basis by setting the environment variable B<RES_OPTIONS> to a "
14488 "space-separated list of resolver options as explained above under "
14489 "B<options>."
14490 msgstr ""
14491
14492 #. type: Plain text
14493 #: build/C/man5/resolv.conf.5:284
14494 msgid ""
14495 "The keyword and value must appear on a single line, and the keyword (e.g., "
14496 "B<nameserver>) must start the line.  The value follows the keyword, "
14497 "separated by white space."
14498 msgstr ""
14499
14500 #. type: Plain text
14501 #: build/C/man5/resolv.conf.5:287
14502 msgid ""
14503 "Lines that contain a semicolon (;) or hash character (#)  in the first "
14504 "column are treated as comments."
14505 msgstr ""
14506
14507 #. type: Plain text
14508 #: build/C/man5/resolv.conf.5:290
14509 msgid "I</etc/resolv.conf>, I<E<lt>resolv.hE<gt>>"
14510 msgstr ""
14511
14512 #. type: Plain text
14513 #: build/C/man5/resolv.conf.5:295
14514 msgid "B<gethostbyname>(3), B<resolver>(3), B<hostname>(7), B<named>(8)"
14515 msgstr ""
14516
14517 #. type: Plain text
14518 #: build/C/man5/resolv.conf.5:297
14519 msgid "Name Server Operations Guide for BIND"
14520 msgstr ""
14521
14522 #. type: TH
14523 #: build/C/man3/resolver.3:32
14524 #, no-wrap
14525 msgid "RESOLVER"
14526 msgstr ""
14527
14528 #. type: Plain text
14529 #: build/C/man3/resolver.3:36
14530 msgid ""
14531 "res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, "
14532 "dn_comp, dn_expand - resolver routines"
14533 msgstr ""
14534
14535 #. type: Plain text
14536 #: build/C/man3/resolver.3:42
14537 #, no-wrap
14538 msgid ""
14539 "B<#include E<lt>netinet/in.hE<gt>>\n"
14540 "B<#include E<lt>arpa/nameser.hE<gt>>\n"
14541 "B<#include E<lt>resolv.hE<gt>>\n"
14542 "B<extern struct __res_state _res;>\n"
14543 msgstr ""
14544
14545 #. type: Plain text
14546 #: build/C/man3/resolver.3:44
14547 #, no-wrap
14548 msgid "B<int res_init(void);>\n"
14549 msgstr ""
14550
14551 #. type: Plain text
14552 #: build/C/man3/resolver.3:46
14553 #, no-wrap
14554 msgid "B<int res_query(const char *>I<dname>B<, int >I<class>B<, int >I<type>B<,>\n"
14555 msgstr ""
14556
14557 #. type: Plain text
14558 #: build/C/man3/resolver.3:48 build/C/man3/resolver.3:53 build/C/man3/resolver.3:70
14559 #, no-wrap
14560 msgid "B<unsigned char *>I<answer>B<, int >I<anslen>B<);>\n"
14561 msgstr ""
14562
14563 #. type: Plain text
14564 #: build/C/man3/resolver.3:51
14565 #, no-wrap
14566 msgid ""
14567 "B<int res_search(const char *>I<dname>B<, int >I<class>B<, int "
14568 ">I<type>B<,>\n"
14569 msgstr ""
14570
14571 #. type: Plain text
14572 #: build/C/man3/resolver.3:56
14573 #, no-wrap
14574 msgid "B<int res_querydomain(const char *>I<name>B<, const char *>I<domain>B<,>\n"
14575 msgstr ""
14576
14577 #. type: Plain text
14578 #: build/C/man3/resolver.3:59
14579 #, no-wrap
14580 msgid ""
14581 "B<int >I<class>B<, int >I<type>B<, unsigned char *>I<answer>B<,>\n"
14582 "B<int >I<anslen>B<);>\n"
14583 msgstr ""
14584
14585 #. type: Plain text
14586 #: build/C/man3/resolver.3:62
14587 #, no-wrap
14588 msgid "B<int res_mkquery(int >I<op>B<, const char *>I<dname>B<, int >I<class>B<,>\n"
14589 msgstr ""
14590
14591 #. type: Plain text
14592 #: build/C/man3/resolver.3:65
14593 #, no-wrap
14594 msgid ""
14595 "B<int >I<type>B<, const unsigned char *>I<data>B<, int >I<datalen>B<,>\n"
14596 "B<const unsigned char *>I<newrr>B<, unsigned char *>I<buf>B<, int "
14597 ">I<buflen>B<);>\n"
14598 msgstr ""
14599
14600 #. type: Plain text
14601 #: build/C/man3/resolver.3:68
14602 #, no-wrap
14603 msgid "B<int res_send(const unsigned char *>I<msg>B<, int >I<msglen>B<,>\n"
14604 msgstr ""
14605
14606 #. type: Plain text
14607 #: build/C/man3/resolver.3:73
14608 #, no-wrap
14609 msgid "B<int dn_comp(const char *>I<exp_dn>B<, unsigned char *>I<comp_dn>B<,>\n"
14610 msgstr ""
14611
14612 #. type: Plain text
14613 #: build/C/man3/resolver.3:75
14614 #, no-wrap
14615 msgid ""
14616 "B<int >I<length>B<, unsigned char **>I<dnptrs>B<, unsigned char "
14617 "**>I<lastdnptr>B<);>\n"
14618 msgstr ""
14619
14620 #. type: Plain text
14621 #: build/C/man3/resolver.3:78
14622 #, no-wrap
14623 msgid ""
14624 "B<int dn_expand(const unsigned char *>I<msg>B<, const unsigned char "
14625 "*>I<eomorig>B<,>\n"
14626 msgstr ""
14627
14628 #. type: Plain text
14629 #: build/C/man3/resolver.3:81
14630 #, no-wrap
14631 msgid ""
14632 "B<const unsigned char *>I<comp_dn>B<, char *>I<exp_dn>B<,>\n"
14633 "B<int >I<length>B<);>\n"
14634 msgstr ""
14635
14636 #. type: Plain text
14637 #: build/C/man3/resolver.3:88
14638 msgid ""
14639 "These functions make queries to and interpret the responses from Internet "
14640 "domain name servers."
14641 msgstr ""
14642
14643 #. type: Plain text
14644 #: build/C/man3/resolver.3:102
14645 msgid ""
14646 "The B<res_init>()  function reads the configuration files (see "
14647 "B<resolv.conf>(5))  to get the default domain name, search order and name "
14648 "server address(es).  If no server is given, the local host is tried.  If no "
14649 "domain is given, that associated with the local host is used.  It can be "
14650 "overridden with the environment variable B<LOCALDOMAIN>.  B<res_init>()  is "
14651 "normally executed by the first call to one of the other functions."
14652 msgstr ""
14653
14654 #. type: Plain text
14655 #: build/C/man3/resolver.3:110
14656 msgid ""
14657 "The B<res_query>()  function queries the name server for the fully qualified "
14658 "domain name I<name> of specified I<type> and I<class>.  The reply is left in "
14659 "the buffer I<answer> of length I<anslen> supplied by the caller."
14660 msgstr ""
14661
14662 #. type: Plain text
14663 #: build/C/man3/resolver.3:123
14664 msgid ""
14665 "The B<res_search>()  function makes a query and waits for the response like "
14666 "B<res_query>(), but in addition implements the default and search rules "
14667 "controlled by B<RES_DEFNAMES> and B<RES_DNSRCH> (see description of I<_res> "
14668 "options below)."
14669 msgstr ""
14670
14671 #. type: Plain text
14672 #: build/C/man3/resolver.3:129
14673 msgid ""
14674 "The B<res_querydomain>()  function makes a query using B<res_query>()  on "
14675 "the concatenation of I<name> and I<domain>."
14676 msgstr ""
14677
14678 #. type: Plain text
14679 #: build/C/man3/resolver.3:132
14680 msgid "The following functions are lower-level routines used by B<res_query>()."
14681 msgstr ""
14682
14683 #. type: Plain text
14684 #: build/C/man3/resolver.3:143
14685 msgid ""
14686 "The B<res_mkquery>()  function constructs a query message in I<buf> of "
14687 "length I<buflen> for the domain name I<dname>.  The query type I<op> is "
14688 "usually B<QUERY>, but can be any of the types defined in "
14689 "I<E<lt>arpa/nameser.hE<gt>>.  I<newrr> is currently unused."
14690 msgstr ""
14691
14692 #. type: Plain text
14693 #: build/C/man3/resolver.3:153
14694 msgid ""
14695 "The B<res_send>()  function sends a preformatted query given in I<msg> of "
14696 "length I<msglen> and returns the answer in I<answer> which is of length "
14697 "I<anslen>.  It will call B<res_init>(), if it has not already been called."
14698 msgstr ""
14699
14700 #. type: Plain text
14701 #: build/C/man3/resolver.3:166
14702 msgid ""
14703 "The B<dn_comp>()  function compresses the domain name I<exp_dn> and stores "
14704 "it in the buffer I<comp_dn> of length I<length>.  The compression uses an "
14705 "array of pointers I<dnptrs> to previously compressed names in the current "
14706 "message.  The first pointer points to the beginning of the message and the "
14707 "list ends with NULL.  The limit of the array is specified by I<lastdnptr>.  "
14708 "If I<dnptr> is NULL, domain names are not compressed.  If I<lastdnptr> is "
14709 "NULL, the list of labels is not updated."
14710 msgstr ""
14711
14712 #. type: Plain text
14713 #: build/C/man3/resolver.3:175
14714 msgid ""
14715 "The B<dn_expand>()  function expands the compressed domain name I<comp_dn> "
14716 "to a full domain name, which is placed in the buffer I<exp_dn> of size "
14717 "I<length>.  The compressed name is contained in a query or reply message, "
14718 "and I<msg> points to the beginning of the message."
14719 msgstr ""
14720
14721 #. type: Plain text
14722 #: build/C/man3/resolver.3:183
14723 msgid ""
14724 "The resolver routines use global configuration and state information "
14725 "contained in the structure I<_res>, which is defined in "
14726 "I<E<lt>resolv.hE<gt>>.  The only field that is normally manipulated by the "
14727 "user is I<_res.options>.  This field can contain the bitwise \"OR\" of the "
14728 "following options:"
14729 msgstr ""
14730
14731 #. type: TP
14732 #: build/C/man3/resolver.3:183
14733 #, no-wrap
14734 msgid "B<RES_INIT>"
14735 msgstr ""
14736
14737 #. type: Plain text
14738 #: build/C/man3/resolver.3:188
14739 msgid "True if B<res_init>()  has been called."
14740 msgstr ""
14741
14742 #. type: TP
14743 #: build/C/man3/resolver.3:188
14744 #, no-wrap
14745 msgid "B<RES_DEBUG>"
14746 msgstr ""
14747
14748 #.  See resolv/README.
14749 #.  Support for RES_DEBUG was made conditional in glibc 2.2.
14750 #. type: Plain text
14751 #: build/C/man3/resolver.3:195
14752 msgid ""
14753 "Print debugging messages.  This option is available only if glibc was built "
14754 "with debugging enabled, which is not the default."
14755 msgstr ""
14756
14757 #. type: TP
14758 #: build/C/man3/resolver.3:195
14759 #, no-wrap
14760 msgid "B<RES_AAONLY>"
14761 msgstr ""
14762
14763 #. type: Plain text
14764 #: build/C/man3/resolver.3:202
14765 msgid ""
14766 "Accept authoritative answers only.  B<res_send>()  continues until it finds "
14767 "an authoritative answer or returns an error.  [Not currently implemented]."
14768 msgstr ""
14769
14770 #. type: TP
14771 #: build/C/man3/resolver.3:202
14772 #, no-wrap
14773 msgid "B<RES_USEVC>"
14774 msgstr ""
14775
14776 #. type: Plain text
14777 #: build/C/man3/resolver.3:205
14778 msgid "Use TCP connections for queries rather than UDP datagrams."
14779 msgstr ""
14780
14781 #. type: TP
14782 #: build/C/man3/resolver.3:205
14783 #, no-wrap
14784 msgid "B<RES_PRIMARY>"
14785 msgstr ""
14786
14787 #. type: Plain text
14788 #: build/C/man3/resolver.3:208
14789 msgid "Query primary domain name server only."
14790 msgstr ""
14791
14792 #. type: TP
14793 #: build/C/man3/resolver.3:208
14794 #, no-wrap
14795 msgid "B<RES_IGNTC>"
14796 msgstr ""
14797
14798 #. type: Plain text
14799 #: build/C/man3/resolver.3:213
14800 msgid ""
14801 "Ignore truncation errors.  Don't retry with TCP.  [Not currently "
14802 "implemented]."
14803 msgstr ""
14804
14805 #. type: TP
14806 #: build/C/man3/resolver.3:213
14807 #, no-wrap
14808 msgid "B<RES_RECURSE>"
14809 msgstr ""
14810
14811 #. type: Plain text
14812 #: build/C/man3/resolver.3:220
14813 msgid ""
14814 "Set the recursion desired bit in queries.  Recursion is carried out by the "
14815 "domain name server, not by B<res_send>().  [Enabled by default]."
14816 msgstr ""
14817
14818 #. type: TP
14819 #: build/C/man3/resolver.3:220
14820 #, no-wrap
14821 msgid "B<RES_DEFNAMES>"
14822 msgstr ""
14823
14824 #. type: Plain text
14825 #: build/C/man3/resolver.3:227
14826 msgid ""
14827 "If set, B<res_search>()  will append the default domain name to single "
14828 "component names\\(emthat is, those that do not contain a dot.  [Enabled by "
14829 "default]."
14830 msgstr ""
14831
14832 #. type: TP
14833 #: build/C/man3/resolver.3:227
14834 #, no-wrap
14835 msgid "B<RES_STAYOPEN>"
14836 msgstr ""
14837
14838 #. type: Plain text
14839 #: build/C/man3/resolver.3:232
14840 msgid "Used with B<RES_USEVC> to keep the TCP connection open between queries."
14841 msgstr ""
14842
14843 #. type: TP
14844 #: build/C/man3/resolver.3:232
14845 #, no-wrap
14846 msgid "B<RES_DNSRCH>"
14847 msgstr ""
14848
14849 #. type: Plain text
14850 #: build/C/man3/resolver.3:241
14851 msgid ""
14852 "If set, B<res_search>()  will search for hostnames in the current domain and "
14853 "in parent domains.  This option is used by B<gethostbyname>(3).  [Enabled by "
14854 "default]."
14855 msgstr ""
14856
14857 #. type: Plain text
14858 #: build/C/man3/resolver.3:245
14859 msgid ""
14860 "This list is not complete.  You can find some other flags described in "
14861 "B<resolv.conf>(5)."
14862 msgstr ""
14863
14864 #. type: Plain text
14865 #: build/C/man3/resolver.3:250
14866 msgid "The B<res_init>()  function returns 0 on success, or -1 if an error occurs."
14867 msgstr ""
14868
14869 #. type: Plain text
14870 #: build/C/man3/resolver.3:260
14871 msgid ""
14872 "The B<res_query>(), B<res_search>(), B<res_querydomain>(), B<res_mkquery>()  "
14873 "and B<res_send>()  functions return the length of the response, or -1 if an "
14874 "error occurs."
14875 msgstr ""
14876
14877 #. type: Plain text
14878 #: build/C/man3/resolver.3:267
14879 msgid ""
14880 "The B<dn_comp>()  and B<dn_expand>()  functions return the length of the "
14881 "compressed name, or -1 if an error occurs."
14882 msgstr ""
14883
14884 #. type: Plain text
14885 #: build/C/man3/resolver.3:271
14886 #, no-wrap
14887 msgid ""
14888 "/etc/resolv.conf          resolver configuration file\n"
14889 "/etc/host.conf            resolver configuration file\n"
14890 msgstr ""
14891
14892 #. type: Plain text
14893 #: build/C/man3/resolver.3:274
14894 msgid "4.3BSD."
14895 msgstr ""
14896
14897 #. type: Plain text
14898 #: build/C/man3/resolver.3:280
14899 msgid ""
14900 "B<gethostbyname>(3), B<resolv.conf>(5), B<resolver>(5), B<hostname>(7), "
14901 "B<named>(8)"
14902 msgstr ""
14903
14904 #. type: TH
14905 #: build/C/man3/rexec.3:41
14906 #, no-wrap
14907 msgid "REXEC"
14908 msgstr ""
14909
14910 #. type: Plain text
14911 #: build/C/man3/rexec.3:44
14912 msgid "rexec, rexec_af - return stream to a remote command"
14913 msgstr ""
14914
14915 #. type: Plain text
14916 #: build/C/man3/rexec.3:48
14917 #, no-wrap
14918 msgid ""
14919 "B<#define _BSD_SOURCE>             /* See feature_test_macros(7) */\n"
14920 "B<#include E<lt>netdb.hE<gt>>\n"
14921 msgstr ""
14922
14923 #. type: Plain text
14924 #: build/C/man3/rexec.3:51
14925 #, no-wrap
14926 msgid ""
14927 "B<int rexec(char **>I<ahost>B<, int >I<inport>B<, const char *>I<user>B<, "
14928 ">\n"
14929 "B<          const char *>I<passwd>B<, const char *>I<cmd>B<, int "
14930 "*>I<fd2p>B<);>\n"
14931 msgstr ""
14932
14933 #. type: Plain text
14934 #: build/C/man3/rexec.3:55
14935 #, no-wrap
14936 msgid ""
14937 "B<int rexec_af(char **>I<ahost>B<, int >I<inport>B<, const char *>I<user>B<, "
14938 ">\n"
14939 "B<             const char *>I<passwd>B<, const char *>I<cmd>B<, int "
14940 "*>I<fd2p>B<,>\n"
14941 "B<             sa_family_t >I<af>B<);>\n"
14942 msgstr ""
14943
14944 #. type: Plain text
14945 #: build/C/man3/rexec.3:59
14946 msgid "This interface is obsoleted by B<rcmd>(3)."
14947 msgstr ""
14948
14949 #. type: Plain text
14950 #: build/C/man3/rexec.3:78
14951 msgid ""
14952 "The B<rexec>()  function looks up the host I<*ahost> using "
14953 "B<gethostbyname>(3), returning -1 if the host does not exist.  Otherwise, "
14954 "I<*ahost> is set to the standard name of the host.  If a username and "
14955 "password are both specified, then these are used to authenticate to the "
14956 "foreign host; otherwise the environment and then the I<.netrc> file in "
14957 "user's home directory are searched for appropriate information.  If all this "
14958 "fails, the user is prompted for the information."
14959 msgstr ""
14960
14961 #. type: Plain text
14962 #: build/C/man3/rexec.3:89
14963 msgid ""
14964 "The port I<inport> specifies which well-known DARPA Internet port to use for "
14965 "the connection; the call I<getservbyname(\"exec\", \"tcp\")> (see "
14966 "B<getservent>(3))  will return a pointer to a structure that contains the "
14967 "necessary port.  The protocol for connection is described in detail in "
14968 "B<rexecd>(8)."
14969 msgstr ""
14970
14971 #. type: Plain text
14972 #: build/C/man3/rexec.3:122
14973 msgid ""
14974 "If the connection succeeds, a socket in the Internet domain of type "
14975 "B<SOCK_STREAM> is returned to the caller, and given to the remote command as "
14976 "I<stdin> and I<stdout>.  If I<fd2p> is nonzero, then an auxiliary channel to "
14977 "a control process will be setup, and a descriptor for it will be placed in "
14978 "I<*fd2p>.  The control process will return diagnostic output from the "
14979 "command (unit 2) on this channel, and will also accept bytes on this channel "
14980 "as being UNIX signal numbers, to be forwarded to the process group of the "
14981 "command.  The diagnostic information returned does not include remote "
14982 "authorization failure, as the secondary connection is set up after "
14983 "authorization has been verified.  If I<fd2p> is 0, then the I<stderr> (unit "
14984 "2 of the remote command) will be made the same as the I<stdout> and no "
14985 "provision is made for sending arbitrary signals to the remote process, "
14986 "although you may be able to get its attention by using out-of-band data."
14987 msgstr ""
14988
14989 #. type: SS
14990 #: build/C/man3/rexec.3:122
14991 #, no-wrap
14992 msgid "rexec_af()"
14993 msgstr ""
14994
14995 #. type: Plain text
14996 #: build/C/man3/rexec.3:138
14997 msgid ""
14998 "The B<rexec>()  function works over IPv4 (B<AF_INET>).  By contrast, the "
14999 "B<rexec_af>()  function provides an extra argument, I<af>, that allows the "
15000 "caller to select the protocol.  This argument can be specified as "
15001 "B<AF_INET>, B<AF_INET6>, or B<AF_UNSPEC> (to allow the implementation to "
15002 "select the protocol)."
15003 msgstr ""
15004
15005 #. type: Plain text
15006 #: build/C/man3/rexec.3:142
15007 msgid "The B<rexec_af>()  function was added to glibc in version 2.2."
15008 msgstr ""
15009
15010 #. type: Plain text
15011 #: build/C/man3/rexec.3:149
15012 msgid "The B<rexec>()  and B<rexec_af>()  functions are not thread-safe."
15013 msgstr ""
15014
15015 #. type: Plain text
15016 #: build/C/man3/rexec.3:158
15017 msgid ""
15018 "These functions are not in POSIX.1-2001.  The B<rexec>()  function first "
15019 "appeared in 4.2BSD, and is present on the BSDs, Solaris, and many other "
15020 "systems.  The B<rexec_af>()  function is more recent, and less widespread."
15021 msgstr ""
15022
15023 #. type: Plain text
15024 #: build/C/man3/rexec.3:162
15025 msgid "The B<rexec>()  function sends the unencrypted password across the network."
15026 msgstr ""
15027
15028 #. type: Plain text
15029 #: build/C/man3/rexec.3:167
15030 msgid ""
15031 "The underlying service is considered a big security hole and therefore not "
15032 "enabled on many sites; see B<rexecd>(8)  for explanations."
15033 msgstr ""
15034
15035 #. type: Plain text
15036 #: build/C/man3/rexec.3:170
15037 msgid "B<rcmd>(3), B<rexecd>(8)"
15038 msgstr ""
15039
15040 #. type: TH
15041 #: build/C/man5/services.5:34
15042 #, no-wrap
15043 msgid "SERVICES"
15044 msgstr ""
15045
15046 #. type: TH
15047 #: build/C/man5/services.5:34
15048 #, no-wrap
15049 msgid "2010-05-22"
15050 msgstr ""
15051
15052 #. type: Plain text
15053 #: build/C/man5/services.5:37
15054 msgid "services - Internet network services list"
15055 msgstr ""
15056
15057 #. type: Plain text
15058 #: build/C/man5/services.5:52
15059 msgid ""
15060 "B<services> is a plain ASCII file providing a mapping between human-friendly "
15061 "textual names for internet services, and their underlying assigned port "
15062 "numbers and protocol types.  Every networking program should look into this "
15063 "file to get the port number (and protocol) for its service.  The C library "
15064 "routines B<getservent>(3), B<getservbyname>(3), B<getservbyport>(3), "
15065 "B<setservent>(3), and B<endservent>(3)  support querying this file from "
15066 "programs."
15067 msgstr ""
15068
15069 #. type: Plain text
15070 #: build/C/man5/services.5:58
15071 msgid ""
15072 "Port numbers are assigned by the IANA (Internet Assigned Numbers Authority), "
15073 "and their current policy is to assign both TCP and UDP protocols when "
15074 "assigning a port number.  Therefore, most entries will have two entries, "
15075 "even for TCP-only services."
15076 msgstr ""
15077
15078 #. type: Plain text
15079 #: build/C/man5/services.5:70
15080 msgid ""
15081 "Port numbers below 1024 (so-called \"low numbered\" ports) can be bound to "
15082 "only by root (see B<bind>(2), B<tcp>(7), and B<udp>(7)).  This is so clients "
15083 "connecting to low numbered ports can trust that the service running on the "
15084 "port is the standard implementation, and not a rogue service run by a user "
15085 "of the machine.  Well-known port numbers specified by the IANA are normally "
15086 "located in this root-only space."
15087 msgstr ""
15088
15089 #. type: Plain text
15090 #: build/C/man5/services.5:85
15091 msgid ""
15092 "The presence of an entry for a service in the B<services> file does not "
15093 "necessarily mean that the service is currently running on the machine.  See "
15094 "B<inetd.conf>(5)  for the configuration of Internet services offered.  Note "
15095 "that not all networking services are started by B<inetd>(8), and so won't "
15096 "appear in B<inetd.conf>(5).  In particular, news (NNTP) and mail (SMTP) "
15097 "servers are often initialized from the system boot scripts."
15098 msgstr ""
15099
15100 #. type: Plain text
15101 #: build/C/man5/services.5:94
15102 msgid ""
15103 "The location of the B<services> file is defined by B<_PATH_SERVICES> in "
15104 "I<E<lt>netdb.hE<gt>>.  This is usually set to I</etc/services>."
15105 msgstr ""
15106
15107 #. type: Plain text
15108 #: build/C/man5/services.5:96
15109 msgid "Each line describes one service, and is of the form:"
15110 msgstr ""
15111
15112 #. type: Plain text
15113 #: build/C/man5/services.5:98
15114 msgid "I<service-name\\ \\ \\ port>B</>I<protocol\\ \\ \\ >[I<aliases ...>]"
15115 msgstr ""
15116
15117 #. type: TP
15118 #: build/C/man5/services.5:98
15119 #, no-wrap
15120 msgid "where:"
15121 msgstr ""
15122
15123 #. type: TP
15124 #: build/C/man5/services.5:100
15125 #, no-wrap
15126 msgid "I<service-name>"
15127 msgstr ""
15128
15129 #. type: Plain text
15130 #: build/C/man5/services.5:106
15131 msgid ""
15132 "is the friendly name the service is known by and looked up under.  It is "
15133 "case sensitive.  Often, the client program is named after the "
15134 "I<service-name>."
15135 msgstr ""
15136
15137 #. type: TP
15138 #: build/C/man5/services.5:106
15139 #, no-wrap
15140 msgid "I<port>"
15141 msgstr ""
15142
15143 #. type: Plain text
15144 #: build/C/man5/services.5:109
15145 msgid "is the port number (in decimal) to use for this service."
15146 msgstr ""
15147
15148 #. type: Plain text
15149 #: build/C/man5/services.5:120
15150 msgid ""
15151 "is the type of protocol to be used.  This field should match an entry in the "
15152 "B<protocols>(5)  file.  Typical values include B<tcp> and B<udp>."
15153 msgstr ""
15154
15155 #. type: Plain text
15156 #: build/C/man5/services.5:126
15157 msgid ""
15158 "is an optional space or tab separated list of other names for this service.  "
15159 "Again, the names are case sensitive."
15160 msgstr ""
15161
15162 #. type: Plain text
15163 #: build/C/man5/services.5:128
15164 msgid "Either spaces or tabs may be used to separate the fields."
15165 msgstr ""
15166
15167 #. type: Plain text
15168 #: build/C/man5/services.5:132
15169 msgid ""
15170 "Comments are started by the hash sign (#) and continue until the end of the "
15171 "line.  Blank lines are skipped."
15172 msgstr ""
15173
15174 #. type: Plain text
15175 #: build/C/man5/services.5:143
15176 msgid ""
15177 "The I<service-name> should begin in the first column of the file, since "
15178 "leading spaces are not stripped.  I<service-names> can be any printable "
15179 "characters excluding space and tab.  However, a conservative choice of "
15180 "characters should be used to minimize compatibility problems.  For example, "
15181 "a-z, 0-9, and hyphen (-) would seem a sensible choice."
15182 msgstr ""
15183
15184 #. type: Plain text
15185 #: build/C/man5/services.5:152
15186 msgid ""
15187 "Lines not matching this format should not be present in the file.  "
15188 "(Currently, they are silently skipped by B<getservent>(3), "
15189 "B<getservbyname>(3), and B<getservbyport>(3).  However, this behavior should "
15190 "not be relied on.)"
15191 msgstr ""
15192
15193 #. type: Plain text
15194 #: build/C/man5/services.5:169
15195 msgid "A sample B<services> file might look like this:"
15196 msgstr ""
15197
15198 #. type: Plain text
15199 #: build/C/man5/services.5:182
15200 #, no-wrap
15201 msgid ""
15202 "CW<netstat         15/tcp\n"
15203 "qotd            17/tcp          quote\n"
15204 "msp             18/tcp          # message send protocol\n"
15205 "msp             18/udp          # message send protocol\n"
15206 "chargen         19/tcp          ttytst source\n"
15207 "chargen         19/udp          ttytst source\n"
15208 "ftp             21/tcp\n"
15209 "# 22 - unassigned\n"
15210 "telnet          23/tcp>\n"
15211 msgstr ""
15212
15213 #. type: Plain text
15214 #: build/C/man5/services.5:189
15215 msgid "The Internet network services list"
15216 msgstr ""
15217
15218 #. type: TP
15219 #: build/C/man5/services.5:189
15220 #, no-wrap
15221 msgid "I<E<lt>netdb.hE<gt>>"
15222 msgstr ""
15223
15224 #.  .SH BUGS
15225 #.  It's not clear when/if the following was ever true;
15226 #.  it isn't true for glibc 2.8:
15227 #.     There is a maximum of 35 aliases, due to the way the
15228 #.     .BR getservent (3)
15229 #.     code is written.
15230 #
15231 #.  It's not clear when/if the following was ever true;
15232 #.  it isn't true for glibc 2.8:
15233 #.     Lines longer than
15234 #.     .B BUFSIZ
15235 #.     (currently 1024) characters will be ignored by
15236 #.     .BR getservent (3),
15237 #.     .BR getservbyname (3),
15238 #.     and
15239 #.     .BR getservbyport (3).
15240 #.     However, this will also cause the next line to be mis-parsed.
15241 #. type: Plain text
15242 #: build/C/man5/services.5:210
15243 msgid "Definition of B<_PATH_SERVICES>"
15244 msgstr ""
15245
15246 #. type: Plain text
15247 #: build/C/man5/services.5:220
15248 msgid ""
15249 "B<listen>(2), B<endservent>(3), B<getservbyname>(3), B<getservbyport>(3), "
15250 "B<getservent>(3), B<setservent>(3), B<inetd.conf>(5), B<protocols>(5), "
15251 "B<inetd>(8)"
15252 msgstr ""
15253
15254 #. type: Plain text
15255 #: build/C/man5/services.5:222
15256 msgid "Assigned Numbers RFC, most recently RFC\\ 1700, (AKA STD0002)."
15257 msgstr ""
15258
15259 #. type: TH
15260 #: build/C/man3/setnetgrent.3:10
15261 #, no-wrap
15262 msgid "SETNETGRENT"
15263 msgstr ""
15264
15265 #. type: Plain text
15266 #: build/C/man3/setnetgrent.3:14
15267 msgid ""
15268 "setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr - handle "
15269 "network group entries"
15270 msgstr ""
15271
15272 #. type: Plain text
15273 #: build/C/man3/setnetgrent.3:19
15274 #, no-wrap
15275 msgid "B<int setnetgrent(const char *>I<netgroup>B<);>\n"
15276 msgstr ""
15277
15278 #. type: Plain text
15279 #: build/C/man3/setnetgrent.3:21
15280 #, no-wrap
15281 msgid "B<void endnetgrent(void);>\n"
15282 msgstr ""
15283
15284 #. type: Plain text
15285 #: build/C/man3/setnetgrent.3:23
15286 #, no-wrap
15287 msgid ""
15288 "B<int getnetgrent(char **>I<host>B<, char **>I<user>B<, char "
15289 "**>I<domain>B<);>\n"
15290 msgstr ""
15291
15292 #. type: Plain text
15293 #: build/C/man3/setnetgrent.3:26
15294 #, no-wrap
15295 msgid ""
15296 "B<int getnetgrent_r(char **>I<host>B<, char **>I<user>B<,>\n"
15297 "B<                  char **>I<domain>B<, char *>I<buf>B<, size_t "
15298 ">I<buflen>B<);>\n"
15299 msgstr ""
15300
15301 #. type: Plain text
15302 #: build/C/man3/setnetgrent.3:29
15303 #, no-wrap
15304 msgid ""
15305 "B<int innetgr(const char *>I<netgroup>B<, const char *>I<host>B<,>\n"
15306 "B<            const char *>I<user>B<, const char *>I<domain>B<);>\n"
15307 msgstr ""
15308
15309 #. type: Plain text
15310 #: build/C/man3/setnetgrent.3:43
15311 msgid ""
15312 "B<setnetgrent>(), B<endnetgrent>(), B<getnetgrent>(), B<getnetgrent_r>(), "
15313 "B<innetgr>(): _BSD_SOURCE || _SVID_SOURCE"
15314 msgstr ""
15315
15316 #. type: Plain text
15317 #: build/C/man3/setnetgrent.3:57
15318 msgid ""
15319 "The I<netgroup> is a SunOS invention.  A netgroup database is a list of "
15320 "string triples (I<hostname>, I<username>, I<domainname>)  or other netgroup "
15321 "names.  Any of the elements in a triple can be empty, which means that "
15322 "anything matches.  The functions described here allow access to the netgroup "
15323 "databases.  The file I</etc/nsswitch.conf> defines what database is "
15324 "searched."
15325 msgstr ""
15326
15327 #. type: Plain text
15328 #: build/C/man3/setnetgrent.3:77
15329 msgid ""
15330 "The B<setnetgrent>()  call defines the netgroup that will be searched by "
15331 "subsequent B<getnetgrent>()  calls.  The B<getnetgrent>()  function "
15332 "retrieves the next netgroup entry, and returns pointers in I<host>, I<user>, "
15333 "I<domain>.  A null pointer means that the corresponding entry matches any "
15334 "string.  The pointers are valid only as long as there is no call to other "
15335 "netgroup-related functions.  To avoid this problem you can use the GNU "
15336 "function B<getnetgrent_r>()  that stores the strings in the supplied "
15337 "buffer.  To free all allocated buffers use B<endnetgrent>()."
15338 msgstr ""
15339
15340 #. type: Plain text
15341 #: build/C/man3/setnetgrent.3:86
15342 msgid ""
15343 "In most cases you want to check only if the triplet (I<hostname>, "
15344 "I<username>, I<domainname>)  is a member of a netgroup.  The function "
15345 "B<innetgr>()  can be used for this without calling the above three "
15346 "functions.  Again, a null pointer is a wildcard and matches any string.  The "
15347 "function is thread-safe."
15348 msgstr ""
15349
15350 #. type: Plain text
15351 #: build/C/man3/setnetgrent.3:88
15352 msgid "These functions return 1 on success and 0 for failure."
15353 msgstr ""
15354
15355 #. type: Plain text
15356 #: build/C/man3/setnetgrent.3:90
15357 msgid "I</etc/netgroup>"
15358 msgstr ""
15359
15360 #.  getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
15361 #. type: Plain text
15362 #: build/C/man3/setnetgrent.3:103
15363 msgid ""
15364 "These functions are not in POSIX.1-2001, but B<setnetgrent>(), "
15365 "B<endnetgrent>(), B<getnetgrent>(), and B<innetgr>()  are available on most "
15366 "UNIX systems.  B<getnetgrent_r>()  is not widely available on other systems."
15367 msgstr ""
15368
15369 #. type: Plain text
15370 #: build/C/man3/setnetgrent.3:107
15371 msgid "In the BSD implementation, B<setnetgrent>()  returns void."
15372 msgstr ""
15373
15374 #. type: Plain text
15375 #: build/C/man3/setnetgrent.3:111
15376 msgid "B<sethostent>(3), B<setprotoent>(3), B<setservent>(3)"
15377 msgstr ""
15378
15379 #. type: TH
15380 #: build/C/man2/shutdown.2:40
15381 #, no-wrap
15382 msgid "SHUTDOWN"
15383 msgstr ""
15384
15385 #. type: TH
15386 #: build/C/man2/shutdown.2:40
15387 #, no-wrap
15388 msgid "2012-09-06"
15389 msgstr ""
15390
15391 #. type: Plain text
15392 #: build/C/man2/shutdown.2:43
15393 msgid "shutdown - shut down part of a full-duplex connection"
15394 msgstr ""
15395
15396 #. type: Plain text
15397 #: build/C/man2/shutdown.2:47
15398 msgid "B<int shutdown(int >I<sockfd>B<, int >I<how>B<);>"
15399 msgstr ""
15400
15401 #. type: Plain text
15402 #: build/C/man2/shutdown.2:69
15403 msgid ""
15404 "The B<shutdown>()  call causes all or part of a full-duplex connection on "
15405 "the socket associated with I<sockfd> to be shut down.  If I<how> is "
15406 "B<SHUT_RD>, further receptions will be disallowed.  If I<how> is B<SHUT_WR>, "
15407 "further transmissions will be disallowed.  If I<how> is B<SHUT_RDWR>, "
15408 "further receptions and transmissions will be disallowed."
15409 msgstr ""
15410
15411 #. type: Plain text
15412 #: build/C/man2/shutdown.2:79
15413 msgid "I<sockfd> is not a valid descriptor."
15414 msgstr ""
15415
15416 #. type: Plain text
15417 #: build/C/man2/shutdown.2:84
15418 msgid "An invalid value was specified in I<how> (but see BUGS)."
15419 msgstr ""
15420
15421 #. type: Plain text
15422 #: build/C/man2/shutdown.2:87
15423 msgid "The specified socket is not connected."
15424 msgstr ""
15425
15426 #. type: Plain text
15427 #: build/C/man2/shutdown.2:91
15428 msgid "I<sockfd> is a file, not a socket."
15429 msgstr ""
15430
15431 #. type: Plain text
15432 #: build/C/man2/shutdown.2:95
15433 msgid ""
15434 "POSIX.1-2001, 4.4BSD (the B<shutdown>()  function call first appeared in "
15435 "4.2BSD)."
15436 msgstr ""
15437
15438 #. type: Plain text
15439 #: build/C/man2/shutdown.2:104
15440 msgid ""
15441 "The constants B<SHUT_RD>, B<SHUT_WR>, B<SHUT_RDWR> have the value 0, 1, 2, "
15442 "respectively, and are defined in I<E<lt>sys/socket.hE<gt>> since "
15443 "glibc-2.1.91."
15444 msgstr ""
15445
15446 #.  FIXME
15447 #.  https://bugzilla.kernel.org/show_bug.cgi?id=47111
15448 #. type: Plain text
15449 #: build/C/man2/shutdown.2:113
15450 msgid ""
15451 "As currently implemented, checks for the validity of I<how> are done in "
15452 "domain-specific code, and not all domains perform these checks.  Most "
15453 "notably, UNIX domain sockets simply ignore invalid values; this may change "
15454 "in the future."
15455 msgstr ""
15456
15457 #. type: Plain text
15458 #: build/C/man2/shutdown.2:117
15459 msgid "B<connect>(2), B<socket>(2), B<socket>(7)"
15460 msgstr ""
15461
15462 #. type: TH
15463 #: build/C/man7/tcp.7:76
15464 #, no-wrap
15465 msgid "TCP"
15466 msgstr ""
15467
15468 #. type: TH
15469 #: build/C/man7/tcp.7:76
15470 #, no-wrap
15471 msgid "2014-03-31"
15472 msgstr ""
15473
15474 #. type: Plain text
15475 #: build/C/man7/tcp.7:79
15476 msgid "tcp - TCP protocol"
15477 msgstr ""
15478
15479 #. type: Plain text
15480 #: build/C/man7/tcp.7:85
15481 msgid "B<#include E<lt>netinet/tcp.hE<gt>>"
15482 msgstr ""
15483
15484 #. type: Plain text
15485 #: build/C/man7/tcp.7:87
15486 msgid "B<tcp_socket = socket(AF_INET, SOCK_STREAM, 0);>"
15487 msgstr ""
15488
15489 #. type: Plain text
15490 #: build/C/man7/tcp.7:100
15491 msgid ""
15492 "This is an implementation of the TCP protocol defined in RFC\\ 793, RFC\\ "
15493 "1122 and RFC\\ 2001 with the NewReno and SACK extensions.  It provides a "
15494 "reliable, stream-oriented, full-duplex connection between two sockets on top "
15495 "of B<ip>(7), for both v4 and v6 versions.  TCP guarantees that the data "
15496 "arrives in order and retransmits lost packets.  It generates and checks a "
15497 "per-packet checksum to catch transmission errors.  TCP does not preserve "
15498 "record boundaries."
15499 msgstr ""
15500
15501 #. type: Plain text
15502 #: build/C/man7/tcp.7:119
15503 msgid ""
15504 "A newly created TCP socket has no remote or local address and is not fully "
15505 "specified.  To create an outgoing TCP connection use B<connect>(2)  to "
15506 "establish a connection to another TCP socket.  To receive new incoming "
15507 "connections, first B<bind>(2)  the socket to a local address and port and "
15508 "then call B<listen>(2)  to put the socket into the listening state.  After "
15509 "that a new socket for each incoming connection can be accepted using "
15510 "B<accept>(2).  A socket which has had B<accept>(2)  or B<connect>(2)  "
15511 "successfully called on it is fully specified and may transmit data.  Data "
15512 "cannot be transmitted on listening or not yet connected sockets."
15513 msgstr ""
15514
15515 #. type: Plain text
15516 #: build/C/man7/tcp.7:139
15517 msgid ""
15518 "Linux supports RFC\\ 1323 TCP high performance extensions.  These include "
15519 "Protection Against Wrapped Sequence Numbers (PAWS), Window Scaling and "
15520 "Timestamps.  Window scaling allows the use of large (E<gt> 64K) TCP windows "
15521 "in order to support links with high latency or bandwidth.  To make use of "
15522 "them, the send and receive buffer sizes must be increased.  They can be set "
15523 "globally with the I</proc/sys/net/ipv4/tcp_wmem> and "
15524 "I</proc/sys/net/ipv4/tcp_rmem> files, or on individual sockets by using the "
15525 "B<SO_SNDBUF> and B<SO_RCVBUF> socket options with the B<setsockopt>(2)  "
15526 "call."
15527 msgstr ""
15528
15529 #. type: Plain text
15530 #: build/C/man7/tcp.7:170
15531 msgid ""
15532 "The maximum sizes for socket buffers declared via the B<SO_SNDBUF> and "
15533 "B<SO_RCVBUF> mechanisms are limited by the values in the "
15534 "I</proc/sys/net/core/rmem_max> and I</proc/sys/net/core/wmem_max> files.  "
15535 "Note that TCP actually allocates twice the size of the buffer requested in "
15536 "the B<setsockopt>(2)  call, and so a succeeding B<getsockopt>(2)  call will "
15537 "not return the same size of buffer as requested in the B<setsockopt>(2)  "
15538 "call.  TCP uses the extra space for administrative purposes and internal "
15539 "kernel structures, and the I</proc> file values reflect the larger sizes "
15540 "compared to the actual TCP windows.  On individual connections, the socket "
15541 "buffer size must be set prior to the B<listen>(2)  or B<connect>(2)  calls "
15542 "in order to have it take effect.  See B<socket>(7)  for more information."
15543 msgstr ""
15544
15545 #. type: Plain text
15546 #: build/C/man7/tcp.7:202
15547 msgid ""
15548 "TCP supports urgent data.  Urgent data is used to signal the receiver that "
15549 "some important message is part of the data stream and that it should be "
15550 "processed as soon as possible.  To send urgent data specify the B<MSG_OOB> "
15551 "option to B<send>(2).  When urgent data is received, the kernel sends a "
15552 "B<SIGURG> signal to the process or process group that has been set as the "
15553 "socket \"owner\" using the B<SIOCSPGRP> or B<FIOSETOWN> ioctls (or the "
15554 "POSIX.1-2001-specified B<fcntl>(2)  B<F_SETOWN> operation).  When the "
15555 "B<SO_OOBINLINE> socket option is enabled, urgent data is put into the normal "
15556 "data stream (a program can test for its location using the B<SIOCATMARK> "
15557 "ioctl described below), otherwise it can be received only when the "
15558 "B<MSG_OOB> flag is set for B<recv>(2)  or B<recvmsg>(2)."
15559 msgstr ""
15560
15561 #. type: Plain text
15562 #: build/C/man7/tcp.7:210
15563 msgid ""
15564 "Linux 2.4 introduced a number of changes for improved throughput and "
15565 "scaling, as well as enhanced functionality.  Some of these features include "
15566 "support for zero-copy B<sendfile>(2), Explicit Congestion Notification, new "
15567 "management of TIME_WAIT sockets, keep-alive socket options and support for "
15568 "Duplicate SACK extensions."
15569 msgstr ""
15570
15571 #. type: SS
15572 #: build/C/man7/tcp.7:210
15573 #, no-wrap
15574 msgid "Address formats"
15575 msgstr ""
15576
15577 #. type: Plain text
15578 #: build/C/man7/tcp.7:219
15579 msgid ""
15580 "TCP is built on top of IP (see B<ip>(7)).  The address formats defined by "
15581 "B<ip>(7)  apply to TCP.  TCP supports point-to-point communication only; "
15582 "broadcasting and multicasting are not supported."
15583 msgstr ""
15584
15585 #. type: Plain text
15586 #: build/C/man7/tcp.7:231
15587 msgid ""
15588 "System-wide TCP parameter settings can be accessed by files in the directory "
15589 "I</proc/sys/net/ipv4/>.  In addition, most IP I</proc> interfaces also apply "
15590 "to TCP; see B<ip>(7).  Variables described as I<Boolean> take an integer "
15591 "value, with a nonzero value (\"true\") meaning that the corresponding option "
15592 "is enabled, and a zero value (\"false\")  meaning that the option is "
15593 "disabled."
15594 msgstr ""
15595
15596 #. type: TP
15597 #: build/C/man7/tcp.7:231
15598 #, no-wrap
15599 msgid "I<tcp_abc> (Integer; default: 0; since Linux 2.6.15)"
15600 msgstr ""
15601
15602 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15603 #. type: Plain text
15604 #: build/C/man7/tcp.7:239
15605 msgid ""
15606 "Control the Appropriate Byte Count (ABC), defined in RFC 3465.  ABC is a way "
15607 "of increasing the congestion window (I<cwnd>)  more slowly in response to "
15608 "partial acknowledgments.  Possible values are:"
15609 msgstr ""
15610
15611 #. type: IP
15612 #: build/C/man7/tcp.7:240 build/C/man7/tcp.7:428 build/C/man7/tcp.7:449 build/C/man7/tcp.7:593
15613 #, no-wrap
15614 msgid "0"
15615 msgstr ""
15616
15617 #. type: Plain text
15618 #: build/C/man7/tcp.7:244
15619 msgid "increase I<cwnd> once per acknowledgment (no ABC)"
15620 msgstr ""
15621
15622 #. type: IP
15623 #: build/C/man7/tcp.7:244 build/C/man7/tcp.7:430 build/C/man7/tcp.7:456 build/C/man7/tcp.7:595
15624 #, no-wrap
15625 msgid "1"
15626 msgstr ""
15627
15628 #. type: Plain text
15629 #: build/C/man7/tcp.7:248
15630 msgid "increase I<cwnd> once per acknowledgment of full sized segment"
15631 msgstr ""
15632
15633 #. type: IP
15634 #: build/C/man7/tcp.7:248 build/C/man7/tcp.7:432 build/C/man7/tcp.7:463 build/C/man7/tcp.7:597
15635 #, no-wrap
15636 msgid "2"
15637 msgstr ""
15638
15639 #. type: Plain text
15640 #: build/C/man7/tcp.7:253
15641 msgid ""
15642 "allow increase I<cwnd> by two if acknowledgment is of two segments to "
15643 "compensate for delayed acknowledgments."
15644 msgstr ""
15645
15646 #. type: TP
15647 #: build/C/man7/tcp.7:254
15648 #, no-wrap
15649 msgid "I<tcp_abort_on_overflow> (Boolean; default: disabled; since Linux 2.4)"
15650 msgstr ""
15651
15652 #.  Since 2.3.41
15653 #. type: Plain text
15654 #: build/C/man7/tcp.7:266
15655 msgid ""
15656 "Enable resetting connections if the listening service is too slow and unable "
15657 "to keep up and accept them.  It means that if overflow occurred due to a "
15658 "burst, the connection will recover.  Enable this option I<only> if you are "
15659 "really sure that the listening daemon cannot be tuned to accept connections "
15660 "faster.  Enabling this option can harm the clients of your server."
15661 msgstr ""
15662
15663 #. type: TP
15664 #: build/C/man7/tcp.7:266
15665 #, no-wrap
15666 msgid "I<tcp_adv_win_scale> (integer; default: 2; since Linux 2.4)"
15667 msgstr ""
15668
15669 #.  Since 2.4.0-test7
15670 #. type: Plain text
15671 #: build/C/man7/tcp.7:278
15672 msgid ""
15673 "Count buffering overhead as I<bytes/2^tcp_adv_win_scale>, if "
15674 "I<tcp_adv_win_scale> is greater than 0; or "
15675 "I<bytes-bytes/2^(-tcp_adv_win_scale)>, if I<tcp_adv_win_scale> is less than "
15676 "or equal to zero."
15677 msgstr ""
15678
15679 #. type: Plain text
15680 #: build/C/man7/tcp.7:291
15681 msgid ""
15682 "The socket receive buffer space is shared between the application and "
15683 "kernel.  TCP maintains part of the buffer as the TCP window, this is the "
15684 "size of the receive window advertised to the other end.  The rest of the "
15685 "space is used as the \"application\" buffer, used to isolate the network "
15686 "from scheduling and application latencies.  The I<tcp_adv_win_scale> default "
15687 "value of 2 implies that the space used for the application buffer is one "
15688 "fourth that of the total."
15689 msgstr ""
15690
15691 #. type: TP
15692 #: build/C/man7/tcp.7:291
15693 #, no-wrap
15694 msgid ""
15695 "I<tcp_allowed_congestion_control> (String; default: see text; since Linux "
15696 "2.4.20)"
15697 msgstr ""
15698
15699 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15700 #. type: Plain text
15701 #: build/C/man7/tcp.7:304
15702 msgid ""
15703 "Show/set the congestion control algorithm choices available to unprivileged "
15704 "processes (see the description of the B<TCP_CONGESTION> socket option).  The "
15705 "items in the list are separated by white space and terminated by a newline "
15706 "character.  The list is a subset of those listed in "
15707 "I<tcp_available_congestion_control>.  The default value for this list is "
15708 "\"reno\" plus the default setting of I<tcp_congestion_control>."
15709 msgstr ""
15710
15711 #. type: TP
15712 #: build/C/man7/tcp.7:304
15713 #, no-wrap
15714 msgid "I<tcp_autocorking> (Boolean; default: enabled; since Linux 3.14)"
15715 msgstr ""
15716
15717 #.  commit f54b311142a92ea2e42598e347b84e1655caf8e3
15718 #.  Text heavily based on Documentation/networking/ip-sysctl.txt
15719 #. type: Plain text
15720 #: build/C/man7/tcp.7:321
15721 msgid ""
15722 "If this option is enabled, the kernel tries to coalesce small writes (from "
15723 "consecutive B<write>(2)  and B<sendmsg>(2)  calls) as much as possible, in "
15724 "order to decrease the total number of sent packets.  Coalescing is done if "
15725 "at least one prior packet for the flow is waiting in Qdisc queues or device "
15726 "transmit queue.  Applications can still use the B<TCP_CORK> socket option to "
15727 "obtain optimal behavior when they know how/when to uncork their sockets."
15728 msgstr ""
15729
15730 #. type: TP
15731 #: build/C/man7/tcp.7:321
15732 #, no-wrap
15733 msgid "I<tcp_available_congestion_control> (String; read-only; since Linux 2.4.20)"
15734 msgstr ""
15735
15736 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15737 #. type: Plain text
15738 #: build/C/man7/tcp.7:332
15739 msgid ""
15740 "Show a list of the congestion-control algorithms that are registered.  The "
15741 "items in the list are separated by white space and terminated by a newline "
15742 "character.  This list is a limiting set for the list in "
15743 "I<tcp_allowed_congestion_control>.  More congestion-control algorithms may "
15744 "be available as modules, but not loaded."
15745 msgstr ""
15746
15747 #. type: TP
15748 #: build/C/man7/tcp.7:332
15749 #, no-wrap
15750 msgid "I<tcp_app_win> (integer; default: 31; since Linux 2.4)"
15751 msgstr ""
15752
15753 #.  Since 2.4.0-test7
15754 #. type: Plain text
15755 #: build/C/man7/tcp.7:337
15756 msgid ""
15757 "This variable defines how many bytes of the TCP window are reserved for "
15758 "buffering overhead."
15759 msgstr ""
15760
15761 #
15762 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15763 #. type: Plain text
15764 #: build/C/man7/tcp.7:343
15765 msgid ""
15766 "A maximum of (I<window/2^tcp_app_win>, mss) bytes in the window are reserved "
15767 "for the application buffer.  A value of 0 implies that no amount is "
15768 "reserved."
15769 msgstr ""
15770
15771 #. type: TP
15772 #: build/C/man7/tcp.7:343
15773 #, no-wrap
15774 msgid "I<tcp_base_mss> (Integer; default: 512; since Linux 2.6.17)"
15775 msgstr ""
15776
15777 #
15778 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15779 #. type: Plain text
15780 #: build/C/man7/tcp.7:352
15781 msgid ""
15782 "The initial value of I<search_low> to be used by the packetization layer "
15783 "Path MTU discovery (MTU probing).  If MTU probing is enabled, this is the "
15784 "initial MSS used by the connection."
15785 msgstr ""
15786
15787 #. type: TP
15788 #: build/C/man7/tcp.7:352
15789 #, no-wrap
15790 msgid "I<tcp_bic> (Boolean; default: disabled; Linux 2.4.27/2.6.6 to 2.6.13)"
15791 msgstr ""
15792
15793 #
15794 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15795 #. type: Plain text
15796 #: build/C/man7/tcp.7:366
15797 msgid ""
15798 "Enable BIC TCP congestion control algorithm.  BIC-TCP is a sender-side only "
15799 "change that ensures a linear RTT fairness under large windows while offering "
15800 "both scalability and bounded TCP-friendliness.  The protocol combines two "
15801 "schemes called additive increase and binary search increase.  When the "
15802 "congestion window is large, additive increase with a large increment ensures "
15803 "linear RTT fairness as well as good scalability.  Under small congestion "
15804 "windows, binary search increase provides TCP friendliness."
15805 msgstr ""
15806
15807 #. type: TP
15808 #: build/C/man7/tcp.7:366
15809 #, no-wrap
15810 msgid "I<tcp_bic_low_window> (integer; default: 14; Linux 2.4.27/2.6.6 to 2.6.13)"
15811 msgstr ""
15812
15813 #
15814 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15815 #. type: Plain text
15816 #: build/C/man7/tcp.7:373
15817 msgid ""
15818 "Set the threshold window (in packets) where BIC TCP starts to adjust the "
15819 "congestion window.  Below this threshold BIC TCP behaves the same as the "
15820 "default TCP Reno."
15821 msgstr ""
15822
15823 #. type: TP
15824 #: build/C/man7/tcp.7:373
15825 #, no-wrap
15826 msgid ""
15827 "I<tcp_bic_fast_convergence> (Boolean; default: enabled; Linux 2.4.27/2.6.6 "
15828 "to 2.6.13)"
15829 msgstr ""
15830
15831 #. type: Plain text
15832 #: build/C/man7/tcp.7:377
15833 msgid ""
15834 "Force BIC TCP to more quickly respond to changes in congestion window.  "
15835 "Allows two flows sharing the same connection to converge more rapidly."
15836 msgstr ""
15837
15838 #. type: TP
15839 #: build/C/man7/tcp.7:377
15840 #, no-wrap
15841 msgid "I<tcp_congestion_control> (String; default: see text; since Linux 2.4.13)"
15842 msgstr ""
15843
15844 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15845 #. type: Plain text
15846 #: build/C/man7/tcp.7:384
15847 msgid ""
15848 "Set the default congestion-control algorithm to be used for new "
15849 "connections.  The algorithm \"reno\" is always available, but additional "
15850 "choices may be available depending on kernel configuration.  The default "
15851 "value for this file is set as part of kernel configuration."
15852 msgstr ""
15853
15854 #. type: TP
15855 #: build/C/man7/tcp.7:384
15856 #, no-wrap
15857 msgid "I<tcp_dma_copybreak> (integer; default: 4096; since Linux 2.6.24)"
15858 msgstr ""
15859
15860 #. type: Plain text
15861 #: build/C/man7/tcp.7:391
15862 msgid ""
15863 "Lower limit, in bytes, of the size of socket reads that will be offloaded to "
15864 "a DMA copy engine, if one is present in the system and the kernel was "
15865 "configured with the B<CONFIG_NET_DMA> option."
15866 msgstr ""
15867
15868 #. type: TP
15869 #: build/C/man7/tcp.7:391
15870 #, no-wrap
15871 msgid "I<tcp_dsack> (Boolean; default: enabled; since Linux 2.4)"
15872 msgstr ""
15873
15874 #.  Since 2.4.0-test7
15875 #. type: Plain text
15876 #: build/C/man7/tcp.7:395
15877 msgid "Enable RFC\\ 2883 TCP Duplicate SACK support."
15878 msgstr ""
15879
15880 #. type: TP
15881 #: build/C/man7/tcp.7:395
15882 #, no-wrap
15883 msgid "I<tcp_ecn> (Boolean; default: disabled; since Linux 2.4)"
15884 msgstr ""
15885
15886 #.  Since 2.4.0-test7
15887 #. type: Plain text
15888 #: build/C/man7/tcp.7:402
15889 msgid ""
15890 "Enable RFC\\ 2884 Explicit Congestion Notification.  When enabled, "
15891 "connectivity to some destinations could be affected due to older, "
15892 "misbehaving routers along the path causing connections to be dropped."
15893 msgstr ""
15894
15895 #. type: TP
15896 #: build/C/man7/tcp.7:402
15897 #, no-wrap
15898 msgid "I<tcp_fack> (Boolean; default: enabled; since Linux 2.2)"
15899 msgstr ""
15900
15901 #.  Since 2.1.92
15902 #. type: Plain text
15903 #: build/C/man7/tcp.7:406
15904 msgid "Enable TCP Forward Acknowledgement support."
15905 msgstr ""
15906
15907 #. type: TP
15908 #: build/C/man7/tcp.7:406
15909 #, no-wrap
15910 msgid "I<tcp_fin_timeout> (integer; default: 60; since Linux 2.2)"
15911 msgstr ""
15912
15913 #.  Since 2.1.53
15914 #
15915 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15916 #. type: Plain text
15917 #: build/C/man7/tcp.7:416
15918 msgid ""
15919 "This specifies how many seconds to wait for a final FIN packet before the "
15920 "socket is forcibly closed.  This is strictly a violation of the TCP "
15921 "specification, but required to prevent denial-of-service attacks.  In Linux "
15922 "2.2, the default value was 180."
15923 msgstr ""
15924
15925 #. type: TP
15926 #: build/C/man7/tcp.7:416
15927 #, no-wrap
15928 msgid "I<tcp_frto> (integer; default: 0; since Linux 2.4.21/2.6)"
15929 msgstr ""
15930
15931 #.  Since 2.4.21/2.5.43
15932 #. type: Plain text
15933 #: build/C/man7/tcp.7:425
15934 msgid ""
15935 "Enable F-RTO, an enhanced recovery algorithm for TCP retransmission timeouts "
15936 "(RTOs).  It is particularly beneficial in wireless environments where packet "
15937 "loss is typically due to random radio interference rather than intermediate "
15938 "router congestion.  See RFC 4138 for more details."
15939 msgstr ""
15940
15941 #. type: Plain text
15942 #: build/C/man7/tcp.7:427
15943 msgid "This file can have one of the following values:"
15944 msgstr ""
15945
15946 #. type: Plain text
15947 #: build/C/man7/tcp.7:430
15948 msgid "Disabled."
15949 msgstr ""
15950
15951 #. type: Plain text
15952 #: build/C/man7/tcp.7:432
15953 msgid "The basic version F-RTO algorithm is enabled."
15954 msgstr ""
15955
15956 #. type: Plain text
15957 #: build/C/man7/tcp.7:437
15958 msgid ""
15959 "Enable SACK-enhanced F-RTO if flow uses SACK.  The basic version can be used "
15960 "also when SACK is in use though in that case scenario(s) exists where F-RTO "
15961 "interacts badly with the packet counting of the SACK-enabled TCP flow."
15962 msgstr ""
15963
15964 #. type: Plain text
15965 #: build/C/man7/tcp.7:441
15966 msgid ""
15967 "Before Linux 2.6.22, this parameter was a Boolean value, supporting just "
15968 "values 0 and 1 above."
15969 msgstr ""
15970
15971 #. type: TP
15972 #: build/C/man7/tcp.7:441
15973 #, no-wrap
15974 msgid "I<tcp_frto_response> (integer; default: 0; since Linux 2.6.22)"
15975 msgstr ""
15976
15977 #. type: Plain text
15978 #: build/C/man7/tcp.7:448
15979 msgid ""
15980 "When F-RTO has detected that a TCP retransmission timeout was spurious (i.e, "
15981 "the timeout would have been avoided had TCP set a longer retransmission "
15982 "timeout), TCP has several options concerning what to do next.  Possible "
15983 "values are:"
15984 msgstr ""
15985
15986 #. type: Plain text
15987 #: build/C/man7/tcp.7:456
15988 msgid ""
15989 "Rate halving based; a smooth and conservative response, results in halved "
15990 "congestion window (I<cwnd>)  and slow-start threshold (I<ssthresh>)  after "
15991 "one RTT."
15992 msgstr ""
15993
15994 #. type: Plain text
15995 #: build/C/man7/tcp.7:463
15996 msgid ""
15997 "Very conservative response; not recommended because even though being valid, "
15998 "it interacts poorly with the rest of Linux TCP; halves I<cwnd> and "
15999 "I<ssthresh> immediately."
16000 msgstr ""
16001
16002 #. type: Plain text
16003 #: build/C/man7/tcp.7:472
16004 msgid ""
16005 "Aggressive response; undoes congestion-control measures that are now known "
16006 "to be unnecessary (ignoring the possibility of a lost retransmission that "
16007 "would require TCP to be more cautious); I<cwnd> and I<ssthresh> are restored "
16008 "to the values prior to timeout."
16009 msgstr ""
16010
16011 #. type: TP
16012 #: build/C/man7/tcp.7:473
16013 #, no-wrap
16014 msgid "I<tcp_keepalive_intvl> (integer; default: 75; since Linux 2.4)"
16015 msgstr ""
16016
16017 #.  Since 2.3.18
16018 #. type: Plain text
16019 #: build/C/man7/tcp.7:477
16020 msgid "The number of seconds between TCP keep-alive probes."
16021 msgstr ""
16022
16023 #. type: TP
16024 #: build/C/man7/tcp.7:477
16025 #, no-wrap
16026 msgid "I<tcp_keepalive_probes> (integer; default: 9; since Linux 2.2)"
16027 msgstr ""
16028
16029 #.  Since 2.1.43
16030 #. type: Plain text
16031 #: build/C/man7/tcp.7:483
16032 msgid ""
16033 "The maximum number of TCP keep-alive probes to send before giving up and "
16034 "killing the connection if no response is obtained from the other end."
16035 msgstr ""
16036
16037 #. type: TP
16038 #: build/C/man7/tcp.7:483
16039 #, no-wrap
16040 msgid "I<tcp_keepalive_time> (integer; default: 7200; since Linux 2.2)"
16041 msgstr ""
16042
16043 #.  Since 2.1.43
16044 #. type: Plain text
16045 #: build/C/man7/tcp.7:495
16046 msgid ""
16047 "The number of seconds a connection needs to be idle before TCP begins "
16048 "sending out keep-alive probes.  Keep-alives are sent only when the "
16049 "B<SO_KEEPALIVE> socket option is enabled.  The default value is 7200 seconds "
16050 "(2 hours).  An idle connection is terminated after approximately an "
16051 "additional 11 minutes (9 probes an interval of 75 seconds apart) when "
16052 "keep-alive is enabled."
16053 msgstr ""
16054
16055 #
16056 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16057 #. type: Plain text
16058 #: build/C/man7/tcp.7:500
16059 msgid ""
16060 "Note that underlying connection tracking mechanisms and application timeouts "
16061 "may be much shorter."
16062 msgstr ""
16063
16064 #. type: TP
16065 #: build/C/man7/tcp.7:500
16066 #, no-wrap
16067 msgid "I<tcp_low_latency> (Boolean; default: disabled; since Linux 2.4.21/2.6)"
16068 msgstr ""
16069
16070 #.  Since 2.4.21/2.5.60
16071 #. type: Plain text
16072 #: build/C/man7/tcp.7:508
16073 msgid ""
16074 "If enabled, the TCP stack makes decisions that prefer lower latency as "
16075 "opposed to higher throughput.  It this option is disabled, then higher "
16076 "throughput is preferred.  An example of an application where this default "
16077 "should be changed would be a Beowulf compute cluster."
16078 msgstr ""
16079
16080 #. type: TP
16081 #: build/C/man7/tcp.7:508
16082 #, no-wrap
16083 msgid "I<tcp_max_orphans> (integer; default: see below; since Linux 2.4)"
16084 msgstr ""
16085
16086 #.  Since 2.3.41
16087 #. type: Plain text
16088 #: build/C/man7/tcp.7:522
16089 msgid ""
16090 "The maximum number of orphaned (not attached to any user file handle) TCP "
16091 "sockets allowed in the system.  When this number is exceeded, the orphaned "
16092 "connection is reset and a warning is printed.  This limit exists only to "
16093 "prevent simple denial-of-service attacks.  Lowering this limit is not "
16094 "recommended.  Network conditions might require you to increase the number of "
16095 "orphans allowed, but note that each orphan can eat up to ~64K of unswappable "
16096 "memory.  The default initial value is set equal to the kernel parameter "
16097 "NR_FILE.  This initial default is adjusted depending on the memory in the "
16098 "system."
16099 msgstr ""
16100
16101 #. type: TP
16102 #: build/C/man7/tcp.7:522
16103 #, no-wrap
16104 msgid "I<tcp_max_syn_backlog> (integer; default: see below; since Linux 2.2)"
16105 msgstr ""
16106
16107 #.  Since 2.1.53
16108 #. type: Plain text
16109 #: build/C/man7/tcp.7:539
16110 msgid ""
16111 "The maximum number of queued connection requests which have still not "
16112 "received an acknowledgement from the connecting client.  If this number is "
16113 "exceeded, the kernel will begin dropping requests.  The default value of 256 "
16114 "is increased to 1024 when the memory present in the system is adequate or "
16115 "greater (E<gt>= 128Mb), and reduced to 128 for those systems with very low "
16116 "memory (E<lt>= 32Mb).  It is recommended that if this needs to be increased "
16117 "above 1024, TCP_SYNQ_HSIZE in I<include/net/tcp.h> be modified to keep "
16118 "TCP_SYNQ_HSIZE*16E<lt>=tcp_max_syn_backlog, and the kernel be recompiled."
16119 msgstr ""
16120
16121 #. type: TP
16122 #: build/C/man7/tcp.7:539
16123 #, no-wrap
16124 msgid "I<tcp_max_tw_buckets> (integer; default: see below; since Linux 2.4)"
16125 msgstr ""
16126
16127 #.  Since 2.3.41
16128 #. type: Plain text
16129 #: build/C/man7/tcp.7:549
16130 msgid ""
16131 "The maximum number of sockets in TIME_WAIT state allowed in the system.  "
16132 "This limit exists only to prevent simple denial-of-service attacks.  The "
16133 "default value of NR_FILE*2 is adjusted depending on the memory in the "
16134 "system.  If this number is exceeded, the socket is closed and a warning is "
16135 "printed."
16136 msgstr ""
16137
16138 #. type: TP
16139 #: build/C/man7/tcp.7:549
16140 #, no-wrap
16141 msgid "I<tcp_moderate_rcvbuf> (Boolean; default: enabled; since Linux 2.4.17/2.6.7)"
16142 msgstr ""
16143
16144 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16145 #. type: Plain text
16146 #: build/C/man7/tcp.7:556
16147 msgid ""
16148 "If enabled, TCP performs receive buffer auto-tuning, attempting to "
16149 "automatically size the buffer (no greater than I<tcp_rmem[2]>)  to match the "
16150 "size required by the path for full throughput."
16151 msgstr ""
16152
16153 #. type: TP
16154 #: build/C/man7/tcp.7:556
16155 #, no-wrap
16156 msgid "I<tcp_mem> (since Linux 2.4)"
16157 msgstr ""
16158
16159 #.  Since 2.4.0-test7
16160 #. type: Plain text
16161 #: build/C/man7/tcp.7:568
16162 msgid ""
16163 "This is a vector of 3 integers: [low, pressure, high].  These bounds, "
16164 "measured in units of the system page size, are used by TCP to track its "
16165 "memory usage.  The defaults are calculated at boot time from the amount of "
16166 "available memory.  (TCP can only use I<low memory> for this, which is "
16167 "limited to around 900 megabytes on 32-bit systems.  64-bit systems do not "
16168 "suffer this limitation.)"
16169 msgstr ""
16170
16171 #. type: TP
16172 #: build/C/man7/tcp.7:569
16173 #, no-wrap
16174 msgid "I<low>"
16175 msgstr ""
16176
16177 #. type: Plain text
16178 #: build/C/man7/tcp.7:573
16179 msgid ""
16180 "TCP doesn't regulate its memory allocation when the number of pages it has "
16181 "allocated globally is below this number."
16182 msgstr ""
16183
16184 #. type: TP
16185 #: build/C/man7/tcp.7:573 build/C/man7/udp.7:151
16186 #, no-wrap
16187 msgid "I<pressure>"
16188 msgstr ""
16189
16190 #. type: Plain text
16191 #: build/C/man7/tcp.7:582
16192 msgid ""
16193 "When the amount of memory allocated by TCP exceeds this number of pages, TCP "
16194 "moderates its memory consumption.  This memory pressure state is exited once "
16195 "the number of pages allocated falls below the I<low> mark."
16196 msgstr ""
16197
16198 #. type: TP
16199 #: build/C/man7/tcp.7:582
16200 #, no-wrap
16201 msgid "I<high>"
16202 msgstr ""
16203
16204 #. type: Plain text
16205 #: build/C/man7/tcp.7:586
16206 msgid ""
16207 "The maximum number of pages, globally, that TCP will allocate.  This value "
16208 "overrides any other limits imposed by the kernel."
16209 msgstr ""
16210
16211 #. type: TP
16212 #: build/C/man7/tcp.7:587
16213 #, no-wrap
16214 msgid "I<tcp_mtu_probing> (integer; default: 0; since Linux 2.6.17)"
16215 msgstr ""
16216
16217 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16218 #. type: Plain text
16219 #: build/C/man7/tcp.7:592
16220 msgid ""
16221 "This parameter controls TCP Packetization-Layer Path MTU Discovery.  The "
16222 "following values may be assigned to the file:"
16223 msgstr ""
16224
16225 #. type: Plain text
16226 #: build/C/man7/tcp.7:595
16227 msgid "Disabled"
16228 msgstr ""
16229
16230 #. type: Plain text
16231 #: build/C/man7/tcp.7:597
16232 msgid "Disabled by default, enabled when an ICMP black hole detected"
16233 msgstr ""
16234
16235 #. type: Plain text
16236 #: build/C/man7/tcp.7:600
16237 msgid "Always enabled, use initial MSS of I<tcp_base_mss>."
16238 msgstr ""
16239
16240 #. type: TP
16241 #: build/C/man7/tcp.7:601
16242 #, no-wrap
16243 msgid "I<tcp_no_metrics_save> (Boolean; default: disabled; since Linux 2.6.6)"
16244 msgstr ""
16245
16246 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16247 #. type: Plain text
16248 #: build/C/man7/tcp.7:612
16249 msgid ""
16250 "By default, TCP saves various connection metrics in the route cache when the "
16251 "connection closes, so that connections established in the near future can "
16252 "use these to set initial conditions.  Usually, this increases overall "
16253 "performance, but it may sometimes cause performance degradation.  If "
16254 "I<tcp_no_metrics_save> is enabled, TCP will not cache metrics on closing "
16255 "connections."
16256 msgstr ""
16257
16258 #. type: TP
16259 #: build/C/man7/tcp.7:612
16260 #, no-wrap
16261 msgid "I<tcp_orphan_retries> (integer; default: 8; since Linux 2.4)"
16262 msgstr ""
16263
16264 #.  Since 2.3.41
16265 #. type: Plain text
16266 #: build/C/man7/tcp.7:617
16267 msgid ""
16268 "The maximum number of attempts made to probe the other end of a connection "
16269 "which has been closed by our end."
16270 msgstr ""
16271
16272 #. type: TP
16273 #: build/C/man7/tcp.7:617
16274 #, no-wrap
16275 msgid "I<tcp_reordering> (integer; default: 3; since Linux 2.4)"
16276 msgstr ""
16277
16278 #.  Since 2.4.0-test7
16279 #. type: Plain text
16280 #: build/C/man7/tcp.7:626
16281 msgid ""
16282 "The maximum a packet can be reordered in a TCP packet stream without TCP "
16283 "assuming packet loss and going into slow start.  It is not advisable to "
16284 "change this number.  This is a packet reordering detection metric designed "
16285 "to minimize unnecessary back off and retransmits provoked by reordering of "
16286 "packets on a connection."
16287 msgstr ""
16288
16289 #. type: TP
16290 #: build/C/man7/tcp.7:626
16291 #, no-wrap
16292 msgid "I<tcp_retrans_collapse> (Boolean; default: enabled; since Linux 2.2)"
16293 msgstr ""
16294
16295 #.  Since 2.1.96
16296 #. type: Plain text
16297 #: build/C/man7/tcp.7:630
16298 msgid "Try to send full-sized packets during retransmit."
16299 msgstr ""
16300
16301 #. type: TP
16302 #: build/C/man7/tcp.7:630
16303 #, no-wrap
16304 msgid "I<tcp_retries1> (integer; default: 3; since Linux 2.2)"
16305 msgstr ""
16306
16307 #.  Since 2.1.43
16308 #. type: Plain text
16309 #: build/C/man7/tcp.7:640
16310 msgid ""
16311 "The number of times TCP will attempt to retransmit a packet on an "
16312 "established connection normally, without the extra effort of getting the "
16313 "network layers involved.  Once we exceed this number of retransmits, we "
16314 "first have the network layer update the route if possible before each new "
16315 "retransmit.  The default is the RFC specified minimum of 3."
16316 msgstr ""
16317
16318 #. type: TP
16319 #: build/C/man7/tcp.7:640
16320 #, no-wrap
16321 msgid "I<tcp_retries2> (integer; default: 15; since Linux 2.2)"
16322 msgstr ""
16323
16324 #.  Since 2.1.43
16325 #. type: Plain text
16326 #: build/C/man7/tcp.7:650
16327 msgid ""
16328 "The maximum number of times a TCP packet is retransmitted in established "
16329 "state before giving up.  The default value is 15, which corresponds to a "
16330 "duration of approximately between 13 to 30 minutes, depending on the "
16331 "retransmission timeout.  The RFC\\ 1122 specified minimum limit of 100 "
16332 "seconds is typically deemed too short."
16333 msgstr ""
16334
16335 #. type: TP
16336 #: build/C/man7/tcp.7:650
16337 #, no-wrap
16338 msgid "I<tcp_rfc1337> (Boolean; default: disabled; since Linux 2.2)"
16339 msgstr ""
16340
16341 #.  Since 2.1.90
16342 #. type: Plain text
16343 #: build/C/man7/tcp.7:658
16344 msgid ""
16345 "Enable TCP behavior conformant with RFC\\ 1337.  When disabled, if a RST is "
16346 "received in TIME_WAIT state, we close the socket immediately without waiting "
16347 "for the end of the TIME_WAIT period."
16348 msgstr ""
16349
16350 #. type: TP
16351 #: build/C/man7/tcp.7:658
16352 #, no-wrap
16353 msgid "I<tcp_rmem> (since Linux 2.4)"
16354 msgstr ""
16355
16356 #.  Since 2.4.0-test7
16357 #. type: Plain text
16358 #: build/C/man7/tcp.7:666
16359 msgid ""
16360 "This is a vector of 3 integers: [min, default, max].  These parameters are "
16361 "used by TCP to regulate receive buffer sizes.  TCP dynamically adjusts the "
16362 "size of the receive buffer from the defaults listed below, in the range of "
16363 "these values, depending on memory available in the system."
16364 msgstr ""
16365
16366 #. type: TP
16367 #: build/C/man7/tcp.7:667 build/C/man7/tcp.7:843 build/C/man7/udp.7:145
16368 #, no-wrap
16369 msgid "I<min>"
16370 msgstr ""
16371
16372 #. type: Plain text
16373 #: build/C/man7/tcp.7:682
16374 msgid ""
16375 "minimum size of the receive buffer used by each TCP socket.  The default "
16376 "value is the system page size.  (On Linux 2.4, the default value is 4K, "
16377 "lowered to B<PAGE_SIZE> bytes in low-memory systems.)  This value is used to "
16378 "ensure that in memory pressure mode, allocations below this size will still "
16379 "succeed.  This is not used to bound the size of the receive buffer declared "
16380 "using B<SO_RCVBUF> on a socket."
16381 msgstr ""
16382
16383 #. type: TP
16384 #: build/C/man7/tcp.7:682 build/C/man7/tcp.7:853
16385 #, no-wrap
16386 msgid "I<default>"
16387 msgstr ""
16388
16389 #. type: Plain text
16390 #: build/C/man7/tcp.7:696
16391 msgid ""
16392 "the default size of the receive buffer for a TCP socket.  This value "
16393 "overwrites the initial default buffer size from the generic global "
16394 "I<net.core.rmem_default> defined for all protocols.  The default value is "
16395 "87380 bytes.  (On Linux 2.4, this will be lowered to 43689 in low-memory "
16396 "systems.)  If larger receive buffer sizes are desired, this value should be "
16397 "increased (to affect all sockets).  To employ large TCP windows, the "
16398 "I<net.ipv4.tcp_window_scaling> must be enabled (default)."
16399 msgstr ""
16400
16401 #. type: TP
16402 #: build/C/man7/tcp.7:696 build/C/man7/tcp.7:867 build/C/man7/udp.7:157
16403 #, no-wrap
16404 msgid "I<max>"
16405 msgstr ""
16406
16407 #. type: Plain text
16408 #: build/C/man7/tcp.7:705
16409 msgid ""
16410 "the maximum size of the receive buffer used by each TCP socket.  This value "
16411 "does not override the global I<net.core.rmem_max>.  This is not used to "
16412 "limit the size of the receive buffer declared using B<SO_RCVBUF> on a "
16413 "socket.  The default value is calculated using the formula"
16414 msgstr ""
16415
16416 #. type: Plain text
16417 #: build/C/man7/tcp.7:707
16418 #, no-wrap
16419 msgid "    max(87380, min(4MB, I<tcp_mem>[1]*PAGE_SIZE/128))\n"
16420 msgstr ""
16421
16422 #. type: Plain text
16423 #: build/C/man7/tcp.7:710
16424 msgid ""
16425 "(On Linux 2.4, the default is 87380*2 bytes, lowered to 87380 in low-memory "
16426 "systems)."
16427 msgstr ""
16428
16429 #. type: TP
16430 #: build/C/man7/tcp.7:711
16431 #, no-wrap
16432 msgid "I<tcp_sack> (Boolean; default: enabled; since Linux 2.2)"
16433 msgstr ""
16434
16435 #.  Since 2.1.36
16436 #. type: Plain text
16437 #: build/C/man7/tcp.7:715
16438 msgid "Enable RFC\\ 2018 TCP Selective Acknowledgements."
16439 msgstr ""
16440
16441 #. type: TP
16442 #: build/C/man7/tcp.7:715
16443 #, no-wrap
16444 msgid "I<tcp_slow_start_after_idle> (Boolean; default: enabled; since Linux 2.6.18)"
16445 msgstr ""
16446
16447 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16448 #. type: Plain text
16449 #: build/C/man7/tcp.7:723
16450 msgid ""
16451 "If enabled, provide RFC 2861 behavior and time out the congestion window "
16452 "after an idle period.  An idle period is defined as the current RTO "
16453 "(retransmission timeout).  If disabled, the congestion window will not be "
16454 "timed out after an idle period."
16455 msgstr ""
16456
16457 #. type: TP
16458 #: build/C/man7/tcp.7:723
16459 #, no-wrap
16460 msgid "I<tcp_stdurg> (Boolean; default: disabled; since Linux 2.2)"
16461 msgstr ""
16462
16463 #.  Since 2.1.44
16464 #.  RFC 793 was ambiguous in its specification of the meaning of the
16465 #.  urgent pointer.  RFC 1122 (and RFC 961) fixed on a particular
16466 #.  resolution of this ambiguity (unfortunately the "wrong" one).
16467 #. type: Plain text
16468 #: build/C/man7/tcp.7:737
16469 msgid ""
16470 "If this option is enabled, then use the RFC\\ 1122 interpretation of the TCP "
16471 "urgent-pointer field.  According to this interpretation, the urgent pointer "
16472 "points to the last byte of urgent data.  If this option is disabled, then "
16473 "use the BSD-compatible interpretation of the urgent pointer: the urgent "
16474 "pointer points to the first byte after the urgent data.  Enabling this "
16475 "option may lead to interoperability problems."
16476 msgstr ""
16477
16478 #. type: TP
16479 #: build/C/man7/tcp.7:737
16480 #, no-wrap
16481 msgid "I<tcp_syn_retries> (integer; default: 5; since Linux 2.2)"
16482 msgstr ""
16483
16484 #.  Since 2.1.38
16485 #. type: Plain text
16486 #: build/C/man7/tcp.7:744
16487 msgid ""
16488 "The maximum number of times initial SYNs for an active TCP connection "
16489 "attempt will be retransmitted.  This value should not be higher than 255.  "
16490 "The default value is 5, which corresponds to approximately 180 seconds."
16491 msgstr ""
16492
16493 #. type: TP
16494 #: build/C/man7/tcp.7:744
16495 #, no-wrap
16496 msgid "I<tcp_synack_retries> (integer; default: 5; since Linux 2.2)"
16497 msgstr ""
16498
16499 #.  Since 2.1.38
16500 #. type: Plain text
16501 #: build/C/man7/tcp.7:750
16502 msgid ""
16503 "The maximum number of times a SYN/ACK segment for a passive TCP connection "
16504 "will be retransmitted.  This number should not be higher than 255."
16505 msgstr ""
16506
16507 #. type: TP
16508 #: build/C/man7/tcp.7:750
16509 #, no-wrap
16510 msgid "I<tcp_syncookies> (Boolean; since Linux 2.2)"
16511 msgstr ""
16512
16513 #.  Since 2.1.43
16514 #. type: Plain text
16515 #: build/C/man7/tcp.7:770
16516 msgid ""
16517 "Enable TCP syncookies.  The kernel must be compiled with "
16518 "B<CONFIG_SYN_COOKIES>.  Send out syncookies when the syn backlog queue of a "
16519 "socket overflows.  The syncookies feature attempts to protect a socket from "
16520 "a SYN flood attack.  This should be used as a last resort, if at all.  This "
16521 "is a violation of the TCP protocol, and conflicts with other areas of TCP "
16522 "such as TCP extensions.  It can cause problems for clients and relays.  It "
16523 "is not recommended as a tuning mechanism for heavily loaded servers to help "
16524 "with overloaded or misconfigured conditions.  For recommended alternatives "
16525 "see I<tcp_max_syn_backlog>, I<tcp_synack_retries>, and "
16526 "I<tcp_abort_on_overflow>."
16527 msgstr ""
16528
16529 #. type: TP
16530 #: build/C/man7/tcp.7:770
16531 #, no-wrap
16532 msgid "I<tcp_timestamps> (Boolean; default: enabled; since Linux 2.2)"
16533 msgstr ""
16534
16535 #.  Since 2.1.36
16536 #. type: Plain text
16537 #: build/C/man7/tcp.7:774
16538 msgid "Enable RFC\\ 1323 TCP timestamps."
16539 msgstr ""
16540
16541 #. type: TP
16542 #: build/C/man7/tcp.7:774
16543 #, no-wrap
16544 msgid "I<tcp_tso_win_divisor> (integer; default: 3; since Linux 2.6.9)"
16545 msgstr ""
16546
16547 #. type: Plain text
16548 #: build/C/man7/tcp.7:780
16549 msgid ""
16550 "This parameter controls what percentage of the congestion window can be "
16551 "consumed by a single TCP Segmentation Offload (TSO) frame.  The setting of "
16552 "this parameter is a tradeoff between burstiness and building larger TSO "
16553 "frames."
16554 msgstr ""
16555
16556 #. type: TP
16557 #: build/C/man7/tcp.7:780
16558 #, no-wrap
16559 msgid "I<tcp_tw_recycle> (Boolean; default: disabled; since Linux 2.4)"
16560 msgstr ""
16561
16562 #.  Since 2.3.15
16563 #
16564 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16565 #. type: Plain text
16566 #: build/C/man7/tcp.7:789
16567 msgid ""
16568 "Enable fast recycling of TIME_WAIT sockets.  Enabling this option is not "
16569 "recommended since this causes problems when working with NAT (Network "
16570 "Address Translation)."
16571 msgstr ""
16572
16573 #. type: TP
16574 #: build/C/man7/tcp.7:789
16575 #, no-wrap
16576 msgid "I<tcp_tw_reuse> (Boolean; default: disabled; since Linux 2.4.19/2.6)"
16577 msgstr ""
16578
16579 #.  Since 2.4.19/2.5.43
16580 #
16581 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16582 #. type: Plain text
16583 #: build/C/man7/tcp.7:797
16584 msgid ""
16585 "Allow to reuse TIME_WAIT sockets for new connections when it is safe from "
16586 "protocol viewpoint.  It should not be changed without advice/request of "
16587 "technical experts."
16588 msgstr ""
16589
16590 #. type: TP
16591 #: build/C/man7/tcp.7:797
16592 #, no-wrap
16593 msgid "I<tcp_vegas_cong_avoid> (Boolean; default: disabled; Linux 2.2 to 2.6.13)"
16594 msgstr ""
16595
16596 #.  Since 2.1.8; removed in 2.6.13
16597 #
16598 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16599 #. type: Plain text
16600 #: build/C/man7/tcp.7:808
16601 msgid ""
16602 "Enable TCP Vegas congestion avoidance algorithm.  TCP Vegas is a sender-side "
16603 "only change to TCP that anticipates the onset of congestion by estimating "
16604 "the bandwidth.  TCP Vegas adjusts the sending rate by modifying the "
16605 "congestion window.  TCP Vegas should provide less packet loss, but it is not "
16606 "as aggressive as TCP Reno."
16607 msgstr ""
16608
16609 #. type: TP
16610 #: build/C/man7/tcp.7:808
16611 #, no-wrap
16612 msgid "I<tcp_westwood> (Boolean; default: disabled; Linux 2.4.26/2.6.3 to 2.6.13)"
16613 msgstr ""
16614
16615 #. type: Plain text
16616 #: build/C/man7/tcp.7:820
16617 msgid ""
16618 "Enable TCP Westwood+ congestion control algorithm.  TCP Westwood+ is a "
16619 "sender-side only modification of the TCP Reno protocol stack that optimizes "
16620 "the performance of TCP congestion control.  It is based on end-to-end "
16621 "bandwidth estimation to set congestion window and slow start threshold after "
16622 "a congestion episode.  Using this estimation, TCP Westwood+ adaptively sets "
16623 "a slow start threshold and a congestion window which takes into account the "
16624 "bandwidth used at the time congestion is experienced.  TCP Westwood+ "
16625 "significantly increases fairness with respect to TCP Reno in wired networks "
16626 "and throughput over wireless links."
16627 msgstr ""
16628
16629 #. type: TP
16630 #: build/C/man7/tcp.7:820
16631 #, no-wrap
16632 msgid "I<tcp_window_scaling> (Boolean; default: enabled; since Linux 2.2)"
16633 msgstr ""
16634
16635 #.  Since 2.1.36
16636 #. type: Plain text
16637 #: build/C/man7/tcp.7:834
16638 msgid ""
16639 "Enable RFC\\ 1323 TCP window scaling.  This feature allows the use of a "
16640 "large window (E<gt> 64K) on a TCP connection, should the other end support "
16641 "it.  Normally, the 16 bit window length field in the TCP header limits the "
16642 "window size to less than 64K bytes.  If larger windows are desired, "
16643 "applications can increase the size of their socket buffers and the window "
16644 "scaling option will be employed.  If I<tcp_window_scaling> is disabled, TCP "
16645 "will not negotiate the use of window scaling with the other end during "
16646 "connection setup."
16647 msgstr ""
16648
16649 #. type: TP
16650 #: build/C/man7/tcp.7:834
16651 #, no-wrap
16652 msgid "I<tcp_wmem> (since Linux 2.4)"
16653 msgstr ""
16654
16655 #.  Since 2.4.0-test7
16656 #. type: Plain text
16657 #: build/C/man7/tcp.7:842
16658 msgid ""
16659 "This is a vector of 3 integers: [min, default, max].  These parameters are "
16660 "used by TCP to regulate send buffer sizes.  TCP dynamically adjusts the size "
16661 "of the send buffer from the default values listed below, in the range of "
16662 "these values, depending on memory available."
16663 msgstr ""
16664
16665 #. type: Plain text
16666 #: build/C/man7/tcp.7:853
16667 msgid ""
16668 "Minimum size of the send buffer used by each TCP socket.  The default value "
16669 "is the system page size.  (On Linux 2.4, the default value is 4K bytes.)  "
16670 "This value is used to ensure that in memory pressure mode, allocations below "
16671 "this size will still succeed.  This is not used to bound the size of the "
16672 "send buffer declared using B<SO_SNDBUF> on a socket."
16673 msgstr ""
16674
16675 #.  True in Linux 2.4 and 2.6
16676 #. type: Plain text
16677 #: build/C/man7/tcp.7:867
16678 msgid ""
16679 "The default size of the send buffer for a TCP socket.  This value overwrites "
16680 "the initial default buffer size from the generic global "
16681 "I</proc/sys/net/core/wmem_default> defined for all protocols.  The default "
16682 "value is 16K bytes.  If larger send buffer sizes are desired, this value "
16683 "should be increased (to affect all sockets).  To employ large TCP windows, "
16684 "the I</proc/sys/net/ipv4/tcp_window_scaling> must be set to a nonzero value "
16685 "(default)."
16686 msgstr ""
16687
16688 #. type: Plain text
16689 #: build/C/man7/tcp.7:876
16690 msgid ""
16691 "The maximum size of the send buffer used by each TCP socket.  This value "
16692 "does not override the value in I</proc/sys/net/core/wmem_max>.  This is not "
16693 "used to limit the size of the send buffer declared using B<SO_SNDBUF> on a "
16694 "socket.  The default value is calculated using the formula"
16695 msgstr ""
16696
16697 #. type: Plain text
16698 #: build/C/man7/tcp.7:878
16699 #, no-wrap
16700 msgid "    max(65536, min(4MB, I<tcp_mem>[1]*PAGE_SIZE/128))\n"
16701 msgstr ""
16702
16703 #. type: Plain text
16704 #: build/C/man7/tcp.7:881
16705 msgid ""
16706 "(On Linux 2.4, the default value is 128K bytes, lowered 64K depending on "
16707 "low-memory systems.)"
16708 msgstr ""
16709
16710 #. type: TP
16711 #: build/C/man7/tcp.7:882
16712 #, no-wrap
16713 msgid ""
16714 "I<tcp_workaround_signed_windows> (Boolean; default: disabled; since Linux "
16715 "2.6.26)"
16716 msgstr ""
16717
16718 #. type: Plain text
16719 #: build/C/man7/tcp.7:888
16720 msgid ""
16721 "If enabled, assume that no receipt of a window-scaling option means that the "
16722 "remote TCP is broken and treats the window as a signed quantity.  If "
16723 "disabled, assume that the remote TCP is not broken even if we do not receive "
16724 "a window scaling option from it."
16725 msgstr ""
16726
16727 #.  or SOL_TCP on Linux
16728 #. type: Plain text
16729 #: build/C/man7/tcp.7:906
16730 msgid ""
16731 "To set or get a TCP socket option, call B<getsockopt>(2)  to read or "
16732 "B<setsockopt>(2)  to write the option with the option level argument set to "
16733 "B<IPPROTO_TCP>.  Unless otherwise noted, I<optval> is a pointer to an "
16734 "I<int>.  In addition, most B<IPPROTO_IP> socket options are valid on TCP "
16735 "sockets.  For more information see B<ip>(7)."
16736 msgstr ""
16737
16738 #. type: TP
16739 #: build/C/man7/tcp.7:906
16740 #, no-wrap
16741 msgid "B<TCP_CONGESTION> (since Linux 2.6.13)"
16742 msgstr ""
16743
16744 #.          commit 5f8ef48d240963093451bcf83df89f1a1364f51d
16745 #.          Author: Stephen Hemminger <shemminger@osdl.org>
16746 #. type: Plain text
16747 #: build/C/man7/tcp.7:922
16748 msgid ""
16749 "The argument for this option is a string.  This option allows the caller to "
16750 "set the TCP congestion control algorithm to be used, on a per-socket basis.  "
16751 "Unprivileged processes are restricted to choosing one of the algorithms in "
16752 "I<tcp_allowed_congestion_control> (described above).  Privileged processes "
16753 "(B<CAP_NET_ADMIN>)  can choose from any of the available congestion-control "
16754 "algorithms (see the description of I<tcp_available_congestion_control> "
16755 "above)."
16756 msgstr ""
16757
16758 #. type: TP
16759 #: build/C/man7/tcp.7:922
16760 #, no-wrap
16761 msgid "B<TCP_CORK> (since Linux 2.2)"
16762 msgstr ""
16763
16764 #.  precisely: since 2.1.127
16765 #. type: Plain text
16766 #: build/C/man7/tcp.7:938
16767 msgid ""
16768 "If set, don't send out partial frames.  All queued partial frames are sent "
16769 "when the option is cleared again.  This is useful for prepending headers "
16770 "before calling B<sendfile>(2), or for throughput optimization.  As currently "
16771 "implemented, there is a 200 millisecond ceiling on the time for which output "
16772 "is corked by B<TCP_CORK>.  If this ceiling is reached, then queued data is "
16773 "automatically transmitted.  This option can be combined with B<TCP_NODELAY> "
16774 "only since Linux 2.5.71.  This option should not be used in code intended to "
16775 "be portable."
16776 msgstr ""
16777
16778 #. type: TP
16779 #: build/C/man7/tcp.7:938
16780 #, no-wrap
16781 msgid "B<TCP_DEFER_ACCEPT> (since Linux 2.4)"
16782 msgstr ""
16783
16784 #.  Precisely: since 2.3.38
16785 #.  Useful references:
16786 #.  http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
16787 #.  http://unix.stackexchange.com/questions/94104/real-world-use-of-tcp-defer-accept
16788 #. type: Plain text
16789 #: build/C/man7/tcp.7:949
16790 msgid ""
16791 "Allow a listener to be awakened only when data arrives on the socket.  Takes "
16792 "an integer value (seconds), this can bound the maximum number of attempts "
16793 "TCP will make to complete the connection.  This option should not be used in "
16794 "code intended to be portable."
16795 msgstr ""
16796
16797 #. type: TP
16798 #: build/C/man7/tcp.7:949
16799 #, no-wrap
16800 msgid "B<TCP_INFO> (since Linux 2.4)"
16801 msgstr ""
16802
16803 #. type: Plain text
16804 #: build/C/man7/tcp.7:955
16805 msgid ""
16806 "Used to collect information about this socket.  The kernel returns a "
16807 "I<struct tcp_info> as defined in the file I</usr/include/linux/tcp.h>.  This "
16808 "option should not be used in code intended to be portable."
16809 msgstr ""
16810
16811 #. type: TP
16812 #: build/C/man7/tcp.7:955
16813 #, no-wrap
16814 msgid "B<TCP_KEEPCNT> (since Linux 2.4)"
16815 msgstr ""
16816
16817 #.  Precisely: since 2.3.18
16818 #. type: Plain text
16819 #: build/C/man7/tcp.7:962
16820 msgid ""
16821 "The maximum number of keepalive probes TCP should send before dropping the "
16822 "connection.  This option should not be used in code intended to be portable."
16823 msgstr ""
16824
16825 #. type: TP
16826 #: build/C/man7/tcp.7:962
16827 #, no-wrap
16828 msgid "B<TCP_KEEPIDLE> (since Linux 2.4)"
16829 msgstr ""
16830
16831 #.  Precisely: since 2.3.18
16832 #. type: Plain text
16833 #: build/C/man7/tcp.7:971
16834 msgid ""
16835 "The time (in seconds) the connection needs to remain idle before TCP starts "
16836 "sending keepalive probes, if the socket option B<SO_KEEPALIVE> has been set "
16837 "on this socket.  This option should not be used in code intended to be "
16838 "portable."
16839 msgstr ""
16840
16841 #. type: TP
16842 #: build/C/man7/tcp.7:971
16843 #, no-wrap
16844 msgid "B<TCP_KEEPINTVL> (since Linux 2.4)"
16845 msgstr ""
16846
16847 #.  Precisely: since 2.3.18
16848 #. type: Plain text
16849 #: build/C/man7/tcp.7:976
16850 msgid ""
16851 "The time (in seconds) between individual keepalive probes.  This option "
16852 "should not be used in code intended to be portable."
16853 msgstr ""
16854
16855 #. type: TP
16856 #: build/C/man7/tcp.7:976
16857 #, no-wrap
16858 msgid "B<TCP_LINGER2> (since Linux 2.4)"
16859 msgstr ""
16860
16861 #.  Precisely: since 2.3.41
16862 #. type: Plain text
16863 #: build/C/man7/tcp.7:988
16864 msgid ""
16865 "The lifetime of orphaned FIN_WAIT2 state sockets.  This option can be used "
16866 "to override the system-wide setting in the file "
16867 "I</proc/sys/net/ipv4/tcp_fin_timeout> for this socket.  This is not to be "
16868 "confused with the B<socket>(7)  level option B<SO_LINGER>.  This option "
16869 "should not be used in code intended to be portable."
16870 msgstr ""
16871
16872 #. type: TP
16873 #: build/C/man7/tcp.7:988
16874 #, no-wrap
16875 msgid "B<TCP_MAXSEG>"
16876 msgstr ""
16877
16878 #.  Present in Linux 1.0
16879 #. type: Plain text
16880 #: build/C/man7/tcp.7:998
16881 msgid ""
16882 "The maximum segment size for outgoing TCP packets.  In Linux 2.2 and "
16883 "earlier, and in Linux 2.6.28 and later, if this option is set before "
16884 "connection establishment, it also changes the MSS value announced to the "
16885 "other end in the initial packet.  Values greater than the (eventual) "
16886 "interface MTU have no effect.  TCP will also impose its minimum and maximum "
16887 "bounds over the value provided."
16888 msgstr ""
16889
16890 #. type: TP
16891 #: build/C/man7/tcp.7:998
16892 #, no-wrap
16893 msgid "B<TCP_NODELAY>"
16894 msgstr ""
16895
16896 #.  Present in Linux 1.0
16897 #. type: Plain text
16898 #: build/C/man7/tcp.7:1015
16899 msgid ""
16900 "If set, disable the Nagle algorithm.  This means that segments are always "
16901 "sent as soon as possible, even if there is only a small amount of data.  "
16902 "When not set, data is buffered until there is a sufficient amount to send "
16903 "out, thereby avoiding the frequent sending of small packets, which results "
16904 "in poor utilization of the network.  This option is overridden by "
16905 "B<TCP_CORK>; however, setting this option forces an explicit flush of "
16906 "pending output, even if B<TCP_CORK> is currently set."
16907 msgstr ""
16908
16909 #. type: TP
16910 #: build/C/man7/tcp.7:1015
16911 #, no-wrap
16912 msgid "B<TCP_QUICKACK> (since Linux 2.4.4)"
16913 msgstr ""
16914
16915 #. type: Plain text
16916 #: build/C/man7/tcp.7:1030
16917 msgid ""
16918 "Enable quickack mode if set or disable quickack mode if cleared.  In "
16919 "quickack mode, acks are sent immediately, rather than delayed if needed in "
16920 "accordance to normal TCP operation.  This flag is not permanent, it only "
16921 "enables a switch to or from quickack mode.  Subsequent operation of the TCP "
16922 "protocol will once again enter/leave quickack mode depending on internal "
16923 "protocol processing and factors such as delayed ack timeouts occurring and "
16924 "data transfer.  This option should not be used in code intended to be "
16925 "portable."
16926 msgstr ""
16927
16928 #. type: TP
16929 #: build/C/man7/tcp.7:1030
16930 #, no-wrap
16931 msgid "B<TCP_SYNCNT> (since Linux 2.4)"
16932 msgstr ""
16933
16934 #.  Precisely: since 2.3.18
16935 #. type: Plain text
16936 #: build/C/man7/tcp.7:1037
16937 msgid ""
16938 "Set the number of SYN retransmits that TCP should send before aborting the "
16939 "attempt to connect.  It cannot exceed 255.  This option should not be used "
16940 "in code intended to be portable."
16941 msgstr ""
16942
16943 #. type: TP
16944 #: build/C/man7/tcp.7:1037
16945 #, no-wrap
16946 msgid "B<TCP_USER_TIMEOUT> (since Linux 2.6.37)"
16947 msgstr ""
16948
16949 #.          commit dca43c75e7e545694a9dd6288553f55c53e2a3a3
16950 #.          Author: Jerry Chu <hkchu@google.com>
16951 #.  The following text taken nearly verbatim from Jerry Chu's (excellent)
16952 #.  commit message.
16953 #. type: Plain text
16954 #: build/C/man7/tcp.7:1055
16955 msgid ""
16956 "This option takes an I<unsigned int> as an argument.  When the value is "
16957 "greater than 0, it specifies the maximum amount of time in milliseconds that "
16958 "transmitted data may remain unacknowledged before TCP will forcibly close "
16959 "the corresponding connection and return B<ETIMEDOUT> to the application.  If "
16960 "the option value is specified as 0, TCP will to use the system default."
16961 msgstr ""
16962
16963 #. type: Plain text
16964 #: build/C/man7/tcp.7:1062
16965 msgid ""
16966 "Increasing user timeouts allows a TCP connection to survive extended periods "
16967 "without end-to-end connectivity.  Decreasing user timeouts allows "
16968 "applications to \"fail fast\", if so desired.  Otherwise, failure may take "
16969 "up to 20 minutes with the current system defaults in a normal WAN "
16970 "environment."
16971 msgstr ""
16972
16973 #. type: Plain text
16974 #: build/C/man7/tcp.7:1072
16975 msgid ""
16976 "This option can be set during any state of a TCP connection, but is only "
16977 "effective during the synchronized states of a connection (ESTABLISHED, "
16978 "FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK).  Moreover, when "
16979 "used with the TCP keepalive (B<SO_KEEPALIVE>)  option, B<TCP_USER_TIMEOUT> "
16980 "will override keepalive to determine when to close a connection due to "
16981 "keepalive failure."
16982 msgstr ""
16983
16984 #. type: Plain text
16985 #: build/C/man7/tcp.7:1075
16986 msgid ""
16987 "The option has no effect on when TCP retransmits a packet, nor when a "
16988 "keepalive probe is sent."
16989 msgstr ""
16990
16991 #. type: Plain text
16992 #: build/C/man7/tcp.7:1079
16993 msgid ""
16994 "This option, like many others, will be inherited by the socket returned by "
16995 "B<accept>(2), if it was set on the listening socket."
16996 msgstr ""
16997
16998 #. type: Plain text
16999 #: build/C/man7/tcp.7:1082
17000 msgid ""
17001 "Further details on the user timeout feature can be found in RFC\\ 793 and "
17002 "RFC\\ 5482 (\"TCP User Timeout Option\")."
17003 msgstr ""
17004
17005 #. type: TP
17006 #: build/C/man7/tcp.7:1082
17007 #, no-wrap
17008 msgid "B<TCP_WINDOW_CLAMP> (since Linux 2.4)"
17009 msgstr ""
17010
17011 #.  Precisely: since 2.3.41
17012 #. type: Plain text
17013 #: build/C/man7/tcp.7:1089
17014 msgid ""
17015 "Bound the size of the advertised window to this value.  The kernel imposes a "
17016 "minimum size of SOCK_MIN_RCVBUF/2.  This option should not be used in code "
17017 "intended to be portable."
17018 msgstr ""
17019
17020 #. type: SS
17021 #: build/C/man7/tcp.7:1089 build/C/man7/unix.7:177
17022 #, no-wrap
17023 msgid "Sockets API"
17024 msgstr ""
17025
17026 #. type: Plain text
17027 #: build/C/man7/tcp.7:1098
17028 msgid ""
17029 "TCP provides limited support for out-of-band data, in the form of (a single "
17030 "byte of) urgent data.  In Linux this means if the other end sends newer "
17031 "out-of-band data the older urgent data is inserted as normal data into the "
17032 "stream (even when B<SO_OOBINLINE> is not set).  This differs from BSD-based "
17033 "stacks."
17034 msgstr ""
17035
17036 #. type: Plain text
17037 #: build/C/man7/tcp.7:1105
17038 msgid ""
17039 "Linux uses the BSD compatible interpretation of the urgent pointer field by "
17040 "default.  This violates RFC\\ 1122, but is required for interoperability "
17041 "with other stacks.  It can be changed via I</proc/sys/net/ipv4/tcp_stdurg>."
17042 msgstr ""
17043
17044 #. type: Plain text
17045 #: build/C/man7/tcp.7:1110
17046 msgid ""
17047 "It is possible to peek at out-of-band data using the B<recv>(2)  B<MSG_PEEK> "
17048 "flag."
17049 msgstr ""
17050
17051 #. type: Plain text
17052 #: build/C/man7/tcp.7:1126
17053 msgid ""
17054 "Since version 2.4, Linux supports the use of B<MSG_TRUNC> in the I<flags> "
17055 "argument of B<recv>(2)  (and B<recvmsg>(2)).  This flag causes the received "
17056 "bytes of data to be discarded, rather than passed back in a caller-supplied "
17057 "buffer.  Since Linux 2.4.4, B<MSG_TRUNC> also has this effect when used in "
17058 "conjunction with B<MSG_OOB> to receive out-of-band data."
17059 msgstr ""
17060
17061 #. type: Plain text
17062 #: build/C/man7/tcp.7:1132 build/C/man7/unix.7:290
17063 msgid ""
17064 "The following B<ioctl>(2)  calls return information in I<value>.  The "
17065 "correct syntax is:"
17066 msgstr ""
17067
17068 #. type: Plain text
17069 #: build/C/man7/tcp.7:1137
17070 #, no-wrap
17071 msgid ""
17072 "B<int>I< value>B<;>\n"
17073 "I<error>B< = ioctl(>I<tcp_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
17074 msgstr ""
17075
17076 #. type: Plain text
17077 #: build/C/man7/tcp.7:1142
17078 msgid "I<ioctl_type> is one of the following:"
17079 msgstr ""
17080
17081 #. type: TP
17082 #: build/C/man7/tcp.7:1142 build/C/man7/unix.7:300
17083 #, no-wrap
17084 msgid "B<SIOCINQ>"
17085 msgstr ""
17086
17087 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
17088 #.  filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
17089 #.  SIOCOUTQ also has an effect for UNIX domain sockets, but not
17090 #.  quite what userland might expect. It seems to return the number
17091 #.  of bytes allocated for buffers containing pending output.
17092 #.  That number is normally larger than the number of bytes of pending
17093 #.  output. Since this info is, from userland's point of view, imprecise,
17094 #.  and it may well change, probably best not to document this now.
17095 #. type: Plain text
17096 #: build/C/man7/tcp.7:1158 build/C/man7/unix.7:322
17097 msgid ""
17098 "Returns the amount of queued unread data in the receive buffer.  The socket "
17099 "must not be in LISTEN state, otherwise an error (B<EINVAL>)  is returned.  "
17100 "B<SIOCINQ> is defined in I<E<lt>linux/sockios.hE<gt>>.  Alternatively, you "
17101 "can use the synonymous B<FIONREAD>, defined in I<E<lt>sys/ioctl.hE<gt>>."
17102 msgstr ""
17103
17104 #. type: TP
17105 #: build/C/man7/tcp.7:1158
17106 #, no-wrap
17107 msgid "B<SIOCATMARK>"
17108 msgstr ""
17109
17110 #. type: Plain text
17111 #: build/C/man7/tcp.7:1163
17112 msgid ""
17113 "Returns true (i.e., I<value> is nonzero) if the inbound data stream is at "
17114 "the urgent mark."
17115 msgstr ""
17116
17117 #. type: Plain text
17118 #: build/C/man7/tcp.7:1179
17119 msgid ""
17120 "If the B<SO_OOBINLINE> socket option is set, and B<SIOCATMARK> returns true, "
17121 "then the next read from the socket will return the urgent data.  If the "
17122 "B<SO_OOBINLINE> socket option is not set, and B<SIOCATMARK> returns true, "
17123 "then the next read from the socket will return the bytes following the "
17124 "urgent data (to actually read the urgent data requires the B<recv(MSG_OOB)> "
17125 "flag)."
17126 msgstr ""
17127
17128 #. type: Plain text
17129 #: build/C/man7/tcp.7:1193
17130 msgid ""
17131 "Note that a read never reads across the urgent mark.  If an application is "
17132 "informed of the presence of urgent data via B<select>(2)  (using the "
17133 "I<exceptfds> argument) or through delivery of a B<SIGURG> signal, then it "
17134 "can advance up to the mark using a loop which repeatedly tests B<SIOCATMARK> "
17135 "and performs a read (requesting any number of bytes) as long as "
17136 "B<SIOCATMARK> returns false."
17137 msgstr ""
17138
17139 #. type: TP
17140 #: build/C/man7/tcp.7:1193
17141 #, no-wrap
17142 msgid "B<SIOCOUTQ>"
17143 msgstr ""
17144
17145 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
17146 #.  filed 2010-09-10, may cause SIOCOUTQ to be defined in glibc headers
17147 #. type: Plain text
17148 #: build/C/man7/tcp.7:1209
17149 msgid ""
17150 "Returns the amount of unsent data in the socket send queue.  The socket must "
17151 "not be in LISTEN state, otherwise an error (B<EINVAL>)  is returned.  "
17152 "B<SIOCOUTQ> is defined in I<E<lt>linux/sockios.hE<gt>>.  Alternatively, you "
17153 "can use the synonymous B<TIOCOUTQ>, defined in I<E<lt>sys/ioctl.hE<gt>>."
17154 msgstr ""
17155
17156 #. type: Plain text
17157 #: build/C/man7/tcp.7:1214
17158 msgid ""
17159 "When a network error occurs, TCP tries to resend the packet.  If it doesn't "
17160 "succeed after some time, either B<ETIMEDOUT> or the last received error on "
17161 "this connection is reported."
17162 msgstr ""
17163
17164 #. type: Plain text
17165 #: build/C/man7/tcp.7:1225
17166 msgid ""
17167 "Some applications require a quicker error notification.  This can be enabled "
17168 "with the B<IPPROTO_IP> level B<IP_RECVERR> socket option.  When this option "
17169 "is enabled, all incoming errors are immediately passed to the user program.  "
17170 "Use this option with care \\(em it makes TCP less tolerant to routing "
17171 "changes and other normal network conditions."
17172 msgstr ""
17173
17174 #. type: TP
17175 #: build/C/man7/tcp.7:1226
17176 #, no-wrap
17177 msgid "B<EAFNOTSUPPORT>"
17178 msgstr ""
17179
17180 #. type: Plain text
17181 #: build/C/man7/tcp.7:1232
17182 msgid "Passed socket address type in I<sin_family> was not B<AF_INET>."
17183 msgstr ""
17184
17185 #. type: Plain text
17186 #: build/C/man7/tcp.7:1236
17187 msgid ""
17188 "The other end closed the socket unexpectedly or a read is executed on a shut "
17189 "down socket."
17190 msgstr ""
17191
17192 #. type: TP
17193 #: build/C/man7/tcp.7:1236
17194 #, no-wrap
17195 msgid "B<ETIMEDOUT>"
17196 msgstr ""
17197
17198 #. type: Plain text
17199 #: build/C/man7/tcp.7:1239
17200 msgid "The other end didn't acknowledge retransmitted data after some time."
17201 msgstr ""
17202
17203 #. type: Plain text
17204 #: build/C/man7/tcp.7:1243
17205 msgid ""
17206 "Any errors defined for B<ip>(7)  or the generic socket layer may also be "
17207 "returned for TCP."
17208 msgstr ""
17209
17210 #. type: Plain text
17211 #: build/C/man7/tcp.7:1250
17212 msgid ""
17213 "Support for Explicit Congestion Notification, zero-copy B<sendfile>(2), "
17214 "reordering support and some SACK extensions (DSACK) were introduced in 2.4.  "
17215 "Support for forward acknowledgement (FACK), TIME_WAIT recycling, and "
17216 "per-connection keepalive socket options were introduced in 2.3."
17217 msgstr ""
17218
17219 #. type: Plain text
17220 #: build/C/man7/tcp.7:1252
17221 msgid "Not all errors are documented."
17222 msgstr ""
17223
17224 #.  Only a single Linux kernel version is described
17225 #.  Info for 2.2 was lost. Should be added again,
17226 #.  or put into a separate page.
17227 #.  .SH AUTHORS
17228 #.  This man page was originally written by Andi Kleen.
17229 #.  It was updated for 2.4 by Nivedita Singhvi with input from
17230 #.  Alexey Kuznetsov's Documentation/networking/ip-sysctl.txt
17231 #.  document.
17232 #. type: Plain text
17233 #: build/C/man7/tcp.7:1262
17234 msgid "IPv6 is not described."
17235 msgstr ""
17236
17237 #. type: Plain text
17238 #: build/C/man7/tcp.7:1274
17239 msgid ""
17240 "B<accept>(2), B<bind>(2), B<connect>(2), B<getsockopt>(2), B<listen>(2), "
17241 "B<recvmsg>(2), B<sendfile>(2), B<sendmsg>(2), B<socket>(2), B<ip>(7), "
17242 "B<socket>(7)"
17243 msgstr ""
17244
17245 #. type: Plain text
17246 #: build/C/man7/tcp.7:1276
17247 msgid "RFC\\ 793 for the TCP specification."
17248 msgstr ""
17249
17250 #. type: Plain text
17251 #: build/C/man7/tcp.7:1278
17252 msgid ""
17253 "RFC\\ 1122 for the TCP requirements and a description of the Nagle "
17254 "algorithm."
17255 msgstr ""
17256
17257 #. type: Plain text
17258 #: build/C/man7/tcp.7:1280
17259 msgid "RFC\\ 1323 for TCP timestamp and window scaling options."
17260 msgstr ""
17261
17262 #. type: Plain text
17263 #: build/C/man7/tcp.7:1282
17264 msgid "RFC\\ 1337 for a description of TIME_WAIT assassination hazards."
17265 msgstr ""
17266
17267 #. type: Plain text
17268 #: build/C/man7/tcp.7:1284
17269 msgid "RFC\\ 3168 for a description of Explicit Congestion Notification."
17270 msgstr ""
17271
17272 #. type: Plain text
17273 #: build/C/man7/tcp.7:1286
17274 msgid "RFC\\ 2581 for TCP congestion control algorithms."
17275 msgstr ""
17276
17277 #. type: Plain text
17278 #: build/C/man7/tcp.7:1288
17279 msgid "RFC\\ 2018 and RFC\\ 2883 for SACK and extensions to SACK."
17280 msgstr ""
17281
17282 #. type: TH
17283 #: build/C/man7/udp.7:12
17284 #, no-wrap
17285 msgid "UDP"
17286 msgstr ""
17287
17288 #. type: TH
17289 #: build/C/man7/udp.7:12
17290 #, no-wrap
17291 msgid "2013-07-31"
17292 msgstr ""
17293
17294 #. type: Plain text
17295 #: build/C/man7/udp.7:15
17296 msgid "udp - User Datagram Protocol for IPv4"
17297 msgstr ""
17298
17299 #. type: Plain text
17300 #: build/C/man7/udp.7:21
17301 msgid "B<#include E<lt>netinet/udp.hE<gt>>"
17302 msgstr ""
17303
17304 #. type: Plain text
17305 #: build/C/man7/udp.7:23
17306 msgid "B<udp_socket = socket(AF_INET, SOCK_DGRAM, 0);>"
17307 msgstr ""
17308
17309 #. type: Plain text
17310 #: build/C/man7/udp.7:29
17311 msgid ""
17312 "This is an implementation of the User Datagram Protocol described in RFC\\ "
17313 "768.  It implements a connectionless, unreliable datagram packet service.  "
17314 "Packets may be reordered or duplicated before they arrive.  UDP generates "
17315 "and checks checksums to catch transmission errors."
17316 msgstr ""
17317
17318 #. type: Plain text
17319 #: build/C/man7/udp.7:58
17320 msgid ""
17321 "When a UDP socket is created, its local and remote addresses are "
17322 "unspecified.  Datagrams can be sent immediately using B<sendto>(2)  or "
17323 "B<sendmsg>(2)  with a valid destination address as an argument.  When "
17324 "B<connect>(2)  is called on the socket, the default destination address is "
17325 "set and datagrams can now be sent using B<send>(2)  or B<write>(2)  without "
17326 "specifying a destination address.  It is still possible to send to other "
17327 "destinations by passing an address to B<sendto>(2)  or B<sendmsg>(2).  In "
17328 "order to receive packets, the socket can be bound to a local address first "
17329 "by using B<bind>(2).  Otherwise, the socket layer will automatically assign "
17330 "a free local port out of the range defined by "
17331 "I</proc/sys/net/ipv4/ip_local_port_range> and bind the socket to "
17332 "B<INADDR_ANY>."
17333 msgstr ""
17334
17335 #. type: Plain text
17336 #: build/C/man7/udp.7:66
17337 msgid ""
17338 "All receive operations return only one packet.  When the packet is smaller "
17339 "than the passed buffer, only that much data is returned; when it is bigger, "
17340 "the packet is truncated and the B<MSG_TRUNC> flag is set.  B<MSG_WAITALL> is "
17341 "not supported."
17342 msgstr ""
17343
17344 #. type: Plain text
17345 #: build/C/man7/udp.7:75
17346 msgid ""
17347 "IP options may be sent or received using the socket options described in "
17348 "B<ip>(7).  They are processed by the kernel only when the appropriate "
17349 "I</proc> parameter is enabled (but still passed to the user even when it is "
17350 "turned off).  See B<ip>(7)."
17351 msgstr ""
17352
17353 #. type: Plain text
17354 #: build/C/man7/udp.7:80
17355 msgid ""
17356 "When the B<MSG_DONTROUTE> flag is set on sending, the destination address "
17357 "must refer to a local interface address and the packet is sent only to that "
17358 "interface."
17359 msgstr ""
17360
17361 #. type: Plain text
17362 #: build/C/man7/udp.7:98
17363 msgid ""
17364 "By default, Linux UDP does path MTU (Maximum Transmission Unit) discovery.  "
17365 "This means the kernel will keep track of the MTU to a specific target IP "
17366 "address and return B<EMSGSIZE> when a UDP packet write exceeds it.  When "
17367 "this happens, the application should decrease the packet size.  Path MTU "
17368 "discovery can be also turned off using the B<IP_MTU_DISCOVER> socket option "
17369 "or the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file; see B<ip>(7)  for "
17370 "details.  When turned off, UDP will fragment outgoing UDP packets that "
17371 "exceed the interface MTU.  However, disabling it is not recommended for "
17372 "performance and reliability reasons."
17373 msgstr ""
17374
17375 #. type: Plain text
17376 #: build/C/man7/udp.7:103
17377 msgid "UDP uses the IPv4 I<sockaddr_in> address format described in B<ip>(7)."
17378 msgstr ""
17379
17380 #. type: Plain text
17381 #: build/C/man7/udp.7:114
17382 msgid ""
17383 "All fatal errors will be passed to the user as an error return even when the "
17384 "socket is not connected.  This includes asynchronous errors received from "
17385 "the network.  You may get an error for an earlier packet that was sent on "
17386 "the same socket.  This behavior differs from many other BSD socket "
17387 "implementations which don't pass any errors unless the socket is connected.  "
17388 "Linux's behavior is mandated by B<RFC\\ 1122>."
17389 msgstr ""
17390
17391 #. type: Plain text
17392 #: build/C/man7/udp.7:128
17393 msgid ""
17394 "For compatibility with legacy code, in Linux 2.0 and 2.2 it was possible to "
17395 "set the B<SO_BSDCOMPAT> B<SOL_SOCKET> option to receive remote errors only "
17396 "when the socket has been connected (except for B<EPROTO> and B<EMSGSIZE>).  "
17397 "Locally generated errors are always passed.  Support for this socket option "
17398 "was removed in later kernels; see B<socket>(7)  for further information."
17399 msgstr ""
17400
17401 #. type: Plain text
17402 #: build/C/man7/udp.7:137
17403 msgid ""
17404 "When the B<IP_RECVERR> option is enabled, all errors are stored in the "
17405 "socket error queue, and can be received by B<recvmsg>(2)  with the "
17406 "B<MSG_ERRQUEUE> flag set."
17407 msgstr ""
17408
17409 #. type: Plain text
17410 #: build/C/man7/udp.7:140
17411 msgid ""
17412 "System-wide UDP parameter settings can be accessed by files in the directory "
17413 "I</proc/sys/net/ipv4/>."
17414 msgstr ""
17415
17416 #. type: TP
17417 #: build/C/man7/udp.7:140
17418 #, no-wrap
17419 msgid "I<udp_mem> (since Linux 2.6.25)"
17420 msgstr ""
17421
17422 #. type: Plain text
17423 #: build/C/man7/udp.7:144
17424 msgid ""
17425 "This is a vector of three integers governing the number of pages allowed for "
17426 "queueing by all UDP sockets."
17427 msgstr ""
17428
17429 #. type: Plain text
17430 #: build/C/man7/udp.7:151
17431 msgid ""
17432 "Below this number of pages, UDP is not bothered about its memory appetite.  "
17433 "When the amount of memory allocated by UDP exceeds this number, UDP starts "
17434 "to moderate memory usage."
17435 msgstr ""
17436
17437 #. type: Plain text
17438 #: build/C/man7/udp.7:157
17439 msgid ""
17440 "This value was introduced to follow the format of I<tcp_mem> (see "
17441 "B<tcp>(7))."
17442 msgstr ""
17443
17444 #. type: Plain text
17445 #: build/C/man7/udp.7:160
17446 msgid "Number of pages allowed for queueing by all UDP sockets."
17447 msgstr ""
17448
17449 #. type: Plain text
17450 #: build/C/man7/udp.7:164
17451 msgid ""
17452 "Defaults values for these three items are calculated at boot time from the "
17453 "amount of available memory."
17454 msgstr ""
17455
17456 #. type: TP
17457 #: build/C/man7/udp.7:164
17458 #, no-wrap
17459 msgid "I<udp_rmem_min> (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
17460 msgstr ""
17461
17462 #. type: Plain text
17463 #: build/C/man7/udp.7:171
17464 msgid ""
17465 "Minimal size, in bytes, of receive buffers used by UDP sockets in "
17466 "moderation.  Each UDP socket is able to use the size for receiving data, "
17467 "even if total pages of UDP sockets exceed I<udp_mem> pressure."
17468 msgstr ""
17469
17470 #. type: TP
17471 #: build/C/man7/udp.7:171
17472 #, no-wrap
17473 msgid "I<udp_wmem_min> (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
17474 msgstr ""
17475
17476 #. type: Plain text
17477 #: build/C/man7/udp.7:178
17478 msgid ""
17479 "Minimal size, in bytes, of send buffer used by UDP sockets in moderation.  "
17480 "Each UDP socket is able to use the size for sending data, even if total "
17481 "pages of UDP sockets exceed I<udp_mem> pressure."
17482 msgstr ""
17483
17484 #. type: Plain text
17485 #: build/C/man7/udp.7:189
17486 msgid ""
17487 "To set or get a UDP socket option, call B<getsockopt>(2)  to read or "
17488 "B<setsockopt>(2)  to write the option with the option level argument set to "
17489 "B<IPPROTO_UDP>.  Unless otherwise noted, I<optval> is a pointer to an "
17490 "I<int>."
17491 msgstr ""
17492
17493 #. type: TP
17494 #: build/C/man7/udp.7:189
17495 #, no-wrap
17496 msgid "B<UDP_CORK> (since Linux 2.5.44)"
17497 msgstr ""
17498
17499 #.  FIXME document UDP_ENCAP (new in kernel 2.5.67)
17500 #.  From include/linux/udp.h:
17501 #.  /* UDP encapsulation types */
17502 #.  #define UDP_ENCAP_ESPINUDP_NON_IKE      1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
17503 #.  #define UDP_ENCAP_ESPINUDP      2 /* draft-ietf-ipsec-udp-encaps-06 */
17504 #.  #define UDP_ENCAP_L2TPINUDP     3 /* rfc2661 */
17505 #. type: Plain text
17506 #: build/C/man7/udp.7:202
17507 msgid ""
17508 "If this option is enabled, then all data output on this socket is "
17509 "accumulated into a single datagram that is transmitted when the option is "
17510 "disabled.  This option should not be used in code intended to be portable."
17511 msgstr ""
17512
17513 #. type: Plain text
17514 #: build/C/man7/udp.7:206
17515 msgid "These ioctls can be accessed using B<ioctl>(2).  The correct syntax is:"
17516 msgstr ""
17517
17518 #. type: Plain text
17519 #: build/C/man7/udp.7:211
17520 #, no-wrap
17521 msgid ""
17522 "B<int>I< value>B<;>\n"
17523 "I<error>B< = ioctl(>I<udp_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
17524 msgstr ""
17525
17526 #. type: TP
17527 #: build/C/man7/udp.7:213
17528 #, no-wrap
17529 msgid "B<FIONREAD> (B<SIOCINQ>)"
17530 msgstr ""
17531
17532 #.  See http://www.securiteam.com/unixfocus/5KP0I15IKO.html
17533 #.  "GNUnet DoS (UDP Socket Unreachable)", 14 May 2006
17534 #. type: Plain text
17535 #: build/C/man7/udp.7:231
17536 msgid ""
17537 "Gets a pointer to an integer as argument.  Returns the size of the next "
17538 "pending datagram in the integer in bytes, or 0 when no datagram is pending.  "
17539 "B<Warning:> Using B<FIONREAD>, it is impossible to distinguish the case "
17540 "where no datagram is pending from the case where the next pending datagram "
17541 "contains zero bytes of data.  It is safer to use B<select>(2), B<poll>(2), "
17542 "or B<epoll>(7)  to distinguish these cases."
17543 msgstr ""
17544
17545 #. type: TP
17546 #: build/C/man7/udp.7:231
17547 #, no-wrap
17548 msgid "B<TIOCOUTQ> (B<SIOCOUTQ>)"
17549 msgstr ""
17550
17551 #. type: Plain text
17552 #: build/C/man7/udp.7:235
17553 msgid ""
17554 "Returns the number of data bytes in the local send queue.  Only supported "
17555 "with Linux 2.4 and above."
17556 msgstr ""
17557
17558 #. type: Plain text
17559 #: build/C/man7/udp.7:241
17560 msgid ""
17561 "In addition, all ioctls documented in B<ip>(7)  and B<socket>(7)  are "
17562 "supported."
17563 msgstr ""
17564
17565 #. type: Plain text
17566 #: build/C/man7/udp.7:247
17567 msgid ""
17568 "All errors documented for B<socket>(7)  or B<ip>(7)  may be returned by a "
17569 "send or receive on a UDP socket."
17570 msgstr ""
17571
17572 #. type: TP
17573 #: build/C/man7/udp.7:247 build/C/man7/unix.7:327
17574 #, no-wrap
17575 msgid "B<ECONNREFUSED>"
17576 msgstr ""
17577
17578 #. type: Plain text
17579 #: build/C/man7/udp.7:251
17580 msgid ""
17581 "No receiver was associated with the destination address.  This might be "
17582 "caused by a previous packet sent over the socket."
17583 msgstr ""
17584
17585 #.  .SH CREDITS
17586 #.  This man page was written by Andi Kleen.
17587 #. type: Plain text
17588 #: build/C/man7/udp.7:256
17589 msgid "B<IP_RECVERR> is a new feature in Linux 2.2."
17590 msgstr ""
17591
17592 #. type: Plain text
17593 #: build/C/man7/udp.7:261
17594 msgid "B<ip>(7), B<raw>(7), B<socket>(7), B<udplite>(7)"
17595 msgstr ""
17596
17597 #. type: Plain text
17598 #: build/C/man7/udp.7:263
17599 msgid "RFC\\ 768 for the User Datagram Protocol."
17600 msgstr ""
17601
17602 #. type: Plain text
17603 #: build/C/man7/udp.7:265
17604 msgid "RFC\\ 1122 for the host requirements."
17605 msgstr ""
17606
17607 #. type: Plain text
17608 #: build/C/man7/udp.7:267
17609 msgid "RFC\\ 1191 for a description of path MTU discovery."
17610 msgstr ""
17611
17612 #. type: TH
17613 #: build/C/man7/udplite.7:27
17614 #, no-wrap
17615 msgid "UDPLITE"
17616 msgstr ""
17617
17618 #. type: TH
17619 #: build/C/man7/udplite.7:27
17620 #, no-wrap
17621 msgid "2008-12-03"
17622 msgstr ""
17623
17624 #. type: Plain text
17625 #: build/C/man7/udplite.7:30
17626 msgid "udplite - Lightweight User Datagram Protocol"
17627 msgstr ""
17628
17629 #. type: Plain text
17630 #: build/C/man7/udplite.7:38
17631 msgid "B<sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);>"
17632 msgstr ""
17633
17634 #. type: Plain text
17635 #: build/C/man7/udplite.7:41
17636 msgid ""
17637 "This is an implementation of the Lightweight User Datagram Protocol "
17638 "(UDP-Lite), as described in RFC\\ 3828."
17639 msgstr ""
17640
17641 #. type: Plain text
17642 #: build/C/man7/udplite.7:47
17643 msgid ""
17644 "UDP-Lite is an extension of UDP (RFC\\ 768) to support variable-length "
17645 "checksums.  This has advantages for some types of multimedia transport that "
17646 "may be able to make use of slightly damaged datagrams, rather than having "
17647 "them discarded by lower-layer protocols."
17648 msgstr ""
17649
17650 #. type: Plain text
17651 #: build/C/man7/udplite.7:53
17652 msgid ""
17653 "The variable-length checksum coverage is set via a B<setsockopt>(2)  "
17654 "option.  If this option is not set, the only difference to UDP is in using a "
17655 "different IP protocol identifier (IANA number 136)."
17656 msgstr ""
17657
17658 #. type: Plain text
17659 #: build/C/man7/udplite.7:58
17660 msgid ""
17661 "The UDP-Lite implementation is a full extension of B<udp>(7)\\(emthat is, it "
17662 "shares the same API and API behaviour, and in addition offers two socket "
17663 "options to control the checksum coverage."
17664 msgstr ""
17665
17666 #. type: Plain text
17667 #: build/C/man7/udplite.7:67
17668 msgid ""
17669 "UDP-Litev4 uses the I<sockaddr_in> address format described in B<ip>(7).  "
17670 "UDP-Litev6 uses the I<sockaddr_in6> address format described in B<ipv6>(7)."
17671 msgstr ""
17672
17673 #. type: Plain text
17674 #: build/C/man7/udplite.7:80
17675 msgid ""
17676 "To set or get a UDP-Lite socket option, call B<getsockopt>(2)  to read or "
17677 "B<setsockopt>(2)  to write the option with the option level argument set to "
17678 "B<IPPROTO_UDPLITE>.  In addition, all B<IPPROTO_UDP> socket options are "
17679 "valid on a UDP-Lite socket.  See B<udp>(7)  for more information."
17680 msgstr ""
17681
17682 #. type: Plain text
17683 #: build/C/man7/udplite.7:82
17684 msgid "The following two options are specific to UDP-Lite."
17685 msgstr ""
17686
17687 #. type: TP
17688 #: build/C/man7/udplite.7:82
17689 #, no-wrap
17690 msgid "B<UDPLITE_SEND_CSCOV>"
17691 msgstr ""
17692
17693 #. type: Plain text
17694 #: build/C/man7/udplite.7:87
17695 msgid ""
17696 "This option sets the sender checksum coverage and takes an I<int> as "
17697 "argument, with a checksum coverage value in the range 0..2^16-1."
17698 msgstr ""
17699
17700 #. type: Plain text
17701 #: build/C/man7/udplite.7:91
17702 msgid ""
17703 "A value of 0 means that the entire datagram is always covered.  Values from "
17704 "1-7 are illegal (RFC\\ 3828, 3.1) and are rounded up to the minimum coverage "
17705 "of 8."
17706 msgstr ""
17707
17708 #. type: Plain text
17709 #: build/C/man7/udplite.7:97
17710 msgid ""
17711 "With regard to IPv6 jumbograms (RFC\\ 2675), the UDP-Litev6 checksum "
17712 "coverage is limited to the first 2^16-1 octets, as per RFC\\ 3828, 3.5.  "
17713 "Higher values are therefore silently truncated to 2^16-1.  If in doubt, the "
17714 "current coverage value can always be queried using B<getsockopt>(2)."
17715 msgstr ""
17716
17717 #. type: TP
17718 #: build/C/man7/udplite.7:97
17719 #, no-wrap
17720 msgid "B<UDPLITE_RECV_CSCOV>"
17721 msgstr ""
17722
17723 #. type: Plain text
17724 #: build/C/man7/udplite.7:108
17725 msgid ""
17726 "This is the receiver-side analogue and uses the same argument format and "
17727 "value range as B<UDPLITE_SEND_CSCOV>.  This option is not required to enable "
17728 "traffic with partial checksum coverage.  Its function is that of a traffic "
17729 "filter: when enabled, it instructs the kernel to drop all packets which have "
17730 "a coverage I<less> than the specified coverage value."
17731 msgstr ""
17732
17733 #.  SO_NO_CHECK exists and is supported by UDPv4, but is
17734 #.  commented out in socket(7), hence also commented out here
17735 #. .PP
17736 #. Since UDP-Lite mandates checksums, checksumming can not be disabled
17737 #. via the
17738 #. .B SO_NO_CHECK
17739 #. option from
17740 #. .BR socket (7).
17741 #. type: Plain text
17742 #: build/C/man7/udplite.7:121
17743 msgid ""
17744 "When the value of B<UDPLITE_RECV_CSCOV> exceeds the actual packet coverage, "
17745 "incoming packets are silently dropped, but may generate a warning message in "
17746 "the system log."
17747 msgstr ""
17748
17749 #. type: Plain text
17750 #: build/C/man7/udplite.7:126
17751 msgid ""
17752 "All errors documented for B<udp>(7)  may be returned.  UDP-Lite does not add "
17753 "further errors."
17754 msgstr ""
17755
17756 #. type: Plain text
17757 #: build/C/man7/udplite.7:129
17758 msgid "I</proc/net/snmp> - basic UDP-Litev4 statistics counters."
17759 msgstr ""
17760
17761 #. type: Plain text
17762 #: build/C/man7/udplite.7:132
17763 msgid "I</proc/net/snmp6> - basic UDP-Litev6 statistics counters."
17764 msgstr ""
17765
17766 #. type: Plain text
17767 #: build/C/man7/udplite.7:134
17768 msgid "UDP-Litev4/v6 first appeared in Linux 2.6.20."
17769 msgstr ""
17770
17771 #.  FIXME . remove this section once glibc supports UDP-Lite
17772 #. type: Plain text
17773 #: build/C/man7/udplite.7:137
17774 msgid "Where glibc support is missing, the following definitions are needed:"
17775 msgstr ""
17776
17777 #.  The following two are defined in the kernel in linux/net/udplite.h
17778 #. type: Plain text
17779 #: build/C/man7/udplite.7:144
17780 #, no-wrap
17781 msgid ""
17782 "#define IPPROTO_UDPLITE     136\n"
17783 "#define UDPLITE_SEND_CSCOV  10\n"
17784 "#define UDPLITE_RECV_CSCOV  11\n"
17785 msgstr ""
17786
17787 #. type: Plain text
17788 #: build/C/man7/udplite.7:151
17789 msgid "B<ip>(7), B<ipv6>(7), B<socket>(7), B<udp>(7)"
17790 msgstr ""
17791
17792 #. type: Plain text
17793 #: build/C/man7/udplite.7:153
17794 msgid "RFC\\ 3828 for the Lightweight User Datagram Protocol (UDP-Lite)."
17795 msgstr ""
17796
17797 #. type: Plain text
17798 #: build/C/man7/udplite.7:156
17799 msgid "I<Documentation/networking/udplite.txt> in the Linux kernel source tree"
17800 msgstr ""
17801
17802 #. type: TH
17803 #: build/C/man7/unix.7:18
17804 #, no-wrap
17805 msgid "UNIX"
17806 msgstr ""
17807
17808 #. type: Plain text
17809 #: build/C/man7/unix.7:21
17810 msgid "unix - sockets for local interprocess communication"
17811 msgstr ""
17812
17813 #. type: Plain text
17814 #: build/C/man7/unix.7:25
17815 msgid "B<#include E<lt>sys/un.hE<gt>>"
17816 msgstr ""
17817
17818 #. type: Plain text
17819 #: build/C/man7/unix.7:27
17820 msgid "I<unix_socket>B< = socket(AF_UNIX, type, 0);>"
17821 msgstr ""
17822
17823 #. type: Plain text
17824 #: build/C/man7/unix.7:29
17825 msgid "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>"
17826 msgstr ""
17827
17828 #. type: Plain text
17829 #: build/C/man7/unix.7:40
17830 msgid ""
17831 "The B<AF_UNIX> (also known as B<AF_LOCAL>)  socket family is used to "
17832 "communicate between processes on the same machine efficiently.  "
17833 "Traditionally, UNIX domain sockets can be either unnamed, or bound to a "
17834 "filesystem pathname (marked as being of type socket).  Linux also supports "
17835 "an abstract namespace which is independent of the filesystem."
17836 msgstr ""
17837
17838 #. type: Plain text
17839 #: build/C/man7/unix.7:52
17840 msgid ""
17841 "Valid types are: B<SOCK_STREAM>, for a stream-oriented socket and "
17842 "B<SOCK_DGRAM>, for a datagram-oriented socket that preserves message "
17843 "boundaries (as on most UNIX implementations, UNIX domain datagram sockets "
17844 "are always reliable and don't reorder datagrams); and (since Linux 2.6.4)  "
17845 "B<SOCK_SEQPACKET>, for a connection-oriented socket that preserves message "
17846 "boundaries and delivers messages in the order that they were sent."
17847 msgstr ""
17848
17849 #. type: Plain text
17850 #: build/C/man7/unix.7:55
17851 msgid ""
17852 "UNIX domain sockets support passing file descriptors or process credentials "
17853 "to other processes using ancillary data."
17854 msgstr ""
17855
17856 #. type: Plain text
17857 #: build/C/man7/unix.7:57
17858 msgid "A UNIX domain socket address is represented in the following structure:"
17859 msgstr ""
17860
17861 #. type: Plain text
17862 #: build/C/man7/unix.7:61
17863 #, no-wrap
17864 msgid "#define UNIX_PATH_MAX    108\n"
17865 msgstr ""
17866
17867 #. type: Plain text
17868 #: build/C/man7/unix.7:66
17869 #, no-wrap
17870 msgid ""
17871 "struct sockaddr_un {\n"
17872 "    sa_family_t sun_family;               /* AF_UNIX */\n"
17873 "    char        sun_path[UNIX_PATH_MAX];  /* pathname */\n"
17874 "};\n"
17875 msgstr ""
17876
17877 #. type: Plain text
17878 #: build/C/man7/unix.7:72
17879 msgid "I<sun_family> always contains B<AF_UNIX>."
17880 msgstr ""
17881
17882 #. type: Plain text
17883 #: build/C/man7/unix.7:74
17884 msgid "Three types of address are distinguished in this structure:"
17885 msgstr ""
17886
17887 #. type: Plain text
17888 #: build/C/man7/unix.7:85
17889 msgid ""
17890 "I<pathname>: a UNIX domain socket can be bound to a null-terminated "
17891 "filesystem pathname using B<bind>(2).  When the address of the socket is "
17892 "returned by B<getsockname>(2), B<getpeername>(2), and B<accept>(2), its "
17893 "length is"
17894 msgstr ""
17895
17896 #. type: Plain text
17897 #: build/C/man7/unix.7:87
17898 #, no-wrap
17899 msgid "    offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
17900 msgstr ""
17901
17902 #. type: Plain text
17903 #: build/C/man7/unix.7:91
17904 msgid "and I<sun_path> contains the null-terminated pathname."
17905 msgstr ""
17906
17907 #.  There is quite some variation across implementations: FreeBSD
17908 #.  says the length is 16 bytes, HP-UX 11 says it's zero bytes.
17909 #. type: Plain text
17910 #: build/C/man7/unix.7:111
17911 msgid ""
17912 "I<unnamed>: A stream socket that has not been bound to a pathname using "
17913 "B<bind>(2)  has no name.  Likewise, the two sockets created by "
17914 "B<socketpair>(2)  are unnamed.  When the address of an unnamed socket is "
17915 "returned by B<getsockname>(2), B<getpeername>(2), and B<accept>(2), its "
17916 "length is I<sizeof(sa_family_t)>, and I<sun_path> should not be inspected."
17917 msgstr ""
17918
17919 #. type: Plain text
17920 #: build/C/man7/unix.7:137
17921 msgid ""
17922 "I<abstract>: an abstract socket address is distinguished by the fact that "
17923 "I<sun_path[0]> is a null byte (\\(aq\\e0\\(aq).  The socket's address in "
17924 "this namespace is given by the additional bytes in I<sun_path> that are "
17925 "covered by the specified length of the address structure.  (Null bytes in "
17926 "the name have no special significance.)  The name has no connection with "
17927 "filesystem pathnames.  When the address of an abstract socket is returned by "
17928 "B<getsockname>(2), B<getpeername>(2), and B<accept>(2), the returned "
17929 "I<addrlen> is greater than I<sizeof(sa_family_t)> (i.e., greater than 2), "
17930 "and the name of the socket is contained in the first I<(addrlen - "
17931 "sizeof(sa_family_t))> bytes of I<sun_path>.  The abstract socket namespace "
17932 "is a nonportable Linux extension."
17933 msgstr ""
17934
17935 #. type: Plain text
17936 #: build/C/man7/unix.7:150
17937 msgid ""
17938 "For historical reasons these socket options are specified with a "
17939 "B<SOL_SOCKET> type even though they are B<AF_UNIX> specific.  They can be "
17940 "set with B<setsockopt>(2)  and read with B<getsockopt>(2)  by specifying "
17941 "B<SOL_SOCKET> as the socket family."
17942 msgstr ""
17943
17944 #. type: TP
17945 #: build/C/man7/unix.7:150
17946 #, no-wrap
17947 msgid "B<SO_PASSCRED>"
17948 msgstr ""
17949
17950 #. type: Plain text
17951 #: build/C/man7/unix.7:157
17952 msgid ""
17953 "Enables the receiving of the credentials of the sending process in an "
17954 "ancillary message.  When this option is set and the socket is not yet "
17955 "connected a unique name in the abstract namespace will be generated "
17956 "automatically.  Expects an integer boolean flag."
17957 msgstr ""
17958
17959 #. type: SS
17960 #: build/C/man7/unix.7:157
17961 #, no-wrap
17962 msgid "Autobind feature"
17963 msgstr ""
17964
17965 #.  i.e., sizeof(short)
17966 #. type: Plain text
17967 #: build/C/man7/unix.7:177
17968 msgid ""
17969 "If a B<bind>(2)  call specifies I<addrlen> as I<sizeof(sa_family_t)>, or the "
17970 "B<SO_PASSCRED> socket option was specified for a socket that was not "
17971 "explicitly bound to an address, then the socket is autobound to an abstract "
17972 "address.  The address consists of a null byte followed by 5 bytes in the "
17973 "character set I<[0-9a-f]>.  Thus, there is a limit of 2^20 autobind "
17974 "addresses.  (From Linux 2.1.15, when the autobind feature was added, 8 bytes "
17975 "were used, and the limit was thus 2^32 autobind addresses.  The change to 5 "
17976 "bytes came in Linux 2.3.15.)"
17977 msgstr ""
17978
17979 #. type: Plain text
17980 #: build/C/man7/unix.7:180
17981 msgid ""
17982 "The following paragraphs describe domain-specific details and unsupported "
17983 "features of the sockets API for UNIX domain sockets on Linux."
17984 msgstr ""
17985
17986 #. type: Plain text
17987 #: build/C/man7/unix.7:188
17988 msgid ""
17989 "UNIX domain sockets do not support the transmission of out-of-band data (the "
17990 "B<MSG_OOB> flag for B<send>(2)  and B<recv>(2))."
17991 msgstr ""
17992
17993 #. type: Plain text
17994 #: build/C/man7/unix.7:193
17995 msgid "The B<send>(2)  B<MSG_MORE> flag is not supported by UNIX domain sockets."
17996 msgstr ""
17997
17998 #. type: Plain text
17999 #: build/C/man7/unix.7:201
18000 msgid ""
18001 "The use of B<MSG_TRUNC> in the I<flags> argument of B<recv>(2)  is not "
18002 "supported by UNIX domain sockets."
18003 msgstr ""
18004
18005 #. type: Plain text
18006 #: build/C/man7/unix.7:213
18007 msgid ""
18008 "The B<SO_SNDBUF> socket option does have an effect for UNIX domain sockets, "
18009 "but the B<SO_RCVBUF> option does not.  For datagram sockets, the "
18010 "B<SO_SNDBUF> value imposes an upper limit on the size of outgoing "
18011 "datagrams.  This limit is calculated as the doubled (see B<socket>(7))  "
18012 "option value less 32 bytes used for overhead."
18013 msgstr ""
18014
18015 #. type: SS
18016 #: build/C/man7/unix.7:213
18017 #, no-wrap
18018 msgid "Ancillary messages"
18019 msgstr ""
18020
18021 #. type: Plain text
18022 #: build/C/man7/unix.7:235
18023 msgid ""
18024 "Ancillary data is sent and received using B<sendmsg>(2)  and B<recvmsg>(2).  "
18025 "For historical reasons the ancillary message types listed below are "
18026 "specified with a B<SOL_SOCKET> type even though they are B<AF_UNIX> "
18027 "specific.  To send them set the I<cmsg_level> field of the struct I<cmsghdr> "
18028 "to B<SOL_SOCKET> and the I<cmsg_type> field to the type.  For more "
18029 "information see B<cmsg>(3)."
18030 msgstr ""
18031
18032 #. type: TP
18033 #: build/C/man7/unix.7:235
18034 #, no-wrap
18035 msgid "B<SCM_RIGHTS>"
18036 msgstr ""
18037
18038 #. type: Plain text
18039 #: build/C/man7/unix.7:241
18040 msgid ""
18041 "Send or receive a set of open file descriptors from another process.  The "
18042 "data portion contains an integer array of the file descriptors.  The passed "
18043 "file descriptors behave as though they have been created with B<dup>(2)."
18044 msgstr ""
18045
18046 #. type: TP
18047 #: build/C/man7/unix.7:241
18048 #, no-wrap
18049 msgid "B<SCM_CREDENTIALS>"
18050 msgstr ""
18051
18052 #. type: Plain text
18053 #: build/C/man7/unix.7:251
18054 msgid ""
18055 "Send or receive UNIX credentials.  This can be used for authentication.  The "
18056 "credentials are passed as a I<struct ucred> ancillary message.  Thus "
18057 "structure is defined in I<E<lt>sys/socket.hE<gt>> as follows:"
18058 msgstr ""
18059
18060 #. type: Plain text
18061 #: build/C/man7/unix.7:259
18062 #, no-wrap
18063 msgid ""
18064 "struct ucred {\n"
18065 "    pid_t pid;    /* process ID of the sending process */\n"
18066 "    uid_t uid;    /* user ID of the sending process */\n"
18067 "    gid_t gid;    /* group ID of the sending process */\n"
18068 "};\n"
18069 msgstr ""
18070
18071 #. type: Plain text
18072 #: build/C/man7/unix.7:268
18073 msgid ""
18074 "Since glibc 2.8, the B<_GNU_SOURCE> feature test macro must be defined "
18075 "(before including I<any> header files) in order to obtain the definition of "
18076 "this structure."
18077 msgstr ""
18078
18079 #. type: Plain text
18080 #: build/C/man7/unix.7:284
18081 msgid ""
18082 "The credentials which the sender specifies are checked by the kernel.  A "
18083 "process with effective user ID 0 is allowed to specify values that do not "
18084 "match its own.  The sender must specify its own process ID (unless it has "
18085 "the capability B<CAP_SYS_ADMIN>), its user ID, effective user ID, or saved "
18086 "set-user-ID (unless it has B<CAP_SETUID>), and its group ID, effective group "
18087 "ID, or saved set-group-ID (unless it has B<CAP_SETGID>).  To receive a "
18088 "I<struct ucred> message the B<SO_PASSCRED> option must be enabled on the "
18089 "socket."
18090 msgstr ""
18091
18092 #. type: Plain text
18093 #: build/C/man7/unix.7:295
18094 #, no-wrap
18095 msgid ""
18096 "B<int>I< value>B<;>\n"
18097 "I<error>B< = ioctl(>I<unix_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
18098 msgstr ""
18099
18100 #. type: Plain text
18101 #: build/C/man7/unix.7:300
18102 msgid "I<ioctl_type> can be:"
18103 msgstr ""
18104
18105 #. type: Plain text
18106 #: build/C/man7/unix.7:327
18107 msgid ""
18108 "The specified local address is already in use or the filesystem socket "
18109 "object already exists."
18110 msgstr ""
18111
18112 #. type: Plain text
18113 #: build/C/man7/unix.7:333
18114 msgid ""
18115 "The remote address specified by B<connect>(2)  was not a listening socket.  "
18116 "This error can also occur if the target filename is not a socket."
18117 msgstr ""
18118
18119 #. type: TP
18120 #: build/C/man7/unix.7:333
18121 #, no-wrap
18122 msgid "B<ECONNRESET>"
18123 msgstr ""
18124
18125 #. type: Plain text
18126 #: build/C/man7/unix.7:336
18127 msgid "Remote socket was unexpectedly closed."
18128 msgstr ""
18129
18130 #. type: Plain text
18131 #: build/C/man7/unix.7:339
18132 msgid "User memory address was not valid."
18133 msgstr ""
18134
18135 #. type: Plain text
18136 #: build/C/man7/unix.7:348
18137 msgid ""
18138 "Invalid argument passed.  A common cause is that the value B<AF_UNIX> was "
18139 "not specified in the I<sun_type> field of passed addresses, or the socket "
18140 "was in an invalid state for the applied operation."
18141 msgstr ""
18142
18143 #. type: Plain text
18144 #: build/C/man7/unix.7:353
18145 msgid ""
18146 "B<connect>(2)  called on an already connected socket or a target address was "
18147 "specified on a connected socket."
18148 msgstr ""
18149
18150 #. type: Plain text
18151 #: build/C/man7/unix.7:358
18152 msgid ""
18153 "The pathname in the remote address specified to B<connect>(2)  did not "
18154 "exist."
18155 msgstr ""
18156
18157 #. type: TP
18158 #: build/C/man7/unix.7:358
18159 #, no-wrap
18160 msgid "B<ENOMEM>"
18161 msgstr ""
18162
18163 #. type: Plain text
18164 #: build/C/man7/unix.7:364
18165 msgid "Socket operation needs a target address, but the socket is not connected."
18166 msgstr ""
18167
18168 #. type: Plain text
18169 #: build/C/man7/unix.7:368
18170 msgid ""
18171 "Stream operation called on non-stream oriented socket or tried to use the "
18172 "out-of-band data option."
18173 msgstr ""
18174
18175 #. type: Plain text
18176 #: build/C/man7/unix.7:372
18177 msgid "The sender passed invalid credentials in the I<struct ucred>."
18178 msgstr ""
18179
18180 #. type: Plain text
18181 #: build/C/man7/unix.7:384
18182 msgid ""
18183 "Remote socket was closed on a stream socket.  If enabled, a B<SIGPIPE> is "
18184 "sent as well.  This can be avoided by passing the B<MSG_NOSIGNAL> flag to "
18185 "B<sendmsg>(2)  or B<recvmsg>(2)."
18186 msgstr ""
18187
18188 #. type: TP
18189 #: build/C/man7/unix.7:384
18190 #, no-wrap
18191 msgid "B<EPROTONOSUPPORT>"
18192 msgstr ""
18193
18194 #. type: Plain text
18195 #: build/C/man7/unix.7:388
18196 msgid "Passed protocol is not B<AF_UNIX>."
18197 msgstr ""
18198
18199 #. type: TP
18200 #: build/C/man7/unix.7:388
18201 #, no-wrap
18202 msgid "B<EPROTOTYPE>"
18203 msgstr ""
18204
18205 #. type: Plain text
18206 #: build/C/man7/unix.7:394
18207 msgid ""
18208 "Remote socket does not match the local socket type (B<SOCK_DGRAM> versus "
18209 "B<SOCK_STREAM>)"
18210 msgstr ""
18211
18212 #. type: Plain text
18213 #: build/C/man7/unix.7:397
18214 msgid "Unknown socket type."
18215 msgstr ""
18216
18217 #. type: Plain text
18218 #: build/C/man7/unix.7:401
18219 msgid ""
18220 "Other errors can be generated by the generic socket layer or by the "
18221 "filesystem while generating a filesystem socket object.  See the appropriate "
18222 "manual pages for more information."
18223 msgstr ""
18224
18225 #. type: Plain text
18226 #: build/C/man7/unix.7:407
18227 msgid ""
18228 "B<SCM_CREDENTIALS> and the abstract namespace were introduced with Linux 2.2 "
18229 "and should not be used in portable programs.  (Some BSD-derived systems also "
18230 "support credential passing, but the implementation details differ.)"
18231 msgstr ""
18232
18233 #. type: Plain text
18234 #: build/C/man7/unix.7:418
18235 msgid ""
18236 "In the Linux implementation, sockets which are visible in the filesystem "
18237 "honor the permissions of the directory they are in.  Their owner, group and "
18238 "their permissions can be changed.  Creation of a new socket will fail if the "
18239 "process does not have write and search (execute) permission on the directory "
18240 "the socket is created in.  Connecting to the socket object requires "
18241 "read/write permission.  This behavior differs from many BSD-derived systems "
18242 "which ignore permissions for UNIX domain sockets.  Portable programs should "
18243 "not rely on this feature for security."
18244 msgstr ""
18245
18246 #. type: Plain text
18247 #: build/C/man7/unix.7:426
18248 msgid ""
18249 "Binding to a socket with a filename creates a socket in the filesystem that "
18250 "must be deleted by the caller when it is no longer needed (using "
18251 "B<unlink>(2)).  The usual UNIX close-behind semantics apply; the socket can "
18252 "be unlinked at any time and will be finally removed from the filesystem when "
18253 "the last reference to it is closed."
18254 msgstr ""
18255
18256 #. type: Plain text
18257 #: build/C/man7/unix.7:435
18258 msgid ""
18259 "To pass file descriptors or credentials over a B<SOCK_STREAM>, you need to "
18260 "send or receive at least one byte of nonancillary data in the same "
18261 "B<sendmsg>(2)  or B<recvmsg>(2)  call."
18262 msgstr ""
18263
18264 #. type: Plain text
18265 #: build/C/man7/unix.7:437
18266 msgid "UNIX domain stream sockets do not support the notion of out-of-band data."
18267 msgstr ""
18268
18269 #. type: Plain text
18270 #: build/C/man7/unix.7:440
18271 msgid "See B<bind>(2)."
18272 msgstr ""
18273
18274 #. type: Plain text
18275 #: build/C/man7/unix.7:445
18276 msgid "For an example of the use of B<SCM_RIGHTS> see B<cmsg>(3)."
18277 msgstr ""
18278
18279 #. type: Plain text
18280 #: build/C/man7/unix.7:454
18281 msgid ""
18282 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
18283 "B<capabilities>(7), B<credentials>(7), B<socket>(7)"
18284 msgstr ""
18285
18286 #. type: TH
18287 #: build/C/man7/x25.7:12
18288 #, no-wrap
18289 msgid "X25"
18290 msgstr ""
18291
18292 #. type: Plain text
18293 #: build/C/man7/x25.7:15
18294 msgid "x25 - ITU-T X.25 / ISO-8208 protocol interface."
18295 msgstr ""
18296
18297 #. type: Plain text
18298 #: build/C/man7/x25.7:19
18299 msgid "B<#include E<lt>linux/x25.hE<gt>>"
18300 msgstr ""
18301
18302 #. type: Plain text
18303 #: build/C/man7/x25.7:21
18304 msgid "B<x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);>"
18305 msgstr ""
18306
18307 #. type: Plain text
18308 #: build/C/man7/x25.7:30
18309 msgid ""
18310 "X25 sockets provide an interface to the X.25 packet layer protocol.  This "
18311 "allows applications to communicate over a public X.25 data network as "
18312 "standardized by International Telecommunication Union's recommendation X.25 "
18313 "(X.25 DTE-DCE mode).  X25 sockets can also be used for communication without "
18314 "an intermediate X.25 network (X.25 DTE-DTE mode) as described in ISO-8208."
18315 msgstr ""
18316
18317 #. type: Plain text
18318 #: build/C/man7/x25.7:47
18319 msgid ""
18320 "Message boundaries are preserved \\(em a B<read>(2)  from a socket will "
18321 "retrieve the same chunk of data as output with the corresponding B<write>(2)  "
18322 "to the peer socket.  When necessary, the kernel takes care of segmenting and "
18323 "reassembling long messages by means of the X.25 M-bit.  There is no "
18324 "hard-coded upper limit for the message size.  However, reassembling of a "
18325 "long message might fail if there is a temporary lack of system resources or "
18326 "when other constraints (such as socket memory or buffer size limits) become "
18327 "effective.  If that occurs, the X.25 connection will be reset."
18328 msgstr ""
18329
18330 #. type: SS
18331 #: build/C/man7/x25.7:47
18332 #, no-wrap
18333 msgid "Socket addresses"
18334 msgstr ""
18335
18336 #. type: Plain text
18337 #: build/C/man7/x25.7:54
18338 msgid ""
18339 "The B<AF_X25> socket address family uses the I<struct sockaddr_x25> for "
18340 "representing network addresses as defined in ITU-T recommendation X.121."
18341 msgstr ""
18342
18343 #. type: Plain text
18344 #: build/C/man7/x25.7:61
18345 #, no-wrap
18346 msgid ""
18347 "struct sockaddr_x25 {\n"
18348 "    sa_family_t sx25_family;    /* must be AF_X25 */\n"
18349 "    x25_address sx25_addr;      /* X.121 Address */\n"
18350 "};\n"
18351 msgstr ""
18352
18353 #. type: Plain text
18354 #: build/C/man7/x25.7:72
18355 msgid ""
18356 "I<sx25_addr> contains a char array I<x25_addr[]> to be interpreted as a "
18357 "null-terminated string.  I<sx25_addr.x25_addr[]> consists of up to 15 (not "
18358 "counting the terminating null byte) ASCII characters forming the X.121 "
18359 "address.  Only the decimal digit characters from \\(aq0\\(aq to \\(aq9\\(aq "
18360 "are allowed."
18361 msgstr ""
18362
18363 #. type: Plain text
18364 #: build/C/man7/x25.7:81
18365 msgid ""
18366 "The following X.25-specific socket options can be set by using "
18367 "B<setsockopt>(2)  and read with B<getsockopt>(2)  with the I<level> argument "
18368 "set to B<SOL_X25>."
18369 msgstr ""
18370
18371 #. type: TP
18372 #: build/C/man7/x25.7:81
18373 #, no-wrap
18374 msgid "B<X25_QBITINCL>"
18375 msgstr ""
18376
18377 #. type: Plain text
18378 #: build/C/man7/x25.7:100
18379 msgid ""
18380 "Controls whether the X.25 Q-bit (Qualified Data Bit) is accessible by the "
18381 "user.  It expects an integer argument.  If set to 0 (default), the Q-bit is "
18382 "never set for outgoing packets and the Q-bit of incoming packets is "
18383 "ignored.  If set to 1, an additional first byte is prepended to each message "
18384 "read from or written to the socket.  For data read from the socket, a 0 "
18385 "first byte indicates that the Q-bits of the corresponding incoming data "
18386 "packets were not set.  A first byte with value 1 indicates that the Q-bit of "
18387 "the corresponding incoming data packets was set.  If the first byte of the "
18388 "data written to the socket is 1, the Q-bit of the corresponding outgoing "
18389 "data packets will be set.  If the first byte is 0, the Q-bit will not be "
18390 "set."
18391 msgstr ""
18392
18393 #. type: Plain text
18394 #: build/C/man7/x25.7:102
18395 msgid "The AF_X25 protocol family is a new feature of Linux 2.2."
18396 msgstr ""
18397
18398 #. type: Plain text
18399 #: build/C/man7/x25.7:105
18400 msgid "Plenty, as the X.25 PLP implementation is B<CONFIG_EXPERIMENTAL>."
18401 msgstr ""
18402
18403 #. type: Plain text
18404 #: build/C/man7/x25.7:107
18405 msgid "This man page is incomplete."
18406 msgstr ""
18407
18408 #. type: Plain text
18409 #: build/C/man7/x25.7:114
18410 msgid ""
18411 "There is no dedicated application programmer's header file yet; you need to "
18412 "include the kernel header file I<E<lt>linux/x25.hE<gt>>.  "
18413 "B<CONFIG_EXPERIMENTAL> might also imply that future versions of the "
18414 "interface are not binary compatible."
18415 msgstr ""
18416
18417 #. type: Plain text
18418 #: build/C/man7/x25.7:118
18419 msgid ""
18420 "X.25 N-Reset events are not propagated to the user process yet.  Thus, if a "
18421 "reset occurred, data might be lost without notice."
18422 msgstr ""
18423
18424 #. type: Plain text
18425 #: build/C/man7/x25.7:121
18426 msgid "B<socket>(2), B<socket>(7)"
18427 msgstr ""
18428
18429 #. type: Plain text
18430 #: build/C/man7/x25.7:127
18431 msgid ""
18432 "Jonathan Simon Naylor: \\(lqThe Re-Analysis and Re-Implementation of "
18433 "X.25.\\(rq The URL is E<.UR "
18434 "ftp://ftp.pspt.fi\\:/pub\\:/ham\\:/linux\\:/ax25\\:/x25doc.tgz> E<.UE .>"
18435 msgstr ""