OSDN Git Service

LDP: Update POT and ja.po to LDP v3.78-git-80a7408
[linuxjm/LDP_man-pages.git] / po4a / net / po / net.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2015-01-21 20:35+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man7/arp.7:13
21 #, no-wrap
22 msgid "ARP"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man7/arp.7:13
27 #, no-wrap
28 msgid "2008-11-25"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man7/arp.7:13 build/C/man3/cmsg.3:11 build/C/man7/ddp.7:12 build/C/man5/gai.conf.5:19 build/C/man1/getent.1:24 build/C/man3/getipnodebyname.3:26 build/C/man2/getpeername.2:42 build/C/man5/host.conf.5:26 build/C/man7/hostname.7:39 build/C/man5/hosts.5:27 build/C/man5/hosts.equiv.5:6 build/C/man7/icmp.7:12 build/C/man3/inet_net_pton.3:26 build/C/man3/inet_ntop.3:26 build/C/man3/inet_pton.3:27 build/C/man7/ip.7:36 build/C/man7/ipv6.7:86 build/C/man7/netdevice.7:18 build/C/man5/nss.5:19 build/C/man5/nsswitch.conf.5:25 build/C/man7/packet.7:12 build/C/man5/protocols.5:29 build/C/man7/raw.7:13 build/C/man3/rcmd.3:43 build/C/man3/rexec.3:41 build/C/man5/services.5:34 build/C/man2/shutdown.2:40 build/C/man7/tcp.7:76 build/C/man7/udp.7:12 build/C/man7/udplite.7:27 build/C/man7/unix.7:20 build/C/man7/x25.7:12
33 #, no-wrap
34 msgid "Linux"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man7/arp.7:13 build/C/man3/byteorder.3:32 build/C/man3/cmsg.3:11 build/C/man7/ddp.7:12 build/C/man3/endian.3:28 build/C/man3/ether_aton.3:31 build/C/man5/gai.conf.5:19 build/C/man3/getaddrinfo.3:44 build/C/man3/getaddrinfo_a.3:29 build/C/man3/gethostbyname.3:38 build/C/man3/getipnodebyname.3:26 build/C/man3/getnameinfo.3:10 build/C/man3/getnetent.3:30 build/C/man3/getnetent_r.3:26 build/C/man2/getpeername.2:42 build/C/man3/getprotoent.3:30 build/C/man3/getprotoent_r.3:26 build/C/man3/getservent.3:34 build/C/man3/getservent_r.3:26 build/C/man7/hostname.7:39 build/C/man5/hosts.5:27 build/C/man5/hosts.equiv.5:6 build/C/man7/icmp.7:12 build/C/man3/inet.3:42 build/C/man3/inet_net_pton.3:26 build/C/man3/inet_ntop.3:26 build/C/man3/inet_pton.3:27 build/C/man7/ip.7:36 build/C/man7/ipv6.7:86 build/C/man7/netdevice.7:18 build/C/man8/nscd.8:23 build/C/man5/nscd.conf.5:20 build/C/man5/nss.5:19 build/C/man5/nsswitch.conf.5:25 build/C/man7/packet.7:12 build/C/man5/protocols.5:29 build/C/man7/raw.7:13 build/C/man3/rcmd.3:43 build/C/man5/resolv.conf.5:23 build/C/man3/resolver.3:32 build/C/man3/rexec.3:41 build/C/man5/services.5:34 build/C/man3/setnetgrent.3:10 build/C/man2/shutdown.2:40 build/C/man7/tcp.7:76 build/C/man7/udp.7:12 build/C/man7/udplite.7:27 build/C/man7/unix.7:20 build/C/man7/x25.7:12
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man7/arp.7:14 build/C/man3/byteorder.3:33 build/C/man3/cmsg.3:12 build/C/man7/ddp.7:13 build/C/man3/endian.3:29 build/C/man3/ether_aton.3:32 build/C/man5/gai.conf.5:20 build/C/man3/getaddrinfo.3:45 build/C/man3/getaddrinfo_a.3:30 build/C/man1/getent.1:25 build/C/man3/gethostbyname.3:39 build/C/man3/getipnodebyname.3:27 build/C/man3/getnameinfo.3:11 build/C/man3/getnetent.3:31 build/C/man3/getnetent_r.3:27 build/C/man2/getpeername.2:43 build/C/man3/getprotoent.3:31 build/C/man3/getprotoent_r.3:27 build/C/man3/getservent.3:35 build/C/man3/getservent_r.3:27 build/C/man5/host.conf.5:27 build/C/man7/hostname.7:40 build/C/man5/hosts.5:28 build/C/man5/hosts.equiv.5:7 build/C/man7/icmp.7:13 build/C/man3/inet.3:43 build/C/man3/inet_net_pton.3:27 build/C/man3/inet_ntop.3:27 build/C/man3/inet_pton.3:28 build/C/man7/ip.7:37 build/C/man7/ipv6.7:87 build/C/man7/netdevice.7:19 build/C/man5/networks.5:27 build/C/man8/nscd.8:24 build/C/man5/nscd.conf.5:21 build/C/man5/nss.5:20 build/C/man5/nsswitch.conf.5:26 build/C/man7/packet.7:13 build/C/man5/protocols.5:30 build/C/man7/raw.7:14 build/C/man3/rcmd.3:44 build/C/man5/resolv.conf.5:25 build/C/man3/resolver.3:33 build/C/man3/rexec.3:42 build/C/man5/services.5:35 build/C/man3/setnetgrent.3:11 build/C/man2/shutdown.2:41 build/C/man7/tcp.7:77 build/C/man7/udp.7:13 build/C/man7/udplite.7:28 build/C/man7/unix.7:21 build/C/man7/x25.7:13
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man7/arp.7:16
51 msgid "arp - Linux ARP kernel module."
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man7/arp.7:16 build/C/man3/byteorder.3:48 build/C/man3/cmsg.3:37 build/C/man7/ddp.7:23 build/C/man3/endian.3:53 build/C/man3/ether_aton.3:57 build/C/man5/gai.conf.5:22 build/C/man3/getaddrinfo.3:76 build/C/man3/getaddrinfo_a.3:50 build/C/man1/getent.1:30 build/C/man3/gethostbyname.3:129 build/C/man3/getipnodebyname.3:44 build/C/man3/getnameinfo.3:32 build/C/man3/getnetent.3:48 build/C/man3/getnetent_r.3:62 build/C/man2/getpeername.2:50 build/C/man3/getprotoent.3:48 build/C/man3/getprotoent_r.3:59 build/C/man3/getservent.3:52 build/C/man3/getservent_r.3:59 build/C/man5/host.conf.5:29 build/C/man7/hostname.7:42 build/C/man5/hosts.5:32 build/C/man5/hosts.equiv.5:11 build/C/man7/icmp.7:15 build/C/man3/inet.3:75 build/C/man3/inet_net_pton.3:61 build/C/man3/inet_ntop.3:36 build/C/man3/inet_pton.3:36 build/C/man7/ip.7:53 build/C/man7/ipv6.7:99 build/C/man7/netdevice.7:25 build/C/man5/networks.5:29 build/C/man8/nscd.8:26 build/C/man5/nscd.conf.5:23 build/C/man5/nss.5:22 build/C/man5/nsswitch.conf.5:28 build/C/man7/packet.7:25 build/C/man5/protocols.5:32 build/C/man7/raw.7:22 build/C/man3/rcmd.3:92 build/C/man5/resolv.conf.5:29 build/C/man3/resolver.3:85 build/C/man3/rexec.3:56 build/C/man5/services.5:37 build/C/man3/setnetgrent.3:44 build/C/man2/shutdown.2:47 build/C/man7/tcp.7:87 build/C/man7/udp.7:23 build/C/man7/udplite.7:38 build/C/man7/unix.7:31 build/C/man7/x25.7:21
56 #, no-wrap
57 msgid "DESCRIPTION"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man7/arp.7:24
62 msgid ""
63 "This kernel protocol module implements the Address Resolution Protocol "
64 "defined in RFC\\ 826.  It is used to convert between Layer2 hardware "
65 "addresses and IPv4 protocol addresses on directly connected networks.  The "
66 "user normally doesn't interact directly with this module except to configure "
67 "it; instead it provides a service for other protocols in the kernel."
68 msgstr ""
69
70 #. type: Plain text
71 #: build/C/man7/arp.7:37
72 msgid ""
73 "A user process can receive ARP packets by using B<packet>(7)  sockets.  "
74 "There is also a mechanism for managing the ARP cache in user-space by using "
75 "B<netlink>(7)  sockets.  The ARP table can also be controlled via "
76 "B<ioctl>(2)  on any B<AF_INET> socket."
77 msgstr ""
78
79 #. type: Plain text
80 #: build/C/man7/arp.7:49
81 msgid ""
82 "The ARP module maintains a cache of mappings between hardware addresses and "
83 "protocol addresses.  The cache has a limited size so old and less frequently "
84 "used entries are garbage-collected.  Entries which are marked as permanent "
85 "are never deleted by the garbage-collector.  The cache can be directly "
86 "manipulated by the use of ioctls and its behavior can be tuned by the "
87 "I</proc> interfaces described below."
88 msgstr ""
89
90 #. type: Plain text
91 #: build/C/man7/arp.7:72
92 msgid ""
93 "When there is no positive feedback for an existing mapping after some time "
94 "(see the I</proc> interfaces below), a neighbor cache entry is considered "
95 "stale.  Positive feedback can be gotten from a higher layer; for example "
96 "from a successful TCP ACK.  Other protocols can signal forward progress "
97 "using the B<MSG_CONFIRM> flag to B<sendmsg>(2).  When there is no forward "
98 "progress, ARP tries to reprobe.  It first tries to ask a local arp daemon "
99 "B<app_solicit> times for an updated MAC address.  If that fails and an old "
100 "MAC address is known, a unicast probe is sent B<ucast_solicit> times.  If "
101 "that fails too, it will broadcast a new ARP request to the network.  "
102 "Requests are sent only when there is data queued for sending."
103 msgstr ""
104
105 #. type: Plain text
106 #: build/C/man7/arp.7:77
107 msgid ""
108 "Linux will automatically add a nonpermanent proxy arp entry when it receives "
109 "a request for an address it forwards to and proxy arp is enabled on the "
110 "receiving interface.  When there is a reject route for the target, no proxy "
111 "arp entry is added."
112 msgstr ""
113
114 #. type: SS
115 #: build/C/man7/arp.7:77 build/C/man7/ddp.7:144 build/C/man7/ip.7:1075 build/C/man7/netdevice.7:64 build/C/man7/packet.7:479 build/C/man7/tcp.7:1127 build/C/man7/udp.7:202 build/C/man7/unix.7:367
116 #, no-wrap
117 msgid "Ioctls"
118 msgstr ""
119
120 #. type: Plain text
121 #: build/C/man7/arp.7:84
122 msgid ""
123 "Three ioctls are available on all B<AF_INET> sockets.  They take a pointer "
124 "to a I<struct arpreq> as their argument."
125 msgstr ""
126
127 #. type: Plain text
128 #: build/C/man7/arp.7:94
129 #, no-wrap
130 msgid ""
131 "struct arpreq {\n"
132 "    struct sockaddr arp_pa;      /* protocol address */\n"
133 "    struct sockaddr arp_ha;      /* hardware address */\n"
134 "    int             arp_flags;   /* flags */\n"
135 "    struct sockaddr arp_netmask; /* netmask of protocol address */\n"
136 "    char            arp_dev[16];\n"
137 "};\n"
138 msgstr ""
139
140 #. type: Plain text
141 #: build/C/man7/arp.7:103
142 msgid ""
143 "B<SIOCSARP>, B<SIOCDARP> and B<SIOCGARP> respectively set, delete and get an "
144 "ARP mapping.  Setting and deleting ARP maps are privileged operations and "
145 "may be performed only by a process with the B<CAP_NET_ADMIN> capability or "
146 "an effective UID of 0."
147 msgstr ""
148
149 #. type: Plain text
150 #: build/C/man7/arp.7:113
151 msgid ""
152 "I<arp_pa> must be an B<AF_INET> address and I<arp_ha> must have the same "
153 "type as the device which is specified in I<arp_dev>.  I<arp_dev> is a "
154 "zero-terminated string which names a device."
155 msgstr ""
156
157 #. type: tbl table
158 #: build/C/man7/arp.7:118
159 #, no-wrap
160 msgid "I<arp_flags>\n"
161 msgstr ""
162
163 #. type: tbl table
164 #: build/C/man7/arp.7:119
165 #, no-wrap
166 msgid "flag:meaning\n"
167 msgstr ""
168
169 #. type: tbl table
170 #: build/C/man7/arp.7:120
171 #, no-wrap
172 msgid "ATF_COM:Lookup complete\n"
173 msgstr ""
174
175 #. type: tbl table
176 #: build/C/man7/arp.7:121
177 #, no-wrap
178 msgid "ATF_PERM:Permanent entry\n"
179 msgstr ""
180
181 #. type: tbl table
182 #: build/C/man7/arp.7:122
183 #, no-wrap
184 msgid "ATF_PUBL:Publish entry\n"
185 msgstr ""
186
187 #. type: tbl table
188 #: build/C/man7/arp.7:123
189 #, no-wrap
190 msgid "ATF_USETRAILERS:Trailers requested\n"
191 msgstr ""
192
193 #. type: tbl table
194 #: build/C/man7/arp.7:124
195 #, no-wrap
196 msgid "ATF_NETMASK:Use a netmask\n"
197 msgstr ""
198
199 #. type: tbl table
200 #: build/C/man7/arp.7:125
201 #, no-wrap
202 msgid "ATF_DONTPUB:Don't answer\n"
203 msgstr ""
204
205 #. type: Plain text
206 #: build/C/man7/arp.7:138
207 msgid ""
208 "If the B<ATF_NETMASK> flag is set, then I<arp_netmask> should be valid.  "
209 "Linux 2.2 does not support proxy network ARP entries, so this should be set "
210 "to 0xffffffff, or 0 to remove an existing proxy arp entry.  "
211 "B<ATF_USETRAILERS> is obsolete and should not be used."
212 msgstr ""
213
214 #. type: SS
215 #: build/C/man7/arp.7:138 build/C/man7/ddp.7:122 build/C/man7/icmp.7:41 build/C/man7/ip.7:926 build/C/man7/tcp.7:219 build/C/man7/udp.7:137
216 #, no-wrap
217 msgid "/proc interfaces"
218 msgstr ""
219
220 #. type: Plain text
221 #: build/C/man7/arp.7:151
222 msgid ""
223 "ARP supports a range of I</proc> interfaces to configure parameters on a "
224 "global or per-interface basis.  The interfaces can be accessed by reading or "
225 "writing the I</proc/sys/net/ipv4/neigh/*/*> files.  Each interface in the "
226 "system has its own directory in I</proc/sys/net/ipv4/neigh/>.  The setting "
227 "in the \"default\" directory is used for all newly created devices.  Unless "
228 "otherwise specified, time-related interfaces are specified in seconds."
229 msgstr ""
230
231 #. type: TP
232 #: build/C/man7/arp.7:151
233 #, no-wrap
234 msgid "I<anycast_delay> (since Linux 2.2)"
235 msgstr ""
236
237 #.  Precisely: 2.1.79
238 #. type: Plain text
239 #: build/C/man7/arp.7:158
240 msgid ""
241 "The maximum number of jiffies to delay before replying to a IPv6 neighbor "
242 "solicitation message.  Anycast support is not yet implemented.  Defaults to "
243 "1 second."
244 msgstr ""
245
246 #. type: TP
247 #: build/C/man7/arp.7:158
248 #, no-wrap
249 msgid "I<app_solicit> (since Linux 2.2)"
250 msgstr ""
251
252 #.  Precisely: 2.1.79
253 #. type: Plain text
254 #: build/C/man7/arp.7:165
255 msgid ""
256 "The maximum number of probes to send to the user space ARP daemon via "
257 "netlink before dropping back to multicast probes (see I<mcast_solicit>).  "
258 "Defaults to 0."
259 msgstr ""
260
261 #. type: TP
262 #: build/C/man7/arp.7:165
263 #, no-wrap
264 msgid "I<base_reachable_time> (since Linux 2.2)"
265 msgstr ""
266
267 #.  Precisely: 2.1.79
268 #. type: Plain text
269 #: build/C/man7/arp.7:176
270 msgid ""
271 "Once a neighbor has been found, the entry is considered to be valid for at "
272 "least a random value between I<base_reachable_time>/2 and "
273 "3*I<base_reachable_time>/2.  An entry's validity will be extended if it "
274 "receives positive feedback from higher level protocols.  Defaults to 30 "
275 "seconds.  This file is now obsolete in favor of I<base_reachable_time_ms>."
276 msgstr ""
277
278 #. type: TP
279 #: build/C/man7/arp.7:176
280 #, no-wrap
281 msgid "I<base_reachable_time_ms> (since Linux 2.6.12)"
282 msgstr ""
283
284 #. type: Plain text
285 #: build/C/man7/arp.7:182
286 msgid ""
287 "As for I<base_reachable_time>, but measures time in milliseconds.  Defaults "
288 "to 30000 milliseconds."
289 msgstr ""
290
291 #. type: TP
292 #: build/C/man7/arp.7:182
293 #, no-wrap
294 msgid "I<delay_first_probe_time> (since Linux 2.2)"
295 msgstr ""
296
297 #.  Precisely: 2.1.79
298 #. type: Plain text
299 #: build/C/man7/arp.7:188
300 msgid ""
301 "Delay before first probe after it has been decided that a neighbor is "
302 "stale.  Defaults to 5 seconds."
303 msgstr ""
304
305 #. type: TP
306 #: build/C/man7/arp.7:188
307 #, no-wrap
308 msgid "I<gc_interval> (since Linux 2.2)"
309 msgstr ""
310
311 #.  Precisely: 2.1.79
312 #. type: Plain text
313 #: build/C/man7/arp.7:194
314 msgid ""
315 "How frequently the garbage collector for neighbor entries should attempt to "
316 "run.  Defaults to 30 seconds."
317 msgstr ""
318
319 #. type: TP
320 #: build/C/man7/arp.7:194
321 #, no-wrap
322 msgid "I<gc_stale_time> (since Linux 2.2)"
323 msgstr ""
324
325 #.  Precisely: 2.1.79
326 #. type: Plain text
327 #: build/C/man7/arp.7:201
328 msgid ""
329 "Determines how often to check for stale neighbor entries.  When a neighbor "
330 "entry is considered stale, it is resolved again before sending data to it.  "
331 "Defaults to 60 seconds."
332 msgstr ""
333
334 #. type: TP
335 #: build/C/man7/arp.7:201
336 #, no-wrap
337 msgid "I<gc_thresh1> (since Linux 2.2)"
338 msgstr ""
339
340 #.  Precisely: 2.1.79
341 #. type: Plain text
342 #: build/C/man7/arp.7:208
343 msgid ""
344 "The minimum number of entries to keep in the ARP cache.  The garbage "
345 "collector will not run if there are fewer than this number of entries in the "
346 "cache.  Defaults to 128."
347 msgstr ""
348
349 #. type: TP
350 #: build/C/man7/arp.7:208
351 #, no-wrap
352 msgid "I<gc_thresh2> (since Linux 2.2)"
353 msgstr ""
354
355 #.  Precisely: 2.1.79
356 #. type: Plain text
357 #: build/C/man7/arp.7:215
358 msgid ""
359 "The soft maximum number of entries to keep in the ARP cache.  The garbage "
360 "collector will allow the number of entries to exceed this for 5 seconds "
361 "before collection will be performed.  Defaults to 512."
362 msgstr ""
363
364 #. type: TP
365 #: build/C/man7/arp.7:215
366 #, no-wrap
367 msgid "I<gc_thresh3> (since Linux 2.2)"
368 msgstr ""
369
370 #.  Precisely: 2.1.79
371 #. type: Plain text
372 #: build/C/man7/arp.7:222
373 msgid ""
374 "The hard maximum number of entries to keep in the ARP cache.  The garbage "
375 "collector will always run if there are more than this number of entries in "
376 "the cache.  Defaults to 1024."
377 msgstr ""
378
379 #. type: TP
380 #: build/C/man7/arp.7:222
381 #, no-wrap
382 msgid "I<locktime> (since Linux 2.2)"
383 msgstr ""
384
385 #.  Precisely: 2.1.79
386 #. type: Plain text
387 #: build/C/man7/arp.7:229
388 msgid ""
389 "The minimum number of jiffies to keep an ARP entry in the cache.  This "
390 "prevents ARP cache thrashing if there is more than one potential mapping "
391 "(generally due to network misconfiguration).  Defaults to 1 second."
392 msgstr ""
393
394 #. type: TP
395 #: build/C/man7/arp.7:229
396 #, no-wrap
397 msgid "I<mcast_solicit> (since Linux 2.2)"
398 msgstr ""
399
400 #.  Precisely: 2.1.79
401 #. type: Plain text
402 #: build/C/man7/arp.7:235
403 msgid ""
404 "The maximum number of attempts to resolve an address by multicast/broadcast "
405 "before marking the entry as unreachable.  Defaults to 3."
406 msgstr ""
407
408 #. type: TP
409 #: build/C/man7/arp.7:235
410 #, no-wrap
411 msgid "I<proxy_delay> (since Linux 2.2)"
412 msgstr ""
413
414 #.  Precisely: 2.1.79
415 #. type: Plain text
416 #: build/C/man7/arp.7:243
417 msgid ""
418 "When an ARP request for a known proxy-ARP address is received, delay up to "
419 "I<proxy_delay> jiffies before replying.  This is used to prevent network "
420 "flooding in some cases.  Defaults to 0.8 seconds."
421 msgstr ""
422
423 #. type: TP
424 #: build/C/man7/arp.7:243
425 #, no-wrap
426 msgid "I<proxy_qlen> (since Linux 2.2)"
427 msgstr ""
428
429 #.  Precisely: 2.1.79
430 #. type: Plain text
431 #: build/C/man7/arp.7:248
432 msgid ""
433 "The maximum number of packets which may be queued to proxy-ARP addresses.  "
434 "Defaults to 64."
435 msgstr ""
436
437 #. type: TP
438 #: build/C/man7/arp.7:248
439 #, no-wrap
440 msgid "I<retrans_time> (since Linux 2.2)"
441 msgstr ""
442
443 #.  Precisely: 2.1.79
444 #. type: Plain text
445 #: build/C/man7/arp.7:255
446 msgid ""
447 "The number of jiffies to delay before retransmitting a request.  Defaults to "
448 "1 second.  This file is now obsolete in favor of I<retrans_time_ms>."
449 msgstr ""
450
451 #. type: TP
452 #: build/C/man7/arp.7:255
453 #, no-wrap
454 msgid "I<retrans_time_ms> (since Linux 2.6.12)"
455 msgstr ""
456
457 #. type: Plain text
458 #: build/C/man7/arp.7:259
459 msgid ""
460 "The number of milliseconds to delay before retransmitting a request.  "
461 "Defaults to 1000 milliseconds."
462 msgstr ""
463
464 #. type: TP
465 #: build/C/man7/arp.7:259
466 #, no-wrap
467 msgid "I<ucast_solicit> (since Linux 2.2)"
468 msgstr ""
469
470 #.  Precisely: 2.1.79
471 #. type: Plain text
472 #: build/C/man7/arp.7:266
473 msgid ""
474 "The maximum number of attempts to send unicast probes before asking the ARP "
475 "daemon (see I<app_solicit>).  Defaults to 3."
476 msgstr ""
477
478 #. type: TP
479 #: build/C/man7/arp.7:266
480 #, no-wrap
481 msgid "I<unres_qlen> (since Linux 2.2)"
482 msgstr ""
483
484 #.  Precisely: 2.1.79
485 #. type: Plain text
486 #: build/C/man7/arp.7:272
487 msgid ""
488 "The maximum number of packets which may be queued for each unresolved "
489 "address by other network layers.  Defaults to 3."
490 msgstr ""
491
492 #. type: SH
493 #: build/C/man7/arp.7:272 build/C/man7/ddp.7:221 build/C/man3/endian.3:74 build/C/man3/getnameinfo.3:203 build/C/man7/icmp.7:161 build/C/man7/ipv6.7:362 build/C/man7/packet.7:532 build/C/man7/raw.7:175 build/C/man3/rcmd.3:262 build/C/man3/rexec.3:138 build/C/man7/tcp.7:1244 build/C/man7/udp.7:251 build/C/man7/udplite.7:132 build/C/man7/unix.7:484 build/C/man7/x25.7:100
494 #, no-wrap
495 msgid "VERSIONS"
496 msgstr ""
497
498 #. type: Plain text
499 #: build/C/man7/arp.7:279
500 msgid ""
501 "The I<struct arpreq> changed in Linux 2.0 to include the I<arp_dev> member "
502 "and the ioctl numbers changed at the same time.  Support for the old ioctls "
503 "was dropped in Linux 2.2."
504 msgstr ""
505
506 #. type: Plain text
507 #: build/C/man7/arp.7:285
508 msgid ""
509 "Support for proxy arp entries for networks (netmask not equal 0xffffffff)  "
510 "was dropped in Linux 2.2.  It is replaced by automatic proxy arp setup by "
511 "the kernel for all reachable hosts on other interfaces (when forwarding and "
512 "proxy arp is enabled for the interface)."
513 msgstr ""
514
515 #. type: Plain text
516 #: build/C/man7/arp.7:289
517 msgid "The I<neigh/*> interfaces did not exist before Linux 2.2."
518 msgstr ""
519
520 #. type: SH
521 #: build/C/man7/arp.7:289 build/C/man7/ddp.7:244 build/C/man3/ether_aton.3:151 build/C/man3/gethostbyname.3:438 build/C/man3/inet_ntop.3:112 build/C/man3/inet_pton.3:150 build/C/man7/ip.7:1245 build/C/man7/ipv6.7:396 build/C/man7/netdevice.7:359 build/C/man7/packet.7:601 build/C/man7/raw.7:252 build/C/man3/rcmd.3:278 build/C/man3/rexec.3:158 build/C/man2/shutdown.2:104 build/C/man7/tcp.7:1251 build/C/man7/udplite.7:134 build/C/man7/unix.7:521 build/C/man7/x25.7:102
522 #, no-wrap
523 msgid "BUGS"
524 msgstr ""
525
526 #. type: Plain text
527 #: build/C/man7/arp.7:293
528 msgid ""
529 "Some timer settings are specified in jiffies, which is architecture- and "
530 "kernel version-dependent; see B<time>(7)."
531 msgstr ""
532
533 #. type: Plain text
534 #: build/C/man7/arp.7:299
535 msgid ""
536 "There is no way to signal positive feedback from user space.  This means "
537 "connection-oriented protocols implemented in user space will generate "
538 "excessive ARP traffic, because ndisc will regularly reprobe the MAC "
539 "address.  The same problem applies for some kernel protocols (e.g., NFS over "
540 "UDP)."
541 msgstr ""
542
543 #. type: Plain text
544 #: build/C/man7/arp.7:302
545 msgid ""
546 "This man page mashes together functionality that is IPv4-specific with "
547 "functionality that is shared between IPv4 and IPv6."
548 msgstr ""
549
550 #. type: SH
551 #: build/C/man7/arp.7:302 build/C/man3/byteorder.3:92 build/C/man3/cmsg.3:222 build/C/man7/ddp.7:249 build/C/man3/endian.3:151 build/C/man3/ether_aton.3:157 build/C/man5/gai.conf.5:93 build/C/man3/getaddrinfo.3:828 build/C/man3/getaddrinfo_a.3:600 build/C/man1/getent.1:368 build/C/man3/gethostbyname.3:443 build/C/man3/getipnodebyname.3:266 build/C/man3/getnameinfo.3:282 build/C/man3/getnetent.3:154 build/C/man3/getnetent_r.3:145 build/C/man2/getpeername.2:143 build/C/man3/getprotoent.3:142 build/C/man3/getprotoent_r.3:237 build/C/man3/getservent.3:159 build/C/man3/getservent_r.3:241 build/C/man5/host.conf.5:199 build/C/man7/hostname.7:85 build/C/man5/hosts.5:115 build/C/man5/hosts.equiv.5:84 build/C/man7/icmp.7:191 build/C/man3/inet.3:305 build/C/man3/inet_net_pton.3:390 build/C/man3/inet_ntop.3:118 build/C/man3/inet_pton.3:215 build/C/man7/ip.7:1272 build/C/man7/ipv6.7:407 build/C/man7/netdevice.7:373 build/C/man5/networks.5:74 build/C/man8/nscd.8:85 build/C/man5/nscd.conf.5:239 build/C/man5/nss.5:110 build/C/man5/nsswitch.conf.5:352 build/C/man7/packet.7:631 build/C/man5/protocols.5:81 build/C/man7/raw.7:269 build/C/man3/rcmd.3:285 build/C/man5/resolv.conf.5:301 build/C/man3/resolver.3:274 build/C/man3/rexec.3:167 build/C/man5/services.5:210 build/C/man3/setnetgrent.3:107 build/C/man2/shutdown.2:113 build/C/man7/tcp.7:1263 build/C/man7/udp.7:256 build/C/man7/udplite.7:146 build/C/man7/unix.7:616 build/C/man7/x25.7:118
552 #, no-wrap
553 msgid "SEE ALSO"
554 msgstr ""
555
556 #. type: Plain text
557 #: build/C/man7/arp.7:305
558 msgid "B<capabilities>(7), B<ip>(7)"
559 msgstr ""
560
561 #. type: Plain text
562 #: build/C/man7/arp.7:309
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: TH
570 #: build/C/man3/byteorder.3:32
571 #, no-wrap
572 msgid "BYTEORDER"
573 msgstr ""
574
575 #. type: TH
576 #: build/C/man3/byteorder.3:32
577 #, no-wrap
578 msgid "2014-04-08"
579 msgstr ""
580
581 #. type: TH
582 #: build/C/man3/byteorder.3:32 build/C/man3/endian.3:28 build/C/man3/ether_aton.3:31 build/C/man3/getaddrinfo.3:44 build/C/man3/getaddrinfo_a.3:29 build/C/man3/getnameinfo.3:10 build/C/man3/getnetent.3:30 build/C/man3/getnetent_r.3:26 build/C/man3/getprotoent.3:30 build/C/man3/getprotoent_r.3:26 build/C/man3/getservent.3:34 build/C/man3/getservent_r.3:26 build/C/man3/inet.3:42 build/C/man8/nscd.8:23 build/C/man5/nscd.conf.5:20 build/C/man3/resolver.3:32 build/C/man3/setnetgrent.3:10
583 #, no-wrap
584 msgid "GNU"
585 msgstr ""
586
587 #. type: Plain text
588 #: build/C/man3/byteorder.3:36
589 msgid ""
590 "htonl, htons, ntohl, ntohs - convert values between host and network byte "
591 "order"
592 msgstr ""
593
594 #. type: SH
595 #: build/C/man3/byteorder.3:36 build/C/man3/cmsg.3:14 build/C/man7/ddp.7:15 build/C/man3/endian.3:33 build/C/man3/ether_aton.3:35 build/C/man3/getaddrinfo.3:48 build/C/man3/getaddrinfo_a.3:33 build/C/man1/getent.1:27 build/C/man3/gethostbyname.3:46 build/C/man3/getipnodebyname.3:30 build/C/man3/getnameinfo.3:13 build/C/man3/getnetent.3:34 build/C/man3/getnetent_r.3:30 build/C/man2/getpeername.2:45 build/C/man3/getprotoent.3:34 build/C/man3/getprotoent_r.3:30 build/C/man3/getservent.3:38 build/C/man3/getservent_r.3:30 build/C/man5/hosts.5:30 build/C/man3/inet.3:46 build/C/man3/inet_net_pton.3:29 build/C/man3/inet_ntop.3:29 build/C/man3/inet_pton.3:30 build/C/man7/ip.7:39 build/C/man7/ipv6.7:89 build/C/man7/netdevice.7:21 build/C/man7/packet.7:15 build/C/man7/raw.7:16 build/C/man3/rcmd.3:48 build/C/man5/resolv.conf.5:27 build/C/man3/resolver.3:36 build/C/man3/rexec.3:44 build/C/man3/setnetgrent.3:14 build/C/man2/shutdown.2:43 build/C/man7/tcp.7:79 build/C/man7/udp.7:15 build/C/man7/udplite.7:30 build/C/man7/unix.7:23 build/C/man7/x25.7:15
596 #, no-wrap
597 msgid "SYNOPSIS"
598 msgstr ""
599
600 #. type: Plain text
601 #: build/C/man3/byteorder.3:39 build/C/man3/inet_net_pton.3:32 build/C/man3/inet_ntop.3:32 build/C/man3/inet_pton.3:33
602 #, no-wrap
603 msgid "B<#include E<lt>arpa/inet.hE<gt>>\n"
604 msgstr ""
605
606 #. type: Plain text
607 #: build/C/man3/byteorder.3:41
608 #, no-wrap
609 msgid "B<uint32_t htonl(uint32_t >I<hostlong>B<);>\n"
610 msgstr ""
611
612 #. type: Plain text
613 #: build/C/man3/byteorder.3:43
614 #, no-wrap
615 msgid "B<uint16_t htons(uint16_t >I<hostshort>B<);>\n"
616 msgstr ""
617
618 #. type: Plain text
619 #: build/C/man3/byteorder.3:45
620 #, no-wrap
621 msgid "B<uint32_t ntohl(uint32_t >I<netlong>B<);>\n"
622 msgstr ""
623
624 #. type: Plain text
625 #: build/C/man3/byteorder.3:47
626 #, no-wrap
627 msgid "B<uint16_t ntohs(uint16_t >I<netshort>B<);>\n"
628 msgstr ""
629
630 #. type: Plain text
631 #: build/C/man3/byteorder.3:54
632 msgid ""
633 "The B<htonl>()  function converts the unsigned integer I<hostlong> from host "
634 "byte order to network byte order."
635 msgstr ""
636
637 #. type: Plain text
638 #: build/C/man3/byteorder.3:60
639 msgid ""
640 "The B<htons>()  function converts the unsigned short integer I<hostshort> "
641 "from host byte order to network byte order."
642 msgstr ""
643
644 #. type: Plain text
645 #: build/C/man3/byteorder.3:66
646 msgid ""
647 "The B<ntohl>()  function converts the unsigned integer I<netlong> from "
648 "network byte order to host byte order."
649 msgstr ""
650
651 #. type: Plain text
652 #: build/C/man3/byteorder.3:72
653 msgid ""
654 "The B<ntohs>()  function converts the unsigned short integer I<netshort> "
655 "from network byte order to host byte order."
656 msgstr ""
657
658 #. type: Plain text
659 #: build/C/man3/byteorder.3:76
660 msgid ""
661 "On the i386 the host byte order is Least Significant Byte first, whereas the "
662 "network byte order, as used on the Internet, is Most Significant Byte first."
663 msgstr ""
664
665 #. type: SH
666 #: build/C/man3/byteorder.3:76 build/C/man3/ether_aton.3:127 build/C/man3/rexec.3:142
667 #, no-wrap
668 msgid "ATTRIBUTES"
669 msgstr ""
670
671 #. type: SS
672 #: build/C/man3/byteorder.3:77 build/C/man3/rexec.3:143
673 #, no-wrap
674 msgid "Multithreading (see pthreads(7))"
675 msgstr ""
676
677 #. type: Plain text
678 #: build/C/man3/byteorder.3:85
679 msgid ""
680 "The B<htonl>(), B<htons>(), B<ntohl>(), and B<ntohs>()  functions are "
681 "thread-safe."
682 msgstr ""
683
684 #. type: SH
685 #: build/C/man3/byteorder.3:85 build/C/man3/cmsg.3:141 build/C/man3/endian.3:76 build/C/man3/ether_aton.3:149 build/C/man3/getaddrinfo.3:595 build/C/man3/getaddrinfo_a.3:305 build/C/man3/gethostbyname.3:317 build/C/man3/getipnodebyname.3:258 build/C/man3/getnameinfo.3:206 build/C/man3/getnetent.3:145 build/C/man3/getnetent_r.3:141 build/C/man2/getpeername.2:101 build/C/man3/getprotoent.3:140 build/C/man3/getprotoent_r.3:131 build/C/man3/getservent.3:157 build/C/man3/getservent_r.3:130 build/C/man3/inet.3:218 build/C/man3/inet_net_pton.3:159 build/C/man3/inet_ntop.3:100 build/C/man3/inet_pton.3:129 build/C/man3/rcmd.3:270 build/C/man3/resolver.3:272 build/C/man3/rexec.3:149 build/C/man3/setnetgrent.3:92 build/C/man2/shutdown.2:91
686 #, no-wrap
687 msgid "CONFORMING TO"
688 msgstr ""
689
690 #. type: Plain text
691 #: build/C/man3/byteorder.3:87 build/C/man3/inet_pton.3:131
692 msgid "POSIX.1-2001."
693 msgstr ""
694
695 #. type: Plain text
696 #: build/C/man3/byteorder.3:92
697 msgid ""
698 "Some systems require the inclusion of I<E<lt>netinet/in.hE<gt>> instead of "
699 "I<E<lt>arpa/inet.hE<gt>>."
700 msgstr ""
701
702 #. type: Plain text
703 #: build/C/man3/byteorder.3:95
704 msgid "B<endian>(3), B<gethostbyname>(3), B<getservent>(3)"
705 msgstr ""
706
707 #. type: TH
708 #: build/C/man3/cmsg.3:11
709 #, no-wrap
710 msgid "CMSG"
711 msgstr ""
712
713 #. type: TH
714 #: build/C/man3/cmsg.3:11 build/C/man5/resolv.conf.5:23 build/C/man7/unix.7:20
715 #, no-wrap
716 msgid "2014-12-31"
717 msgstr ""
718
719 #. type: Plain text
720 #: build/C/man3/cmsg.3:14
721 msgid "CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR - access ancillary data"
722 msgstr ""
723
724 #. type: Plain text
725 #: build/C/man3/cmsg.3:16 build/C/man7/ddp.7:17 build/C/man2/getpeername.2:47 build/C/man7/ip.7:41 build/C/man7/ipv6.7:91 build/C/man7/raw.7:18 build/C/man2/shutdown.2:45 build/C/man7/tcp.7:81 build/C/man7/udp.7:17 build/C/man7/udplite.7:32 build/C/man7/unix.7:25 build/C/man7/x25.7:17
726 msgid "B<#include E<lt>sys/socket.hE<gt>>"
727 msgstr ""
728
729 #. type: Plain text
730 #: build/C/man3/cmsg.3:18
731 msgid "B<struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *>I<msgh>B<);>"
732 msgstr ""
733
734 #. type: Plain text
735 #: build/C/man3/cmsg.3:20
736 msgid ""
737 "B<struct cmsghdr *CMSG_NXTHDR(struct msghdr *>I<msgh>B<, struct cmsghdr "
738 "*>I<cmsg>B<);>"
739 msgstr ""
740
741 #. type: Plain text
742 #: build/C/man3/cmsg.3:22
743 msgid "B<size_t CMSG_ALIGN(size_t >I<length>B<);>"
744 msgstr ""
745
746 #. type: Plain text
747 #: build/C/man3/cmsg.3:24
748 msgid "B<size_t CMSG_SPACE(size_t >I<length>B<);>"
749 msgstr ""
750
751 #. type: Plain text
752 #: build/C/man3/cmsg.3:26
753 msgid "B<size_t CMSG_LEN(size_t >I<length>B<);>"
754 msgstr ""
755
756 #. type: Plain text
757 #: build/C/man3/cmsg.3:28
758 msgid "B<unsigned char *CMSG_DATA(struct cmsghdr *>I<cmsg>B<);>"
759 msgstr ""
760
761 #. type: Plain text
762 #: build/C/man3/cmsg.3:36
763 #, no-wrap
764 msgid ""
765 "struct cmsghdr {\n"
766 "    socklen_t cmsg_len;    /* data byte count, including header */\n"
767 "    int       cmsg_level;  /* originating protocol */\n"
768 "    int       cmsg_type;   /* protocol-specific type */\n"
769 "    /* followed by unsigned char cmsg_data[]; */\n"
770 "};\n"
771 msgstr ""
772
773 #. type: Plain text
774 #: build/C/man3/cmsg.3:51
775 msgid ""
776 "These macros are used to create and access control messages (also called "
777 "ancillary data) that are not a part of the socket payload.  This control "
778 "information may include the interface the packet was received on, various "
779 "rarely used header fields, an extended error description, a set of file "
780 "descriptors or UNIX credentials.  For instance, control messages can be used "
781 "to send additional header fields such as IP options.  Ancillary data is sent "
782 "by calling B<sendmsg>(2)  and received by calling B<recvmsg>(2).  See their "
783 "manual pages for more information."
784 msgstr ""
785
786 #. type: Plain text
787 #: build/C/man3/cmsg.3:62
788 msgid ""
789 "Ancillary data is a sequence of I<struct cmsghdr> structures with appended "
790 "data.  This sequence should be accessed using only the macros described in "
791 "this manual page and never directly.  See the specific protocol man pages "
792 "for the available control message types.  The maximum ancillary buffer size "
793 "allowed per socket can be set using I</proc/sys/net/core/optmem_max>; see "
794 "B<socket>(7)."
795 msgstr ""
796
797 #. type: Plain text
798 #: build/C/man3/cmsg.3:69
799 msgid ""
800 "B<CMSG_FIRSTHDR>()  returns a pointer to the first I<cmsghdr> in the "
801 "ancillary data buffer associated with the passed I<msghdr>."
802 msgstr ""
803
804 #. type: Plain text
805 #: build/C/man3/cmsg.3:76
806 msgid ""
807 "B<CMSG_NXTHDR>()  returns the next valid I<cmsghdr> after the passed "
808 "I<cmsghdr>.  It returns NULL when there isn't enough space left in the "
809 "buffer."
810 msgstr ""
811
812 #. type: Plain text
813 #: build/C/man3/cmsg.3:81
814 msgid ""
815 "B<CMSG_ALIGN>(), given a length, returns it including the required "
816 "alignment.  This is a constant expression."
817 msgstr ""
818
819 #. type: Plain text
820 #: build/C/man3/cmsg.3:86
821 msgid ""
822 "B<CMSG_SPACE>()  returns the number of bytes an ancillary element with "
823 "payload of the passed data length occupies.  This is a constant expression."
824 msgstr ""
825
826 #. type: Plain text
827 #: build/C/man3/cmsg.3:90
828 msgid "B<CMSG_DATA>()  returns a pointer to the data portion of a I<cmsghdr>."
829 msgstr ""
830
831 #. type: Plain text
832 #: build/C/man3/cmsg.3:101
833 msgid ""
834 "B<CMSG_LEN>()  returns the value to store in the I<cmsg_len> member of the "
835 "I<cmsghdr> structure, taking into account any necessary alignment.  It takes "
836 "the data length as an argument.  This is a constant expression."
837 msgstr ""
838
839 #. type: Plain text
840 #: build/C/man3/cmsg.3:134
841 msgid ""
842 "To create ancillary data, first initialize the I<msg_controllen> member of "
843 "the I<msghdr> with the length of the control message buffer.  Use "
844 "B<CMSG_FIRSTHDR>()  on the I<msghdr> to get the first control message and "
845 "B<CMSG_NXTHDR>()  to get all subsequent ones.  In each control message, "
846 "initialize I<cmsg_len> (with B<CMSG_LEN>()), the other I<cmsghdr> header "
847 "fields, and the data portion using B<CMSG_DATA>().  Finally, the "
848 "I<msg_controllen> field of the I<msghdr> should be set to the sum of the "
849 "B<CMSG_SPACE>()  of the length of all control messages in the buffer.  For "
850 "more information on the I<msghdr>, see B<recvmsg>(2)."
851 msgstr ""
852
853 #. type: Plain text
854 #: build/C/man3/cmsg.3:141
855 msgid ""
856 "When the control message buffer is too short to store all messages, the "
857 "B<MSG_CTRUNC> flag is set in the I<msg_flags> member of the I<msghdr>."
858 msgstr ""
859
860 #. type: Plain text
861 #: build/C/man3/cmsg.3:146
862 msgid ""
863 "This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, the "
864 "IPv6 advanced API described in RFC\\ 2292 and SUSv2.  B<CMSG_ALIGN>()  is a "
865 "Linux extension."
866 msgstr ""
867
868 #. type: SH
869 #: build/C/man3/cmsg.3:146 build/C/man7/ddp.7:226 build/C/man3/endian.3:91 build/C/man3/getaddrinfo.3:600 build/C/man3/getaddrinfo_a.3:308 build/C/man3/gethostbyname.3:341 build/C/man3/getipnodebyname.3:261 build/C/man3/getnameinfo.3:208 build/C/man3/getnetent.3:147 build/C/man2/getpeername.2:105 build/C/man5/host.conf.5:190 build/C/man5/hosts.5:88 build/C/man5/hosts.equiv.5:71 build/C/man7/icmp.7:169 build/C/man3/inet.3:226 build/C/man3/inet_net_pton.3:165 build/C/man3/inet_pton.3:131 build/C/man7/ip.7:1183 build/C/man7/ipv6.7:386 build/C/man7/netdevice.7:341 build/C/man8/nscd.8:60 build/C/man5/nscd.conf.5:232 build/C/man5/nsswitch.conf.5:333 build/C/man7/packet.7:538 build/C/man7/raw.7:187 build/C/man3/setnetgrent.3:103 build/C/man2/shutdown.2:95 build/C/man7/unix.7:490
870 #, no-wrap
871 msgid "NOTES"
872 msgstr ""
873
874 #. type: Plain text
875 #: build/C/man3/cmsg.3:151
876 msgid ""
877 "For portability, ancillary data should be accessed using only the macros "
878 "described here.  B<CMSG_ALIGN>()  is a Linux extension and should not be "
879 "used in portable programs."
880 msgstr ""
881
882 #. type: Plain text
883 #: build/C/man3/cmsg.3:161
884 msgid ""
885 "In Linux, B<CMSG_LEN>(), B<CMSG_DATA>(), and B<CMSG_ALIGN>()  are constant "
886 "expressions (assuming their argument is constant); this could be used to "
887 "declare the size of global variables.  This may not be portable, however."
888 msgstr ""
889
890 #. type: SH
891 #: build/C/man3/cmsg.3:161 build/C/man3/endian.3:107 build/C/man5/gai.conf.5:74 build/C/man3/getaddrinfo.3:623 build/C/man3/getaddrinfo_a.3:314 build/C/man3/getnameinfo.3:243 build/C/man3/getprotoent_r.3:135 build/C/man3/getservent_r.3:134 build/C/man5/hosts.5:107 build/C/man3/inet.3:262 build/C/man3/inet_net_pton.3:247 build/C/man3/inet_ntop.3:115 build/C/man3/inet_pton.3:156 build/C/man5/nss.5:100 build/C/man7/unix.7:608
892 #, no-wrap
893 msgid "EXAMPLE"
894 msgstr ""
895
896 #. type: Plain text
897 #: build/C/man3/cmsg.3:165
898 msgid "This code looks for the B<IP_TTL> option in a received ancillary buffer:"
899 msgstr ""
900
901 #. type: Plain text
902 #: build/C/man3/cmsg.3:172
903 #, no-wrap
904 msgid ""
905 "struct msghdr msgh;\n"
906 "struct cmsghdr *cmsg;\n"
907 "int *ttlptr;\n"
908 "int received_ttl;\n"
909 msgstr ""
910
911 #. type: Plain text
912 #: build/C/man3/cmsg.3:189
913 #, no-wrap
914 msgid ""
915 "/* Receive auxiliary data in msgh */\n"
916 "for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n"
917 "        cmsg = CMSG_NXTHDR(&msgh,cmsg)) {\n"
918 "    if (cmsg-E<gt>cmsg_level == IPPROTO_IP\n"
919 "            && cmsg-E<gt>cmsg_type == IP_TTL) {\n"
920 "        ttlptr = (int *) CMSG_DATA(cmsg);\n"
921 "        received_ttl = *ttlptr;\n"
922 "        break;\n"
923 "    }\n"
924 "}\n"
925 "if (cmsg == NULL) {\n"
926 "    /*\n"
927 "     * Error: IP_TTL not enabled or small buffer\n"
928 "     * or I/O error.\n"
929 "     */\n"
930 "}\n"
931 msgstr ""
932
933 #. type: Plain text
934 #: build/C/man3/cmsg.3:195
935 msgid ""
936 "The code below passes an array of file descriptors over a UNIX domain socket "
937 "using B<SCM_RIGHTS>:"
938 msgstr ""
939
940 #. type: Plain text
941 #: build/C/man3/cmsg.3:208
942 #, no-wrap
943 msgid ""
944 "struct msghdr msg = {0};\n"
945 "struct cmsghdr *cmsg;\n"
946 "int myfds[NUM_FD]; /* Contains the file descriptors to pass. */\n"
947 "union {\n"
948 "    /* ancillary data buffer, wrapped in a union in order to ensure it is\n"
949 "       suitably aligned */\n"
950 "    char buf[CMSG_SPACE(sizeof myfds)];\n"
951 "    struct cmsghdr align;\n"
952 "} u;\n"
953 "int *fdptr;\n"
954 msgstr ""
955
956 #. type: Plain text
957 #: build/C/man3/cmsg.3:220
958 #, no-wrap
959 msgid ""
960 "msg.msg_control = u.buf;\n"
961 "msg.msg_controllen = sizeof u.buf;\n"
962 "cmsg = CMSG_FIRSTHDR(&msg);\n"
963 "cmsg-E<gt>cmsg_level = SOL_SOCKET;\n"
964 "cmsg-E<gt>cmsg_type = SCM_RIGHTS;\n"
965 "cmsg-E<gt>cmsg_len = CMSG_LEN(sizeof(int) * NUM_FD);\n"
966 "/* Initialize the payload: */\n"
967 "fdptr = (int *) CMSG_DATA(cmsg);\n"
968 "memcpy(fdptr, myfds, NUM_FD * sizeof(int));\n"
969 "/* Sum of the length of all control messages in the buffer: */\n"
970 "msg.msg_controllen = cmsg-E<gt>cmsg_len;\n"
971 msgstr ""
972
973 #. type: Plain text
974 #: build/C/man3/cmsg.3:225
975 msgid "B<recvmsg>(2), B<sendmsg>(2)"
976 msgstr ""
977
978 #. type: Plain text
979 #: build/C/man3/cmsg.3:226
980 msgid "RFC\\ 2292"
981 msgstr ""
982
983 #. type: TH
984 #: build/C/man7/ddp.7:12
985 #, no-wrap
986 msgid "DDP"
987 msgstr ""
988
989 #. type: TH
990 #: build/C/man7/ddp.7:12
991 #, no-wrap
992 msgid "2008-11-20"
993 msgstr ""
994
995 #. type: Plain text
996 #: build/C/man7/ddp.7:15
997 msgid "ddp - Linux AppleTalk protocol implementation"
998 msgstr ""
999
1000 #. type: Plain text
1001 #: build/C/man7/ddp.7:19
1002 msgid "B<#include E<lt>netatalk/at.hE<gt>>"
1003 msgstr ""
1004
1005 #. type: Plain text
1006 #: build/C/man7/ddp.7:21
1007 msgid "I<ddp_socket>B< = socket(AF_APPLETALK, SOCK_DGRAM, 0);>"
1008 msgstr ""
1009
1010 #. type: Plain text
1011 #: build/C/man7/ddp.7:23
1012 msgid "I<raw_socket>B< = socket(AF_APPLETALK, SOCK_RAW, >I<protocol>B<);>"
1013 msgstr ""
1014
1015 #. type: Plain text
1016 #: build/C/man7/ddp.7:34
1017 msgid ""
1018 "Linux implements the AppleTalk protocols described in I<Inside AppleTalk>.  "
1019 "Only the DDP layer and AARP are present in the kernel.  They are designed to "
1020 "be used via the B<netatalk> protocol libraries.  This page documents the "
1021 "interface for those who wish or need to use the DDP layer directly."
1022 msgstr ""
1023
1024 #. type: Plain text
1025 #: build/C/man7/ddp.7:39
1026 msgid ""
1027 "The communication between AppleTalk and the user program works using a "
1028 "BSD-compatible socket interface.  For more information on sockets, see "
1029 "B<socket>(7)."
1030 msgstr ""
1031
1032 #. type: Plain text
1033 #: build/C/man7/ddp.7:60
1034 msgid ""
1035 "An AppleTalk socket is created by calling the B<socket>(2)  function with a "
1036 "B<AF_APPLETALK> socket family argument.  Valid socket types are "
1037 "B<SOCK_DGRAM> to open a B<ddp> socket or B<SOCK_RAW> to open a B<raw> "
1038 "socket.  I<protocol> is the AppleTalk protocol to be received or sent.  For "
1039 "B<SOCK_RAW> you must specify B<ATPROTO_DDP>."
1040 msgstr ""
1041
1042 #. type: Plain text
1043 #: build/C/man7/ddp.7:65
1044 msgid ""
1045 "Raw sockets may be opened only by a process with effective user ID 0 or when "
1046 "the process has the B<CAP_NET_RAW> capability."
1047 msgstr ""
1048
1049 #. type: SS
1050 #: build/C/man7/ddp.7:65 build/C/man7/ip.7:123 build/C/man7/ipv6.7:142 build/C/man7/raw.7:93 build/C/man7/udp.7:98 build/C/man7/udplite.7:58 build/C/man7/unix.7:57
1051 #, no-wrap
1052 msgid "Address format"
1053 msgstr ""
1054
1055 #. type: Plain text
1056 #: build/C/man7/ddp.7:68
1057 msgid ""
1058 "An AppleTalk socket address is defined as a combination of a network number, "
1059 "a node number, and a port number."
1060 msgstr ""
1061
1062 #. type: Plain text
1063 #: build/C/man7/ddp.7:75
1064 #, no-wrap
1065 msgid ""
1066 "struct at_addr {\n"
1067 "    unsigned short s_net;\n"
1068 "    unsigned char  s_node;\n"
1069 "};\n"
1070 msgstr ""
1071
1072 #. type: Plain text
1073 #: build/C/man7/ddp.7:81
1074 #, no-wrap
1075 msgid ""
1076 "struct sockaddr_atalk {\n"
1077 "    sa_family_t    sat_family;    /* address family */\n"
1078 "    unsigned char  sat_port;      /* port */\n"
1079 "    struct at_addr sat_addr;      /* net/node */\n"
1080 "};\n"
1081 msgstr ""
1082
1083 #.  FIXME . this doesn't make sense [johnl]
1084 #. type: Plain text
1085 #: build/C/man7/ddp.7:120
1086 msgid ""
1087 "I<sat_family> is always set to B<AF_APPLETALK>.  I<sat_port> contains the "
1088 "port.  The port numbers below 129 are known as I<reserved ports>.  Only "
1089 "processes with the effective user ID 0 or the B<CAP_NET_BIND_SERVICE> "
1090 "capability may B<bind>(2)  to these sockets.  I<sat_addr> is the host "
1091 "address.  The I<net> member of I<struct at_addr> contains the host network "
1092 "in network byte order.  The value of B<AT_ANYNET> is a wildcard and also "
1093 "implies \\(lqthis network.\\(rq The I<node> member of I<struct at_addr> "
1094 "contains the host node number.  The value of B<AT_ANYNODE> is a wildcard and "
1095 "also implies \\(lqthis node.\\(rq The value of B<ATADDR_BCAST> is a link "
1096 "local broadcast address."
1097 msgstr ""
1098
1099 #. type: SS
1100 #: build/C/man7/ddp.7:120 build/C/man7/ip.7:224 build/C/man7/ipv6.7:192 build/C/man7/packet.7:180 build/C/man7/raw.7:109 build/C/man7/tcp.7:889 build/C/man7/udp.7:178 build/C/man7/udplite.7:67 build/C/man7/unix.7:220 build/C/man7/x25.7:72
1101 #, no-wrap
1102 msgid "Socket options"
1103 msgstr ""
1104
1105 #. type: Plain text
1106 #: build/C/man7/ddp.7:122
1107 msgid "No protocol-specific socket options are supported."
1108 msgstr ""
1109
1110 #. type: Plain text
1111 #: build/C/man7/ddp.7:128
1112 msgid ""
1113 "IP supports a set of I</proc> interfaces to configure some global AppleTalk "
1114 "parameters.  The parameters can be accessed by reading or writing files in "
1115 "the directory I</proc/sys/net/atalk/>."
1116 msgstr ""
1117
1118 #. type: TP
1119 #: build/C/man7/ddp.7:128
1120 #, no-wrap
1121 msgid "I<aarp-expiry-time>"
1122 msgstr ""
1123
1124 #. type: Plain text
1125 #: build/C/man7/ddp.7:131
1126 msgid "The time interval (in seconds) before an AARP cache entry expires."
1127 msgstr ""
1128
1129 #. type: TP
1130 #: build/C/man7/ddp.7:131
1131 #, no-wrap
1132 msgid "I<aarp-resolve-time>"
1133 msgstr ""
1134
1135 #. type: Plain text
1136 #: build/C/man7/ddp.7:134
1137 msgid "The time interval (in seconds) before an AARP cache entry is resolved."
1138 msgstr ""
1139
1140 #. type: TP
1141 #: build/C/man7/ddp.7:134
1142 #, no-wrap
1143 msgid "I<aarp-retransmit-limit>"
1144 msgstr ""
1145
1146 #. type: Plain text
1147 #: build/C/man7/ddp.7:138
1148 msgid ""
1149 "The number of retransmissions of an AARP query before the node is declared "
1150 "dead."
1151 msgstr ""
1152
1153 #. type: TP
1154 #: build/C/man7/ddp.7:138
1155 #, no-wrap
1156 msgid "I<aarp-tick-time>"
1157 msgstr ""
1158
1159 #. type: Plain text
1160 #: build/C/man7/ddp.7:141
1161 msgid "The timer rate (in seconds) for the timer driving AARP."
1162 msgstr ""
1163
1164 #. type: Plain text
1165 #: build/C/man7/ddp.7:144
1166 msgid ""
1167 "The default values match the specification and should never need to be "
1168 "changed."
1169 msgstr ""
1170
1171 #.  FIXME . Add a section about multicasting
1172 #. type: Plain text
1173 #: build/C/man7/ddp.7:149
1174 msgid "All ioctls described in B<socket>(7)  apply to DDP."
1175 msgstr ""
1176
1177 #. type: SH
1178 #: build/C/man7/ddp.7:149 build/C/man3/gethostbyname.3:292 build/C/man3/getnetent_r.3:129 build/C/man2/getpeername.2:73 build/C/man3/getprotoent_r.3:119 build/C/man3/getservent_r.3:118 build/C/man3/inet_net_pton.3:145 build/C/man3/inet_ntop.3:91 build/C/man7/ip.7:1092 build/C/man7/ipv6.7:351 build/C/man7/packet.7:496 build/C/man7/raw.7:144 build/C/man2/shutdown.2:74 build/C/man7/tcp.7:1226 build/C/man7/udp.7:241 build/C/man7/udplite.7:121 build/C/man7/unix.7:405
1179 #, no-wrap
1180 msgid "ERRORS"
1181 msgstr ""
1182
1183 #. type: TP
1184 #: build/C/man7/ddp.7:153 build/C/man7/ip.7:1096 build/C/man7/raw.7:145
1185 #, no-wrap
1186 msgid "B<EACCES>"
1187 msgstr ""
1188
1189 #. type: Plain text
1190 #: build/C/man7/ddp.7:160
1191 msgid ""
1192 "The user tried to execute an operation without the necessary permissions.  "
1193 "These include sending to a broadcast address without having the broadcast "
1194 "flag set, and trying to bind to a reserved port without effective user ID 0 "
1195 "or B<CAP_NET_BIND_SERVICE>."
1196 msgstr ""
1197
1198 #. type: TP
1199 #: build/C/man7/ddp.7:160 build/C/man7/ip.7:1112 build/C/man7/unix.7:406
1200 #, no-wrap
1201 msgid "B<EADDRINUSE>"
1202 msgstr ""
1203
1204 #. type: Plain text
1205 #: build/C/man7/ddp.7:163 build/C/man7/ip.7:1115
1206 msgid "Tried to bind to an address already in use."
1207 msgstr ""
1208
1209 #. type: TP
1210 #: build/C/man7/ddp.7:163 build/C/man7/ip.7:1115 build/C/man7/packet.7:497
1211 #, no-wrap
1212 msgid "B<EADDRNOTAVAIL>"
1213 msgstr ""
1214
1215 #. type: Plain text
1216 #: build/C/man7/ddp.7:167 build/C/man7/ip.7:1119
1217 msgid ""
1218 "A nonexistent interface was requested or the requested source address was "
1219 "not local."
1220 msgstr ""
1221
1222 #. type: TP
1223 #: build/C/man7/ddp.7:167 build/C/man7/ip.7:1119
1224 #, no-wrap
1225 msgid "B<EAGAIN>"
1226 msgstr ""
1227
1228 #. type: Plain text
1229 #: build/C/man7/ddp.7:170 build/C/man7/ip.7:1122
1230 msgid "Operation on a nonblocking socket would block."
1231 msgstr ""
1232
1233 #. type: TP
1234 #: build/C/man7/ddp.7:170 build/C/man7/ip.7:1122
1235 #, no-wrap
1236 msgid "B<EALREADY>"
1237 msgstr ""
1238
1239 #. type: Plain text
1240 #: build/C/man7/ddp.7:173
1241 msgid "A connection operation on a nonblocking socket is already in progress."
1242 msgstr ""
1243
1244 #. type: TP
1245 #: build/C/man7/ddp.7:173 build/C/man7/ip.7:1125
1246 #, no-wrap
1247 msgid "B<ECONNABORTED>"
1248 msgstr ""
1249
1250 #. type: Plain text
1251 #: build/C/man7/ddp.7:177 build/C/man7/ip.7:1129
1252 msgid "A connection was closed during an B<accept>(2)."
1253 msgstr ""
1254
1255 #. type: TP
1256 #: build/C/man7/ddp.7:177 build/C/man7/ip.7:1129
1257 #, no-wrap
1258 msgid "B<EHOSTUNREACH>"
1259 msgstr ""
1260
1261 #. type: Plain text
1262 #: build/C/man7/ddp.7:180
1263 msgid "No routing table entry matches the destination address."
1264 msgstr ""
1265
1266 #. type: TP
1267 #: build/C/man7/ddp.7:180 build/C/man2/getpeername.2:85 build/C/man7/ip.7:1134 build/C/man7/packet.7:503 build/C/man7/raw.7:152 build/C/man2/shutdown.2:79 build/C/man7/unix.7:422
1268 #, no-wrap
1269 msgid "B<EINVAL>"
1270 msgstr ""
1271
1272 #. type: Plain text
1273 #: build/C/man7/ddp.7:183
1274 msgid "Invalid argument passed."
1275 msgstr ""
1276
1277 #. type: TP
1278 #: build/C/man7/ddp.7:183 build/C/man7/ip.7:1140 build/C/man7/unix.7:431
1279 #, no-wrap
1280 msgid "B<EISCONN>"
1281 msgstr ""
1282
1283 #. type: Plain text
1284 #: build/C/man7/ddp.7:187 build/C/man7/ip.7:1144
1285 msgid "B<connect>(2)  was called on an already connected socket."
1286 msgstr ""
1287
1288 #. type: TP
1289 #: 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
1290 #, no-wrap
1291 msgid "B<EMSGSIZE>"
1292 msgstr ""
1293
1294 #. type: Plain text
1295 #: build/C/man7/ddp.7:190
1296 msgid "Datagram is bigger than the DDP MTU."
1297 msgstr ""
1298
1299 #. type: TP
1300 #: build/C/man7/ddp.7:190 build/C/man7/ipv6.7:352 build/C/man7/packet.7:515
1301 #, no-wrap
1302 msgid "B<ENODEV>"
1303 msgstr ""
1304
1305 #. type: Plain text
1306 #: build/C/man7/ddp.7:193
1307 msgid "Network device not available or not capable of sending IP."
1308 msgstr ""
1309
1310 #. type: TP
1311 #: build/C/man7/ddp.7:193 build/C/man3/getnetent_r.3:130 build/C/man3/getprotoent_r.3:120 build/C/man3/getservent_r.3:119 build/C/man3/inet_net_pton.3:154 build/C/man7/ip.7:1152 build/C/man7/packet.7:518 build/C/man7/unix.7:436
1312 #, no-wrap
1313 msgid "B<ENOENT>"
1314 msgstr ""
1315
1316 #. type: Plain text
1317 #: build/C/man7/ddp.7:197 build/C/man7/ip.7:1156
1318 msgid "B<SIOCGSTAMP> was called on a socket where no packet arrived."
1319 msgstr ""
1320
1321 #. type: TP
1322 #: build/C/man7/ddp.7:197
1323 #, no-wrap
1324 msgid "B<ENOMEM> and B<ENOBUFS>"
1325 msgstr ""
1326
1327 #. type: Plain text
1328 #: build/C/man7/ddp.7:200
1329 msgid "Not enough memory available."
1330 msgstr ""
1331
1332 #. type: TP
1333 #: build/C/man7/ddp.7:200 build/C/man7/ip.7:1156
1334 #, no-wrap
1335 msgid "B<ENOPKG>"
1336 msgstr ""
1337
1338 #. type: Plain text
1339 #: build/C/man7/ddp.7:203 build/C/man7/ip.7:1159
1340 msgid "A kernel subsystem was not configured."
1341 msgstr ""
1342
1343 #. type: TP
1344 #: build/C/man7/ddp.7:203 build/C/man7/ip.7:1159
1345 #, no-wrap
1346 msgid "B<ENOPROTOOPT> and B<EOPNOTSUPP>"
1347 msgstr ""
1348
1349 #. type: Plain text
1350 #: build/C/man7/ddp.7:206 build/C/man7/ip.7:1162
1351 msgid "Invalid socket option passed."
1352 msgstr ""
1353
1354 #. type: TP
1355 #: build/C/man7/ddp.7:206 build/C/man2/getpeername.2:93 build/C/man7/ip.7:1162 build/C/man7/packet.7:521 build/C/man2/shutdown.2:84 build/C/man7/unix.7:444
1356 #, no-wrap
1357 msgid "B<ENOTCONN>"
1358 msgstr ""
1359
1360 #. type: Plain text
1361 #: build/C/man7/ddp.7:210 build/C/man7/ip.7:1166
1362 msgid ""
1363 "The operation is defined only on a connected socket, but the socket wasn't "
1364 "connected."
1365 msgstr ""
1366
1367 #. type: TP
1368 #: build/C/man7/ddp.7:210 build/C/man7/ip.7:1166 build/C/man7/packet.7:527 build/C/man7/raw.7:166 build/C/man7/unix.7:451
1369 #, no-wrap
1370 msgid "B<EPERM>"
1371 msgstr ""
1372
1373 #. type: Plain text
1374 #: build/C/man7/ddp.7:215
1375 msgid ""
1376 "User doesn't have permission to set high priority, make a configuration "
1377 "change, or send signals to the requested process or group."
1378 msgstr ""
1379
1380 #. type: TP
1381 #: build/C/man7/ddp.7:215 build/C/man7/ip.7:1170 build/C/man7/tcp.7:1233 build/C/man7/unix.7:455
1382 #, no-wrap
1383 msgid "B<EPIPE>"
1384 msgstr ""
1385
1386 #. type: Plain text
1387 #: build/C/man7/ddp.7:218 build/C/man7/ip.7:1173
1388 msgid "The connection was unexpectedly closed or shut down by the other end."
1389 msgstr ""
1390
1391 #. type: TP
1392 #: build/C/man7/ddp.7:218 build/C/man7/ip.7:1173 build/C/man7/unix.7:477
1393 #, no-wrap
1394 msgid "B<ESOCKTNOSUPPORT>"
1395 msgstr ""
1396
1397 #. type: Plain text
1398 #: build/C/man7/ddp.7:221
1399 msgid "The socket was unconfigured, or an unknown socket type was requested."
1400 msgstr ""
1401
1402 #. type: Plain text
1403 #: build/C/man7/ddp.7:226
1404 msgid ""
1405 "AppleTalk is supported by Linux 2.0 or higher.  The I</proc> interfaces "
1406 "exist since Linux 2.2."
1407 msgstr ""
1408
1409 #. type: Plain text
1410 #: build/C/man7/ddp.7:232
1411 msgid ""
1412 "Be very careful with the B<SO_BROADCAST> option - it is not privileged in "
1413 "Linux.  It is easy to overload the network with careless sending to "
1414 "broadcast addresses."
1415 msgstr ""
1416
1417 #. type: SS
1418 #: build/C/man7/ddp.7:232 build/C/man7/ip.7:1232 build/C/man7/packet.7:569
1419 #, no-wrap
1420 msgid "Compatibility"
1421 msgstr ""
1422
1423 #. type: Plain text
1424 #: build/C/man7/ddp.7:239
1425 msgid ""
1426 "The basic AppleTalk socket interface is compatible with B<netatalk> on "
1427 "BSD-derived systems.  Many BSD systems fail to check B<SO_BROADCAST> when "
1428 "sending broadcast frames; this can lead to compatibility problems."
1429 msgstr ""
1430
1431 #. type: Plain text
1432 #: build/C/man7/ddp.7:244
1433 msgid ""
1434 "The raw socket mode is unique to Linux and exists to support the alternative "
1435 "CAP package and AppleTalk monitoring tools more easily."
1436 msgstr ""
1437
1438 #. type: Plain text
1439 #: build/C/man7/ddp.7:246 build/C/man7/ip.7:1247
1440 msgid "There are too many inconsistent error values."
1441 msgstr ""
1442
1443 #. type: Plain text
1444 #: build/C/man7/ddp.7:249
1445 msgid ""
1446 "The ioctls used to configure routing tables, devices, AARP tables and other "
1447 "devices are not yet described."
1448 msgstr ""
1449
1450 #. type: Plain text
1451 #: build/C/man7/ddp.7:253
1452 msgid "B<recvmsg>(2), B<sendmsg>(2), B<capabilities>(7), B<socket>(7)"
1453 msgstr ""
1454
1455 #. type: TH
1456 #: build/C/man3/endian.3:28
1457 #, no-wrap
1458 msgid "ENDIAN"
1459 msgstr ""
1460
1461 #. type: TH
1462 #: 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
1463 #, no-wrap
1464 msgid "2010-09-10"
1465 msgstr ""
1466
1467 #. type: Plain text
1468 #: build/C/man3/endian.3:33
1469 msgid ""
1470 "htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, "
1471 "htobe64, htole64, be64toh, le64toh - convert values between host and "
1472 "big-/little-endian byte order"
1473 msgstr ""
1474
1475 #. type: Plain text
1476 #: build/C/man3/endian.3:37
1477 #, no-wrap
1478 msgid ""
1479 "B<#define _BSD_SOURCE>             /* See feature_test_macros(7) */\n"
1480 "B<#include E<lt>endian.hE<gt>>\n"
1481 msgstr ""
1482
1483 #. type: Plain text
1484 #: build/C/man3/endian.3:42
1485 #, no-wrap
1486 msgid ""
1487 "B<uint16_t htobe16(uint16_t >I<host_16bits>B<);>\n"
1488 "B<uint16_t htole16(uint16_t >I<host_16bits>B<);>\n"
1489 "B<uint16_t be16toh(uint16_t >I<big_endian_16bits>B<);>\n"
1490 "B<uint16_t le16toh(uint16_t >I<little_endian_16bits>B<);>\n"
1491 msgstr ""
1492
1493 #. type: Plain text
1494 #: build/C/man3/endian.3:47
1495 #, no-wrap
1496 msgid ""
1497 "B<uint32_t htobe32(uint32_t >I<host_32bits>B<);>\n"
1498 "B<uint32_t htole32(uint32_t >I<host_32bits>B<);>\n"
1499 "B<uint32_t be32toh(uint32_t >I<big_endian_32bits>B<);>\n"
1500 "B<uint32_t le32toh(uint32_t >I<little_endian_32bits>B<);>\n"
1501 msgstr ""
1502
1503 #. type: Plain text
1504 #: build/C/man3/endian.3:52
1505 #, no-wrap
1506 msgid ""
1507 "B<uint64_t htobe64(uint64_t >I<host_64bits>B<);>\n"
1508 "B<uint64_t htole64(uint64_t >I<host_64bits>B<);>\n"
1509 "B<uint64_t be64toh(uint64_t >I<big_endian_64bits>B<);>\n"
1510 "B<uint64_t le64toh(uint64_t >I<little_endian_64bits>B<);>\n"
1511 msgstr ""
1512
1513 #. type: Plain text
1514 #: build/C/man3/endian.3:57
1515 msgid ""
1516 "These functions convert the byte encoding of integer values from the byte "
1517 "order that the current CPU (the \"host\") uses, to and from little-endian "
1518 "and big-endian byte order."
1519 msgstr ""
1520
1521 #. type: Plain text
1522 #: build/C/man3/endian.3:62
1523 msgid ""
1524 "The number, I<nn>, in the name of each function indicates the size of "
1525 "integer handled by the function, either 16, 32, or 64 bits."
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man3/endian.3:65
1530 msgid ""
1531 "The functions with names of the form \"htobeI<nn>\" convert from host byte "
1532 "order to big-endian order."
1533 msgstr ""
1534
1535 #. type: Plain text
1536 #: build/C/man3/endian.3:68
1537 msgid ""
1538 "The functions with names of the form \"htoleI<nn>\" convert from host byte "
1539 "order to little-endian order."
1540 msgstr ""
1541
1542 #. type: Plain text
1543 #: build/C/man3/endian.3:71
1544 msgid ""
1545 "The functions with names of the form \"beI<nn>toh\" convert from big-endian "
1546 "order to host byte order."
1547 msgstr ""
1548
1549 #. type: Plain text
1550 #: build/C/man3/endian.3:74
1551 msgid ""
1552 "The functions with names of the form \"leI<nn>toh\" convert from "
1553 "little-endian order to host byte order."
1554 msgstr ""
1555
1556 #. type: Plain text
1557 #: build/C/man3/endian.3:76
1558 msgid "These functions were added to glibc in version 2.9."
1559 msgstr ""
1560
1561 #. type: Plain text
1562 #: build/C/man3/endian.3:91
1563 msgid ""
1564 "These functions are nonstandard.  Similar functions are present on the BSDs, "
1565 "where the required header file is I<E<lt>sys/endian.hE<gt>> instead of "
1566 "I<E<lt>endian.hE<gt>>.  Unfortunately, NetBSD, FreeBSD, and glibc haven't "
1567 "followed the original OpenBSD naming convention for these functions, whereby "
1568 "the I<nn> component always appears at the end of the function name (thus, "
1569 "for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs "
1570 "\"betoh32\" is \"be32toh\")."
1571 msgstr ""
1572
1573 #. type: Plain text
1574 #: build/C/man3/endian.3:99
1575 msgid ""
1576 "These functions are similar to the older B<byteorder>(3)  family of "
1577 "functions.  For example, B<be32toh>()  is identical to B<ntohl>()."
1578 msgstr ""
1579
1580 #. type: Plain text
1581 #: build/C/man3/endian.3:107
1582 msgid ""
1583 "The advantage of the B<byteorder>(3)  functions is that they are standard "
1584 "functions available on all UNIX systems.  On the other hand, the fact that "
1585 "they were designed for use in the context of TCP/IP means that they lack the "
1586 "64-bit and little-endian variants described in this page."
1587 msgstr ""
1588
1589 #. type: Plain text
1590 #: build/C/man3/endian.3:114
1591 msgid ""
1592 "The program below display the results of converting an integer from host "
1593 "byte order to both little-endian and big-endian byte order.  Since host byte "
1594 "order is either little-endian or big-endian, only one of these conversions "
1595 "will have an effect.  When we run this program on a little-endian system "
1596 "such as x86-32, we see the following:"
1597 msgstr ""
1598
1599 #. type: Plain text
1600 #: build/C/man3/endian.3:121
1601 #, no-wrap
1602 msgid ""
1603 "$ B<./a.out>\n"
1604 "x.u32 = 0x44332211\n"
1605 "htole32(x.u32) = 0x44332211\n"
1606 "htobe32(x.u32) = 0x11223344\n"
1607 msgstr ""
1608
1609 #. type: SS
1610 #: build/C/man3/endian.3:123 build/C/man3/getprotoent_r.3:162 build/C/man3/getservent_r.3:160 build/C/man3/inet.3:278 build/C/man3/inet_net_pton.3:331 build/C/man3/inet_pton.3:173
1611 #, no-wrap
1612 msgid "Program source"
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: build/C/man3/endian.3:130
1617 #, no-wrap
1618 msgid ""
1619 "#include E<lt>endian.hE<gt>\n"
1620 "#include E<lt>stdint.hE<gt>\n"
1621 "#include E<lt>stdio.hE<gt>\n"
1622 "#include E<lt>stdlib.hE<gt>\n"
1623 msgstr ""
1624
1625 #. type: Plain text
1626 #: build/C/man3/endian.3:138
1627 #, no-wrap
1628 msgid ""
1629 "int\n"
1630 "main(int argc, char *argv[])\n"
1631 "{\n"
1632 "    union {\n"
1633 "        uint32_t u32;\n"
1634 "        uint8_t arr[4];\n"
1635 "    } x;\n"
1636 msgstr ""
1637
1638 #. type: Plain text
1639 #: build/C/man3/endian.3:143
1640 #, no-wrap
1641 msgid ""
1642 "    x.arr[0] = 0x11;\t/* Lowest-address byte */\n"
1643 "    x.arr[1] = 0x22;\n"
1644 "    x.arr[2] = 0x33;\n"
1645 "    x.arr[3] = 0x44;\t/* Highest-address byte */\n"
1646 msgstr ""
1647
1648 #. type: Plain text
1649 #: build/C/man3/endian.3:147
1650 #, no-wrap
1651 msgid ""
1652 "    printf(\"x.u32 = 0x%x\\en\", x.u32);\n"
1653 "    printf(\"htole32(x.u32) = 0x%x\\en\", htole32(x.u32));\n"
1654 "    printf(\"htobe32(x.u32) = 0x%x\\en\", htobe32(x.u32));\n"
1655 msgstr ""
1656
1657 #. type: Plain text
1658 #: build/C/man3/endian.3:150 build/C/man3/getaddrinfo.3:827 build/C/man3/getprotoent_r.3:236 build/C/man3/getservent_r.3:240 build/C/man3/inet_net_pton.3:389 build/C/man3/inet_pton.3:214
1659 #, no-wrap
1660 msgid ""
1661 "    exit(EXIT_SUCCESS);\n"
1662 "}\n"
1663 msgstr ""
1664
1665 #. type: Plain text
1666 #: build/C/man3/endian.3:152
1667 msgid "B<byteorder>(3)"
1668 msgstr ""
1669
1670 #. type: TH
1671 #: build/C/man3/ether_aton.3:31
1672 #, no-wrap
1673 msgid "ETHER_ATON"
1674 msgstr ""
1675
1676 #. type: TH
1677 #: build/C/man3/ether_aton.3:31 build/C/man7/udplite.7:27
1678 #, no-wrap
1679 msgid "2014-07-08"
1680 msgstr ""
1681
1682 #. type: Plain text
1683 #: build/C/man3/ether_aton.3:35
1684 msgid ""
1685 "ether_aton, ether_ntoa, ether_ntohost, ether_hostton, ether_line, "
1686 "ether_ntoa_r, ether_aton_r - Ethernet address manipulation routines"
1687 msgstr ""
1688
1689 #. type: Plain text
1690 #: build/C/man3/ether_aton.3:38
1691 #, no-wrap
1692 msgid "B<#include E<lt>netinet/ether.hE<gt>>\n"
1693 msgstr ""
1694
1695 #. type: Plain text
1696 #: build/C/man3/ether_aton.3:40
1697 #, no-wrap
1698 msgid "B<char *ether_ntoa(const struct ether_addr *>I<addr>B<);>\n"
1699 msgstr ""
1700
1701 #. type: Plain text
1702 #: build/C/man3/ether_aton.3:42
1703 #, no-wrap
1704 msgid "B<struct ether_addr *ether_aton(const char *>I<asc>B<);>\n"
1705 msgstr ""
1706
1707 #. type: Plain text
1708 #: build/C/man3/ether_aton.3:44
1709 #, no-wrap
1710 msgid ""
1711 "B<int ether_ntohost(char *>I<hostname>B<, const struct ether_addr "
1712 "*>I<addr>B<);>\n"
1713 msgstr ""
1714
1715 #. type: Plain text
1716 #: build/C/man3/ether_aton.3:46
1717 #, no-wrap
1718 msgid ""
1719 "B<int ether_hostton(const char *>I<hostname>B<, struct ether_addr "
1720 "*>I<addr>B<);>\n"
1721 msgstr ""
1722
1723 #. type: Plain text
1724 #: build/C/man3/ether_aton.3:49
1725 #, no-wrap
1726 msgid ""
1727 "B<int ether_line(const char *>I<line>B<, struct ether_addr *>I<addr>B<,>\n"
1728 "B<               char *>I<hostname>B<);>\n"
1729 msgstr ""
1730
1731 #. type: Plain text
1732 #: build/C/man3/ether_aton.3:51 build/C/man3/gethostbyname.3:70
1733 #, no-wrap
1734 msgid "/* GNU extensions */\n"
1735 msgstr ""
1736
1737 #. type: Plain text
1738 #: build/C/man3/ether_aton.3:53
1739 #, no-wrap
1740 msgid ""
1741 "B<char *ether_ntoa_r(const struct ether_addr *>I<addr>B<, char "
1742 "*>I<buf>B<);>\n"
1743 msgstr ""
1744
1745 #. type: Plain text
1746 #: build/C/man3/ether_aton.3:56
1747 #, no-wrap
1748 msgid ""
1749 "B<struct ether_addr *ether_aton_r(const char *>I<asc>B<,>\n"
1750 "B<                                struct ether_addr *>I<addr>B<);>\n"
1751 msgstr ""
1752
1753 #. type: Plain text
1754 #: build/C/man3/ether_aton.3:67
1755 msgid ""
1756 "B<ether_aton>()  converts the 48-bit Ethernet host address I<asc> from the "
1757 "standard hex-digits-and-colons notation into binary data in network byte "
1758 "order and returns a pointer to it in a statically allocated buffer, which "
1759 "subsequent calls will overwrite.  B<ether_aton>()  returns NULL if the "
1760 "address is invalid."
1761 msgstr ""
1762
1763 #. type: Plain text
1764 #: build/C/man3/ether_aton.3:76
1765 msgid ""
1766 "The B<ether_ntoa>()  function converts the Ethernet host address I<addr> "
1767 "given in network byte order to a string in standard hex-digits-and-colons "
1768 "notation, omitting leading zeros.  The string is returned in a statically "
1769 "allocated buffer, which subsequent calls will overwrite."
1770 msgstr ""
1771
1772 #. type: Plain text
1773 #: build/C/man3/ether_aton.3:83
1774 msgid ""
1775 "The B<ether_ntohost>()  function maps an Ethernet address to the "
1776 "corresponding hostname in I</etc/ethers> and returns nonzero if it cannot be "
1777 "found."
1778 msgstr ""
1779
1780 #. type: Plain text
1781 #: build/C/man3/ether_aton.3:90
1782 msgid ""
1783 "The B<ether_hostton>()  function maps a hostname to the corresponding "
1784 "Ethernet address in I</etc/ethers> and returns nonzero if it cannot be "
1785 "found."
1786 msgstr ""
1787
1788 #. type: Plain text
1789 #: build/C/man3/ether_aton.3:102
1790 msgid ""
1791 "The B<ether_line>()  function parses a line in I</etc/ethers> format "
1792 "(ethernet address followed by whitespace followed by hostname; \\(aq#\\(aq "
1793 "introduces a comment) and returns an address and hostname pair, or nonzero "
1794 "if it cannot be parsed.  The buffer pointed to by I<hostname> must be "
1795 "sufficiently long, for example, have the same length as I<line>."
1796 msgstr ""
1797
1798 #. type: Plain text
1799 #: build/C/man3/ether_aton.3:113
1800 msgid ""
1801 "The functions B<ether_ntoa_r>()  and B<ether_aton_r>()  are reentrant "
1802 "thread-safe versions of B<ether_ntoa>()  and B<ether_aton>()  respectively, "
1803 "and do not use static buffers."
1804 msgstr ""
1805
1806 #. type: Plain text
1807 #: build/C/man3/ether_aton.3:119
1808 msgid "The structure I<ether_addr> is defined in I<E<lt>net/ethernet.hE<gt>> as:"
1809 msgstr ""
1810
1811 #. type: Plain text
1812 #: build/C/man3/ether_aton.3:125
1813 #, no-wrap
1814 msgid ""
1815 "struct ether_addr {\n"
1816 "    uint8_t ether_addr_octet[6];\n"
1817 "}\n"
1818 msgstr ""
1819
1820 #. type: Plain text
1821 #: build/C/man3/ether_aton.3:130
1822 msgid "For an explanation of the terms used in this section, see B<attributes>(7)."
1823 msgstr ""
1824
1825 #. type: tbl table
1826 #: build/C/man3/ether_aton.3:135
1827 #, no-wrap
1828 msgid "Interface\tAttribute\tValue\n"
1829 msgstr ""
1830
1831 #. type: tbl table
1832 #: build/C/man3/ether_aton.3:136 build/C/man3/ether_aton.3:140
1833 #, no-wrap
1834 msgid "T{\n"
1835 msgstr ""
1836
1837 #. type: tbl table
1838 #: build/C/man3/ether_aton.3:137
1839 #, no-wrap
1840 msgid "B<ether_aton>(),\n"
1841 msgstr ""
1842
1843 #. type: tbl table
1844 #: build/C/man3/ether_aton.3:138
1845 #, no-wrap
1846 msgid "B<ether_ntoa>()\n"
1847 msgstr ""
1848
1849 #. type: tbl table
1850 #: build/C/man3/ether_aton.3:139
1851 #, no-wrap
1852 msgid "T}\tThread safety\tMT-Unsafe\n"
1853 msgstr ""
1854
1855 #. type: tbl table
1856 #: build/C/man3/ether_aton.3:141
1857 #, no-wrap
1858 msgid "B<ether_ntohost>(),\n"
1859 msgstr ""
1860
1861 #. type: tbl table
1862 #: build/C/man3/ether_aton.3:142
1863 #, no-wrap
1864 msgid "B<ether_hostton>(),\n"
1865 msgstr ""
1866
1867 #. type: tbl table
1868 #: build/C/man3/ether_aton.3:143
1869 #, no-wrap
1870 msgid "B<ether_line>(),\n"
1871 msgstr ""
1872
1873 #. type: tbl table
1874 #: build/C/man3/ether_aton.3:144
1875 #, no-wrap
1876 msgid "B<ether_ntoa_r>(),\n"
1877 msgstr ""
1878
1879 #. type: tbl table
1880 #: build/C/man3/ether_aton.3:145
1881 #, no-wrap
1882 msgid "B<ether_aton_r>()\n"
1883 msgstr ""
1884
1885 #. type: tbl table
1886 #: build/C/man3/ether_aton.3:146
1887 #, no-wrap
1888 msgid "T}\tThread safety\tMT-Safe\n"
1889 msgstr ""
1890
1891 #. type: Plain text
1892 #: build/C/man3/ether_aton.3:151
1893 msgid "4.3BSD, SunOS."
1894 msgstr ""
1895
1896 #.  The fix was presumably commit c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7
1897 #.  which was in glibc 2.3
1898 #. type: Plain text
1899 #: build/C/man3/ether_aton.3:157
1900 msgid ""
1901 "In glibc 2.2.5 and earlier, the implementation of B<ether_line>()  is "
1902 "broken."
1903 msgstr ""
1904
1905 #. type: Plain text
1906 #: build/C/man3/ether_aton.3:158
1907 msgid "B<ethers>(5)"
1908 msgstr ""
1909
1910 #. type: TH
1911 #: build/C/man5/gai.conf.5:19
1912 #, no-wrap
1913 msgid "GAI.CONF"
1914 msgstr ""
1915
1916 #. type: TH
1917 #: build/C/man5/gai.conf.5:19 build/C/man5/nss.5:19
1918 #, no-wrap
1919 msgid "2013-02-13"
1920 msgstr ""
1921
1922 #. type: Plain text
1923 #: build/C/man5/gai.conf.5:22
1924 msgid "gai.conf - getaddrinfo(3) configuration file"
1925 msgstr ""
1926
1927 #. type: Plain text
1928 #: build/C/man5/gai.conf.5:36
1929 msgid ""
1930 "A call to B<getaddrinfo>(3)  might return multiple answers.  According to "
1931 "RFC\\ 3484 these answers must be sorted so that the answer with the highest "
1932 "success rate is first in the list.  The RFC provides an algorithm for the "
1933 "sorting.  The static rules are not always adequate, though.  For this "
1934 "reason, the RFC also requires that system administrators should have the "
1935 "possibility to dynamically change the sorting.  For the glibc "
1936 "implementation, this can be achieved with the I</etc/gai.conf> file."
1937 msgstr ""
1938
1939 #. type: Plain text
1940 #: build/C/man5/gai.conf.5:40
1941 msgid ""
1942 "Each line in the configuration file consists of a keyword and its "
1943 "parameters.  White spaces in any place are ignored.  Lines starting with "
1944 "\\(aq#\\(aq are comments and are ignored."
1945 msgstr ""
1946
1947 #. type: Plain text
1948 #: build/C/man5/gai.conf.5:42
1949 msgid "The keywords currently recognized are:"
1950 msgstr ""
1951
1952 #. type: TP
1953 #: build/C/man5/gai.conf.5:42
1954 #, no-wrap
1955 msgid "B<label> I<netmask> I<precedence>"
1956 msgstr ""
1957
1958 #. type: Plain text
1959 #: build/C/man5/gai.conf.5:51
1960 msgid ""
1961 "The value is added to the label table used in the RFC\\ 3484 sorting.  If "
1962 "any B<label> definition is present in the configuration file is present, the "
1963 "default table is not used.  All the label definitions of the default table "
1964 "which are to be maintained have to be duplicated.  Following the keyword, "
1965 "the line has to contain a network mask and a label value."
1966 msgstr ""
1967
1968 #. type: TP
1969 #: build/C/man5/gai.conf.5:51
1970 #, no-wrap
1971 msgid "B<precedence> I<netmask> I<precedence>"
1972 msgstr ""
1973
1974 #. type: Plain text
1975 #: build/C/man5/gai.conf.5:58
1976 msgid ""
1977 "This keyword is similar to B<label>, but instead the value is added to the "
1978 "precedence table as specified in RFC\\ 3484.  Once again, the presence of a "
1979 "single B<precedence> line in the configuration file causes the default table "
1980 "to not be used."
1981 msgstr ""
1982
1983 #. type: TP
1984 #: build/C/man5/gai.conf.5:58
1985 #, no-wrap
1986 msgid "B<reload> E<lt>B<yes>|B<no>E<gt>"
1987 msgstr ""
1988
1989 #. type: Plain text
1990 #: build/C/man5/gai.conf.5:67
1991 msgid ""
1992 "This keyword controls whether a process checks whether the configuration "
1993 "file has been changed since the last time it was read.  If the value is "
1994 "\"B<yes>\", the file is reread.  This might cause problems in multithreaded "
1995 "applications and is generally a bad idea.  The default is \"B<no>\"."
1996 msgstr ""
1997
1998 #. type: TP
1999 #: build/C/man5/gai.conf.5:67
2000 #, no-wrap
2001 msgid "B<scopev4> I<mask> I<value>"
2002 msgstr ""
2003
2004 #. type: Plain text
2005 #: build/C/man5/gai.conf.5:72
2006 msgid ""
2007 "Add another rule to the RFC\\ 3484 scope table for IPv4 address.  By "
2008 "default, the scope IDs described in section 3.2 in RFC\\ 3438 are used.  "
2009 "Changing these defaults should hardly ever be necessary."
2010 msgstr ""
2011
2012 #. type: SH
2013 #: build/C/man5/gai.conf.5:72 build/C/man3/getaddrinfo.3:593 build/C/man3/gethostbyname.3:307 build/C/man3/getnameinfo.3:197 build/C/man3/getnetent.3:141 build/C/man3/getprotoent.3:134 build/C/man3/getservent.3:153 build/C/man5/host.conf.5:180 build/C/man5/hosts.5:86 build/C/man5/hosts.equiv.5:69 build/C/man5/networks.5:70 build/C/man5/nss.5:98 build/C/man5/nsswitch.conf.5:298 build/C/man5/protocols.5:77 build/C/man5/resolv.conf.5:298 build/C/man3/resolver.3:267 build/C/man5/services.5:185 build/C/man3/setnetgrent.3:88 build/C/man7/udplite.7:126
2014 #, no-wrap
2015 msgid "FILES"
2016 msgstr ""
2017
2018 #. type: Plain text
2019 #: build/C/man5/gai.conf.5:74 build/C/man3/getaddrinfo.3:595
2020 msgid "I</etc/gai.conf>"
2021 msgstr ""
2022
2023 #. type: Plain text
2024 #: build/C/man5/gai.conf.5:77
2025 msgid ""
2026 "The default table according to RFC\\ 3484 would be specified with the "
2027 "following configuration file:"
2028 msgstr ""
2029
2030 #. type: Plain text
2031 #: build/C/man5/gai.conf.5:89
2032 #, no-wrap
2033 msgid ""
2034 "label  ::1/128       0\n"
2035 "label  ::/0          1\n"
2036 "label  2002::/16     2\n"
2037 "label ::/96          3\n"
2038 "label ::ffff:0:0/96  4\n"
2039 "precedence  ::1/128       50\n"
2040 "precedence  ::/0          40\n"
2041 "precedence  2002::/16     30\n"
2042 "precedence ::/96          20\n"
2043 "precedence ::ffff:0:0/96  10\n"
2044 msgstr ""
2045
2046 #. type: Plain text
2047 #: build/C/man5/gai.conf.5:95
2048 msgid "B<getaddrinfo>(3), RFC\\ 3484"
2049 msgstr ""
2050
2051 #. type: TH
2052 #: build/C/man3/getaddrinfo.3:44
2053 #, no-wrap
2054 msgid "GETADDRINFO"
2055 msgstr ""
2056
2057 #. type: TH
2058 #: build/C/man3/getaddrinfo.3:44
2059 #, no-wrap
2060 msgid "2014-04-06"
2061 msgstr ""
2062
2063 #. type: Plain text
2064 #: build/C/man3/getaddrinfo.3:48
2065 msgid ""
2066 "getaddrinfo, freeaddrinfo, gai_strerror - network address and service "
2067 "translation"
2068 msgstr ""
2069
2070 #. type: Plain text
2071 #: build/C/man3/getaddrinfo.3:53 build/C/man3/getipnodebyname.3:35
2072 #, no-wrap
2073 msgid ""
2074 "B<#include E<lt>sys/types.hE<gt>>\n"
2075 "B<#include E<lt>sys/socket.hE<gt>>\n"
2076 "B<#include E<lt>netdb.hE<gt>>\n"
2077 msgstr ""
2078
2079 #. type: Plain text
2080 #: build/C/man3/getaddrinfo.3:57
2081 #, no-wrap
2082 msgid ""
2083 "B<int getaddrinfo(const char *>I<node>B<, const char *>I<service>B<,>\n"
2084 "B<                const struct addrinfo *>I<hints>B<,>\n"
2085 "B<                struct addrinfo **>I<res>B<);>\n"
2086 msgstr ""
2087
2088 #. type: Plain text
2089 #: build/C/man3/getaddrinfo.3:59
2090 #, no-wrap
2091 msgid "B<void freeaddrinfo(struct addrinfo *>I<res>B<);>\n"
2092 msgstr ""
2093
2094 #. type: Plain text
2095 #: build/C/man3/getaddrinfo.3:61
2096 #, no-wrap
2097 msgid "B<const char *gai_strerror(int >I<errcode>B<);>\n"
2098 msgstr ""
2099
2100 #. type: Plain text
2101 #: build/C/man3/getaddrinfo.3:66 build/C/man3/gethostbyname.3:93 build/C/man3/getnameinfo.3:26 build/C/man3/getnetent_r.3:52 build/C/man3/getprotoent_r.3:49 build/C/man3/getservent_r.3:49 build/C/man3/inet.3:70 build/C/man3/inet_net_pton.3:45 build/C/man3/rcmd.3:81 build/C/man3/setnetgrent.3:34
2102 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2103 msgstr ""
2104
2105 #. type: Plain text
2106 #: build/C/man3/getaddrinfo.3:72
2107 msgid "B<getaddrinfo>(), B<freeaddrinfo>(), B<gai_strerror>():"
2108 msgstr ""
2109
2110 #. type: Plain text
2111 #: build/C/man3/getaddrinfo.3:74
2112 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2113 msgstr ""
2114
2115 #.  .BR getipnodebyname (3),
2116 #.  .BR getipnodebyaddr (3),
2117 #. type: Plain text
2118 #: build/C/man3/getaddrinfo.3:101
2119 msgid ""
2120 "Given I<node> and I<service>, which identify an Internet host and a service, "
2121 "B<getaddrinfo>()  returns one or more I<addrinfo> structures, each of which "
2122 "contains an Internet address that can be specified in a call to B<bind>(2)  "
2123 "or B<connect>(2).  The B<getaddrinfo>()  function combines the functionality "
2124 "provided by the B<gethostbyname>(3)  and B<getservbyname>(3)  functions into "
2125 "a single interface, but unlike the latter functions, B<getaddrinfo>()  is "
2126 "reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies."
2127 msgstr ""
2128
2129 #. type: Plain text
2130 #: build/C/man3/getaddrinfo.3:107
2131 msgid ""
2132 "The I<addrinfo> structure used by B<getaddrinfo>()  contains the following "
2133 "fields:"
2134 msgstr ""
2135
2136 #. type: Plain text
2137 #: build/C/man3/getaddrinfo.3:120
2138 #, no-wrap
2139 msgid ""
2140 "struct addrinfo {\n"
2141 "    int              ai_flags;\n"
2142 "    int              ai_family;\n"
2143 "    int              ai_socktype;\n"
2144 "    int              ai_protocol;\n"
2145 "    socklen_t        ai_addrlen;\n"
2146 "    struct sockaddr *ai_addr;\n"
2147 "    char            *ai_canonname;\n"
2148 "    struct addrinfo *ai_next;\n"
2149 "};\n"
2150 msgstr ""
2151
2152 #. type: Plain text
2153 #: build/C/man3/getaddrinfo.3:142
2154 msgid ""
2155 "The I<hints> argument points to an I<addrinfo> structure that specifies "
2156 "criteria for selecting the socket address structures returned in the list "
2157 "pointed to by I<res>.  If I<hints> is not NULL it points to an I<addrinfo> "
2158 "structure whose I<ai_family>, I<ai_socktype>, and I<ai_protocol> specify "
2159 "criteria that limit the set of socket addresses returned by "
2160 "B<getaddrinfo>(), as follows:"
2161 msgstr ""
2162
2163 #. type: TP
2164 #: build/C/man3/getaddrinfo.3:142
2165 #, no-wrap
2166 msgid "I<ai_family>"
2167 msgstr ""
2168
2169 #. type: Plain text
2170 #: build/C/man3/getaddrinfo.3:158
2171 msgid ""
2172 "This field specifies the desired address family for the returned addresses.  "
2173 "Valid values for this field include B<AF_INET> and B<AF_INET6>.  The value "
2174 "B<AF_UNSPEC> indicates that B<getaddrinfo>()  should return socket addresses "
2175 "for any address family (either IPv4 or IPv6, for example) that can be used "
2176 "with I<node> and I<service>."
2177 msgstr ""
2178
2179 #. type: TP
2180 #: build/C/man3/getaddrinfo.3:158
2181 #, no-wrap
2182 msgid "I<ai_socktype>"
2183 msgstr ""
2184
2185 #. type: Plain text
2186 #: build/C/man3/getaddrinfo.3:167
2187 msgid ""
2188 "This field specifies the preferred socket type, for example B<SOCK_STREAM> "
2189 "or B<SOCK_DGRAM>.  Specifying 0 in this field indicates that socket "
2190 "addresses of any type can be returned by B<getaddrinfo>()."
2191 msgstr ""
2192
2193 #. type: TP
2194 #: build/C/man3/getaddrinfo.3:167
2195 #, no-wrap
2196 msgid "I<ai_protocol>"
2197 msgstr ""
2198
2199 #. type: Plain text
2200 #: build/C/man3/getaddrinfo.3:173
2201 msgid ""
2202 "This field specifies the protocol for the returned socket addresses.  "
2203 "Specifying 0 in this field indicates that socket addresses with any protocol "
2204 "can be returned by B<getaddrinfo>()."
2205 msgstr ""
2206
2207 #. type: TP
2208 #: build/C/man3/getaddrinfo.3:173
2209 #, no-wrap
2210 msgid "I<ai_flags>"
2211 msgstr ""
2212
2213 #. type: Plain text
2214 #: build/C/man3/getaddrinfo.3:177
2215 msgid ""
2216 "This field specifies additional options, described below.  Multiple flags "
2217 "are specified by bitwise OR-ing them together."
2218 msgstr ""
2219
2220 #. type: Plain text
2221 #: build/C/man3/getaddrinfo.3:181
2222 msgid ""
2223 "All the other fields in the structure pointed to by I<hints> must contain "
2224 "either 0 or a null pointer, as appropriate."
2225 msgstr ""
2226
2227 #. type: Plain text
2228 #: build/C/man3/getaddrinfo.3:216
2229 msgid ""
2230 "Specifying I<hints> as NULL is equivalent to setting I<ai_socktype> and "
2231 "I<ai_protocol> to 0; I<ai_family> to B<AF_UNSPEC>; and I<ai_flags> to "
2232 "B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)>.  (POSIX specifies different defaults "
2233 "for I<ai_flags>; see NOTES.)  I<node> specifies either a numerical network "
2234 "address (for IPv4, numbers-and-dots notation as supported by "
2235 "B<inet_aton>(3); for IPv6, hexadecimal string format as supported by "
2236 "B<inet_pton>(3)), or a network hostname, whose network addresses are looked "
2237 "up and resolved.  If I<hints.ai_flags> contains the B<AI_NUMERICHOST> flag, "
2238 "then I<node> must be a numerical network address.  The B<AI_NUMERICHOST> "
2239 "flag suppresses any potentially lengthy network host address lookups."
2240 msgstr ""
2241
2242 #. type: Plain text
2243 #: build/C/man3/getaddrinfo.3:241
2244 msgid ""
2245 "If the B<AI_PASSIVE> flag is specified in I<hints.ai_flags>, and I<node> is "
2246 "NULL, then the returned socket addresses will be suitable for B<bind>(2)ing "
2247 "a socket that will B<accept>(2)  connections.  The returned socket address "
2248 "will contain the \"wildcard address\" (B<INADDR_ANY> for IPv4 addresses, "
2249 "B<IN6ADDR_ANY_INIT> for IPv6 address).  The wildcard address is used by "
2250 "applications (typically servers)  that intend to accept connections on any "
2251 "of the hosts's network addresses.  If I<node> is not NULL, then the "
2252 "B<AI_PASSIVE> flag is ignored."
2253 msgstr ""
2254
2255 #. type: Plain text
2256 #: build/C/man3/getaddrinfo.3:261
2257 msgid ""
2258 "If the B<AI_PASSIVE> flag is not set in I<hints.ai_flags>, then the returned "
2259 "socket addresses will be suitable for use with B<connect>(2), B<sendto>(2), "
2260 "or B<sendmsg>(2).  If I<node> is NULL, then the network address will be set "
2261 "to the loopback interface address (B<INADDR_LOOPBACK> for IPv4 addresses, "
2262 "B<IN6ADDR_LOOPBACK_INIT> for IPv6 address); this is used by applications "
2263 "that intend to communicate with peers running on the same host."
2264 msgstr ""
2265
2266 #. type: Plain text
2267 #: build/C/man3/getaddrinfo.3:284
2268 msgid ""
2269 "I<service> sets the port in each returned address structure.  If this "
2270 "argument is a service name (see B<services>(5)), it is translated to the "
2271 "corresponding port number.  This argument can also be specified as a decimal "
2272 "number, which is simply converted to binary.  If I<service> is NULL, then "
2273 "the port number of the returned socket addresses will be left "
2274 "uninitialized.  If B<AI_NUMERICSERV> is specified in I<hints.ai_flags> and "
2275 "I<service> is not NULL, then I<service> must point to a string containing a "
2276 "numeric port number.  This flag is used to inhibit the invocation of a name "
2277 "resolution service in cases where it is known not to be required."
2278 msgstr ""
2279
2280 #. type: Plain text
2281 #: build/C/man3/getaddrinfo.3:290
2282 msgid "Either I<node> or I<service>, but not both, may be NULL."
2283 msgstr ""
2284
2285 #. type: Plain text
2286 #: build/C/man3/getaddrinfo.3:306
2287 msgid ""
2288 "The B<getaddrinfo>()  function allocates and initializes a linked list of "
2289 "I<addrinfo> structures, one for each network address that matches I<node> "
2290 "and I<service>, subject to any restrictions imposed by I<hints>, and returns "
2291 "a pointer to the start of the list in I<res>.  The items in the linked list "
2292 "are linked by the I<ai_next> field."
2293 msgstr ""
2294
2295 #. type: Plain text
2296 #: build/C/man3/getaddrinfo.3:328
2297 msgid ""
2298 "There are several reasons why the linked list may have more than one "
2299 "I<addrinfo> structure, including: the network host is multihomed, accessible "
2300 "over multiple protocols (e.g., both B<AF_INET> and B<AF_INET6>); or the same "
2301 "service is available from multiple socket types (one B<SOCK_STREAM> address "
2302 "and another B<SOCK_DGRAM> address, for example).  Normally, the application "
2303 "should try using the addresses in the order in which they are returned.  The "
2304 "sorting function used within B<getaddrinfo>()  is defined in RFC\\ 3484; the "
2305 "order can be tweaked for a particular system by editing I</etc/gai.conf> "
2306 "(available since glibc 2.5)."
2307 msgstr ""
2308
2309 #.  In glibc prior to 2.3.4, the ai_canonname of each addrinfo
2310 #.  structure was set pointing to the canonical name; that was
2311 #.  more than POSIX.1-2001 specified, or other implementations provided.
2312 #.  MTK, Aug 05
2313 #. type: Plain text
2314 #: build/C/man3/getaddrinfo.3:343
2315 msgid ""
2316 "If I<hints.ai_flags> includes the B<AI_CANONNAME> flag, then the "
2317 "I<ai_canonname> field of the first of the I<addrinfo> structures in the "
2318 "returned list is set to point to the official name of the host."
2319 msgstr ""
2320
2321 #. type: Plain text
2322 #: build/C/man3/getaddrinfo.3:347
2323 msgid ""
2324 "The remaining fields of each returned I<addrinfo> structure are initialized "
2325 "as follows:"
2326 msgstr ""
2327
2328 #. type: IP
2329 #: build/C/man3/getaddrinfo.3:347 build/C/man3/getaddrinfo.3:370 build/C/man3/getaddrinfo_a.3:191 build/C/man3/getaddrinfo_a.3:195 build/C/man3/getaddrinfo_a.3:197 build/C/man3/inet_net_pton.3:207 build/C/man3/inet_net_pton.3:213 build/C/man3/inet_net_pton.3:220 build/C/man3/inet_net_pton.3:227 build/C/man3/inet_net_pton.3:234 build/C/man7/ip.7:1001 build/C/man7/ip.7:1004 build/C/man7/ip.7:1007 build/C/man7/ip.7:1010 build/C/man5/nsswitch.conf.5:144 build/C/man5/nsswitch.conf.5:148 build/C/man7/unix.7:95 build/C/man7/unix.7:120 build/C/man7/unix.7:136 build/C/man7/unix.7:162 build/C/man7/unix.7:166 build/C/man7/unix.7:170
2330 #, no-wrap
2331 msgid "*"
2332 msgstr ""
2333
2334 #. type: Plain text
2335 #: build/C/man3/getaddrinfo.3:370
2336 msgid ""
2337 "The I<ai_family>, I<ai_socktype>, and I<ai_protocol> fields return the "
2338 "socket creation parameters (i.e., these fields have the same meaning as the "
2339 "corresponding arguments of B<socket>(2)).  For example, I<ai_family> might "
2340 "return B<AF_INET> or B<AF_INET6>; I<ai_socktype> might return B<SOCK_DGRAM> "
2341 "or B<SOCK_STREAM>; and I<ai_protocol> returns the protocol for the socket."
2342 msgstr ""
2343
2344 #. type: Plain text
2345 #: build/C/man3/getaddrinfo.3:377
2346 msgid ""
2347 "A pointer to the socket address is placed in the I<ai_addr> field, and the "
2348 "length of the socket address, in bytes, is placed in the I<ai_addrlen> "
2349 "field."
2350 msgstr ""
2351
2352 #. type: Plain text
2353 #: build/C/man3/getaddrinfo.3:396
2354 msgid ""
2355 "If I<hints.ai_flags> includes the B<AI_ADDRCONFIG> flag, then IPv4 addresses "
2356 "are returned in the list pointed to by I<res> only if the local system has "
2357 "at least one IPv4 address configured, and IPv6 addresses are returned only "
2358 "if the local system has at least one IPv6 address configured.  The loopback "
2359 "address is not considered for this case as valid as a configured address.  "
2360 "This flag is useful on, for example, IPv4-only systems, to ensure that "
2361 "B<getaddrinfo>()  does not return IPv6 socket addresses that would always "
2362 "fail in B<connect>(2)  or B<bind>(2)."
2363 msgstr ""
2364
2365 #. type: Plain text
2366 #: build/C/man3/getaddrinfo.3:421
2367 msgid ""
2368 "If I<hints.ai_flags> specifies the B<AI_V4MAPPED> flag, and "
2369 "I<hints.ai_family> was specified as B<AF_INET6>, and no matching IPv6 "
2370 "addresses could be found, then return IPv4-mapped IPv6 addresses in the list "
2371 "pointed to by I<res>.  If both B<AI_V4MAPPED> and B<AI_ALL> are specified in "
2372 "I<hints.ai_flags>, then return both IPv6 and IPv4-mapped IPv6 addresses in "
2373 "the list pointed to by I<res>.  B<AI_ALL> is ignored if B<AI_V4MAPPED> is "
2374 "not also specified."
2375 msgstr ""
2376
2377 #. type: Plain text
2378 #: build/C/man3/getaddrinfo.3:427
2379 msgid ""
2380 "The B<freeaddrinfo>()  function frees the memory that was allocated for the "
2381 "dynamically allocated linked list I<res>."
2382 msgstr ""
2383
2384 #. type: SS
2385 #: build/C/man3/getaddrinfo.3:427
2386 #, no-wrap
2387 msgid "Extensions to getaddrinfo() for Internationalized Domain Names"
2388 msgstr ""
2389
2390 #. type: Plain text
2391 #: build/C/man3/getaddrinfo.3:436
2392 msgid ""
2393 "Starting with glibc 2.3.4, B<getaddrinfo>()  has been extended to "
2394 "selectively allow the incoming and outgoing hostnames to be transparently "
2395 "converted to and from the Internationalized Domain Name (IDN) format (see "
2396 "RFC 3490, I<Internationalizing Domain Names in Applications (IDNA)>).  Four "
2397 "new flags are defined:"
2398 msgstr ""
2399
2400 #. type: TP
2401 #: build/C/man3/getaddrinfo.3:436
2402 #, no-wrap
2403 msgid "B<AI_IDN>"
2404 msgstr ""
2405
2406 #. type: Plain text
2407 #: build/C/man3/getaddrinfo.3:442
2408 msgid ""
2409 "If this flag is specified, then the node name given in I<node> is converted "
2410 "to IDN format if necessary.  The source encoding is that of the current "
2411 "locale."
2412 msgstr ""
2413
2414 #.  Implementation Detail:
2415 #.  To minimize effects on system performance the implementation might
2416 #.  want to check whether the input string contains any non-ASCII
2417 #.  characters.  If there are none the IDN step can be skipped completely.
2418 #.  On systems which allow not-ASCII safe encodings for a locale this
2419 #.  might be a problem.
2420 #. type: Plain text
2421 #: build/C/man3/getaddrinfo.3:454
2422 msgid ""
2423 "If the input name contains non-ASCII characters, then the IDN encoding is "
2424 "used.  Those parts of the node name (delimited by dots) that contain "
2425 "non-ASCII characters are encoded using ASCII Compatible Encoding (ACE)  "
2426 "before being passed to the name resolution functions."
2427 msgstr ""
2428
2429 #. type: TP
2430 #: build/C/man3/getaddrinfo.3:454
2431 #, no-wrap
2432 msgid "B<AI_CANONIDN>"
2433 msgstr ""
2434
2435 #. type: Plain text
2436 #: build/C/man3/getaddrinfo.3:466
2437 msgid ""
2438 "After a successful name lookup, and if the B<AI_CANONNAME> flag was "
2439 "specified, B<getaddrinfo>()  will return the canonical name of the node "
2440 "corresponding to the I<addrinfo> structure value passed back.  The return "
2441 "value is an exact copy of the value returned by the name resolution "
2442 "function."
2443 msgstr ""
2444
2445 #
2446 #. Implementation Detail:
2447 #. If no component of the returned name starts with xn\-\- the IDN
2448 #. step can be skipped, therefore avoiding unnecessary slowdowns.
2449 #. type: Plain text
2450 #: build/C/man3/getaddrinfo.3:479
2451 msgid ""
2452 "If the name is encoded using ACE, then it will contain the I<xn--> prefix "
2453 "for one or more components of the name.  To convert these components into a "
2454 "readable form the B<AI_CANONIDN> flag can be passed in addition to "
2455 "B<AI_CANONNAME>.  The resulting string is encoded using the current locale's "
2456 "encoding."
2457 msgstr ""
2458
2459 #. type: TP
2460 #: build/C/man3/getaddrinfo.3:479
2461 #, no-wrap
2462 msgid "B<AI_IDN_ALLOW_UNASSIGNED>, B<AI_IDN_USE_STD3_ASCII_RULES>"
2463 msgstr ""
2464
2465 #. type: Plain text
2466 #: build/C/man3/getaddrinfo.3:486 build/C/man3/getnameinfo.3:139
2467 msgid ""
2468 "Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned "
2469 "Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make "
2470 "sure it is a STD3 conforming hostname)  flags respectively to be used in the "
2471 "IDNA handling."
2472 msgstr ""
2473
2474 #. type: SH
2475 #: build/C/man3/getaddrinfo.3:486 build/C/man3/getaddrinfo_a.3:242 build/C/man3/gethostbyname.3:280 build/C/man3/getipnodebyname.3:186 build/C/man3/getnameinfo.3:139 build/C/man3/getnetent.3:130 build/C/man3/getnetent_r.3:118 build/C/man2/getpeername.2:68 build/C/man3/getprotoent.3:123 build/C/man3/getprotoent_r.3:108 build/C/man3/getservent.3:142 build/C/man3/getservent_r.3:107 build/C/man3/inet_net_pton.3:130 build/C/man3/inet_ntop.3:83 build/C/man3/inet_pton.3:116 build/C/man3/rcmd.3:239 build/C/man3/resolver.3:245 build/C/man3/setnetgrent.3:86 build/C/man2/shutdown.2:69
2476 #, no-wrap
2477 msgid "RETURN VALUE"
2478 msgstr ""
2479
2480 #.  FIXME glibc defines the following additional errors, some which
2481 #.  can probably be returned by getaddrinfo(); they need to
2482 #.  be documented.
2483 #.  #ifdef __USE_GNU
2484 #.  #define EAI_INPROGRESS  -100  /* Processing request in progress.  */
2485 #.  #define EAI_CANCELED    -101  /* Request canceled.  */
2486 #.  #define EAI_NOTCANCELED -102  /* Request not canceled.  */
2487 #.  #define EAI_ALLDONE     -103  /* All requests done.  */
2488 #.  #define EAI_INTR        -104  /* Interrupted by a signal.  */
2489 #.  #define EAI_IDN_ENCODE  -105  /* IDN encoding failed.  */
2490 #.  #endif
2491 #. type: Plain text
2492 #: build/C/man3/getaddrinfo.3:500
2493 msgid ""
2494 "B<getaddrinfo>()  returns 0 if it succeeds, or one of the following nonzero "
2495 "error codes:"
2496 msgstr ""
2497
2498 #. type: TP
2499 #: build/C/man3/getaddrinfo.3:500
2500 #, no-wrap
2501 msgid "B<EAI_ADDRFAMILY>"
2502 msgstr ""
2503
2504 #.  Not in SUSv3
2505 #. type: Plain text
2506 #: build/C/man3/getaddrinfo.3:505
2507 msgid ""
2508 "The specified network host does not have any network addresses in the "
2509 "requested address family."
2510 msgstr ""
2511
2512 #. type: TP
2513 #: build/C/man3/getaddrinfo.3:505 build/C/man3/getaddrinfo_a.3:247 build/C/man3/getaddrinfo_a.3:264 build/C/man3/getnameinfo.3:155
2514 #, no-wrap
2515 msgid "B<EAI_AGAIN>"
2516 msgstr ""
2517
2518 #. type: Plain text
2519 #: build/C/man3/getaddrinfo.3:509
2520 msgid "The name server returned a temporary failure indication.  Try again later."
2521 msgstr ""
2522
2523 #. type: TP
2524 #: build/C/man3/getaddrinfo.3:509 build/C/man3/getnameinfo.3:159
2525 #, no-wrap
2526 msgid "B<EAI_BADFLAGS>"
2527 msgstr ""
2528
2529 #. type: Plain text
2530 #: build/C/man3/getaddrinfo.3:519
2531 msgid ""
2532 "I<hints.ai_flags> contains invalid flags; or, I<hints.ai_flags> included "
2533 "B<AI_CANONNAME> and I<name> was NULL."
2534 msgstr ""
2535
2536 #. type: TP
2537 #: build/C/man3/getaddrinfo.3:519 build/C/man3/getnameinfo.3:164
2538 #, no-wrap
2539 msgid "B<EAI_FAIL>"
2540 msgstr ""
2541
2542 #. type: Plain text
2543 #: build/C/man3/getaddrinfo.3:522
2544 msgid "The name server returned a permanent failure indication."
2545 msgstr ""
2546
2547 #. type: TP
2548 #: build/C/man3/getaddrinfo.3:522 build/C/man3/getnameinfo.3:167
2549 #, no-wrap
2550 msgid "B<EAI_FAMILY>"
2551 msgstr ""
2552
2553 #. type: Plain text
2554 #: build/C/man3/getaddrinfo.3:525
2555 msgid "The requested address family is not supported."
2556 msgstr ""
2557
2558 #. type: TP
2559 #: build/C/man3/getaddrinfo.3:525 build/C/man3/getaddrinfo_a.3:252 build/C/man3/getnameinfo.3:171
2560 #, no-wrap
2561 msgid "B<EAI_MEMORY>"
2562 msgstr ""
2563
2564 #. type: Plain text
2565 #: build/C/man3/getaddrinfo.3:528 build/C/man3/getaddrinfo_a.3:255 build/C/man3/getnameinfo.3:174 build/C/man7/unix.7:444
2566 msgid "Out of memory."
2567 msgstr ""
2568
2569 #. type: TP
2570 #: build/C/man3/getaddrinfo.3:528
2571 #, no-wrap
2572 msgid "B<EAI_NODATA>"
2573 msgstr ""
2574
2575 #.  Not in SUSv3
2576 #. type: Plain text
2577 #: build/C/man3/getaddrinfo.3:533
2578 msgid ""
2579 "The specified network host exists, but does not have any network addresses "
2580 "defined."
2581 msgstr ""
2582
2583 #. type: TP
2584 #: build/C/man3/getaddrinfo.3:533 build/C/man3/getnameinfo.3:174
2585 #, no-wrap
2586 msgid "B<EAI_NONAME>"
2587 msgstr ""
2588
2589 #. type: Plain text
2590 #: build/C/man3/getaddrinfo.3:550
2591 msgid ""
2592 "The I<node> or I<service> is not known; or both I<node> and I<service> are "
2593 "NULL; or B<AI_NUMERICSERV> was specified in I<hints.ai_flags> and I<service> "
2594 "was not a numeric port-number string."
2595 msgstr ""
2596
2597 #. type: TP
2598 #: build/C/man3/getaddrinfo.3:550
2599 #, no-wrap
2600 msgid "B<EAI_SERVICE>"
2601 msgstr ""
2602
2603 #. type: Plain text
2604 #: build/C/man3/getaddrinfo.3:571
2605 msgid ""
2606 "The requested service is not available for the requested socket type.  It "
2607 "may be available through another socket type.  For example, this error could "
2608 "occur if I<service> was \"shell\" (a service available only on stream "
2609 "sockets), and either I<hints.ai_protocol> was B<IPPROTO_UDP>, or "
2610 "I<hints.ai_socktype> was B<SOCK_DGRAM>; or the error could occur if "
2611 "I<service> was not NULL, and I<hints.ai_socktype> was B<SOCK_RAW> (a socket "
2612 "type that does not support the concept of services)."
2613 msgstr ""
2614
2615 #. type: TP
2616 #: build/C/man3/getaddrinfo.3:571
2617 #, no-wrap
2618 msgid "B<EAI_SOCKTYPE>"
2619 msgstr ""
2620
2621 #. type: Plain text
2622 #: build/C/man3/getaddrinfo.3:583
2623 msgid ""
2624 "The requested socket type is not supported.  This could occur, for example, "
2625 "if I<hints.ai_socktype> and I<hints.ai_protocol> are inconsistent (e.g., "
2626 "B<SOCK_DGRAM> and B<IPPROTO_TCP>, respectively)."
2627 msgstr ""
2628
2629 #. type: TP
2630 #: build/C/man3/getaddrinfo.3:583 build/C/man3/getaddrinfo_a.3:255 build/C/man3/getnameinfo.3:187
2631 #, no-wrap
2632 msgid "B<EAI_SYSTEM>"
2633 msgstr ""
2634
2635 #. type: Plain text
2636 #: build/C/man3/getaddrinfo.3:588
2637 msgid "Other system error, check I<errno> for details."
2638 msgstr ""
2639
2640 #. type: Plain text
2641 #: build/C/man3/getaddrinfo.3:593
2642 msgid ""
2643 "The B<gai_strerror>()  function translates these error codes to a human "
2644 "readable string, suitable for error reporting."
2645 msgstr ""
2646
2647 #. type: Plain text
2648 #: build/C/man3/getaddrinfo.3:600
2649 msgid "POSIX.1-2001.  The B<getaddrinfo>()  function is documented in RFC\\ 2553."
2650 msgstr ""
2651
2652 #. type: Plain text
2653 #: build/C/man3/getaddrinfo.3:605
2654 msgid ""
2655 "B<getaddrinfo>()  supports the I<address>B<%>I<scope-id> notation for "
2656 "specifying the IPv6 scope-ID."
2657 msgstr ""
2658
2659 #. type: Plain text
2660 #: build/C/man3/getaddrinfo.3:613
2661 msgid ""
2662 "B<AI_ADDRCONFIG>, B<AI_ALL>, and B<AI_V4MAPPED> are available since glibc "
2663 "2.3.3.  B<AI_NUMERICSERV> is available since glibc 2.3.4."
2664 msgstr ""
2665
2666 #. type: Plain text
2667 #: build/C/man3/getaddrinfo.3:623
2668 msgid ""
2669 "According to POSIX.1-2001, specifying I<hints> as NULL should cause "
2670 "I<ai_flags> to be assumed as 0.  The GNU C library instead assumes a value "
2671 "of B<(AI_V4MAPPED\\ |\\ AI_ADDRCONFIG)> for this case, since this value is "
2672 "considered an improvement on the specification."
2673 msgstr ""
2674
2675 #.  getnameinfo.3 refers to this example
2676 #.  socket.2 refers to this example
2677 #.  bind.2 refers to this example
2678 #.  connect.2 refers to this example
2679 #.  recvfrom.2 refers to this example
2680 #.  sendto.2 refers to this example
2681 #. type: Plain text
2682 #: build/C/man3/getaddrinfo.3:637
2683 msgid ""
2684 "The following programs demonstrate the use of B<getaddrinfo>(), "
2685 "B<gai_strerror>(), B<freeaddrinfo>(), and B<getnameinfo>(3).  The programs "
2686 "are an echo server and client for UDP datagrams."
2687 msgstr ""
2688
2689 #. type: SS
2690 #: build/C/man3/getaddrinfo.3:637
2691 #, no-wrap
2692 msgid "Server program"
2693 msgstr ""
2694
2695 #. type: Plain text
2696 #: build/C/man3/getaddrinfo.3:647
2697 #, no-wrap
2698 msgid ""
2699 "#include E<lt>sys/types.hE<gt>\n"
2700 "#include E<lt>stdio.hE<gt>\n"
2701 "#include E<lt>stdlib.hE<gt>\n"
2702 "#include E<lt>unistd.hE<gt>\n"
2703 "#include E<lt>string.hE<gt>\n"
2704 "#include E<lt>sys/socket.hE<gt>\n"
2705 "#include E<lt>netdb.hE<gt>\n"
2706 msgstr ""
2707
2708 #. type: Plain text
2709 #: build/C/man3/getaddrinfo.3:649 build/C/man3/getaddrinfo.3:744
2710 #, no-wrap
2711 msgid "#define BUF_SIZE 500\n"
2712 msgstr ""
2713
2714 #. type: Plain text
2715 #: build/C/man3/getaddrinfo.3:660
2716 #, no-wrap
2717 msgid ""
2718 "int\n"
2719 "main(int argc, char *argv[])\n"
2720 "{\n"
2721 "    struct addrinfo hints;\n"
2722 "    struct addrinfo *result, *rp;\n"
2723 "    int sfd, s;\n"
2724 "    struct sockaddr_storage peer_addr;\n"
2725 "    socklen_t peer_addr_len;\n"
2726 "    ssize_t nread;\n"
2727 "    char buf[BUF_SIZE];\n"
2728 msgstr ""
2729
2730 #. type: Plain text
2731 #: build/C/man3/getaddrinfo.3:665
2732 #, no-wrap
2733 msgid ""
2734 "    if (argc != 2) {\n"
2735 "        fprintf(stderr, \"Usage: %s port\\en\", argv[0]);\n"
2736 "        exit(EXIT_FAILURE);\n"
2737 "    }\n"
2738 msgstr ""
2739
2740 #. type: Plain text
2741 #: build/C/man3/getaddrinfo.3:674
2742 #, no-wrap
2743 msgid ""
2744 "    memset(&hints, 0, sizeof(struct addrinfo));\n"
2745 "    hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */\n"
2746 "    hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
2747 "    hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */\n"
2748 "    hints.ai_protocol = 0;          /* Any protocol */\n"
2749 "    hints.ai_canonname = NULL;\n"
2750 "    hints.ai_addr = NULL;\n"
2751 "    hints.ai_next = NULL;\n"
2752 msgstr ""
2753
2754 #. type: Plain text
2755 #: build/C/man3/getaddrinfo.3:680
2756 #, no-wrap
2757 msgid ""
2758 "    s = getaddrinfo(NULL, argv[1], &hints, &result);\n"
2759 "    if (s != 0) {\n"
2760 "        fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n"
2761 "        exit(EXIT_FAILURE);\n"
2762 "    }\n"
2763 msgstr ""
2764
2765 #. type: Plain text
2766 #: build/C/man3/getaddrinfo.3:685
2767 #, no-wrap
2768 msgid ""
2769 "    /* getaddrinfo() returns a list of address structures.\n"
2770 "       Try each address until we successfully bind(2).\n"
2771 "       If socket(2) (or bind(2)) fails, we (close the socket\n"
2772 "       and) try the next address. */\n"
2773 msgstr ""
2774
2775 #. type: Plain text
2776 #: build/C/man3/getaddrinfo.3:691
2777 #, no-wrap
2778 msgid ""
2779 "    for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
2780 "        sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
2781 "                rp-E<gt>ai_protocol);\n"
2782 "        if (sfd == -1)\n"
2783 "            continue;\n"
2784 msgstr ""
2785
2786 #. type: Plain text
2787 #: build/C/man3/getaddrinfo.3:694
2788 #, no-wrap
2789 msgid ""
2790 "        if (bind(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) == 0)\n"
2791 "            break;                  /* Success */\n"
2792 msgstr ""
2793
2794 #. type: Plain text
2795 #: build/C/man3/getaddrinfo.3:697 build/C/man3/getaddrinfo.3:790
2796 #, no-wrap
2797 msgid ""
2798 "        close(sfd);\n"
2799 "    }\n"
2800 msgstr ""
2801
2802 #. type: Plain text
2803 #: build/C/man3/getaddrinfo.3:702
2804 #, no-wrap
2805 msgid ""
2806 "    if (rp == NULL) {               /* No address succeeded */\n"
2807 "        fprintf(stderr, \"Could not bind\\en\");\n"
2808 "        exit(EXIT_FAILURE);\n"
2809 "    }\n"
2810 msgstr ""
2811
2812 #. type: Plain text
2813 #: build/C/man3/getaddrinfo.3:704 build/C/man3/getaddrinfo.3:797
2814 #, no-wrap
2815 msgid "    freeaddrinfo(result);           /* No longer needed */\n"
2816 msgstr ""
2817
2818 #. type: Plain text
2819 #: build/C/man3/getaddrinfo.3:706
2820 #, no-wrap
2821 msgid "    /* Read datagrams and echo them back to sender */\n"
2822 msgstr ""
2823
2824 #. type: Plain text
2825 #: build/C/man3/getaddrinfo.3:713
2826 #, no-wrap
2827 msgid ""
2828 "    for (;;) {\n"
2829 "        peer_addr_len = sizeof(struct sockaddr_storage);\n"
2830 "        nread = recvfrom(sfd, buf, BUF_SIZE, 0,\n"
2831 "                (struct sockaddr *) &peer_addr, &peer_addr_len);\n"
2832 "        if (nread == -1)\n"
2833 "            continue;               /* Ignore failed request */\n"
2834 msgstr ""
2835
2836 #. type: Plain text
2837 #: build/C/man3/getaddrinfo.3:715
2838 #, no-wrap
2839 msgid "        char host[NI_MAXHOST], service[NI_MAXSERV];\n"
2840 msgstr ""
2841
2842 #. type: Plain text
2843 #: build/C/man3/getaddrinfo.3:724
2844 #, no-wrap
2845 msgid ""
2846 "        s = getnameinfo((struct sockaddr *) &peer_addr,\n"
2847 "                        peer_addr_len, host, NI_MAXHOST,\n"
2848 "                        service, NI_MAXSERV, NI_NUMERICSERV);\n"
2849 "       if (s == 0)\n"
2850 "            printf(\"Received %zd bytes from %s:%s\\en\",\n"
2851 "                    nread, host, service);\n"
2852 "        else\n"
2853 "            fprintf(stderr, \"getnameinfo: %s\\en\", gai_strerror(s));\n"
2854 msgstr ""
2855
2856 #. type: Plain text
2857 #: build/C/man3/getaddrinfo.3:731
2858 #, no-wrap
2859 msgid ""
2860 "        if (sendto(sfd, buf, nread, 0,\n"
2861 "                    (struct sockaddr *) &peer_addr,\n"
2862 "                    peer_addr_len) != nread)\n"
2863 "            fprintf(stderr, \"Error sending response\\en\");\n"
2864 "    }\n"
2865 "}\n"
2866 msgstr ""
2867
2868 #. type: SS
2869 #: build/C/man3/getaddrinfo.3:732
2870 #, no-wrap
2871 msgid "Client program"
2872 msgstr ""
2873
2874 #. type: Plain text
2875 #: build/C/man3/getaddrinfo.3:742
2876 #, no-wrap
2877 msgid ""
2878 "#include E<lt>sys/types.hE<gt>\n"
2879 "#include E<lt>sys/socket.hE<gt>\n"
2880 "#include E<lt>netdb.hE<gt>\n"
2881 "#include E<lt>stdio.hE<gt>\n"
2882 "#include E<lt>stdlib.hE<gt>\n"
2883 "#include E<lt>unistd.hE<gt>\n"
2884 "#include E<lt>string.hE<gt>\n"
2885 msgstr ""
2886
2887 #. type: Plain text
2888 #: build/C/man3/getaddrinfo.3:754
2889 #, no-wrap
2890 msgid ""
2891 "int\n"
2892 "main(int argc, char *argv[])\n"
2893 "{\n"
2894 "    struct addrinfo hints;\n"
2895 "    struct addrinfo *result, *rp;\n"
2896 "    int sfd, s, j;\n"
2897 "    size_t len;\n"
2898 "    ssize_t nread;\n"
2899 "    char buf[BUF_SIZE];\n"
2900 msgstr ""
2901
2902 #. type: Plain text
2903 #: build/C/man3/getaddrinfo.3:759
2904 #, no-wrap
2905 msgid ""
2906 "    if (argc E<lt> 3) {\n"
2907 "        fprintf(stderr, \"Usage: %s host port msg...\\en\", argv[0]);\n"
2908 "        exit(EXIT_FAILURE);\n"
2909 "    }\n"
2910 msgstr ""
2911
2912 #. type: Plain text
2913 #: build/C/man3/getaddrinfo.3:761
2914 #, no-wrap
2915 msgid "    /* Obtain address(es) matching host/port */\n"
2916 msgstr ""
2917
2918 #. type: Plain text
2919 #: build/C/man3/getaddrinfo.3:767
2920 #, no-wrap
2921 msgid ""
2922 "    memset(&hints, 0, sizeof(struct addrinfo));\n"
2923 "    hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */\n"
2924 "    hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */\n"
2925 "    hints.ai_flags = 0;\n"
2926 "    hints.ai_protocol = 0;          /* Any protocol */\n"
2927 msgstr ""
2928
2929 #. type: Plain text
2930 #: build/C/man3/getaddrinfo.3:773
2931 #, no-wrap
2932 msgid ""
2933 "    s = getaddrinfo(argv[1], argv[2], &hints, &result);\n"
2934 "    if (s != 0) {\n"
2935 "        fprintf(stderr, \"getaddrinfo: %s\\en\", gai_strerror(s));\n"
2936 "        exit(EXIT_FAILURE);\n"
2937 "    }\n"
2938 msgstr ""
2939
2940 #. type: Plain text
2941 #: build/C/man3/getaddrinfo.3:778
2942 #, no-wrap
2943 msgid ""
2944 "    /* getaddrinfo() returns a list of address structures.\n"
2945 "       Try each address until we successfully connect(2).\n"
2946 "       If socket(2) (or connect(2)) fails, we (close the socket\n"
2947 "       and) try the next address. */\n"
2948 msgstr ""
2949
2950 #. type: Plain text
2951 #: build/C/man3/getaddrinfo.3:784
2952 #, no-wrap
2953 msgid ""
2954 "    for (rp = result; rp != NULL; rp = rp-E<gt>ai_next) {\n"
2955 "        sfd = socket(rp-E<gt>ai_family, rp-E<gt>ai_socktype,\n"
2956 "                     rp-E<gt>ai_protocol);\n"
2957 "        if (sfd == -1)\n"
2958 "            continue;\n"
2959 msgstr ""
2960
2961 #. type: Plain text
2962 #: build/C/man3/getaddrinfo.3:787
2963 #, no-wrap
2964 msgid ""
2965 "        if (connect(sfd, rp-E<gt>ai_addr, rp-E<gt>ai_addrlen) != -1)\n"
2966 "            break;                  /* Success */\n"
2967 msgstr ""
2968
2969 #. type: Plain text
2970 #: build/C/man3/getaddrinfo.3:795
2971 #, no-wrap
2972 msgid ""
2973 "    if (rp == NULL) {               /* No address succeeded */\n"
2974 "        fprintf(stderr, \"Could not connect\\en\");\n"
2975 "        exit(EXIT_FAILURE);\n"
2976 "    }\n"
2977 msgstr ""
2978
2979 #. type: Plain text
2980 #: build/C/man3/getaddrinfo.3:800
2981 #, no-wrap
2982 msgid ""
2983 "    /* Send remaining command-line arguments as separate\n"
2984 "       datagrams, and read responses from server */\n"
2985 msgstr ""
2986
2987 #. type: Plain text
2988 #: build/C/man3/getaddrinfo.3:804
2989 #, no-wrap
2990 msgid ""
2991 "    for (j = 3; j E<lt> argc; j++) {\n"
2992 "        len = strlen(argv[j]) + 1;\n"
2993 "                /* +1 for terminating null byte */\n"
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: build/C/man3/getaddrinfo.3:810
2998 #, no-wrap
2999 msgid ""
3000 "        if (len + 1 E<gt> BUF_SIZE) {\n"
3001 "            fprintf(stderr,\n"
3002 "                    \"Ignoring long message in argument %d\\en\", j);\n"
3003 "            continue;\n"
3004 "        }\n"
3005 msgstr ""
3006
3007 #. type: Plain text
3008 #: build/C/man3/getaddrinfo.3:815
3009 #, no-wrap
3010 msgid ""
3011 "        if (write(sfd, argv[j], len) != len) {\n"
3012 "            fprintf(stderr, \"partial/failed write\\en\");\n"
3013 "            exit(EXIT_FAILURE);\n"
3014 "        }\n"
3015 msgstr ""
3016
3017 #. type: Plain text
3018 #: build/C/man3/getaddrinfo.3:821
3019 #, no-wrap
3020 msgid ""
3021 "        nread = read(sfd, buf, BUF_SIZE);\n"
3022 "        if (nread == -1) {\n"
3023 "            perror(\"read\");\n"
3024 "            exit(EXIT_FAILURE);\n"
3025 "        }\n"
3026 msgstr ""
3027
3028 #. type: Plain text
3029 #: build/C/man3/getaddrinfo.3:824
3030 #, no-wrap
3031 msgid ""
3032 "        printf(\"Received %zd bytes: %s\\en\", nread, buf);\n"
3033 "    }\n"
3034 msgstr ""
3035
3036 #.  .BR getipnodebyaddr (3),
3037 #.  .BR getipnodebyname (3),
3038 #. type: Plain text
3039 #: build/C/man3/getaddrinfo.3:837
3040 msgid ""
3041 "B<getaddrinfo_a>(3), B<gethostbyname>(3), B<getnameinfo>(3), B<inet>(3), "
3042 "B<gai.conf>(5), B<hostname>(7), B<ip>(7)"
3043 msgstr ""
3044
3045 #. type: TH
3046 #: build/C/man3/getaddrinfo_a.3:29
3047 #, no-wrap
3048 msgid "GETADDRINFO_A"
3049 msgstr ""
3050
3051 #. type: TH
3052 #: 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
3053 #, no-wrap
3054 msgid "2014-05-28"
3055 msgstr ""
3056
3057 #. type: Plain text
3058 #: build/C/man3/getaddrinfo_a.3:33
3059 msgid ""
3060 "getaddrinfo_a, gai_suspend, gai_error, gai_cancel - asynchronous network "
3061 "address and service translation"
3062 msgstr ""
3063
3064 #. type: Plain text
3065 #: build/C/man3/getaddrinfo_a.3:37
3066 #, no-wrap
3067 msgid ""
3068 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
3069 "B<#include E<lt>netdb.hE<gt>>\n"
3070 msgstr ""
3071
3072 #. type: Plain text
3073 #: build/C/man3/getaddrinfo_a.3:40
3074 #, no-wrap
3075 msgid ""
3076 "B<int getaddrinfo_a(int >I<mode>B<, struct gaicb *>I<list[]>B<,>\n"
3077 "B<                int >I<nitems>B<, struct sigevent *>I<sevp>B<);>\n"
3078 msgstr ""
3079
3080 #. type: Plain text
3081 #: build/C/man3/getaddrinfo_a.3:43
3082 #, no-wrap
3083 msgid ""
3084 "B<int gai_suspend(const struct gaicb * const >I<list[]>B<, int "
3085 ">I<nitems>B<,>\n"
3086 "B<                const struct timespec *>I<timeout>B<);>\n"
3087 msgstr ""
3088
3089 #. type: Plain text
3090 #: build/C/man3/getaddrinfo_a.3:45
3091 #, no-wrap
3092 msgid "B<int gai_error(struct gaicb *>I<req>B<);>\n"
3093 msgstr ""
3094
3095 #. type: Plain text
3096 #: build/C/man3/getaddrinfo_a.3:47
3097 #, no-wrap
3098 msgid "B<int gai_cancel(struct gaicb *>I<req>B<);>\n"
3099 msgstr ""
3100
3101 #. type: Plain text
3102 #: build/C/man3/getaddrinfo_a.3:49
3103 #, no-wrap
3104 msgid "Link with I<-lanl>.\n"
3105 msgstr ""
3106
3107 #. type: Plain text
3108 #: build/C/man3/getaddrinfo_a.3:57
3109 msgid ""
3110 "The B<getaddrinfo_a>()  function performs the same task as "
3111 "B<getaddrinfo>(3), but allows multiple name look-ups to be performed "
3112 "asynchronously, with optional notification on completion of look-up "
3113 "operations."
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man3/getaddrinfo_a.3:61
3118 msgid "The I<mode> argument has one of the following values:"
3119 msgstr ""
3120
3121 #. type: TP
3122 #: build/C/man3/getaddrinfo_a.3:61
3123 #, no-wrap
3124 msgid "B<GAI_WAIT>"
3125 msgstr ""
3126
3127 #. type: Plain text
3128 #: build/C/man3/getaddrinfo_a.3:65
3129 msgid ""
3130 "Perform the look-ups synchronously.  The call blocks until the look-ups have "
3131 "completed."
3132 msgstr ""
3133
3134 #. type: TP
3135 #: build/C/man3/getaddrinfo_a.3:65
3136 #, no-wrap
3137 msgid "B<GAI_NOWAIT>"
3138 msgstr ""
3139
3140 #. type: Plain text
3141 #: build/C/man3/getaddrinfo_a.3:73
3142 msgid ""
3143 "Perform the look-ups asynchronously.  The call returns immediately, and the "
3144 "requests are resolved in the background.  See the discussion of the I<sevp> "
3145 "argument below."
3146 msgstr ""
3147
3148 #. type: Plain text
3149 #: build/C/man3/getaddrinfo_a.3:88
3150 msgid ""
3151 "The array I<list> specifies the look-up requests to process.  The I<nitems> "
3152 "argument specifies the number of elements in I<list>.  The requested look-up "
3153 "operations are started in parallel.  NULL elements in I<list> are ignored.  "
3154 "Each request is described by a I<gaicb> structure, defined as follows:"
3155 msgstr ""
3156
3157 #. type: Plain text
3158 #: build/C/man3/getaddrinfo_a.3:97
3159 #, no-wrap
3160 msgid ""
3161 "struct gaicb {\n"
3162 "    const char            *ar_name;\n"
3163 "    const char            *ar_service;\n"
3164 "    const struct addrinfo *ar_request;\n"
3165 "    struct addrinfo       *ar_result;\n"
3166 "};\n"
3167 msgstr ""
3168
3169 #. type: Plain text
3170 #: build/C/man3/getaddrinfo_a.3:128
3171 msgid ""
3172 "The elements of this structure correspond to the arguments of "
3173 "B<getaddrinfo>(3).  Thus, I<ar_name> corresponds to the I<node> argument and "
3174 "I<ar_service> to the I<service> argument, identifying an Internet host and a "
3175 "service.  The I<ar_request> element corresponds to the I<hints> argument, "
3176 "specifying the criteria for selecting the returned socket address "
3177 "structures.  Finally, I<ar_result> corresponds to the I<res> argument; you "
3178 "do not need to initialize this element, it will be automatically set when "
3179 "the request is resolved.  The I<addrinfo> structure referenced by the last "
3180 "two elements is described in B<getaddrinfo>(3)."
3181 msgstr ""
3182
3183 #. type: Plain text
3184 #: build/C/man3/getaddrinfo_a.3:144
3185 msgid ""
3186 "When I<mode> is specified as B<GAI_NOWAIT>, notifications about resolved "
3187 "requests can be obtained by employing the I<sigevent> structure pointed to "
3188 "by the I<sevp> argument.  For the definition and general details of this "
3189 "structure, see B<sigevent>(7).  The I<sevp-E<gt>sigev_notify> field can have "
3190 "the following values:"
3191 msgstr ""
3192
3193 #. type: TP
3194 #: build/C/man3/getaddrinfo_a.3:144
3195 #, no-wrap
3196 msgid "B<SIGEV_NONE>"
3197 msgstr ""
3198
3199 #. type: Plain text
3200 #: build/C/man3/getaddrinfo_a.3:147
3201 msgid "Don't provide any notification."
3202 msgstr ""
3203
3204 #. type: TP
3205 #: build/C/man3/getaddrinfo_a.3:147
3206 #, no-wrap
3207 msgid "B<SIGEV_SIGNAL>"
3208 msgstr ""
3209
3210 #.  si_pid and si_uid are also set, to the values of the calling process,
3211 #.  which doesn't provide useful information, so we'll skip mentioning it.
3212 #. type: Plain text
3213 #: build/C/man3/getaddrinfo_a.3:163
3214 msgid ""
3215 "When a look-up completes, generate the signal I<sigev_signo> for the "
3216 "process.  See B<sigevent>(7)  for general details.  The I<si_code> field of "
3217 "the I<siginfo_t> structure will be set to B<SI_ASYNCNL>."
3218 msgstr ""
3219
3220 #. type: TP
3221 #: build/C/man3/getaddrinfo_a.3:163
3222 #, no-wrap
3223 msgid "B<SIGEV_THREAD>"
3224 msgstr ""
3225
3226 #. type: Plain text
3227 #: build/C/man3/getaddrinfo_a.3:171
3228 msgid ""
3229 "When a look-up completes, invoke I<sigev_notify_function> as if it were the "
3230 "start function of a new thread.  See B<sigevent>(7)  for details."
3231 msgstr ""
3232
3233 #. type: Plain text
3234 #: build/C/man3/getaddrinfo_a.3:180
3235 msgid ""
3236 "For B<SIGEV_SIGNAL> and B<SIGEV_THREAD>, it may be useful to point "
3237 "I<sevp-E<gt>sigev_value.sival_ptr> to I<list>."
3238 msgstr ""
3239
3240 #. type: Plain text
3241 #: build/C/man3/getaddrinfo_a.3:191
3242 msgid ""
3243 "The B<gai_suspend>()  function suspends execution of the calling thread, "
3244 "waiting for the completion of one or more requests in the array I<list>.  "
3245 "The I<nitems> argument specifies the size of the array I<list>.  The call "
3246 "blocks until one of the following occurs:"
3247 msgstr ""
3248
3249 #. type: Plain text
3250 #: build/C/man3/getaddrinfo_a.3:195
3251 msgid "One or more of the operations in I<list> completes."
3252 msgstr ""
3253
3254 #. type: Plain text
3255 #: build/C/man3/getaddrinfo_a.3:197
3256 msgid "The call is interrupted by a signal that is caught."
3257 msgstr ""
3258
3259 #. type: Plain text
3260 #: build/C/man3/getaddrinfo_a.3:210
3261 msgid ""
3262 "The time interval specified in I<timeout> elapses.  This argument specifies "
3263 "a timeout in seconds plus nanoseconds (see B<nanosleep>(2)  for details of "
3264 "the I<timespec> structure).  If I<timeout> is NULL, then the call blocks "
3265 "indefinitely (until one of the events above occurs)."
3266 msgstr ""
3267
3268 #. type: Plain text
3269 #: build/C/man3/getaddrinfo_a.3:215
3270 msgid ""
3271 "No explicit indication of which request was completed is given; you must "
3272 "determine which request(s) have completed by iterating with B<gai_error>()  "
3273 "over the list of requests."
3274 msgstr ""
3275
3276 #. type: Plain text
3277 #: build/C/man3/getaddrinfo_a.3:225
3278 msgid ""
3279 "The B<gai_error>()  function returns the status of the request I<req>: "
3280 "either B<EAI_INPROGRESS> if the request was not completed yet, 0 if it was "
3281 "handled successfully, or an error code if the request could not be resolved."
3282 msgstr ""
3283
3284 #. type: Plain text
3285 #: build/C/man3/getaddrinfo_a.3:242
3286 msgid ""
3287 "The B<gai_cancel>()  function cancels the request I<req>.  If the request "
3288 "has been canceled successfully, the error status of the request will be set "
3289 "to B<EAI_CANCELLED> and normal asynchronous notification will be performed.  "
3290 "The request cannot be canceled if it is currently being processed; in that "
3291 "case, it will be handled as if B<gai_cancel>()  has never been called.  If "
3292 "I<req> is NULL, an attempt is made to cancel all outstanding requests that "
3293 "the process has made."
3294 msgstr ""
3295
3296 #. type: Plain text
3297 #: build/C/man3/getaddrinfo_a.3:247
3298 msgid ""
3299 "The B<getaddrinfo_a>()  function returns 0 if all of the requests have been "
3300 "enqueued successfully, or one of the following nonzero error codes:"
3301 msgstr ""
3302
3303 #. type: Plain text
3304 #: build/C/man3/getaddrinfo_a.3:252
3305 msgid ""
3306 "The resources necessary to enqueue the look-up requests were not available.  "
3307 "The application may check the error status of each request to determine "
3308 "which ones failed."
3309 msgstr ""
3310
3311 #. type: Plain text
3312 #: build/C/man3/getaddrinfo_a.3:259
3313 msgid "I<mode> is invalid."
3314 msgstr ""
3315
3316 #. type: Plain text
3317 #: build/C/man3/getaddrinfo_a.3:264
3318 msgid ""
3319 "The B<gai_suspend>()  function returns 0 if at least one of the listed "
3320 "requests has been completed.  Otherwise, it returns one of the following "
3321 "nonzero error codes:"
3322 msgstr ""
3323
3324 #. type: Plain text
3325 #: build/C/man3/getaddrinfo_a.3:267
3326 msgid "The given timeout expired before any of the requests could be completed."
3327 msgstr ""
3328
3329 #. type: TP
3330 #: build/C/man3/getaddrinfo_a.3:267 build/C/man3/getaddrinfo_a.3:297
3331 #, no-wrap
3332 msgid "B<EAI_ALLDONE>"
3333 msgstr ""
3334
3335 #. type: Plain text
3336 #: build/C/man3/getaddrinfo_a.3:270
3337 msgid "There were no actual requests given to the function."
3338 msgstr ""
3339
3340 #. type: TP
3341 #: build/C/man3/getaddrinfo_a.3:270
3342 #, no-wrap
3343 msgid "B<EAI_INTR>"
3344 msgstr ""
3345
3346 #. type: Plain text
3347 #: build/C/man3/getaddrinfo_a.3:275
3348 msgid ""
3349 "A signal has interrupted the function.  Note that this interruption might "
3350 "have been caused by signal notification of some completed look-up request."
3351 msgstr ""
3352
3353 #. type: Plain text
3354 #: build/C/man3/getaddrinfo_a.3:287
3355 msgid ""
3356 "The B<gai_error>()  function can return B<EAI_INPROGRESS> for an unfinished "
3357 "look-up request, 0 for a successfully completed look-up (as described "
3358 "above), one of the error codes that could be returned by B<getaddrinfo>(3), "
3359 "or the error code B<EAI_CANCELLED> if the request has been canceled "
3360 "explicitly before it could be finished."
3361 msgstr ""
3362
3363 #. type: Plain text
3364 #: build/C/man3/getaddrinfo_a.3:291
3365 msgid "The B<gai_cancel>()  function can return one of these values:"
3366 msgstr ""
3367
3368 #. type: TP
3369 #: build/C/man3/getaddrinfo_a.3:291
3370 #, no-wrap
3371 msgid "B<EAI_CANCELLED>"
3372 msgstr ""
3373
3374 #. type: Plain text
3375 #: build/C/man3/getaddrinfo_a.3:294
3376 msgid "The request has been canceled successfully."
3377 msgstr ""
3378
3379 #. type: TP
3380 #: build/C/man3/getaddrinfo_a.3:294
3381 #, no-wrap
3382 msgid "B<EAI_NOTCANCELLED>"
3383 msgstr ""
3384
3385 #. type: Plain text
3386 #: build/C/man3/getaddrinfo_a.3:297
3387 msgid "The request has not been canceled."
3388 msgstr ""
3389
3390 #. type: Plain text
3391 #: build/C/man3/getaddrinfo_a.3:300
3392 msgid "The request has already completed."
3393 msgstr ""
3394
3395 #. type: Plain text
3396 #: build/C/man3/getaddrinfo_a.3:305 build/C/man3/getnameinfo.3:197
3397 msgid ""
3398 "The B<gai_strerror>(3)  function translates these error codes to a human "
3399 "readable string, suitable for error reporting."
3400 msgstr ""
3401
3402 #. type: Plain text
3403 #: build/C/man3/getaddrinfo_a.3:308
3404 msgid ""
3405 "These functions are GNU extensions; they first appeared in glibc in version "
3406 "2.2.3."
3407 msgstr ""
3408
3409 #. type: Plain text
3410 #: build/C/man3/getaddrinfo_a.3:314
3411 msgid ""
3412 "The interface of B<getaddrinfo_a>()  was modeled after the B<lio_listio>(3)  "
3413 "interface."
3414 msgstr ""
3415
3416 #. type: Plain text
3417 #: build/C/man3/getaddrinfo_a.3:318
3418 msgid ""
3419 "Two examples are provided: a simple example that resolves several requests "
3420 "in parallel synchronously, and a complex example showing some of the "
3421 "asynchronous capabilities."
3422 msgstr ""
3423
3424 #. type: SS
3425 #: build/C/man3/getaddrinfo_a.3:318
3426 #, no-wrap
3427 msgid "Synchronous example"
3428 msgstr ""
3429
3430 #. type: Plain text
3431 #: build/C/man3/getaddrinfo_a.3:323
3432 msgid ""
3433 "The program below simply resolves several hostnames in parallel, giving a "
3434 "speed-up compared to resolving the hostnames sequentially using "
3435 "B<getaddrinfo>(3).  The program might be used like this:"
3436 msgstr ""
3437
3438 #. type: Plain text
3439 #: build/C/man3/getaddrinfo_a.3:330
3440 #, no-wrap
3441 msgid ""
3442 "$ B<./a.out ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz>\n"
3443 "ftp.us.kernel.org: 128.30.2.36\n"
3444 "enoent.linuxfoundation.org: Name or service not known\n"
3445 "gnu.cz: 87.236.197.13\n"
3446 msgstr ""
3447
3448 #. type: Plain text
3449 #: build/C/man3/getaddrinfo_a.3:334
3450 msgid "Here is the program source code"
3451 msgstr ""
3452
3453 #. type: Plain text
3454 #: build/C/man3/getaddrinfo_a.3:341 build/C/man3/getaddrinfo_a.3:430
3455 #, no-wrap
3456 msgid ""
3457 "#define _GNU_SOURCE\n"
3458 "#include E<lt>netdb.hE<gt>\n"
3459 "#include E<lt>stdio.hE<gt>\n"
3460 "#include E<lt>stdlib.hE<gt>\n"
3461 "#include E<lt>string.hE<gt>\n"
3462 msgstr ""
3463
3464 #. type: Plain text
3465 #: build/C/man3/getaddrinfo_a.3:349
3466 #, no-wrap
3467 msgid ""
3468 "int\n"
3469 "main(int argc, char *argv[])\n"
3470 "{\n"
3471 "    int i, ret;\n"
3472 "    struct gaicb *reqs[argc - 1];\n"
3473 "    char host[NI_MAXHOST];\n"
3474 "    struct addrinfo *res;\n"
3475 msgstr ""
3476
3477 #. type: Plain text
3478 #: build/C/man3/getaddrinfo_a.3:354
3479 #, no-wrap
3480 msgid ""
3481 "    if (argc E<lt> 2) {\n"
3482 "        fprintf(stderr, \"Usage: %s HOST...\\en\", argv[0]);\n"
3483 "        exit(EXIT_FAILURE);\n"
3484 "    }\n"
3485 msgstr ""
3486
3487 #. type: Plain text
3488 #: build/C/man3/getaddrinfo_a.3:364
3489 #, no-wrap
3490 msgid ""
3491 "    for (i = 0; i E<lt> argc - 1; i++) {\n"
3492 "        reqs[i] = malloc(sizeof(*reqs[0]));\n"
3493 "        if (reqs[i] == NULL) {\n"
3494 "            perror(\"malloc\");\n"
3495 "            exit(EXIT_FAILURE);\n"
3496 "        }\n"
3497 "        memset(reqs[i], 0, sizeof(*reqs[0]));\n"
3498 "        reqs[i]-E<gt>ar_name = argv[i + 1];\n"
3499 "    }\n"
3500 msgstr ""
3501
3502 #. type: Plain text
3503 #: build/C/man3/getaddrinfo_a.3:371
3504 #, no-wrap
3505 msgid ""
3506 "    ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL);\n"
3507 "    if (ret != 0) {\n"
3508 "        fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
3509 "                gai_strerror(ret));\n"
3510 "        exit(EXIT_FAILURE);\n"
3511 "    }\n"
3512 msgstr ""
3513
3514 #. type: Plain text
3515 #: build/C/man3/getaddrinfo_a.3:377
3516 #, no-wrap
3517 msgid ""
3518 "    for (i = 0; i E<lt> argc - 1; i++) {\n"
3519 "        printf(\"%s: \", reqs[i]-E<gt>ar_name);\n"
3520 "        ret = gai_error(reqs[i]);\n"
3521 "        if (ret == 0) {\n"
3522 "            res = reqs[i]-E<gt>ar_result;\n"
3523 msgstr ""
3524
3525 #. type: Plain text
3526 #: build/C/man3/getaddrinfo_a.3:387
3527 #, no-wrap
3528 msgid ""
3529 "            ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
3530 "                    host, sizeof(host),\n"
3531 "                    NULL, 0, NI_NUMERICHOST);\n"
3532 "            if (ret != 0) {\n"
3533 "                fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
3534 "                        gai_strerror(ret));\n"
3535 "                exit(EXIT_FAILURE);\n"
3536 "            }\n"
3537 "            puts(host);\n"
3538 msgstr ""
3539
3540 #. type: Plain text
3541 #: build/C/man3/getaddrinfo_a.3:394
3542 #, no-wrap
3543 msgid ""
3544 "        } else {\n"
3545 "            puts(gai_strerror(ret));\n"
3546 "        }\n"
3547 "    }\n"
3548 "    exit(EXIT_SUCCESS);\n"
3549 "}\n"
3550 msgstr ""
3551
3552 #. type: SS
3553 #: build/C/man3/getaddrinfo_a.3:395
3554 #, no-wrap
3555 msgid "Asynchronous example"
3556 msgstr ""
3557
3558 #. type: Plain text
3559 #: build/C/man3/getaddrinfo_a.3:400
3560 msgid ""
3561 "This example shows a simple interactive B<getaddrinfo_a>()  front-end.  The "
3562 "notification facility is not demonstrated."
3563 msgstr ""
3564
3565 #. type: Plain text
3566 #: build/C/man3/getaddrinfo_a.3:402
3567 msgid "An example session might look like this:"
3568 msgstr ""
3569
3570 #. type: Plain text
3571 #: build/C/man3/getaddrinfo_a.3:419
3572 #, no-wrap
3573 msgid ""
3574 "$ B<./a.out>\n"
3575 "E<gt> a ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz\n"
3576 "E<gt> c 2\n"
3577 "[2] gnu.cz: Request not canceled\n"
3578 "E<gt> w 0 1\n"
3579 "[00] ftp.us.kernel.org: Finished\n"
3580 "E<gt> l\n"
3581 "[00] ftp.us.kernel.org: 216.165.129.139\n"
3582 "[01] enoent.linuxfoundation.org: Processing request in progress\n"
3583 "[02] gnu.cz: 87.236.197.13\n"
3584 "E<gt> l\n"
3585 "[00] ftp.us.kernel.org: 216.165.129.139\n"
3586 "[01] enoent.linuxfoundation.org: Name or service not known\n"
3587 "[02] gnu.cz: 87.236.197.13\n"
3588 msgstr ""
3589
3590 #. type: Plain text
3591 #: build/C/man3/getaddrinfo_a.3:423
3592 msgid "The program source is as follows:"
3593 msgstr ""
3594
3595 #. type: Plain text
3596 #: build/C/man3/getaddrinfo_a.3:433
3597 #, no-wrap
3598 msgid ""
3599 "static struct gaicb **reqs = NULL;\n"
3600 "static int nreqs = 0;\n"
3601 msgstr ""
3602
3603 #. type: Plain text
3604 #: build/C/man3/getaddrinfo_a.3:438
3605 #, no-wrap
3606 msgid ""
3607 "static char *\n"
3608 "getcmd(void)\n"
3609 "{\n"
3610 "    static char buf[256];\n"
3611 msgstr ""
3612
3613 #. type: Plain text
3614 #: build/C/man3/getaddrinfo_a.3:442
3615 #, no-wrap
3616 msgid ""
3617 "    fputs(\"E<gt> \", stdout); fflush(stdout);\n"
3618 "    if (fgets(buf, sizeof(buf), stdin) == NULL)\n"
3619 "        return NULL;\n"
3620 msgstr ""
3621
3622 #. type: Plain text
3623 #: build/C/man3/getaddrinfo_a.3:445
3624 #, no-wrap
3625 msgid ""
3626 "    if (buf[strlen(buf) - 1] == \\(aq\\en\\(aq)\n"
3627 "        buf[strlen(buf) - 1] = 0;\n"
3628 msgstr ""
3629
3630 #. type: Plain text
3631 #: build/C/man3/getaddrinfo_a.3:448
3632 #, no-wrap
3633 msgid ""
3634 "    return buf;\n"
3635 "}\n"
3636 msgstr ""
3637
3638 #. type: Plain text
3639 #: build/C/man3/getaddrinfo_a.3:456
3640 #, no-wrap
3641 msgid ""
3642 "/* Add requests for specified hostnames */\n"
3643 "static void\n"
3644 "add_requests(void)\n"
3645 "{\n"
3646 "    int nreqs_base = nreqs;\n"
3647 "    char *host;\n"
3648 "    int ret;\n"
3649 msgstr ""
3650
3651 #. type: Plain text
3652 #: build/C/man3/getaddrinfo_a.3:460
3653 #, no-wrap
3654 msgid ""
3655 "    while ((host = strtok(NULL, \" \"))) {\n"
3656 "        nreqs++;\n"
3657 "        reqs = realloc(reqs, nreqs * sizeof(reqs[0]));\n"
3658 msgstr ""
3659
3660 #. type: Plain text
3661 #: build/C/man3/getaddrinfo_a.3:464
3662 #, no-wrap
3663 msgid ""
3664 "        reqs[nreqs - 1] = calloc(1, sizeof(*reqs[0]));\n"
3665 "        reqs[nreqs - 1]-E<gt>ar_name = strdup(host);\n"
3666 "    }\n"
3667 msgstr ""
3668
3669 #. type: Plain text
3670 #: build/C/man3/getaddrinfo_a.3:466
3671 #, no-wrap
3672 msgid "    /* Queue nreqs_base..nreqs requests. */\n"
3673 msgstr ""
3674
3675 #. type: Plain text
3676 #: build/C/man3/getaddrinfo_a.3:475
3677 #, no-wrap
3678 msgid ""
3679 "    ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],\n"
3680 "                        nreqs - nreqs_base, NULL);\n"
3681 "    if (ret) {\n"
3682 "        fprintf(stderr, \"getaddrinfo_a() failed: %s\\en\",\n"
3683 "                gai_strerror(ret));\n"
3684 "        exit(EXIT_FAILURE);\n"
3685 "    }\n"
3686 "}\n"
3687 msgstr ""
3688
3689 #. type: Plain text
3690 #: build/C/man3/getaddrinfo_a.3:484
3691 #, no-wrap
3692 msgid ""
3693 "/* Wait until at least one of specified requests completes */\n"
3694 "static void\n"
3695 "wait_requests(void)\n"
3696 "{\n"
3697 "    char *id;\n"
3698 "    int i, ret, n;\n"
3699 "    struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));\n"
3700 "                /* NULL elements are ignored by gai_suspend(). */\n"
3701 msgstr ""
3702
3703 #. type: Plain text
3704 #: build/C/man3/getaddrinfo_a.3:487 build/C/man3/getaddrinfo_a.3:524
3705 #, no-wrap
3706 msgid ""
3707 "    while ((id = strtok(NULL, \" \")) != NULL) {\n"
3708 "        n = atoi(id);\n"
3709 msgstr ""
3710
3711 #. type: Plain text
3712 #: build/C/man3/getaddrinfo_a.3:492 build/C/man3/getaddrinfo_a.3:529
3713 #, no-wrap
3714 msgid ""
3715 "        if (n E<gt>= nreqs) {\n"
3716 "            printf(\"Bad request number: %s\\en\", id);\n"
3717 "            return;\n"
3718 "        }\n"
3719 msgstr ""
3720
3721 #. type: Plain text
3722 #: build/C/man3/getaddrinfo_a.3:495
3723 #, no-wrap
3724 msgid ""
3725 "        wait_reqs[n] = reqs[n];\n"
3726 "    }\n"
3727 msgstr ""
3728
3729 #. type: Plain text
3730 #: build/C/man3/getaddrinfo_a.3:501
3731 #, no-wrap
3732 msgid ""
3733 "    ret = gai_suspend(wait_reqs, nreqs, NULL);\n"
3734 "    if (ret) {\n"
3735 "        printf(\"gai_suspend(): %s\\en\", gai_strerror(ret));\n"
3736 "        return;\n"
3737 "    }\n"
3738 msgstr ""
3739
3740 #. type: Plain text
3741 #: build/C/man3/getaddrinfo_a.3:505
3742 #, no-wrap
3743 msgid ""
3744 "    for (i = 0; i E<lt> nreqs; i++) {\n"
3745 "        if (wait_reqs[i] == NULL)\n"
3746 "            continue;\n"
3747 msgstr ""
3748
3749 #. type: Plain text
3750 #: build/C/man3/getaddrinfo_a.3:509
3751 #, no-wrap
3752 msgid ""
3753 "        ret = gai_error(reqs[i]);\n"
3754 "        if (ret == EAI_INPROGRESS)\n"
3755 "            continue;\n"
3756 msgstr ""
3757
3758 #. type: Plain text
3759 #: build/C/man3/getaddrinfo_a.3:514
3760 #, no-wrap
3761 msgid ""
3762 "        printf(\"[%02d] %s: %s\\en\", i, reqs[i]-E<gt>ar_name,\n"
3763 "               ret == 0 ? \"Finished\" : gai_strerror(ret));\n"
3764 "    }\n"
3765 "}\n"
3766 msgstr ""
3767
3768 #. type: Plain text
3769 #: build/C/man3/getaddrinfo_a.3:521
3770 #, no-wrap
3771 msgid ""
3772 "/* Cancel specified requests */\n"
3773 "static void\n"
3774 "cancel_requests(void)\n"
3775 "{\n"
3776 "    char *id;\n"
3777 "    int ret, n;\n"
3778 msgstr ""
3779
3780 #. type: Plain text
3781 #: build/C/man3/getaddrinfo_a.3:535
3782 #, no-wrap
3783 msgid ""
3784 "        ret = gai_cancel(reqs[n]);\n"
3785 "        printf(\"[%s] %s: %s\\en\", id, reqs[atoi(id)]-E<gt>ar_name,\n"
3786 "               gai_strerror(ret));\n"
3787 "    }\n"
3788 "}\n"
3789 msgstr ""
3790
3791 #. type: Plain text
3792 #: build/C/man3/getaddrinfo_a.3:543
3793 #, no-wrap
3794 msgid ""
3795 "/* List all requests */\n"
3796 "static void\n"
3797 "list_requests(void)\n"
3798 "{\n"
3799 "    int i, ret;\n"
3800 "    char host[NI_MAXHOST];\n"
3801 "    struct addrinfo *res;\n"
3802 msgstr ""
3803
3804 #. type: Plain text
3805 #: build/C/man3/getaddrinfo_a.3:547
3806 #, no-wrap
3807 msgid ""
3808 "    for (i = 0; i E<lt> nreqs; i++) {\n"
3809 "        printf(\"[%02d] %s: \", i, reqs[i]-E<gt>ar_name);\n"
3810 "        ret = gai_error(reqs[i]);\n"
3811 msgstr ""
3812
3813 #. type: Plain text
3814 #: build/C/man3/getaddrinfo_a.3:550
3815 #, no-wrap
3816 msgid ""
3817 "        if (!ret) {\n"
3818 "            res = reqs[i]-E<gt>ar_result;\n"
3819 msgstr ""
3820
3821 #. type: Plain text
3822 #: build/C/man3/getaddrinfo_a.3:565
3823 #, no-wrap
3824 msgid ""
3825 "            ret = getnameinfo(res-E<gt>ai_addr, res-E<gt>ai_addrlen,\n"
3826 "                              host, sizeof(host),\n"
3827 "                              NULL, 0, NI_NUMERICHOST);\n"
3828 "            if (ret) {\n"
3829 "                fprintf(stderr, \"getnameinfo() failed: %s\\en\",\n"
3830 "                        gai_strerror(ret));\n"
3831 "                exit(EXIT_FAILURE);\n"
3832 "            }\n"
3833 "            puts(host);\n"
3834 "        } else {\n"
3835 "            puts(gai_strerror(ret));\n"
3836 "        }\n"
3837 "    }\n"
3838 "}\n"
3839 msgstr ""
3840
3841 #. type: Plain text
3842 #: build/C/man3/getaddrinfo_a.3:571
3843 #, no-wrap
3844 msgid ""
3845 "int\n"
3846 "main(int argc, char *argv[])\n"
3847 "{\n"
3848 "    char *cmdline;\n"
3849 "    char *cmd;\n"
3850 msgstr ""
3851
3852 #. type: Plain text
3853 #: build/C/man3/getaddrinfo_a.3:574
3854 #, no-wrap
3855 msgid ""
3856 "    while ((cmdline = getcmd()) != NULL) {\n"
3857 "        cmd = strtok(cmdline, \" \");\n"
3858 msgstr ""
3859
3860 #. type: Plain text
3861 #: build/C/man3/getaddrinfo_a.3:599
3862 #, no-wrap
3863 msgid ""
3864 "        if (cmd == NULL) {\n"
3865 "            list_requests();\n"
3866 "        } else {\n"
3867 "            switch (cmd[0]) {\n"
3868 "            case \\(aqa\\(aq:\n"
3869 "                add_requests();\n"
3870 "                break;\n"
3871 "            case \\(aqw\\(aq:\n"
3872 "                wait_requests();\n"
3873 "                break;\n"
3874 "            case \\(aqc\\(aq:\n"
3875 "                cancel_requests();\n"
3876 "                break;\n"
3877 "            case \\(aql\\(aq:\n"
3878 "                list_requests();\n"
3879 "                break;\n"
3880 "            default:\n"
3881 "                fprintf(stderr, \"Bad command: %c\\en\", cmd[0]);\n"
3882 "                break;\n"
3883 "            }\n"
3884 "        }\n"
3885 "    }\n"
3886 "    exit(EXIT_SUCCESS);\n"
3887 "}\n"
3888 msgstr ""
3889
3890 #. type: Plain text
3891 #: build/C/man3/getaddrinfo_a.3:606
3892 msgid ""
3893 "B<getaddrinfo>(3), B<inet>(3), B<lio_listio>(3), B<hostname>(7), B<ip>(7), "
3894 "B<sigevent>(7)"
3895 msgstr ""
3896
3897 #. type: TH
3898 #: build/C/man1/getent.1:24
3899 #, no-wrap
3900 msgid "GETENT"
3901 msgstr ""
3902
3903 #. type: TH
3904 #: build/C/man1/getent.1:24
3905 #, no-wrap
3906 msgid "2013-03-15"
3907 msgstr ""
3908
3909 #. type: TH
3910 #: build/C/man1/getent.1:24
3911 #, no-wrap
3912 msgid "User Commands"
3913 msgstr ""
3914
3915 #. type: Plain text
3916 #: build/C/man1/getent.1:27
3917 msgid "getent - get entries from Name Service Switch libraries"
3918 msgstr ""
3919
3920 #. type: Plain text
3921 #: build/C/man1/getent.1:30
3922 msgid "B<getent> I<database> [I<key> ...]"
3923 msgstr ""
3924
3925 #. type: Plain text
3926 #: build/C/man1/getent.1:45
3927 msgid ""
3928 "The B<getent> command displays entries from databases supported by the Name "
3929 "Service Switch libraries, which are configured in I</etc/nsswitch.conf>.  If "
3930 "one or more I<key> arguments are provided, then only the entries that match "
3931 "the supplied keys will be displayed.  Otherwise, if no I<key> is provided, "
3932 "all entries will be displayed (unless the database does not support "
3933 "enumeration)."
3934 msgstr ""
3935
3936 #. type: Plain text
3937 #: build/C/man1/getent.1:49
3938 msgid ""
3939 "The I<database> may be any of those supported by the GNU C Library, listed "
3940 "below:"
3941 msgstr ""
3942
3943 #. type: TP
3944 #: build/C/man1/getent.1:50
3945 #, no-wrap
3946 msgid "B<ahosts>"
3947 msgstr ""
3948
3949 #. type: Plain text
3950 #: build/C/man1/getent.1:71
3951 msgid ""
3952 "When no I<key> is provided, use B<sethostent>(3), B<gethostent>(3), and "
3953 "B<endhostent>(3)  to enumerate the hosts database.  This is identical to "
3954 "using B<hosts>.  When one or more I<key> arguments are provided, pass each "
3955 "I<key> in succession to B<getaddrinfo>(3)  with the address family "
3956 "B<AF_UNSPEC>, enumerating each socket address structure returned."
3957 msgstr ""
3958
3959 #. type: TP
3960 #: build/C/man1/getent.1:71
3961 #, no-wrap
3962 msgid "B<ahostsv4>"
3963 msgstr ""
3964
3965 #. type: Plain text
3966 #: build/C/man1/getent.1:77
3967 msgid "Same as B<ahosts>, but use the address family B<AF_INET>."
3968 msgstr ""
3969
3970 #. type: TP
3971 #: build/C/man1/getent.1:77
3972 #, no-wrap
3973 msgid "B<ahostsv6>"
3974 msgstr ""
3975
3976 #. type: Plain text
3977 #: build/C/man1/getent.1:88
3978 msgid ""
3979 "Same as B<ahosts>, but use the address family B<AF_INET6>.  The call to "
3980 "B<getaddrinfo>(3)  in this case includes the B<AI_V4MAPPED> flag."
3981 msgstr ""
3982
3983 #. type: TP
3984 #: build/C/man1/getent.1:88 build/C/man5/nsswitch.conf.5:44
3985 #, no-wrap
3986 msgid "B<aliases>"
3987 msgstr ""
3988
3989 #. type: Plain text
3990 #: build/C/man1/getent.1:105
3991 msgid ""
3992 "When no I<key> is provided, use B<setaliasent>(3), B<getaliasent>(3), and "
3993 "B<endaliasent>(3)  to enumerate the aliases database.  When one or more "
3994 "I<key> arguments are provided, pass each I<key> in succession to "
3995 "B<getaliasbyname>(3)  and display the result."
3996 msgstr ""
3997
3998 #. type: TP
3999 #: build/C/man1/getent.1:105 build/C/man5/nsswitch.conf.5:49
4000 #, no-wrap
4001 msgid "B<ethers>"
4002 msgstr ""
4003
4004 #. type: Plain text
4005 #: build/C/man1/getent.1:121
4006 msgid ""
4007 "When one or more I<key> arguments are provided, pass each I<key> in "
4008 "succession to B<ether_aton>(3)  and B<ether_hostton>(3)  until a result is "
4009 "obtained, and display the result.  Enumeration is not supported on "
4010 "B<ethers>, so a I<key> must be provided."
4011 msgstr ""
4012
4013 #. type: TP
4014 #: build/C/man1/getent.1:121 build/C/man5/nsswitch.conf.5:52
4015 #, no-wrap
4016 msgid "B<group>"
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man1/getent.1:142
4021 msgid ""
4022 "When no I<key> is provided, use B<setgrent>(3), B<getgrent>(3), and "
4023 "B<endgrent>(3)  to enumerate the group database.  When one or more I<key> "
4024 "arguments are provided, pass each numeric I<key> to B<getgrgid>(3)  and each "
4025 "nonnumeric I<key> to B<getgrnam>(3)  and display the result."
4026 msgstr ""
4027
4028 #. type: TP
4029 #: build/C/man1/getent.1:142
4030 #, no-wrap
4031 msgid "B<gshadow>"
4032 msgstr ""
4033
4034 #. type: Plain text
4035 #: build/C/man1/getent.1:159
4036 msgid ""
4037 "When no I<key> is provided, use B<setsgent>(3), B<getsgent>(3), and "
4038 "B<endsgent>(3)  to enumerate the gshadow database.  When one or more I<key> "
4039 "arguments are provided, pass each I<key> in succession to B<getsgnam>(3)  "
4040 "and display the result."
4041 msgstr ""
4042
4043 #. type: TP
4044 #: build/C/man1/getent.1:159 build/C/man5/nsswitch.conf.5:57
4045 #, no-wrap
4046 msgid "B<hosts>"
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: build/C/man1/getent.1:182
4051 msgid ""
4052 "When no I<key> is provided, use B<sethostent>(3), B<gethostent>(3), and "
4053 "B<endhostent>(3)  to enumerate the hosts database.  When one or more I<key> "
4054 "arguments are provided, pass each I<key> to B<gethostbyaddr>(3)  or "
4055 "B<gethostbyname2>(3), depending on whether a call to B<inet_pton>(3)  "
4056 "indicates that the I<key> is an IPv6 or IPv4 address or not, and display the "
4057 "result."
4058 msgstr ""
4059
4060 #. type: TP
4061 #: build/C/man1/getent.1:182 build/C/man5/nsswitch.conf.5:62
4062 #, no-wrap
4063 msgid "B<initgroups>"
4064 msgstr ""
4065
4066 #. type: Plain text
4067 #: build/C/man1/getent.1:196
4068 msgid ""
4069 "When one or more I<key> arguments are provided, pass each I<key> in "
4070 "succession to B<getgrouplist>(3)  and display the result.  Enumeration is "
4071 "not supported on B<initgroups>, so a I<key> must be provided."
4072 msgstr ""
4073
4074 #. type: TP
4075 #: build/C/man1/getent.1:196 build/C/man5/nsswitch.conf.5:67
4076 #, no-wrap
4077 msgid "B<netgroup>"
4078 msgstr ""
4079
4080 #. type: Plain text
4081 #: build/C/man1/getent.1:222
4082 msgid ""
4083 "When one I<key> is provided, pass the I<key> to B<setnetgrent>(3)  and, "
4084 "using B<getnetgrent>(3)  display the resulting string triple (I<hostname>, "
4085 "I<username>, I<domainname>).  Alternatively, three I<keys> may be provided, "
4086 "which are interpreted as the I<hostname>, I<username> and I<domainname> to "
4087 "match to a netgroup name via B<innetgr>(3).  Enumeration is not supported on "
4088 "B<netgroup>, so either one or three I<keys> must be provided."
4089 msgstr ""
4090
4091 #. type: TP
4092 #: build/C/man1/getent.1:222 build/C/man5/nsswitch.conf.5:71
4093 #, no-wrap
4094 msgid "B<networks>"
4095 msgstr ""
4096
4097 #. type: Plain text
4098 #: build/C/man1/getent.1:243
4099 msgid ""
4100 "When no I<key> is provided, use B<setnetent>(3), B<getnetent>(3), and "
4101 "B<endnetent>(3)  to enumerate the networks database.  When one or more "
4102 "I<key> arguments are provided, pass each numeric I<key> to "
4103 "B<getnetbyaddr>(3)  and each nonnumeric I<key> to B<getnetbyname>(3)  and "
4104 "display the result."
4105 msgstr ""
4106
4107 #. type: TP
4108 #: build/C/man1/getent.1:243 build/C/man5/nsswitch.conf.5:76
4109 #, no-wrap
4110 msgid "B<passwd>"
4111 msgstr ""
4112
4113 #. type: Plain text
4114 #: build/C/man1/getent.1:264
4115 msgid ""
4116 "When no I<key> is provided, use B<setpwent>(3), B<getpwent>(3), and "
4117 "B<endpwent>(3)  to enumerate the passwd database.  When one or more I<key> "
4118 "arguments are provided, pass each numeric I<key> to B<getpwuid>(3)  and each "
4119 "nonnumeric I<key> to B<getpwnam>(3)  and display the result."
4120 msgstr ""
4121
4122 #. type: TP
4123 #: build/C/man1/getent.1:264 build/C/man5/nsswitch.conf.5:81
4124 #, no-wrap
4125 msgid "B<protocols>"
4126 msgstr ""
4127
4128 #. type: Plain text
4129 #: build/C/man1/getent.1:285
4130 msgid ""
4131 "When no I<key> is provided, use B<setprotoent>(3), B<getprotoent>(3), and "
4132 "B<endprotoent>(3)  to enumerate the protocols database.  When one or more "
4133 "I<key> arguments are provided, pass each numeric I<key> to "
4134 "B<getprotobynumber>(3)  and each nonnumeric I<key> to B<getprotobyname>(3)  "
4135 "and display the result."
4136 msgstr ""
4137
4138 #. type: TP
4139 #: build/C/man1/getent.1:285 build/C/man5/nsswitch.conf.5:89
4140 #, no-wrap
4141 msgid "B<rpc>"
4142 msgstr ""
4143
4144 #. type: Plain text
4145 #: build/C/man1/getent.1:306
4146 msgid ""
4147 "When no I<key> is provided, use B<setrpcent>(3), B<getrpcent>(3), and "
4148 "B<endrpcent>(3)  to enumerate the rpc database.  When one or more I<key> "
4149 "arguments are provided, pass each numeric I<key> to B<getrpcbynumber>(3)  "
4150 "and each nonnumeric I<key> to B<getrpcbyname>(3)  and display the result."
4151 msgstr ""
4152
4153 #. type: TP
4154 #: build/C/man1/getent.1:306 build/C/man5/nsswitch.conf.5:94
4155 #, no-wrap
4156 msgid "B<services>"
4157 msgstr ""
4158
4159 #. type: Plain text
4160 #: build/C/man1/getent.1:327
4161 msgid ""
4162 "When no I<key> is provided, use B<setservent>(3), B<getservent>(3), and "
4163 "B<endservent>(3)  to enumerate the services database.  When one or more "
4164 "I<key> arguments are provided, pass each numeric I<key> to "
4165 "B<getservbynumber>(3)  and each nonnumeric I<key> to B<getservbyname>(3)  "
4166 "and display the result."
4167 msgstr ""
4168
4169 #. type: TP
4170 #: build/C/man1/getent.1:327 build/C/man5/nsswitch.conf.5:99
4171 #, no-wrap
4172 msgid "B<shadow>"
4173 msgstr ""
4174
4175 #. type: Plain text
4176 #: build/C/man1/getent.1:344
4177 msgid ""
4178 "When no I<key> is provided, use B<setspent>(3), B<getspent>(3), and "
4179 "B<endspent>(3)  to enumerate the shadow database.  When one or more I<key> "
4180 "arguments are provided, pass each I<key> in succession to B<getspnam>(3)  "
4181 "and display the result."
4182 msgstr ""
4183
4184 #. type: SH
4185 #: build/C/man1/getent.1:345
4186 #, no-wrap
4187 msgid "EXIT STATUS"
4188 msgstr ""
4189
4190 #. type: Plain text
4191 #: build/C/man1/getent.1:348
4192 msgid "One of the following exit values can be returned by B<getent>:"
4193 msgstr ""
4194
4195 #. type: TP
4196 #: build/C/man1/getent.1:349
4197 #, no-wrap
4198 msgid "B<0>"
4199 msgstr ""
4200
4201 #. type: Plain text
4202 #: build/C/man1/getent.1:352
4203 msgid "Command completed successfully."
4204 msgstr ""
4205
4206 #. type: TP
4207 #: build/C/man1/getent.1:352
4208 #, no-wrap
4209 msgid "B<1>"
4210 msgstr ""
4211
4212 #. type: Plain text
4213 #: build/C/man1/getent.1:357
4214 msgid "Missing arguments, or I<database> unknown."
4215 msgstr ""
4216
4217 #. type: TP
4218 #: build/C/man1/getent.1:357
4219 #, no-wrap
4220 msgid "B<2>"
4221 msgstr ""
4222
4223 #. type: Plain text
4224 #: build/C/man1/getent.1:363
4225 msgid "One or more supplied I<key> could not be found in the I<database>."
4226 msgstr ""
4227
4228 #. type: TP
4229 #: build/C/man1/getent.1:363
4230 #, no-wrap
4231 msgid "B<3>"
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man1/getent.1:367
4236 msgid "Enumeration not supported on this I<database>."
4237 msgstr ""
4238
4239 #. type: Plain text
4240 #: build/C/man1/getent.1:369
4241 msgid "B<nsswitch.conf>(5)"
4242 msgstr ""
4243
4244 #. type: TH
4245 #: build/C/man3/gethostbyname.3:38
4246 #, no-wrap
4247 msgid "GETHOSTBYNAME"
4248 msgstr ""
4249
4250 #. type: TH
4251 #: build/C/man3/gethostbyname.3:38
4252 #, no-wrap
4253 msgid "2014-03-11"
4254 msgstr ""
4255
4256 #. type: Plain text
4257 #: build/C/man3/gethostbyname.3:46
4258 msgid ""
4259 "gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno, "
4260 "herror, hstrerror, gethostbyaddr_r, gethostbyname2, gethostbyname2_r, "
4261 "gethostbyname_r, gethostent_r - get network host entry"
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man3/gethostbyname.3:50
4266 #, no-wrap
4267 msgid ""
4268 "B<#include E<lt>netdb.hE<gt>>\n"
4269 "B<extern int h_errno;>\n"
4270 msgstr ""
4271
4272 #. type: Plain text
4273 #: build/C/man3/gethostbyname.3:52
4274 #, no-wrap
4275 msgid "B<struct hostent *gethostbyname(const char *>I<name>B<);>\n"
4276 msgstr ""
4277
4278 #. type: Plain text
4279 #: build/C/man3/gethostbyname.3:56
4280 #, no-wrap
4281 msgid ""
4282 "B<#include E<lt>sys/socket.hE<gt>>       /* for AF_INET */\n"
4283 "B<struct hostent *gethostbyaddr(const void *>I<addr>B<,>\n"
4284 "B<                              socklen_t >I<len>B<, int >I<type>B<);>\n"
4285 msgstr ""
4286
4287 #. type: Plain text
4288 #: build/C/man3/gethostbyname.3:58
4289 #, no-wrap
4290 msgid "B<void sethostent(int >I<stayopen>B<);>\n"
4291 msgstr ""
4292
4293 #. type: Plain text
4294 #: build/C/man3/gethostbyname.3:60
4295 #, no-wrap
4296 msgid "B<void endhostent(void);>\n"
4297 msgstr ""
4298
4299 #. type: Plain text
4300 #: build/C/man3/gethostbyname.3:62
4301 #, no-wrap
4302 msgid "B<void herror(const char *>I<s>B<);>\n"
4303 msgstr ""
4304
4305 #. type: Plain text
4306 #: build/C/man3/gethostbyname.3:64
4307 #, no-wrap
4308 msgid "B<const char *hstrerror(int >I<err>B<);>\n"
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man3/gethostbyname.3:66
4313 #, no-wrap
4314 msgid "/* System V/POSIX extension */\n"
4315 msgstr ""
4316
4317 #. type: Plain text
4318 #: build/C/man3/gethostbyname.3:68
4319 #, no-wrap
4320 msgid "B<struct hostent *gethostent(void);>\n"
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man3/gethostbyname.3:72
4325 #, no-wrap
4326 msgid "B<struct hostent *gethostbyname2(const char *>I<name>B<, int >I<af>B<);>\n"
4327 msgstr ""
4328
4329 #. type: Plain text
4330 #: build/C/man3/gethostbyname.3:76
4331 #, no-wrap
4332 msgid ""
4333 "B<int gethostent_r(>\n"
4334 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4335 ">I<buflen>B<,>\n"
4336 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4337 msgstr ""
4338
4339 #. type: Plain text
4340 #: build/C/man3/gethostbyname.3:80
4341 #, no-wrap
4342 msgid ""
4343 "B<int gethostbyaddr_r(const void *>I<addr>B<, socklen_t >I<len>B<, int "
4344 ">I<type>B<,>\n"
4345 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4346 ">I<buflen>B<,>\n"
4347 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4348 msgstr ""
4349
4350 #. type: Plain text
4351 #: build/C/man3/gethostbyname.3:84
4352 #, no-wrap
4353 msgid ""
4354 "B<int gethostbyname_r(const char *>I<name>B<,>\n"
4355 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4356 ">I<buflen>B<,>\n"
4357 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4358 msgstr ""
4359
4360 #. type: Plain text
4361 #: build/C/man3/gethostbyname.3:88
4362 #, no-wrap
4363 msgid ""
4364 "B<int gethostbyname2_r(const char *>I<name>B<, int >I<af,>\n"
4365 "B<        struct hostent *>I<ret>B<, char *>I<buf>B<, size_t "
4366 ">I<buflen>B<,>\n"
4367 "B<        struct hostent **>I<result>B<, int *>I<h_errnop>B<);>\n"
4368 msgstr ""
4369
4370 #. type: Plain text
4371 #: build/C/man3/gethostbyname.3:102
4372 msgid ""
4373 "B<gethostbyname2>(), B<gethostent_r>(), B<gethostbyaddr_r>(), "
4374 "B<gethostbyname_r>(), B<gethostbyname2_r>():"
4375 msgstr ""
4376
4377 #. type: Plain text
4378 #: 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
4379 msgid "_BSD_SOURCE || _SVID_SOURCE"
4380 msgstr ""
4381
4382 #. type: Plain text
4383 #: build/C/man3/gethostbyname.3:108
4384 msgid "B<herror>(), B<hstrerror>():"
4385 msgstr ""
4386
4387 #. type: TP
4388 #: build/C/man3/gethostbyname.3:109
4389 #, no-wrap
4390 msgid "Since glibc 2.8:"
4391 msgstr ""
4392
4393 #. type: TP
4394 #: build/C/man3/gethostbyname.3:112
4395 #, no-wrap
4396 msgid "Before glibc 2.8:"
4397 msgstr ""
4398
4399 #. type: Plain text
4400 #: build/C/man3/gethostbyname.3:115 build/C/man3/gethostbyname.3:126
4401 msgid "none"
4402 msgstr ""
4403
4404 #. type: Plain text
4405 #: build/C/man3/gethostbyname.3:118
4406 msgid "B<h_errno>:"
4407 msgstr ""
4408
4409 #. type: TP
4410 #: build/C/man3/gethostbyname.3:119
4411 #, no-wrap
4412 msgid "Since glibc 2.12:"
4413 msgstr ""
4414
4415 #. type: Plain text
4416 #: build/C/man3/gethostbyname.3:123
4417 #, no-wrap
4418 msgid ""
4419 "_BSD_SOURCE || _SVID_SOURCE ||\n"
4420 "    (_POSIX_C_SOURCE E<lt> 200809L && _XOPEN_SOURCE E<lt> 700)\n"
4421 msgstr ""
4422
4423 #. type: TP
4424 #: build/C/man3/gethostbyname.3:123
4425 #, no-wrap
4426 msgid "Before glibc 2.12:"
4427 msgstr ""
4428
4429 #. type: Plain text
4430 #: build/C/man3/gethostbyname.3:143
4431 msgid ""
4432 "The B<gethostbyname*>(), B<gethostbyaddr*>(), B<herror>(), and "
4433 "B<hstrerror>()  functions are obsolete.  Applications should use "
4434 "B<getaddrinfo>(3), B<getnameinfo>(3), and B<gai_strerror>(3)  instead."
4435 msgstr ""
4436
4437 #. type: Plain text
4438 #: build/C/man3/gethostbyname.3:184
4439 msgid ""
4440 "The B<gethostbyname>()  function returns a structure of type I<hostent> for "
4441 "the given host I<name>.  Here I<name> is either a hostname, or an IPv4 "
4442 "address in standard dot notation (as for B<inet_addr>(3)), or an IPv6 "
4443 "address in colon (and possibly dot) notation.  (See RFC\\ 1884 for the "
4444 "description of IPv6 addresses.)  If I<name> is an IPv4 or IPv6 address, no "
4445 "lookup is performed and B<gethostbyname>()  simply copies I<name> into the "
4446 "I<h_name> field and its I<struct in_addr> equivalent into the "
4447 "I<h_addr_list[0]> field of the returned I<hostent> structure.  If I<name> "
4448 "doesn't end in a dot and the environment variable B<HOSTALIASES> is set, the "
4449 "alias file pointed to by B<HOSTALIASES> will first be searched for I<name> "
4450 "(see B<hostname>(7)  for the file format).  The current domain and its "
4451 "parents are searched unless I<name> ends in a dot."
4452 msgstr ""
4453
4454 #. type: Plain text
4455 #: build/C/man3/gethostbyname.3:200
4456 msgid ""
4457 "The B<gethostbyaddr>()  function returns a structure of type I<hostent> for "
4458 "the given host address I<addr> of length I<len> and address type I<type>.  "
4459 "Valid address types are B<AF_INET> and B<AF_INET6>.  The host address "
4460 "argument is a pointer to a struct of a type depending on the address type, "
4461 "for example a I<struct in_addr *> (probably obtained via a call to "
4462 "B<inet_addr>(3))  for address type B<AF_INET>."
4463 msgstr ""
4464
4465 #. type: Plain text
4466 #: build/C/man3/gethostbyname.3:207
4467 msgid ""
4468 "The B<sethostent>()  function specifies, if I<stayopen> is true (1), that a "
4469 "connected TCP socket should be used for the name server queries and that the "
4470 "connection should remain open during successive queries.  Otherwise, name "
4471 "server queries will use UDP datagrams."
4472 msgstr ""
4473
4474 #. type: Plain text
4475 #: build/C/man3/gethostbyname.3:212
4476 msgid ""
4477 "The B<endhostent>()  function ends the use of a TCP connection for name "
4478 "server queries."
4479 msgstr ""
4480
4481 #. type: Plain text
4482 #: build/C/man3/gethostbyname.3:217
4483 msgid ""
4484 "The (obsolete)  B<herror>()  function prints the error message associated "
4485 "with the current value of I<h_errno> on I<stderr>."
4486 msgstr ""
4487
4488 #. type: Plain text
4489 #: build/C/man3/gethostbyname.3:222
4490 msgid ""
4491 "The (obsolete)  B<hstrerror>()  function takes an error number (typically "
4492 "I<h_errno>) and returns the corresponding message string."
4493 msgstr ""
4494
4495 #.  (See
4496 #.  .BR resolv+ (8)).
4497 #. type: Plain text
4498 #: build/C/man3/gethostbyname.3:239
4499 msgid ""
4500 "The domain name queries carried out by B<gethostbyname>()  and "
4501 "B<gethostbyaddr>()  use a combination of any or all of the name server "
4502 "B<named>(8), a broken out line from I</etc/hosts>, and the Network "
4503 "Information Service (NIS or YP), depending upon the contents of the I<order> "
4504 "line in I</etc/host.conf>.  The default action is to query B<named>(8), "
4505 "followed by I</etc/hosts>."
4506 msgstr ""
4507
4508 #. type: Plain text
4509 #: build/C/man3/gethostbyname.3:241
4510 msgid "The I<hostent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
4511 msgstr ""
4512
4513 #. type: Plain text
4514 #: build/C/man3/gethostbyname.3:253
4515 #, no-wrap
4516 msgid ""
4517 "struct hostent {\n"
4518 "    char  *h_name;            /* official name of host */\n"
4519 "    char **h_aliases;         /* alias list */\n"
4520 "    int    h_addrtype;        /* host address type */\n"
4521 "    int    h_length;          /* length of address */\n"
4522 "    char **h_addr_list;       /* list of addresses */\n"
4523 "}\n"
4524 "#define h_addr h_addr_list[0] /* for backward compatibility */\n"
4525 msgstr ""
4526
4527 #. type: Plain text
4528 #: build/C/man3/gethostbyname.3:257
4529 msgid "The members of the I<hostent> structure are:"
4530 msgstr ""
4531
4532 #. type: TP
4533 #: build/C/man3/gethostbyname.3:257 build/C/man3/getipnodebyname.3:210
4534 #, no-wrap
4535 msgid "I<h_name>"
4536 msgstr ""
4537
4538 #. type: Plain text
4539 #: build/C/man3/gethostbyname.3:260
4540 msgid "The official name of the host."
4541 msgstr ""
4542
4543 #. type: TP
4544 #: build/C/man3/gethostbyname.3:260 build/C/man3/getipnodebyname.3:213
4545 #, no-wrap
4546 msgid "I<h_aliases>"
4547 msgstr ""
4548
4549 #. type: Plain text
4550 #: build/C/man3/gethostbyname.3:263
4551 msgid "An array of alternative names for the host, terminated by a null pointer."
4552 msgstr ""
4553
4554 #. type: TP
4555 #: build/C/man3/gethostbyname.3:263 build/C/man3/getipnodebyname.3:217
4556 #, no-wrap
4557 msgid "I<h_addrtype>"
4558 msgstr ""
4559
4560 #. type: Plain text
4561 #: build/C/man3/gethostbyname.3:270
4562 msgid "The type of address; always B<AF_INET> or B<AF_INET6> at present."
4563 msgstr ""
4564
4565 #. type: TP
4566 #: build/C/man3/gethostbyname.3:270 build/C/man3/getipnodebyname.3:239
4567 #, no-wrap
4568 msgid "I<h_length>"
4569 msgstr ""
4570
4571 #. type: Plain text
4572 #: build/C/man3/gethostbyname.3:273
4573 msgid "The length of the address in bytes."
4574 msgstr ""
4575
4576 #. type: TP
4577 #: build/C/man3/gethostbyname.3:273 build/C/man3/getipnodebyname.3:253
4578 #, no-wrap
4579 msgid "I<h_addr_list>"
4580 msgstr ""
4581
4582 #. type: Plain text
4583 #: build/C/man3/gethostbyname.3:277
4584 msgid ""
4585 "An array of pointers to network addresses for the host (in network byte "
4586 "order), terminated by a null pointer."
4587 msgstr ""
4588
4589 #. type: TP
4590 #: build/C/man3/gethostbyname.3:277
4591 #, no-wrap
4592 msgid "I<h_addr>"
4593 msgstr ""
4594
4595 #. type: Plain text
4596 #: build/C/man3/gethostbyname.3:280
4597 msgid "The first address in I<h_addr_list> for backward compatibility."
4598 msgstr ""
4599
4600 #. type: Plain text
4601 #: build/C/man3/gethostbyname.3:292
4602 msgid ""
4603 "The B<gethostbyname>()  and B<gethostbyaddr>()  functions return the "
4604 "I<hostent> structure or a null pointer if an error occurs.  On error, the "
4605 "I<h_errno> variable holds an error number.  When non-NULL, the return value "
4606 "may point at static data, see the notes below."
4607 msgstr ""
4608
4609 #. type: Plain text
4610 #: build/C/man3/gethostbyname.3:294
4611 msgid "The variable I<h_errno> can have the following values:"
4612 msgstr ""
4613
4614 #. type: TP
4615 #: build/C/man3/gethostbyname.3:294 build/C/man3/getipnodebyname.3:190
4616 #, no-wrap
4617 msgid "B<HOST_NOT_FOUND>"
4618 msgstr ""
4619
4620 #. type: Plain text
4621 #: build/C/man3/gethostbyname.3:297
4622 msgid "The specified host is unknown."
4623 msgstr ""
4624
4625 #. type: TP
4626 #: build/C/man3/gethostbyname.3:297
4627 #, no-wrap
4628 msgid "B<NO_ADDRESS> or B<NO_DATA>"
4629 msgstr ""
4630
4631 #. type: Plain text
4632 #: build/C/man3/gethostbyname.3:300
4633 msgid "The requested name is valid but does not have an IP address."
4634 msgstr ""
4635
4636 #. type: TP
4637 #: build/C/man3/gethostbyname.3:300 build/C/man3/getipnodebyname.3:199
4638 #, no-wrap
4639 msgid "B<NO_RECOVERY>"
4640 msgstr ""
4641
4642 #. type: Plain text
4643 #: build/C/man3/gethostbyname.3:303
4644 msgid "A nonrecoverable name server error occurred."
4645 msgstr ""
4646
4647 #. type: TP
4648 #: build/C/man3/gethostbyname.3:303 build/C/man3/getipnodebyname.3:202
4649 #, no-wrap
4650 msgid "B<TRY_AGAIN>"
4651 msgstr ""
4652
4653 #. type: Plain text
4654 #: build/C/man3/gethostbyname.3:307
4655 msgid ""
4656 "A temporary error occurred on an authoritative name server.  Try again "
4657 "later."
4658 msgstr ""
4659
4660 #. type: TP
4661 #: build/C/man3/gethostbyname.3:308 build/C/man5/host.conf.5:181
4662 #, no-wrap
4663 msgid "I</etc/host.conf>"
4664 msgstr ""
4665
4666 #. type: Plain text
4667 #: build/C/man3/gethostbyname.3:311
4668 msgid "resolver configuration file"
4669 msgstr ""
4670
4671 #. type: Plain text
4672 #: build/C/man3/gethostbyname.3:311 build/C/man5/host.conf.5:187 build/C/man5/hosts.5:88
4673 #, no-wrap
4674 msgid "I</etc/hosts>"
4675 msgstr ""
4676
4677 #. type: Plain text
4678 #: build/C/man3/gethostbyname.3:314
4679 msgid "host database file"
4680 msgstr ""
4681
4682 #. type: Plain text
4683 #: build/C/man3/gethostbyname.3:314 build/C/man5/nsswitch.conf.5:306 build/C/man3/setnetgrent.3:92
4684 #, no-wrap
4685 msgid "I</etc/nsswitch.conf>"
4686 msgstr ""
4687
4688 #. type: Plain text
4689 #: build/C/man3/gethostbyname.3:317
4690 msgid "name service switch configuration"
4691 msgstr ""
4692
4693 #. type: Plain text
4694 #: build/C/man3/gethostbyname.3:341
4695 msgid ""
4696 "POSIX.1-2001 specifies B<gethostbyname>(), B<gethostbyaddr>(), "
4697 "B<sethostent>(), B<endhostent>(), B<gethostent>(), and I<h_errno>; "
4698 "B<gethostbyname>(), B<gethostbyaddr>(), and I<h_errno> are marked "
4699 "obsolescent in that standard.  POSIX.1-2008 removes the specifications of "
4700 "B<gethostbyname>(), B<gethostbyaddr>(), and I<h_errno>, recommending the use "
4701 "of B<getaddrinfo>(3)  and B<getnameinfo>(3)  instead."
4702 msgstr ""
4703
4704 #. type: Plain text
4705 #: build/C/man3/gethostbyname.3:351
4706 msgid ""
4707 "The functions B<gethostbyname>()  and B<gethostbyaddr>()  may return "
4708 "pointers to static data, which may be overwritten by later calls.  Copying "
4709 "the I<struct hostent> does not suffice, since it contains pointers; a deep "
4710 "copy is required."
4711 msgstr ""
4712
4713 #. type: Plain text
4714 #: build/C/man3/gethostbyname.3:375
4715 msgid ""
4716 "In the original BSD implementation the I<len> argument of B<gethostbyname>()  "
4717 "was an I<int>.  The SUSv2 standard is buggy and declares the I<len> argument "
4718 "of B<gethostbyaddr>()  to be of type I<size_t>.  (That is wrong, because it "
4719 "has to be I<int>, and I<size_t> is not.  POSIX.1-2001 makes it I<socklen_t>, "
4720 "which is OK.)  See also B<accept>(2)."
4721 msgstr ""
4722
4723 #. type: Plain text
4724 #: build/C/man3/gethostbyname.3:381
4725 msgid ""
4726 "The BSD prototype for B<gethostbyaddr>()  uses I<const char\\ *> for the "
4727 "first argument."
4728 msgstr ""
4729
4730 #. type: SS
4731 #: build/C/man3/gethostbyname.3:381
4732 #, no-wrap
4733 msgid "System V/POSIX extension"
4734 msgstr ""
4735
4736 #.  e.g., Linux, FreeBSD, UnixWare, HP-UX
4737 #.  e.g., FreeBSD, AIX
4738 #. type: Plain text
4739 #: build/C/man3/gethostbyname.3:398
4740 msgid ""
4741 "POSIX requires the B<gethostent>()  call, that should return the next entry "
4742 "in the host data base.  When using DNS/BIND this does not make much sense, "
4743 "but it may be reasonable if the host data base is a file that can be read "
4744 "line by line.  On many systems a routine of this name reads from the file "
4745 "I</etc/hosts>.  It may be available only when the library was built without "
4746 "DNS support.  The glibc version will ignore ipv6 entries.  This function is "
4747 "not reentrant, and glibc adds a reentrant version B<gethostent_r>()."
4748 msgstr ""
4749
4750 #. type: SS
4751 #: build/C/man3/gethostbyname.3:398
4752 #, no-wrap
4753 msgid "GNU extensions"
4754 msgstr ""
4755
4756 #. type: Plain text
4757 #: build/C/man3/gethostbyname.3:404
4758 msgid ""
4759 "Glibc2 also has a B<gethostbyname2>()  that works like B<gethostbyname>(), "
4760 "but permits to specify the address family to which the address must belong."
4761 msgstr ""
4762
4763 #. type: Plain text
4764 #: build/C/man3/gethostbyname.3:438
4765 msgid ""
4766 "Glibc2 also has reentrant versions B<gethostent_r>(), B<gethostbyaddr_r>(), "
4767 "B<gethostbyname_r>()  and B<gethostbyname2_r>().  The caller supplies a "
4768 "I<hostent> structure I<ret> which will be filled in on success, and a "
4769 "temporary work buffer I<buf> of size I<buflen>.  After the call, I<result> "
4770 "will point to the result on success.  In case of an error or if no entry is "
4771 "found I<result> will be NULL.  The functions return 0 on success and a "
4772 "nonzero error number on failure.  In addition to the errors returned by the "
4773 "nonreentrant versions of these functions, if I<buf> is too small, the "
4774 "functions will return B<ERANGE>, and the call should be retried with a "
4775 "larger buffer.  The global variable I<h_errno> is not modified, but the "
4776 "address of a variable in which to store error numbers is passed in "
4777 "I<h_errnop>."
4778 msgstr ""
4779
4780 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973
4781 #. type: Plain text
4782 #: build/C/man3/gethostbyname.3:443
4783 msgid ""
4784 "B<gethostbyname>()  does not recognize components of a dotted IPv4 address "
4785 "string that are expressed in hexadecimal."
4786 msgstr ""
4787
4788 #.  .BR getipnodebyaddr (3),
4789 #.  .BR getipnodebyname (3),
4790 #. type: Plain text
4791 #: build/C/man3/gethostbyname.3:455
4792 msgid ""
4793 "B<getaddrinfo>(3), B<getnameinfo>(3), B<inet>(3), B<inet_ntop>(3), "
4794 "B<inet_pton>(3), B<resolver>(3), B<hosts>(5), B<nsswitch.conf>(5), "
4795 "B<hostname>(7), B<named>(8)"
4796 msgstr ""
4797
4798 #. type: TH
4799 #: build/C/man3/getipnodebyname.3:26
4800 #, no-wrap
4801 msgid "GETIPNODEBYNAME"
4802 msgstr ""
4803
4804 #. type: TH
4805 #: build/C/man3/getipnodebyname.3:26
4806 #, no-wrap
4807 msgid "2010-09-04"
4808 msgstr ""
4809
4810 #. type: Plain text
4811 #: build/C/man3/getipnodebyname.3:30
4812 msgid ""
4813 "getipnodebyname, getipnodebyaddr, freehostent - get network hostnames and "
4814 "addresses"
4815 msgstr ""
4816
4817 #. type: Plain text
4818 #: build/C/man3/getipnodebyname.3:38
4819 #, no-wrap
4820 msgid ""
4821 "B<struct hostent *getipnodebyname(const char *>I<name>B<, int >I<af>B<,>\n"
4822 "B<                                int >I<flags>B<, int *>I<error_num>B<);>\n"
4823 msgstr ""
4824
4825 #. type: Plain text
4826 #: build/C/man3/getipnodebyname.3:41
4827 #, no-wrap
4828 msgid ""
4829 "B<struct hostent *getipnodebyaddr(const void *>I<addr>B<, size_t "
4830 ">I<len>B<,>\n"
4831 "B<                                int >I<af>B<, int *>I<error_num>B<);>\n"
4832 msgstr ""
4833
4834 #. type: Plain text
4835 #: build/C/man3/getipnodebyname.3:43
4836 #, no-wrap
4837 msgid "B<void freehostent(struct hostent *>I<ip>B<);>\n"
4838 msgstr ""
4839
4840 #. type: Plain text
4841 #: build/C/man3/getipnodebyname.3:51
4842 msgid ""
4843 "These functions are deprecated (and unavailable in glibc).  Use "
4844 "B<getaddrinfo>(3)  and B<getnameinfo>(3)  instead."
4845 msgstr ""
4846
4847 #. type: Plain text
4848 #: build/C/man3/getipnodebyname.3:59
4849 msgid ""
4850 "The B<getipnodebyname>()  and B<getipnodebyaddr>()  functions return the "
4851 "names and addresses of a network host.  These functions return a pointer to "
4852 "the following structure:"
4853 msgstr ""
4854
4855 #. type: Plain text
4856 #: build/C/man3/getipnodebyname.3:69
4857 #, no-wrap
4858 msgid ""
4859 "struct hostent {\n"
4860 "    char  *h_name;\n"
4861 "    char **h_aliases;\n"
4862 "    int    h_addrtype;\n"
4863 "    int    h_length;\n"
4864 "    char **h_addr_list;\n"
4865 "};\n"
4866 msgstr ""
4867
4868 #. type: Plain text
4869 #: build/C/man3/getipnodebyname.3:82
4870 msgid ""
4871 "These functions replace the B<gethostbyname>(3)  and B<gethostbyaddr>(3)  "
4872 "functions, which could access only the IPv4 network address family.  The "
4873 "B<getipnodebyname>()  and B<getipnodebyaddr>()  functions can access "
4874 "multiple network address families."
4875 msgstr ""
4876
4877 #. type: Plain text
4878 #: build/C/man3/getipnodebyname.3:93
4879 msgid ""
4880 "Unlike the B<gethostby> functions, these functions return pointers to "
4881 "dynamically allocated memory.  The B<freehostent>()  function is used to "
4882 "release the dynamically allocated memory after the caller no longer needs "
4883 "the I<hostent> structure."
4884 msgstr ""
4885
4886 #. type: SS
4887 #: build/C/man3/getipnodebyname.3:93
4888 #, no-wrap
4889 msgid "getipnodebyname() arguments"
4890 msgstr ""
4891
4892 #. type: Plain text
4893 #: build/C/man3/getipnodebyname.3:104
4894 msgid ""
4895 "The B<getipnodebyname>()  function looks up network addresses for the host "
4896 "specified by the I<name> argument.  The I<af> argument specifies one of the "
4897 "following values:"
4898 msgstr ""
4899
4900 #. type: TP
4901 #: 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
4902 #, no-wrap
4903 msgid "B<AF_INET>"
4904 msgstr ""
4905
4906 #. type: Plain text
4907 #: build/C/man3/getipnodebyname.3:110
4908 msgid ""
4909 "The I<name> argument points to a dotted-quad IPv4 address or a name of an "
4910 "IPv4 network host."
4911 msgstr ""
4912
4913 #. type: TP
4914 #: 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
4915 #, no-wrap
4916 msgid "B<AF_INET6>"
4917 msgstr ""
4918
4919 #. type: Plain text
4920 #: build/C/man3/getipnodebyname.3:116
4921 msgid ""
4922 "The I<name> argument points to a hexadecimal IPv6 address or a name of an "
4923 "IPv6 network host."
4924 msgstr ""
4925
4926 #. type: Plain text
4927 #: build/C/man3/getipnodebyname.3:125
4928 msgid ""
4929 "The I<flags> argument specifies additional options.  More than one option "
4930 "can be specified by bitwise OR-ing them together.  I<flags> should be set to "
4931 "0 if no options are desired."
4932 msgstr ""
4933
4934 #. type: TP
4935 #: build/C/man3/getipnodebyname.3:125
4936 #, no-wrap
4937 msgid "B<AI_V4MAPPED>"
4938 msgstr ""
4939
4940 #. type: Plain text
4941 #: build/C/man3/getipnodebyname.3:132
4942 msgid ""
4943 "This flag is used with B<AF_INET6> to request a query for IPv4 addresses "
4944 "instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 "
4945 "addresses."
4946 msgstr ""
4947
4948 #. type: TP
4949 #: build/C/man3/getipnodebyname.3:132
4950 #, no-wrap
4951 msgid "B<AI_ALL>"
4952 msgstr ""
4953
4954 #. type: Plain text
4955 #: build/C/man3/getipnodebyname.3:138
4956 msgid ""
4957 "This flag is used with B<AI_V4MAPPED> to request a query for both IPv4 and "
4958 "IPv6 addresses.  Any IPv4 address found will be mapped to an IPv6 address."
4959 msgstr ""
4960
4961 #. type: TP
4962 #: build/C/man3/getipnodebyname.3:138
4963 #, no-wrap
4964 msgid "B<AI_ADDRCONFIG>"
4965 msgstr ""
4966
4967 #. type: Plain text
4968 #: build/C/man3/getipnodebyname.3:150
4969 msgid ""
4970 "This flag is used with B<AF_INET6> to further request that queries for IPv6 "
4971 "addresses should not be made unless the system has at least one IPv6 address "
4972 "assigned to a network interface, and that queries for IPv4 addresses should "
4973 "not be made unless the system has at least one IPv4 address assigned to a "
4974 "network interface.  This flag may be used by itself or with the "
4975 "B<AI_V4MAPPED> flag."
4976 msgstr ""
4977
4978 #. type: TP
4979 #: build/C/man3/getipnodebyname.3:150
4980 #, no-wrap
4981 msgid "B<AI_DEFAULT>"
4982 msgstr ""
4983
4984 #. type: Plain text
4985 #: build/C/man3/getipnodebyname.3:154
4986 msgid "This flag is equivalent to B<(AI_ADDRCONFIG | AI_V4MAPPED)>."
4987 msgstr ""
4988
4989 #. type: SS
4990 #: build/C/man3/getipnodebyname.3:154
4991 #, no-wrap
4992 msgid "getipnodebyaddr() arguments"
4993 msgstr ""
4994
4995 #. type: Plain text
4996 #: build/C/man3/getipnodebyname.3:166
4997 msgid ""
4998 "The B<getipnodebyaddr>()  function looks up the name of the host whose "
4999 "network address is specified by the I<addr> argument.  The I<af> argument "
5000 "specifies one of the following values:"
5001 msgstr ""
5002
5003 #. type: Plain text
5004 #: build/C/man3/getipnodebyname.3:176
5005 msgid ""
5006 "The I<addr> argument points to a I<struct in_addr> and I<len> must be set to "
5007 "I<sizeof(struct in_addr)>."
5008 msgstr ""
5009
5010 #. type: Plain text
5011 #: build/C/man3/getipnodebyname.3:186
5012 msgid ""
5013 "The I<addr> argument points to a I<struct in6_addr> and I<len> must be set "
5014 "to I<sizeof(struct in6_addr)>."
5015 msgstr ""
5016
5017 #. type: Plain text
5018 #: build/C/man3/getipnodebyname.3:190
5019 msgid ""
5020 "NULL is returned if an error occurred, and I<error_num> will contain an "
5021 "error code from the following list:"
5022 msgstr ""
5023
5024 #. type: Plain text
5025 #: build/C/man3/getipnodebyname.3:193
5026 msgid "The hostname or network address was not found."
5027 msgstr ""
5028
5029 #. type: TP
5030 #: build/C/man3/getipnodebyname.3:193
5031 #, no-wrap
5032 msgid "B<NO_ADDRESS>"
5033 msgstr ""
5034
5035 #. type: Plain text
5036 #: build/C/man3/getipnodebyname.3:199
5037 msgid ""
5038 "The domain name server recognized the network address or name, but no answer "
5039 "was returned.  This can happen if the network host has only IPv4 addresses "
5040 "and a request has been made for IPv6 information only, or vice versa."
5041 msgstr ""
5042
5043 #. type: Plain text
5044 #: build/C/man3/getipnodebyname.3:202
5045 msgid "The domain name server returned a permanent failure response."
5046 msgstr ""
5047
5048 #. type: Plain text
5049 #: build/C/man3/getipnodebyname.3:206
5050 msgid ""
5051 "The domain name server returned a temporary failure response.  You might "
5052 "have better luck next time."
5053 msgstr ""
5054
5055 #. type: Plain text
5056 #: build/C/man3/getipnodebyname.3:210
5057 msgid ""
5058 "A successful query returns a pointer to a I<hostent> structure that contains "
5059 "the following fields:"
5060 msgstr ""
5061
5062 #. type: Plain text
5063 #: build/C/man3/getipnodebyname.3:213
5064 msgid "This is the official name of this network host."
5065 msgstr ""
5066
5067 #. type: Plain text
5068 #: build/C/man3/getipnodebyname.3:217
5069 msgid ""
5070 "This is an array of pointers to unofficial aliases for the same host.  The "
5071 "array is terminated by a null pointer."
5072 msgstr ""
5073
5074 #. type: Plain text
5075 #: build/C/man3/getipnodebyname.3:239
5076 msgid ""
5077 "This is a copy of the I<af> argument to B<getipnodebyname>()  or "
5078 "B<getipnodebyaddr>().  I<h_addrtype> will always be B<AF_INET> if the I<af> "
5079 "argument was B<AF_INET>.  I<h_addrtype> will always be B<AF_INET6> if the "
5080 "I<af> argument was B<AF_INET6>."
5081 msgstr ""
5082
5083 #. type: Plain text
5084 #: build/C/man3/getipnodebyname.3:253
5085 msgid ""
5086 "This field will be set to I<sizeof(struct in_addr)> if I<h_addrtype> is "
5087 "B<AF_INET>, and to I<sizeof(struct in6_addr)> if I<h_addrtype> is "
5088 "B<AF_INET6>."
5089 msgstr ""
5090
5091 #. type: Plain text
5092 #: build/C/man3/getipnodebyname.3:258
5093 msgid ""
5094 "This is an array of one or more pointers to network address structures for "
5095 "the network host.  The array is terminated by a null pointer."
5096 msgstr ""
5097
5098 #.  Not in POSIX.1-2001.
5099 #. type: Plain text
5100 #: build/C/man3/getipnodebyname.3:261
5101 msgid "RFC\\ 2553."
5102 msgstr ""
5103
5104 #. type: Plain text
5105 #: build/C/man3/getipnodebyname.3:266
5106 msgid ""
5107 "These functions were present in glibc 2.1.91-95, but were removed again.  "
5108 "Several UNIX-like systems support them, but all call them deprecated."
5109 msgstr ""
5110
5111 #. type: Plain text
5112 #: build/C/man3/getipnodebyname.3:270
5113 msgid "B<getaddrinfo>(3), B<getnameinfo>(3), B<inet_ntop>(3), B<inet_pton>(3)"
5114 msgstr ""
5115
5116 #. type: TH
5117 #: build/C/man3/getnameinfo.3:10
5118 #, no-wrap
5119 msgid "GETNAMEINFO"
5120 msgstr ""
5121
5122 #. type: Plain text
5123 #: build/C/man3/getnameinfo.3:13
5124 msgid "getnameinfo - address-to-name translation in protocol-independent manner"
5125 msgstr ""
5126
5127 #. type: Plain text
5128 #: build/C/man3/getnameinfo.3:17
5129 #, no-wrap
5130 msgid ""
5131 "B<#include E<lt>sys/socket.hE<gt>>\n"
5132 "B<#include E<lt>netdb.hE<gt>>\n"
5133 msgstr ""
5134
5135 #. type: Plain text
5136 #: build/C/man3/getnameinfo.3:21
5137 #, no-wrap
5138 msgid ""
5139 "B<int getnameinfo(const struct sockaddr *>I<sa>B<, socklen_t >I<salen>B<,>\n"
5140 "B<                char *>I<host>B<, socklen_t >I<hostlen>B<,>\n"
5141 "B<                char *>I<serv>B<, socklen_t >I<servlen>B<, int "
5142 ">I<flags>B<);>\n"
5143 msgstr ""
5144
5145 #. type: Plain text
5146 #: build/C/man3/getnameinfo.3:31
5147 msgid ""
5148 "B<getnameinfo>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
5149 "_POSIX_SOURCE"
5150 msgstr ""
5151
5152 #. type: Plain text
5153 #: build/C/man3/getnameinfo.3:47
5154 msgid ""
5155 "The B<getnameinfo>()  function is the inverse of B<getaddrinfo>(3): it "
5156 "converts a socket address to a corresponding host and service, in a "
5157 "protocol-independent manner.  It combines the functionality of "
5158 "B<gethostbyaddr>(3)  and B<getservbyport>(3), but unlike those functions, "
5159 "B<getnameinfo>()  is reentrant and allows programs to eliminate "
5160 "IPv4-versus-IPv6 dependencies."
5161 msgstr ""
5162
5163 #. type: Plain text
5164 #: build/C/man3/getnameinfo.3:70
5165 msgid ""
5166 "The I<sa> argument is a pointer to a generic socket address structure (of "
5167 "type I<sockaddr_in> or I<sockaddr_in6>)  of size I<salen> that holds the "
5168 "input IP address and port number.  The arguments I<host> and I<serv> are "
5169 "pointers to caller-allocated buffers (of size I<hostlen> and I<servlen> "
5170 "respectively) into which B<getnameinfo>()  places null-terminated strings "
5171 "containing the host and service names respectively."
5172 msgstr ""
5173
5174 #. type: Plain text
5175 #: build/C/man3/getnameinfo.3:83
5176 msgid ""
5177 "The caller can specify that no hostname (or no service name)  is required by "
5178 "providing a NULL I<host> (or I<serv>)  argument or a zero I<hostlen> (or "
5179 "I<servlen>)  argument.  However, at least one of hostname or service name "
5180 "must be requested."
5181 msgstr ""
5182
5183 #. type: Plain text
5184 #: build/C/man3/getnameinfo.3:89
5185 msgid "The I<flags> argument modifies the behavior of B<getnameinfo>()  as follows:"
5186 msgstr ""
5187
5188 #. type: TP
5189 #: build/C/man3/getnameinfo.3:89
5190 #, no-wrap
5191 msgid "B<NI_NAMEREQD>"
5192 msgstr ""
5193
5194 #. type: Plain text
5195 #: build/C/man3/getnameinfo.3:92
5196 msgid "If set, then an error is returned if the hostname cannot be determined."
5197 msgstr ""
5198
5199 #. type: TP
5200 #: build/C/man3/getnameinfo.3:92
5201 #, no-wrap
5202 msgid "B<NI_DGRAM>"
5203 msgstr ""
5204
5205 #. type: Plain text
5206 #: build/C/man3/getnameinfo.3:98
5207 msgid ""
5208 "If set, then the service is datagram (UDP) based rather than stream (TCP) "
5209 "based.  This is required for the few ports (512-514)  that have different "
5210 "services for UDP and TCP."
5211 msgstr ""
5212
5213 #. type: TP
5214 #: build/C/man3/getnameinfo.3:98
5215 #, no-wrap
5216 msgid "B<NI_NOFQDN>"
5217 msgstr ""
5218
5219 #. type: Plain text
5220 #: build/C/man3/getnameinfo.3:102
5221 msgid ""
5222 "If set, return only the hostname part of the fully qualified domain name for "
5223 "local hosts."
5224 msgstr ""
5225
5226 #. type: TP
5227 #: build/C/man3/getnameinfo.3:102
5228 #, no-wrap
5229 msgid "B<NI_NUMERICHOST>"
5230 msgstr ""
5231
5232 #.  For example, by calling
5233 #.  .BR inet_ntop ()
5234 #.  instead of
5235 #.  .BR gethostbyaddr ().
5236 #.  POSIX.1-2003 has NI_NUMERICSCOPE, but glibc doesn't have it.
5237 #. type: Plain text
5238 #: build/C/man3/getnameinfo.3:112
5239 msgid ""
5240 "If set, then the numeric form of the hostname is returned.  (When not set, "
5241 "this will still happen in case the node's name cannot be determined.)"
5242 msgstr ""
5243
5244 #. type: TP
5245 #: build/C/man3/getnameinfo.3:112
5246 #, no-wrap
5247 msgid "B<NI_NUMERICSERV>"
5248 msgstr ""
5249
5250 #. type: Plain text
5251 #: build/C/man3/getnameinfo.3:117
5252 msgid ""
5253 "If set, then the numeric form of the service address is returned.  (When not "
5254 "set, this will still happen in case the service's name cannot be "
5255 "determined.)"
5256 msgstr ""
5257
5258 #. type: SS
5259 #: build/C/man3/getnameinfo.3:117
5260 #, no-wrap
5261 msgid "Extensions to getnameinfo() for Internationalized Domain Names"
5262 msgstr ""
5263
5264 #. type: Plain text
5265 #: build/C/man3/getnameinfo.3:126
5266 msgid ""
5267 "Starting with glibc 2.3.4, B<getnameinfo>()  has been extended to "
5268 "selectively allow hostnames to be transparently converted to and from the "
5269 "Internationalized Domain Name (IDN) format (see RFC 3490, "
5270 "I<Internationalizing Domain Names in Applications (IDNA)>).  Three new flags "
5271 "are defined:"
5272 msgstr ""
5273
5274 #. type: TP
5275 #: build/C/man3/getnameinfo.3:126
5276 #, no-wrap
5277 msgid "B<NI_IDN>"
5278 msgstr ""
5279
5280 #. type: Plain text
5281 #: build/C/man3/getnameinfo.3:132
5282 msgid ""
5283 "If this flag is used, then the name found in the lookup process is converted "
5284 "from IDN format to the locale's encoding if necessary.  ASCII-only names are "
5285 "not affected by the conversion, which makes this flag usable in existing "
5286 "programs and environments."
5287 msgstr ""
5288
5289 #. type: TP
5290 #: build/C/man3/getnameinfo.3:132
5291 #, no-wrap
5292 msgid "B<NI_IDN_ALLOW_UNASSIGNED>, B<NI_IDN_USE_STD3_ASCII_RULES>"
5293 msgstr ""
5294
5295 #.  FIXME glibc defines the following additional errors, some which
5296 #.  can probably be returned by getnameinfo(); they need to
5297 #.  be documented.
5298 #.  #ifdef __USE_GNU
5299 #.  #define EAI_INPROGRESS  -100  /* Processing request in progress.  */
5300 #.  #define EAI_CANCELED    -101  /* Request canceled.  */
5301 #.  #define EAI_NOTCANCELED -102  /* Request not canceled.  */
5302 #.  #define EAI_ALLDONE     -103  /* All requests done.  */
5303 #.  #define EAI_INTR        -104  /* Interrupted by a signal.  */
5304 #.  #define EAI_IDN_ENCODE  -105  /* IDN encoding failed.  */
5305 #.  #endif
5306 #. type: Plain text
5307 #: build/C/man3/getnameinfo.3:155
5308 msgid ""
5309 "On success 0 is returned, and node and service names, if requested, are "
5310 "filled with null-terminated strings, possibly truncated to fit the specified "
5311 "buffer lengths.  On error, one of the following nonzero error codes is "
5312 "returned:"
5313 msgstr ""
5314
5315 #. type: Plain text
5316 #: build/C/man3/getnameinfo.3:159
5317 msgid "The name could not be resolved at this time.  Try again later."
5318 msgstr ""
5319
5320 #. type: Plain text
5321 #: build/C/man3/getnameinfo.3:164
5322 msgid "The I<flags> argument has an invalid value."
5323 msgstr ""
5324
5325 #. type: Plain text
5326 #: build/C/man3/getnameinfo.3:167
5327 msgid "A nonrecoverable error occurred."
5328 msgstr ""
5329
5330 #. type: Plain text
5331 #: build/C/man3/getnameinfo.3:171
5332 msgid ""
5333 "The address family was not recognized, or the address length was invalid for "
5334 "the specified family."
5335 msgstr ""
5336
5337 #. type: Plain text
5338 #: build/C/man3/getnameinfo.3:180
5339 msgid ""
5340 "The name does not resolve for the supplied arguments.  B<NI_NAMEREQD> is set "
5341 "and the host's name cannot be located, or neither hostname nor service name "
5342 "were requested."
5343 msgstr ""
5344
5345 #. type: TP
5346 #: build/C/man3/getnameinfo.3:180
5347 #, no-wrap
5348 msgid "B<EAI_OVERFLOW>"
5349 msgstr ""
5350
5351 #. type: Plain text
5352 #: build/C/man3/getnameinfo.3:187
5353 msgid "The buffer pointed to by I<host> or I<serv> was too small."
5354 msgstr ""
5355
5356 #. type: Plain text
5357 #: build/C/man3/getnameinfo.3:192
5358 msgid "A system error occurred.  The error code can be found in I<errno>."
5359 msgstr ""
5360
5361 #. type: Plain text
5362 #: build/C/man3/getnameinfo.3:199
5363 msgid "/etc/hosts"
5364 msgstr ""
5365
5366 #. type: Plain text
5367 #: build/C/man3/getnameinfo.3:201
5368 msgid "/etc/nsswitch.conf"
5369 msgstr ""
5370
5371 #. type: Plain text
5372 #: build/C/man3/getnameinfo.3:203
5373 msgid "/etc/resolv.conf"
5374 msgstr ""
5375
5376 #. type: Plain text
5377 #: build/C/man3/getnameinfo.3:206
5378 msgid "B<getnameinfo>()  is provided in glibc since version 2.1."
5379 msgstr ""
5380
5381 #. type: Plain text
5382 #: build/C/man3/getnameinfo.3:208
5383 msgid "RFC\\ 2553, POSIX.1-2001."
5384 msgstr ""
5385
5386 #. type: Plain text
5387 #: build/C/man3/getnameinfo.3:213
5388 msgid ""
5389 "In order to assist the programmer in choosing reasonable sizes for the "
5390 "supplied buffers, I<E<lt>netdb.hE<gt>> defines the constants"
5391 msgstr ""
5392
5393 #. type: Plain text
5394 #: build/C/man3/getnameinfo.3:218
5395 #, no-wrap
5396 msgid ""
5397 "#define NI_MAXHOST      1025\n"
5398 "#define NI_MAXSERV      32\n"
5399 msgstr ""
5400
5401 #. type: Plain text
5402 #: build/C/man3/getnameinfo.3:228
5403 msgid ""
5404 "Since glibc 2.8, these definitions are exposed only if one of the feature "
5405 "test macros B<_BSD_SOURCE>, B<_SVID_SOURCE>, or B<_GNU_SOURCE> is defined."
5406 msgstr ""
5407
5408 #. type: Plain text
5409 #: build/C/man3/getnameinfo.3:236
5410 msgid ""
5411 "The former is the constant B<MAXDNAME> in recent versions of BIND's "
5412 "I<E<lt>arpa/nameser.hE<gt>> header file.  The latter is a guess based on the "
5413 "services listed in the current Assigned Numbers RFC."
5414 msgstr ""
5415
5416 #. type: Plain text
5417 #: build/C/man3/getnameinfo.3:243
5418 msgid ""
5419 "Before glibc version 2.2, the I<hostlen> and I<servlen> arguments were typed "
5420 "as I<size_t>."
5421 msgstr ""
5422
5423 #. type: Plain text
5424 #: build/C/man3/getnameinfo.3:248
5425 msgid ""
5426 "The following code tries to get the numeric hostname and service name, for a "
5427 "given socket address.  Note that there is no hardcoded reference to a "
5428 "particular address family."
5429 msgstr ""
5430
5431 #. type: Plain text
5432 #: build/C/man3/getnameinfo.3:254
5433 #, no-wrap
5434 msgid ""
5435 "struct sockaddr *sa;    /* input */\n"
5436 "socklen_t len;         /* input */\n"
5437 "char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];\n"
5438 msgstr ""
5439
5440 #. type: Plain text
5441 #: build/C/man3/getnameinfo.3:258
5442 #, no-wrap
5443 msgid ""
5444 "if (getnameinfo(sa, len, hbuf, sizeof(hbuf), sbuf,\n"
5445 "            sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0)\n"
5446 "    printf(\"host=%s, serv=%s\\en\", hbuf, sbuf);\n"
5447 msgstr ""
5448
5449 #. type: Plain text
5450 #: build/C/man3/getnameinfo.3:263
5451 msgid ""
5452 "The following version checks if the socket address has a reverse address "
5453 "mapping."
5454 msgstr ""
5455
5456 #. type: Plain text
5457 #: build/C/man3/getnameinfo.3:269
5458 #, no-wrap
5459 msgid ""
5460 "struct sockaddr *sa;    /* input */\n"
5461 "socklen_t len;         /* input */\n"
5462 "char hbuf[NI_MAXHOST];\n"
5463 msgstr ""
5464
5465 #. type: Plain text
5466 #: build/C/man3/getnameinfo.3:275
5467 #, no-wrap
5468 msgid ""
5469 "if (getnameinfo(sa, len, hbuf, sizeof(hbuf),\n"
5470 "            NULL, 0, NI_NAMEREQD))\n"
5471 "    printf(\"could not resolve hostname\");\n"
5472 "else\n"
5473 "    printf(\"host=%s\\en\", hbuf);\n"
5474 msgstr ""
5475
5476 #. type: Plain text
5477 #: build/C/man3/getnameinfo.3:282
5478 msgid ""
5479 "An example program using B<getnameinfo>()  can be found in "
5480 "B<getaddrinfo>(3)."
5481 msgstr ""
5482
5483 #. type: Plain text
5484 #: build/C/man3/getnameinfo.3:297
5485 msgid ""
5486 "B<accept>(2), B<getpeername>(2), B<getsockname>(2), B<recvfrom>(2), "
5487 "B<socket>(2), B<getaddrinfo>(3), B<gethostbyaddr>(3), B<getservbyname>(3), "
5488 "B<getservbyport>(3), B<inet_ntop>(3), B<hosts>(5), B<services>(5), "
5489 "B<hostname>(7), B<named>(8)"
5490 msgstr ""
5491
5492 #. type: Plain text
5493 #: build/C/man3/getnameinfo.3:301
5494 msgid ""
5495 "R. Gilligan, S. Thomson, J. Bound and W. Stevens, I<Basic Socket Interface "
5496 "Extensions for IPv6>, RFC\\ 2553, March 1999."
5497 msgstr ""
5498
5499 #. type: Plain text
5500 #: build/C/man3/getnameinfo.3:307
5501 msgid ""
5502 "Tatsuya Jinmei and Atsushi Onoe, I<An Extension of Format for IPv6 Scoped "
5503 "Addresses>, internet draft, work in progress E<.UR "
5504 "ftp://ftp.ietf.org\\:/internet-drafts\\:/draft-ietf-ipngwg-scopedaddr-format-02.txt> "
5505 "E<.UE .>"
5506 msgstr ""
5507
5508 #. type: Plain text
5509 #: build/C/man3/getnameinfo.3:312
5510 msgid ""
5511 "Craig Metz, I<Protocol Independence Using the Sockets API>, Proceedings of "
5512 "the freenix track: 2000 USENIX annual technical conference, June 2000"
5513 msgstr ""
5514
5515 #. type: Plain text
5516 #: build/C/man3/getnameinfo.3:314
5517 msgid ""
5518 "E<.UR "
5519 "http://www.usenix.org\\:/publications\\:/library\\:/proceedings\\:/usenix2000\\:/freenix\\:/metzprotocol.html> "
5520 "E<.UE .>"
5521 msgstr ""
5522
5523 #. type: TH
5524 #: build/C/man3/getnetent.3:30
5525 #, no-wrap
5526 msgid "GETNETENT"
5527 msgstr ""
5528
5529 #. type: TH
5530 #: build/C/man3/getnetent.3:30 build/C/man3/getprotoent.3:30 build/C/man3/getservent.3:34
5531 #, no-wrap
5532 msgid "2008-08-19"
5533 msgstr ""
5534
5535 #. type: Plain text
5536 #: build/C/man3/getnetent.3:34
5537 msgid ""
5538 "getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent - get network "
5539 "entry"
5540 msgstr ""
5541
5542 #. type: Plain text
5543 #: 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
5544 #, no-wrap
5545 msgid "B<#include E<lt>netdb.hE<gt>>\n"
5546 msgstr ""
5547
5548 #. type: Plain text
5549 #: build/C/man3/getnetent.3:39
5550 #, no-wrap
5551 msgid "B<struct netent *getnetent(void);>\n"
5552 msgstr ""
5553
5554 #. type: Plain text
5555 #: build/C/man3/getnetent.3:41
5556 #, no-wrap
5557 msgid "B<struct netent *getnetbyname(const char *>I<name>B<);>\n"
5558 msgstr ""
5559
5560 #. type: Plain text
5561 #: build/C/man3/getnetent.3:43
5562 #, no-wrap
5563 msgid "B<struct netent *getnetbyaddr(uint32_t >I<net>B<, int >I<type>B<);>\n"
5564 msgstr ""
5565
5566 #. type: Plain text
5567 #: build/C/man3/getnetent.3:45
5568 #, no-wrap
5569 msgid "B<void setnetent(int >I<stayopen>B<);>\n"
5570 msgstr ""
5571
5572 #. type: Plain text
5573 #: build/C/man3/getnetent.3:47
5574 #, no-wrap
5575 msgid "B<void endnetent(void);>\n"
5576 msgstr ""
5577
5578 #. type: Plain text
5579 #: build/C/man3/getnetent.3:57
5580 msgid ""
5581 "The B<getnetent>()  function reads the next entry from the networks database "
5582 "and returns a I<netent> structure containing the broken-out fields from the "
5583 "entry.  A connection is opened to the database if necessary."
5584 msgstr ""
5585
5586 #. type: Plain text
5587 #: build/C/man3/getnetent.3:66
5588 msgid ""
5589 "The B<getnetbyname>()  function returns a I<netent> structure for the entry "
5590 "from the database that matches the network I<name>."
5591 msgstr ""
5592
5593 #. type: Plain text
5594 #: build/C/man3/getnetent.3:80
5595 msgid ""
5596 "The B<getnetbyaddr>()  function returns a I<netent> structure for the entry "
5597 "from the database that matches the network number I<net> of type I<type>.  "
5598 "The I<net> argument must be in host byte order."
5599 msgstr ""
5600
5601 #. type: Plain text
5602 #: build/C/man3/getnetent.3:92
5603 msgid ""
5604 "The B<setnetent>()  function opens a connection to the database, and sets "
5605 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
5606 "connection to the database will not be closed between calls to one of the "
5607 "B<getnet*>()  functions."
5608 msgstr ""
5609
5610 #. type: Plain text
5611 #: build/C/man3/getnetent.3:96
5612 msgid "The B<endnetent>()  function closes the connection to the database."
5613 msgstr ""
5614
5615 #. type: Plain text
5616 #: build/C/man3/getnetent.3:102
5617 msgid "The I<netent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
5618 msgstr ""
5619
5620 #. type: Plain text
5621 #: build/C/man3/getnetent.3:111
5622 #, no-wrap
5623 msgid ""
5624 "struct netent {\n"
5625 "    char      *n_name;     /* official network name */\n"
5626 "    char     **n_aliases;  /* alias list */\n"
5627 "    int        n_addrtype; /* net address type */\n"
5628 "    uint32_t   n_net;      /* network number */\n"
5629 "}\n"
5630 msgstr ""
5631
5632 #. type: Plain text
5633 #: build/C/man3/getnetent.3:117
5634 msgid "The members of the I<netent> structure are:"
5635 msgstr ""
5636
5637 #. type: TP
5638 #: build/C/man3/getnetent.3:117
5639 #, no-wrap
5640 msgid "I<n_name>"
5641 msgstr ""
5642
5643 #. type: Plain text
5644 #: build/C/man3/getnetent.3:120
5645 msgid "The official name of the network."
5646 msgstr ""
5647
5648 #. type: TP
5649 #: build/C/man3/getnetent.3:120
5650 #, no-wrap
5651 msgid "I<n_aliases>"
5652 msgstr ""
5653
5654 #. type: Plain text
5655 #: build/C/man3/getnetent.3:123
5656 msgid "A NULL-terminated list of alternative names for the network."
5657 msgstr ""
5658
5659 #. type: TP
5660 #: build/C/man3/getnetent.3:123
5661 #, no-wrap
5662 msgid "I<n_addrtype>"
5663 msgstr ""
5664
5665 #. type: Plain text
5666 #: build/C/man3/getnetent.3:127
5667 msgid "The type of the network number; always B<AF_INET>."
5668 msgstr ""
5669
5670 #. type: TP
5671 #: build/C/man3/getnetent.3:127
5672 #, no-wrap
5673 msgid "I<n_net>"
5674 msgstr ""
5675
5676 #. type: Plain text
5677 #: build/C/man3/getnetent.3:130
5678 msgid "The network number in host byte order."
5679 msgstr ""
5680
5681 #. type: Plain text
5682 #: build/C/man3/getnetent.3:141
5683 msgid ""
5684 "The B<getnetent>(), B<getnetbyname>()  and B<getnetbyaddr>()  functions "
5685 "return a pointer to a statically allocated I<netent> structure, or a null "
5686 "pointer if an error occurs or the end of the file is reached."
5687 msgstr ""
5688
5689 #. type: TP
5690 #: build/C/man3/getnetent.3:142 build/C/man5/networks.5:71
5691 #, no-wrap
5692 msgid "I</etc/networks>"
5693 msgstr ""
5694
5695 #. type: Plain text
5696 #: build/C/man3/getnetent.3:145
5697 msgid "networks database file"
5698 msgstr ""
5699
5700 #. type: Plain text
5701 #: build/C/man3/getnetent.3:147 build/C/man3/getprotoent.3:142 build/C/man3/getservent.3:159
5702 msgid "4.3BSD, POSIX.1-2001."
5703 msgstr ""
5704
5705 #. type: Plain text
5706 #: build/C/man3/getnetent.3:154
5707 msgid ""
5708 "In glibc versions before 2.2, the I<net> argument of B<getnetbyaddr>()  was "
5709 "of type I<long>."
5710 msgstr ""
5711
5712 #.  .BR networks (5)
5713 #. type: Plain text
5714 #: build/C/man3/getnetent.3:159
5715 msgid "B<getnetent_r>(3), B<getprotoent>(3), B<getservent>(3)"
5716 msgstr ""
5717
5718 #. type: Plain text
5719 #: build/C/man3/getnetent.3:160
5720 msgid "RFC\\ 1101"
5721 msgstr ""
5722
5723 #. type: TH
5724 #: build/C/man3/getnetent_r.3:26
5725 #, no-wrap
5726 msgid "GETNETENT_R"
5727 msgstr ""
5728
5729 #. type: Plain text
5730 #: build/C/man3/getnetent_r.3:30
5731 msgid "getnetent_r, getnetbyname_r, getnetbyaddr_r - get network entry (reentrant)"
5732 msgstr ""
5733
5734 #. type: Plain text
5735 #: build/C/man3/getnetent_r.3:37
5736 #, no-wrap
5737 msgid ""
5738 "B<int getnetent_r(struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5739 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5740 "B<                int *>I<h_errnop>B<);>\n"
5741 msgstr ""
5742
5743 #. type: Plain text
5744 #: build/C/man3/getnetent_r.3:42
5745 #, no-wrap
5746 msgid ""
5747 "B<int getnetbyname_r(const char *>I<name>B<,>\n"
5748 "B<                struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5749 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5750 "B<                int *>I<h_errnop>B<);>\n"
5751 msgstr ""
5752
5753 #. type: Plain text
5754 #: build/C/man3/getnetent_r.3:47
5755 #, no-wrap
5756 msgid ""
5757 "B<int getnetbyaddr_r(uint32_t >I<net>B<, int >I<type>B<,>\n"
5758 "B<                struct netent *>I<result_buf>B<, char *>I<buf>B<,>\n"
5759 "B<                size_t >I<buflen>B<, struct netent **>I<result>B<,>\n"
5760 "B<                int *>I<h_errnop>B<);>\n"
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man3/getnetent_r.3:58
5765 msgid "B<getnetent_r>(), B<getnetbyname_r>(), B<getnetbyaddr_r>():"
5766 msgstr ""
5767
5768 #. type: Plain text
5769 #: build/C/man3/getnetent_r.3:79
5770 msgid ""
5771 "The B<getnetent_r>(), B<getnetbyname_r>(), and B<getnetbyaddr_r>()  "
5772 "functions are the reentrant equivalents of, respectively, B<getnetent>(3), "
5773 "B<getnetbyname>(3), and B<getnetbynumber>(3).  They differ in the way that "
5774 "the I<netent> structure is returned, and in the function calling signature "
5775 "and return value.  This manual page describes just the differences from the "
5776 "nonreentrant functions."
5777 msgstr ""
5778
5779 #. type: Plain text
5780 #: build/C/man3/getnetent_r.3:85
5781 msgid ""
5782 "Instead of returning a pointer to a statically allocated I<netent> structure "
5783 "as the function result, these functions copy the structure into the location "
5784 "pointed to by I<result_buf>."
5785 msgstr ""
5786
5787 #.  I can find no information on the required/recommended buffer size;
5788 #.  the nonreentrant functions use a 1024 byte buffer -- mtk.
5789 #. type: Plain text
5790 #: build/C/man3/getnetent_r.3:102
5791 msgid ""
5792 "The I<buf> array is used to store the string fields pointed to by the "
5793 "returned I<netent> structure.  (The nonreentrant functions allocate these "
5794 "strings in static storage.)  The size of this array is specified in "
5795 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
5796 "and the caller must try again with a larger buffer.  (A buffer of length "
5797 "1024 bytes should be sufficient for most applications.)"
5798 msgstr ""
5799
5800 #. type: Plain text
5801 #: build/C/man3/getnetent_r.3:110
5802 msgid ""
5803 "If the function call successfully obtains a network record, then I<*result> "
5804 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
5805 msgstr ""
5806
5807 #.  getnetent.3 doesn't document any use of h_errno, but nevertheless
5808 #.  the nonreentrant functions no seem to set h_errno.
5809 #. type: Plain text
5810 #: build/C/man3/getnetent_r.3:118
5811 msgid ""
5812 "The buffer pointed to by I<h_errnop> is used to return the value that would "
5813 "be stored in the global variable I<h_errno> by the nonreentrant versions of "
5814 "these functions."
5815 msgstr ""
5816
5817 #. type: Plain text
5818 #: build/C/man3/getnetent_r.3:121 build/C/man3/getprotoent_r.3:111
5819 msgid ""
5820 "On success, these functions return 0.  On error, they return one of the "
5821 "positive error numbers listed in ERRORS."
5822 msgstr ""
5823
5824 #. type: Plain text
5825 #: build/C/man3/getnetent_r.3:129
5826 msgid ""
5827 "On error, record not found (B<getnetbyname_r>(), B<getnetbyaddr_r>()), or "
5828 "end of input (B<getnetent_r>())  I<result> is set to NULL."
5829 msgstr ""
5830
5831 #. type: Plain text
5832 #: build/C/man3/getnetent_r.3:134
5833 msgid "(B<getnetent_r>())  No more records in database."
5834 msgstr ""
5835
5836 #. type: TP
5837 #: build/C/man3/getnetent_r.3:134 build/C/man3/getprotoent_r.3:124 build/C/man3/getservent_r.3:123
5838 #, no-wrap
5839 msgid "B<ERANGE>"
5840 msgstr ""
5841
5842 #. type: Plain text
5843 #: build/C/man3/getnetent_r.3:141 build/C/man3/getprotoent_r.3:131 build/C/man3/getservent_r.3:130
5844 msgid ""
5845 "I<buf> is too small.  Try again with a larger buffer (and increased "
5846 "I<buflen>)."
5847 msgstr ""
5848
5849 #. type: Plain text
5850 #: build/C/man3/getnetent_r.3:145 build/C/man3/getprotoent_r.3:135 build/C/man3/getservent_r.3:134
5851 msgid ""
5852 "These functions are GNU extensions.  Functions with similar names exist on "
5853 "some other systems, though typically with different calling signatures."
5854 msgstr ""
5855
5856 #. type: Plain text
5857 #: build/C/man3/getnetent_r.3:147
5858 msgid "B<getnetent>(3), B<networks>(5)"
5859 msgstr ""
5860
5861 #. type: TH
5862 #: build/C/man2/getpeername.2:42
5863 #, no-wrap
5864 msgid "GETPEERNAME"
5865 msgstr ""
5866
5867 #. type: TH
5868 #: build/C/man2/getpeername.2:42 build/C/man5/nsswitch.conf.5:25
5869 #, no-wrap
5870 msgid "2013-02-12"
5871 msgstr ""
5872
5873 #. type: Plain text
5874 #: build/C/man2/getpeername.2:45
5875 msgid "getpeername - get name of connected peer socket"
5876 msgstr ""
5877
5878 #. type: Plain text
5879 #: build/C/man2/getpeername.2:50
5880 msgid ""
5881 "B<int getpeername(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t "
5882 "*>I<addrlen>B<);>"
5883 msgstr ""
5884
5885 #. type: Plain text
5886 #: build/C/man2/getpeername.2:63
5887 msgid ""
5888 "B<getpeername>()  returns the address of the peer connected to the socket "
5889 "I<sockfd>, in the buffer pointed to by I<addr>.  The I<addrlen> argument "
5890 "should be initialized to indicate the amount of space pointed to by "
5891 "I<addr>.  On return it contains the actual size of the name returned (in "
5892 "bytes).  The name is truncated if the buffer provided is too small."
5893 msgstr ""
5894
5895 #. type: Plain text
5896 #: build/C/man2/getpeername.2:68
5897 msgid ""
5898 "The returned address is truncated if the buffer provided is too small; in "
5899 "this case, I<addrlen> will return a value greater than was supplied to the "
5900 "call."
5901 msgstr ""
5902
5903 #. type: Plain text
5904 #: build/C/man2/getpeername.2:73 build/C/man2/shutdown.2:74
5905 msgid ""
5906 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5907 "appropriately."
5908 msgstr ""
5909
5910 #. type: TP
5911 #: build/C/man2/getpeername.2:74 build/C/man2/shutdown.2:75
5912 #, no-wrap
5913 msgid "B<EBADF>"
5914 msgstr ""
5915
5916 #. type: Plain text
5917 #: build/C/man2/getpeername.2:79
5918 msgid "The argument I<sockfd> is not a valid descriptor."
5919 msgstr ""
5920
5921 #. type: TP
5922 #: build/C/man2/getpeername.2:79 build/C/man7/packet.7:500 build/C/man7/raw.7:149 build/C/man7/unix.7:419
5923 #, no-wrap
5924 msgid "B<EFAULT>"
5925 msgstr ""
5926
5927 #. type: Plain text
5928 #: build/C/man2/getpeername.2:85
5929 msgid ""
5930 "The I<addr> argument points to memory not in a valid part of the process "
5931 "address space."
5932 msgstr ""
5933
5934 #. type: Plain text
5935 #: build/C/man2/getpeername.2:89
5936 msgid "I<addrlen> is invalid (e.g., is negative)."
5937 msgstr ""
5938
5939 #. type: TP
5940 #: build/C/man2/getpeername.2:89 build/C/man7/packet.7:512
5941 #, no-wrap
5942 msgid "B<ENOBUFS>"
5943 msgstr ""
5944
5945 #. type: Plain text
5946 #: build/C/man2/getpeername.2:93
5947 msgid ""
5948 "Insufficient resources were available in the system to perform the "
5949 "operation."
5950 msgstr ""
5951
5952 #. type: Plain text
5953 #: build/C/man2/getpeername.2:96
5954 msgid "The socket is not connected."
5955 msgstr ""
5956
5957 #. type: TP
5958 #: build/C/man2/getpeername.2:96 build/C/man2/shutdown.2:87
5959 #, no-wrap
5960 msgid "B<ENOTSOCK>"
5961 msgstr ""
5962
5963 #. type: Plain text
5964 #: build/C/man2/getpeername.2:101
5965 msgid "The argument I<sockfd> is a file, not a socket."
5966 msgstr ""
5967
5968 #. type: Plain text
5969 #: build/C/man2/getpeername.2:105
5970 msgid ""
5971 "SVr4, 4.4BSD (the B<getpeername>()  function call first appeared in 4.2BSD), "
5972 "POSIX.1-2001."
5973 msgstr ""
5974
5975 #. type: Plain text
5976 #: build/C/man2/getpeername.2:116
5977 msgid ""
5978 "The third argument of B<getpeername>()  is in reality an I<int\\ *> (and "
5979 "this is what 4.x BSD and libc4 and libc5 have).  Some POSIX confusion "
5980 "resulted in the present I<socklen_t>, also used by glibc.  See also "
5981 "B<accept>(2)."
5982 msgstr ""
5983
5984 #. type: Plain text
5985 #: build/C/man2/getpeername.2:143
5986 msgid ""
5987 "For stream sockets, once a B<connect>(2)  has been performed, either socket "
5988 "can call B<getpeername>()  to obtain the address of the peer socket.  On the "
5989 "other hand, datagram sockets are connectionless.  Calling B<connect>(2)  on "
5990 "a datagram socket merely sets the peer address for outgoing datagrams sent "
5991 "with B<write>(2)  or B<recv>(2).  The caller of B<connect>(2)  can use "
5992 "B<getpeername>()  to obtain the peer address that it earlier set for the "
5993 "socket.  However, the peer socket is unaware of this information, and "
5994 "calling B<getpeername>()  on the peer socket will return no useful "
5995 "information (unless a B<connect>(2)  call was also executed on the peer).  "
5996 "Note also that the receiver of a datagram can obtain the address of the "
5997 "sender when using B<recvfrom>(2)."
5998 msgstr ""
5999
6000 #. type: Plain text
6001 #: build/C/man2/getpeername.2:149
6002 msgid ""
6003 "B<accept>(2), B<bind>(2), B<getsockname>(2), B<ip>(7), B<socket>(7), "
6004 "B<unix>(7)"
6005 msgstr ""
6006
6007 #. type: TH
6008 #: build/C/man3/getprotoent.3:30
6009 #, no-wrap
6010 msgid "GETPROTOENT"
6011 msgstr ""
6012
6013 #. type: Plain text
6014 #: build/C/man3/getprotoent.3:34
6015 msgid ""
6016 "getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent - "
6017 "get protocol entry"
6018 msgstr ""
6019
6020 #. type: Plain text
6021 #: build/C/man3/getprotoent.3:39
6022 #, no-wrap
6023 msgid "B<struct protoent *getprotoent(void);>\n"
6024 msgstr ""
6025
6026 #. type: Plain text
6027 #: build/C/man3/getprotoent.3:41
6028 #, no-wrap
6029 msgid "B<struct protoent *getprotobyname(const char *>I<name>B<);>\n"
6030 msgstr ""
6031
6032 #. type: Plain text
6033 #: build/C/man3/getprotoent.3:43
6034 #, no-wrap
6035 msgid "B<struct protoent *getprotobynumber(int >I<proto>B<);>\n"
6036 msgstr ""
6037
6038 #. type: Plain text
6039 #: build/C/man3/getprotoent.3:45
6040 #, no-wrap
6041 msgid "B<void setprotoent(int >I<stayopen>B<);>\n"
6042 msgstr ""
6043
6044 #. type: Plain text
6045 #: build/C/man3/getprotoent.3:47
6046 #, no-wrap
6047 msgid "B<void endprotoent(void);>\n"
6048 msgstr ""
6049
6050 #. type: Plain text
6051 #: build/C/man3/getprotoent.3:58
6052 msgid ""
6053 "The B<getprotoent>()  function reads the next entry from the protocols "
6054 "database (see B<protocols>(5))  and returns a I<protoent> structure "
6055 "containing the broken-out fields from the entry.  A connection is opened to "
6056 "the database if necessary."
6057 msgstr ""
6058
6059 #. type: Plain text
6060 #: build/C/man3/getprotoent.3:68
6061 msgid ""
6062 "The B<getprotobyname>()  function returns a I<protoent> structure for the "
6063 "entry from the database that matches the protocol name I<name>.  A "
6064 "connection is opened to the database if necessary."
6065 msgstr ""
6066
6067 #. type: Plain text
6068 #: build/C/man3/getprotoent.3:78
6069 msgid ""
6070 "The B<getprotobynumber>()  function returns a I<protoent> structure for the "
6071 "entry from the database that matches the protocol number I<number>.  A "
6072 "connection is opened to the database if necessary."
6073 msgstr ""
6074
6075 #. type: Plain text
6076 #: build/C/man3/getprotoent.3:90
6077 msgid ""
6078 "The B<setprotoent>()  function opens a connection to the database, and sets "
6079 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
6080 "connection to the database will not be closed between calls to one of the "
6081 "B<getproto*>()  functions."
6082 msgstr ""
6083
6084 #. type: Plain text
6085 #: build/C/man3/getprotoent.3:94
6086 msgid "The B<endprotoent>()  function closes the connection to the database."
6087 msgstr ""
6088
6089 #. type: Plain text
6090 #: build/C/man3/getprotoent.3:100
6091 msgid "The I<protoent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
6092 msgstr ""
6093
6094 #. type: Plain text
6095 #: build/C/man3/getprotoent.3:108
6096 #, no-wrap
6097 msgid ""
6098 "struct protoent {\n"
6099 "    char  *p_name;       /* official protocol name */\n"
6100 "    char **p_aliases;    /* alias list */\n"
6101 "    int    p_proto;      /* protocol number */\n"
6102 "}\n"
6103 msgstr ""
6104
6105 #. type: Plain text
6106 #: build/C/man3/getprotoent.3:114
6107 msgid "The members of the I<protoent> structure are:"
6108 msgstr ""
6109
6110 #. type: TP
6111 #: build/C/man3/getprotoent.3:114
6112 #, no-wrap
6113 msgid "I<p_name>"
6114 msgstr ""
6115
6116 #. type: Plain text
6117 #: build/C/man3/getprotoent.3:117
6118 msgid "The official name of the protocol."
6119 msgstr ""
6120
6121 #. type: TP
6122 #: build/C/man3/getprotoent.3:117
6123 #, no-wrap
6124 msgid "I<p_aliases>"
6125 msgstr ""
6126
6127 #. type: Plain text
6128 #: build/C/man3/getprotoent.3:120
6129 msgid "A NULL-terminated list of alternative names for the protocol."
6130 msgstr ""
6131
6132 #. type: TP
6133 #: build/C/man3/getprotoent.3:120
6134 #, no-wrap
6135 msgid "I<p_proto>"
6136 msgstr ""
6137
6138 #. type: Plain text
6139 #: build/C/man3/getprotoent.3:123
6140 msgid "The protocol number."
6141 msgstr ""
6142
6143 #. type: Plain text
6144 #: build/C/man3/getprotoent.3:134
6145 msgid ""
6146 "The B<getprotoent>(), B<getprotobyname>()  and B<getprotobynumber>()  "
6147 "functions return a pointer to a statically allocated I<protoent> structure, "
6148 "or a null pointer if an error occurs or the end of the file is reached."
6149 msgstr ""
6150
6151 #. type: TP
6152 #: build/C/man3/getprotoent.3:136 build/C/man5/protocols.5:78
6153 #, no-wrap
6154 msgid "I</etc/protocols>"
6155 msgstr ""
6156
6157 #. type: Plain text
6158 #: build/C/man3/getprotoent.3:139
6159 msgid "protocol database file"
6160 msgstr ""
6161
6162 #. type: Plain text
6163 #: build/C/man3/getprotoent.3:146
6164 msgid "B<getnetent>(3), B<getprotoent_r>(3), B<getservent>(3), B<protocols>(5)"
6165 msgstr ""
6166
6167 #. type: TH
6168 #: build/C/man3/getprotoent_r.3:26
6169 #, no-wrap
6170 msgid "GETPROTOENT_R"
6171 msgstr ""
6172
6173 #. type: Plain text
6174 #: build/C/man3/getprotoent_r.3:30
6175 msgid ""
6176 "getprotoent_r, getprotobyname_r, getprotobynumber_r - get protocol entry "
6177 "(reentrant)"
6178 msgstr ""
6179
6180 #. type: Plain text
6181 #: build/C/man3/getprotoent_r.3:36
6182 #, no-wrap
6183 msgid ""
6184 "B<int getprotoent_r(struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6185 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6186 msgstr ""
6187
6188 #. type: Plain text
6189 #: build/C/man3/getprotoent_r.3:40
6190 #, no-wrap
6191 msgid ""
6192 "B<int getprotobyname_r(const char *>I<name>B<,>\n"
6193 "B<                struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6194 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6195 msgstr ""
6196
6197 #. type: Plain text
6198 #: build/C/man3/getprotoent_r.3:44
6199 #, no-wrap
6200 msgid ""
6201 "B<int getprotobynumber_r(int >I<proto>B<,>\n"
6202 "B<                struct protoent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6203 "B<                size_t >I<buflen>B<, struct protoent **>I<result>B<);>\n"
6204 msgstr ""
6205
6206 #. type: Plain text
6207 #: build/C/man3/getprotoent_r.3:55
6208 msgid "B<getprotoent_r>(), B<getprotobyname_r>(), B<getprotobynumber_r>():"
6209 msgstr ""
6210
6211 #. type: Plain text
6212 #: build/C/man3/getprotoent_r.3:76
6213 msgid ""
6214 "The B<getprotoent_r>(), B<getprotobyname_r>(), and B<getprotobynumber_r>()  "
6215 "functions are the reentrant equivalents of, respectively, B<getprotoent>(3), "
6216 "B<getprotobyname>(3), and B<getprotobynumber>(3).  They differ in the way "
6217 "that the I<protoent> structure is returned, and in the function calling "
6218 "signature and return value.  This manual page describes just the differences "
6219 "from the nonreentrant functions."
6220 msgstr ""
6221
6222 #. type: Plain text
6223 #: build/C/man3/getprotoent_r.3:82
6224 msgid ""
6225 "Instead of returning a pointer to a statically allocated I<protoent> "
6226 "structure as the function result, these functions copy the structure into "
6227 "the location pointed to by I<result_buf>."
6228 msgstr ""
6229
6230 #.  I can find no information on the required/recommended buffer size;
6231 #.  the nonreentrant functions use a 1024 byte buffer.
6232 #.  The 1024 byte value is also what the Solaris man page suggests. -- mtk
6233 #. type: Plain text
6234 #: build/C/man3/getprotoent_r.3:100
6235 msgid ""
6236 "The I<buf> array is used to store the string fields pointed to by the "
6237 "returned I<protoent> structure.  (The nonreentrant functions allocate these "
6238 "strings in static storage.)  The size of this array is specified in "
6239 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
6240 "and the caller must try again with a larger buffer.  (A buffer of length "
6241 "1024 bytes should be sufficient for most applications.)"
6242 msgstr ""
6243
6244 #. type: Plain text
6245 #: build/C/man3/getprotoent_r.3:108
6246 msgid ""
6247 "If the function call successfully obtains a protocol record, then I<*result> "
6248 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
6249 msgstr ""
6250
6251 #. type: Plain text
6252 #: build/C/man3/getprotoent_r.3:119
6253 msgid ""
6254 "On error, record not found (B<getprotobyname_r>(), B<getprotobynumber_r>()), "
6255 "or end of input (B<getprotoent_r>())  I<result> is set to NULL."
6256 msgstr ""
6257
6258 #. type: Plain text
6259 #: build/C/man3/getprotoent_r.3:124
6260 msgid "(B<getprotoent_r>())  No more records in database."
6261 msgstr ""
6262
6263 #. type: Plain text
6264 #: build/C/man3/getprotoent_r.3:149
6265 msgid ""
6266 "The program below uses B<getprotobyname_r>()  to retrieve the protocol "
6267 "record for the protocol named in its first command-line argument.  If a "
6268 "second (integer) command-line argument is supplied, it is used as the "
6269 "initial value for I<buflen>; if B<getprotobyname_r>()  fails with the error "
6270 "B<ERANGE>, the program retries with larger buffer sizes.  The following "
6271 "shell session shows a couple of sample runs:"
6272 msgstr ""
6273
6274 #. type: Plain text
6275 #: build/C/man3/getprotoent_r.3:160
6276 #, no-wrap
6277 msgid ""
6278 "$B< ./a.out tcp 1>\n"
6279 "ERANGE! Retrying with larger buffer\n"
6280 "getprotobyname_r() returned: 0 (success)  (buflen=78)\n"
6281 "p_name=tcp; p_proto=6; aliases=TCP\n"
6282 "$B< ./a.out xxx 1>\n"
6283 "ERANGE! Retrying with larger buffer\n"
6284 "getprotobyname_r() returned: 0 (success)  (buflen=100)\n"
6285 "Call failed/record not found\n"
6286 msgstr ""
6287
6288 #. type: Plain text
6289 #: build/C/man3/getprotoent_r.3:172 build/C/man3/getservent_r.3:170
6290 #, no-wrap
6291 msgid ""
6292 "#define _GNU_SOURCE\n"
6293 "#include E<lt>ctype.hE<gt>\n"
6294 "#include E<lt>netdb.hE<gt>\n"
6295 "#include E<lt>stdlib.hE<gt>\n"
6296 "#include E<lt>stdio.hE<gt>\n"
6297 "#include E<lt>errno.hE<gt>\n"
6298 "#include E<lt>string.hE<gt>\n"
6299 msgstr ""
6300
6301 #. type: Plain text
6302 #: build/C/man3/getprotoent_r.3:174 build/C/man3/getservent_r.3:172
6303 #, no-wrap
6304 msgid "#define MAX_BUF 10000\n"
6305 msgstr ""
6306
6307 #. type: Plain text
6308 #: build/C/man3/getprotoent_r.3:183
6309 #, no-wrap
6310 msgid ""
6311 "int\n"
6312 "main(int argc, char *argv[])\n"
6313 "{\n"
6314 "    int buflen, erange_cnt, s;\n"
6315 "    struct protoent result_buf;\n"
6316 "    struct protoent *result;\n"
6317 "    char buf[MAX_BUF];\n"
6318 "    char **p;\n"
6319 msgstr ""
6320
6321 #. type: Plain text
6322 #: build/C/man3/getprotoent_r.3:188
6323 #, no-wrap
6324 msgid ""
6325 "    if (argc E<lt> 2) {\n"
6326 "        printf(\"Usage: %s proto-name [buflen]\\en\", argv[0]);\n"
6327 "        exit(EXIT_FAILURE);\n"
6328 "    }\n"
6329 msgstr ""
6330
6331 #. type: Plain text
6332 #: build/C/man3/getprotoent_r.3:192
6333 #, no-wrap
6334 msgid ""
6335 "    buflen = 1024;\n"
6336 "    if (argc E<gt> 2)\n"
6337 "        buflen = atoi(argv[2]);\n"
6338 msgstr ""
6339
6340 #. type: Plain text
6341 #: build/C/man3/getprotoent_r.3:197 build/C/man3/getservent_r.3:200
6342 #, no-wrap
6343 msgid ""
6344 "    if (buflen E<gt> MAX_BUF) {\n"
6345 "        printf(\"Exceeded buffer limit (%d)\\en\", MAX_BUF);\n"
6346 "        exit(EXIT_FAILURE);\n"
6347 "    }\n"
6348 msgstr ""
6349
6350 #. type: Plain text
6351 #: build/C/man3/getprotoent_r.3:206
6352 #, no-wrap
6353 msgid ""
6354 "    erange_cnt = 0;\n"
6355 "    do {\n"
6356 "        s = getprotobyname_r(argv[1], &result_buf,\n"
6357 "                     buf, buflen, &result);\n"
6358 "        if (s == ERANGE) {\n"
6359 "            if (erange_cnt == 0)\n"
6360 "                printf(\"ERANGE! Retrying with larger buffer\\en\");\n"
6361 "            erange_cnt++;\n"
6362 msgstr ""
6363
6364 #. type: Plain text
6365 #: build/C/man3/getprotoent_r.3:209 build/C/man3/getservent_r.3:212
6366 #, no-wrap
6367 msgid ""
6368 "            /* Increment a byte at a time so we can see exactly\n"
6369 "               what size buffer was required */\n"
6370 msgstr ""
6371
6372 #. type: Plain text
6373 #: build/C/man3/getprotoent_r.3:211 build/C/man3/getservent_r.3:214
6374 #, no-wrap
6375 msgid "            buflen++;\n"
6376 msgstr ""
6377
6378 #. type: Plain text
6379 #: build/C/man3/getprotoent_r.3:218 build/C/man3/getservent_r.3:221
6380 #, no-wrap
6381 msgid ""
6382 "            if (buflen E<gt> MAX_BUF) {\n"
6383 "                printf(\"Exceeded buffer limit (%d)\\en\", MAX_BUF);\n"
6384 "                exit(EXIT_FAILURE);\n"
6385 "            }\n"
6386 "        }\n"
6387 "    } while (s == ERANGE);\n"
6388 msgstr ""
6389
6390 #. type: Plain text
6391 #: build/C/man3/getprotoent_r.3:222
6392 #, no-wrap
6393 msgid ""
6394 "    printf(\"getprotobyname_r() returned: %s  (buflen=%d)\\en\",\n"
6395 "            (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
6396 "            strerror(s), buflen);\n"
6397 msgstr ""
6398
6399 #. type: Plain text
6400 #: build/C/man3/getprotoent_r.3:227 build/C/man3/getservent_r.3:230
6401 #, no-wrap
6402 msgid ""
6403 "    if (s != 0 || result == NULL) {\n"
6404 "        printf(\"Call failed/record not found\\en\");\n"
6405 "        exit(EXIT_FAILURE);\n"
6406 "    }\n"
6407 msgstr ""
6408
6409 #. type: Plain text
6410 #: build/C/man3/getprotoent_r.3:233
6411 #, no-wrap
6412 msgid ""
6413 "    printf(\"p_name=%s; p_proto=%d; aliases=\",\n"
6414 "                result_buf.p_name, result_buf.p_proto);\n"
6415 "    for (p = result_buf.p_aliases; *p != NULL; p++)\n"
6416 "        printf(\"%s \", *p);\n"
6417 "    printf(\"\\en\");\n"
6418 msgstr ""
6419
6420 #. type: Plain text
6421 #: build/C/man3/getprotoent_r.3:239
6422 msgid "B<getprotoent>(3), B<protocols>(5)"
6423 msgstr ""
6424
6425 #. type: TH
6426 #: build/C/man3/getservent.3:34
6427 #, no-wrap
6428 msgid "GETSERVENT"
6429 msgstr ""
6430
6431 #. type: Plain text
6432 #: build/C/man3/getservent.3:38
6433 msgid ""
6434 "getservent, getservbyname, getservbyport, setservent, endservent - get "
6435 "service entry"
6436 msgstr ""
6437
6438 #. type: Plain text
6439 #: build/C/man3/getservent.3:43
6440 #, no-wrap
6441 msgid "B<struct servent *getservent(void);>\n"
6442 msgstr ""
6443
6444 #. type: Plain text
6445 #: build/C/man3/getservent.3:45
6446 #, no-wrap
6447 msgid ""
6448 "B<struct servent *getservbyname(const char *>I<name>B<, const char "
6449 "*>I<proto>B<);>\n"
6450 msgstr ""
6451
6452 #. type: Plain text
6453 #: build/C/man3/getservent.3:47
6454 #, no-wrap
6455 msgid "B<struct servent *getservbyport(int >I<port>B<, const char *>I<proto>B<);>\n"
6456 msgstr ""
6457
6458 #. type: Plain text
6459 #: build/C/man3/getservent.3:49
6460 #, no-wrap
6461 msgid "B<void setservent(int >I<stayopen>B<);>\n"
6462 msgstr ""
6463
6464 #. type: Plain text
6465 #: build/C/man3/getservent.3:51
6466 #, no-wrap
6467 msgid "B<void endservent(void);>\n"
6468 msgstr ""
6469
6470 #. type: Plain text
6471 #: build/C/man3/getservent.3:62
6472 msgid ""
6473 "The B<getservent>()  function reads the next entry from the services "
6474 "database (see B<services>(5))  and returns a I<servent> structure containing "
6475 "the broken-out fields from the entry.  A connection is opened to the "
6476 "database if necessary."
6477 msgstr ""
6478
6479 #. type: Plain text
6480 #: build/C/man3/getservent.3:77
6481 msgid ""
6482 "The B<getservbyname>()  function returns a I<servent> structure for the "
6483 "entry from the database that matches the service I<name> using protocol "
6484 "I<proto>.  If I<proto> is NULL, any protocol will be matched.  A connection "
6485 "is opened to the database if necessary."
6486 msgstr ""
6487
6488 #. type: Plain text
6489 #: build/C/man3/getservent.3:93
6490 msgid ""
6491 "The B<getservbyport>()  function returns a I<servent> structure for the "
6492 "entry from the database that matches the port I<port> (given in network byte "
6493 "order)  using protocol I<proto>.  If I<proto> is NULL, any protocol will be "
6494 "matched.  A connection is opened to the database if necessary."
6495 msgstr ""
6496
6497 #. type: Plain text
6498 #: build/C/man3/getservent.3:105
6499 msgid ""
6500 "The B<setservent>()  function opens a connection to the database, and sets "
6501 "the next entry to the first entry.  If I<stayopen> is nonzero, then the "
6502 "connection to the database will not be closed between calls to one of the "
6503 "B<getserv*>()  functions."
6504 msgstr ""
6505
6506 #. type: Plain text
6507 #: build/C/man3/getservent.3:109
6508 msgid "The B<endservent>()  function closes the connection to the database."
6509 msgstr ""
6510
6511 #. type: Plain text
6512 #: build/C/man3/getservent.3:115
6513 msgid "The I<servent> structure is defined in I<E<lt>netdb.hE<gt>> as follows:"
6514 msgstr ""
6515
6516 #. type: Plain text
6517 #: build/C/man3/getservent.3:124
6518 #, no-wrap
6519 msgid ""
6520 "struct servent {\n"
6521 "    char  *s_name;       /* official service name */\n"
6522 "    char **s_aliases;    /* alias list */\n"
6523 "    int    s_port;       /* port number */\n"
6524 "    char  *s_proto;      /* protocol to use */\n"
6525 "}\n"
6526 msgstr ""
6527
6528 #. type: Plain text
6529 #: build/C/man3/getservent.3:130
6530 msgid "The members of the I<servent> structure are:"
6531 msgstr ""
6532
6533 #. type: TP
6534 #: build/C/man3/getservent.3:130
6535 #, no-wrap
6536 msgid "I<s_name>"
6537 msgstr ""
6538
6539 #. type: Plain text
6540 #: build/C/man3/getservent.3:133
6541 msgid "The official name of the service."
6542 msgstr ""
6543
6544 #. type: TP
6545 #: build/C/man3/getservent.3:133
6546 #, no-wrap
6547 msgid "I<s_aliases>"
6548 msgstr ""
6549
6550 #. type: Plain text
6551 #: build/C/man3/getservent.3:136
6552 msgid "A NULL-terminated list of alternative names for the service."
6553 msgstr ""
6554
6555 #. type: TP
6556 #: build/C/man3/getservent.3:136
6557 #, no-wrap
6558 msgid "I<s_port>"
6559 msgstr ""
6560
6561 #. type: Plain text
6562 #: build/C/man3/getservent.3:139
6563 msgid "The port number for the service given in network byte order."
6564 msgstr ""
6565
6566 #. type: TP
6567 #: build/C/man3/getservent.3:139
6568 #, no-wrap
6569 msgid "I<s_proto>"
6570 msgstr ""
6571
6572 #. type: Plain text
6573 #: build/C/man3/getservent.3:142
6574 msgid "The name of the protocol to use with this service."
6575 msgstr ""
6576
6577 #. type: Plain text
6578 #: build/C/man3/getservent.3:153
6579 msgid ""
6580 "The B<getservent>(), B<getservbyname>()  and B<getservbyport>()  functions "
6581 "return a pointer to a statically allocated I<servent> structure, or NULL if "
6582 "an error occurs or the end of the file is reached."
6583 msgstr ""
6584
6585 #. type: TP
6586 #: build/C/man3/getservent.3:154 build/C/man5/services.5:186
6587 #, no-wrap
6588 msgid "I</etc/services>"
6589 msgstr ""
6590
6591 #. type: Plain text
6592 #: build/C/man3/getservent.3:157
6593 msgid "services database file"
6594 msgstr ""
6595
6596 #. type: Plain text
6597 #: build/C/man3/getservent.3:163
6598 msgid "B<getnetent>(3), B<getprotoent>(3), B<getservent_r>(3), B<services>(5)"
6599 msgstr ""
6600
6601 #. type: TH
6602 #: build/C/man3/getservent_r.3:26
6603 #, no-wrap
6604 msgid "GETSERVENT_R"
6605 msgstr ""
6606
6607 #. type: Plain text
6608 #: build/C/man3/getservent_r.3:30
6609 msgid ""
6610 "getservent_r, getservbyname_r, getservbyport_r - get service entry "
6611 "(reentrant)"
6612 msgstr ""
6613
6614 #. type: Plain text
6615 #: build/C/man3/getservent_r.3:36
6616 #, no-wrap
6617 msgid ""
6618 "B<int getservent_r(struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6619 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6620 msgstr ""
6621
6622 #. type: Plain text
6623 #: build/C/man3/getservent_r.3:40
6624 #, no-wrap
6625 msgid ""
6626 "B<int getservbyname_r(const char *>I<name>B<, const char *>I<proto>B<,>\n"
6627 "B<                struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6628 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6629 msgstr ""
6630
6631 #. type: Plain text
6632 #: build/C/man3/getservent_r.3:44
6633 #, no-wrap
6634 msgid ""
6635 "B<int getservbyport_r(int >I<port>B<, const char *>I<proto>B<,>\n"
6636 "B<                struct servent *>I<result_buf>B<, char *>I<buf>B<,>\n"
6637 "B<                size_t >I<buflen>B<, struct servent **>I<result>B<);>\n"
6638 msgstr ""
6639
6640 #. type: Plain text
6641 #: build/C/man3/getservent_r.3:55
6642 msgid "B<getservent_r>(), B<getservbyname_r>(), B<getservbyport_r>():"
6643 msgstr ""
6644
6645 #. type: Plain text
6646 #: build/C/man3/getservent_r.3:76
6647 msgid ""
6648 "The B<getservent_r>(), B<getservbyname_r>(), and B<getservbyport_r>()  "
6649 "functions are the reentrant equivalents of, respectively, B<getservent>(3), "
6650 "B<getservbyname>(3), and B<getservbyport>(3).  They differ in the way that "
6651 "the I<servent> structure is returned, and in the function calling signature "
6652 "and return value.  This manual page describes just the differences from the "
6653 "nonreentrant functions."
6654 msgstr ""
6655
6656 #. type: Plain text
6657 #: build/C/man3/getservent_r.3:82
6658 msgid ""
6659 "Instead of returning a pointer to a statically allocated I<servent> "
6660 "structure as the function result, these functions copy the structure into "
6661 "the location pointed to by I<result_buf>."
6662 msgstr ""
6663
6664 #.  I can find no information on the required/recommended buffer size;
6665 #.  the nonreentrant functions use a 1024 byte buffer -- mtk.
6666 #. type: Plain text
6667 #: build/C/man3/getservent_r.3:99
6668 msgid ""
6669 "The I<buf> array is used to store the string fields pointed to by the "
6670 "returned I<servent> structure.  (The nonreentrant functions allocate these "
6671 "strings in static storage.)  The size of this array is specified in "
6672 "I<buflen>.  If I<buf> is too small, the call fails with the error B<ERANGE>, "
6673 "and the caller must try again with a larger buffer.  (A buffer of length "
6674 "1024 bytes should be sufficient for most applications.)"
6675 msgstr ""
6676
6677 #. type: Plain text
6678 #: build/C/man3/getservent_r.3:107
6679 msgid ""
6680 "If the function call successfully obtains a service record, then I<*result> "
6681 "is set pointing to I<result_buf>; otherwise, I<*result> is set to NULL."
6682 msgstr ""
6683
6684 #. type: Plain text
6685 #: build/C/man3/getservent_r.3:110
6686 msgid ""
6687 "On success, these functions return 0.  On error, they return one of the "
6688 "positive error numbers listed in errors."
6689 msgstr ""
6690
6691 #. type: Plain text
6692 #: build/C/man3/getservent_r.3:118
6693 msgid ""
6694 "On error, record not found (B<getservbyname_r>(), B<getservbyport_r>()), or "
6695 "end of input (B<getservent_r>())  I<result> is set to NULL."
6696 msgstr ""
6697
6698 #. type: Plain text
6699 #: build/C/man3/getservent_r.3:123
6700 msgid "(B<getservent_r>())  No more records in database."
6701 msgstr ""
6702
6703 #. type: Plain text
6704 #: build/C/man3/getservent_r.3:148
6705 msgid ""
6706 "The program below uses B<getservbyport_r>()  to retrieve the service record "
6707 "for the port and protocol named in its first command-line argument.  If a "
6708 "third (integer) command-line argument is supplied, it is used as the initial "
6709 "value for I<buflen>; if B<getservbyport_r>()  fails with the error "
6710 "B<ERANGE>, the program retries with larger buffer sizes.  The following "
6711 "shell session shows a couple of sample runs:"
6712 msgstr ""
6713
6714 #. type: Plain text
6715 #: build/C/man3/getservent_r.3:158
6716 #, no-wrap
6717 msgid ""
6718 "$B< ./a.out 7 tcp 1>\n"
6719 "ERANGE! Retrying with larger buffer\n"
6720 "getservbyport_r() returned: 0 (success)  (buflen=87)\n"
6721 "s_name=echo; s_proto=tcp; s_port=7; aliases=\n"
6722 "$B< ./a.out 77777 tcp>\n"
6723 "getservbyport_r() returned: 0 (success)  (buflen=1024)\n"
6724 "Call failed/record not found\n"
6725 msgstr ""
6726
6727 #. type: Plain text
6728 #: build/C/man3/getservent_r.3:182
6729 #, no-wrap
6730 msgid ""
6731 "int\n"
6732 "main(int argc, char *argv[])\n"
6733 "{\n"
6734 "    int buflen, erange_cnt, port, s;\n"
6735 "    struct servent result_buf;\n"
6736 "    struct servent *result;\n"
6737 "    char buf[MAX_BUF];\n"
6738 "    char *protop;\n"
6739 "    char **p;\n"
6740 msgstr ""
6741
6742 #. type: Plain text
6743 #: build/C/man3/getservent_r.3:187
6744 #, no-wrap
6745 msgid ""
6746 "    if (argc E<lt> 3) {\n"
6747 "        printf(\"Usage: %s port-num proto-name [buflen]\\en\", argv[0]);\n"
6748 "        exit(EXIT_FAILURE);\n"
6749 "    }\n"
6750 msgstr ""
6751
6752 #. type: Plain text
6753 #: build/C/man3/getservent_r.3:191
6754 #, no-wrap
6755 msgid ""
6756 "    port = htons(atoi(argv[1]));\n"
6757 "    protop = (strcmp(argv[2], \"null\") == 0 ||\n"
6758 "              strcmp(argv[2], \"NULL\") == 0) ?  NULL : argv[2];\n"
6759 msgstr ""
6760
6761 #. type: Plain text
6762 #: build/C/man3/getservent_r.3:195
6763 #, no-wrap
6764 msgid ""
6765 "    buflen = 1024;\n"
6766 "    if (argc E<gt> 3)\n"
6767 "        buflen = atoi(argv[3]);\n"
6768 msgstr ""
6769
6770 #. type: Plain text
6771 #: build/C/man3/getservent_r.3:209
6772 #, no-wrap
6773 msgid ""
6774 "    erange_cnt = 0;\n"
6775 "    do {\n"
6776 "        s = getservbyport_r(port, protop, &result_buf,\n"
6777 "                     buf, buflen, &result);\n"
6778 "        if (s == ERANGE) {\n"
6779 "            if (erange_cnt == 0)\n"
6780 "                printf(\"ERANGE! Retrying with larger buffer\\en\");\n"
6781 "            erange_cnt++;\n"
6782 msgstr ""
6783
6784 #. type: Plain text
6785 #: build/C/man3/getservent_r.3:225
6786 #, no-wrap
6787 msgid ""
6788 "    printf(\"getservbyport_r() returned: %s  (buflen=%d)\\en\",\n"
6789 "            (s == 0) ? \"0 (success)\" : (s == ENOENT) ? \"ENOENT\" :\n"
6790 "            strerror(s), buflen);\n"
6791 msgstr ""
6792
6793 #. type: Plain text
6794 #: build/C/man3/getservent_r.3:237
6795 #, no-wrap
6796 msgid ""
6797 "    printf(\"s_name=%s; s_proto=%s; s_port=%d; aliases=\",\n"
6798 "                result_buf.s_name, result_buf.s_proto,\n"
6799 "                ntohs(result_buf.s_port));\n"
6800 "    for (p = result_buf.s_aliases; *p != NULL; p++)\n"
6801 "        printf(\"%s \", *p);\n"
6802 "    printf(\"\\en\");\n"
6803 msgstr ""
6804
6805 #. type: Plain text
6806 #: build/C/man3/getservent_r.3:243
6807 msgid "B<getservent>(3), B<services>(5)"
6808 msgstr ""
6809
6810 #. type: TH
6811 #: build/C/man5/host.conf.5:26
6812 #, no-wrap
6813 msgid "HOST.CONF"
6814 msgstr ""
6815
6816 #. type: TH
6817 #: build/C/man5/host.conf.5:26
6818 #, no-wrap
6819 msgid "2003-08-23"
6820 msgstr ""
6821
6822 #. type: TH
6823 #: build/C/man5/host.conf.5:26 build/C/man5/networks.5:26
6824 #, no-wrap
6825 msgid "Linux System Administration"
6826 msgstr ""
6827
6828 #. type: Plain text
6829 #: build/C/man5/host.conf.5:29
6830 msgid "host.conf - resolver configuration file"
6831 msgstr ""
6832
6833 #. type: Plain text
6834 #: build/C/man5/host.conf.5:38
6835 msgid ""
6836 "The file I</etc/host.conf> contains configuration information specific to "
6837 "the resolver library.  It should contain one configuration keyword per line, "
6838 "followed by appropriate configuration information.  The keywords recognized "
6839 "are I<order>, I<trim>, I<multi>, I<nospoof>, I<spoof>, and I<reorder>.  "
6840 "These keywords are described below."
6841 msgstr ""
6842
6843 #. type: TP
6844 #: build/C/man5/host.conf.5:38
6845 #, no-wrap
6846 msgid "I<order>"
6847 msgstr ""
6848
6849 #. type: Plain text
6850 #: build/C/man5/host.conf.5:44
6851 msgid ""
6852 "This keyword specifies how host lookups are to be performed.  It should be "
6853 "followed by one or more lookup methods, separated by commas.  Valid methods "
6854 "are I<bind>, I<hosts>, and I<nis>."
6855 msgstr ""
6856
6857 #. type: TP
6858 #: build/C/man5/host.conf.5:44
6859 #, no-wrap
6860 msgid "I<trim>"
6861 msgstr ""
6862
6863 #. type: Plain text
6864 #: build/C/man5/host.conf.5:61
6865 msgid ""
6866 "This keyword may be listed more than once.  Each time it should be followed "
6867 "by a list of domains, separated by colons (\\(aq:\\(aq), semicolons "
6868 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot.  When set, the "
6869 "resolv+ library will automatically trim the given domain name from the end "
6870 "of any hostname resolved via DNS.  This is intended for use with local hosts "
6871 "and domains.  (Related note: trim will not affect hostnames gathered via NIS "
6872 "or the hosts file.  Care should be taken to ensure that the first hostname "
6873 "for each entry in the hosts file is fully qualified or unqualified, as "
6874 "appropriate for the local installation.)"
6875 msgstr ""
6876
6877 #. type: TP
6878 #: build/C/man5/host.conf.5:61
6879 #, no-wrap
6880 msgid "I<multi>"
6881 msgstr ""
6882
6883 #. type: Plain text
6884 #: build/C/man5/host.conf.5:76
6885 msgid ""
6886 "Valid values are I<on> and I<off>.  If set to I<on>, the resolv+ library "
6887 "will return all valid addresses for a host that appears in the I</etc/hosts> "
6888 "file, instead of only the first.  This is I<off> by default, as it may cause "
6889 "a substantial performance loss at sites with large hosts files."
6890 msgstr ""
6891
6892 #. type: TP
6893 #: build/C/man5/host.conf.5:76
6894 #, no-wrap
6895 msgid "I<nospoof>"
6896 msgstr ""
6897
6898 #. type: Plain text
6899 #: build/C/man5/host.conf.5:91
6900 msgid ""
6901 "Valid values are I<on> and I<off>.  If set to I<on>, the resolv+ library "
6902 "will attempt to prevent hostname spoofing to enhance the security of "
6903 "B<rlogin> and B<rsh>.  It works as follows: after performing a host address "
6904 "lookup, resolv+ will perform a hostname lookup for that address.  If the two "
6905 "hostnames do not match, the query will fail.  The default value is I<off>."
6906 msgstr ""
6907
6908 #. type: TP
6909 #: build/C/man5/host.conf.5:91
6910 #, no-wrap
6911 msgid "I<spoofalert>"
6912 msgstr ""
6913
6914 #. type: Plain text
6915 #: build/C/man5/host.conf.5:103
6916 msgid ""
6917 "Valid values are I<on> and I<off>.  If this option is set to I<on> and the "
6918 "I<nospoof> option is also set, resolv+ will log a warning of the error via "
6919 "the syslog facility.  The default value is I<off>."
6920 msgstr ""
6921
6922 #. type: TP
6923 #: build/C/man5/host.conf.5:103
6924 #, no-wrap
6925 msgid "I<spoof>"
6926 msgstr ""
6927
6928 #. type: Plain text
6929 #: build/C/man5/host.conf.5:122
6930 msgid ""
6931 "Valid values are I<off>, I<nowarn> and I<warn>.  If this option is set to "
6932 "I<off>, spoofed addresses are permitted and no warnings will be emitted via "
6933 "the syslog facility.  If this option is set to I<warn>, resolv+ will attempt "
6934 "to prevent hostname spoofing to enhance the security and log a warning of "
6935 "the error via the syslog facility.  If this option is set to I<nowarn>, the "
6936 "resolv+ library will attempt to prevent hostname spoofing to enhance the "
6937 "security but not emit warnings via the syslog facility.  Setting this option "
6938 "to anything else is equal to setting it to I<nowarn>."
6939 msgstr ""
6940
6941 #. type: TP
6942 #: build/C/man5/host.conf.5:122
6943 #, no-wrap
6944 msgid "I<reorder>"
6945 msgstr ""
6946
6947 #. type: Plain text
6948 #: build/C/man5/host.conf.5:135
6949 msgid ""
6950 "Valid values are I<on> and I<off>.  If set to I<on>, resolv+ will attempt to "
6951 "reorder host addresses so that local addresses (i.e., on the same subnet) "
6952 "are listed first when a B<gethostbyname>(3)  is performed.  Reordering is "
6953 "done for all lookup methods.  The default value is I<off>."
6954 msgstr ""
6955
6956 #. type: SH
6957 #: build/C/man5/host.conf.5:135
6958 #, no-wrap
6959 msgid "ENVIRONMENT"
6960 msgstr ""
6961
6962 #. type: Plain text
6963 #: build/C/man5/host.conf.5:139
6964 msgid ""
6965 "There are six environment variables that can be used to allow users to "
6966 "override the behavior which is configured in I</etc/host.conf>."
6967 msgstr ""
6968
6969 #. type: TP
6970 #: build/C/man5/host.conf.5:139
6971 #, no-wrap
6972 msgid "B<RESOLV_HOST_CONF>"
6973 msgstr ""
6974
6975 #. type: Plain text
6976 #: build/C/man5/host.conf.5:143
6977 msgid ""
6978 "If set, this variable points to a file that should be read instead of "
6979 "I</etc/host.conf>."
6980 msgstr ""
6981
6982 #. type: TP
6983 #: build/C/man5/host.conf.5:143
6984 #, no-wrap
6985 msgid "B<RESOLV_SERV_ORDER>"
6986 msgstr ""
6987
6988 #. type: Plain text
6989 #: build/C/man5/host.conf.5:148
6990 msgid "Overrides the I<order> command."
6991 msgstr ""
6992
6993 #. type: TP
6994 #: build/C/man5/host.conf.5:148
6995 #, no-wrap
6996 msgid "B<RESOLV_SPOOF_CHECK>"
6997 msgstr ""
6998
6999 #. type: Plain text
7000 #: build/C/man5/host.conf.5:157
7001 msgid ""
7002 "Overrides the I<nospoof>, I<spoofalert> and I<spoof> commands in the same "
7003 "way as the I<spoof> command is parsed.  Valid values are I<off>, I<nowarn> "
7004 "and I<warn>."
7005 msgstr ""
7006
7007 #. type: TP
7008 #: build/C/man5/host.conf.5:157
7009 #, no-wrap
7010 msgid "B<RESOLV_MULTI>"
7011 msgstr ""
7012
7013 #. type: Plain text
7014 #: build/C/man5/host.conf.5:162
7015 msgid "Overrides the I<multi> command."
7016 msgstr ""
7017
7018 #. type: TP
7019 #: build/C/man5/host.conf.5:162
7020 #, no-wrap
7021 msgid "B<RESOLV_REORDER>"
7022 msgstr ""
7023
7024 #. type: Plain text
7025 #: build/C/man5/host.conf.5:167
7026 msgid "Overrides the I<reorder> command."
7027 msgstr ""
7028
7029 #. type: TP
7030 #: build/C/man5/host.conf.5:167
7031 #, no-wrap
7032 msgid "B<RESOLV_ADD_TRIM_DOMAINS>"
7033 msgstr ""
7034
7035 #. type: Plain text
7036 #: build/C/man5/host.conf.5:172
7037 msgid ""
7038 "A list of domains, separated by colons (\\(aq:\\(aq), semicolons "
7039 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot, which will be "
7040 "added to the list of domains that should be trimmed."
7041 msgstr ""
7042
7043 #. type: TP
7044 #: build/C/man5/host.conf.5:172
7045 #, no-wrap
7046 msgid "B<RESOLV_OVERRIDE_TRIM_DOMAINS>"
7047 msgstr ""
7048
7049 #. type: Plain text
7050 #: build/C/man5/host.conf.5:180
7051 msgid ""
7052 "A list of domains, separated by colons (\\(aq:\\(aq), semicolons "
7053 "(\\(aq;\\(aq) or commas (\\(aq,\\(aq), with the leading dot, which will "
7054 "replace the list of domains that should be trimmed.  Overrides the I<trim> "
7055 "command."
7056 msgstr ""
7057
7058 #. type: Plain text
7059 #: build/C/man5/host.conf.5:184 build/C/man5/host.conf.5:187
7060 msgid "Resolver configuration file"
7061 msgstr ""
7062
7063 #. type: TP
7064 #: build/C/man5/host.conf.5:184
7065 #, no-wrap
7066 msgid "I</etc/resolv.conf>"
7067 msgstr ""
7068
7069 #. type: Plain text
7070 #: build/C/man5/host.conf.5:190
7071 msgid "Local hosts database"
7072 msgstr ""
7073
7074 #. type: Plain text
7075 #: build/C/man5/host.conf.5:199
7076 msgid ""
7077 "The following differences exist compared to the original implementation.  A "
7078 "new command I<spoof> and a new environment variable B<RESOLV_SPOOF_CHECK> "
7079 "can take arguments like I<off>, I<nowarn> and I<warn>.  Line comments can "
7080 "appear anywhere and not only at the beginning of a line."
7081 msgstr ""
7082
7083 #. type: Plain text
7084 #: build/C/man5/host.conf.5:203
7085 msgid "B<gethostbyname>(3), B<hostname>(7), B<named>(8), B<resolv+>(8)"
7086 msgstr ""
7087
7088 #. type: TH
7089 #: build/C/man7/hostname.7:39
7090 #, no-wrap
7091 msgid "HOSTNAME"
7092 msgstr ""
7093
7094 #. type: TH
7095 #: build/C/man7/hostname.7:39
7096 #, no-wrap
7097 msgid "2010-11-07"
7098 msgstr ""
7099
7100 #. type: Plain text
7101 #: build/C/man7/hostname.7:42
7102 msgid "hostname - hostname resolution description"
7103 msgstr ""
7104
7105 #. type: Plain text
7106 #: build/C/man7/hostname.7:46
7107 msgid ""
7108 "Hostnames are domains, where a domain is a hierarchical, dot-separated list "
7109 "of subdomains; for example, the machine monet, in the Berkeley subdomain of "
7110 "the EDU domain would be represented as \"monet.Berkeley.EDU\"."
7111 msgstr ""
7112
7113 #. type: Plain text
7114 #: build/C/man7/hostname.7:55
7115 msgid ""
7116 "Hostnames are often used with network client and server programs, which must "
7117 "generally translate the name to an address for use.  (This task is generally "
7118 "performed by either B<getaddrinfo>(3)  or the obsolete B<gethostbyname>(3).)  "
7119 "Hostnames are resolved by the Internet name resolver in the following "
7120 "fashion."
7121 msgstr ""
7122
7123 #. type: Plain text
7124 #: build/C/man7/hostname.7:68
7125 msgid ""
7126 "If the name consists of a single component, that is, contains no dot, and if "
7127 "the environment variable B<HOSTALIASES> is set to the name of a file, that "
7128 "file is searched for any string matching the input hostname.  The file "
7129 "should consist of lines made up of two white-space separated strings, the "
7130 "first of which is the hostname alias, and the second of which is the "
7131 "complete hostname to be substituted for that alias.  If a case-insensitive "
7132 "match is found between the hostname to be resolved and the first field of a "
7133 "line in the file, the substituted name is looked up with no further "
7134 "processing."
7135 msgstr ""
7136
7137 #. type: Plain text
7138 #: build/C/man7/hostname.7:72
7139 msgid ""
7140 "If the input name ends with a trailing dot, the trailing dot is removed, and "
7141 "the remaining name is looked up with no further processing."
7142 msgstr ""
7143
7144 #. type: Plain text
7145 #: build/C/man7/hostname.7:85
7146 msgid ""
7147 "If the input name does not end with a trailing dot, it is looked up by "
7148 "searching through a list of domains until a match is found.  The default "
7149 "search list includes first the local domain, then its parent domains with at "
7150 "least 2 name components (longest first).  For example, in the domain "
7151 "CS.Berkeley.EDU, the name lithium.CChem will be checked first as "
7152 "lithium.CChem.CS.Berkeley.EDU and then as lithium.CChem.Berkeley.EDU.  "
7153 "Lithium.CChem.EDU will not be tried, as there is only one component "
7154 "remaining from the local domain.  The search path can be changed from the "
7155 "default by a system-wide configuration file (see B<resolver>(5))."
7156 msgstr ""
7157
7158 #. type: Plain text
7159 #: build/C/man7/hostname.7:89
7160 msgid "B<gethostbyname>(3), B<resolver>(5), B<mailaddr>(7), B<named>(8)"
7161 msgstr ""
7162
7163 #. type: TH
7164 #: build/C/man5/hosts.5:27
7165 #, no-wrap
7166 msgid "HOSTS"
7167 msgstr ""
7168
7169 #. type: TH
7170 #: build/C/man5/hosts.5:27
7171 #, no-wrap
7172 msgid "2002-06-16"
7173 msgstr ""
7174
7175 #. type: Plain text
7176 #: build/C/man5/hosts.5:30
7177 msgid "hosts - static table lookup for hostnames"
7178 msgstr ""
7179
7180 #. type: Plain text
7181 #: build/C/man5/hosts.5:32
7182 msgid "B</etc/hosts>"
7183 msgstr ""
7184
7185 #. type: Plain text
7186 #: build/C/man5/hosts.5:40
7187 msgid ""
7188 "This manual page describes the format of the I</etc/hosts> file.  This file "
7189 "is a simple text file that associates IP addresses with hostnames, one line "
7190 "per IP address.  For each host a single line should be present with the "
7191 "following information:"
7192 msgstr ""
7193
7194 #. type: Plain text
7195 #: build/C/man5/hosts.5:43
7196 msgid "IP_address canonical_hostname [aliases...]"
7197 msgstr ""
7198
7199 #. type: Plain text
7200 #: build/C/man5/hosts.5:56
7201 msgid ""
7202 "Fields of the entry are separated by any number of blanks and/or tab "
7203 "characters.  Text from a \"#\" character until the end of the line is a "
7204 "comment, and is ignored.  Host names may contain only alphanumeric "
7205 "characters, minus signs (\"-\"), and periods (\".\").  They must begin with "
7206 "an alphabetic character and end with an alphanumeric character.  Optional "
7207 "aliases provide for name changes, alternate spellings, shorter hostnames, or "
7208 "generic hostnames (for example, I<localhost>)."
7209 msgstr ""
7210
7211 #. type: Plain text
7212 #: build/C/man5/hosts.5:64
7213 msgid ""
7214 "The Berkeley Internet Name Domain (BIND) Server implements the Internet name "
7215 "server for UNIX systems.  It augments or replaces the I</etc/hosts> file or "
7216 "hostname lookup, and frees a host from relying on I</etc/hosts> being up to "
7217 "date and complete."
7218 msgstr ""
7219
7220 #. type: Plain text
7221 #: build/C/man5/hosts.5:67
7222 msgid ""
7223 "In modern systems, even though the host table has been superseded by DNS, it "
7224 "is still widely used for:"
7225 msgstr ""
7226
7227 #. type: TP
7228 #: build/C/man5/hosts.5:67
7229 #, no-wrap
7230 msgid "B<bootstrapping>"
7231 msgstr ""
7232
7233 #. type: Plain text
7234 #: build/C/man5/hosts.5:73
7235 msgid ""
7236 "Most systems have a small host table containing the name and address "
7237 "information for important hosts on the local network.  This is useful when "
7238 "DNS is not running, for example during system bootup."
7239 msgstr ""
7240
7241 #. type: TP
7242 #: build/C/man5/hosts.5:73
7243 #, no-wrap
7244 msgid "B<NIS>"
7245 msgstr ""
7246
7247 #. type: Plain text
7248 #: build/C/man5/hosts.5:79
7249 msgid ""
7250 "Sites that use NIS use the host table as input to the NIS host database.  "
7251 "Even though NIS can be used with DNS, most NIS sites still use the host "
7252 "table with an entry for all local hosts as a backup."
7253 msgstr ""
7254
7255 #. type: TP
7256 #: build/C/man5/hosts.5:79
7257 #, no-wrap
7258 msgid "B<isolated nodes>"
7259 msgstr ""
7260
7261 #. type: Plain text
7262 #: build/C/man5/hosts.5:86
7263 msgid ""
7264 "Very small sites that are isolated from the network use the host table "
7265 "instead of DNS.  If the local information rarely changes, and the network is "
7266 "not connected to the Internet, DNS offers little advantage."
7267 msgstr ""
7268
7269 #. type: Plain text
7270 #: build/C/man5/hosts.5:91
7271 msgid ""
7272 "Modifications to this file normally take effect immediately, except in cases "
7273 "where the file is cached by applications."
7274 msgstr ""
7275
7276 #. type: SS
7277 #: build/C/man5/hosts.5:91
7278 #, no-wrap
7279 msgid "Historical notes"
7280 msgstr ""
7281
7282 #. type: Plain text
7283 #: build/C/man5/hosts.5:94
7284 msgid ""
7285 "RFC\\ 952 gave the original format for the host table, though it has since "
7286 "changed."
7287 msgstr ""
7288
7289 #. type: Plain text
7290 #: build/C/man5/hosts.5:107
7291 msgid ""
7292 "Before the advent of DNS, the host table was the only way of resolving "
7293 "hostnames on the fledgling Internet.  Indeed, this file could be created "
7294 "from the official host data base maintained at the Network Information "
7295 "Control Center (NIC), though local changes were often required to bring it "
7296 "up to date regarding unofficial aliases and/or unknown hosts.  The NIC no "
7297 "longer maintains the hosts.txt files, though looking around at the time of "
7298 "writing (circa 2000), there are historical hosts.txt files on the WWW.  I "
7299 "just found three, from 92, 94, and 95."
7300 msgstr ""
7301
7302 #. type: Plain text
7303 #: build/C/man5/hosts.5:114
7304 #, no-wrap
7305 msgid ""
7306 "127.0.0.1       localhost\n"
7307 "192.168.1.10    foo.mydomain.org       foo\n"
7308 "192.168.1.13    bar.mydomain.org       bar\n"
7309 "146.82.138.7    master.debian.org      master\n"
7310 "209.237.226.90  www.opensource.org\n"
7311 msgstr ""
7312
7313 #. type: Plain text
7314 #: build/C/man5/hosts.5:121
7315 msgid "B<hostname>(1), B<resolver>(3), B<resolver>(5), B<hostname>(7), B<named>(8)"
7316 msgstr ""
7317
7318 #. type: Plain text
7319 #: build/C/man5/hosts.5:122
7320 msgid "Internet RFC\\ 952"
7321 msgstr ""
7322
7323 #. type: TH
7324 #: build/C/man5/hosts.equiv.5:6
7325 #, no-wrap
7326 msgid "HOSTS.EQUIV"
7327 msgstr ""
7328
7329 #. type: TH
7330 #: build/C/man5/hosts.equiv.5:6
7331 #, no-wrap
7332 msgid "2003-08-24"
7333 msgstr ""
7334
7335 #. type: Plain text
7336 #: build/C/man5/hosts.equiv.5:11
7337 msgid ""
7338 "/etc/hosts.equiv - list of hosts and users that are granted \"trusted\" B<r> "
7339 "command access to your system"
7340 msgstr ""
7341
7342 #. type: Plain text
7343 #: build/C/man5/hosts.equiv.5:22
7344 msgid ""
7345 "The B<hosts.equiv> file allows or denies hosts and users to use the "
7346 "B<r>-commands (e.g., B<rlogin>, B<rsh>, or B<rcp>)  without supplying a "
7347 "password."
7348 msgstr ""
7349
7350 #. type: Plain text
7351 #: build/C/man5/hosts.equiv.5:24
7352 msgid "The file uses the following format:"
7353 msgstr ""
7354
7355 #. type: TP
7356 #: build/C/man5/hosts.equiv.5:24
7357 #, no-wrap
7358 msgid "I<[ + | - ]> I<[hostname]> I<[username]>"
7359 msgstr ""
7360
7361 #. type: Plain text
7362 #: build/C/man5/hosts.equiv.5:43
7363 msgid ""
7364 "The I<hostname> is the name of a host which is logically equivalent to the "
7365 "local host.  Users logged into that host are allowed to access like-named "
7366 "user accounts on the local host without supplying a password.  The "
7367 "I<hostname> may be (optionally) preceded by a plus (+) sign.  If the plus "
7368 "sign is used alone, it allows any host to access your system.  You can "
7369 "explicitly deny access to a host by preceding the I<hostname> by a minus (-) "
7370 "sign.  Users from that host must always supply a password.  For security "
7371 "reasons you should always use the FQDN of the hostname and not the short "
7372 "hostname."
7373 msgstr ""
7374
7375 #. type: Plain text
7376 #: build/C/man5/hosts.equiv.5:61
7377 msgid ""
7378 "The I<username> entry grants a specific user access to all user accounts "
7379 "(except root) without supplying a password.  That means the user is NOT "
7380 "restricted to like-named accounts.  The I<username> may be (optionally) "
7381 "preceded by a plus (+) sign.  You can also explicitly deny access to a "
7382 "specific user by preceding the I<username> with a minus (-) sign.  This says "
7383 "that the user is not trusted no matter what other entries for that host "
7384 "exist."
7385 msgstr ""
7386
7387 #. type: Plain text
7388 #: build/C/man5/hosts.equiv.5:63
7389 msgid "Netgroups can be specified by preceding the netgroup by an @ sign."
7390 msgstr ""
7391
7392 #. type: Plain text
7393 #: build/C/man5/hosts.equiv.5:69
7394 msgid ""
7395 "Be extremely careful when using the plus (+) sign.  A simple typographical "
7396 "error could result in a standalone plus sign.  A standalone plus sign is a "
7397 "wildcard character that means \"any host\"!"
7398 msgstr ""
7399
7400 #. type: Plain text
7401 #: build/C/man5/hosts.equiv.5:71
7402 msgid "I</etc/hosts.equiv>"
7403 msgstr ""
7404
7405 #. type: Plain text
7406 #: build/C/man5/hosts.equiv.5:76
7407 msgid ""
7408 "Some systems will honor the contents of this file only when it has owner "
7409 "root and no write permission for anybody else.  Some exceptionally paranoid "
7410 "systems even require that there be no other hard links to the file."
7411 msgstr ""
7412
7413 #. type: Plain text
7414 #: build/C/man5/hosts.equiv.5:84
7415 msgid ""
7416 "Modern systems use the Pluggable Authentication Modules library (PAM).  With "
7417 "PAM a standalone plus sign is considered a wildcard character which means "
7418 "\"any host\" only when the word I<promiscuous> is added to the auth "
7419 "component line in your PAM file for the particular service (e.g., "
7420 "B<rlogin>)."
7421 msgstr ""
7422
7423 #. type: Plain text
7424 #: build/C/man5/hosts.equiv.5:87
7425 msgid "B<rhosts>(5), B<rlogind>(8), B<rshd>(8)"
7426 msgstr ""
7427
7428 #. type: TH
7429 #: build/C/man7/icmp.7:12
7430 #, no-wrap
7431 msgid "ICMP"
7432 msgstr ""
7433
7434 #. type: TH
7435 #: build/C/man7/icmp.7:12 build/C/man8/nscd.8:23 build/C/man7/raw.7:13
7436 #, no-wrap
7437 msgid "2012-05-10"
7438 msgstr ""
7439
7440 #. type: Plain text
7441 #: build/C/man7/icmp.7:15
7442 msgid "icmp - Linux IPv4 ICMP kernel module."
7443 msgstr ""
7444
7445 #. type: Plain text
7446 #: build/C/man7/icmp.7:23
7447 msgid ""
7448 "This kernel protocol module implements the Internet Control Message Protocol "
7449 "defined in RFC\\ 792.  It is used to signal error conditions and for "
7450 "diagnosis.  The user doesn't interact directly with this module; instead it "
7451 "communicates with the other protocols in the kernel and these pass the ICMP "
7452 "errors to the application layers.  The kernel ICMP module also answers ICMP "
7453 "requests."
7454 msgstr ""
7455
7456 #. type: Plain text
7457 #: build/C/man7/icmp.7:35
7458 msgid ""
7459 "A user protocol may receive ICMP packets for all local sockets by opening a "
7460 "raw socket with the protocol B<IPPROTO_ICMP>.  See B<raw>(7)  for more "
7461 "information.  The types of ICMP packets passed to the socket can be filtered "
7462 "using the B<ICMP_FILTER> socket option.  ICMP packets are always processed "
7463 "by the kernel too, even when passed to a user socket."
7464 msgstr ""
7465
7466 #. type: Plain text
7467 #: build/C/man7/icmp.7:41
7468 msgid ""
7469 "Linux limits the rate of ICMP error packets to each destination.  "
7470 "B<ICMP_REDIRECT> and B<ICMP_DEST_UNREACH> are also limited by the "
7471 "destination route of the incoming packets."
7472 msgstr ""
7473
7474 #.  FIXME . better description needed
7475 #. type: Plain text
7476 #: build/C/man7/icmp.7:54
7477 msgid ""
7478 "ICMP supports a set of I</proc> interfaces to configure some global IP "
7479 "parameters.  The parameters can be accessed by reading or writing files in "
7480 "the directory I</proc/sys/net/ipv4/>.  Most of these parameters are rate "
7481 "limitations for specific ICMP types.  Linux 2.2 uses a token bucket filter "
7482 "to limit ICMPs.  The value is the timeout in jiffies until the token bucket "
7483 "filter is cleared after a burst.  A jiffy is a system dependent unit, "
7484 "usually 10ms on i386 and about 1ms on alpha and ia64."
7485 msgstr ""
7486
7487 #. type: TP
7488 #: build/C/man7/icmp.7:54
7489 #, no-wrap
7490 msgid "I<icmp_destunreach_rate> (Linux 2.2 to 2.4.9)"
7491 msgstr ""
7492
7493 #.  Precisely: from 2.1.102
7494 #. type: Plain text
7495 #: build/C/man7/icmp.7:63
7496 msgid ""
7497 "Maximum rate to send ICMP Destination Unreachable packets.  This limits the "
7498 "rate at which packets are sent to any individual route or destination.  The "
7499 "limit does not affect sending of B<ICMP_FRAG_NEEDED> packets needed for path "
7500 "MTU discovery."
7501 msgstr ""
7502
7503 #. type: TP
7504 #: build/C/man7/icmp.7:63
7505 #, no-wrap
7506 msgid "I<icmp_echo_ignore_all> (since Linux 2.2)"
7507 msgstr ""
7508
7509 #.  Precisely: 2.1.68
7510 #. type: Plain text
7511 #: build/C/man7/icmp.7:69
7512 msgid "If this value is nonzero, Linux will ignore all B<ICMP_ECHO> requests."
7513 msgstr ""
7514
7515 #. type: TP
7516 #: build/C/man7/icmp.7:69
7517 #, no-wrap
7518 msgid "I<icmp_echo_ignore_broadcasts> (since Linux 2.2)"
7519 msgstr ""
7520
7521 #.  Precisely: from 2.1.68
7522 #. type: Plain text
7523 #: build/C/man7/icmp.7:75
7524 msgid ""
7525 "If this value is nonzero, Linux will ignore all B<ICMP_ECHO> packets sent to "
7526 "broadcast addresses."
7527 msgstr ""
7528
7529 #. type: TP
7530 #: build/C/man7/icmp.7:75
7531 #, no-wrap
7532 msgid "I<icmp_echoreply_rate> (Linux 2.2 to 2.4.9)"
7533 msgstr ""
7534
7535 #.  Precisely: from 2.1.102
7536 #. type: Plain text
7537 #: build/C/man7/icmp.7:83
7538 msgid ""
7539 "Maximum rate for sending B<ICMP_ECHOREPLY> packets in response to "
7540 "B<ICMP_ECHOREQUEST> packets."
7541 msgstr ""
7542
7543 #. type: TP
7544 #: build/C/man7/icmp.7:83
7545 #, no-wrap
7546 msgid ""
7547 "I<icmp_errors_use_inbound_ifaddr> (Boolean; default: disabled; since Linux "
7548 "2.6.12)"
7549 msgstr ""
7550
7551 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7552 #. type: Plain text
7553 #: build/C/man7/icmp.7:88
7554 msgid ""
7555 "If disabled, ICMP error messages are sent with the primary address of the "
7556 "exiting interface."
7557 msgstr ""
7558
7559 #. type: Plain text
7560 #: build/C/man7/icmp.7:94
7561 msgid ""
7562 "If enabled, the message will be sent with the primary address of the "
7563 "interface that received the packet that caused the ICMP error.  This is the "
7564 "behavior that many network administrators will expect from a router.  And it "
7565 "can make debugging complicated network layouts much easier."
7566 msgstr ""
7567
7568 #. type: Plain text
7569 #: build/C/man7/icmp.7:98
7570 msgid ""
7571 "Note that if no primary address exists for the interface selected, then the "
7572 "primary address of the first non-loopback interface that has one will be "
7573 "used regardless of this setting."
7574 msgstr ""
7575
7576 #. type: TP
7577 #: build/C/man7/icmp.7:98
7578 #, no-wrap
7579 msgid ""
7580 "I<icmp_ignore_bogus_error_responses> (Boolean; default: disabled; since "
7581 "Linux 2.2)"
7582 msgstr ""
7583
7584 #.  precisely: since 2.1.32
7585 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7586 #. type: Plain text
7587 #: build/C/man7/icmp.7:106
7588 msgid ""
7589 "Some routers violate RFC1122 by sending bogus responses to broadcast "
7590 "frames.  Such violations are normally logged via a kernel warning.  If this "
7591 "parameter is enabled, the kernel will not give such warnings, which will "
7592 "avoid log file clutter."
7593 msgstr ""
7594
7595 #. type: TP
7596 #: build/C/man7/icmp.7:106
7597 #, no-wrap
7598 msgid "I<icmp_paramprob_rate> (Linux 2.2 to 2.4.9)"
7599 msgstr ""
7600
7601 #.  Precisely: from 2.1.102
7602 #. type: Plain text
7603 #: build/C/man7/icmp.7:113
7604 msgid ""
7605 "Maximum rate for sending B<ICMP_PARAMETERPROB> packets.  These packets are "
7606 "sent when a packet arrives with an invalid IP header."
7607 msgstr ""
7608
7609 #. type: TP
7610 #: build/C/man7/icmp.7:113
7611 #, no-wrap
7612 msgid "I<icmp_ratelimit> (integer; default: 1000; since Linux 2.4.10)"
7613 msgstr ""
7614
7615 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7616 #. type: Plain text
7617 #: build/C/man7/icmp.7:121
7618 msgid ""
7619 "Limit the maximum rates for sending ICMP packets whose type matches "
7620 "I<icmp_ratemask> (see below) to specific targets.  0 to disable any "
7621 "limiting, otherwise the minimum space between responses in milliseconds."
7622 msgstr ""
7623
7624 #. type: TP
7625 #: build/C/man7/icmp.7:121
7626 #, no-wrap
7627 msgid "I<icmp_ratemask> (integer; default: see below; since Linux 2.4.10)"
7628 msgstr ""
7629
7630 #.  The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
7631 #. type: Plain text
7632 #: build/C/man7/icmp.7:125
7633 msgid "Mask made of ICMP types for which rates are being limited."
7634 msgstr ""
7635
7636 #. type: Plain text
7637 #: build/C/man7/icmp.7:127
7638 msgid "Significant bits: IHGFEDCBA9876543210"
7639 msgstr ""
7640
7641 #. type: Plain text
7642 #: build/C/man7/icmp.7:129
7643 msgid "Default mask: 0000001100000011000 (0x1818)"
7644 msgstr ""
7645
7646 #. type: Plain text
7647 #: build/C/man7/icmp.7:132
7648 msgid "Bit definitions (see the Linux kernel source file I<include/linux/icmp.h>):"
7649 msgstr ""
7650
7651 #. type: tbl table
7652 #: build/C/man7/icmp.7:136
7653 #, no-wrap
7654 msgid "0 Echo Reply\n"
7655 msgstr ""
7656
7657 #. type: tbl table
7658 #: build/C/man7/icmp.7:137
7659 #, no-wrap
7660 msgid "3 Destination Unreachable *\n"
7661 msgstr ""
7662
7663 #. type: tbl table
7664 #: build/C/man7/icmp.7:138
7665 #, no-wrap
7666 msgid "4 Source Quench *\n"
7667 msgstr ""
7668
7669 #. type: tbl table
7670 #: build/C/man7/icmp.7:139
7671 #, no-wrap
7672 msgid "5 Redirect\n"
7673 msgstr ""
7674
7675 #. type: tbl table
7676 #: build/C/man7/icmp.7:140
7677 #, no-wrap
7678 msgid "8 Echo Request\n"
7679 msgstr ""
7680
7681 #. type: tbl table
7682 #: build/C/man7/icmp.7:141
7683 #, no-wrap
7684 msgid "B Time Exceeded *\n"
7685 msgstr ""
7686
7687 #. type: tbl table
7688 #: build/C/man7/icmp.7:142
7689 #, no-wrap
7690 msgid "C Parameter Problem *\n"
7691 msgstr ""
7692
7693 #. type: tbl table
7694 #: build/C/man7/icmp.7:143
7695 #, no-wrap
7696 msgid "D Timestamp Request\n"
7697 msgstr ""
7698
7699 #. type: tbl table
7700 #: build/C/man7/icmp.7:144
7701 #, no-wrap
7702 msgid "E Timestamp Reply\n"
7703 msgstr ""
7704
7705 #. type: tbl table
7706 #: build/C/man7/icmp.7:145
7707 #, no-wrap
7708 msgid "F Info Request\n"
7709 msgstr ""
7710
7711 #. type: tbl table
7712 #: build/C/man7/icmp.7:146
7713 #, no-wrap
7714 msgid "G Info Reply\n"
7715 msgstr ""
7716
7717 #. type: tbl table
7718 #: build/C/man7/icmp.7:147
7719 #, no-wrap
7720 msgid "H Address Mask Request\n"
7721 msgstr ""
7722
7723 #. type: tbl table
7724 #: build/C/man7/icmp.7:148
7725 #, no-wrap
7726 msgid "I Address Mask Reply\n"
7727 msgstr ""
7728
7729 #. type: Plain text
7730 #: build/C/man7/icmp.7:154
7731 msgid ""
7732 "The bits marked with an asterisk are rate limited by default (see the "
7733 "default mask above)."
7734 msgstr ""
7735
7736 #. type: TP
7737 #: build/C/man7/icmp.7:154
7738 #, no-wrap
7739 msgid "I<icmp_timeexceed_rate> (Linux 2.2 to 2.4.9)"
7740 msgstr ""
7741
7742 #. type: Plain text
7743 #: build/C/man7/icmp.7:161
7744 msgid ""
7745 "Maximum rate for sending B<ICMP_TIME_EXCEEDED> packets.  These packets are "
7746 "sent to prevent loops when a packet has crossed too many hops."
7747 msgstr ""
7748
7749 #. type: Plain text
7750 #: build/C/man7/icmp.7:165
7751 msgid "Support for the B<ICMP_ADDRESS> request was removed in 2.2."
7752 msgstr ""
7753
7754 #. type: Plain text
7755 #: build/C/man7/icmp.7:169
7756 msgid "Support for B<ICMP_SOURCE_QUENCH> was removed in Linux 2.2."
7757 msgstr ""
7758
7759 #.  not really true ATM
7760 #.  .PP
7761 #.  Linux ICMP should be compliant to RFC 1122.
7762 #. type: Plain text
7763 #: build/C/man7/icmp.7:177
7764 msgid ""
7765 "As many other implementations don't support B<IPPROTO_ICMP> raw sockets, "
7766 "this feature should not be relied on in portable programs."
7767 msgstr ""
7768
7769 #. type: Plain text
7770 #: build/C/man7/icmp.7:182
7771 msgid ""
7772 "B<ICMP_REDIRECT> packets are not sent when Linux is not acting as a router.  "
7773 "They are also accepted only from the old gateway defined in the routing "
7774 "table and the redirect routes are expired after some time."
7775 msgstr ""
7776
7777 #. type: Plain text
7778 #: build/C/man7/icmp.7:186
7779 msgid ""
7780 "The 64-bit timestamp returned by B<ICMP_TIMESTAMP> is in milliseconds since "
7781 "the Epoch, 1970-01-01 00:00:00 +0000 (UTC)."
7782 msgstr ""
7783
7784 #. type: Plain text
7785 #: build/C/man7/icmp.7:191
7786 msgid ""
7787 "Linux ICMP internally uses a raw socket to send ICMPs.  This raw socket may "
7788 "appear in B<netstat>(8)  output with a zero inode."
7789 msgstr ""
7790
7791 #. type: Plain text
7792 #: build/C/man7/icmp.7:193
7793 msgid "B<ip>(7)"
7794 msgstr ""
7795
7796 #. type: Plain text
7797 #: build/C/man7/icmp.7:194
7798 msgid "RFC\\ 792 for a description of the ICMP protocol."
7799 msgstr ""
7800
7801 #. type: TH
7802 #: build/C/man3/inet.3:42
7803 #, no-wrap
7804 msgid "INET"
7805 msgstr ""
7806
7807 #. type: Plain text
7808 #: build/C/man3/inet.3:46
7809 msgid ""
7810 "inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, "
7811 "inet_netof - Internet address manipulation routines"
7812 msgstr ""
7813
7814 #. type: Plain text
7815 #: build/C/man3/inet.3:51
7816 #, no-wrap
7817 msgid ""
7818 "B<#include E<lt>sys/socket.hE<gt>>\n"
7819 "B<#include E<lt>netinet/in.hE<gt>>\n"
7820 "B<#include E<lt>arpa/inet.hE<gt>>\n"
7821 msgstr ""
7822
7823 #. type: Plain text
7824 #: build/C/man3/inet.3:53
7825 #, no-wrap
7826 msgid "B<int inet_aton(const char *>I<cp>B<, struct in_addr *>I<inp>B<);>\n"
7827 msgstr ""
7828
7829 #. type: Plain text
7830 #: build/C/man3/inet.3:55
7831 #, no-wrap
7832 msgid "B<in_addr_t inet_addr(const char *>I<cp>B<);>\n"
7833 msgstr ""
7834
7835 #. type: Plain text
7836 #: build/C/man3/inet.3:57
7837 #, no-wrap
7838 msgid "B<in_addr_t inet_network(const char *>I<cp>B<);>\n"
7839 msgstr ""
7840
7841 #. type: Plain text
7842 #: build/C/man3/inet.3:59
7843 #, no-wrap
7844 msgid "B<char *inet_ntoa(struct in_addr >I<in>B<);>\n"
7845 msgstr ""
7846
7847 #. type: Plain text
7848 #: build/C/man3/inet.3:61
7849 #, no-wrap
7850 msgid ""
7851 "B<struct in_addr inet_makeaddr(in_addr_t >I<net>B<, in_addr_t "
7852 ">I<host>B<);>\n"
7853 msgstr ""
7854
7855 #. type: Plain text
7856 #: build/C/man3/inet.3:63
7857 #, no-wrap
7858 msgid "B<in_addr_t inet_lnaof(struct in_addr >I<in>B<);>\n"
7859 msgstr ""
7860
7861 #. type: Plain text
7862 #: build/C/man3/inet.3:65
7863 #, no-wrap
7864 msgid "B<in_addr_t inet_netof(struct in_addr >I<in>B<);>\n"
7865 msgstr ""
7866
7867 #. type: Plain text
7868 #: build/C/man3/inet.3:75
7869 msgid "B<inet_aton>(), B<inet_ntoa>(): _BSD_SOURCE || _SVID_SOURCE"
7870 msgstr ""
7871
7872 #. type: Plain text
7873 #: build/C/man3/inet.3:85
7874 msgid ""
7875 "B<inet_aton>()  converts the Internet host address I<cp> from the IPv4 "
7876 "numbers-and-dots notation into binary form (in network byte order)  and "
7877 "stores it in the structure that I<inp> points to.  B<inet_aton>()  returns "
7878 "nonzero if the address is valid, zero if not.  The address supplied in I<cp> "
7879 "can have one of the following forms:"
7880 msgstr ""
7881
7882 #. type: TP
7883 #: build/C/man3/inet.3:85
7884 #, no-wrap
7885 msgid "I<a.b.c.d>"
7886 msgstr ""
7887
7888 #. type: Plain text
7889 #: build/C/man3/inet.3:89
7890 msgid ""
7891 "Each of the four numeric parts specifies a byte of the address; the bytes "
7892 "are assigned in left-to-right order to produce the binary address."
7893 msgstr ""
7894
7895 #. type: TP
7896 #: build/C/man3/inet.3:89
7897 #, no-wrap
7898 msgid "I<a.b.c>"
7899 msgstr ""
7900
7901 #. type: Plain text
7902 #: build/C/man3/inet.3:102
7903 msgid ""
7904 "Parts I<a> and I<b> specify the first two bytes of the binary address.  Part "
7905 "I<c> is interpreted as a 16-bit value that defines the rightmost two bytes "
7906 "of the binary address.  This notation is suitable for specifying (outmoded) "
7907 "Class B network addresses."
7908 msgstr ""
7909
7910 #. type: TP
7911 #: build/C/man3/inet.3:102
7912 #, no-wrap
7913 msgid "I<a.b>"
7914 msgstr ""
7915
7916 #. type: Plain text
7917 #: build/C/man3/inet.3:113
7918 msgid ""
7919 "Part I<a> specifies the first byte of the binary address.  Part I<b> is "
7920 "interpreted as a 24-bit value that defines the rightmost three bytes of the "
7921 "binary address.  This notation is suitable for specifying (outmoded) Class A "
7922 "network addresses."
7923 msgstr ""
7924
7925 #. type: TP
7926 #: build/C/man3/inet.3:113
7927 #, no-wrap
7928 msgid "I<a>"
7929 msgstr ""
7930
7931 #. type: Plain text
7932 #: build/C/man3/inet.3:119
7933 msgid ""
7934 "The value I<a> is interpreted as a 32-bit value that is stored directly into "
7935 "the binary address without any byte rearrangement."
7936 msgstr ""
7937
7938 #. type: Plain text
7939 #: build/C/man3/inet.3:132
7940 msgid ""
7941 "In all of the above forms, components of the dotted address can be specified "
7942 "in decimal, octal (with a leading I<0>), or hexadecimal, with a leading "
7943 "I<0X>).  Addresses in any of these forms are collectively termed I<IPV4 "
7944 "numbers-and-dots notation>.  The form that uses exactly four decimal numbers "
7945 "is referred to as I<IPv4 dotted-decimal notation> (or sometimes: I<IPv4 "
7946 "dotted-quad notation>)."
7947 msgstr ""
7948
7949 #. type: Plain text
7950 #: build/C/man3/inet.3:140
7951 msgid ""
7952 "B<inet_aton>()  returns 1 if the supplied string was successfully "
7953 "interpreted, or 0 if the string is invalid (B<errno> is I<not> set on "
7954 "error)."
7955 msgstr ""
7956
7957 #. type: Plain text
7958 #: build/C/man3/inet.3:157
7959 msgid ""
7960 "The B<inet_addr>()  function converts the Internet host address I<cp> from "
7961 "IPv4 numbers-and-dots notation into binary data in network byte order.  If "
7962 "the input is invalid, B<INADDR_NONE> (usually -1) is returned.  Use of this "
7963 "function is problematic because -1 is a valid address (255.255.255.255).  "
7964 "Avoid its use in favor of B<inet_aton>(), B<inet_pton>(3), or "
7965 "B<getaddrinfo>(3), which provide a cleaner way to indicate error return."
7966 msgstr ""
7967
7968 #. type: Plain text
7969 #: build/C/man3/inet.3:167
7970 msgid ""
7971 "The B<inet_network>()  function converts I<cp>, a string in IPv4 "
7972 "numbers-and-dots notation, into a number in host byte order suitable for use "
7973 "as an Internet network address.  On success, the converted address is "
7974 "returned.  If the input is invalid, -1 is returned."
7975 msgstr ""
7976
7977 #. type: Plain text
7978 #: build/C/man3/inet.3:175
7979 msgid ""
7980 "The B<inet_ntoa>()  function converts the Internet host address I<in>, given "
7981 "in network byte order, to a string in IPv4 dotted-decimal notation.  The "
7982 "string is returned in a statically allocated buffer, which subsequent calls "
7983 "will overwrite."
7984 msgstr ""
7985
7986 #. type: Plain text
7987 #: build/C/man3/inet.3:181
7988 msgid ""
7989 "The B<inet_lnaof>()  function returns the local network address part of the "
7990 "Internet address I<in>.  The returned value is in host byte order."
7991 msgstr ""
7992
7993 #. type: Plain text
7994 #: build/C/man3/inet.3:187
7995 msgid ""
7996 "The B<inet_netof>()  function returns the network number part of the "
7997 "Internet address I<in>.  The returned value is in host byte order."
7998 msgstr ""
7999
8000 #. type: Plain text
8001 #: build/C/man3/inet.3:198
8002 msgid ""
8003 "The B<inet_makeaddr>()  function is the converse of B<inet_netof>()  and "
8004 "B<inet_lnaof>().  It returns an Internet host address in network byte order, "
8005 "created by combining the network number I<net> with the local address "
8006 "I<host>, both in host byte order."
8007 msgstr ""
8008
8009 #. type: Plain text
8010 #: build/C/man3/inet.3:208
8011 msgid ""
8012 "The structure I<in_addr> as used in B<inet_ntoa>(), B<inet_makeaddr>(), "
8013 "B<inet_lnaof>()  and B<inet_netof>()  is defined in "
8014 "I<E<lt>netinet/in.hE<gt>> as:"
8015 msgstr ""
8016
8017 #. type: Plain text
8018 #: build/C/man3/inet.3:212
8019 #, no-wrap
8020 msgid "typedef uint32_t in_addr_t;\n"
8021 msgstr ""
8022
8023 #. type: Plain text
8024 #: build/C/man3/inet.3:216
8025 #, no-wrap
8026 msgid ""
8027 "struct in_addr {\n"
8028 "    in_addr_t s_addr;\n"
8029 "};\n"
8030 msgstr ""
8031
8032 #. type: Plain text
8033 #: build/C/man3/inet.3:226
8034 msgid ""
8035 "4.3BSD.  B<inet_addr>()  and B<inet_ntoa>()  are specified in POSIX.1-2001.  "
8036 "B<inet_aton>()  is not specified in POSIX.1-2001, but is available on most "
8037 "systems."
8038 msgstr ""
8039
8040 #. type: Plain text
8041 #: build/C/man3/inet.3:230
8042 msgid ""
8043 "On the i386 the host byte order is Least Significant Byte first (little "
8044 "endian), whereas the network byte order, as used on the Internet, is Most "
8045 "Significant Byte first (big endian)."
8046 msgstr ""
8047
8048 #. type: Plain text
8049 #: build/C/man3/inet.3:239
8050 msgid ""
8051 "B<inet_lnaof>(), B<inet_netof>(), and B<inet_makeaddr>()  are legacy "
8052 "functions that assume they are dealing with I<classful network addresses>.  "
8053 "Classful networking divides IPv4 network addresses into host and network "
8054 "components at byte boundaries, as follows:"
8055 msgstr ""
8056
8057 #. type: TP
8058 #: build/C/man3/inet.3:239
8059 #, no-wrap
8060 msgid "Class A"
8061 msgstr ""
8062
8063 #. type: Plain text
8064 #: build/C/man3/inet.3:245
8065 msgid ""
8066 "This address type is indicated by the value 0 in the most significant bit of "
8067 "the (network byte ordered) address.  The network address is contained in the "
8068 "most significant byte, and the host address occupies the remaining three "
8069 "bytes."
8070 msgstr ""
8071
8072 #. type: TP
8073 #: build/C/man3/inet.3:245
8074 #, no-wrap
8075 msgid "Class B"
8076 msgstr ""
8077
8078 #. type: Plain text
8079 #: build/C/man3/inet.3:251
8080 msgid ""
8081 "This address type is indicated by the binary value 10 in the most "
8082 "significant two bits of the address.  The network address is contained in "
8083 "the two most significant bytes, and the host address occupies the remaining "
8084 "two bytes."
8085 msgstr ""
8086
8087 #. type: TP
8088 #: build/C/man3/inet.3:251
8089 #, no-wrap
8090 msgid "Class C"
8091 msgstr ""
8092
8093 #. type: Plain text
8094 #: build/C/man3/inet.3:257
8095 msgid ""
8096 "This address type is indicated by the binary value 110 in the most "
8097 "significant three bits of the address.  The network address is contained in "
8098 "the three most significant bytes, and the host address occupies the "
8099 "remaining byte."
8100 msgstr ""
8101
8102 #. type: Plain text
8103 #: build/C/man3/inet.3:262
8104 msgid ""
8105 "Classful network addresses are now obsolete, having been superseded by "
8106 "Classless Inter-Domain Routing (CIDR), which divides addresses into network "
8107 "and host components at arbitrary bit (rather than byte) boundaries."
8108 msgstr ""
8109
8110 #. type: Plain text
8111 #: build/C/man3/inet.3:269
8112 msgid ""
8113 "An example of the use of B<inet_aton>()  and B<inet_ntoa>()  is shown "
8114 "below.  Here are some example runs:"
8115 msgstr ""
8116
8117 #. type: Plain text
8118 #: build/C/man3/inet.3:276
8119 #, no-wrap
8120 msgid ""
8121 "$B< ./a.out 226.000.000.037>      # Last byte is in octal\n"
8122 "226.0.0.31\n"
8123 "$B< ./a.out 0x7f.1         >      # First byte is in hex\n"
8124 "127.0.0.1\n"
8125 msgstr ""
8126
8127 #. type: Plain text
8128 #: build/C/man3/inet.3:285
8129 #, no-wrap
8130 msgid ""
8131 "#define _BSD_SOURCE\n"
8132 "#include E<lt>arpa/inet.hE<gt>\n"
8133 "#include E<lt>stdio.hE<gt>\n"
8134 "#include E<lt>stdlib.hE<gt>\n"
8135 msgstr ""
8136
8137 #. type: Plain text
8138 #: build/C/man3/inet.3:290
8139 #, no-wrap
8140 msgid ""
8141 "int\n"
8142 "main(int argc, char *argv[])\n"
8143 "{\n"
8144 "    struct in_addr addr;\n"
8145 msgstr ""
8146
8147 #. type: Plain text
8148 #: build/C/man3/inet.3:295
8149 #, no-wrap
8150 msgid ""
8151 "    if (argc != 2) {\n"
8152 "        fprintf(stderr, \"%s E<lt>dotted-addressE<gt>\\en\", argv[0]);\n"
8153 "        exit(EXIT_FAILURE);\n"
8154 "    }\n"
8155 msgstr ""
8156
8157 #. type: Plain text
8158 #: build/C/man3/inet.3:300
8159 #, no-wrap
8160 msgid ""
8161 "    if (inet_aton(argv[1], &addr) == 0) {\n"
8162 "        fprintf(stderr, \"Invalid address\\en\");\n"
8163 "        exit(EXIT_FAILURE);\n"
8164 "    }\n"
8165 msgstr ""
8166
8167 #. type: Plain text
8168 #: build/C/man3/inet.3:304
8169 #, no-wrap
8170 msgid ""
8171 "    printf(\"%s\\en\", inet_ntoa(addr));\n"
8172 "    exit(EXIT_SUCCESS);\n"
8173 "}\n"
8174 msgstr ""
8175
8176 #. type: Plain text
8177 #: build/C/man3/inet.3:315
8178 msgid ""
8179 "B<byteorder>(3), B<getaddrinfo>(3), B<gethostbyname>(3), B<getnameinfo>(3), "
8180 "B<getnetent>(3), B<inet_net_pton>(3), B<inet_ntop>(3), B<inet_pton>(3), "
8181 "B<hosts>(5), B<networks>(5)"
8182 msgstr ""
8183
8184 #. type: TH
8185 #: build/C/man3/inet_net_pton.3:26
8186 #, no-wrap
8187 msgid "INET_NET_PTON"
8188 msgstr ""
8189
8190 #. type: Plain text
8191 #: build/C/man3/inet_net_pton.3:29
8192 msgid "inet_net_pton, inet_net_ntop - Internet network number conversion"
8193 msgstr ""
8194
8195 #. type: Plain text
8196 #: build/C/man3/inet_net_pton.3:35
8197 #, no-wrap
8198 msgid ""
8199 "B<int inet_net_pton(int >I<af>B<, const char *>I<pres>B<,>\n"
8200 "B<                  void *>I<netp>B<, size_t >I<nsize>B<);>\n"
8201 msgstr ""
8202
8203 #. type: Plain text
8204 #: build/C/man3/inet_net_pton.3:38
8205 #, no-wrap
8206 msgid ""
8207 "B<char *inet_net_ntop(int >I<af>B<, const void *>I<netp>B<, int "
8208 ">I<bits>B<,>\n"
8209 "B<                    char *>I<pres>B<, size_t >I<psize>B<);>\n"
8210 msgstr ""
8211
8212 #. type: Plain text
8213 #: build/C/man3/inet_net_pton.3:41 build/C/man3/resolver.3:85
8214 msgid "Link with I<-lresolv>."
8215 msgstr ""
8216
8217 #. type: Plain text
8218 #: build/C/man3/inet_net_pton.3:49
8219 msgid "B<inet_net_pton>(), B<inet_net_ntop>():"
8220 msgstr ""
8221
8222 #. type: TP
8223 #: build/C/man3/inet_net_pton.3:52
8224 #, no-wrap
8225 msgid "Since glibc 2.20:"
8226 msgstr ""
8227
8228 #. type: Plain text
8229 #: build/C/man3/inet_net_pton.3:55
8230 msgid "_DEFAULT_SOURCE"
8231 msgstr ""
8232
8233 #. type: TP
8234 #: build/C/man3/inet_net_pton.3:55
8235 #, no-wrap
8236 msgid "Before glibc 2.20:"
8237 msgstr ""
8238
8239 #. type: Plain text
8240 #: build/C/man3/inet_net_pton.3:64
8241 msgid ""
8242 "These functions convert network numbers between presentation (i.e., "
8243 "printable) format and network (i.e., binary) format."
8244 msgstr ""
8245
8246 #. type: Plain text
8247 #: build/C/man3/inet_net_pton.3:70
8248 msgid ""
8249 "For both functions, I<af> specifies the address family for the conversion; "
8250 "the only supported value is B<AF_INET>."
8251 msgstr ""
8252
8253 #. type: SS
8254 #: build/C/man3/inet_net_pton.3:70
8255 #, no-wrap
8256 msgid "inet_net_pton()"
8257 msgstr ""
8258
8259 #. type: Plain text
8260 #: build/C/man3/inet_net_pton.3:89
8261 msgid ""
8262 "The B<inet_net_pton>()  function converts I<pres>, a null-terminated string "
8263 "containing an Internet network number in presentation format to network "
8264 "format.  The result of the conversion, which is in network byte order, is "
8265 "placed in the buffer pointed to by I<net>.  (The I<netp> argument typically "
8266 "points to an I<in_addr> structure.)  The I<nsize> argument specifies the "
8267 "number of bytes available in I<netp>."
8268 msgstr ""
8269
8270 #. type: Plain text
8271 #: build/C/man3/inet_net_pton.3:97
8272 msgid ""
8273 "On success, B<inet_net_pton>()  returns the number of bits in the network "
8274 "number field of the result placed in I<netp>.  For a discussion of the input "
8275 "presentation format and the return value, see NOTES."
8276 msgstr ""
8277
8278 #. type: Plain text
8279 #: build/C/man3/inet_net_pton.3:107
8280 msgid ""
8281 "I<Note>: the buffer pointed to by I<netp> should be zeroed out before "
8282 "calling B<inet_net_pton>(), since the call writes only as many bytes as are "
8283 "required for the network number (or as are explicitly specified by I<pres>), "
8284 "which may be less than the number of bytes in a complete network address."
8285 msgstr ""
8286
8287 #. type: SS
8288 #: build/C/man3/inet_net_pton.3:107
8289 #, no-wrap
8290 msgid "inet_net_ntop()"
8291 msgstr ""
8292
8293 #. type: Plain text
8294 #: build/C/man3/inet_net_pton.3:119
8295 msgid ""
8296 "The B<inet_net_ntop>()  function converts the network number in the buffer "
8297 "pointed to by I<netp> to presentation format; I<*netp> is interpreted as a "
8298 "value in network byte order.  The I<bits> argument specifies the number of "
8299 "bits in the network number in I<*netp>."
8300 msgstr ""
8301
8302 #. type: Plain text
8303 #: build/C/man3/inet_net_pton.3:130
8304 msgid ""
8305 "The null-terminated presentation-format string is placed in the buffer "
8306 "pointed to by I<pres>.  The I<psize> argument specifies the number of bytes "
8307 "available in I<pres>.  The presentation string is in CIDR format: a "
8308 "dotted-decimal number representing the network address, followed by a slash, "
8309 "and the size of the network number in bits."
8310 msgstr ""
8311
8312 #. type: Plain text
8313 #: build/C/man3/inet_net_pton.3:137
8314 msgid ""
8315 "On success, B<inet_net_pton>()  returns the number of bits in the network "
8316 "number.  On error, it returns -1, and I<errno> is set to indicate the cause "
8317 "of the error."
8318 msgstr ""
8319
8320 #. type: Plain text
8321 #: build/C/man3/inet_net_pton.3:145
8322 msgid ""
8323 "On success, B<inet_net_ntop>()  returns I<pres>.  On error, it returns NULL, "
8324 "and I<errno> is set to indicate the cause of the error."
8325 msgstr ""
8326
8327 #. type: TP
8328 #: build/C/man3/inet_net_pton.3:146 build/C/man3/inet_ntop.3:92
8329 #, no-wrap
8330 msgid "B<EAFNOSUPPORT>"
8331 msgstr ""
8332
8333 #. type: Plain text
8334 #: build/C/man3/inet_net_pton.3:151
8335 msgid "I<af> specified a value other than B<AF_INET>."
8336 msgstr ""
8337
8338 #. type: Plain text
8339 #: build/C/man3/inet_net_pton.3:154
8340 msgid "The size of the output buffer was insufficient."
8341 msgstr ""
8342
8343 #. type: Plain text
8344 #: build/C/man3/inet_net_pton.3:159
8345 msgid "(B<inet_net_pton>())  I<pres> was not in correct presentation format."
8346 msgstr ""
8347
8348 #. type: Plain text
8349 #: build/C/man3/inet_net_pton.3:165
8350 msgid ""
8351 "The B<inet_net_pton>()  and B<inet_net_ntop>()  functions are nonstandard, "
8352 "but widely available."
8353 msgstr ""
8354
8355 #. type: SS
8356 #: build/C/man3/inet_net_pton.3:166
8357 #, no-wrap
8358 msgid "Input presentation format for inet_net_pton()"
8359 msgstr ""
8360
8361 #. type: Plain text
8362 #: build/C/man3/inet_net_pton.3:170
8363 msgid ""
8364 "The network number may be specified either as a hexadecimal value or in "
8365 "dotted-decimal notation."
8366 msgstr ""
8367
8368 #.  If the hexadecimal string is short, the remaining nibbles are zeroed.
8369 #. type: Plain text
8370 #: build/C/man3/inet_net_pton.3:175
8371 msgid ""
8372 "Hexadecimal values are indicated by an initial \"0x\" or \"0X\".  The "
8373 "hexadecimal digits populate the nibbles (half octets) of the network number "
8374 "from left to right in network byte order."
8375 msgstr ""
8376
8377 #. type: Plain text
8378 #: build/C/man3/inet_net_pton.3:179
8379 msgid ""
8380 "In dotted-decimal notation, up to four octets are specified, as decimal "
8381 "numbers separated by dots.  Thus, any of the following forms are accepted:"
8382 msgstr ""
8383
8384 #. type: Plain text
8385 #: build/C/man3/inet_net_pton.3:184
8386 #, no-wrap
8387 msgid ""
8388 "    a.b.c.d\n"
8389 "    a.b.c\n"
8390 "    a.b\n"
8391 "    a\n"
8392 msgstr ""
8393
8394 #.  Reading other man pages, some other implementations treat
8395 #.      'c' in a.b.c as a 16-bit number that populates right-most two bytes
8396 #.      'b' in a.b as a 24-bit number that populates right-most three bytes
8397 #. type: Plain text
8398 #: build/C/man3/inet_net_pton.3:192
8399 msgid ""
8400 "Each part is a number in the range 0 to 255 that populates one byte of the "
8401 "resulting network number, going from left to right, in network-byte (big "
8402 "endian) order.  Where a part is omitted, the resulting byte in the network "
8403 "number is zero."
8404 msgstr ""
8405
8406 #. type: Plain text
8407 #: build/C/man3/inet_net_pton.3:197
8408 msgid ""
8409 "For either hexadecimal or dotted-decimal format, the network number can "
8410 "optionally be followed by a slash and a number in the range 0 to 32, which "
8411 "specifies the size of the network number in bits."
8412 msgstr ""
8413
8414 #. type: SS
8415 #: build/C/man3/inet_net_pton.3:197
8416 #, no-wrap
8417 msgid "Return value of inet_net_pton()"
8418 msgstr ""
8419
8420 #. type: Plain text
8421 #: build/C/man3/inet_net_pton.3:207
8422 msgid ""
8423 "The return value of B<inet_net_pton>()  is the number of bits in the network "
8424 "number field.  If the input presentation string terminates with a slash and "
8425 "an explicit size value, then that size becomes the return value of "
8426 "B<inet_net_pton>().  Otherwise, the return value, I<bits>, is inferred as "
8427 "follows:"
8428 msgstr ""
8429
8430 #. type: Plain text
8431 #: build/C/man3/inet_net_pton.3:213
8432 msgid ""
8433 "If the most significant byte of the network number is greater than or equal "
8434 "to 240, then I<bits> is 32."
8435 msgstr ""
8436
8437 #. type: Plain text
8438 #: build/C/man3/inet_net_pton.3:220
8439 msgid ""
8440 "Otherwise, if the most significant byte of the network number is greater "
8441 "than or equal to 224, then I<bits> is 4."
8442 msgstr ""
8443
8444 #. type: Plain text
8445 #: build/C/man3/inet_net_pton.3:227
8446 msgid ""
8447 "Otherwise, if the most significant byte of the network number is greater "
8448 "than or equal to 192, then I<bits> is 24."
8449 msgstr ""
8450
8451 #. type: Plain text
8452 #: build/C/man3/inet_net_pton.3:234
8453 msgid ""
8454 "Otherwise, if the most significant byte of the network number is greater "
8455 "than or equal to 128, then I<bits> is 16."
8456 msgstr ""
8457
8458 #. type: Plain text
8459 #: build/C/man3/inet_net_pton.3:238
8460 msgid "Otherwise, I<bits> is 8."
8461 msgstr ""
8462
8463 #. type: Plain text
8464 #: build/C/man3/inet_net_pton.3:247
8465 msgid ""
8466 "If the resulting I<bits> value from the above steps is greater than or equal "
8467 "to 8, but the number of octets specified in the network number exceed "
8468 "I<bits/8>, then I<bits> is set to 8 times the number of octets actually "
8469 "specified."
8470 msgstr ""
8471
8472 #. type: Plain text
8473 #: build/C/man3/inet_net_pton.3:261
8474 msgid ""
8475 "The program below demonstrates the use of B<inet_net_pton>()  and "
8476 "B<inet_net_ntop>().  It uses B<inet_net_pton>()  to convert the presentation "
8477 "format network address provided in its first command-line argument to binary "
8478 "form, displays the return value from B<inet_net_pton>().  It then uses "
8479 "B<inet_net_ntop>()  to convert the binary form back to presentation format, "
8480 "and displays the resulting string."
8481 msgstr ""
8482
8483 #. type: Plain text
8484 #: build/C/man3/inet_net_pton.3:275
8485 msgid ""
8486 "In order to demonstrate that B<inet_net_pton>()  may not write to all bytes "
8487 "of its I<netp> argument, the program allows an optional second command-line "
8488 "argument, a number used to initialize the buffer before B<inet_net_pton>()  "
8489 "is called.  As its final line of output, the program displays all of the "
8490 "bytes of the buffer returned by B<inet_net_pton>()  allowing the user to see "
8491 "which bytes have not been touched by B<inet_net_pton>()."
8492 msgstr ""
8493
8494 #. type: Plain text
8495 #: build/C/man3/inet_net_pton.3:279
8496 msgid ""
8497 "An example run, showing that B<inet_net_pton>()  infers the number of bits "
8498 "in the network number:"
8499 msgstr ""
8500
8501 #. type: Plain text
8502 #: build/C/man3/inet_net_pton.3:286
8503 #, no-wrap
8504 msgid ""
8505 "$ B<./a.out 193.168>\n"
8506 "inet_net_pton() returned: 24\n"
8507 "inet_net_ntop() yielded:  193.168.0/24\n"
8508 "Raw address:              c1a80000\n"
8509 msgstr ""
8510
8511 #. type: Plain text
8512 #: build/C/man3/inet_net_pton.3:292
8513 msgid ""
8514 "Demonstrate that B<inet_net_pton>()  does not zero out unused bytes in its "
8515 "result buffer:"
8516 msgstr ""
8517
8518 #. type: Plain text
8519 #: build/C/man3/inet_net_pton.3:299
8520 #, no-wrap
8521 msgid ""
8522 "$ B<./a.out 193.168 0xffffffff>\n"
8523 "inet_net_pton() returned: 24\n"
8524 "inet_net_ntop() yielded:  193.168.0/24\n"
8525 "Raw address:              c1a800ff\n"
8526 msgstr ""
8527
8528 #. type: Plain text
8529 #: build/C/man3/inet_net_pton.3:307
8530 msgid ""
8531 "Demonstrate that B<inet_net_pton>()  will widen the inferred size of the "
8532 "network number, if the supplied number of bytes in the presentation string "
8533 "exceeds the inferred value:"
8534 msgstr ""
8535
8536 #. type: Plain text
8537 #: build/C/man3/inet_net_pton.3:314
8538 #, no-wrap
8539 msgid ""
8540 "$ B<./a.out 193.168.1.128>\n"
8541 "inet_net_pton() returned: 32\n"
8542 "inet_net_ntop() yielded:  193.168.1.128/32\n"
8543 "Raw address:              c1a80180\n"
8544 msgstr ""
8545
8546 #. type: Plain text
8547 #: build/C/man3/inet_net_pton.3:322
8548 msgid ""
8549 "Explicitly specifying the size of the network number overrides any inference "
8550 "about its size (but any extra bytes that are explicitly specified will still "
8551 "be used by B<inet_net_pton>(): to populate the result buffer):"
8552 msgstr ""
8553
8554 #. type: Plain text
8555 #: build/C/man3/inet_net_pton.3:329
8556 #, no-wrap
8557 msgid ""
8558 "$ B<./a.out 193.168.1.128/24>\n"
8559 "inet_net_pton() returned: 24\n"
8560 "inet_net_ntop() yielded:  193.168.1/24\n"
8561 "Raw address:              c1a80180\n"
8562 msgstr ""
8563
8564 #. type: Plain text
8565 #: build/C/man3/inet_net_pton.3:334
8566 #, no-wrap
8567 msgid "/* Link with \"-lresolv\" */\n"
8568 msgstr ""
8569
8570 #. type: Plain text
8571 #: build/C/man3/inet_net_pton.3:338
8572 #, no-wrap
8573 msgid ""
8574 "#include E<lt>arpa/inet.hE<gt>\n"
8575 "#include E<lt>stdio.hE<gt>\n"
8576 "#include E<lt>stdlib.hE<gt>\n"
8577 msgstr ""
8578
8579 #. type: Plain text
8580 #: build/C/man3/inet_net_pton.3:341
8581 #, no-wrap
8582 msgid ""
8583 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8584 "                        } while (0)\n"
8585 msgstr ""
8586
8587 #. type: Plain text
8588 #: build/C/man3/inet_net_pton.3:348
8589 #, no-wrap
8590 msgid ""
8591 "int\n"
8592 "main(int argc, char *argv[])\n"
8593 "{\n"
8594 "    char buf[100];\n"
8595 "    struct in_addr addr;\n"
8596 "    int bits;\n"
8597 msgstr ""
8598
8599 #. type: Plain text
8600 #: build/C/man3/inet_net_pton.3:355
8601 #, no-wrap
8602 msgid ""
8603 "    if (argc E<lt> 2) {\n"
8604 "        fprintf(stderr,\n"
8605 "                \"Usage: %s presentation-form [addr-init-value]\\en\",\n"
8606 "                argv[0]);\n"
8607 "        exit(EXIT_FAILURE);\n"
8608 "    }\n"
8609 msgstr ""
8610
8611 #. type: Plain text
8612 #: build/C/man3/inet_net_pton.3:361
8613 #, no-wrap
8614 msgid ""
8615 "    /* If argv[2] is supplied (a numeric value), use it to initialize\n"
8616 "       the output buffer given to inet_net_pton(), so that we can see\n"
8617 "       that inet_net_pton() initializes only those bytes needed for\n"
8618 "       the network number. If argv[2] is not supplied, then initialize\n"
8619 "       the buffer to zero (as is recommended practice). */\n"
8620 msgstr ""
8621
8622 #. type: Plain text
8623 #: build/C/man3/inet_net_pton.3:363
8624 #, no-wrap
8625 msgid "    addr.s_addr = (argc E<gt> 2) ? strtod(argv[2], NULL) : 0;\n"
8626 msgstr ""
8627
8628 #. type: Plain text
8629 #: build/C/man3/inet_net_pton.3:365
8630 #, no-wrap
8631 msgid "    /* Convert presentation network number in argv[1] to binary */\n"
8632 msgstr ""
8633
8634 #. type: Plain text
8635 #: build/C/man3/inet_net_pton.3:369
8636 #, no-wrap
8637 msgid ""
8638 "    bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));\n"
8639 "    if (bits == -1)\n"
8640 "        errExit(\"inet_net_ntop\");\n"
8641 msgstr ""
8642
8643 #. type: Plain text
8644 #: build/C/man3/inet_net_pton.3:371
8645 #, no-wrap
8646 msgid "    printf(\"inet_net_pton() returned: %d\\en\", bits);\n"
8647 msgstr ""
8648
8649 #. type: Plain text
8650 #: build/C/man3/inet_net_pton.3:374
8651 #, no-wrap
8652 msgid ""
8653 "    /* Convert binary format back to presentation, using \\(aqbits\\(aq\n"
8654 "       returned by inet_net_pton() */\n"
8655 msgstr ""
8656
8657 #. type: Plain text
8658 #: build/C/man3/inet_net_pton.3:377
8659 #, no-wrap
8660 msgid ""
8661 "    if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)\n"
8662 "        errExit(\"inet_net_ntop\");\n"
8663 msgstr ""
8664
8665 #. type: Plain text
8666 #: build/C/man3/inet_net_pton.3:379
8667 #, no-wrap
8668 msgid "    printf(\"inet_net_ntop() yielded:  %s\\en\", buf);\n"
8669 msgstr ""
8670
8671 #. type: Plain text
8672 #: build/C/man3/inet_net_pton.3:384
8673 #, no-wrap
8674 msgid ""
8675 "    /* Display \\(aqaddr\\(aq in raw form (in network byte order), so we "
8676 "can\n"
8677 "       see bytes not displayed by inet_net_ntop(); some of those bytes\n"
8678 "       may not have been touched by inet_net_ntop(), and so will still\n"
8679 "       have any initial value that was specified in argv[2]. */\n"
8680 msgstr ""
8681
8682 #. type: Plain text
8683 #: build/C/man3/inet_net_pton.3:386
8684 #, no-wrap
8685 msgid "    printf(\"Raw address:              %x\\en\", htonl(addr.s_addr));\n"
8686 msgstr ""
8687
8688 #. type: Plain text
8689 #: build/C/man3/inet_net_pton.3:392
8690 msgid "B<inet>(3), B<networks>(5)"
8691 msgstr ""
8692
8693 #. type: TH
8694 #: build/C/man3/inet_ntop.3:26
8695 #, no-wrap
8696 msgid "INET_NTOP"
8697 msgstr ""
8698
8699 #. type: TH
8700 #: build/C/man3/inet_ntop.3:26
8701 #, no-wrap
8702 msgid "2008-11-11"
8703 msgstr ""
8704
8705 #. type: Plain text
8706 #: build/C/man3/inet_ntop.3:29
8707 msgid "inet_ntop - convert IPv4 and IPv6 addresses from binary to text form"
8708 msgstr ""
8709
8710 #. type: Plain text
8711 #: build/C/man3/inet_ntop.3:35
8712 #, no-wrap
8713 msgid ""
8714 "B<const char *inet_ntop(int >I<af>B<, const void *>I<src>B<,>\n"
8715 "B<                      char *>I<dst>B<, socklen_t >I<size>B<);>\n"
8716 msgstr ""
8717
8718 #. type: Plain text
8719 #: build/C/man3/inet_ntop.3:48
8720 msgid ""
8721 "This function converts the network address structure I<src> in the I<af> "
8722 "address family into a character string.  The resulting string is copied to "
8723 "the buffer pointed to by I<dst>, which must be a non-null pointer.  The "
8724 "caller specifies the number of bytes available in this buffer in the "
8725 "argument I<size>."
8726 msgstr ""
8727
8728 #. type: Plain text
8729 #: build/C/man3/inet_ntop.3:57
8730 msgid ""
8731 "B<inet_ntop>()  extends the B<inet_ntoa>(3)  function to support multiple "
8732 "address families, B<inet_ntoa>(3)  is now considered to be deprecated in "
8733 "favor of B<inet_ntop>().  The following address families are currently "
8734 "supported:"
8735 msgstr ""
8736
8737 #. type: Plain text
8738 #: build/C/man3/inet_ntop.3:70
8739 msgid ""
8740 "I<src> points to a I<struct in_addr> (in network byte order)  which is "
8741 "converted to an IPv4 network address in the dotted-decimal format, "
8742 "\"I<ddd.ddd.ddd.ddd>\".  The buffer I<dst> must be at least "
8743 "B<INET_ADDRSTRLEN> bytes long."
8744 msgstr ""
8745
8746 #. type: Plain text
8747 #: build/C/man3/inet_ntop.3:83
8748 msgid ""
8749 "I<src> points to a I<struct in6_addr> (in network byte order)  which is "
8750 "converted to a representation of this address in the most appropriate IPv6 "
8751 "network address format for this address.  The buffer I<dst> must be at least "
8752 "B<INET6_ADDRSTRLEN> bytes long."
8753 msgstr ""
8754
8755 #. type: Plain text
8756 #: build/C/man3/inet_ntop.3:91
8757 msgid ""
8758 "On success, B<inet_ntop>()  returns a non-null pointer to I<dst>.  NULL is "
8759 "returned if there was an error, with I<errno> set to indicate the error."
8760 msgstr ""
8761
8762 #. type: Plain text
8763 #: build/C/man3/inet_ntop.3:96
8764 msgid "I<af> was not a valid address family."
8765 msgstr ""
8766
8767 #. type: TP
8768 #: build/C/man3/inet_ntop.3:96
8769 #, no-wrap
8770 msgid "B<ENOSPC>"
8771 msgstr ""
8772
8773 #. type: Plain text
8774 #: build/C/man3/inet_ntop.3:100
8775 msgid "The converted address string would exceed the size given by I<size>."
8776 msgstr ""
8777
8778 #.  2.1.3: size_t, 2.1.91: socklen_t
8779 #. type: Plain text
8780 #: build/C/man3/inet_ntop.3:112
8781 msgid ""
8782 "POSIX.1-2001.  Note that RFC\\ 2553 defines a prototype where the last "
8783 "argument I<size> is of type I<size_t>.  Many systems follow RFC\\ 2553.  "
8784 "Glibc 2.0 and 2.1 have I<size_t>, but 2.2 and later have I<socklen_t>."
8785 msgstr ""
8786
8787 #. type: Plain text
8788 #: build/C/man3/inet_ntop.3:115
8789 msgid "B<AF_INET6> converts IPv4-mapped IPv6 addresses into an IPv6 format."
8790 msgstr ""
8791
8792 #. type: Plain text
8793 #: build/C/man3/inet_ntop.3:118
8794 msgid "See B<inet_pton>(3)."
8795 msgstr ""
8796
8797 #. type: Plain text
8798 #: build/C/man3/inet_ntop.3:121
8799 msgid "B<getnameinfo>(3), B<inet>(3), B<inet_pton>(3)"
8800 msgstr ""
8801
8802 #. type: TH
8803 #: build/C/man3/inet_pton.3:27
8804 #, no-wrap
8805 msgid "INET_PTON"
8806 msgstr ""
8807
8808 #. type: TH
8809 #: build/C/man3/inet_pton.3:27
8810 #, no-wrap
8811 msgid "2008-06-18"
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man3/inet_pton.3:30
8816 msgid "inet_pton - convert IPv4 and IPv6 addresses from text to binary form"
8817 msgstr ""
8818
8819 #. type: Plain text
8820 #: build/C/man3/inet_pton.3:35
8821 #, no-wrap
8822 msgid "B<int inet_pton(int >I<af>B<, const char *>I<src>B<, void *>I<dst>B<);>\n"
8823 msgstr ""
8824
8825 #. type: Plain text
8826 #: build/C/man3/inet_pton.3:51
8827 msgid ""
8828 "This function converts the character string I<src> into a network address "
8829 "structure in the I<af> address family, then copies the network address "
8830 "structure to I<dst>.  The I<af> argument must be either B<AF_INET> or "
8831 "B<AF_INET6>."
8832 msgstr ""
8833
8834 #. type: Plain text
8835 #: build/C/man3/inet_pton.3:53
8836 msgid "The following address families are currently supported:"
8837 msgstr ""
8838
8839 #. type: Plain text
8840 #: build/C/man3/inet_pton.3:67
8841 msgid ""
8842 "I<src> points to a character string containing an IPv4 network address in "
8843 "dotted-decimal format, \"I<ddd.ddd.ddd.ddd>\", where I<ddd> is a decimal "
8844 "number of up to three digits in the range 0 to 255.  The address is "
8845 "converted to a I<struct in_addr> and copied to I<dst>, which must be "
8846 "I<sizeof(struct in_addr)> (4) bytes (32 bits) long."
8847 msgstr ""
8848
8849 #. type: Plain text
8850 #: build/C/man3/inet_pton.3:79
8851 msgid ""
8852 "I<src> points to a character string containing an IPv6 network address.  The "
8853 "address is converted to a I<struct in6_addr> and copied to I<dst>, which "
8854 "must be I<sizeof(struct in6_addr)> (16) bytes (128 bits) long.  The allowed "
8855 "formats for IPv6 addresses follow these rules:"
8856 msgstr ""
8857
8858 #. type: IP
8859 #: build/C/man3/inet_pton.3:80
8860 #, no-wrap
8861 msgid "1."
8862 msgstr ""
8863
8864 #. type: Plain text
8865 #: build/C/man3/inet_pton.3:87
8866 msgid ""
8867 "The preferred format is I<x:x:x:x:x:x:x:x>.  This form consists of eight "
8868 "hexadecimal numbers, each of which expresses a 16-bit value (i.e., each I<x> "
8869 "can be up to 4 hex digits)."
8870 msgstr ""
8871
8872 #. type: IP
8873 #: build/C/man3/inet_pton.3:87
8874 #, no-wrap
8875 msgid "2."
8876 msgstr ""
8877
8878 #. type: Plain text
8879 #: build/C/man3/inet_pton.3:100
8880 msgid ""
8881 "A series of contiguous zero values in the preferred format can be "
8882 "abbreviated to I<::>.  Only one instance of I<::> can occur in an address.  "
8883 "For example, the loopback address I<0:0:0:0:0:0:0:1> can be abbreviated as "
8884 "I<::1>.  The wildcard address, consisting of all zeros, can be written as "
8885 "I<::>."
8886 msgstr ""
8887
8888 #. type: IP
8889 #: build/C/man3/inet_pton.3:100
8890 #, no-wrap
8891 msgid "3."
8892 msgstr ""
8893
8894 #. type: Plain text
8895 #: build/C/man3/inet_pton.3:113
8896 msgid ""
8897 "An alternate format is useful for expressing IPv4-mapped IPv6 addresses.  "
8898 "This form is written as I<x:x:x:x:x:x:d.d.d.d>, where the six leading I<x>s "
8899 "are hexadecimal values that define the six most-significant 16-bit pieces of "
8900 "the address (i.e., 96 bits), and the I<d>s express a value in dotted-decimal "
8901 "notation that defines the least significant 32 bits of the address.  An "
8902 "example of such an address is I<::FFFF:204.152.189.116>."
8903 msgstr ""
8904
8905 #. type: Plain text
8906 #: build/C/man3/inet_pton.3:116
8907 msgid "See RFC 2373 for further details on the representation of IPv6 addresses."
8908 msgstr ""
8909
8910 #. type: Plain text
8911 #: build/C/man3/inet_pton.3:129
8912 msgid ""
8913 "B<inet_pton>()  returns 1 on success (network address was successfully "
8914 "converted).  0 is returned if I<src> does not contain a character string "
8915 "representing a valid network address in the specified address family.  If "
8916 "I<af> does not contain a valid address family, -1 is returned and I<errno> "
8917 "is set to B<EAFNOSUPPORT>."
8918 msgstr ""
8919
8920 #. type: Plain text
8921 #: build/C/man3/inet_pton.3:150
8922 msgid ""
8923 "Unlike B<inet_aton>(3)  and B<inet_addr>(3), B<inet_pton>()  supports IPv6 "
8924 "addresses.  On the other hand, B<inet_pton>()  accepts only IPv4 addresses "
8925 "in dotted-decimal notation, whereas B<inet_aton>(3)  and B<inet_addr>(3)  "
8926 "allow the more general numbers-and-dots notation (hexadecimal and octal "
8927 "number formats, and formats that don't require all four bytes to be "
8928 "explicitly written).  For an interface that handles both IPv6 addresses, and "
8929 "IPv4 addresses in numbers-and-dots notation, see B<getaddrinfo>(3)."
8930 msgstr ""
8931
8932 #. type: Plain text
8933 #: build/C/man3/inet_pton.3:156
8934 msgid ""
8935 "B<AF_INET6> does not recognize IPv4 addresses.  An explicit IPv4-mapped IPv6 "
8936 "address must be supplied in I<src> instead."
8937 msgstr ""
8938
8939 #. type: Plain text
8940 #: build/C/man3/inet_pton.3:162
8941 msgid ""
8942 "The program below demonstrates the use of B<inet_pton>()  and "
8943 "B<inet_ntop>(3).  Here are some example runs:"
8944 msgstr ""
8945
8946 #. type: Plain text
8947 #: build/C/man3/inet_pton.3:171
8948 #, no-wrap
8949 msgid ""
8950 "$B< ./a.out i6 0:0:0:0:0:0:0:0>\n"
8951 "::\n"
8952 "$B< ./a.out i6 1:0:0:0:0:0:0:8>\n"
8953 "1::8\n"
8954 "$B< ./a.out i6 0:0:0:0:0:FFFF:204.152.189.116>\n"
8955 "::ffff:204.152.189.116\n"
8956 msgstr ""
8957
8958 #. type: Plain text
8959 #: build/C/man3/inet_pton.3:180
8960 #, no-wrap
8961 msgid ""
8962 "#include E<lt>arpa/inet.hE<gt>\n"
8963 "#include E<lt>stdio.hE<gt>\n"
8964 "#include E<lt>stdlib.hE<gt>\n"
8965 "#include E<lt>string.hE<gt>\n"
8966 msgstr ""
8967
8968 #. type: Plain text
8969 #: build/C/man3/inet_pton.3:187
8970 #, no-wrap
8971 msgid ""
8972 "int\n"
8973 "main(int argc, char *argv[])\n"
8974 "{\n"
8975 "    unsigned char buf[sizeof(struct in6_addr)];\n"
8976 "    int domain, s;\n"
8977 "    char str[INET6_ADDRSTRLEN];\n"
8978 msgstr ""
8979
8980 #. type: Plain text
8981 #: build/C/man3/inet_pton.3:192
8982 #, no-wrap
8983 msgid ""
8984 "    if (argc != 3) {\n"
8985 "        fprintf(stderr, \"Usage: %s {i4|i6|E<lt>numE<gt>} string\\en\", "
8986 "argv[0]);\n"
8987 "        exit(EXIT_FAILURE);\n"
8988 "    }\n"
8989 msgstr ""
8990
8991 #. type: Plain text
8992 #: build/C/man3/inet_pton.3:195
8993 #, no-wrap
8994 msgid ""
8995 "    domain = (strcmp(argv[1], \"i4\") == 0) ? AF_INET :\n"
8996 "             (strcmp(argv[1], \"i6\") == 0) ? AF_INET6 : atoi(argv[1]);\n"
8997 msgstr ""
8998
8999 #. type: Plain text
9000 #: build/C/man3/inet_pton.3:204
9001 #, no-wrap
9002 msgid ""
9003 "    s = inet_pton(domain, argv[2], buf);\n"
9004 "    if (s E<lt>= 0) {\n"
9005 "        if (s == 0)\n"
9006 "            fprintf(stderr, \"Not in presentation format\");\n"
9007 "        else\n"
9008 "            perror(\"inet_pton\");\n"
9009 "        exit(EXIT_FAILURE);\n"
9010 "    }\n"
9011 msgstr ""
9012
9013 #. type: Plain text
9014 #: build/C/man3/inet_pton.3:209
9015 #, no-wrap
9016 msgid ""
9017 "    if (inet_ntop(domain, buf, str, INET6_ADDRSTRLEN) == NULL) {\n"
9018 "        perror(\"inet_ntop\");\n"
9019 "        exit(EXIT_FAILURE);\n"
9020 "    }\n"
9021 msgstr ""
9022
9023 #. type: Plain text
9024 #: build/C/man3/inet_pton.3:211
9025 #, no-wrap
9026 msgid "    printf(\"%s\\en\", str);\n"
9027 msgstr ""
9028
9029 #. type: Plain text
9030 #: build/C/man3/inet_pton.3:218
9031 msgid "B<getaddrinfo>(3), B<inet>(3), B<inet_ntop>(3)"
9032 msgstr ""
9033
9034 #. type: TH
9035 #: build/C/man7/ip.7:36
9036 #, no-wrap
9037 msgid "IP"
9038 msgstr ""
9039
9040 #. type: TH
9041 #: build/C/man7/ip.7:36
9042 #, no-wrap
9043 msgid "2014-05-10"
9044 msgstr ""
9045
9046 #. type: Plain text
9047 #: build/C/man7/ip.7:39
9048 msgid "ip - Linux IPv4 protocol implementation"
9049 msgstr ""
9050
9051 #. type: Plain text
9052 #: 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
9053 msgid "B<#include E<lt>netinet/in.hE<gt>>"
9054 msgstr ""
9055
9056 #. type: Plain text
9057 #: build/C/man7/ip.7:47
9058 msgid "B<#include E<lt>netinet/ip.hE<gt> >/* superset of previous */"
9059 msgstr ""
9060
9061 #. type: Plain text
9062 #: build/C/man7/ip.7:49
9063 msgid "I<tcp_socket>B< = socket(AF_INET, SOCK_STREAM, 0);>"
9064 msgstr ""
9065
9066 #. type: Plain text
9067 #: build/C/man7/ip.7:51
9068 msgid "I<udp_socket>B< = socket(AF_INET, SOCK_DGRAM, 0);>"
9069 msgstr ""
9070
9071 #. type: Plain text
9072 #: build/C/man7/ip.7:53
9073 msgid "I<raw_socket>B< = socket(AF_INET, SOCK_RAW, >I<protocol>B<);>"
9074 msgstr ""
9075
9076 #.  FIXME . has someone verified that 2.1 is really 1812 compliant?
9077 #. type: Plain text
9078 #: build/C/man7/ip.7:60
9079 msgid ""
9080 "Linux implements the Internet Protocol, version 4, described in RFC\\ 791 "
9081 "and RFC\\ 1122.  B<ip> contains a level 2 multicasting implementation "
9082 "conforming to RFC\\ 1112.  It also contains an IP router including a packet "
9083 "filter."
9084 msgstr ""
9085
9086 #. type: Plain text
9087 #: build/C/man7/ip.7:64
9088 msgid ""
9089 "The programming interface is BSD-sockets compatible.  For more information "
9090 "on sockets, see B<socket>(7)."
9091 msgstr ""
9092
9093 #. type: Plain text
9094 #: build/C/man7/ip.7:95
9095 msgid ""
9096 "An IP socket is created by calling the B<socket>(2)  function as "
9097 "B<socket(AF_INET, >I<socket_type>B<, >I<protocol>B<)>.  Valid socket types "
9098 "are B<SOCK_STREAM> to open a B<tcp>(7)  socket, B<SOCK_DGRAM> to open a "
9099 "B<udp>(7)  socket, or B<SOCK_RAW> to open a B<raw>(7)  socket to access the "
9100 "IP protocol directly.  I<protocol> is the IP protocol in the IP header to be "
9101 "received or sent.  The only valid values for I<protocol> are 0 and "
9102 "B<IPPROTO_TCP> for TCP sockets, and 0 and B<IPPROTO_UDP> for UDP sockets.  "
9103 "For B<SOCK_RAW> you may specify a valid IANA IP protocol defined in RFC\\ "
9104 "1700 assigned numbers."
9105 msgstr ""
9106
9107 #. type: Plain text
9108 #: build/C/man7/ip.7:117
9109 msgid ""
9110 "When a process wants to receive new incoming packets or connections, it "
9111 "should bind a socket to a local interface address using B<bind>(2).  In this "
9112 "case, only one IP socket may be bound to any given local (address, port) "
9113 "pair.  When B<INADDR_ANY> is specified in the bind call, the socket will be "
9114 "bound to I<all> local interfaces.  When B<listen>(2)  is called on an "
9115 "unbound socket, the socket is automatically bound to a random free port with "
9116 "the local address set to B<INADDR_ANY>.  When B<connect>(2)  is called on an "
9117 "unbound socket, the socket is automatically bound to a random free port or "
9118 "to a usable shared port with the local address set to B<INADDR_ANY>."
9119 msgstr ""
9120
9121 #. type: Plain text
9122 #: build/C/man7/ip.7:123
9123 msgid ""
9124 "A TCP local socket address that has been bound is unavailable for some time "
9125 "after closing, unless the B<SO_REUSEADDR> flag has been set.  Care should be "
9126 "taken when using this flag as it makes TCP less reliable."
9127 msgstr ""
9128
9129 #. type: Plain text
9130 #: build/C/man7/ip.7:134
9131 msgid ""
9132 "An IP socket address is defined as a combination of an IP interface address "
9133 "and a 16-bit port number.  The basic IP protocol does not supply port "
9134 "numbers, they are implemented by higher level protocols like B<udp>(7)  and "
9135 "B<tcp>(7).  On raw sockets I<sin_port> is set to the IP protocol."
9136 msgstr ""
9137
9138 #. type: Plain text
9139 #: build/C/man7/ip.7:142
9140 #, no-wrap
9141 msgid ""
9142 "struct sockaddr_in {\n"
9143 "    sa_family_t    sin_family; /* address family: AF_INET */\n"
9144 "    in_port_t      sin_port;   /* port in network byte order */\n"
9145 "    struct in_addr sin_addr;   /* internet address */\n"
9146 "};\n"
9147 msgstr ""
9148
9149 #. type: Plain text
9150 #: build/C/man7/ip.7:147
9151 #, no-wrap
9152 msgid ""
9153 "/* Internet address. */\n"
9154 "struct in_addr {\n"
9155 "    uint32_t       s_addr;     /* address in network byte order */\n"
9156 "};\n"
9157 msgstr ""
9158
9159 #. type: Plain text
9160 #: build/C/man7/ip.7:172
9161 msgid ""
9162 "I<sin_family> is always set to B<AF_INET>.  This is required; in Linux 2.2 "
9163 "most networking functions return B<EINVAL> when this setting is missing.  "
9164 "I<sin_port> contains the port in network byte order.  The port numbers below "
9165 "1024 are called I<privileged ports> (or sometimes: I<reserved ports>).  Only "
9166 "privileged processes (i.e., those having the B<CAP_NET_BIND_SERVICE> "
9167 "capability) may B<bind>(2)  to these sockets.  Note that the raw IPv4 "
9168 "protocol as such has no concept of a port, they are implemented only by "
9169 "higher protocols like B<tcp>(7)  and B<udp>(7)."
9170 msgstr ""
9171
9172 #. type: Plain text
9173 #: build/C/man7/ip.7:191
9174 msgid ""
9175 "I<sin_addr> is the IP host address.  The I<s_addr> member of I<struct "
9176 "in_addr> contains the host interface address in network byte order.  "
9177 "I<in_addr> should be assigned one of the B<INADDR_*> values (e.g., "
9178 "B<INADDR_ANY>)  or set using the B<inet_aton>(3), B<inet_addr>(3), "
9179 "B<inet_makeaddr>(3)  library functions or directly with the name resolver "
9180 "(see B<gethostbyname>(3))."
9181 msgstr ""
9182
9183 #.  Leave a loophole for XTP @)
9184 #. type: Plain text
9185 #: build/C/man7/ip.7:203
9186 msgid ""
9187 "IPv4 addresses are divided into unicast, broadcast and multicast addresses.  "
9188 "Unicast addresses specify a single interface of a host, broadcast addresses "
9189 "specify all hosts on a network and multicast addresses address all hosts in "
9190 "a multicast group.  Datagrams to broadcast addresses can be sent or received "
9191 "only when the B<SO_BROADCAST> socket flag is set.  In the current "
9192 "implementation, connection-oriented sockets are allowed to use only unicast "
9193 "addresses."
9194 msgstr ""
9195
9196 #. type: Plain text
9197 #: build/C/man7/ip.7:211
9198 msgid ""
9199 "Note that the address and the port are always stored in network byte order.  "
9200 "In particular, this means that you need to call B<htons>(3)  on the number "
9201 "that is assigned to a port.  All address/port manipulation functions in the "
9202 "standard library work in network byte order."
9203 msgstr ""
9204
9205 #. type: Plain text
9206 #: build/C/man7/ip.7:224
9207 msgid ""
9208 "There are several special addresses: B<INADDR_LOOPBACK> (127.0.0.1)  always "
9209 "refers to the local host via the loopback device; B<INADDR_ANY> (0.0.0.0)  "
9210 "means any address for binding; B<INADDR_BROADCAST> (255.255.255.255)  means "
9211 "any host and has the same effect on bind as B<INADDR_ANY> for historical "
9212 "reasons."
9213 msgstr ""
9214
9215 #.  or SOL_IP on Linux
9216 #. type: Plain text
9217 #: build/C/man7/ip.7:233
9218 msgid ""
9219 "IP supports some protocol-specific socket options that can be set with "
9220 "B<setsockopt>(2)  and read with B<getsockopt>(2).  The socket option level "
9221 "for IP is B<IPPROTO_IP>.  A boolean integer flag is zero when it is false, "
9222 "otherwise true."
9223 msgstr ""
9224
9225 #. type: TP
9226 #: build/C/man7/ip.7:233
9227 #, no-wrap
9228 msgid "B<IP_ADD_MEMBERSHIP> (since Linux 1.2)"
9229 msgstr ""
9230
9231 #. type: Plain text
9232 #: build/C/man7/ip.7:239
9233 msgid "Join a multicast group.  Argument is an I<ip_mreqn> structure."
9234 msgstr ""
9235
9236 #. type: Plain text
9237 #: build/C/man7/ip.7:249
9238 #, no-wrap
9239 msgid ""
9240 "struct ip_mreqn {\n"
9241 "    struct in_addr imr_multiaddr; /* IP multicast group\n"
9242 "                                     address */\n"
9243 "    struct in_addr imr_address;   /* IP address of local\n"
9244 "                                     interface */\n"
9245 "    int            imr_ifindex;   /* interface index */\n"
9246 "};\n"
9247 msgstr ""
9248
9249 #.  (i.e., within the 224.0.0.0-239.255.255.255 range)
9250 #. type: Plain text
9251 #: build/C/man7/ip.7:270
9252 msgid ""
9253 "I<imr_multiaddr> contains the address of the multicast group the application "
9254 "wants to join or leave.  It must be a valid multicast address (or "
9255 "B<setsockopt>(2)  fails with the error B<EINVAL>).  I<imr_address> is the "
9256 "address of the local interface with which the system should join the "
9257 "multicast group; if it is equal to B<INADDR_ANY>, an appropriate interface "
9258 "is chosen by the system.  I<imr_ifindex> is the interface index of the "
9259 "interface that should join/leave the I<imr_multiaddr> group, or 0 to "
9260 "indicate any interface."
9261 msgstr ""
9262
9263 #. type: Plain text
9264 #: build/C/man7/ip.7:285
9265 msgid ""
9266 "The I<ip_mreqn> structure is available only since Linux 2.2.  For "
9267 "compatibility, the old I<ip_mreq> structure (present since Linux 1.2) is "
9268 "still supported; it differs from I<ip_mreqn> only by not including the "
9269 "I<imr_ifindex> field.  Only valid as a B<setsockopt>(2)."
9270 msgstr ""
9271
9272 #. type: TP
9273 #: build/C/man7/ip.7:285
9274 #, no-wrap
9275 msgid "B<IP_ADD_SOURCE_MEMBERSHIP> (since Linux 2.4.22 / 2.5.68)"
9276 msgstr ""
9277
9278 #. type: Plain text
9279 #: build/C/man7/ip.7:292
9280 msgid ""
9281 "Join a multicast group and allow receiving data only from a specified "
9282 "source.  Argument is an I<ip_mreq_source> structure."
9283 msgstr ""
9284
9285 #. type: Plain text
9286 #: build/C/man7/ip.7:303
9287 #, no-wrap
9288 msgid ""
9289 "struct ip_mreq_source {\n"
9290 "    struct in_addr imr_multiaddr;  /* IP multicast group\n"
9291 "                                      address */\n"
9292 "    struct in_addr imr_interface;  /* IP address of local\n"
9293 "                                      interface */\n"
9294 "    struct in_addr imr_sourceaddr; /* IP address of\n"
9295 "                                      multicast source */\n"
9296 "};\n"
9297 msgstr ""
9298
9299 #. type: Plain text
9300 #: build/C/man7/ip.7:324
9301 msgid ""
9302 "The I<ip_mreq_source> structure is similar to I<ip_mreqn> described under "
9303 "B<IP_ADD_MEMBERSIP>.  The I<imr_multiaddr> field contains the address of the "
9304 "multicast group the application wants to join or leave.  The "
9305 "I<imr_interface> field is the address of the local interface with which the "
9306 "system should join the multicast group.  Finally, the I<imr_sourceaddr> "
9307 "field contains the address of the source the application wants to receive "
9308 "data from."
9309 msgstr ""
9310
9311 #. type: Plain text
9312 #: build/C/man7/ip.7:327
9313 msgid ""
9314 "This option can be used multiple times to allow receiving data from more "
9315 "than one source."
9316 msgstr ""
9317
9318 #. type: TP
9319 #: build/C/man7/ip.7:327
9320 #, no-wrap
9321 msgid "B<IP_BLOCK_SOURCE> (since Linux 2.4.22 / 2.5.68)"
9322 msgstr ""
9323
9324 #. type: Plain text
9325 #: build/C/man7/ip.7:335
9326 msgid ""
9327 "Stop receiving multicast data from a specific source in a given group.  This "
9328 "is valid only after the application has subscribed to the multicast group "
9329 "using either B<IP_ADD_MEMBERSHIP> or B<IP_ADD_SOURCE_MEMBERSHIP>."
9330 msgstr ""
9331
9332 #. type: Plain text
9333 #: build/C/man7/ip.7:340 build/C/man7/ip.7:362 build/C/man7/ip.7:926
9334 msgid ""
9335 "Argument is an I<ip_mreq_source> structure as described under "
9336 "B<IP_ADD_SOURCE_MEMBERSHIP>."
9337 msgstr ""
9338
9339 #. type: TP
9340 #: build/C/man7/ip.7:340
9341 #, no-wrap
9342 msgid "B<IP_DROP_MEMBERSHIP> (since Linux 1.2)"
9343 msgstr ""
9344
9345 #. type: Plain text
9346 #: build/C/man7/ip.7:349
9347 msgid ""
9348 "Leave a multicast group.  Argument is an I<ip_mreqn> or I<ip_mreq> structure "
9349 "similar to B<IP_ADD_MEMBERSHIP>."
9350 msgstr ""
9351
9352 #. type: TP
9353 #: build/C/man7/ip.7:349
9354 #, no-wrap
9355 msgid "B<IP_DROP_SOURCE_MEMBERSHIP> (since Linux 2.4.22 / 2.5.68)"
9356 msgstr ""
9357
9358 #. type: Plain text
9359 #: build/C/man7/ip.7:357
9360 msgid ""
9361 "Leave a source-specific group\\(emthat is, stop receiving data from a given "
9362 "multicast group that come from a given source.  If the application has "
9363 "subscribed to multiple sources within the same group, data from the "
9364 "remaining sources will still be delivered.  To stop receiving data from all "
9365 "sources at once, use B<IP_LEAVE_GROUP>."
9366 msgstr ""
9367
9368 #. type: TP
9369 #: build/C/man7/ip.7:362
9370 #, no-wrap
9371 msgid "B<IP_FREEBIND> (since Linux 2.4)"
9372 msgstr ""
9373
9374 #.  Precisely: 2.4.0-test10
9375 #. type: Plain text
9376 #: build/C/man7/ip.7:375
9377 msgid ""
9378 "If enabled, this boolean option allows binding to an IP address that is "
9379 "nonlocal or does not (yet) exist.  This permits listening on a socket, "
9380 "without requiring the underlying network interface or the specified dynamic "
9381 "IP address to be up at the time that the application is trying to bind to "
9382 "it.  This option is the per-socket equivalent of the I<ip_nonlocal_bind> "
9383 "I</proc> interface described below."
9384 msgstr ""
9385
9386 #. type: TP
9387 #: build/C/man7/ip.7:375
9388 #, no-wrap
9389 msgid "B<IP_HDRINCL> (since Linux 2.0)"
9390 msgstr ""
9391
9392 #. type: Plain text
9393 #: build/C/man7/ip.7:391
9394 msgid ""
9395 "If enabled, the user supplies an IP header in front of the user data.  Only "
9396 "valid for B<SOCK_RAW> sockets.  See B<raw>(7)  for more information.  When "
9397 "this flag is enabled the values set by B<IP_OPTIONS>, B<IP_TTL> and "
9398 "B<IP_TOS> are ignored."
9399 msgstr ""
9400
9401 #. type: TP
9402 #: build/C/man7/ip.7:391
9403 #, no-wrap
9404 msgid "B<IP_MSFILTER> (since Linux 2.4.22 / 2.5.68)"
9405 msgstr ""
9406
9407 #. type: Plain text
9408 #: build/C/man7/ip.7:397
9409 msgid ""
9410 "This option provides access to the advanced full-state filtering API.  "
9411 "Argument is an I<ip_msfilter> structure."
9412 msgstr ""
9413
9414 #. type: Plain text
9415 #: build/C/man7/ip.7:406
9416 #, no-wrap
9417 msgid ""
9418 "struct ip_msfilter {\n"
9419 "    struct in_addr imsf_multiaddr; /* IP multicast group\n"
9420 "                                      address */\n"
9421 "    struct in_addr imsf_interface; /* IP address of local\n"
9422 "                                      interface */\n"
9423 "    uint32_t       imsf_fmode;     /* Filter-mode */\n"
9424 msgstr ""
9425
9426 #. type: Plain text
9427 #: build/C/man7/ip.7:412
9428 #, no-wrap
9429 msgid ""
9430 "    uint32_t       imsf_numsrc;    /* Number of sources in\n"
9431 "                                      the following array */\n"
9432 "    struct in_addr imsf_slist[1];  /* Array of source\n"
9433 "                                      addresses */\n"
9434 "};\n"
9435 msgstr ""
9436
9437 #. type: Plain text
9438 #: build/C/man7/ip.7:427
9439 msgid ""
9440 "There are two macros, B<MCAST_INCLUDE> and B<MCAST_EXCLUDE>, which can be "
9441 "used to specify the filtering mode.  Additionally, the "
9442 "B<IP_MSFILTER_SIZE>(n)  macro exists to determine how much memory is needed "
9443 "to store I<ip_msfilter> structure with I<n> sources in the source list."
9444 msgstr ""
9445
9446 #. type: Plain text
9447 #: build/C/man7/ip.7:430
9448 msgid "For the full description of multicast source filtering refer to RFC 3376."
9449 msgstr ""
9450
9451 #. type: TP
9452 #: build/C/man7/ip.7:430
9453 #, no-wrap
9454 msgid "B<IP_MTU> (since Linux 2.2)"
9455 msgstr ""
9456
9457 #.  Precisely: 2.1.124
9458 #. type: Plain text
9459 #: build/C/man7/ip.7:438
9460 msgid ""
9461 "Retrieve the current known path MTU of the current socket.  Valid only when "
9462 "the socket has been connected.  Returns an integer.  Only valid as a "
9463 "B<getsockopt>(2)."
9464 msgstr ""
9465
9466 #. type: TP
9467 #: build/C/man7/ip.7:438
9468 #, no-wrap
9469 msgid "B<IP_MTU_DISCOVER> (since Linux 2.2)"
9470 msgstr ""
9471
9472 #.  Precisely: 2.1.124
9473 #. type: Plain text
9474 #: build/C/man7/ip.7:459
9475 msgid ""
9476 "Set or receive the Path MTU Discovery setting for a socket.  When enabled, "
9477 "Linux will perform Path MTU Discovery as defined in RFC\\ 1191 on "
9478 "B<SOCK_STREAM> sockets.  For non-B<SOCK_STREAM> sockets, B<IP_PMTUDISC_DO> "
9479 "forces the don't-fragment flag to be set on all outgoing packets.  It is the "
9480 "user's responsibility to packetize the data in MTU-sized chunks and to do "
9481 "the retransmits if necessary.  The kernel will reject (with B<EMSGSIZE>)  "
9482 "datagrams that are bigger than the known path MTU.  B<IP_PMTUDISC_WANT> will "
9483 "fragment a datagram if needed according to the path MTU, or will set the "
9484 "don't-fragment flag otherwise."
9485 msgstr ""
9486
9487 #. type: Plain text
9488 #: build/C/man7/ip.7:467
9489 msgid ""
9490 "The system-wide default can be toggled between B<IP_PMTUDISC_WANT> and "
9491 "B<IP_PMTUDISC_DONT> by writing (respectively, zero and nonzero values) to "
9492 "the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file."
9493 msgstr ""
9494
9495 #. type: tbl table
9496 #: build/C/man7/ip.7:471
9497 #, no-wrap
9498 msgid "Path MTU discovery value:Meaning\n"
9499 msgstr ""
9500
9501 #. type: tbl table
9502 #: build/C/man7/ip.7:472
9503 #, no-wrap
9504 msgid "IP_PMTUDISC_WANT:Use per-route settings.\n"
9505 msgstr ""
9506
9507 #. type: tbl table
9508 #: build/C/man7/ip.7:473
9509 #, no-wrap
9510 msgid "IP_PMTUDISC_DONT:Never do Path MTU Discovery.\n"
9511 msgstr ""
9512
9513 #. type: tbl table
9514 #: build/C/man7/ip.7:474
9515 #, no-wrap
9516 msgid "IP_PMTUDISC_DO:Always do Path MTU Discovery.\n"
9517 msgstr ""
9518
9519 #. type: tbl table
9520 #: build/C/man7/ip.7:475
9521 #, no-wrap
9522 msgid "IP_PMTUDISC_PROBE:Set DF but ignore Path MTU.\n"
9523 msgstr ""
9524
9525 #. type: Plain text
9526 #: build/C/man7/ip.7:493
9527 msgid ""
9528 "When PMTU discovery is enabled, the kernel automatically keeps track of the "
9529 "path MTU per destination host.  When it is connected to a specific peer with "
9530 "B<connect>(2), the currently known path MTU can be retrieved conveniently "
9531 "using the B<IP_MTU> socket option (e.g., after an B<EMSGSIZE> error "
9532 "occurred).  The path MTU may change over time.  For connectionless sockets "
9533 "with many destinations, the new MTU for a given destination can also be "
9534 "accessed using the error queue (see B<IP_RECVERR>).  A new error will be "
9535 "queued for every incoming MTU update."
9536 msgstr ""
9537
9538 #. type: Plain text
9539 #: build/C/man7/ip.7:498
9540 msgid ""
9541 "While MTU discovery is in progress, initial packets from datagram sockets "
9542 "may be dropped.  Applications using UDP should be aware of this and not take "
9543 "it into account for their packet retransmit strategy."
9544 msgstr ""
9545
9546 #.  FIXME . this is an ugly hack
9547 #. type: Plain text
9548 #: build/C/man7/ip.7:503
9549 msgid ""
9550 "To bootstrap the path MTU discovery process on unconnected sockets, it is "
9551 "possible to start with a big datagram size (up to 64K-headers bytes long) "
9552 "and let it shrink by updates of the path MTU."
9553 msgstr ""
9554
9555 #. type: Plain text
9556 #: build/C/man7/ip.7:512
9557 msgid ""
9558 "To get an initial estimate of the path MTU, connect a datagram socket to the "
9559 "destination address using B<connect>(2)  and retrieve the MTU by calling "
9560 "B<getsockopt>(2)  with the B<IP_MTU> option."
9561 msgstr ""
9562
9563 #. type: Plain text
9564 #: build/C/man7/ip.7:524
9565 msgid ""
9566 "It is possible to implement RFC 4821 MTU probing with B<SOCK_DGRAM> or "
9567 "B<SOCK_RAW> sockets by setting a value of B<IP_PMTUDISC_PROBE> (available "
9568 "since Linux 2.6.22).  This is also particularly useful for diagnostic tools "
9569 "such as B<tracepath>(8)  that wish to deliberately send probe packets larger "
9570 "than the observed Path MTU."
9571 msgstr ""
9572
9573 #. type: TP
9574 #: build/C/man7/ip.7:524
9575 #, no-wrap
9576 msgid "B<IP_MULTICAST_ALL> (since Linux 2.6.31)"
9577 msgstr ""
9578
9579 #. type: Plain text
9580 #: build/C/man7/ip.7:538
9581 msgid ""
9582 "This option can be used to modify the delivery policy of multicast messages "
9583 "to sockets bound to the wildcard B<INADDR_ANY> address.  The argument is a "
9584 "boolean integer (defaults to 1).  If set to 1, the socket will receive "
9585 "messages from all the groups that have been joined globally on the whole "
9586 "system.  Otherwise, it will deliver messages only from the groups that have "
9587 "been explicitly joined (for example via the B<IP_ADD_MEMBERSHIP> option) on "
9588 "this particular socket."
9589 msgstr ""
9590
9591 #. type: TP
9592 #: build/C/man7/ip.7:538
9593 #, no-wrap
9594 msgid "B<IP_MULTICAST_IF> (since Linux 1.2)"
9595 msgstr ""
9596
9597 #.  net: IP_MULTICAST_IF setsockopt now recognizes struct mreq
9598 #.  Commit: 3a084ddb4bf299a6e898a9a07c89f3917f0713f7
9599 #. type: Plain text
9600 #: build/C/man7/ip.7:550
9601 msgid ""
9602 "Set the local device for a multicast socket.  Argument is an I<ip_mreqn> or "
9603 "I<ip_mreq> (since Linux 3.5)  structure similar to B<IP_ADD_MEMBERSHIP>."
9604 msgstr ""
9605
9606 #. type: Plain text
9607 #: build/C/man7/ip.7:554
9608 msgid "When an invalid socket option is passed, B<ENOPROTOOPT> is returned."
9609 msgstr ""
9610
9611 #. type: TP
9612 #: build/C/man7/ip.7:554
9613 #, no-wrap
9614 msgid "B<IP_MULTICAST_LOOP> (since Linux 1.2)"
9615 msgstr ""
9616
9617 #. type: Plain text
9618 #: build/C/man7/ip.7:558
9619 msgid ""
9620 "Set or read a boolean integer argument that determines whether sent "
9621 "multicast packets should be looped back to the local sockets."
9622 msgstr ""
9623
9624 #. type: TP
9625 #: build/C/man7/ip.7:558
9626 #, no-wrap
9627 msgid "B<IP_MULTICAST_TTL> (since Linux 1.2)"
9628 msgstr ""
9629
9630 #. type: Plain text
9631 #: build/C/man7/ip.7:566
9632 msgid ""
9633 "Set or read the time-to-live value of outgoing multicast packets for this "
9634 "socket.  It is very important for multicast packets to set the smallest TTL "
9635 "possible.  The default is 1 which means that multicast packets don't leave "
9636 "the local network unless the user program explicitly requests it.  Argument "
9637 "is an integer."
9638 msgstr ""
9639
9640 #. type: TP
9641 #: build/C/man7/ip.7:566
9642 #, no-wrap
9643 msgid "B<IP_NODEFRAG> (since Linux 2.6.36)"
9644 msgstr ""
9645
9646 #. type: Plain text
9647 #: build/C/man7/ip.7:574
9648 msgid ""
9649 "If enabled (argument is nonzero), the reassembly of outgoing packets is "
9650 "disabled in the netfilter layer.  This option is valid only for B<SOCK_RAW> "
9651 "sockets.  The argument is an integer."
9652 msgstr ""
9653
9654 #. type: TP
9655 #: build/C/man7/ip.7:574
9656 #, no-wrap
9657 msgid "B<IP_OPTIONS> (since Linux 2.0)"
9658 msgstr ""
9659
9660 #.  Precisely: 1.3.30
9661 #. type: Plain text
9662 #: build/C/man7/ip.7:603
9663 msgid ""
9664 "Set or get the IP options to be sent with every packet from this socket.  "
9665 "The arguments are a pointer to a memory buffer containing the options and "
9666 "the option length.  The B<setsockopt>(2)  call sets the IP options "
9667 "associated with a socket.  The maximum option size for IPv4 is 40 bytes.  "
9668 "See RFC\\ 791 for the allowed options.  When the initial connection request "
9669 "packet for a B<SOCK_STREAM> socket contains IP options, the IP options will "
9670 "be set automatically to the options from the initial packet with routing "
9671 "headers reversed.  Incoming packets are not allowed to change options after "
9672 "the connection is established.  The processing of all incoming source "
9673 "routing options is disabled by default and can be enabled by using the "
9674 "I<accept_source_route> I</proc> interface.  Other options like timestamps "
9675 "are still handled.  For datagram sockets, IP options can be only set by the "
9676 "local user.  Calling B<getsockopt>(2)  with B<IP_OPTIONS> puts the current "
9677 "IP options used for sending into the supplied buffer."
9678 msgstr ""
9679
9680 #. type: TP
9681 #: build/C/man7/ip.7:603
9682 #, no-wrap
9683 msgid "B<IP_PKTINFO> (since Linux 2.2)"
9684 msgstr ""
9685
9686 #.  Precisely: 2.1.68
9687 #. type: Plain text
9688 #: build/C/man7/ip.7:620
9689 msgid ""
9690 "Pass an B<IP_PKTINFO> ancillary message that contains a I<pktinfo> structure "
9691 "that supplies some information about the incoming packet.  This only works "
9692 "for datagram oriented sockets.  The argument is a flag that tells the socket "
9693 "whether the B<IP_PKTINFO> message should be passed or not.  The message "
9694 "itself can only be sent/retrieved as control message with a packet using "
9695 "B<recvmsg>(2)  or B<sendmsg>(2)."
9696 msgstr ""
9697
9698 #. type: Plain text
9699 #: build/C/man7/ip.7:629
9700 #, no-wrap
9701 msgid ""
9702 "struct in_pktinfo {\n"
9703 "    unsigned int   ipi_ifindex;  /* Interface index */\n"
9704 "    struct in_addr ipi_spec_dst; /* Local address */\n"
9705 "    struct in_addr ipi_addr;     /* Header Destination\n"
9706 "                                    address */\n"
9707 "};\n"
9708 msgstr ""
9709
9710 #.  FIXME . elaborate on that.
9711 #.  This field is grossly misnamed
9712 #. type: Plain text
9713 #: build/C/man7/ip.7:654
9714 msgid ""
9715 "I<ipi_ifindex> is the unique index of the interface the packet was received "
9716 "on.  I<ipi_spec_dst> is the local address of the packet and I<ipi_addr> is "
9717 "the destination address in the packet header.  If B<IP_PKTINFO> is passed to "
9718 "B<sendmsg>(2)  and I<ipi_spec_dst> is not zero, then it is used as the local "
9719 "source address for the routing table lookup and for setting up IP source "
9720 "route options.  When I<ipi_ifindex> is not zero, the primary local address "
9721 "of the interface specified by the index overwrites I<ipi_spec_dst> for the "
9722 "routing table lookup."
9723 msgstr ""
9724
9725 #. type: TP
9726 #: build/C/man7/ip.7:654
9727 #, no-wrap
9728 msgid "B<IP_RECVERR> (since Linux 2.2)"
9729 msgstr ""
9730
9731 #.  Precisely: 2.1.15
9732 #.  or SOL_IP on Linux
9733 #. type: Plain text
9734 #: build/C/man7/ip.7:676
9735 msgid ""
9736 "Enable extended reliable error message passing.  When enabled on a datagram "
9737 "socket, all generated errors will be queued in a per-socket error queue.  "
9738 "When the user receives an error from a socket operation, the errors can be "
9739 "received by calling B<recvmsg>(2)  with the B<MSG_ERRQUEUE> flag set.  The "
9740 "I<sock_extended_err> structure describing the error will be passed in an "
9741 "ancillary message with the type B<IP_RECVERR> and the level B<IPPROTO_IP>.  "
9742 "This is useful for reliable error handling on unconnected sockets.  The "
9743 "received data portion of the error queue contains the error packet."
9744 msgstr ""
9745
9746 #. type: Plain text
9747 #: build/C/man7/ip.7:682
9748 msgid "The B<IP_RECVERR> control message contains a I<sock_extended_err> structure:"
9749 msgstr ""
9750
9751 #. type: Plain text
9752 #: build/C/man7/ip.7:690
9753 #, no-wrap
9754 msgid ""
9755 "#define SO_EE_ORIGIN_NONE    0\n"
9756 "#define SO_EE_ORIGIN_LOCAL   1\n"
9757 "#define SO_EE_ORIGIN_ICMP    2\n"
9758 "#define SO_EE_ORIGIN_ICMP6   3\n"
9759 msgstr ""
9760
9761 #. type: Plain text
9762 #: build/C/man7/ip.7:701
9763 #, no-wrap
9764 msgid ""
9765 "struct sock_extended_err {\n"
9766 "    uint32_t ee_errno;   /* error number */\n"
9767 "    uint8_t  ee_origin;  /* where the error originated */\n"
9768 "    uint8_t  ee_type;    /* type */\n"
9769 "    uint8_t  ee_code;    /* code */\n"
9770 "    uint8_t  ee_pad;\n"
9771 "    uint32_t ee_info;    /* additional information */\n"
9772 "    uint32_t ee_data;    /* other data */\n"
9773 "    /* More data may follow */\n"
9774 "};\n"
9775 msgstr ""
9776
9777 #. type: Plain text
9778 #: build/C/man7/ip.7:703
9779 #, no-wrap
9780 msgid "struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);\n"
9781 msgstr ""
9782
9783 #. type: Plain text
9784 #: build/C/man7/ip.7:726
9785 msgid ""
9786 "I<ee_errno> contains the I<errno> number of the queued error.  I<ee_origin> "
9787 "is the origin code of where the error originated.  The other fields are "
9788 "protocol-specific.  The macro B<SO_EE_OFFENDER> returns a pointer to the "
9789 "address of the network object where the error originated from given a "
9790 "pointer to the ancillary message.  If this address is not known, the "
9791 "I<sa_family> member of the I<sockaddr> contains B<AF_UNSPEC> and the other "
9792 "fields of the I<sockaddr> are undefined."
9793 msgstr ""
9794
9795 #.  FIXME . Is it a good idea to document that? It is a dubious feature.
9796 #.  On
9797 #.  .B SOCK_STREAM
9798 #.  sockets,
9799 #.  .B IP_RECVERR
9800 #.  has slightly different semantics. Instead of
9801 #.  saving the errors for the next timeout, it passes all incoming
9802 #.  errors immediately to the user.
9803 #.  This might be useful for very short-lived TCP connections which
9804 #.  need fast error handling. Use this option with care:
9805 #.  it makes TCP unreliable
9806 #.  by not allowing it to recover properly from routing
9807 #.  shifts and other normal
9808 #.  conditions and breaks the protocol specification.
9809 #. type: Plain text
9810 #: build/C/man7/ip.7:785
9811 msgid ""
9812 "IP uses the I<sock_extended_err> structure as follows: I<ee_origin> is set "
9813 "to B<SO_EE_ORIGIN_ICMP> for errors received as an ICMP packet, or "
9814 "B<SO_EE_ORIGIN_LOCAL> for locally generated errors.  Unknown values should "
9815 "be ignored.  I<ee_type> and I<ee_code> are set from the type and code fields "
9816 "of the ICMP header.  I<ee_info> contains the discovered MTU for B<EMSGSIZE> "
9817 "errors.  The message also contains the I<sockaddr_in of the node> caused the "
9818 "error, which can be accessed with the B<SO_EE_OFFENDER> macro.  The "
9819 "I<sin_family> field of the B<SO_EE_OFFENDER> address is B<AF_UNSPEC> when "
9820 "the source was unknown.  When the error originated from the network, all IP "
9821 "options (B<IP_OPTIONS>, B<IP_TTL>, etc.) enabled on the socket and contained "
9822 "in the error packet are passed as control messages.  The payload of the "
9823 "packet causing the error is returned as normal payload.  Note that TCP has "
9824 "no error queue; B<MSG_ERRQUEUE> is not permitted on B<SOCK_STREAM> sockets.  "
9825 "B<IP_RECVERR> is valid for TCP, but all errors are returned by socket "
9826 "function return or B<SO_ERROR> only."
9827 msgstr ""
9828
9829 #. type: Plain text
9830 #: build/C/man7/ip.7:790
9831 msgid ""
9832 "For raw sockets, B<IP_RECVERR> enables passing of all received ICMP errors "
9833 "to the application, otherwise errors are only reported on connected sockets"
9834 msgstr ""
9835
9836 #. type: Plain text
9837 #: build/C/man7/ip.7:794
9838 msgid ""
9839 "It sets or retrieves an integer boolean flag.  B<IP_RECVERR> defaults to "
9840 "off."
9841 msgstr ""
9842
9843 #. type: TP
9844 #: build/C/man7/ip.7:794
9845 #, no-wrap
9846 msgid "B<IP_RECVOPTS> (since Linux 2.2)"
9847 msgstr ""
9848
9849 #.  Precisely: 2.1.15
9850 #. type: Plain text
9851 #: build/C/man7/ip.7:805
9852 msgid ""
9853 "Pass all incoming IP options to the user in a B<IP_OPTIONS> control "
9854 "message.  The routing header and other options are already filled in for the "
9855 "local host.  Not supported for B<SOCK_STREAM> sockets."
9856 msgstr ""
9857
9858 #. type: TP
9859 #: build/C/man7/ip.7:805
9860 #, no-wrap
9861 msgid "B<IP_RECVORIGDSTADDR> (since Linux 2.6.29)"
9862 msgstr ""
9863
9864 #.  commit e8b2dfe9b4501ed0047459b2756ba26e5a940a69
9865 #. type: Plain text
9866 #: build/C/man7/ip.7:816
9867 msgid ""
9868 "This boolean option enables the B<IP_ORIGDSTADDR> ancillary message in "
9869 "B<recvmsg>(2), in which the kernel returns the original destination address "
9870 "of the datagram being received.  The ancillary message contains a I<struct "
9871 "sockaddr_in>."
9872 msgstr ""
9873
9874 #. type: TP
9875 #: build/C/man7/ip.7:816
9876 #, no-wrap
9877 msgid "B<IP_RECVTOS> (since Linux 2.2)"
9878 msgstr ""
9879
9880 #.  Precisely: 2.1.68
9881 #. type: Plain text
9882 #: build/C/man7/ip.7:825
9883 msgid ""
9884 "If enabled, the B<IP_TOS> ancillary message is passed with incoming "
9885 "packets.  It contains a byte which specifies the Type of Service/Precedence "
9886 "field of the packet header.  Expects a boolean integer flag."
9887 msgstr ""
9888
9889 #. type: TP
9890 #: build/C/man7/ip.7:825
9891 #, no-wrap
9892 msgid "B<IP_RECVTTL> (since Linux 2.2)"
9893 msgstr ""
9894
9895 #.  Precisely: 2.1.68
9896 #. type: Plain text
9897 #: build/C/man7/ip.7:835
9898 msgid ""
9899 "When this flag is set, pass a B<IP_TTL> control message with the time to "
9900 "live field of the received packet as a byte.  Not supported for "
9901 "B<SOCK_STREAM> sockets."
9902 msgstr ""
9903
9904 #. type: TP
9905 #: build/C/man7/ip.7:835
9906 #, no-wrap
9907 msgid "B<IP_RETOPTS> (since Linux 2.2)"
9908 msgstr ""
9909
9910 #.  Precisely: 2.1.15
9911 #. type: Plain text
9912 #: build/C/man7/ip.7:842
9913 msgid ""
9914 "Identical to B<IP_RECVOPTS>, but returns raw unprocessed options with "
9915 "timestamp and route record options not filled in for this hop."
9916 msgstr ""
9917
9918 #. type: TP
9919 #: build/C/man7/ip.7:842
9920 #, no-wrap
9921 msgid "B<IP_ROUTER_ALERT> (since Linux 2.2)"
9922 msgstr ""
9923
9924 #.  Precisely: 2.1.68
9925 #. type: Plain text
9926 #: build/C/man7/ip.7:854
9927 msgid ""
9928 "Pass all to-be forwarded packets with the IP Router Alert option set to this "
9929 "socket.  Only valid for raw sockets.  This is useful, for instance, for "
9930 "user-space RSVP daemons.  The tapped packets are not forwarded by the "
9931 "kernel; it is the user's responsibility to send them out again.  Socket "
9932 "binding is ignored, such packets are only filtered by protocol.  Expects an "
9933 "integer flag."
9934 msgstr ""
9935
9936 #. type: TP
9937 #: build/C/man7/ip.7:854
9938 #, no-wrap
9939 msgid "B<IP_TOS> (since Linux 1.0)"
9940 msgstr ""
9941
9942 #.  FIXME elaborate on this
9943 #.  Needs CAP_NET_ADMIN
9944 #.  Boolean
9945 #.  Since Linux 2.6.27
9946 #.  Author: KOVACS Krisztian <hidden@sch.bme.hu>
9947 #.  http://lwn.net/Articles/252545/
9948 #. type: Plain text
9949 #: build/C/man7/ip.7:888
9950 msgid ""
9951 "Set or receive the Type-Of-Service (TOS) field that is sent with every IP "
9952 "packet originating from this socket.  It is used to prioritize packets on "
9953 "the network.  TOS is a byte.  There are some standard TOS flags defined: "
9954 "B<IPTOS_LOWDELAY> to minimize delays for interactive traffic, "
9955 "B<IPTOS_THROUGHPUT> to optimize throughput, B<IPTOS_RELIABILITY> to optimize "
9956 "for reliability, B<IPTOS_MINCOST> should be used for \"filler data\" where "
9957 "slow transmission doesn't matter.  At most one of these TOS values can be "
9958 "specified.  Other bits are invalid and shall be cleared.  Linux sends "
9959 "B<IPTOS_LOWDELAY> datagrams first by default, but the exact behavior depends "
9960 "on the configured queueing discipline.  Some high priority levels may "
9961 "require superuser privileges (the B<CAP_NET_ADMIN> capability).  The "
9962 "priority can also be set in a protocol independent way by the "
9963 "(B<SOL_SOCKET>, B<SO_PRIORITY>)  socket option (see B<socket>(7))."
9964 msgstr ""
9965
9966 #. type: TP
9967 #: build/C/man7/ip.7:888
9968 #, no-wrap
9969 msgid "B<IP_TRANSPARENT> (since Linux 2.6.24)"
9970 msgstr ""
9971
9972 #.  commit f5715aea4564f233767ea1d944b2637a5fd7cd2e
9973 #.      This patch introduces the IP_TRANSPARENT socket option: enabling that
9974 #.      will make the IPv4 routing omit the non-local source address check on
9975 #.      output. Setting IP_TRANSPARENT requires NET_ADMIN capability.
9976 #.  http://lwn.net/Articles/252545/
9977 #. type: Plain text
9978 #: build/C/man7/ip.7:908
9979 msgid ""
9980 "Setting this boolean option enables transparent proxying on this socket.  "
9981 "This socket option allows the calling application to bind to a nonlocal IP "
9982 "address and operate both as a client and a server with the foreign address "
9983 "as the local endpoint.  NOTE: this requires that routing be set up in a way "
9984 "that packets going to the foreign address are routed through the TProxy box "
9985 "(i.e., the system hosting the application that employs the B<IP_TRANSPARENT> "
9986 "socket option).  Enabling this socket option requires superuser privileges "
9987 "(the B<CAP_NET_ADMIN> capability)."
9988 msgstr ""
9989
9990 #. type: Plain text
9991 #: build/C/man7/ip.7:911
9992 msgid ""
9993 "TProxy redirection with the iptables TPROXY target also requires that this "
9994 "option be set on the redirected socket."
9995 msgstr ""
9996
9997 #. type: TP
9998 #: build/C/man7/ip.7:911
9999 #, no-wrap
10000 msgid "B<IP_TTL> (since Linux 1.0)"
10001 msgstr ""
10002
10003 #. type: Plain text
10004 #: build/C/man7/ip.7:915
10005 msgid ""
10006 "Set or retrieve the current time-to-live field that is used in every packet "
10007 "sent from this socket."
10008 msgstr ""
10009
10010 #. type: TP
10011 #: build/C/man7/ip.7:915
10012 #, no-wrap
10013 msgid "B<IP_UNBLOCK_SOURCE> (since Linux 2.4.22 / 2.5.68)"
10014 msgstr ""
10015
10016 #. type: Plain text
10017 #: build/C/man7/ip.7:921
10018 msgid ""
10019 "Unblock previously blocked multicast source.  Returns B<EADDRNOTAVAIL> when "
10020 "given source is not being blocked."
10021 msgstr ""
10022
10023 #.  FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented:
10024 #.      ip_queue_maxlen
10025 #.      ip_conntrack_max
10026 #. type: Plain text
10027 #: build/C/man7/ip.7:942
10028 msgid ""
10029 "The IP protocol supports a set of I</proc> interfaces to configure some "
10030 "global parameters.  The parameters can be accessed by reading or writing "
10031 "files in the directory I</proc/sys/net/ipv4/>.  Interfaces described as "
10032 "I<Boolean> take an integer value, with a nonzero value (\"true\") meaning "
10033 "that the corresponding option is enabled, and a zero value (\"false\")  "
10034 "meaning that the option is disabled."
10035 msgstr ""
10036
10037 #. type: TP
10038 #: build/C/man7/ip.7:942
10039 #, no-wrap
10040 msgid "I<ip_always_defrag> (Boolean; since Linux 2.2.13)"
10041 msgstr ""
10042
10043 #. type: Plain text
10044 #: build/C/man7/ip.7:948
10045 msgid ""
10046 "[New with kernel 2.2.13; in earlier kernel versions this feature was "
10047 "controlled at compile time by the B<CONFIG_IP_ALWAYS_DEFRAG> option; this "
10048 "option is not present in 2.4.x and later]"
10049 msgstr ""
10050
10051 #. type: Plain text
10052 #: build/C/man7/ip.7:955
10053 msgid ""
10054 "When this boolean flag is enabled (not equal 0), incoming fragments (parts "
10055 "of IP packets that arose when some host between origin and destination "
10056 "decided that the packets were too large and cut them into pieces) will be "
10057 "reassembled (defragmented) before being processed, even if they are about to "
10058 "be forwarded."
10059 msgstr ""
10060
10061 #. type: Plain text
10062 #: build/C/man7/ip.7:962
10063 msgid ""
10064 "Only enable if running either a firewall that is the sole link to your "
10065 "network or a transparent proxy; never ever use it for a normal router or "
10066 "host.  Otherwise, fragmented communication can be disturbed if the fragments "
10067 "travel over different links.  Defragmentation also has a large memory and "
10068 "CPU time cost."
10069 msgstr ""
10070
10071 #. type: Plain text
10072 #: build/C/man7/ip.7:966
10073 msgid ""
10074 "This is automagically turned on when masquerading or transparent proxying "
10075 "are configured."
10076 msgstr ""
10077
10078 #. type: TP
10079 #: build/C/man7/ip.7:966
10080 #, no-wrap
10081 msgid "I<ip_autoconfig> (since Linux 2.2 to 2.6.17)"
10082 msgstr ""
10083
10084 #.  Precisely: since 2.1.68
10085 #.  FIXME document ip_autoconfig
10086 #. type: Plain text
10087 #: build/C/man7/ip.7:972
10088 msgid "Not documented."
10089 msgstr ""
10090
10091 #. type: TP
10092 #: build/C/man7/ip.7:972
10093 #, no-wrap
10094 msgid "I<ip_default_ttl> (integer; default: 64; since Linux 2.2)"
10095 msgstr ""
10096
10097 #.  Precisely: 2.1.15
10098 #. type: Plain text
10099 #: build/C/man7/ip.7:980
10100 msgid ""
10101 "Set the default time-to-live value of outgoing packets.  This can be changed "
10102 "per socket with the B<IP_TTL> option."
10103 msgstr ""
10104
10105 #. type: TP
10106 #: build/C/man7/ip.7:980
10107 #, no-wrap
10108 msgid "I<ip_dynaddr> (Boolean; default: disabled; since Linux 2.0.31)"
10109 msgstr ""
10110
10111 #. type: Plain text
10112 #: build/C/man7/ip.7:987
10113 msgid ""
10114 "Enable dynamic socket address and masquerading entry rewriting on interface "
10115 "address change.  This is useful for dialup interface with changing IP "
10116 "addresses.  0 means no rewriting, 1 turns it on and 2 enables verbose mode."
10117 msgstr ""
10118
10119 #. type: TP
10120 #: build/C/man7/ip.7:987
10121 #, no-wrap
10122 msgid "I<ip_forward> (Boolean; default: disabled; since Linux 1.2)"
10123 msgstr ""
10124
10125 #. type: Plain text
10126 #: build/C/man7/ip.7:992
10127 msgid ""
10128 "Enable IP forwarding with a boolean flag.  IP forwarding can be also set on "
10129 "a per-interface basis."
10130 msgstr ""
10131
10132 #. type: TP
10133 #: build/C/man7/ip.7:992
10134 #, no-wrap
10135 msgid "I<ip_local_port_range> (since Linux 2.2)"
10136 msgstr ""
10137
10138 #.  Precisely: since 2.1.68
10139 #. type: Plain text
10140 #: build/C/man7/ip.7:1000
10141 msgid ""
10142 "This file contains two integers that define the default local port range "
10143 "allocated to sockets that are not explicitly bound to a port number\\(emthat "
10144 "is, the range used for I<ephemeral ports>.  An ephemeral port is allocated "
10145 "to a socket in the following circumstances:"
10146 msgstr ""
10147
10148 #. type: Plain text
10149 #: build/C/man7/ip.7:1004
10150 msgid ""
10151 "the port number in a socket address is specified as 0 when calling "
10152 "B<bind>(2);"
10153 msgstr ""
10154
10155 #. type: Plain text
10156 #: build/C/man7/ip.7:1007
10157 msgid "B<listen>(2)  is called on a stream socket that was not previously bound;"
10158 msgstr ""
10159
10160 #. type: Plain text
10161 #: build/C/man7/ip.7:1010
10162 msgid "B<connect>(2)  was called on a socket that was not previously bound;"
10163 msgstr ""
10164
10165 #. type: Plain text
10166 #: build/C/man7/ip.7:1013
10167 msgid "B<sendto>(2)  is called on a datagram socket that was not previously bound."
10168 msgstr ""
10169
10170 #. type: Plain text
10171 #: build/C/man7/ip.7:1020
10172 msgid ""
10173 "Allocation of ephemeral ports starts with the first number in "
10174 "I<ip_local_port_range> and ends with the second number.  If the range of "
10175 "ephemeral ports is exhausted, then the relevant system call returns an error "
10176 "(but see BUGS)."
10177 msgstr ""
10178
10179 #. type: Plain text
10180 #: build/C/man7/ip.7:1031
10181 msgid ""
10182 "Note that the port range in I<ip_local_port_range> should not conflict with "
10183 "the ports used by masquerading (although the case is handled).  Also, "
10184 "arbitrary choices may cause problems with some firewall packet filters that "
10185 "make assumptions about the local ports in use.  The first number should be "
10186 "at least greater than 1024, or better, greater than 4096, to avoid clashes "
10187 "with well known ports and to minimize firewall problems."
10188 msgstr ""
10189
10190 #. type: TP
10191 #: build/C/man7/ip.7:1031
10192 #, no-wrap
10193 msgid "I<ip_no_pmtu_disc> (Boolean; default: disabled; since Linux 2.2)"
10194 msgstr ""
10195
10196 #.  Precisely: 2.1.15
10197 #
10198 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10199 #. type: Plain text
10200 #: build/C/man7/ip.7:1043
10201 msgid ""
10202 "If enabled, don't do Path MTU Discovery for TCP sockets by default.  Path "
10203 "MTU discovery may fail if misconfigured firewalls (that drop all ICMP "
10204 "packets) or misconfigured interfaces (e.g., a point-to-point link where the "
10205 "both ends don't agree on the MTU) are on the path.  It is better to fix the "
10206 "broken routers on the path than to turn off Path MTU Discovery globally, "
10207 "because not doing it incurs a high cost to the network."
10208 msgstr ""
10209
10210 #. type: TP
10211 #: build/C/man7/ip.7:1043
10212 #, no-wrap
10213 msgid "I<ip_nonlocal_bind> (Boolean; default: disabled; since Linux 2.4)"
10214 msgstr ""
10215
10216 #.  Precisely: patch-2.4.0-test10
10217 #
10218 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10219 #. type: Plain text
10220 #: build/C/man7/ip.7:1052
10221 msgid ""
10222 "If set, allows processes to B<bind>(2)  to nonlocal IP addresses, which can "
10223 "be quite useful, but may break some applications."
10224 msgstr ""
10225
10226 #. type: TP
10227 #: build/C/man7/ip.7:1052
10228 #, no-wrap
10229 msgid "I<ip6frag_time> (integer; default: 30)"
10230 msgstr ""
10231
10232 #
10233 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
10234 #. type: Plain text
10235 #: build/C/man7/ip.7:1057
10236 msgid "Time in seconds to keep an IPv6 fragment in memory."
10237 msgstr ""
10238
10239 #. type: TP
10240 #: build/C/man7/ip.7:1057
10241 #, no-wrap
10242 msgid "I<ip6frag_secret_interval> (integer; default: 600)"
10243 msgstr ""
10244
10245 #. type: Plain text
10246 #: build/C/man7/ip.7:1061
10247 msgid ""
10248 "Regeneration interval (in seconds) of the hash secret (or lifetime for the "
10249 "hash secret) for IPv6 fragments."
10250 msgstr ""
10251
10252 #. type: TP
10253 #: build/C/man7/ip.7:1061
10254 #, no-wrap
10255 msgid "I<ipfrag_high_thresh> (integer), I<ipfrag_low_thresh> (integer)"
10256 msgstr ""
10257
10258 #. type: Plain text
10259 #: build/C/man7/ip.7:1068
10260 msgid ""
10261 "If the amount of queued IP fragments reaches I<ipfrag_high_thresh>, the "
10262 "queue is pruned down to I<ipfrag_low_thresh>.  Contains an integer with the "
10263 "number of bytes."
10264 msgstr ""
10265
10266 #. type: TP
10267 #: build/C/man7/ip.7:1068
10268 #, no-wrap
10269 msgid "I<neigh/*>"
10270 msgstr ""
10271
10272 #.  FIXME Document the conf/*/* interfaces
10273 #
10274 #.  FIXME Document the route/* interfaces
10275 #. type: Plain text
10276 #: build/C/man7/ip.7:1075
10277 msgid "See B<arp>(7)."
10278 msgstr ""
10279
10280 #.  2006-04-02, mtk
10281 #.  commented out the following because ipchains is obsolete
10282 #.  .PP
10283 #.  The ioctls to configure firewalling are documented in
10284 #.  .BR ipfw (4)
10285 #.  from the
10286 #.  .B ipchains
10287 #.  package.
10288 #. type: Plain text
10289 #: build/C/man7/ip.7:1088
10290 msgid "All ioctls described in B<socket>(7)  apply to B<ip>."
10291 msgstr ""
10292
10293 #.  FIXME Add a discussion of multicasting
10294 #. type: Plain text
10295 #: build/C/man7/ip.7:1092
10296 msgid ""
10297 "Ioctls to configure generic device parameters are described in "
10298 "B<netdevice>(7)."
10299 msgstr ""
10300
10301 #. type: Plain text
10302 #: build/C/man7/ip.7:1112
10303 msgid ""
10304 "The user tried to execute an operation without the necessary permissions.  "
10305 "These include: sending a packet to a broadcast address without having the "
10306 "B<SO_BROADCAST> flag set; sending a packet via a I<prohibit> route; "
10307 "modifying firewall settings without superuser privileges (the "
10308 "B<CAP_NET_ADMIN> capability); binding to a privileged port without superuser "
10309 "privileges (the B<CAP_NET_BIND_SERVICE> capability)."
10310 msgstr ""
10311
10312 #. type: Plain text
10313 #: build/C/man7/ip.7:1125
10314 msgid "An connection operation on a nonblocking socket is already in progress."
10315 msgstr ""
10316
10317 #. type: Plain text
10318 #: build/C/man7/ip.7:1134
10319 msgid ""
10320 "No valid routing table entry matches the destination address.  This error "
10321 "can be caused by a ICMP message from a remote router or for the local "
10322 "routing table."
10323 msgstr ""
10324
10325 #. type: Plain text
10326 #: build/C/man7/ip.7:1140
10327 msgid ""
10328 "Invalid argument passed.  For send operations this can be caused by sending "
10329 "to a I<blackhole> route."
10330 msgstr ""
10331
10332 #. type: Plain text
10333 #: build/C/man7/ip.7:1147
10334 msgid "Datagram is bigger than an MTU on the path and it cannot be fragmented."
10335 msgstr ""
10336
10337 #. type: TP
10338 #: build/C/man7/ip.7:1147
10339 #, no-wrap
10340 msgid "B<ENOBUFS>, B<ENOMEM>"
10341 msgstr ""
10342
10343 #. type: Plain text
10344 #: build/C/man7/ip.7:1152
10345 msgid ""
10346 "Not enough free memory.  This often means that the memory allocation is "
10347 "limited by the socket buffer limits, not by the system memory, but this is "
10348 "not 100% consistent."
10349 msgstr ""
10350
10351 #. type: Plain text
10352 #: build/C/man7/ip.7:1170
10353 msgid ""
10354 "User doesn't have permission to set high priority, change configuration, or "
10355 "send signals to the requested process or group."
10356 msgstr ""
10357
10358 #. type: Plain text
10359 #: build/C/man7/ip.7:1176
10360 msgid "The socket is not configured or an unknown socket type was requested."
10361 msgstr ""
10362
10363 #. type: Plain text
10364 #: build/C/man7/ip.7:1183
10365 msgid ""
10366 "Other errors may be generated by the overlaying protocols; see B<tcp>(7), "
10367 "B<raw>(7), B<udp>(7), and B<socket>(7)."
10368 msgstr ""
10369
10370 #.  IP_PASSSEC is Linux-specific
10371 #.  IP_XFRM_POLICY is Linux-specific
10372 #.  IP_IPSEC_POLICY is a nonstandard extension, also present on some BSDs
10373 #. type: Plain text
10374 #: build/C/man7/ip.7:1198
10375 msgid ""
10376 "B<IP_FREEBIND>, B<IP_MSFILTER>, B<IP_MTU>, B<IP_MTU_DISCOVER>, "
10377 "B<IP_RECVORIGDSTADDR>, B<IP_PKTINFO>, B<IP_RECVERR>, B<IP_ROUTER_ALERT>, and "
10378 "B<IP_TRANSPARENT> are Linux-specific."
10379 msgstr ""
10380
10381 #. type: Plain text
10382 #: build/C/man7/ip.7:1207
10383 msgid ""
10384 "Be very careful with the B<SO_BROADCAST> option - it is not privileged in "
10385 "Linux.  It is easy to overload the network with careless broadcasts.  For "
10386 "new application protocols it is better to use a multicast group instead of "
10387 "broadcasting.  Broadcasting is discouraged."
10388 msgstr ""
10389
10390 #. type: Plain text
10391 #: build/C/man7/ip.7:1217
10392 msgid ""
10393 "Some other BSD sockets implementations provide B<IP_RCVDSTADDR> and "
10394 "B<IP_RECVIF> socket options to get the destination address and the interface "
10395 "of received datagrams.  Linux has the more general B<IP_PKTINFO> for the "
10396 "same task."
10397 msgstr ""
10398
10399 #. type: Plain text
10400 #: build/C/man7/ip.7:1226
10401 msgid ""
10402 "Some BSD sockets implementations also provide an B<IP_RECVTTL> option, but "
10403 "an ancillary message with type B<IP_RECVTTL> is passed with the incoming "
10404 "packet.  This is different from the B<IP_TTL> option used in Linux."
10405 msgstr ""
10406
10407 #. type: Plain text
10408 #: build/C/man7/ip.7:1232
10409 msgid ""
10410 "Using B<SOL_IP> socket options level isn't portable, BSD-based stacks use "
10411 "B<IPPROTO_IP> level."
10412 msgstr ""
10413
10414 #. type: Plain text
10415 #: build/C/man7/ip.7:1245
10416 msgid ""
10417 "For compatibility with Linux 2.0, the obsolete B<socket(AF_INET, "
10418 "SOCK_PACKET, >I<protocol>B<)> syntax is still supported to open a "
10419 "B<packet>(7)  socket.  This is deprecated and should be replaced by "
10420 "B<socket(AF_PACKET, SOCK_RAW, >I<protocol>B<)> instead.  The main difference "
10421 "is the new I<sockaddr_ll> address structure for generic link layer "
10422 "information instead of the old B<sockaddr_pkt>."
10423 msgstr ""
10424
10425 #. type: Plain text
10426 #: build/C/man7/ip.7:1255
10427 msgid ""
10428 "The error used to diagnose exhaustion of the ephemeral port range differs "
10429 "across the various system calls (B<connect>(2), B<bind>(2), B<listen>(2), "
10430 "B<sendto>(2))  that can assign ephemeral ports."
10431 msgstr ""
10432
10433 #.  .PP
10434 #.  Some versions of glibc forget to declare
10435 #.  .IR in_pktinfo .
10436 #.  Workaround currently is to copy it into your program from this man page.
10437 #. type: Plain text
10438 #: build/C/man7/ip.7:1262
10439 msgid ""
10440 "The ioctls to configure IP-specific interface options and ARP tables are not "
10441 "described."
10442 msgstr ""
10443
10444 #.  .SH AUTHORS
10445 #.  This man page was written by Andi Kleen.
10446 #. type: Plain text
10447 #: build/C/man7/ip.7:1272
10448 msgid ""
10449 "Receiving the original destination address with B<MSG_ERRQUEUE> in "
10450 "I<msg_name> by B<recvmsg>(2)  does not work in some 2.2 kernels."
10451 msgstr ""
10452
10453 #. type: Plain text
10454 #: build/C/man7/ip.7:1285
10455 msgid ""
10456 "B<recvmsg>(2), B<sendmsg>(2), B<byteorder>(3), B<ipfw>(4), "
10457 "B<capabilities>(7), B<icmp>(7), B<ipv6>(7), B<netlink>(7), B<raw>(7), "
10458 "B<socket>(7), B<tcp>(7), B<udp>(7)"
10459 msgstr ""
10460
10461 #. type: Plain text
10462 #: build/C/man7/ip.7:1288
10463 msgid ""
10464 "RFC\\ 791 for the original IP specification.  RFC\\ 1122 for the IPv4 host "
10465 "requirements.  RFC\\ 1812 for the IPv4 router requirements."
10466 msgstr ""
10467
10468 #. type: TH
10469 #: build/C/man7/ipv6.7:86
10470 #, no-wrap
10471 msgid "IPV6"
10472 msgstr ""
10473
10474 #. type: TH
10475 #: build/C/man7/ipv6.7:86 build/C/man7/packet.7:12
10476 #, no-wrap
10477 msgid "2014-08-19"
10478 msgstr ""
10479
10480 #. type: Plain text
10481 #: build/C/man7/ipv6.7:89
10482 msgid "ipv6 - Linux IPv6 protocol implementation"
10483 msgstr ""
10484
10485 #. type: Plain text
10486 #: build/C/man7/ipv6.7:95
10487 msgid "I<tcp6_socket>B< = socket(AF_INET6, SOCK_STREAM, 0);>"
10488 msgstr ""
10489
10490 #. type: Plain text
10491 #: build/C/man7/ipv6.7:97
10492 msgid "I<raw6_socket>B< = socket(AF_INET6, SOCK_RAW, >I<protocol>B<);>"
10493 msgstr ""
10494
10495 #. type: Plain text
10496 #: build/C/man7/ipv6.7:99
10497 msgid "I<udp6_socket>B< = socket(AF_INET6, SOCK_DGRAM, >I<protocol>B<);>"
10498 msgstr ""
10499
10500 #. type: Plain text
10501 #: build/C/man7/ipv6.7:106
10502 msgid ""
10503 "Linux 2.2 optionally implements the Internet Protocol, version 6.  This man "
10504 "page contains a description of the IPv6 basic API as implemented by the "
10505 "Linux kernel and glibc 2.1.  The interface is based on the BSD sockets "
10506 "interface; see B<socket>(7)."
10507 msgstr ""
10508
10509 #. type: Plain text
10510 #: build/C/man7/ipv6.7:111
10511 msgid ""
10512 "The IPv6 API aims to be mostly compatible with the IPv4 API (see B<ip>(7)).  "
10513 "Only differences are described in this man page."
10514 msgstr ""
10515
10516 #. type: Plain text
10517 #: build/C/man7/ipv6.7:123
10518 msgid ""
10519 "To bind an B<AF_INET6> socket to any process, the local address should be "
10520 "copied from the I<in6addr_any> variable which has I<in6_addr> type.  In "
10521 "static initializations, B<IN6ADDR_ANY_INIT> may also be used, which expands "
10522 "to a constant expression.  Both of them are in network byte order."
10523 msgstr ""
10524
10525 #. type: Plain text
10526 #: build/C/man7/ipv6.7:130
10527 msgid ""
10528 "The IPv6 loopback address (::1) is available in the global "
10529 "I<in6addr_loopback> variable.  For initializations, B<IN6ADDR_LOOPBACK_INIT> "
10530 "should be used."
10531 msgstr ""
10532
10533 #. type: Plain text
10534 #: build/C/man7/ipv6.7:137
10535 msgid ""
10536 "IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 "
10537 "address type; thus a program only needs to support this API type to support "
10538 "both protocols.  This is handled transparently by the address handling "
10539 "functions in the C library."
10540 msgstr ""
10541
10542 #. type: Plain text
10543 #: build/C/man7/ipv6.7:142
10544 msgid ""
10545 "IPv4 and IPv6 share the local port space.  When you get an IPv4 connection "
10546 "or packet to a IPv6 socket, its source address will be mapped to v6 and it "
10547 "will be mapped to v6."
10548 msgstr ""
10549
10550 #. type: Plain text
10551 #: build/C/man7/ipv6.7:152
10552 #, no-wrap
10553 msgid ""
10554 "struct sockaddr_in6 {\n"
10555 "    sa_family_t     sin6_family;   /* AF_INET6 */\n"
10556 "    in_port_t       sin6_port;     /* port number */\n"
10557 "    uint32_t        sin6_flowinfo; /* IPv6 flow information */\n"
10558 "    struct in6_addr sin6_addr;     /* IPv6 address */\n"
10559 "    uint32_t        sin6_scope_id; /* Scope ID (new in 2.4) */\n"
10560 "};\n"
10561 msgstr ""
10562
10563 #. type: Plain text
10564 #: build/C/man7/ipv6.7:156
10565 #, no-wrap
10566 msgid ""
10567 "struct in6_addr {\n"
10568 "    unsigned char   s6_addr[16];   /* IPv6 address */\n"
10569 "};\n"
10570 msgstr ""
10571
10572 #. type: Plain text
10573 #: build/C/man7/ipv6.7:178
10574 msgid ""
10575 "I<sin6_family> is always set to B<AF_INET6>; I<sin6_port> is the protocol "
10576 "port (see I<sin_port> in B<ip>(7)); I<sin6_flowinfo> is the IPv6 flow "
10577 "identifier; I<sin6_addr> is the 128-bit IPv6 address.  I<sin6_scope_id> is "
10578 "an ID depending on the scope of the address.  It is new in Linux 2.4.  Linux "
10579 "supports it only for link-local addresses, in that case I<sin6_scope_id> "
10580 "contains the interface index (see B<netdevice>(7))"
10581 msgstr ""
10582
10583 #. type: Plain text
10584 #: build/C/man7/ipv6.7:184
10585 msgid ""
10586 "IPv6 supports several address types: unicast to address a single host, "
10587 "multicast to address a group of hosts, anycast to address the nearest member "
10588 "of a group of hosts (not implemented in Linux), IPv4-on-IPv6 to address a "
10589 "IPv4 host, and other reserved address types."
10590 msgstr ""
10591
10592 #. type: Plain text
10593 #: build/C/man7/ipv6.7:190
10594 msgid ""
10595 "The address notation for IPv6 is a group of 8 4-digit hexadecimal numbers, "
10596 "separated with a \\(aq:\\(aq.  \\&\"::\" stands for a string of 0 bits.  "
10597 "Special addresses are ::1 for loopback and ::FFFF:E<lt>IPv4 addressE<gt> for "
10598 "IPv4-mapped-on-IPv6."
10599 msgstr ""
10600
10601 #. type: Plain text
10602 #: build/C/man7/ipv6.7:192
10603 msgid "The port space of IPv6 is shared with IPv4."
10604 msgstr ""
10605
10606 #. type: Plain text
10607 #: build/C/man7/ipv6.7:200
10608 msgid ""
10609 "IPv6 supports some protocol-specific socket options that can be set with "
10610 "B<setsockopt>(2)  and read with B<getsockopt>(2).  The socket option level "
10611 "for IPv6 is B<IPPROTO_IPV6>.  A boolean integer flag is zero when it is "
10612 "false, otherwise true."
10613 msgstr ""
10614
10615 #. type: TP
10616 #: build/C/man7/ipv6.7:200
10617 #, no-wrap
10618 msgid "B<IPV6_ADDRFORM>"
10619 msgstr ""
10620
10621 #. type: Plain text
10622 #: build/C/man7/ipv6.7:214
10623 msgid ""
10624 "Turn an B<AF_INET6> socket into a socket of a different address family.  "
10625 "Only B<AF_INET> is currently supported for that.  It is allowed only for "
10626 "IPv6 sockets that are connected and bound to a v4-mapped-on-v6 address.  The "
10627 "argument is a pointer to an integer containing B<AF_INET>.  This is useful "
10628 "to pass v4-mapped sockets as file descriptors to programs that don't know "
10629 "how to deal with the IPv6 API."
10630 msgstr ""
10631
10632 #. type: TP
10633 #: build/C/man7/ipv6.7:214
10634 #, no-wrap
10635 msgid "B<IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP>"
10636 msgstr ""
10637
10638 #. type: Plain text
10639 #: build/C/man7/ipv6.7:219
10640 msgid ""
10641 "Control membership in multicast groups.  Argument is a pointer to a I<struct "
10642 "ipv6_mreq>."
10643 msgstr ""
10644
10645 #. type: TP
10646 #: build/C/man7/ipv6.7:219
10647 #, no-wrap
10648 msgid "B<IPV6_MTU>"
10649 msgstr ""
10650
10651 #. type: Plain text
10652 #: build/C/man7/ipv6.7:225
10653 msgid ""
10654 "B<getsockopt>(): Retrieve the current known path MTU of the current socket.  "
10655 "Only valid when the socket has been connected.  Returns an integer."
10656 msgstr ""
10657
10658 #. type: Plain text
10659 #: build/C/man7/ipv6.7:231
10660 msgid ""
10661 "B<setsockopt>(): Set the MTU to be used for the socket.  The MTU is limited "
10662 "by the device MTU or the path MTU when path MTU discovery is enabled.  "
10663 "Argument is a pointer to integer."
10664 msgstr ""
10665
10666 #. type: TP
10667 #: build/C/man7/ipv6.7:231
10668 #, no-wrap
10669 msgid "B<IPV6_MTU_DISCOVER>"
10670 msgstr ""
10671
10672 #. type: Plain text
10673 #: build/C/man7/ipv6.7:239
10674 msgid ""
10675 "Control path-MTU discovery on the socket.  See B<IP_MTU_DISCOVER> in "
10676 "B<ip>(7)  for details."
10677 msgstr ""
10678
10679 #. type: TP
10680 #: build/C/man7/ipv6.7:239
10681 #, no-wrap
10682 msgid "B<IPV6_MULTICAST_HOPS>"
10683 msgstr ""
10684
10685 #. type: Plain text
10686 #: build/C/man7/ipv6.7:246
10687 msgid ""
10688 "Set the multicast hop limit for the socket.  Argument is a pointer to an "
10689 "integer.  -1 in the value means use the route default, otherwise it should "
10690 "be between 0 and 255."
10691 msgstr ""
10692
10693 #. type: TP
10694 #: build/C/man7/ipv6.7:246
10695 #, no-wrap
10696 msgid "B<IPV6_MULTICAST_IF>"
10697 msgstr ""
10698
10699 #. type: Plain text
10700 #: build/C/man7/ipv6.7:257
10701 msgid ""
10702 "Set the device for outgoing multicast packets on the socket.  This is "
10703 "allowed only for B<SOCK_DGRAM> and B<SOCK_RAW> socket.  The argument is a "
10704 "pointer to an interface index (see B<netdevice>(7))  in an integer."
10705 msgstr ""
10706
10707 #. type: TP
10708 #: build/C/man7/ipv6.7:257
10709 #, no-wrap
10710 msgid "B<IPV6_MULTICAST_LOOP>"
10711 msgstr ""
10712
10713 #. type: Plain text
10714 #: build/C/man7/ipv6.7:261
10715 msgid ""
10716 "Control whether the socket sees multicast packets that it has send itself.  "
10717 "Argument is a pointer to boolean."
10718 msgstr ""
10719
10720 #. type: TP
10721 #: build/C/man7/ipv6.7:261
10722 #, no-wrap
10723 msgid "B<IPV6_RECVPKTINFO> (since Linux 2.6.14)"
10724 msgstr ""
10725
10726 #. type: Plain text
10727 #: build/C/man7/ipv6.7:275
10728 msgid ""
10729 "Set delivery of the B<IPV6_PKTINFO> control message on incoming datagrams.  "
10730 "Such control messages contain a I<struct in6_pktinfo>, as per RFC 3542.  "
10731 "Only allowed for B<SOCK_DGRAM> or B<SOCK_RAW> sockets.  Argument is a "
10732 "pointer to a boolean value in an integer."
10733 msgstr ""
10734
10735 #. type: Plain text
10736 #: build/C/man7/ipv6.7:278
10737 #, no-wrap
10738 msgid ""
10739 "B<IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPTS, IPV6_HOPOPTS, IPV6_FLOWINFO, "
10740 "IPV6_HOPLIMIT>\n"
10741 msgstr ""
10742
10743 #. type: Plain text
10744 #: build/C/man7/ipv6.7:303
10745 msgid ""
10746 "Set delivery of control messages for incoming datagrams containing extension "
10747 "headers from the received packet.  B<IPV6_RTHDR> delivers the routing "
10748 "header, B<IPV6_AUTHHDR> delivers the authentication header, B<IPV6_DSTOPTS> "
10749 "delivers the destination options, B<IPV6_HOPOPTS> delivers the hop options, "
10750 "B<IPV6_FLOWINFO> delivers an integer containing the flow ID, "
10751 "B<IPV6_HOPLIMIT> delivers an integer containing the hop count of the "
10752 "packet.  The control messages have the same type as the socket option.  All "
10753 "these header options can also be set for outgoing packets by putting the "
10754 "appropriate control message into the control buffer of B<sendmsg>(2).  Only "
10755 "allowed for B<SOCK_DGRAM> or B<SOCK_RAW> sockets.  Argument is a pointer to "
10756 "a boolean value."
10757 msgstr ""
10758
10759 #. type: TP
10760 #: build/C/man7/ipv6.7:303
10761 #, no-wrap
10762 msgid "B<IPV6_RECVERR>"
10763 msgstr ""
10764
10765 #. type: Plain text
10766 #: build/C/man7/ipv6.7:312
10767 msgid ""
10768 "Control receiving of asynchronous error options.  See B<IP_RECVERR> in "
10769 "B<ip>(7)  for details.  Argument is a pointer to boolean."
10770 msgstr ""
10771
10772 #. type: TP
10773 #: build/C/man7/ipv6.7:312
10774 #, no-wrap
10775 msgid "B<IPV6_ROUTER_ALERT>"
10776 msgstr ""
10777
10778 #. type: Plain text
10779 #: build/C/man7/ipv6.7:327
10780 msgid ""
10781 "Pass forwarded packets containing a router alert hop-by-hop option to this "
10782 "socket.  Only allowed for B<SOCK_RAW> sockets.  The tapped packets are not "
10783 "forwarded by the kernel, it is the user's responsibility to send them out "
10784 "again.  Argument is a pointer to an integer.  A positive integer indicates a "
10785 "router alert option value to intercept.  Packets carrying a router alert "
10786 "option with a value field containing this integer will be delivered to the "
10787 "socket.  A negative integer disables delivery of packets with router alert "
10788 "options to this socket."
10789 msgstr ""
10790
10791 #. type: TP
10792 #: build/C/man7/ipv6.7:327
10793 #, no-wrap
10794 msgid "B<IPV6_UNICAST_HOPS>"
10795 msgstr ""
10796
10797 #. type: Plain text
10798 #: build/C/man7/ipv6.7:333
10799 msgid ""
10800 "Set the unicast hop limit for the socket.  Argument is a pointer to an "
10801 "integer.  -1 in the value means use the route default, otherwise it should "
10802 "be between 0 and 255."
10803 msgstr ""
10804
10805 #. type: TP
10806 #: build/C/man7/ipv6.7:333
10807 #, no-wrap
10808 msgid "B<IPV6_V6ONLY> (since Linux 2.4.21 and 2.6)"
10809 msgstr ""
10810
10811 #.  See RFC 3493
10812 #. type: Plain text
10813 #: build/C/man7/ipv6.7:340
10814 msgid ""
10815 "If this flag is set to true (nonzero), then the socket is restricted to "
10816 "sending and receiving IPv6 packets only.  In this case, an IPv4 and an IPv6 "
10817 "application can bind to a single port at the same time."
10818 msgstr ""
10819
10820 #. type: Plain text
10821 #: build/C/man7/ipv6.7:344
10822 msgid ""
10823 "If this flag is set to false (zero), then the socket can be used to send and "
10824 "receive packets to and from an IPv6 address or an IPv4-mapped IPv6 address."
10825 msgstr ""
10826
10827 #. type: Plain text
10828 #: build/C/man7/ipv6.7:346
10829 msgid "The argument is a pointer to a boolean value in an integer."
10830 msgstr ""
10831
10832 #.  FLOWLABEL_MGR, FLOWINFO_SEND
10833 #. type: Plain text
10834 #: build/C/man7/ipv6.7:351
10835 msgid ""
10836 "The default value for this flag is defined by the contents of the file "
10837 "I</proc/sys/net/ipv6/bindv6only>.  The default value for that file is 0 "
10838 "(false)."
10839 msgstr ""
10840
10841 #. type: Plain text
10842 #: build/C/man7/ipv6.7:362
10843 msgid ""
10844 "The user tried to B<bind>(2)  to a link-local IPv6 address, but the "
10845 "I<sin6_scope_id> in the supplied I<sockaddr_in6> structure is not a valid "
10846 "interface index."
10847 msgstr ""
10848
10849 #. type: Plain text
10850 #: build/C/man7/ipv6.7:378
10851 msgid ""
10852 "Linux 2.4 will break binary compatibility for the I<sockaddr_in6> for 64-bit "
10853 "hosts by changing the alignment of I<in6_addr> and adding an additional "
10854 "I<sin6_scope_id> field.  The kernel interfaces stay compatible, but a "
10855 "program including I<sockaddr_in6> or I<in6_addr> into other structures may "
10856 "not be.  This is not a problem for 32-bit hosts like i386."
10857 msgstr ""
10858
10859 #. type: Plain text
10860 #: build/C/man7/ipv6.7:386
10861 msgid ""
10862 "The I<sin6_flowinfo> field is new in Linux 2.4.  It is transparently "
10863 "passed/read by the kernel when the passed address length contains it.  Some "
10864 "programs that pass a longer address buffer and then check the outgoing "
10865 "address length may break."
10866 msgstr ""
10867
10868 #. type: Plain text
10869 #: build/C/man7/ipv6.7:396
10870 msgid ""
10871 "The I<sockaddr_in6> structure is bigger than the generic I<sockaddr>.  "
10872 "Programs that assume that all address types can be stored safely in a "
10873 "I<struct sockaddr> need to be changed to use I<struct sockaddr_storage> for "
10874 "that instead."
10875 msgstr ""
10876
10877 #. type: Plain text
10878 #: build/C/man7/ipv6.7:401
10879 msgid ""
10880 "The IPv6 extended API as in RFC\\ 2292 is currently only partly implemented; "
10881 "although the 2.2 kernel has near complete support for receiving options, the "
10882 "macros for generating IPv6 options are missing in glibc 2.1."
10883 msgstr ""
10884
10885 #. type: Plain text
10886 #: build/C/man7/ipv6.7:403
10887 msgid "IPSec support for EH and AH headers is missing."
10888 msgstr ""
10889
10890 #. type: Plain text
10891 #: build/C/man7/ipv6.7:405
10892 msgid "Flow label management is not complete and not documented here."
10893 msgstr ""
10894
10895 #. type: Plain text
10896 #: build/C/man7/ipv6.7:407
10897 msgid "This man page is not complete."
10898 msgstr ""
10899
10900 #. type: Plain text
10901 #: build/C/man7/ipv6.7:410
10902 msgid "B<cmsg>(3), B<ip>(7)"
10903 msgstr ""
10904
10905 #. type: Plain text
10906 #: build/C/man7/ipv6.7:413
10907 msgid ""
10908 "RFC\\ 2553: IPv6 BASIC API; Linux tries to be compliant to this.  RFC\\ "
10909 "2460: IPv6 specification."
10910 msgstr ""
10911
10912 #. type: TH
10913 #: build/C/man7/netdevice.7:18
10914 #, no-wrap
10915 msgid "NETDEVICE"
10916 msgstr ""
10917
10918 #. type: TH
10919 #: build/C/man7/netdevice.7:18
10920 #, no-wrap
10921 msgid "2014-01-24"
10922 msgstr ""
10923
10924 #. type: Plain text
10925 #: build/C/man7/netdevice.7:21
10926 msgid "netdevice - low-level access to Linux network devices"
10927 msgstr ""
10928
10929 #. type: Plain text
10930 #: build/C/man7/netdevice.7:23
10931 msgid "B<#include E<lt>sys/ioctl.hE<gt>>"
10932 msgstr ""
10933
10934 #. type: Plain text
10935 #: build/C/man7/netdevice.7:25
10936 msgid "B<#include E<lt>net/if.hE<gt>>"
10937 msgstr ""
10938
10939 #. type: Plain text
10940 #: build/C/man7/netdevice.7:28
10941 msgid ""
10942 "This man page describes the sockets interface which is used to configure "
10943 "network devices."
10944 msgstr ""
10945
10946 #. type: Plain text
10947 #: build/C/man7/netdevice.7:35
10948 msgid ""
10949 "Linux supports some standard ioctls to configure network devices.  They can "
10950 "be used on any socket's file descriptor regardless of the family or type.  "
10951 "Most of them pass an I<ifreq> structure:"
10952 msgstr ""
10953
10954 #. type: Plain text
10955 #: build/C/man7/netdevice.7:56
10956 #, no-wrap
10957 msgid ""
10958 "struct ifreq {\n"
10959 "    char ifr_name[IFNAMSIZ]; /* Interface name */\n"
10960 "    union {\n"
10961 "        struct sockaddr ifr_addr;\n"
10962 "        struct sockaddr ifr_dstaddr;\n"
10963 "        struct sockaddr ifr_broadaddr;\n"
10964 "        struct sockaddr ifr_netmask;\n"
10965 "        struct sockaddr ifr_hwaddr;\n"
10966 "        short           ifr_flags;\n"
10967 "        int             ifr_ifindex;\n"
10968 "        int             ifr_metric;\n"
10969 "        int             ifr_mtu;\n"
10970 "        struct ifmap    ifr_map;\n"
10971 "        char            ifr_slave[IFNAMSIZ];\n"
10972 "        char            ifr_newname[IFNAMSIZ];\n"
10973 "        char           *ifr_data;\n"
10974 "    };\n"
10975 "};\n"
10976 msgstr ""
10977
10978 #. type: Plain text
10979 #: build/C/man7/netdevice.7:64
10980 msgid ""
10981 "Normally, the user specifies which device to affect by setting I<ifr_name> "
10982 "to the name of the interface.  All other members of the structure may share "
10983 "memory."
10984 msgstr ""
10985
10986 #. type: Plain text
10987 #: build/C/man7/netdevice.7:72
10988 msgid ""
10989 "If an ioctl is marked as privileged, then using it requires an effective "
10990 "user ID of 0 or the B<CAP_NET_ADMIN> capability.  If this is not the case, "
10991 "B<EPERM> will be returned."
10992 msgstr ""
10993
10994 #. type: TP
10995 #: build/C/man7/netdevice.7:72
10996 #, no-wrap
10997 msgid "B<SIOCGIFNAME>"
10998 msgstr ""
10999
11000 #. type: Plain text
11001 #: build/C/man7/netdevice.7:80
11002 msgid ""
11003 "Given the I<ifr_ifindex>, return the name of the interface in I<ifr_name>.  "
11004 "This is the only ioctl which returns its result in I<ifr_name>."
11005 msgstr ""
11006
11007 #. type: TP
11008 #: build/C/man7/netdevice.7:80
11009 #, no-wrap
11010 msgid "B<SIOCGIFINDEX>"
11011 msgstr ""
11012
11013 #. type: Plain text
11014 #: build/C/man7/netdevice.7:84
11015 msgid "Retrieve the interface index of the interface into I<ifr_ifindex>."
11016 msgstr ""
11017
11018 #. type: TP
11019 #: build/C/man7/netdevice.7:84
11020 #, no-wrap
11021 msgid "B<SIOCGIFFLAGS>, B<SIOCSIFFLAGS>"
11022 msgstr ""
11023
11024 #.  Do not right adjust text blocks in tables
11025 #. type: Plain text
11026 #: build/C/man7/netdevice.7:90
11027 msgid ""
11028 "Get or set the active flag word of the device.  I<ifr_flags> contains a bit "
11029 "mask of the following values:"
11030 msgstr ""
11031
11032 #. type: tbl table
11033 #: build/C/man7/netdevice.7:95
11034 #, no-wrap
11035 msgid "Device flags\n"
11036 msgstr ""
11037
11038 #. type: tbl table
11039 #: build/C/man7/netdevice.7:96
11040 #, no-wrap
11041 msgid "IFF_UP:Interface is running.\n"
11042 msgstr ""
11043
11044 #. type: tbl table
11045 #: build/C/man7/netdevice.7:97
11046 #, no-wrap
11047 msgid "IFF_BROADCAST:Valid broadcast address set.\n"
11048 msgstr ""
11049
11050 #. type: tbl table
11051 #: build/C/man7/netdevice.7:98
11052 #, no-wrap
11053 msgid "IFF_DEBUG:Internal debugging flag.\n"
11054 msgstr ""
11055
11056 #. type: tbl table
11057 #: build/C/man7/netdevice.7:99
11058 #, no-wrap
11059 msgid "IFF_LOOPBACK:Interface is a loopback interface.\n"
11060 msgstr ""
11061
11062 #. type: tbl table
11063 #: build/C/man7/netdevice.7:100
11064 #, no-wrap
11065 msgid "IFF_POINTOPOINT:Interface is a point-to-point link.\n"
11066 msgstr ""
11067
11068 #. type: tbl table
11069 #: build/C/man7/netdevice.7:101
11070 #, no-wrap
11071 msgid "IFF_RUNNING:Resources allocated.\n"
11072 msgstr ""
11073
11074 #. type: tbl table
11075 #: build/C/man7/netdevice.7:102
11076 #, no-wrap
11077 msgid "IFF_NOARP:T{\n"
11078 msgstr ""
11079
11080 #. type: tbl table
11081 #: build/C/man7/netdevice.7:103
11082 #, no-wrap
11083 msgid "No arp protocol, L2 destination address not set.\n"
11084 msgstr ""
11085
11086 #. type: tbl table
11087 #: build/C/man7/netdevice.7:104 build/C/man7/netdevice.7:115
11088 #, no-wrap
11089 msgid "T}\n"
11090 msgstr ""
11091
11092 #. type: tbl table
11093 #: build/C/man7/netdevice.7:105
11094 #, no-wrap
11095 msgid "IFF_PROMISC:Interface is in promiscuous mode.\n"
11096 msgstr ""
11097
11098 #. type: tbl table
11099 #: build/C/man7/netdevice.7:106
11100 #, no-wrap
11101 msgid "IFF_NOTRAILERS:Avoid use of trailers.\n"
11102 msgstr ""
11103
11104 #. type: tbl table
11105 #: build/C/man7/netdevice.7:107
11106 #, no-wrap
11107 msgid "IFF_ALLMULTI:Receive all multicast packets.\n"
11108 msgstr ""
11109
11110 #. type: tbl table
11111 #: build/C/man7/netdevice.7:108
11112 #, no-wrap
11113 msgid "IFF_MASTER:Master of a load balancing bundle.\n"
11114 msgstr ""
11115
11116 #. type: tbl table
11117 #: build/C/man7/netdevice.7:109
11118 #, no-wrap
11119 msgid "IFF_SLAVE:Slave of a load balancing bundle.\n"
11120 msgstr ""
11121
11122 #. type: tbl table
11123 #: build/C/man7/netdevice.7:110
11124 #, no-wrap
11125 msgid "IFF_MULTICAST:Supports multicast\n"
11126 msgstr ""
11127
11128 #. type: tbl table
11129 #: build/C/man7/netdevice.7:111
11130 #, no-wrap
11131 msgid "IFF_PORTSEL:Is able to select media type via ifmap.\n"
11132 msgstr ""
11133
11134 #. type: tbl table
11135 #: build/C/man7/netdevice.7:112
11136 #, no-wrap
11137 msgid "IFF_AUTOMEDIA:Auto media selection active.\n"
11138 msgstr ""
11139
11140 #. type: tbl table
11141 #: build/C/man7/netdevice.7:113
11142 #, no-wrap
11143 msgid "IFF_DYNAMIC:T{\n"
11144 msgstr ""
11145
11146 #. type: tbl table
11147 #: build/C/man7/netdevice.7:114
11148 #, no-wrap
11149 msgid "The addresses are lost when the interface goes down.\n"
11150 msgstr ""
11151
11152 #. type: tbl table
11153 #: build/C/man7/netdevice.7:116
11154 #, no-wrap
11155 msgid "IFF_LOWER_UP:Driver signals L1 up (since Linux 2.6.17)\n"
11156 msgstr ""
11157
11158 #. type: tbl table
11159 #: build/C/man7/netdevice.7:117
11160 #, no-wrap
11161 msgid "IFF_DORMANT:Driver signals dormant (since Linux 2.6.17)\n"
11162 msgstr ""
11163
11164 #. type: tbl table
11165 #: build/C/man7/netdevice.7:118
11166 #, no-wrap
11167 msgid "IFF_ECHO:Echo sent packets (since Linux 2.6.25)\n"
11168 msgstr ""
11169
11170 #. type: Plain text
11171 #: build/C/man7/netdevice.7:124
11172 msgid ""
11173 "Setting the active flag word is a privileged operation, but any process may "
11174 "read it."
11175 msgstr ""
11176
11177 #. type: TP
11178 #: build/C/man7/netdevice.7:124
11179 #, no-wrap
11180 msgid "B<SIOCGIFPFLAGS>, B<SIOCSIFPFLAGS>"
11181 msgstr ""
11182
11183 #. type: Plain text
11184 #: build/C/man7/netdevice.7:129
11185 msgid ""
11186 "Get or set extended (private) flags for the device.  I<ifr_flags> contains a "
11187 "bit mask of the following values:"
11188 msgstr ""
11189
11190 #. type: tbl table
11191 #: build/C/man7/netdevice.7:133
11192 #, no-wrap
11193 msgid "Private flags\n"
11194 msgstr ""
11195
11196 #. type: tbl table
11197 #: build/C/man7/netdevice.7:134
11198 #, no-wrap
11199 msgid "IFF_802_1Q_VLAN:Interface is 802.1Q VLAN device.\n"
11200 msgstr ""
11201
11202 #. type: tbl table
11203 #: build/C/man7/netdevice.7:135
11204 #, no-wrap
11205 msgid "IFF_EBRIDGE:Interface is Ethernet bridging device.\n"
11206 msgstr ""
11207
11208 #. type: tbl table
11209 #: build/C/man7/netdevice.7:136
11210 #, no-wrap
11211 msgid "IFF_SLAVE_INACTIVE:Interface is inactive bonding slave.\n"
11212 msgstr ""
11213
11214 #. type: tbl table
11215 #: build/C/man7/netdevice.7:137
11216 #, no-wrap
11217 msgid "IFF_MASTER_8023AD:Interface is 802.3ad bonding master.\n"
11218 msgstr ""
11219
11220 #. type: tbl table
11221 #: build/C/man7/netdevice.7:138
11222 #, no-wrap
11223 msgid "IFF_MASTER_ALB:Interface is balanced-alb bonding master.\n"
11224 msgstr ""
11225
11226 #. type: tbl table
11227 #: build/C/man7/netdevice.7:139
11228 #, no-wrap
11229 msgid "IFF_BONDING:Interface is a bonding master or slave.\n"
11230 msgstr ""
11231
11232 #. type: tbl table
11233 #: build/C/man7/netdevice.7:140
11234 #, no-wrap
11235 msgid "IFF_SLAVE_NEEDARP:Interface needs ARPs for validation.\n"
11236 msgstr ""
11237
11238 #. type: tbl table
11239 #: build/C/man7/netdevice.7:141
11240 #, no-wrap
11241 msgid "IFF_ISATAP:Interface is RFC4214 ISATAP interface.\n"
11242 msgstr ""
11243
11244 #. type: Plain text
11245 #: build/C/man7/netdevice.7:145
11246 msgid "Setting the extended (private) interface flags is a privileged operation."
11247 msgstr ""
11248
11249 #. type: TP
11250 #: build/C/man7/netdevice.7:145
11251 #, no-wrap
11252 msgid "B<SIOCGIFADDR>, B<SIOCSIFADDR>"
11253 msgstr ""
11254
11255 #. type: Plain text
11256 #: build/C/man7/netdevice.7:153
11257 msgid ""
11258 "Get or set the address of the device using I<ifr_addr>.  Setting the "
11259 "interface address is a privileged operation.  For compatibility, only "
11260 "B<AF_INET> addresses are accepted or returned."
11261 msgstr ""
11262
11263 #. type: TP
11264 #: build/C/man7/netdevice.7:153
11265 #, no-wrap
11266 msgid "B<SIOCGIFDSTADDR>, B<SIOCSIFDSTADDR>"
11267 msgstr ""
11268
11269 #. type: Plain text
11270 #: build/C/man7/netdevice.7:161
11271 msgid ""
11272 "Get or set the destination address of a point-to-point device using "
11273 "I<ifr_dstaddr>.  For compatibility, only B<AF_INET> addresses are accepted "
11274 "or returned.  Setting the destination address is a privileged operation."
11275 msgstr ""
11276
11277 #. type: TP
11278 #: build/C/man7/netdevice.7:161
11279 #, no-wrap
11280 msgid "B<SIOCGIFBRDADDR>, B<SIOCSIFBRDADDR>"
11281 msgstr ""
11282
11283 #. type: Plain text
11284 #: build/C/man7/netdevice.7:169
11285 msgid ""
11286 "Get or set the broadcast address for a device using I<ifr_brdaddr>.  For "
11287 "compatibility, only B<AF_INET> addresses are accepted or returned.  Setting "
11288 "the broadcast address is a privileged operation."
11289 msgstr ""
11290
11291 #. type: TP
11292 #: build/C/man7/netdevice.7:169
11293 #, no-wrap
11294 msgid "B<SIOCGIFNETMASK>, B<SIOCSIFNETMASK>"
11295 msgstr ""
11296
11297 #. type: Plain text
11298 #: build/C/man7/netdevice.7:177
11299 msgid ""
11300 "Get or set the network mask for a device using I<ifr_netmask>.  For "
11301 "compatibility, only B<AF_INET> addresses are accepted or returned.  Setting "
11302 "the network mask is a privileged operation."
11303 msgstr ""
11304
11305 #. type: TP
11306 #: build/C/man7/netdevice.7:177
11307 #, no-wrap
11308 msgid "B<SIOCGIFMETRIC>, B<SIOCSIFMETRIC>"
11309 msgstr ""
11310
11311 #. type: Plain text
11312 #: build/C/man7/netdevice.7:186
11313 msgid ""
11314 "Get or set the metric of the device using I<ifr_metric>.  This is currently "
11315 "not implemented; it sets I<ifr_metric> to 0 if you attempt to read it and "
11316 "returns B<EOPNOTSUPP> if you attempt to set it."
11317 msgstr ""
11318
11319 #. type: TP
11320 #: build/C/man7/netdevice.7:186
11321 #, no-wrap
11322 msgid "B<SIOCGIFMTU>, B<SIOCSIFMTU>"
11323 msgstr ""
11324
11325 #. type: Plain text
11326 #: build/C/man7/netdevice.7:193
11327 msgid ""
11328 "Get or set the MTU (Maximum Transfer Unit) of a device using I<ifr_mtu>.  "
11329 "Setting the MTU is a privileged operation.  Setting the MTU to too small "
11330 "values may cause kernel crashes."
11331 msgstr ""
11332
11333 #. type: TP
11334 #: build/C/man7/netdevice.7:193
11335 #, no-wrap
11336 msgid "B<SIOCGIFHWADDR>, B<SIOCSIFHWADDR>"
11337 msgstr ""
11338
11339 #. type: Plain text
11340 #: build/C/man7/netdevice.7:204
11341 msgid ""
11342 "Get or set the hardware address of a device using I<ifr_hwaddr>.  The "
11343 "hardware address is specified in a struct I<sockaddr>.  I<sa_family> "
11344 "contains the ARPHRD_* device type, I<sa_data> the L2 hardware address "
11345 "starting from byte 0.  Setting the hardware address is a privileged "
11346 "operation."
11347 msgstr ""
11348
11349 #. type: TP
11350 #: build/C/man7/netdevice.7:204
11351 #, no-wrap
11352 msgid "B<SIOCSIFHWBROADCAST>"
11353 msgstr ""
11354
11355 #. type: Plain text
11356 #: build/C/man7/netdevice.7:209
11357 msgid ""
11358 "Set the hardware broadcast address of a device from I<ifr_hwaddr>.  This is "
11359 "a privileged operation."
11360 msgstr ""
11361
11362 #. type: TP
11363 #: build/C/man7/netdevice.7:209
11364 #, no-wrap
11365 msgid "B<SIOCGIFMAP>, B<SIOCSIFMAP>"
11366 msgstr ""
11367
11368 #. type: Plain text
11369 #: build/C/man7/netdevice.7:214
11370 msgid ""
11371 "Get or set the interface's hardware parameters using I<ifr_map>.  Setting "
11372 "the parameters is a privileged operation."
11373 msgstr ""
11374
11375 #. type: Plain text
11376 #: build/C/man7/netdevice.7:225
11377 #, no-wrap
11378 msgid ""
11379 "struct ifmap {\n"
11380 "    unsigned long   mem_start;\n"
11381 "    unsigned long   mem_end;\n"
11382 "    unsigned short  base_addr;\n"
11383 "    unsigned char   irq;\n"
11384 "    unsigned char   dma;\n"
11385 "    unsigned char   port;\n"
11386 "};\n"
11387 msgstr ""
11388
11389 #. type: Plain text
11390 #: build/C/man7/netdevice.7:230
11391 msgid ""
11392 "The interpretation of the ifmap structure depends on the device driver and "
11393 "the architecture."
11394 msgstr ""
11395
11396 #. type: TP
11397 #: build/C/man7/netdevice.7:230
11398 #, no-wrap
11399 msgid "B<SIOCADDMULTI>, B<SIOCDELMULTI>"
11400 msgstr ""
11401
11402 #. type: Plain text
11403 #: build/C/man7/netdevice.7:239
11404 msgid ""
11405 "Add an address to or delete an address from the device's link layer "
11406 "multicast filters using I<ifr_hwaddr>.  These are privileged operations.  "
11407 "See also B<packet>(7)  for an alternative."
11408 msgstr ""
11409
11410 #. type: TP
11411 #: build/C/man7/netdevice.7:239
11412 #, no-wrap
11413 msgid "B<SIOCGIFTXQLEN>, B<SIOCSIFTXQLEN>"
11414 msgstr ""
11415
11416 #. type: Plain text
11417 #: build/C/man7/netdevice.7:244
11418 msgid ""
11419 "Get or set the transmit queue length of a device using I<ifr_qlen>.  Setting "
11420 "the transmit queue length is a privileged operation."
11421 msgstr ""
11422
11423 #. type: TP
11424 #: build/C/man7/netdevice.7:244
11425 #, no-wrap
11426 msgid "B<SIOCSIFNAME>"
11427 msgstr ""
11428
11429 #. type: Plain text
11430 #: build/C/man7/netdevice.7:253
11431 msgid ""
11432 "Changes the name of the interface specified in I<ifr_name> to "
11433 "I<ifr_newname>.  This is a privileged operation.  It is allowed only when "
11434 "the interface is not up."
11435 msgstr ""
11436
11437 #. type: TP
11438 #: build/C/man7/netdevice.7:253
11439 #, no-wrap
11440 msgid "B<SIOCGIFCONF>"
11441 msgstr ""
11442
11443 #. type: Plain text
11444 #: build/C/man7/netdevice.7:263
11445 msgid ""
11446 "Return a list of interface (transport layer) addresses.  This currently "
11447 "means only addresses of the B<AF_INET> (IPv4) family for compatibility.  "
11448 "Unlike the others, this ioctl passes an I<ifconf> structure:"
11449 msgstr ""
11450
11451 #. type: Plain text
11452 #: build/C/man7/netdevice.7:273
11453 #, no-wrap
11454 msgid ""
11455 "struct ifconf {\n"
11456 "    int                 ifc_len; /* size of buffer */\n"
11457 "    union {\n"
11458 "        char           *ifc_buf; /* buffer address */\n"
11459 "        struct ifreq   *ifc_req; /* array of structures */\n"
11460 "    };\n"
11461 "};\n"
11462 msgstr ""
11463
11464 #. type: Plain text
11465 #: build/C/man7/netdevice.7:299
11466 msgid ""
11467 "If I<ifc_req> is NULL, B<SIOCGIFCONF> returns the necessary buffer size in "
11468 "bytes for receiving all available addresses in I<ifc_len>.  Otherwise, "
11469 "I<ifc_req> contains a pointer to an array of I<ifreq> structures to be "
11470 "filled with all currently active L3 interface addresses.  I<ifc_len> "
11471 "contains the size of the array in bytes.  Within each I<ifreq> structure, "
11472 "I<ifr_name> will receive the interface name, and I<ifr_addr> the address.  "
11473 "The actual number of bytes transferred is returned in I<ifc_len>."
11474 msgstr ""
11475
11476 #. type: Plain text
11477 #: build/C/man7/netdevice.7:315
11478 msgid ""
11479 "If the size specified by I<ifc_len> is insufficient to store all the "
11480 "addresses, the kernel will skip the exceeding ones and return success.  "
11481 "There is no reliable way of detecting this condition once it has occurred.  "
11482 "It is therefore recommended to either determine the necessary buffer size "
11483 "beforehand by calling B<SIOCGIFCONF> with I<ifc_req> set to NULL, or to "
11484 "retry the call with a bigger buffer whenever I<ifc_len> upon return differs "
11485 "by less than I<sizeof(struct ifreq)> from its original value."
11486 msgstr ""
11487
11488 #.  Slaving isn't supported in 2.2
11489 #.  .
11490 #.  .TP
11491 #.  .BR SIOCGIFSLAVE ", " SIOCSIFSLAVE
11492 #.  Get or set the slave device using
11493 #.  .IR ifr_slave .
11494 #.  Setting the slave device is a privileged operation.
11495 #.  .PP
11496 #.  FIXME . add amateur radio stuff.
11497 #. type: Plain text
11498 #: build/C/man7/netdevice.7:332
11499 msgid ""
11500 "If an error occurs accessing the I<ifconf> or I<ifreq> structures, B<EFAULT> "
11501 "will be returned."
11502 msgstr ""
11503
11504 #. type: Plain text
11505 #: build/C/man7/netdevice.7:338
11506 msgid ""
11507 "Most protocols support their own ioctls to configure protocol-specific "
11508 "interface options.  See the protocol man pages for a description.  For "
11509 "configuring IP addresses, see B<ip>(7)."
11510 msgstr ""
11511
11512 #. type: Plain text
11513 #: build/C/man7/netdevice.7:341
11514 msgid ""
11515 "In addition, some devices support private ioctls.  These are not described "
11516 "here."
11517 msgstr ""
11518
11519 #. type: Plain text
11520 #: build/C/man7/netdevice.7:349
11521 msgid ""
11522 "Strictly speaking, B<SIOCGIFCONF> and the other ioctls that accept or return "
11523 "only B<AF_INET> socket addresses, are IP-specific and belong in B<ip>(7)."
11524 msgstr ""
11525
11526 #. type: Plain text
11527 #: build/C/man7/netdevice.7:354
11528 msgid ""
11529 "The names of interfaces with no addresses or that don't have the "
11530 "B<IFF_RUNNING> flag set can be found via I</proc/net/dev>."
11531 msgstr ""
11532
11533 #. type: Plain text
11534 #: build/C/man7/netdevice.7:359
11535 msgid ""
11536 "Local IPv6 IP addresses can be found via I</proc/net> or via "
11537 "B<rtnetlink>(7)."
11538 msgstr ""
11539
11540 #. type: Plain text
11541 #: build/C/man7/netdevice.7:365
11542 msgid ""
11543 "glibc 2.1 is missing the I<ifr_newname> macro in I<E<lt>net/if.hE<gt>>.  Add "
11544 "the following to your program as a workaround:"
11545 msgstr ""
11546
11547 #. type: Plain text
11548 #: build/C/man7/netdevice.7:371
11549 #, no-wrap
11550 msgid ""
11551 "#ifndef ifr_newname\n"
11552 "#define ifr_newname     ifr_ifru.ifru_slave\n"
11553 "#endif\n"
11554 msgstr ""
11555
11556 #. type: Plain text
11557 #: build/C/man7/netdevice.7:377
11558 msgid "B<proc>(5), B<capabilities>(7), B<ip>(7), B<rtnetlink>(7)"
11559 msgstr ""
11560
11561 #. type: TH
11562 #: build/C/man5/networks.5:26
11563 #, no-wrap
11564 msgid "NETWORKS"
11565 msgstr ""
11566
11567 #. type: TH
11568 #: build/C/man5/networks.5:26
11569 #, no-wrap
11570 msgid "2008-09-04"
11571 msgstr ""
11572
11573 #. type: TH
11574 #: build/C/man5/networks.5:26
11575 #, no-wrap
11576 msgid "GNU/Linux"
11577 msgstr ""
11578
11579 #. type: Plain text
11580 #: build/C/man5/networks.5:29
11581 msgid "networks - network name information"
11582 msgstr ""
11583
11584 #. type: Plain text
11585 #: build/C/man5/networks.5:35
11586 msgid ""
11587 "The file I</etc/networks> is a plain ASCII file that describes known DARPA "
11588 "networks and symbolic names for these networks.  Each line represents a "
11589 "network and has the following structure:"
11590 msgstr ""
11591
11592 #. type: Plain text
11593 #: build/C/man5/networks.5:38
11594 msgid "I<name number aliases ...>"
11595 msgstr ""
11596
11597 #. type: Plain text
11598 #: build/C/man5/networks.5:46
11599 msgid ""
11600 "where the fields are delimited by spaces or tabs.  Empty lines are ignored.  "
11601 "The hash character (B<#>) indicates the start of a comment: this character, "
11602 "and the remaining characters up to the end of the current line, are ignored "
11603 "by library functions that process the file."
11604 msgstr ""
11605
11606 #. type: Plain text
11607 #: build/C/man5/networks.5:48 build/C/man5/protocols.5:59
11608 msgid "The field descriptions are:"
11609 msgstr ""
11610
11611 #. type: TP
11612 #: build/C/man5/networks.5:48
11613 #, no-wrap
11614 msgid "I<name>"
11615 msgstr ""
11616
11617 #. type: Plain text
11618 #: build/C/man5/networks.5:53
11619 msgid ""
11620 "The symbolic name for the network.  Network names can contain any printable "
11621 "characters except white-space characters or the comment character."
11622 msgstr ""
11623
11624 #. type: TP
11625 #: build/C/man5/networks.5:53 build/C/man5/protocols.5:67
11626 #, no-wrap
11627 msgid "I<number>"
11628 msgstr ""
11629
11630 #. type: Plain text
11631 #: build/C/man5/networks.5:58
11632 msgid ""
11633 "The official number for this network in numbers-and-dots notation (see "
11634 "B<inet>(3)).  The trailing \".0\" (for the host component of the network "
11635 "address) may be omitted."
11636 msgstr ""
11637
11638 #. type: TP
11639 #: build/C/man5/networks.5:58 build/C/man5/protocols.5:71 build/C/man5/services.5:120
11640 #, no-wrap
11641 msgid "I<aliases>"
11642 msgstr ""
11643
11644 #. type: Plain text
11645 #: build/C/man5/networks.5:61
11646 msgid "Optional aliases for the network."
11647 msgstr ""
11648
11649 #. type: Plain text
11650 #: build/C/man5/networks.5:70
11651 msgid ""
11652 "This file is read by the B<route>(8)  and B<netstat>(8)  utilities.  Only "
11653 "Class A, B or C networks are supported, partitioned networks (i.e., "
11654 "network/26 or network/28) are not supported by this facility."
11655 msgstr ""
11656
11657 #. type: Plain text
11658 #: build/C/man5/networks.5:74
11659 msgid "The networks definition file."
11660 msgstr ""
11661
11662 #. type: Plain text
11663 #: build/C/man5/networks.5:79
11664 msgid ""
11665 "B<getnetbyaddr>(3), B<getnetbyname>(3), B<getnetent>(3), B<netstat>(8), "
11666 "B<route>(8)"
11667 msgstr ""
11668
11669 #. type: TH
11670 #: build/C/man8/nscd.8:23
11671 #, no-wrap
11672 msgid "NSCD"
11673 msgstr ""
11674
11675 #. type: Plain text
11676 #: build/C/man8/nscd.8:26
11677 msgid "nscd - name service cache daemon"
11678 msgstr ""
11679
11680 #. type: Plain text
11681 #: build/C/man8/nscd.8:34
11682 msgid ""
11683 "Nscd is a daemon that provides a cache for the most common name service "
11684 "requests.  The default configuration file, I</etc/nscd.conf>, determines the "
11685 "behavior of the cache daemon.  See B<nscd.conf>(5)."
11686 msgstr ""
11687
11688 #. type: Plain text
11689 #: build/C/man8/nscd.8:47
11690 msgid ""
11691 "Nscd provides caching for accesses of the B<passwd>(5), B<group>(5), and "
11692 "B<hosts>(5)  databases through standard libc interfaces, such as "
11693 "B<getpwnam>(3), B<getpwuid>(3), B<getgrnam>(3), B<getgrgid>(3), "
11694 "B<gethostbyname>(3), and others."
11695 msgstr ""
11696
11697 #. type: Plain text
11698 #: build/C/man8/nscd.8:56
11699 msgid ""
11700 "There are two caches for each database: a positive one for items found, and "
11701 "a negative one for items not found.  Each cache has a separate TTL "
11702 "(time-to-live)  period for its data.  Note that the shadow file is "
11703 "specifically not cached.  B<getspnam>(3)  calls remain uncached as a result."
11704 msgstr ""
11705
11706 #. type: SH
11707 #: build/C/man8/nscd.8:56
11708 #, no-wrap
11709 msgid "OPTIONS"
11710 msgstr ""
11711
11712 #. type: TP
11713 #: build/C/man8/nscd.8:57
11714 #, no-wrap
11715 msgid "B<--help>"
11716 msgstr ""
11717
11718 #. type: Plain text
11719 #: build/C/man8/nscd.8:60
11720 msgid "will give you a list with all options and what they do."
11721 msgstr ""
11722
11723 #. type: Plain text
11724 #: build/C/man8/nscd.8:83
11725 msgid ""
11726 "The daemon will try to watch for changes in configuration files appropriate "
11727 "for each database (e.g., I</etc/passwd> for the I<passwd> database or "
11728 "I</etc/hosts> and I</etc/resolv.conf> for the I<hosts> database), and flush "
11729 "the cache when these are changed.  However, this will happen only after a "
11730 "short delay (unless the B<inotify>(7)  mechanism is available and glibc 2.9 "
11731 "or later is available), and this auto-detection does not cover configuration "
11732 "files required by nonstandard NSS modules, if any are specified in "
11733 "I</etc/nsswitch.conf>.  In that case, you need to run the following command "
11734 "after changing the configuration file of the database so that B<nscd> "
11735 "invalidates its cache:"
11736 msgstr ""
11737
11738 #. type: Plain text
11739 #: build/C/man8/nscd.8:85
11740 #, no-wrap
11741 msgid "    $ B<nscd -i> I<E<lt>databaseE<gt>>\n"
11742 msgstr ""
11743
11744 #. type: Plain text
11745 #: build/C/man8/nscd.8:87
11746 msgid "B<nscd.conf>(5), B<nsswitch.conf>(5)"
11747 msgstr ""
11748
11749 #. type: TH
11750 #: build/C/man5/nscd.conf.5:20
11751 #, no-wrap
11752 msgid "NSCD.CONF"
11753 msgstr ""
11754
11755 #. type: TH
11756 #: build/C/man5/nscd.conf.5:20
11757 #, no-wrap
11758 msgid "2014-02-07"
11759 msgstr ""
11760
11761 #. type: Plain text
11762 #: build/C/man5/nscd.conf.5:23
11763 msgid "/etc/nscd.conf - name service cache daemon configuration file"
11764 msgstr ""
11765
11766 #. type: Plain text
11767 #: build/C/man5/nscd.conf.5:36
11768 msgid ""
11769 "The file I</etc/nscd.conf> is read from B<nscd>(8)  at startup.  Each line "
11770 "specifies either an attribute and a value, or an attribute, service, and a "
11771 "value.  Fields are separated either by SPACE or TAB characters.  A "
11772 "\\(aq#\\(aq (number sign) indicates the beginning of a comment; following "
11773 "characters, up to the end of the line, are not interpreted by nscd."
11774 msgstr ""
11775
11776 #. type: Plain text
11777 #: build/C/man5/nscd.conf.5:39
11778 msgid ""
11779 "Valid services are I<passwd>, I<group>, I<hosts>, I<services>, or "
11780 "I<netgroup>."
11781 msgstr ""
11782
11783 #. type: Plain text
11784 #: build/C/man5/nscd.conf.5:42
11785 msgid "B<logfile> I<debug-file-name>"
11786 msgstr ""
11787
11788 #. type: Plain text
11789 #: build/C/man5/nscd.conf.5:44
11790 msgid "Specifies name of the file to which debug info should be written."
11791 msgstr ""
11792
11793 #. type: Plain text
11794 #: build/C/man5/nscd.conf.5:48
11795 msgid "B<debug-level> I<value>"
11796 msgstr ""
11797
11798 #. type: Plain text
11799 #: build/C/man5/nscd.conf.5:51
11800 msgid "Sets the desired debug level.  The default is 0."
11801 msgstr ""
11802
11803 #. type: Plain text
11804 #: build/C/man5/nscd.conf.5:55
11805 msgid "B<threads> I<number>"
11806 msgstr ""
11807
11808 #. type: Plain text
11809 #: build/C/man5/nscd.conf.5:59
11810 msgid ""
11811 "This is the number of threads that are started to wait for requests.  At "
11812 "least five threads will always be created."
11813 msgstr ""
11814
11815 #. type: Plain text
11816 #: build/C/man5/nscd.conf.5:63
11817 msgid "B<max-threads> I<number>"
11818 msgstr ""
11819
11820 #. type: Plain text
11821 #: build/C/man5/nscd.conf.5:66
11822 msgid "Specifies the maximum number of threads.  The default is 32."
11823 msgstr ""
11824
11825 #. type: Plain text
11826 #: build/C/man5/nscd.conf.5:70
11827 msgid "B<server-user> I<user>"
11828 msgstr ""
11829
11830 #. type: Plain text
11831 #: build/C/man5/nscd.conf.5:74
11832 msgid ""
11833 "If this option is set, nscd will run as this user and not as root.  If a "
11834 "separate cache for every user is used (-S parameter), this option is "
11835 "ignored."
11836 msgstr ""
11837
11838 #. type: Plain text
11839 #: build/C/man5/nscd.conf.5:78
11840 msgid "B<stat-user> I<user>"
11841 msgstr ""
11842
11843 #. type: Plain text
11844 #: build/C/man5/nscd.conf.5:80
11845 msgid "Specifies the user who is allowed to request statistics."
11846 msgstr ""
11847
11848 #. type: Plain text
11849 #: build/C/man5/nscd.conf.5:85
11850 msgid "B<reload-count> unlimited | I<number>"
11851 msgstr ""
11852
11853 #. type: Plain text
11854 #: build/C/man5/nscd.conf.5:89
11855 msgid ""
11856 "Limit on the number of times a cached entry gets reloaded without being used "
11857 "before it gets removed.  The default is 5."
11858 msgstr ""
11859
11860 #. type: Plain text
11861 #: build/C/man5/nscd.conf.5:93
11862 msgid "B<paranoia> I<E<lt>yes|noE<gt>>"
11863 msgstr ""
11864
11865 #. type: Plain text
11866 #: build/C/man5/nscd.conf.5:96
11867 msgid ""
11868 "Enabling paranoia mode causes nscd to restart itself periodically.  The "
11869 "default is no."
11870 msgstr ""
11871
11872 #. type: Plain text
11873 #: build/C/man5/nscd.conf.5:100
11874 msgid "B<restart-interval> I<time>"
11875 msgstr ""
11876
11877 #. type: Plain text
11878 #: build/C/man5/nscd.conf.5:108
11879 msgid ""
11880 "Sets the restart interval to I<time> seconds if periodic restart is enabled "
11881 "by enabling B<paranoia> mode.  The default is 3600."
11882 msgstr ""
11883
11884 #. type: Plain text
11885 #: build/C/man5/nscd.conf.5:113
11886 msgid "B<enable-cache> I<service> I<E<lt>yes|noE<gt>>"
11887 msgstr ""
11888
11889 #. type: Plain text
11890 #: build/C/man5/nscd.conf.5:118
11891 msgid "Enables or disables the specified I<service> cache.  The default is no."
11892 msgstr ""
11893
11894 #. type: Plain text
11895 #: build/C/man5/nscd.conf.5:123
11896 msgid "B<positive-time-to-live> I<service> I<value>"
11897 msgstr ""
11898
11899 #. type: Plain text
11900 #: build/C/man5/nscd.conf.5:131
11901 msgid ""
11902 "Sets the TTL (time-to-live) for positive entries (successful queries)  in "
11903 "the specified cache for I<service>.  I<Value> is in seconds.  Larger values "
11904 "increase cache hit rates and reduce mean response times, but increase "
11905 "problems with cache coherence."
11906 msgstr ""
11907
11908 #. type: Plain text
11909 #: build/C/man5/nscd.conf.5:136
11910 msgid "B<negative-time-to-live> I<service> I<value>"
11911 msgstr ""
11912
11913 #. type: Plain text
11914 #: build/C/man5/nscd.conf.5:146
11915 msgid ""
11916 "Sets the TTL (time-to-live) for negative entries (unsuccessful queries)  in "
11917 "the specified cache for I<service>.  I<Value> is in seconds.  Can result in "
11918 "significant performance improvements if there are several files owned by "
11919 "UIDs (user IDs) not in system databases (for example untarring the Linux "
11920 "kernel sources as root); should be kept small to reduce cache coherency "
11921 "problems."
11922 msgstr ""
11923
11924 #. type: Plain text
11925 #: build/C/man5/nscd.conf.5:151
11926 msgid "B<suggested-size> I<service> I<value>"
11927 msgstr ""
11928
11929 #. type: Plain text
11930 #: build/C/man5/nscd.conf.5:156
11931 msgid ""
11932 "This is the internal hash table size, I<value> should remain a prime number "
11933 "for optimum efficiency.  The default is 211."
11934 msgstr ""
11935
11936 #. type: Plain text
11937 #: build/C/man5/nscd.conf.5:161
11938 msgid "B<check-files> I<service> I<E<lt>yes|noE<gt>>"
11939 msgstr ""
11940
11941 #. type: Plain text
11942 #: build/C/man5/nscd.conf.5:173
11943 msgid ""
11944 "Enables or disables checking the file belonging to the specified I<service> "
11945 "for changes.  The files are I</etc/passwd>, I</etc/group>, I</etc/hosts>, "
11946 "I</etc/services> and I</etc/netgroup>.  The default is yes."
11947 msgstr ""
11948
11949 #. type: Plain text
11950 #: build/C/man5/nscd.conf.5:178
11951 msgid "B<persistent> I<service> I<E<lt>yes|noE<gt>>"
11952 msgstr ""
11953
11954 #. type: Plain text
11955 #: build/C/man5/nscd.conf.5:185
11956 msgid ""
11957 "Keep the content of the cache for I<service> over server restarts; useful "
11958 "when B<paranoia> mode is set.  The default is no."
11959 msgstr ""
11960
11961 #. type: Plain text
11962 #: build/C/man5/nscd.conf.5:190
11963 msgid "B<shared> I<service> I<E<lt>yes|noE<gt>>"
11964 msgstr ""
11965
11966 #. type: Plain text
11967 #: build/C/man5/nscd.conf.5:197
11968 msgid ""
11969 "The memory mapping of the nscd databases for I<service> is shared with the "
11970 "clients so that they can directly search in them instead of having to ask "
11971 "the daemon over the socket each time a lookup is performed.  The default is "
11972 "no."
11973 msgstr ""
11974
11975 #. type: Plain text
11976 #: build/C/man5/nscd.conf.5:202
11977 msgid "B<max-db-size> I<service> I<bytes>"
11978 msgstr ""
11979
11980 #. type: Plain text
11981 #: build/C/man5/nscd.conf.5:206
11982 msgid ""
11983 "The maximum allowable size, in bytes, of the database files for the "
11984 "I<service>.  The default is 33554432."
11985 msgstr ""
11986
11987 #. type: Plain text
11988 #: build/C/man5/nscd.conf.5:211
11989 msgid "B<auto-propagate> I<service> I<E<lt>yes|noE<gt>>"
11990 msgstr ""
11991
11992 #. type: Plain text
11993 #: build/C/man5/nscd.conf.5:231
11994 msgid ""
11995 "When set to I<no> for I<passwd> or I<group> service, then the I<.byname> "
11996 "requests are not added to I<passwd.byuid> or I<group.bygid> cache.  This can "
11997 "help with tables containing multiple records for the same ID.  The default "
11998 "is yes.  This option is valid only for services I<passwd> and I<group>."
11999 msgstr ""
12000
12001 #. type: Plain text
12002 #: build/C/man5/nscd.conf.5:239
12003 msgid ""
12004 "The default values stated in this manual page originate from the source code "
12005 "of B<nscd>(8)  and are used if not overridden in the configuration file.  "
12006 "The default values used in the configuration file of your distribution might "
12007 "differ."
12008 msgstr ""
12009
12010 #. type: Plain text
12011 #: build/C/man5/nscd.conf.5:240
12012 msgid "B<nscd>(8)"
12013 msgstr ""
12014
12015 #. type: TH
12016 #: build/C/man5/nss.5:19
12017 #, no-wrap
12018 msgid "NSS"
12019 msgstr ""
12020
12021 #. type: Plain text
12022 #: build/C/man5/nss.5:22
12023 msgid "nss - Name Service Switch configuration file"
12024 msgstr ""
12025
12026 #. type: Plain text
12027 #: build/C/man5/nss.5:29
12028 msgid ""
12029 "Each call to a function which retrieves data from a system database like the "
12030 "password or group database is handled by the Name Service Switch "
12031 "implementation in the GNU C library.  The various services provided are "
12032 "implemented by independent modules, each of which naturally varies widely "
12033 "from the other."
12034 msgstr ""
12035
12036 #. type: Plain text
12037 #: build/C/man5/nss.5:38
12038 msgid ""
12039 "The default implementations coming with the GNU C library are by default "
12040 "conservative and do not use unsafe data.  This might be very costly in some "
12041 "situations, especially when the databases are large.  Some modules allow the "
12042 "system administrator to request taking shortcuts if these are known to be "
12043 "safe.  It is then the system administrator's responsibility to ensure the "
12044 "assumption is correct."
12045 msgstr ""
12046
12047 #. type: Plain text
12048 #: build/C/man5/nss.5:42
12049 msgid ""
12050 "There are other modules where the implementation changed over time.  If an "
12051 "implementation used to sacrifice speed for memory consumption, it might "
12052 "create problems if the preference is switched."
12053 msgstr ""
12054
12055 #. type: Plain text
12056 #: build/C/man5/nss.5:51
12057 msgid ""
12058 "The I</etc/default/nss> file contains a number of variable assignments.  "
12059 "Each variable controls the behavior of one or more NSS modules.  White "
12060 "spaces are ignored.  Lines beginning with \\(aq#\\(aq are treated as "
12061 "comments."
12062 msgstr ""
12063
12064 #. type: Plain text
12065 #: build/C/man5/nss.5:53
12066 msgid "The variables currently recognized are:"
12067 msgstr ""
12068
12069 #. type: TP
12070 #: build/C/man5/nss.5:53
12071 #, no-wrap
12072 msgid "B<NETID_AUTHORITATIVE => I<TRUE>|I<FALSE>"
12073 msgstr ""
12074
12075 #. type: Plain text
12076 #: build/C/man5/nss.5:68
12077 msgid ""
12078 "If set to TRUE, the NIS backend for the B<initgroups>(3)  function will "
12079 "accept the information from the I<netid.byname> NIS map as authoritative.  "
12080 "This can speed up the function significantly if the I<group.byname> map is "
12081 "large.  The content of the I<netid.byname> map is used B<as is>.  The system "
12082 "administrator has to make sure it is correctly generated."
12083 msgstr ""
12084
12085 #. type: TP
12086 #: build/C/man5/nss.5:68
12087 #, no-wrap
12088 msgid "B<SERVICES_AUTHORITATIVE => I<TRUE>|I<FALSE>"
12089 msgstr ""
12090
12091 #. type: Plain text
12092 #: build/C/man5/nss.5:80
12093 msgid ""
12094 "If set to TRUE, the NIS backend for the B<getservbyname>(3)  and "
12095 "B<getservbyname_r>(3)  functions will assume that the "
12096 "I<services.byservicename> NIS map exists and is authoritative, particularly "
12097 "that it contains both keys with /proto and without /proto for both primary "
12098 "service names and service aliases.  The system administrator has to make "
12099 "sure it is correctly generated."
12100 msgstr ""
12101
12102 #. type: TP
12103 #: build/C/man5/nss.5:80
12104 #, no-wrap
12105 msgid "B<SETENT_BATCH_READ => I<TRUE>|I<FALSE>"
12106 msgstr ""
12107
12108 #. type: Plain text
12109 #: build/C/man5/nss.5:98
12110 msgid ""
12111 "If set to TRUE, the NIS backend for the B<setpwent>(3)  and B<setgrent>(3)  "
12112 "functions will read the entire database at once and then hand out the "
12113 "requests one by one from memory with every corresponding B<getpwent>(3)  or "
12114 "B<getgrent>(3)  call respectively.  Otherwise, each B<getpwent>(3)  or "
12115 "B<getgrent>(3)  call might result in a network communication with the server "
12116 "to get the next entry."
12117 msgstr ""
12118
12119 #. type: Plain text
12120 #: build/C/man5/nss.5:100
12121 msgid "I</etc/default/nss>"
12122 msgstr ""
12123
12124 #. type: Plain text
12125 #: build/C/man5/nss.5:102
12126 msgid "The default configuration corresponds to the following configuration file:"
12127 msgstr ""
12128
12129 #.  .SH AUTHOR
12130 #.  Ulrich Drepper <drepper@redhat.com>
12131 #. type: Plain text
12132 #: build/C/man5/nss.5:110
12133 #, no-wrap
12134 msgid ""
12135 "NETID_AUTHORITATIVE=FALSE\n"
12136 "SERVICES_AUTHORITATIVE=FALSE\n"
12137 "SETENT_BATCH_READ=FALSE\n"
12138 msgstr ""
12139
12140 #. type: Plain text
12141 #: build/C/man5/nss.5:111
12142 msgid "I<nsswitch.conf>"
12143 msgstr ""
12144
12145 #. type: TH
12146 #: build/C/man5/nsswitch.conf.5:25
12147 #, no-wrap
12148 msgid "NSSWITCH.CONF"
12149 msgstr ""
12150
12151 #. type: Plain text
12152 #: build/C/man5/nsswitch.conf.5:28
12153 msgid "nsswitch.conf - Name Service Switch configuration file"
12154 msgstr ""
12155
12156 #. type: Plain text
12157 #: build/C/man5/nsswitch.conf.5:36
12158 msgid ""
12159 "The Name Service Switch (NSS) configuration file, I</etc/nsswitch.conf>, is "
12160 "used by the GNU C Library to determine the sources from which to obtain "
12161 "name-service information in a range of categories, and in what order.  Each "
12162 "category of information is identified by a database name."
12163 msgstr ""
12164
12165 #. type: Plain text
12166 #: build/C/man5/nsswitch.conf.5:42
12167 msgid ""
12168 "The file is plain ASCII text, with columns separated by spaces or tab "
12169 "characters.  The first column specifies the database name.  The remaining "
12170 "columns describe the order of sources to query and a limited set of actions "
12171 "that can be performed by lookup result."
12172 msgstr ""
12173
12174 #. type: Plain text
12175 #: build/C/man5/nsswitch.conf.5:44
12176 msgid "The following databases are understood by the GNU C Library:"
12177 msgstr ""
12178
12179 #. type: Plain text
12180 #: build/C/man5/nsswitch.conf.5:49
12181 msgid "Mail aliases, used by B<getaliasent>(3)  and related functions."
12182 msgstr ""
12183
12184 #. type: Plain text
12185 #: build/C/man5/nsswitch.conf.5:52
12186 msgid "Ethernet numbers."
12187 msgstr ""
12188
12189 #. type: Plain text
12190 #: build/C/man5/nsswitch.conf.5:57
12191 msgid "Groups of users, used by B<getgrent>(3)  and related functions."
12192 msgstr ""
12193
12194 #. type: Plain text
12195 #: build/C/man5/nsswitch.conf.5:62
12196 msgid "Host names and numbers, used by B<gethostbyname>(3)  and related functions."
12197 msgstr ""
12198
12199 #. type: Plain text
12200 #: build/C/man5/nsswitch.conf.5:67
12201 msgid "Supplementary group access list, used by B<getgrouplist>(3)  function."
12202 msgstr ""
12203
12204 #. type: Plain text
12205 #: build/C/man5/nsswitch.conf.5:71
12206 msgid ""
12207 "Network-wide list of hosts and users, used for access rules.  C libraries "
12208 "before glibc 2.1 supported netgroups only over NIS."
12209 msgstr ""
12210
12211 #. type: Plain text
12212 #: build/C/man5/nsswitch.conf.5:76
12213 msgid "Network names and numbers, used by B<getnetent>(3)  and related functions."
12214 msgstr ""
12215
12216 #. type: Plain text
12217 #: build/C/man5/nsswitch.conf.5:81
12218 msgid "User passwords, used by B<getpwent>(3)  and related functions."
12219 msgstr ""
12220
12221 #. type: Plain text
12222 #: build/C/man5/nsswitch.conf.5:86
12223 msgid "Network protocols, used by B<getprotoent>(3)  and related functions."
12224 msgstr ""
12225
12226 #. type: TP
12227 #: build/C/man5/nsswitch.conf.5:86
12228 #, no-wrap
12229 msgid "B<publickey>"
12230 msgstr ""
12231
12232 #. type: Plain text
12233 #: build/C/man5/nsswitch.conf.5:89
12234 msgid "Public and secret keys for Secure_RPC used by NFS and NIS+."
12235 msgstr ""
12236
12237 #. type: Plain text
12238 #: build/C/man5/nsswitch.conf.5:94
12239 msgid ""
12240 "Remote procedure call names and numbers, used by B<getrpcbyname>(3)  and "
12241 "related functions."
12242 msgstr ""
12243
12244 #. type: Plain text
12245 #: build/C/man5/nsswitch.conf.5:99
12246 msgid "Network services, used by B<getservent>(3)  and related functions."
12247 msgstr ""
12248
12249 #. type: Plain text
12250 #: build/C/man5/nsswitch.conf.5:104
12251 msgid "Shadow user passwords, used by B<getspnam>(3)  and related functions."
12252 msgstr ""
12253
12254 #. type: Plain text
12255 #: build/C/man5/nsswitch.conf.5:108
12256 msgid "Here is an example I</etc/nsswitch.conf> file:"
12257 msgstr ""
12258
12259 #. type: TP
12260 #: build/C/man5/nsswitch.conf.5:111
12261 #, no-wrap
12262 msgid "passwd:"
12263 msgstr ""
12264
12265 #. type: Plain text
12266 #: build/C/man5/nsswitch.conf.5:114 build/C/man5/nsswitch.conf.5:117 build/C/man5/nsswitch.conf.5:120
12267 msgid "compat"
12268 msgstr ""
12269
12270 #. type: TP
12271 #: build/C/man5/nsswitch.conf.5:114
12272 #, no-wrap
12273 msgid "group:"
12274 msgstr ""
12275
12276 #. type: TP
12277 #: build/C/man5/nsswitch.conf.5:117
12278 #, no-wrap
12279 msgid "shadow:"
12280 msgstr ""
12281
12282 #. type: TP
12283 #: build/C/man5/nsswitch.conf.5:121
12284 #, no-wrap
12285 msgid "hosts:"
12286 msgstr ""
12287
12288 #. type: Plain text
12289 #: build/C/man5/nsswitch.conf.5:124
12290 msgid "dns [!UNAVAIL=return] files"
12291 msgstr ""
12292
12293 #. type: TP
12294 #: build/C/man5/nsswitch.conf.5:124
12295 #, no-wrap
12296 msgid "networks:"
12297 msgstr ""
12298
12299 #. type: Plain text
12300 #: 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
12301 msgid "nis [NOTFOUND=return] files"
12302 msgstr ""
12303
12304 #. type: TP
12305 #: build/C/man5/nsswitch.conf.5:127
12306 #, no-wrap
12307 msgid "ethers:"
12308 msgstr ""
12309
12310 #. type: TP
12311 #: build/C/man5/nsswitch.conf.5:130
12312 #, no-wrap
12313 msgid "protocols:"
12314 msgstr ""
12315
12316 #. type: TP
12317 #: build/C/man5/nsswitch.conf.5:133
12318 #, no-wrap
12319 msgid "rpc:"
12320 msgstr ""
12321
12322 #. type: TP
12323 #: build/C/man5/nsswitch.conf.5:136
12324 #, no-wrap
12325 msgid "services:"
12326 msgstr ""
12327
12328 #. type: Plain text
12329 #: build/C/man5/nsswitch.conf.5:144
12330 msgid "The first column is the database name.  The remaining columns specify:"
12331 msgstr ""
12332
12333 #. type: Plain text
12334 #: build/C/man5/nsswitch.conf.5:148
12335 msgid ""
12336 "One or more service specifications, for example, \"files\", \"db\", or "
12337 "\"nis\".  The order of the services on the line determines the order in "
12338 "which those services will be queried, in turn, until a result is found."
12339 msgstr ""
12340
12341 #. type: Plain text
12342 #: build/C/man5/nsswitch.conf.5:151
12343 msgid ""
12344 "Optional actions to perform if a particular result is obtained from the "
12345 "preceding service, for example, \"[NOTFOUND=return]\"."
12346 msgstr ""
12347
12348 #. type: Plain text
12349 #: build/C/man5/nsswitch.conf.5:177
12350 msgid ""
12351 "The service specifications supported on your system depend on the presence "
12352 "of shared libraries, and are therefore extensible.  Libraries called "
12353 "I</lib/libnss_SERVICE.so.>B<X> will provide the named I<SERVICE>.  On a "
12354 "standard installation, you can use \"files\", \"db\", \"nis\", and "
12355 "\"nisplus\".  For the B<hosts> database, you can additionally specify "
12356 "\"dns\".  For the B<passwd>, B<group>, and B<shadow> databases, you can "
12357 "additionally specify \"compat\" (see B<Compatibility mode> below).  The "
12358 "version number B<X> may be 1 for glibc 2.0, or 2 for glibc 2.1 and later.  "
12359 "On systems with additional libraries installed, you may have access to "
12360 "further services such as \"hesiod\", \"ldap\", \"winbind\" and \"wins\"."
12361 msgstr ""
12362
12363 #. type: Plain text
12364 #: build/C/man5/nsswitch.conf.5:182
12365 msgid ""
12366 "An action may also be specified following a service specification.  The "
12367 "action modifies the behavior following a result obtained from the preceding "
12368 "data source.  Action items take the general form:"
12369 msgstr ""
12370
12371 #. type: Plain text
12372 #: build/C/man5/nsswitch.conf.5:185
12373 msgid "[I<STATUS>=I<ACTION>]"
12374 msgstr ""
12375
12376 #. type: Plain text
12377 #: build/C/man5/nsswitch.conf.5:187
12378 msgid "[!I<STATUS>=I<ACTION>]"
12379 msgstr ""
12380
12381 #. type: Plain text
12382 #: build/C/man5/nsswitch.conf.5:190
12383 msgid "where"
12384 msgstr ""
12385
12386 #. type: Plain text
12387 #: build/C/man5/nsswitch.conf.5:201
12388 msgid "I<STATUS> =E<gt> B<success> | B<notfound> | B<unavail> | B<tryagain>"
12389 msgstr ""
12390
12391 #. type: Plain text
12392 #: build/C/man5/nsswitch.conf.5:207
12393 msgid "I<ACTION> =E<gt> B<return> | B<continue>"
12394 msgstr ""
12395
12396 #. type: Plain text
12397 #: build/C/man5/nsswitch.conf.5:212
12398 msgid ""
12399 "The ! negates the test, matching all possible results except the one "
12400 "specified.  The case of the keywords is not significant."
12401 msgstr ""
12402
12403 #. type: Plain text
12404 #: build/C/man5/nsswitch.conf.5:217
12405 msgid ""
12406 "The I<STATUS> value is matched against the result of the lookup function "
12407 "called by the preceding service specification, and can be one of:"
12408 msgstr ""
12409
12410 #. type: TP
12411 #: build/C/man5/nsswitch.conf.5:218
12412 #, no-wrap
12413 msgid "B<success>"
12414 msgstr ""
12415
12416 #. type: Plain text
12417 #: build/C/man5/nsswitch.conf.5:222
12418 msgid ""
12419 "No error occurred and the requested entry is returned.  The default action "
12420 "for this condition is \"return\"."
12421 msgstr ""
12422
12423 #. type: TP
12424 #: build/C/man5/nsswitch.conf.5:222
12425 #, no-wrap
12426 msgid "B<notfound>"
12427 msgstr ""
12428
12429 #. type: Plain text
12430 #: build/C/man5/nsswitch.conf.5:226
12431 msgid ""
12432 "The lookup succeeded, but the requested entry was not found.  The default "
12433 "action for this condition is \"continue\"."
12434 msgstr ""
12435
12436 #. type: TP
12437 #: build/C/man5/nsswitch.conf.5:226
12438 #, no-wrap
12439 msgid "B<unavail>"
12440 msgstr ""
12441
12442 #. type: Plain text
12443 #: build/C/man5/nsswitch.conf.5:233
12444 msgid ""
12445 "The service is permanently unavailable.  This can mean either that the "
12446 "required file cannot be read, or, for network services, that the server is "
12447 "not available or does not allow queries.  The default action for this "
12448 "condition is \"continue\"."
12449 msgstr ""
12450
12451 #. type: TP
12452 #: build/C/man5/nsswitch.conf.5:233
12453 #, no-wrap
12454 msgid "B<tryagain>"
12455 msgstr ""
12456
12457 #. type: Plain text
12458 #: build/C/man5/nsswitch.conf.5:239
12459 msgid ""
12460 "The service is temporarily unavailable.  This could mean a file is locked or "
12461 "a server currently cannot accept more connections.  The default action for "
12462 "this condition is \"continue\"."
12463 msgstr ""
12464
12465 #. type: Plain text
12466 #: build/C/man5/nsswitch.conf.5:244
12467 msgid "The I<ACTION> value can be one of:"
12468 msgstr ""
12469
12470 #. type: TP
12471 #: build/C/man5/nsswitch.conf.5:245
12472 #, no-wrap
12473 msgid "B<return>"
12474 msgstr ""
12475
12476 #. type: Plain text
12477 #: build/C/man5/nsswitch.conf.5:257
12478 msgid ""
12479 "Return a result now.  Do not call any further lookup functions.  However, "
12480 "for compatibility reasons, if this is the selected action for the B<group> "
12481 "database and the B<notfound> status, and the configuration file does not "
12482 "contain the B<initgroups> line, the next lookup function is always called, "
12483 "without affecting the search result."
12484 msgstr ""
12485
12486 #. type: TP
12487 #: build/C/man5/nsswitch.conf.5:257
12488 #, no-wrap
12489 msgid "B<continue>"
12490 msgstr ""
12491
12492 #. type: Plain text
12493 #: build/C/man5/nsswitch.conf.5:260
12494 msgid "Call the next lookup function."
12495 msgstr ""
12496
12497 #. type: SS
12498 #: build/C/man5/nsswitch.conf.5:261
12499 #, no-wrap
12500 msgid "Compatibility mode (compat)"
12501 msgstr ""
12502
12503 #. type: Plain text
12504 #: build/C/man5/nsswitch.conf.5:267
12505 msgid ""
12506 "The NSS \"compat\" service is similar to \"files\" except that it "
12507 "additionally permits special entries in I</etc/passwd> for granting users or "
12508 "members of netgroups access to the system.  The following entries are valid "
12509 "in this mode:"
12510 msgstr ""
12511
12512 #. type: TP
12513 #: build/C/man5/nsswitch.conf.5:268
12514 #, no-wrap
12515 msgid "B<+>I<user>"
12516 msgstr ""
12517
12518 #. type: Plain text
12519 #: build/C/man5/nsswitch.conf.5:273
12520 msgid "Include the specified I<user> from the NIS passwd map."
12521 msgstr ""
12522
12523 #. type: TP
12524 #: build/C/man5/nsswitch.conf.5:273
12525 #, no-wrap
12526 msgid "B<+@>I<netgroup>"
12527 msgstr ""
12528
12529 #. type: Plain text
12530 #: build/C/man5/nsswitch.conf.5:277
12531 msgid "Include all users in the given I<netgroup>."
12532 msgstr ""
12533
12534 #. type: TP
12535 #: build/C/man5/nsswitch.conf.5:277
12536 #, no-wrap
12537 msgid "B<->I<user>"
12538 msgstr ""
12539
12540 #. type: Plain text
12541 #: build/C/man5/nsswitch.conf.5:282
12542 msgid "Exclude the specified I<user> from the NIS passwd map."
12543 msgstr ""
12544
12545 #. type: TP
12546 #: build/C/man5/nsswitch.conf.5:282
12547 #, no-wrap
12548 msgid "B<-@>I<netgroup>"
12549 msgstr ""
12550
12551 #. type: Plain text
12552 #: build/C/man5/nsswitch.conf.5:286
12553 msgid "Exclude all users in the given I<netgroup>."
12554 msgstr ""
12555
12556 #. type: TP
12557 #: build/C/man5/nsswitch.conf.5:286
12558 #, no-wrap
12559 msgid "B<+>"
12560 msgstr ""
12561
12562 #. type: Plain text
12563 #: build/C/man5/nsswitch.conf.5:290
12564 msgid ""
12565 "Include every user, except previously excluded ones, from the NIS passwd "
12566 "map."
12567 msgstr ""
12568
12569 #. type: Plain text
12570 #: build/C/man5/nsswitch.conf.5:298
12571 msgid ""
12572 "By default the source is \"nis\", but this may be overridden by specifying "
12573 "\"nisplus\" as the source for the pseudo-databases B<passwd_compat>, "
12574 "B<group_compat>, and B<shadow_compat>."
12575 msgstr ""
12576
12577 #. type: Plain text
12578 #: build/C/man5/nsswitch.conf.5:305
12579 msgid ""
12580 "A service named I<SERVICE> is implemented by a shared object library named "
12581 "I<libnss_SERVICE.so.>B<X> that resides in I</lib>."
12582 msgstr ""
12583
12584 #. type: Plain text
12585 #: build/C/man5/nsswitch.conf.5:310
12586 msgid "NSS configuration file."
12587 msgstr ""
12588
12589 #. type: TP
12590 #: build/C/man5/nsswitch.conf.5:310
12591 #, no-wrap
12592 msgid "I</lib/libnss_compat.so.>B<X>"
12593 msgstr ""
12594
12595 #. type: Plain text
12596 #: build/C/man5/nsswitch.conf.5:313
12597 msgid "implements \"compat\" source."
12598 msgstr ""
12599
12600 #. type: TP
12601 #: build/C/man5/nsswitch.conf.5:313
12602 #, no-wrap
12603 msgid "I</lib/libnss_db.so.>B<X>"
12604 msgstr ""
12605
12606 #. type: Plain text
12607 #: build/C/man5/nsswitch.conf.5:316
12608 msgid "implements \"db\" source."
12609 msgstr ""
12610
12611 #. type: TP
12612 #: build/C/man5/nsswitch.conf.5:316
12613 #, no-wrap
12614 msgid "I</lib/libnss_dns.so.>B<X>"
12615 msgstr ""
12616
12617 #. type: Plain text
12618 #: build/C/man5/nsswitch.conf.5:319
12619 msgid "implements \"dns\" source."
12620 msgstr ""
12621
12622 #. type: TP
12623 #: build/C/man5/nsswitch.conf.5:319
12624 #, no-wrap
12625 msgid "I</lib/libnss_files.so.>B<X>"
12626 msgstr ""
12627
12628 #. type: Plain text
12629 #: build/C/man5/nsswitch.conf.5:322
12630 msgid "implements \"files\" source."
12631 msgstr ""
12632
12633 #. type: TP
12634 #: build/C/man5/nsswitch.conf.5:322
12635 #, no-wrap
12636 msgid "I</lib/libnss_hesiod.so.>B<X>"
12637 msgstr ""
12638
12639 #. type: Plain text
12640 #: build/C/man5/nsswitch.conf.5:325
12641 msgid "implements \"hesiod\" source."
12642 msgstr ""
12643
12644 #. type: TP
12645 #: build/C/man5/nsswitch.conf.5:325
12646 #, no-wrap
12647 msgid "I</lib/libnss_nis.so.>B<X>"
12648 msgstr ""
12649
12650 #. type: Plain text
12651 #: build/C/man5/nsswitch.conf.5:328
12652 msgid "implements \"nis\" source."
12653 msgstr ""
12654
12655 #. type: TP
12656 #: build/C/man5/nsswitch.conf.5:328
12657 #, no-wrap
12658 msgid "I</lib/libnss_nisplus.so.>B<X>"
12659 msgstr ""
12660
12661 #. type: Plain text
12662 #: build/C/man5/nsswitch.conf.5:331
12663 msgid "implements \"nisplus\" source."
12664 msgstr ""
12665
12666 #. type: Plain text
12667 #: build/C/man5/nsswitch.conf.5:339
12668 msgid ""
12669 "Within each process that uses B<nsswitch.conf>, the entire file is read only "
12670 "once.  If the file is later changed, the process will continue using the old "
12671 "configuration."
12672 msgstr ""
12673
12674 #. type: Plain text
12675 #: build/C/man5/nsswitch.conf.5:352
12676 msgid ""
12677 "Traditionally, there was only a single source for service information, often "
12678 "in the form of a single configuration file (e.g., I</etc/passwd>).  However, "
12679 "as other name services, such as the Network Information Service (NIS) and "
12680 "the Domain Name Service (DNS), became popular, a method was needed that "
12681 "would be more flexible than fixed search orders coded into the C library.  "
12682 "The Name Service Switch mechanism, which was based on the mechanism used by "
12683 "Sun Microsystems in the Solaris 2 C library, introduced a cleaner solution "
12684 "to the problem."
12685 msgstr ""
12686
12687 #. type: Plain text
12688 #: build/C/man5/nsswitch.conf.5:354
12689 msgid "B<getent>(1), B<nss>(5)"
12690 msgstr ""
12691
12692 #. type: TH
12693 #: build/C/man7/packet.7:12
12694 #, no-wrap
12695 msgid "PACKET"
12696 msgstr ""
12697
12698 #. type: Plain text
12699 #: build/C/man7/packet.7:15
12700 msgid "packet - packet interface on device level"
12701 msgstr ""
12702
12703 #. type: Plain text
12704 #: build/C/man7/packet.7:18
12705 #, no-wrap
12706 msgid "B<#include E<lt>sys/socket.hE<gt>>\n"
12707 msgstr ""
12708
12709 #. type: Plain text
12710 #: build/C/man7/packet.7:20
12711 #, no-wrap
12712 msgid "B<#include E<lt>linux/if_packet.hE<gt>>\n"
12713 msgstr ""
12714
12715 #. type: Plain text
12716 #: build/C/man7/packet.7:22
12717 #, no-wrap
12718 msgid "B<#include E<lt>net/ethernet.hE<gt> /* the L2 protocols */>\n"
12719 msgstr ""
12720
12721 #. type: Plain text
12722 #: build/C/man7/packet.7:24
12723 #, no-wrap
12724 msgid ""
12725 "B<packet_socket = socket(AF_PACKET, int >I<socket_type>B<, int "
12726 ">I<protocol>B<);>\n"
12727 msgstr ""
12728
12729 #. type: Plain text
12730 #: build/C/man7/packet.7:30
12731 msgid ""
12732 "Packet sockets are used to receive or send raw packets at the device driver "
12733 "(OSI Layer 2) level.  They allow the user to implement protocol modules in "
12734 "user space on top of the physical layer."
12735 msgstr ""
12736
12737 #. type: Plain text
12738 #: build/C/man7/packet.7:51
12739 msgid ""
12740 "The I<socket_type> is either B<SOCK_RAW> for raw packets including the "
12741 "link-level header or B<SOCK_DGRAM> for cooked packets with the link-level "
12742 "header removed.  The link-level header information is available in a common "
12743 "format in a I<sockaddr_ll>.  I<protocol> is the IEEE 802.3 protocol number "
12744 "in network byte order.  See the I<E<lt>linux/if_ether.hE<gt>> include file "
12745 "for a list of allowed protocols.  When protocol is set to "
12746 "B<htons(ETH_P_ALL)> then all protocols are received.  All incoming packets "
12747 "of that protocol type will be passed to the packet socket before they are "
12748 "passed to the protocols implemented in the kernel."
12749 msgstr ""
12750
12751 #. type: Plain text
12752 #: build/C/man7/packet.7:55
12753 msgid ""
12754 "Only processes with effective UID 0 or the B<CAP_NET_RAW> capability may "
12755 "open packet sockets."
12756 msgstr ""
12757
12758 #. type: Plain text
12759 #: build/C/man7/packet.7:73
12760 msgid ""
12761 "B<SOCK_RAW> packets are passed to and from the device driver without any "
12762 "changes in the packet data.  When receiving a packet, the address is still "
12763 "parsed and passed in a standard I<sockaddr_ll> address structure.  When "
12764 "transmitting a packet, the user supplied buffer should contain the physical "
12765 "layer header.  That packet is then queued unmodified to the network driver "
12766 "of the interface defined by the destination address.  Some device drivers "
12767 "always add other headers.  B<SOCK_RAW> is similar to but not compatible with "
12768 "the obsolete B<AF_INET/SOCK_PACKET> of Linux 2.0."
12769 msgstr ""
12770
12771 #. type: Plain text
12772 #: build/C/man7/packet.7:83
12773 msgid ""
12774 "B<SOCK_DGRAM> operates on a slightly higher level.  The physical header is "
12775 "removed before the packet is passed to the user.  Packets sent through a "
12776 "B<SOCK_DGRAM> packet socket get a suitable physical layer header based on "
12777 "the information in the I<sockaddr_ll> destination address before they are "
12778 "queued."
12779 msgstr ""
12780
12781 #. type: Plain text
12782 #: build/C/man7/packet.7:96
12783 msgid ""
12784 "By default all packets of the specified protocol type are passed to a packet "
12785 "socket.  To get packets only from a specific interface use B<bind>(2)  "
12786 "specifying an address in a I<struct sockaddr_ll> to bind the packet socket "
12787 "to an interface.  Only the I<sll_protocol> and the I<sll_ifindex> address "
12788 "fields are used for purposes of binding."
12789 msgstr ""
12790
12791 #. type: Plain text
12792 #: build/C/man7/packet.7:100
12793 msgid "The B<connect>(2)  operation is not supported on packet sockets."
12794 msgstr ""
12795
12796 #. type: Plain text
12797 #: build/C/man7/packet.7:109
12798 msgid ""
12799 "When the B<MSG_TRUNC> flag is passed to B<recvmsg>(2), B<recv>(2), "
12800 "B<recvfrom>(2)  the real length of the packet on the wire is always "
12801 "returned, even when it is longer than the buffer."
12802 msgstr ""
12803
12804 #. type: SS
12805 #: build/C/man7/packet.7:109
12806 #, no-wrap
12807 msgid "Address types"
12808 msgstr ""
12809
12810 #. type: Plain text
12811 #: build/C/man7/packet.7:113
12812 msgid "The I<sockaddr_ll> is a device independent physical layer address."
12813 msgstr ""
12814
12815 #. type: Plain text
12816 #: build/C/man7/packet.7:125
12817 #, no-wrap
12818 msgid ""
12819 "struct sockaddr_ll {\n"
12820 "    unsigned short sll_family;   /* Always AF_PACKET */\n"
12821 "    unsigned short sll_protocol; /* Physical layer protocol */\n"
12822 "    int            sll_ifindex;  /* Interface number */\n"
12823 "    unsigned short sll_hatype;   /* ARP hardware type */\n"
12824 "    unsigned char  sll_pkttype;  /* Packet type */\n"
12825 "    unsigned char  sll_halen;    /* Length of address */\n"
12826 "    unsigned char  sll_addr[8];  /* Physical layer address */\n"
12827 "};\n"
12828 msgstr ""
12829
12830 #. type: Plain text
12831 #: build/C/man7/packet.7:164
12832 msgid ""
12833 "I<sll_protocol> is the standard ethernet protocol type in network byte order "
12834 "as defined in the I<E<lt>linux/if_ether.hE<gt>> include file.  It defaults "
12835 "to the socket's protocol.  I<sll_ifindex> is the interface index of the "
12836 "interface (see B<netdevice>(7)); 0 matches any interface (only permitted for "
12837 "binding).  I<sll_hatype> is an ARP type as defined in the "
12838 "I<E<lt>linux/if_arp.hE<gt>> include file.  I<sll_pkttype> contains the "
12839 "packet type.  Valid types are B<PACKET_HOST> for a packet addressed to the "
12840 "local host, B<PACKET_BROADCAST> for a physical layer broadcast packet, "
12841 "B<PACKET_MULTICAST> for a packet sent to a physical layer multicast address, "
12842 "B<PACKET_OTHERHOST> for a packet to some other host that has been caught by "
12843 "a device driver in promiscuous mode, and B<PACKET_OUTGOING> for a packet "
12844 "originated from the local host that is looped back to a packet socket.  "
12845 "These types make sense only for receiving.  I<sll_addr> and I<sll_halen> "
12846 "contain the physical layer (e.g., IEEE 802.3) address and its length.  The "
12847 "exact interpretation depends on the device."
12848 msgstr ""
12849
12850 #. type: Plain text
12851 #: build/C/man7/packet.7:180
12852 msgid ""
12853 "When you send packets it is enough to specify I<sll_family>, I<sll_addr>, "
12854 "I<sll_halen>, I<sll_ifindex>.  The other fields should be 0.  I<sll_hatype> "
12855 "and I<sll_pkttype> are set on received packets for your information.  For "
12856 "bind only I<sll_protocol> and I<sll_ifindex> are used."
12857 msgstr ""
12858
12859 #. type: Plain text
12860 #: build/C/man7/packet.7:185
12861 msgid ""
12862 "Packet socket options are configured by calling B<setsockopt>(2)  with level "
12863 "B<SOL_PACKET>."
12864 msgstr ""
12865
12866 #. type: TP
12867 #: build/C/man7/packet.7:185
12868 #, no-wrap
12869 msgid "B<PACKET_ADD_MEMBERSHIP>"
12870 msgstr ""
12871
12872 #. type: TP
12873 #: build/C/man7/packet.7:188
12874 #, no-wrap
12875 msgid "B<PACKET_DROP_MEMBERSHIP>"
12876 msgstr ""
12877
12878 #. type: Plain text
12879 #: build/C/man7/packet.7:200
12880 msgid ""
12881 "Packet sockets can be used to configure physical layer multicasting and "
12882 "promiscuous mode.  B<PACKET_ADD_MEMBERSHIP> adds a binding and "
12883 "B<PACKET_DROP_MEMBERSHIP> drops it.  They both expect a I<packet_mreq> "
12884 "structure as argument:"
12885 msgstr ""
12886
12887 #. type: Plain text
12888 #: build/C/man7/packet.7:209
12889 #, no-wrap
12890 msgid ""
12891 "struct packet_mreq {\n"
12892 "    int            mr_ifindex;    /* interface index */\n"
12893 "    unsigned short mr_type;       /* action */\n"
12894 "    unsigned short mr_alen;       /* address length */\n"
12895 "    unsigned char  mr_address[8]; /* physical layer address */\n"
12896 "};\n"
12897 msgstr ""
12898
12899 #. type: Plain text
12900 #: build/C/man7/packet.7:230
12901 msgid ""
12902 "B<mr_ifindex> contains the interface index for the interface whose status "
12903 "should be changed.  The B<mr_type> parameter specifies which action to "
12904 "perform.  B<PACKET_MR_PROMISC> enables receiving all packets on a shared "
12905 "medium (often known as \"promiscuous mode\"), B<PACKET_MR_MULTICAST> binds "
12906 "the socket to the physical layer multicast group specified in B<mr_address> "
12907 "and B<mr_alen>, and B<PACKET_MR_ALLMULTI> sets the socket up to receive all "
12908 "multicast packets arriving at the interface."
12909 msgstr ""
12910
12911 #. type: Plain text
12912 #: build/C/man7/packet.7:236
12913 msgid ""
12914 "In addition, the traditional ioctls B<SIOCSIFFLAGS>, B<SIOCADDMULTI>, "
12915 "B<SIOCDELMULTI> can be used for the same purpose."
12916 msgstr ""
12917
12918 #. type: TP
12919 #: build/C/man7/packet.7:236
12920 #, no-wrap
12921 msgid "B<PACKET_AUXDATA> (since Linux 2.6.21)"
12922 msgstr ""
12923
12924 #.  commit 8dc4194474159660d7f37c495e3fc3f10d0db8cc
12925 #. type: Plain text
12926 #: build/C/man7/packet.7:246
12927 msgid ""
12928 "If this binary option is enabled, the packet socket passes a metadata "
12929 "structure along with each packet in the B<recvmsg>(2)  control field.  The "
12930 "structure can be read with B<cmsg>(3).  It is defined as"
12931 msgstr ""
12932
12933 #. type: Plain text
12934 #: build/C/man7/packet.7:258
12935 #, no-wrap
12936 msgid ""
12937 "struct tpacket_auxdata {\n"
12938 "    __u32 tp_status;\n"
12939 "    __u32 tp_len;      /* packet length */\n"
12940 "    __u32 tp_snaplen;  /* captured length */\n"
12941 "    __u16 tp_mac;\n"
12942 "    __u16 tp_net;\n"
12943 "    __u16 tp_vlan_tci;\n"
12944 "    __u16 tp_padding;\n"
12945 "};\n"
12946 msgstr ""
12947
12948 #. type: TP
12949 #: build/C/man7/packet.7:260
12950 #, no-wrap
12951 msgid "B<PACKET_FANOUT> (since Linux 3.1)"
12952 msgstr ""
12953
12954 #.  commit dc99f600698dcac69b8f56dda9a8a00d645c5ffc
12955 #. type: Plain text
12956 #: build/C/man7/packet.7:282
12957 msgid ""
12958 "To scale processing across threads, packet sockets can form a fanout group.  "
12959 "In this mode, each matching packet is enqueued onto only one socket in the "
12960 "group.  A socket joins a fanout group by calling B<setsockopt>(2)  with "
12961 "level B<SOL_PACKET> and option B<PACKET_FANOUT>.  Each network namespace can "
12962 "have up to 65536 independent groups.  A socket selects a group by encoding "
12963 "the ID in the first 16 bits of the integer option value.  The first packet "
12964 "socket to join a group implicitly creates it.  To successfully join an "
12965 "existing group, subsequent packet sockets must have the same protocol, "
12966 "device settings, fanout mode and flags (see below).  Packet sockets can "
12967 "leave a fanout group only by closing the socket.  The group is deleted when "
12968 "the last socket is closed."
12969 msgstr ""
12970
12971 #.  commit 2d36097d26b5991d71a2cf4a20c1a158f0f1bfcd
12972 #. type: Plain text
12973 #: build/C/man7/packet.7:305
12974 msgid ""
12975 "Fanout supports multiple algorithms to spread traffic between sockets.  The "
12976 "default mode, B<PACKET_FANOUT_HASH>, sends packets from the same flow to the "
12977 "same socket to maintain per-flow ordering.  For each packet, it chooses a "
12978 "socket by taking the packet flow hash modulo the number of sockets in the "
12979 "group, where a flow hash is a hash over network-layer address and optional "
12980 "transport-layer port fields.  The load-balance mode B<PACKET_FANOUT_LB> "
12981 "implements a round-robin algorithm.  B<PACKET_FANOUT_CPU> selects the socket "
12982 "based on the CPU that the packet arrived on.  B<PACKET_FANOUT_ROLLOVER> "
12983 "processes all data on a single socket, moves to the next when one becomes "
12984 "backlogged.  B<PACKET_FANOUT_RND> selects the socket using a pseudo-random "
12985 "number generator.  B<PACKET_FANOUT_QM> (available since Linux 3.14)  selects "
12986 "the socket using the recorded queue_mapping of the received skb."
12987 msgstr ""
12988
12989 #. type: Plain text
12990 #: build/C/man7/packet.7:320
12991 msgid ""
12992 "Fanout modes can take additional options.  IP fragmentation causes packets "
12993 "from the same flow to have different flow hashes.  The flag "
12994 "B<PACKET_FANOUT_FLAG_DEFRAG>, if set, causes packet to be defragmented "
12995 "before fanout is applied, to preserve order even in this case.  Fanout mode "
12996 "and options are communicated in the second 16 bits of the integer option "
12997 "value.  The flag B<PACKET_FANOUT_FLAG_ROLLOVER> enables the roll over "
12998 "mechanism as a backup strategy: if the original fanout algorithm selects a "
12999 "backlogged socket, the packet rolls over to the next available one."
13000 msgstr ""
13001
13002 #. type: TP
13003 #: build/C/man7/packet.7:320
13004 #, no-wrap
13005 msgid "B<PACKET_LOSS> (with B<PACKET_TX_RING>)"
13006 msgstr ""
13007
13008 #. type: Plain text
13009 #: build/C/man7/packet.7:343
13010 msgid ""
13011 "When a malformed packet is encountered on a transmit ring, the default is to "
13012 "reset its I<tp_status> to B<TP_STATUS_WRONG_FORMAT> and abort the "
13013 "transmission immediately.  The malformed packet blocks itself and "
13014 "subsequently enqueued packets from being sent.  The format error must be "
13015 "fixed, the associated I<tp_status> reset to B<TP_STATUS_SEND_REQUEST>, and "
13016 "the transmission process restarted via B<send>(2).  However, if "
13017 "B<PACKET_LOSS> is set, any malformed packet will be skipped, its "
13018 "I<tp_status> reset to B<TP_STATUS_AVAILABLE>, and the transmission process "
13019 "continued."
13020 msgstr ""
13021
13022 #. type: TP
13023 #: build/C/man7/packet.7:343
13024 #, no-wrap
13025 msgid "B<PACKET_RESERVE> (with B<PACKET_RX_RING>)"
13026 msgstr ""
13027
13028 #. type: Plain text
13029 #: build/C/man7/packet.7:348
13030 msgid ""
13031 "By default, a packet receive ring writes packets immediately following the "
13032 "metadata structure and alignment padding.  This integer option reserves "
13033 "additional headroom."
13034 msgstr ""
13035
13036 #. type: TP
13037 #: build/C/man7/packet.7:348
13038 #, no-wrap
13039 msgid "B<PACKET_RX_RING>"
13040 msgstr ""
13041
13042 #. type: Plain text
13043 #: build/C/man7/packet.7:394
13044 msgid ""
13045 "Create a memory-mapped ring buffer for asynchronous packet reception.  The "
13046 "packet socket reserves a contiguous region of application address space, "
13047 "lays it out into an array of packet slots and copies packets (up to "
13048 "I<tp_snaplen>)  into subsequent slots.  Each packet is preceded by a "
13049 "metadata structure similar to I<tpacket_auxdata>.  The protocol fields "
13050 "encode the offset to the data from the start of the metadata header.  "
13051 "I<tp_net> stores the offset to the network layer.  If the packet socket is "
13052 "of type B<SOCK_DGRAM>, then I<tp_mac> is the same.  If it is of type "
13053 "B<SOCK_RAW>, then that field stores the offset to the link-layer frame.  "
13054 "Packet socket and application communicate the head and tail of the ring "
13055 "through the I<tp_status> field.  The packet socket owns all slots with "
13056 "I<tp_status> equal to B<TP_STATUS_KERNEL>.  After filling a slot, it changes "
13057 "the status of the slot to transfer ownership to the application.  During "
13058 "normal operation, the new I<tp_status> value has at least the "
13059 "B<TP_STATUS_USER> bit set to signal that a received packet has been stored.  "
13060 "When the application has finished processing a packet, it transfers "
13061 "ownership of the slot back to the socket by setting I<tp_status> equal to "
13062 "B<TP_STATUS_KERNEL>.  Packet sockets implement multiple variants of the "
13063 "packet ring.  The implementation details are described in "
13064 "I<Documentation/networking/packet_mmap.txt> in the Linux kernel source tree."
13065 msgstr ""
13066
13067 #. type: TP
13068 #: build/C/man7/packet.7:394
13069 #, no-wrap
13070 msgid "B<PACKET_STATISTICS>"
13071 msgstr ""
13072
13073 #. type: Plain text
13074 #: build/C/man7/packet.7:397
13075 msgid "Retrieve packet socket statistics in the form of a structure"
13076 msgstr ""
13077
13078 #. type: Plain text
13079 #: build/C/man7/packet.7:404
13080 #, no-wrap
13081 msgid ""
13082 "struct tpacket_stats {\n"
13083 "    unsigned int tp_packets;  /* Total packet count */\n"
13084 "    unsigned int tp_drops;    /* Dropped packet count */\n"
13085 "};\n"
13086 msgstr ""
13087
13088 #. type: Plain text
13089 #: build/C/man7/packet.7:410
13090 msgid ""
13091 "Receiving statistics resets the internal counters.  The statistics structure "
13092 "differs when using a ring of variant B<TPACKET_V3>."
13093 msgstr ""
13094
13095 #. type: TP
13096 #: build/C/man7/packet.7:410
13097 #, no-wrap
13098 msgid "B<PACKET_TIMESTAMP> (with B<PACKET_RX_RING>; since Linux 2.6.36)"
13099 msgstr ""
13100
13101 #.  commit 614f60fa9d73a9e8fdff3df83381907fea7c5649
13102 #. type: Plain text
13103 #: build/C/man7/packet.7:420
13104 msgid ""
13105 "The packet receive ring always stores a timestamp in the metadata header.  "
13106 "By default, this is a software generated timestamp generated when the packet "
13107 "is copied into the ring.  This integer option selects the type of "
13108 "timestamp.  Besides the default, it support the two hardware formats "
13109 "described in I<Documentation/networking/timestamping.txt> in the Linux "
13110 "kernel source tree."
13111 msgstr ""
13112
13113 #. type: TP
13114 #: build/C/man7/packet.7:420
13115 #, no-wrap
13116 msgid "B<PACKET_TX_RING> (since Linux 2.6.31)"
13117 msgstr ""
13118
13119 #.  commit 69e3c75f4d541a6eb151b3ef91f34033cb3ad6e1
13120 #. type: Plain text
13121 #: build/C/man7/packet.7:455
13122 msgid ""
13123 "Create a memory-mapped ring buffer for packet transmission.  This option is "
13124 "similar to B<PACKET_RX_RING> and takes the same arguments.  The application "
13125 "writes packets into slots with I<tp_status> equal to B<TP_STATUS_AVAILABLE> "
13126 "and schedules them for transmission by changing I<tp_status> to "
13127 "B<TP_STATUS_SEND_REQUEST>.  When packets are ready to be transmitted, the "
13128 "application calls B<send>(2)  or a variant thereof.  The I<buf> and I<len> "
13129 "fields of this call are ignored.  If an address is passed using B<sendto>(2)  "
13130 "or B<sendmsg>(2), then that overrides the socket default.  On successful "
13131 "transmission, the socket resets I<tp_status> to B<TP_STATUS_AVAILABLE>.  It "
13132 "immediately aborts the transmission on error unless B<PACKET_LOSS> is set."
13133 msgstr ""
13134
13135 #. type: TP
13136 #: build/C/man7/packet.7:455
13137 #, no-wrap
13138 msgid "B<PACKET_VERSION> (with B<PACKET_RX_RING>; since Linux 2.6.27)"
13139 msgstr ""
13140
13141 #.  commit bbd6ef87c544d88c30e4b762b1b61ef267a7d279
13142 #. type: Plain text
13143 #: build/C/man7/packet.7:464
13144 msgid ""
13145 "By default, B<PACKET_RX_RING> creates a packet receive ring of variant "
13146 "B<TPACKET_V1>.  To create another variant, configure the desired variant by "
13147 "setting this integer option before creating the ring."
13148 msgstr ""
13149
13150 #. type: TP
13151 #: build/C/man7/packet.7:464
13152 #, no-wrap
13153 msgid "B<PACKET_QDISC_BYPASS> (since Linux 3.14)"
13154 msgstr ""
13155
13156 #.  commit d346a3fae3ff1d99f5d0c819bf86edf9094a26a1
13157 #. type: Plain text
13158 #: build/C/man7/packet.7:479
13159 msgid ""
13160 "By default, packets sent through packet sockets pass through the kernel's "
13161 "qdisc (traffic control) layer, which is fine for the vast majority of use "
13162 "cases.  For traffic generator appliances using packet sockets that intend to "
13163 "brute-force flood the network\\(emfor example, to test devices under load in "
13164 "a similar fashion to pktgen\\(emthis layer can be bypassed by setting this "
13165 "integer option to 1.  A side effect is that packet buffering in the qdisc "
13166 "layer is avoided, which will lead to increased drops when network device "
13167 "transmit queues are busy; therefore, use at your own risk."
13168 msgstr ""
13169
13170 #.  FIXME Document SIOCGSTAMPNS
13171 #. type: Plain text
13172 #: build/C/man7/packet.7:486
13173 msgid ""
13174 "B<SIOCGSTAMP> can be used to receive the timestamp of the last received "
13175 "packet.  Argument is a I<struct timeval> variable."
13176 msgstr ""
13177
13178 #. type: Plain text
13179 #: build/C/man7/packet.7:492
13180 msgid ""
13181 "In addition, all standard ioctls defined in B<netdevice>(7)  and "
13182 "B<socket>(7)  are valid on packet sockets."
13183 msgstr ""
13184
13185 #. type: SS
13186 #: build/C/man7/packet.7:492 build/C/man7/raw.7:131 build/C/man7/tcp.7:1210 build/C/man7/udp.7:103
13187 #, no-wrap
13188 msgid "Error handling"
13189 msgstr ""
13190
13191 #. type: Plain text
13192 #: build/C/man7/packet.7:496
13193 msgid ""
13194 "Packet sockets do no error handling other than errors occurred while passing "
13195 "the packet to the device driver.  They don't have the concept of a pending "
13196 "error."
13197 msgstr ""
13198
13199 #. type: Plain text
13200 #: build/C/man7/packet.7:500
13201 msgid "Unknown multicast group address passed."
13202 msgstr ""
13203
13204 #. type: Plain text
13205 #: build/C/man7/packet.7:503
13206 msgid "User passed invalid memory address."
13207 msgstr ""
13208
13209 #. type: Plain text
13210 #: build/C/man7/packet.7:506 build/C/man7/raw.7:155
13211 msgid "Invalid argument."
13212 msgstr ""
13213
13214 #. type: Plain text
13215 #: build/C/man7/packet.7:509
13216 msgid "Packet is bigger than interface MTU."
13217 msgstr ""
13218
13219 #. type: TP
13220 #: build/C/man7/packet.7:509
13221 #, no-wrap
13222 msgid "B<ENETDOWN>"
13223 msgstr ""
13224
13225 #. type: Plain text
13226 #: build/C/man7/packet.7:512
13227 msgid "Interface is not up."
13228 msgstr ""
13229
13230 #. type: Plain text
13231 #: build/C/man7/packet.7:515
13232 msgid "Not enough memory to allocate the packet."
13233 msgstr ""
13234
13235 #. type: Plain text
13236 #: build/C/man7/packet.7:518
13237 msgid "Unknown device name or interface index specified in interface address."
13238 msgstr ""
13239
13240 #. type: Plain text
13241 #: build/C/man7/packet.7:521
13242 msgid "No packet received."
13243 msgstr ""
13244
13245 #. type: Plain text
13246 #: build/C/man7/packet.7:524
13247 msgid "No interface address passed."
13248 msgstr ""
13249
13250 #. type: TP
13251 #: build/C/man7/packet.7:524
13252 #, no-wrap
13253 msgid "B<ENXIO>"
13254 msgstr ""
13255
13256 #. type: Plain text
13257 #: build/C/man7/packet.7:527
13258 msgid "Interface address contained an invalid interface index."
13259 msgstr ""
13260
13261 #. type: Plain text
13262 #: build/C/man7/packet.7:530
13263 msgid "User has insufficient privileges to carry out this operation."
13264 msgstr ""
13265
13266 #. type: Plain text
13267 #: build/C/man7/packet.7:532
13268 msgid "In addition, other errors may be generated by the low-level driver."
13269 msgstr ""
13270
13271 #. type: Plain text
13272 #: build/C/man7/packet.7:537
13273 msgid ""
13274 "B<AF_PACKET> is a new feature in Linux 2.2.  Earlier Linux versions "
13275 "supported only B<SOCK_PACKET>."
13276 msgstr ""
13277
13278 #. type: Plain text
13279 #: build/C/man7/packet.7:546
13280 msgid ""
13281 "For portable programs it is suggested to use B<AF_PACKET> via B<pcap>(3); "
13282 "although this covers only a subset of the B<AF_PACKET> features."
13283 msgstr ""
13284
13285 #. type: Plain text
13286 #: build/C/man7/packet.7:567
13287 msgid ""
13288 "The B<SOCK_DGRAM> packet sockets make no attempt to create or parse the IEEE "
13289 "802.2 LLC header for a IEEE 802.3 frame.  When B<ETH_P_802_3> is specified "
13290 "as protocol for sending the kernel creates the 802.3 frame and fills out the "
13291 "length field; the user has to supply the LLC header to get a fully "
13292 "conforming packet.  Incoming 802.3 packets are not multiplexed on the "
13293 "DSAP/SSAP protocol fields; instead they are supplied to the user as protocol "
13294 "B<ETH_P_802_2> with the LLC header prefixed.  It is thus not possible to "
13295 "bind to B<ETH_P_802_3>; bind to B<ETH_P_802_2> instead and do the protocol "
13296 "multiplex yourself.  The default for sending is the standard Ethernet DIX "
13297 "encapsulation with the protocol filled in."
13298 msgstr ""
13299
13300 #. type: Plain text
13301 #: build/C/man7/packet.7:569
13302 msgid "Packet sockets are not subject to the input or output firewall chains."
13303 msgstr ""
13304
13305 #. type: Plain text
13306 #: build/C/man7/packet.7:579
13307 msgid ""
13308 "In Linux 2.0, the only way to get a packet socket was by calling "
13309 "B<socket(AF_INET, SOCK_PACKET, >I<protocol>B<)>.  This is still supported "
13310 "but strongly deprecated.  The main difference between the two methods is "
13311 "that B<SOCK_PACKET> uses the old I<struct sockaddr_pkt> to specify an "
13312 "interface, which doesn't provide physical layer independence."
13313 msgstr ""
13314
13315 #. type: Plain text
13316 #: build/C/man7/packet.7:587
13317 #, no-wrap
13318 msgid ""
13319 "struct sockaddr_pkt {\n"
13320 "    unsigned short spkt_family;\n"
13321 "    unsigned char  spkt_device[14];\n"
13322 "    unsigned short spkt_protocol;\n"
13323 "};\n"
13324 msgstr ""
13325
13326 #. type: Plain text
13327 #: build/C/man7/packet.7:599
13328 msgid ""
13329 "I<spkt_family> contains the device type, I<spkt_protocol> is the IEEE 802.3 "
13330 "protocol type as defined in I<E<lt>sys/if_ether.hE<gt>> and I<spkt_device> "
13331 "is the device name as a null-terminated string, for example, eth0."
13332 msgstr ""
13333
13334 #. type: Plain text
13335 #: build/C/man7/packet.7:601
13336 msgid "This structure is obsolete and should not be used in new code."
13337 msgstr ""
13338
13339 #. type: Plain text
13340 #: build/C/man7/packet.7:605
13341 msgid ""
13342 "glibc 2.1 does not have a define for B<SOL_PACKET>.  The suggested "
13343 "workaround is to use:"
13344 msgstr ""
13345
13346 #. type: Plain text
13347 #: build/C/man7/packet.7:611
13348 #, no-wrap
13349 msgid ""
13350 "#ifndef SOL_PACKET\n"
13351 "#define SOL_PACKET 263\n"
13352 "#endif\n"
13353 msgstr ""
13354
13355 #. type: Plain text
13356 #: build/C/man7/packet.7:615
13357 msgid "This is fixed in later glibc versions."
13358 msgstr ""
13359
13360 #. type: Plain text
13361 #: build/C/man7/packet.7:617
13362 msgid "The IEEE 802.2/803.3 LLC handling could be considered as a bug."
13363 msgstr ""
13364
13365 #. type: Plain text
13366 #: build/C/man7/packet.7:619
13367 msgid "Socket filters are not documented."
13368 msgstr ""
13369
13370 #.  .SH CREDITS
13371 #.  This man page was written by Andi Kleen with help from Matthew Wilcox.
13372 #.  AF_PACKET in Linux 2.2 was implemented
13373 #.  by Alexey Kuznetsov, based on code by Alan Cox and others.
13374 #. type: Plain text
13375 #: build/C/man7/packet.7:631
13376 msgid ""
13377 "The B<MSG_TRUNC> B<recvmsg>(2)  extension is an ugly hack and should be "
13378 "replaced by a control message.  There is currently no way to get the "
13379 "original destination address of packets via B<SOCK_DGRAM>."
13380 msgstr ""
13381
13382 #. type: Plain text
13383 #: build/C/man7/packet.7:638
13384 msgid ""
13385 "B<socket>(2), B<pcap>(3), B<capabilities>(7), B<ip>(7), B<raw>(7), "
13386 "B<socket>(7)"
13387 msgstr ""
13388
13389 #. type: Plain text
13390 #: build/C/man7/packet.7:641
13391 msgid ""
13392 "RFC\\ 894 for the standard IP Ethernet encapsulation.  RFC\\ 1700 for the "
13393 "IEEE 802.3 IP encapsulation."
13394 msgstr ""
13395
13396 #. type: Plain text
13397 #: build/C/man7/packet.7:645
13398 msgid "The I<E<lt>linux/if_ether.hE<gt>> include file for physical layer protocols."
13399 msgstr ""
13400
13401 #. type: Plain text
13402 #: build/C/man7/packet.7:653
13403 msgid ""
13404 "The Linux kernel source tree.  I</Documentation/networking/filter.txt> "
13405 "describes how to apply Berkeley Packet Filters to packet sockets.  "
13406 "I</tools/testing/selftests/net/psock_tpacket.c> contains example source code "
13407 "for all available versions of B<PACKET_RX_RING> and B<PACKET_TX_RING>."
13408 msgstr ""
13409
13410 #. type: TH
13411 #: build/C/man5/protocols.5:29
13412 #, no-wrap
13413 msgid "PROTOCOLS"
13414 msgstr ""
13415
13416 #. type: TH
13417 #: build/C/man5/protocols.5:29 build/C/man7/x25.7:12
13418 #, no-wrap
13419 msgid "2012-08-05"
13420 msgstr ""
13421
13422 #. type: Plain text
13423 #: build/C/man5/protocols.5:32
13424 msgid "protocols - protocols definition file"
13425 msgstr ""
13426
13427 #. type: Plain text
13428 #: build/C/man5/protocols.5:40
13429 msgid ""
13430 "This file is a plain ASCII file, describing the various DARPA internet "
13431 "protocols that are available from the TCP/IP subsystem.  It should be "
13432 "consulted instead of using the numbers in the ARPA include files, or, even "
13433 "worse, just guessing them.  These numbers will occur in the protocol field "
13434 "of any IP header."
13435 msgstr ""
13436
13437 #.  .. by the DDN Network Information Center.
13438 #. type: Plain text
13439 #: build/C/man5/protocols.5:46
13440 msgid ""
13441 "Keep this file untouched since changes would result in incorrect IP "
13442 "packages.  Protocol numbers and names are specified by the IANA (Internet "
13443 "Assigned Numbers Authority)."
13444 msgstr ""
13445
13446 #. type: Plain text
13447 #: build/C/man5/protocols.5:48
13448 msgid "Each line is of the following format:"
13449 msgstr ""
13450
13451 #. type: Plain text
13452 #: build/C/man5/protocols.5:51
13453 msgid "I<protocol number aliases ...>"
13454 msgstr ""
13455
13456 #. type: Plain text
13457 #: build/C/man5/protocols.5:57
13458 msgid ""
13459 "where the fields are delimited by spaces or tabs.  Empty lines are ignored.  "
13460 "If a line contains a hash mark (#), the hash mark and the part of the line "
13461 "following it are ignored."
13462 msgstr ""
13463
13464 #. type: TP
13465 #: build/C/man5/protocols.5:59 build/C/man5/services.5:109
13466 #, no-wrap
13467 msgid "I<protocol>"
13468 msgstr ""
13469
13470 #. type: Plain text
13471 #: build/C/man5/protocols.5:67
13472 msgid "the native name for the protocol.  For example I<ip>, I<tcp>, or I<udp>."
13473 msgstr ""
13474
13475 #. type: Plain text
13476 #: build/C/man5/protocols.5:71
13477 msgid ""
13478 "the official number for this protocol as it will appear within the IP "
13479 "header."
13480 msgstr ""
13481
13482 #. type: Plain text
13483 #: build/C/man5/protocols.5:74
13484 msgid "optional aliases for the protocol."
13485 msgstr ""
13486
13487 #.  The following is not true as at glibc 2.8 (a line with a comma is
13488 #.  ignored by getservent()); it's not clear if/when it was ever true.
13489 #.    As a backward compatibility feature, the slash (/) between the
13490 #.    .I port
13491 #.    number and
13492 #.    .I protocol
13493 #.    name can in fact be either a slash or a comma (,).
13494 #.    Use of the comma in
13495 #.    modern installations is deprecated.
13496 #. type: Plain text
13497 #: build/C/man5/protocols.5:77 build/C/man5/services.5:165
13498 msgid ""
13499 "This file might be distributed over a network using a network-wide naming "
13500 "service like Yellow Pages/NIS or BIND/Hesiod."
13501 msgstr ""
13502
13503 #. type: Plain text
13504 #: build/C/man5/protocols.5:81
13505 msgid "The protocols definition file."
13506 msgstr ""
13507
13508 #. type: Plain text
13509 #: build/C/man5/protocols.5:83
13510 msgid "B<getprotoent>(3)"
13511 msgstr ""
13512
13513 #. type: Plain text
13514 #: build/C/man5/protocols.5:85
13515 msgid "E<.UR http://www.iana.org\\:/assignments\\:/protocol-numbers> E<.UE>"
13516 msgstr ""
13517
13518 #. type: TH
13519 #: build/C/man7/raw.7:13
13520 #, no-wrap
13521 msgid "RAW"
13522 msgstr ""
13523
13524 #. type: Plain text
13525 #: build/C/man7/raw.7:16
13526 msgid "raw - Linux IPv4 raw sockets"
13527 msgstr ""
13528
13529 #. type: Plain text
13530 #: build/C/man7/raw.7:22
13531 msgid "B<raw_socket = socket(AF_INET, SOCK_RAW, int >I<protocol>B<);>"
13532 msgstr ""
13533
13534 #. type: Plain text
13535 #: build/C/man7/raw.7:26
13536 msgid ""
13537 "Raw sockets allow new IPv4 protocols to be implemented in user space.  A raw "
13538 "socket receives or sends the raw datagram not including link level headers."
13539 msgstr ""
13540
13541 #. type: Plain text
13542 #: build/C/man7/raw.7:32
13543 msgid ""
13544 "The IPv4 layer generates an IP header when sending a packet unless the "
13545 "B<IP_HDRINCL> socket option is enabled on the socket.  When it is enabled, "
13546 "the packet must contain an IP header.  For receiving the IP header is always "
13547 "included in the packet."
13548 msgstr ""
13549
13550 #. type: Plain text
13551 #: build/C/man7/raw.7:36
13552 msgid ""
13553 "Only processes with an effective user ID of 0 or the B<CAP_NET_RAW> "
13554 "capability are allowed to open raw sockets."
13555 msgstr ""
13556
13557 #. type: Plain text
13558 #: build/C/man7/raw.7:43
13559 msgid ""
13560 "All packets or errors matching the I<protocol> number specified for the raw "
13561 "socket are passed to this socket.  For a list of the allowed protocols see "
13562 "RFC\\ 1700 assigned numbers and B<getprotobyname>(3)."
13563 msgstr ""
13564
13565 #. type: Plain text
13566 #: build/C/man7/raw.7:53
13567 msgid ""
13568 "A protocol of B<IPPROTO_RAW> implies enabled B<IP_HDRINCL> and is able to "
13569 "send any IP protocol that is specified in the passed header.  Receiving of "
13570 "all IP protocols via B<IPPROTO_RAW> is not possible using raw sockets."
13571 msgstr ""
13572
13573 #. type: tbl table
13574 #: build/C/man7/raw.7:58
13575 #, no-wrap
13576 msgid "IP Header fields modified on sending by B<IP_HDRINCL>\n"
13577 msgstr ""
13578
13579 #. type: tbl table
13580 #: build/C/man7/raw.7:59
13581 #, no-wrap
13582 msgid "IP Checksum:Always filled in.\n"
13583 msgstr ""
13584
13585 #. type: tbl table
13586 #: build/C/man7/raw.7:60
13587 #, no-wrap
13588 msgid "Source Address:Filled in when zero.\n"
13589 msgstr ""
13590
13591 #. type: tbl table
13592 #: build/C/man7/raw.7:61
13593 #, no-wrap
13594 msgid "Packet Id:Filled in when zero.\n"
13595 msgstr ""
13596
13597 #. type: tbl table
13598 #: build/C/man7/raw.7:62
13599 #, no-wrap
13600 msgid "Total Length:Always filled in.\n"
13601 msgstr ""
13602
13603 #. type: Plain text
13604 #: build/C/man7/raw.7:76
13605 msgid ""
13606 "If B<IP_HDRINCL> is specified and the IP header has a nonzero destination "
13607 "address, then the destination address of the socket is used to route the "
13608 "packet.  When B<MSG_DONTROUTE> is specified, the destination address should "
13609 "refer to a local interface, otherwise a routing table lookup is done anyway "
13610 "but gatewayed routes are ignored."
13611 msgstr ""
13612
13613 #. type: Plain text
13614 #: build/C/man7/raw.7:84
13615 msgid ""
13616 "If B<IP_HDRINCL> isn't set, then IP header options can be set on raw sockets "
13617 "with B<setsockopt>(2); see B<ip>(7)  for more information."
13618 msgstr ""
13619
13620 #. type: Plain text
13621 #: build/C/man7/raw.7:89
13622 msgid ""
13623 "In Linux 2.2, all IP header fields and options can be set using IP socket "
13624 "options.  This means raw sockets are usually needed only for new protocols "
13625 "or protocols with no user interface (like ICMP)."
13626 msgstr ""
13627
13628 #. type: Plain text
13629 #: build/C/man7/raw.7:93
13630 msgid ""
13631 "When a packet is received, it is passed to any raw sockets which have been "
13632 "bound to its protocol before it is passed to other protocol handlers (e.g., "
13633 "kernel protocol modules)."
13634 msgstr ""
13635
13636 #. type: Plain text
13637 #: build/C/man7/raw.7:109
13638 msgid ""
13639 "Raw sockets use the standard I<sockaddr_in> address structure defined in "
13640 "B<ip>(7).  The I<sin_port> field could be used to specify the IP protocol "
13641 "number, but it is ignored for sending in Linux 2.2 and should be always set "
13642 "to 0 (see BUGS).  For incoming packets, I<sin_port> is set to the protocol "
13643 "of the packet.  See the I<E<lt>netinet/in.hE<gt>> include file for valid IP "
13644 "protocols."
13645 msgstr ""
13646
13647 #.  Or SOL_RAW on Linux
13648 #. type: Plain text
13649 #: build/C/man7/raw.7:118
13650 msgid ""
13651 "Raw socket options can be set with B<setsockopt>(2)  and read with "
13652 "B<getsockopt>(2)  by passing the B<IPPROTO_RAW> family flag."
13653 msgstr ""
13654
13655 #. type: TP
13656 #: build/C/man7/raw.7:118
13657 #, no-wrap
13658 msgid "B<ICMP_FILTER>"
13659 msgstr ""
13660
13661 #. type: Plain text
13662 #: build/C/man7/raw.7:126
13663 msgid ""
13664 "Enable a special filter for raw sockets bound to the B<IPPROTO_ICMP> "
13665 "protocol.  The value has a bit set for each ICMP message type which should "
13666 "be filtered out.  The default is to filter no ICMP messages."
13667 msgstr ""
13668
13669 #. type: Plain text
13670 #: build/C/man7/raw.7:131
13671 msgid ""
13672 "In addition, all B<ip>(7)  B<IPPROTO_IP> socket options valid for datagram "
13673 "sockets are supported."
13674 msgstr ""
13675
13676 #. type: Plain text
13677 #: build/C/man7/raw.7:144
13678 msgid ""
13679 "Errors originating from the network are passed to the user only when the "
13680 "socket is connected or the B<IP_RECVERR> flag is enabled.  For connected "
13681 "sockets, only B<EMSGSIZE> and B<EPROTO> are passed for compatibility.  With "
13682 "B<IP_RECVERR>, all network errors are saved in the error queue."
13683 msgstr ""
13684
13685 #. type: Plain text
13686 #: build/C/man7/raw.7:149
13687 msgid ""
13688 "User tried to send to a broadcast address without having the broadcast flag "
13689 "set on the socket."
13690 msgstr ""
13691
13692 #. type: Plain text
13693 #: build/C/man7/raw.7:152
13694 msgid "An invalid memory address was supplied."
13695 msgstr ""
13696
13697 #. type: Plain text
13698 #: build/C/man7/raw.7:162
13699 msgid ""
13700 "Packet too big.  Either Path MTU Discovery is enabled (the "
13701 "B<IP_MTU_DISCOVER> socket flag) or the packet size exceeds the maximum "
13702 "allowed IPv4 packet size of 64KB."
13703 msgstr ""
13704
13705 #. type: TP
13706 #: build/C/man7/raw.7:162 build/C/man7/unix.7:447
13707 #, no-wrap
13708 msgid "B<EOPNOTSUPP>"
13709 msgstr ""
13710
13711 #. type: Plain text
13712 #: build/C/man7/raw.7:166
13713 msgid "Invalid flag has been passed to a socket call (like B<MSG_OOB>)."
13714 msgstr ""
13715
13716 #. type: Plain text
13717 #: build/C/man7/raw.7:172
13718 msgid ""
13719 "The user doesn't have permission to open raw sockets.  Only processes with "
13720 "an effective user ID of 0 or the B<CAP_NET_RAW> attribute may do that."
13721 msgstr ""
13722
13723 #. type: TP
13724 #: build/C/man7/raw.7:172
13725 #, no-wrap
13726 msgid "B<EPROTO>"
13727 msgstr ""
13728
13729 #. type: Plain text
13730 #: build/C/man7/raw.7:175
13731 msgid "An ICMP error has arrived reporting a parameter problem."
13732 msgstr ""
13733
13734 #. type: Plain text
13735 #: build/C/man7/raw.7:181
13736 msgid ""
13737 "B<IP_RECVERR> and B<ICMP_FILTER> are new in Linux 2.2.  They are Linux "
13738 "extensions and should not be used in portable programs."
13739 msgstr ""
13740
13741 #. type: Plain text
13742 #: build/C/man7/raw.7:187
13743 msgid ""
13744 "Linux 2.0 enabled some bug-to-bug compatibility with BSD in the raw socket "
13745 "code when the B<SO_BSDCOMPAT> socket option was set \\(em since Linux 2.2, "
13746 "this option no longer has that effect."
13747 msgstr ""
13748
13749 #. type: Plain text
13750 #: build/C/man7/raw.7:205
13751 msgid ""
13752 "By default, raw sockets do path MTU (Maximum Transmission Unit) discovery.  "
13753 "This means the kernel will keep track of the MTU to a specific target IP "
13754 "address and return B<EMSGSIZE> when a raw packet write exceeds it.  When "
13755 "this happens, the application should decrease the packet size.  Path MTU "
13756 "discovery can be also turned off using the B<IP_MTU_DISCOVER> socket option "
13757 "or the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file, see B<ip>(7)  for "
13758 "details.  When turned off, raw sockets will fragment outgoing packets that "
13759 "exceed the interface MTU.  However, disabling it is not recommended for "
13760 "performance and reliability reasons."
13761 msgstr ""
13762
13763 #. type: Plain text
13764 #: build/C/man7/raw.7:214
13765 msgid ""
13766 "A raw socket can be bound to a specific local address using the B<bind>(2)  "
13767 "call.  If it isn't bound, all packets with the specified IP protocol are "
13768 "received.  In addition, a RAW socket can be bound to a specific network "
13769 "device using B<SO_BINDTODEVICE>; see B<socket>(7)."
13770 msgstr ""
13771
13772 #. type: Plain text
13773 #: build/C/man7/raw.7:225
13774 msgid ""
13775 "An B<IPPROTO_RAW> socket is send only.  If you really want to receive all IP "
13776 "packets, use a B<packet>(7)  socket with the B<ETH_P_IP> protocol.  Note "
13777 "that packet sockets don't reassemble IP fragments, unlike raw sockets."
13778 msgstr ""
13779
13780 #. type: Plain text
13781 #: build/C/man7/raw.7:231
13782 msgid ""
13783 "If you want to receive all ICMP packets for a datagram socket, it is often "
13784 "better to use B<IP_RECVERR> on that particular socket; see B<ip>(7)."
13785 msgstr ""
13786
13787 #. type: Plain text
13788 #: build/C/man7/raw.7:238
13789 msgid ""
13790 "Raw sockets may tap all IP protocols in Linux, even protocols like ICMP or "
13791 "TCP which have a protocol module in the kernel.  In this case, the packets "
13792 "are passed to both the kernel module and the raw socket(s).  This should not "
13793 "be relied upon in portable programs, many other BSD socket implementation "
13794 "have limitations here."
13795 msgstr ""
13796
13797 #. type: Plain text
13798 #: build/C/man7/raw.7:243
13799 msgid ""
13800 "Linux never changes headers passed from the user (except for filling in some "
13801 "zeroed fields as described for B<IP_HDRINCL>).  This differs from many other "
13802 "implementations of raw sockets."
13803 msgstr ""
13804
13805 #. type: Plain text
13806 #: build/C/man7/raw.7:246
13807 msgid ""
13808 "RAW sockets are generally rather unportable and should be avoided in "
13809 "programs intended to be portable."
13810 msgstr ""
13811
13812 #. type: Plain text
13813 #: build/C/man7/raw.7:252
13814 msgid ""
13815 "Sending on raw sockets should take the IP protocol from I<sin_port>; this "
13816 "ability was lost in Linux 2.2.  The workaround is to use B<IP_HDRINCL>."
13817 msgstr ""
13818
13819 #. type: Plain text
13820 #: build/C/man7/raw.7:254
13821 msgid "Transparent proxy extensions are not described."
13822 msgstr ""
13823
13824 #. type: Plain text
13825 #: build/C/man7/raw.7:259
13826 msgid ""
13827 "When the B<IP_HDRINCL> option is set, datagrams will not be fragmented and "
13828 "are limited to the interface MTU."
13829 msgstr ""
13830
13831 #.  .SH AUTHORS
13832 #.  This man page was written by Andi Kleen.
13833 #. type: Plain text
13834 #: build/C/man7/raw.7:269
13835 msgid ""
13836 "Setting the IP protocol for sending in I<sin_port> got lost in Linux 2.2.  "
13837 "The protocol that the socket was bound to or that was specified in the "
13838 "initial B<socket>(2)  call is always used."
13839 msgstr ""
13840
13841 #. type: Plain text
13842 #: build/C/man7/raw.7:275
13843 msgid "B<recvmsg>(2), B<sendmsg>(2), B<capabilities>(7), B<ip>(7), B<socket>(7)"
13844 msgstr ""
13845
13846 #. type: Plain text
13847 #: build/C/man7/raw.7:281
13848 msgid ""
13849 "B<RFC\\ 1191> for path MTU discovery.  B<RFC\\ 791> and the "
13850 "I<E<lt>linux/ip.hE<gt>> header file for the IP protocol."
13851 msgstr ""
13852
13853 #. type: TH
13854 #: build/C/man3/rcmd.3:43
13855 #, no-wrap
13856 msgid "RCMD"
13857 msgstr ""
13858
13859 #. type: Plain text
13860 #: build/C/man3/rcmd.3:48
13861 msgid ""
13862 "rcmd, rresvport, iruserok, ruserok, rcmd_af, rresvport_af, iruserok_af, "
13863 "ruserok_af - routines for returning a stream to a remote command"
13864 msgstr ""
13865
13866 #. type: Plain text
13867 #: build/C/man3/rcmd.3:51
13868 #, no-wrap
13869 msgid ""
13870 "B<#include E<lt>netdb.hE<gt> \\ \\ >/* Or E<lt>unistd.hE<gt> on some systems "
13871 "*/\n"
13872 msgstr ""
13873
13874 #. type: Plain text
13875 #: build/C/man3/rcmd.3:54
13876 #, no-wrap
13877 msgid ""
13878 "B<int rcmd(char **>I<ahost>B<, unsigned short >I<inport>B<, const char "
13879 "*>I<locuser>B<, >\n"
13880 "B<         const char *>I<remuser>B<, const char *>I<cmd>B<, int "
13881 "*>I<fd2p>B<);>\n"
13882 msgstr ""
13883
13884 #. type: Plain text
13885 #: build/C/man3/rcmd.3:56
13886 #, no-wrap
13887 msgid "B<int rresvport(int *>I<port>B<);>\n"
13888 msgstr ""
13889
13890 #. type: Plain text
13891 #: build/C/man3/rcmd.3:59
13892 #, no-wrap
13893 msgid ""
13894 "B<int iruserok(uint32_t >I<raddr>B<, int >I<superuser>B<, >\n"
13895 "B<             const char *>I<ruser>B<, const char *>I<luser>B<);>\n"
13896 msgstr ""
13897
13898 #. type: Plain text
13899 #: build/C/man3/rcmd.3:62
13900 #, no-wrap
13901 msgid ""
13902 "B<int ruserok(const char *>I<rhost>B<, int >I<superuser>B<, >\n"
13903 "B<            const char *>I<ruser>B<, const char *>I<luser>B<);>\n"
13904 msgstr ""
13905
13906 #. type: Plain text
13907 #: build/C/man3/rcmd.3:66
13908 #, no-wrap
13909 msgid ""
13910 "B<int rcmd_af(char **>I<ahost>B<, unsigned short >I<inport>B<, const char "
13911 "*>I<locuser>B<, >\n"
13912 "B<            const char *>I<remuser>B<, const char *>I<cmd>B<, int "
13913 "*>I<fd2p>B<,>\n"
13914 "B<            sa_family_t >I<af>B<);>\n"
13915 msgstr ""
13916
13917 #. type: Plain text
13918 #: build/C/man3/rcmd.3:68
13919 #, no-wrap
13920 msgid "B<int rresvport_af(int *>I<port>B<, sa_family_t >I<af>B<);>\n"
13921 msgstr ""
13922
13923 #. type: Plain text
13924 #: build/C/man3/rcmd.3:72
13925 #, no-wrap
13926 msgid ""
13927 "B<int iruserok_af(const void *>I<raddr>B<, int >I<superuser>B<, >\n"
13928 "B<                const char *>I<ruser>B<, const char *>I<luser>B<, "
13929 "sa_family_t >I<af>B<);>\n"
13930 msgstr ""
13931
13932 #. type: Plain text
13933 #: build/C/man3/rcmd.3:76
13934 #, no-wrap
13935 msgid ""
13936 "B<int ruserok_af(const char *>I<rhost>B<, int >I<superuser>B<, >\n"
13937 "B<               const char *>I<ruser>B<, const char *>I<luser>B<, "
13938 "sa_family_t >I<af>B<);>\n"
13939 msgstr ""
13940
13941 #. type: Plain text
13942 #: build/C/man3/rcmd.3:92
13943 msgid ""
13944 "B<rcmd>(), B<rcmd_af>(), B<rresvport>(), B<rresvport_af>(), B<iruserok>(), "
13945 "B<iruserok_af>(), B<ruserok>(), B<ruserok_af>(): _BSD_SOURCE"
13946 msgstr ""
13947
13948 #. type: Plain text
13949 #: build/C/man3/rcmd.3:113
13950 msgid ""
13951 "The B<rcmd>()  function is used by the superuser to execute a command on a "
13952 "remote machine using an authentication scheme based on privileged port "
13953 "numbers.  The B<rresvport>()  function returns a descriptor to a socket with "
13954 "an address in the privileged port space.  The B<iruserok>()  and "
13955 "B<ruserok>()  functions are used by servers to authenticate clients "
13956 "requesting service with B<rcmd>().  All four functions are used by the "
13957 "B<rshd>(8)  server (among others)."
13958 msgstr ""
13959
13960 #. type: SS
13961 #: build/C/man3/rcmd.3:113
13962 #, no-wrap
13963 msgid "rcmd()"
13964 msgstr ""
13965
13966 #. type: Plain text
13967 #: build/C/man3/rcmd.3:129
13968 msgid ""
13969 "The B<rcmd>()  function looks up the host I<*ahost> using "
13970 "B<gethostbyname>(3), returning -1 if the host does not exist.  Otherwise, "
13971 "I<*ahost> is set to the standard name of the host and a connection is "
13972 "established to a server residing at the well-known Internet port I<inport>."
13973 msgstr ""
13974
13975 #. type: Plain text
13976 #: build/C/man3/rcmd.3:158
13977 msgid ""
13978 "If the connection succeeds, a socket in the Internet domain of type "
13979 "B<SOCK_STREAM> is returned to the caller, and given to the remote command as "
13980 "I<stdin> and I<stdout>.  If I<fd2p> is nonzero, then an auxiliary channel to "
13981 "a control process will be set up, and a descriptor for it will be placed in "
13982 "I<*fd2p>.  The control process will return diagnostic output from the "
13983 "command (unit 2) on this channel, and will also accept bytes on this channel "
13984 "as being UNIX signal numbers, to be forwarded to the process group of the "
13985 "command.  If I<fd2p> is 0, then the I<stderr> (unit 2 of the remote command) "
13986 "will be made the same as the I<stdout> and no provision is made for sending "
13987 "arbitrary signals to the remote process, although you may be able to get its "
13988 "attention by using out-of-band data."
13989 msgstr ""
13990
13991 #. type: Plain text
13992 #: build/C/man3/rcmd.3:161
13993 msgid "The protocol is described in detail in B<rshd>(8)."
13994 msgstr ""
13995
13996 #. type: SS
13997 #: build/C/man3/rcmd.3:161
13998 #, no-wrap
13999 msgid "rresvport()"
14000 msgstr ""
14001
14002 #. type: Plain text
14003 #: build/C/man3/rcmd.3:183
14004 msgid ""
14005 "The B<rresvport>()  function is used to obtain a socket with a privileged "
14006 "port bound to it.  This socket is suitable for use by B<rcmd>()  and several "
14007 "other functions.  Privileged ports are those in the range 0 to 1023.  Only a "
14008 "privileged process (B<CAP_NET_BIND_SERVICE>)  is allowed to bind to a "
14009 "privileged port.  In the glibc implementation, this function restricts its "
14010 "search to the ports from 512 to 1023.  The I<port> argument is value-result: "
14011 "the value it supplies to the call is used as the starting point for a "
14012 "circular search of the port range; on (successful) return, it contains the "
14013 "port number that was bound to."
14014 msgstr ""
14015
14016 #. type: SS
14017 #: build/C/man3/rcmd.3:183
14018 #, no-wrap
14019 msgid "iruserok() and ruserok()"
14020 msgstr ""
14021
14022 #. type: Plain text
14023 #: build/C/man3/rcmd.3:201
14024 msgid ""
14025 "The B<iruserok>()  and B<ruserok>()  functions take a remote host's IP "
14026 "address or name, respectively, two usernames and a flag indicating whether "
14027 "the local user's name is that of the superuser.  Then, if the user is I<not> "
14028 "the superuser, it checks the I</etc/hosts.equiv> file.  If that lookup is "
14029 "not done, or is unsuccessful, the I<.rhosts> in the local user's home "
14030 "directory is checked to see if the request for service is allowed."
14031 msgstr ""
14032
14033 #. type: Plain text
14034 #: build/C/man3/rcmd.3:217
14035 msgid ""
14036 "If this file does not exist, is not a regular file, is owned by anyone other "
14037 "than the user or the superuser, or is writable by anyone other than the "
14038 "owner, the check automatically fails.  Zero is returned if the machine name "
14039 "is listed in the I<hosts.equiv> file, or the host and remote username are "
14040 "found in the I<.rhosts> file; otherwise B<iruserok>()  and B<ruserok>()  "
14041 "return -1.  If the local domain (as obtained from B<gethostname>(2))  is the "
14042 "same as the remote domain, only the machine name need be specified."
14043 msgstr ""
14044
14045 #. type: Plain text
14046 #: build/C/man3/rcmd.3:223
14047 msgid ""
14048 "If the IP address of the remote host is known, B<iruserok>()  should be used "
14049 "in preference to B<ruserok>(), as it does not require trusting the DNS "
14050 "server for the remote host's domain."
14051 msgstr ""
14052
14053 #. type: SS
14054 #: build/C/man3/rcmd.3:223
14055 #, no-wrap
14056 msgid "*_af() variants"
14057 msgstr ""
14058
14059 #. type: Plain text
14060 #: build/C/man3/rcmd.3:239
14061 msgid ""
14062 "All of the functions described above work with IPv4 (B<AF_INET>)  sockets.  "
14063 "The \"_af\" variants take an extra argument that allows the socket address "
14064 "family to be specified.  For these functions, the I<af> argument can be "
14065 "specified as B<AF_INET> or B<AF_INET6>.  In addition, B<rcmd_af>()  supports "
14066 "the use of B<AF_UNSPEC>."
14067 msgstr ""
14068
14069 #. type: Plain text
14070 #: build/C/man3/rcmd.3:245
14071 msgid ""
14072 "The B<rcmd>()  function returns a valid socket descriptor on success.  It "
14073 "returns -1 on error and prints a diagnostic message on the standard error."
14074 msgstr ""
14075
14076 #. type: Plain text
14077 #: build/C/man3/rcmd.3:256
14078 msgid ""
14079 "The B<rresvport>()  function returns a valid, bound socket descriptor on "
14080 "success.  It returns -1 on error with the global value I<errno> set "
14081 "according to the reason for failure.  The error code B<EAGAIN> is overloaded "
14082 "to mean \"All network ports in use.\""
14083 msgstr ""
14084
14085 #. type: Plain text
14086 #: build/C/man3/rcmd.3:262
14087 msgid ""
14088 "For information on the return from B<ruserok>()  and B<iruserok>(), see "
14089 "above."
14090 msgstr ""
14091
14092 #. type: Plain text
14093 #: build/C/man3/rcmd.3:270
14094 msgid ""
14095 "The functions B<iruserok_af>(), B<rcmd_af>(), B<rresvport_af>(), and "
14096 "B<ruserok_af>()  functions are provide in glibc since version 2.2."
14097 msgstr ""
14098
14099 #. type: Plain text
14100 #: build/C/man3/rcmd.3:278
14101 msgid ""
14102 "Not in POSIX.1-2001.  Present on the BSDs, Solaris, and many other systems.  "
14103 "These functions appeared in 4.2BSD.  The \"_af\" variants are more recent "
14104 "additions, and are not present on as wide a range of systems."
14105 msgstr ""
14106
14107 #.  Bug filed 25 Nov 2007:
14108 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=5399
14109 #. type: Plain text
14110 #: build/C/man3/rcmd.3:285
14111 msgid ""
14112 "B<iruserok>()  and B<iruserok_af>()  are declared in glibc headers only "
14113 "since version 2.12."
14114 msgstr ""
14115
14116 #. type: Plain text
14117 #: build/C/man3/rcmd.3:292
14118 msgid ""
14119 "B<rlogin>(1), B<rsh>(1), B<intro>(2), B<rexec>(3), B<rexecd>(8), "
14120 "B<rlogind>(8), B<rshd>(8)"
14121 msgstr ""
14122
14123 #. type: TH
14124 #: build/C/man5/resolv.conf.5:23
14125 #, no-wrap
14126 msgid "RESOLV.CONF"
14127 msgstr ""
14128
14129 #. type: Plain text
14130 #: build/C/man5/resolv.conf.5:27
14131 msgid "resolv.conf - resolver configuration file"
14132 msgstr ""
14133
14134 #. type: Plain text
14135 #: build/C/man5/resolv.conf.5:29
14136 msgid "B</etc/resolv.conf>"
14137 msgstr ""
14138
14139 #. type: Plain text
14140 #: build/C/man5/resolv.conf.5:41
14141 msgid ""
14142 "The I<resolver> is a set of routines in the C library that provide access to "
14143 "the Internet Domain Name System (DNS).  The resolver configuration file "
14144 "contains information that is read by the resolver routines the first time "
14145 "they are invoked by a process.  The file is designed to be human readable "
14146 "and contains a list of keywords with values that provide various types of "
14147 "resolver information.  The configuration file is considered a trusted source "
14148 "of DNS information (e.g., DNSSEC AD-bit information will be returned "
14149 "unmodified from this source)."
14150 msgstr ""
14151
14152 #. type: Plain text
14153 #: build/C/man5/resolv.conf.5:46
14154 msgid ""
14155 "If this file does not exist, only the name server on the local machine will "
14156 "be queried; the domain name is determined from the hostname and the domain "
14157 "search path is constructed from the domain name."
14158 msgstr ""
14159
14160 #. type: Plain text
14161 #: build/C/man5/resolv.conf.5:48
14162 msgid "The different configuration options are:"
14163 msgstr ""
14164
14165 #. type: TP
14166 #: build/C/man5/resolv.conf.5:48
14167 #, no-wrap
14168 msgid "B<nameserver> Name server IP address"
14169 msgstr ""
14170
14171 #. type: Plain text
14172 #: build/C/man5/resolv.conf.5:65
14173 msgid ""
14174 "Internet address of a name server that the resolver should query, either an "
14175 "IPv4 address (in dot notation), or an IPv6 address in colon (and possibly "
14176 "dot) notation as per RFC 2373.  Up to B<MAXNS> (currently 3, see "
14177 "I<E<lt>resolv.hE<gt>>) name servers may be listed, one per keyword.  If "
14178 "there are multiple servers, the resolver library queries them in the order "
14179 "listed.  If no B<nameserver> entries are present, the default is to use the "
14180 "name server on the local machine.  (The algorithm used is to try a name "
14181 "server, and if the query times out, try the next, until out of name servers, "
14182 "then repeat trying all the name servers until a maximum number of retries "
14183 "are made.)"
14184 msgstr ""
14185
14186 #. type: TP
14187 #: build/C/man5/resolv.conf.5:65
14188 #, no-wrap
14189 msgid "B<domain> Local domain name."
14190 msgstr ""
14191
14192 #. type: Plain text
14193 #: build/C/man5/resolv.conf.5:76
14194 msgid ""
14195 "Most queries for names within this domain can use short names relative to "
14196 "the local domain.  If set to \\(aq.\\(aq, the root domain is considered.  If "
14197 "no B<domain> entry is present, the domain is determined from the local "
14198 "hostname returned by B<gethostname>(2); the domain part is taken to be "
14199 "everything after the first \\(aq.\\(aq.  Finally, if the hostname does not "
14200 "contain a domain part, the root domain is assumed."
14201 msgstr ""
14202
14203 #. type: TP
14204 #: build/C/man5/resolv.conf.5:76
14205 #, no-wrap
14206 msgid "B<search> Search list for host-name lookup."
14207 msgstr ""
14208
14209 #.  When having a resolv.conv with a line
14210 #.   search subdomain.domain.tld domain.tld
14211 #.  and doing a hostlookup, for example by
14212 #.   ping host.anothersubdomain
14213 #.  it sends dns-requests for
14214 #.   host.anothersubdomain.
14215 #.   host.anothersubdomain.subdomain.domain.tld.
14216 #.   host.anothersubdomain.domain.tld.
14217 #.  thus not only causing unnecessary traffic for the root-dns-servers
14218 #.  but broadcasting information to the outside and making man-in-the-middle
14219 #.  attacks possible.
14220 #. type: Plain text
14221 #: build/C/man5/resolv.conf.5:106
14222 msgid ""
14223 "The search list is normally determined from the local domain name; by "
14224 "default, it contains only the local domain name.  This may be changed by "
14225 "listing the desired domain search path following the I<search> keyword with "
14226 "spaces or tabs separating the names.  Resolver queries having fewer than "
14227 "I<ndots> dots (default is 1) in them will be attempted using each component "
14228 "of the search path in turn until a match is found.  For environments with "
14229 "multiple subdomains please read B<options ndots:>I<n> below to avoid "
14230 "man-in-the-middle attacks and unnecessary traffic for the root-dns-servers.  "
14231 "Note that this process may be slow and will generate a lot of network "
14232 "traffic if the servers for the listed domains are not local, and that "
14233 "queries will time out if no server is available for one of the domains."
14234 msgstr ""
14235
14236 #. type: Plain text
14237 #: build/C/man5/resolv.conf.5:109
14238 msgid ""
14239 "The search list is currently limited to six domains with a total of 256 "
14240 "characters."
14241 msgstr ""
14242
14243 #. type: TP
14244 #: build/C/man5/resolv.conf.5:109
14245 #, no-wrap
14246 msgid "B<sortlist>"
14247 msgstr ""
14248
14249 #. type: Plain text
14250 #: build/C/man5/resolv.conf.5:122
14251 msgid ""
14252 "This option allows addresses returned by B<gethostbyname>(3)  to be sorted.  "
14253 "A sortlist is specified by IP-address-netmask pairs.  The netmask is "
14254 "optional and defaults to the natural netmask of the net.  The IP address and "
14255 "optional network pairs are separated by slashes.  Up to 10 pairs may be "
14256 "specified.  Here is an example:"
14257 msgstr ""
14258
14259 #. type: Plain text
14260 #: build/C/man5/resolv.conf.5:125
14261 msgid "sortlist 130.155.160.0/255.255.240.0 130.155.0.0"
14262 msgstr ""
14263
14264 #. type: TP
14265 #: build/C/man5/resolv.conf.5:127
14266 #, no-wrap
14267 msgid "B<options>"
14268 msgstr ""
14269
14270 #. type: Plain text
14271 #: build/C/man5/resolv.conf.5:131
14272 msgid ""
14273 "Options allows certain internal resolver variables to be modified.  The "
14274 "syntax is"
14275 msgstr ""
14276
14277 #. type: Plain text
14278 #: build/C/man5/resolv.conf.5:134
14279 msgid "B<options> I<option> I<...>"
14280 msgstr ""
14281
14282 #. type: Plain text
14283 #: build/C/man5/resolv.conf.5:136
14284 msgid "where I<option> is one of the following:"
14285 msgstr ""
14286
14287 #. type: TP
14288 #: build/C/man5/resolv.conf.5:136
14289 #, no-wrap
14290 msgid "B<debug>"
14291 msgstr ""
14292
14293 #.  Since glibc 2.2?
14294 #. type: Plain text
14295 #: build/C/man5/resolv.conf.5:145
14296 msgid ""
14297 "sets B<RES_DEBUG> in I<_res.options> (effective only if glibc was built with "
14298 "debug support; see B<resolver>(3))."
14299 msgstr ""
14300
14301 #. type: TP
14302 #: build/C/man5/resolv.conf.5:145
14303 #, no-wrap
14304 msgid "B<ndots:>I<n>"
14305 msgstr ""
14306
14307 #.  Since glibc 2.2
14308 #. type: Plain text
14309 #: build/C/man5/resolv.conf.5:159
14310 msgid ""
14311 "sets a threshold for the number of dots which must appear in a name given to "
14312 "B<res_query>(3)  (see B<resolver>(3))  before an I<initial absolute query> "
14313 "will be made.  The default for I<n> is 1, meaning that if there are any dots "
14314 "in a name, the name will be tried first as an absolute name before any "
14315 "I<search list> elements are appended to it.  The value for this option is "
14316 "silently capped to 15."
14317 msgstr ""
14318
14319 #. type: TP
14320 #: build/C/man5/resolv.conf.5:159
14321 #, no-wrap
14322 msgid "B<timeout:>I<n>"
14323 msgstr ""
14324
14325 #.  Since glibc 2.2
14326 #. type: Plain text
14327 #: build/C/man5/resolv.conf.5:170
14328 msgid ""
14329 "sets the amount of time the resolver will wait for a response from a remote "
14330 "name server before retrying the query via a different name server.  Measured "
14331 "in seconds, the default is B<RES_TIMEOUT> (currently 5, see "
14332 "I<E<lt>resolv.hE<gt>>).  The value for this option is silently capped to 30."
14333 msgstr ""
14334
14335 #. type: TP
14336 #: build/C/man5/resolv.conf.5:170
14337 #, no-wrap
14338 msgid "B<attempts:>I<n>"
14339 msgstr ""
14340
14341 #. type: Plain text
14342 #: build/C/man5/resolv.conf.5:179
14343 msgid ""
14344 "sets the number of times the resolver will send a query to its name servers "
14345 "before giving up and returning an error to the calling application.  The "
14346 "default is B<RES_DFLRETRY> (currently 2, see I<E<lt>resolv.hE<gt>>).  The "
14347 "value for this option is silently capped to 5."
14348 msgstr ""
14349
14350 #. type: TP
14351 #: build/C/man5/resolv.conf.5:179
14352 #, no-wrap
14353 msgid "B<rotate>"
14354 msgstr ""
14355
14356 #.  Since glibc 2.2
14357 #. type: Plain text
14358 #: build/C/man5/resolv.conf.5:189
14359 msgid ""
14360 "sets B<RES_ROTATE> in I<_res.options>, which causes round-robin selection of "
14361 "name servers from among those listed.  This has the effect of spreading the "
14362 "query load among all listed servers, rather than having all clients try the "
14363 "first listed server first every time."
14364 msgstr ""
14365
14366 #. type: TP
14367 #: build/C/man5/resolv.conf.5:189
14368 #, no-wrap
14369 msgid "B<no-check-names>"
14370 msgstr ""
14371
14372 #.  since glibc 2.2
14373 #. type: Plain text
14374 #: build/C/man5/resolv.conf.5:199
14375 msgid ""
14376 "sets B<RES_NOCHECKNAME> in I<_res.options>, which disables the modern BIND "
14377 "checking of incoming hostnames and mail names for invalid characters such as "
14378 "underscore (_), non-ASCII, or control characters."
14379 msgstr ""
14380
14381 #. type: TP
14382 #: build/C/man5/resolv.conf.5:199
14383 #, no-wrap
14384 msgid "B<inet6>"
14385 msgstr ""
14386
14387 #.  Since glibc 2.2
14388 #. type: Plain text
14389 #: build/C/man5/resolv.conf.5:210
14390 msgid ""
14391 "sets B<RES_USE_INET6> in I<_res.options>.  This has the effect of trying a "
14392 "AAAA query before an A query inside the B<gethostbyname>(3)  function, and "
14393 "of mapping IPv4 responses in IPv6 \"tunneled form\" if no AAAA records are "
14394 "found but an A record set exists."
14395 msgstr ""
14396
14397 #. type: TP
14398 #: build/C/man5/resolv.conf.5:210
14399 #, no-wrap
14400 msgid "B<ip6-bytestring> (since glibc 2.3.4)"
14401 msgstr ""
14402
14403 #. type: Plain text
14404 #: build/C/man5/resolv.conf.5:219
14405 msgid ""
14406 "sets B<RES_USE_BSTRING> in I<_res.options>.  This causes reverse IPv6 "
14407 "lookups to be made using the bit-label format described in RFC\\ 2673; if "
14408 "this option is not set, then nibble format is used."
14409 msgstr ""
14410
14411 #. type: TP
14412 #: build/C/man5/resolv.conf.5:219
14413 #, no-wrap
14414 msgid "B<ip6-dotint>/B<no-ip6-dotint> (since glibc 2.3.4)"
14415 msgstr ""
14416
14417 #. type: Plain text
14418 #: build/C/man5/resolv.conf.5:236
14419 msgid ""
14420 "Clear/set B<RES_NOIP6DOTINT> in I<_res.options>.  When this option is clear "
14421 "(B<ip6-dotint>), reverse IPv6 lookups are made in the (deprecated)  "
14422 "I<ip6.int> zone; when this option is set (B<no-ip6-dotint>), reverse IPv6 "
14423 "lookups are made in the I<ip6.arpa> zone by default.  This option is set by "
14424 "default."
14425 msgstr ""
14426
14427 #. type: TP
14428 #: build/C/man5/resolv.conf.5:236
14429 #, no-wrap
14430 msgid "B<edns0> (since glibc 2.6)"
14431 msgstr ""
14432
14433 #. type: Plain text
14434 #: build/C/man5/resolv.conf.5:243
14435 msgid ""
14436 "sets B<RES_USE_EDNSO> in I<_res.options>.  This enables support for the DNS "
14437 "extensions described in RFC\\ 2671."
14438 msgstr ""
14439
14440 #. type: TP
14441 #: build/C/man5/resolv.conf.5:243
14442 #, no-wrap
14443 msgid "B<single-request> (since glibc 2.10)"
14444 msgstr ""
14445
14446 #. type: Plain text
14447 #: build/C/man5/resolv.conf.5:256
14448 msgid ""
14449 "sets B<RES_SNGLKUP> in I<_res.options>.  By default, glibc performs IPv4 and "
14450 "IPv6 lookups in parallel since version 2.9.  Some appliance DNS servers "
14451 "cannot handle these queries properly and make the requests time out.  This "
14452 "option disables the behavior and makes glibc perform the IPv6 and IPv4 "
14453 "requests sequentially (at the cost of some slowdown of the resolving "
14454 "process)."
14455 msgstr ""
14456
14457 #. type: TP
14458 #: build/C/man5/resolv.conf.5:256
14459 #, no-wrap
14460 msgid "B<single-request-reopen> (since glibc 2.9)"
14461 msgstr ""
14462
14463 #. type: Plain text
14464 #: build/C/man5/resolv.conf.5:264
14465 msgid ""
14466 "The resolver uses the same socket for the A and AAAA requests.  Some "
14467 "hardware mistakenly sends back only one reply.  When that happens the client "
14468 "system will sit and wait for the second reply.  Turning this option on "
14469 "changes this behavior so that if two requests from the same port are not "
14470 "handled correctly it will close the socket and open a new one before sending "
14471 "the second request."
14472 msgstr ""
14473
14474 #. type: TP
14475 #: build/C/man5/resolv.conf.5:264
14476 #, no-wrap
14477 msgid "B<no-tld-query> (since glibc 2.14)"
14478 msgstr ""
14479
14480 #. type: Plain text
14481 #: build/C/man5/resolv.conf.5:275
14482 msgid ""
14483 "sets RES_NOTLDQUERY in I<_res.options>.  This option causes B<res_nsearch>()  "
14484 "to not attempt to resolve an unqualified name as if it were a top level "
14485 "domain (TLD).  This option can cause problems if the site has ``localhost'' "
14486 "as a TLD rather than having localhost on one or more elements of the search "
14487 "list.  This option has no effect if neither RES_DEFNAMES or RES_DNSRCH is "
14488 "set."
14489 msgstr ""
14490
14491 #. type: Plain text
14492 #: build/C/man5/resolv.conf.5:280
14493 msgid ""
14494 "The I<domain> and I<search> keywords are mutually exclusive.  If more than "
14495 "one instance of these keywords is present, the last instance wins."
14496 msgstr ""
14497
14498 #. type: Plain text
14499 #: build/C/man5/resolv.conf.5:285
14500 msgid ""
14501 "The I<search> keyword of a system's I<resolv.conf> file can be overridden on "
14502 "a per-process basis by setting the environment variable B<LOCALDOMAIN> to a "
14503 "space-separated list of search domains."
14504 msgstr ""
14505
14506 #. type: Plain text
14507 #: build/C/man5/resolv.conf.5:291
14508 msgid ""
14509 "The I<options> keyword of a system's I<resolv.conf> file can be amended on a "
14510 "per-process basis by setting the environment variable B<RES_OPTIONS> to a "
14511 "space-separated list of resolver options as explained above under "
14512 "B<options>."
14513 msgstr ""
14514
14515 #. type: Plain text
14516 #: build/C/man5/resolv.conf.5:295
14517 msgid ""
14518 "The keyword and value must appear on a single line, and the keyword (e.g., "
14519 "B<nameserver>) must start the line.  The value follows the keyword, "
14520 "separated by white space."
14521 msgstr ""
14522
14523 #. type: Plain text
14524 #: build/C/man5/resolv.conf.5:298
14525 msgid ""
14526 "Lines that contain a semicolon (;) or hash character (#)  in the first "
14527 "column are treated as comments."
14528 msgstr ""
14529
14530 #. type: Plain text
14531 #: build/C/man5/resolv.conf.5:301
14532 msgid "I</etc/resolv.conf>, I<E<lt>resolv.hE<gt>>"
14533 msgstr ""
14534
14535 #. type: Plain text
14536 #: build/C/man5/resolv.conf.5:306
14537 msgid "B<gethostbyname>(3), B<resolver>(3), B<hostname>(7), B<named>(8)"
14538 msgstr ""
14539
14540 #. type: Plain text
14541 #: build/C/man5/resolv.conf.5:307
14542 msgid "Name Server Operations Guide for BIND"
14543 msgstr ""
14544
14545 #. type: TH
14546 #: build/C/man3/resolver.3:32
14547 #, no-wrap
14548 msgid "RESOLVER"
14549 msgstr ""
14550
14551 #. type: Plain text
14552 #: build/C/man3/resolver.3:36
14553 msgid ""
14554 "res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, "
14555 "dn_comp, dn_expand - resolver routines"
14556 msgstr ""
14557
14558 #. type: Plain text
14559 #: build/C/man3/resolver.3:42
14560 #, no-wrap
14561 msgid ""
14562 "B<#include E<lt>netinet/in.hE<gt>>\n"
14563 "B<#include E<lt>arpa/nameser.hE<gt>>\n"
14564 "B<#include E<lt>resolv.hE<gt>>\n"
14565 "B<extern struct __res_state _res;>\n"
14566 msgstr ""
14567
14568 #. type: Plain text
14569 #: build/C/man3/resolver.3:44
14570 #, no-wrap
14571 msgid "B<int res_init(void);>\n"
14572 msgstr ""
14573
14574 #. type: Plain text
14575 #: build/C/man3/resolver.3:46
14576 #, no-wrap
14577 msgid "B<int res_query(const char *>I<dname>B<, int >I<class>B<, int >I<type>B<,>\n"
14578 msgstr ""
14579
14580 #. type: Plain text
14581 #: build/C/man3/resolver.3:48 build/C/man3/resolver.3:53 build/C/man3/resolver.3:70
14582 #, no-wrap
14583 msgid "B<unsigned char *>I<answer>B<, int >I<anslen>B<);>\n"
14584 msgstr ""
14585
14586 #. type: Plain text
14587 #: build/C/man3/resolver.3:51
14588 #, no-wrap
14589 msgid ""
14590 "B<int res_search(const char *>I<dname>B<, int >I<class>B<, int "
14591 ">I<type>B<,>\n"
14592 msgstr ""
14593
14594 #. type: Plain text
14595 #: build/C/man3/resolver.3:56
14596 #, no-wrap
14597 msgid "B<int res_querydomain(const char *>I<name>B<, const char *>I<domain>B<,>\n"
14598 msgstr ""
14599
14600 #. type: Plain text
14601 #: build/C/man3/resolver.3:59
14602 #, no-wrap
14603 msgid ""
14604 "B<int >I<class>B<, int >I<type>B<, unsigned char *>I<answer>B<,>\n"
14605 "B<int >I<anslen>B<);>\n"
14606 msgstr ""
14607
14608 #. type: Plain text
14609 #: build/C/man3/resolver.3:62
14610 #, no-wrap
14611 msgid "B<int res_mkquery(int >I<op>B<, const char *>I<dname>B<, int >I<class>B<,>\n"
14612 msgstr ""
14613
14614 #. type: Plain text
14615 #: build/C/man3/resolver.3:65
14616 #, no-wrap
14617 msgid ""
14618 "B<int >I<type>B<, const unsigned char *>I<data>B<, int >I<datalen>B<,>\n"
14619 "B<const unsigned char *>I<newrr>B<, unsigned char *>I<buf>B<, int "
14620 ">I<buflen>B<);>\n"
14621 msgstr ""
14622
14623 #. type: Plain text
14624 #: build/C/man3/resolver.3:68
14625 #, no-wrap
14626 msgid "B<int res_send(const unsigned char *>I<msg>B<, int >I<msglen>B<,>\n"
14627 msgstr ""
14628
14629 #. type: Plain text
14630 #: build/C/man3/resolver.3:73
14631 #, no-wrap
14632 msgid "B<int dn_comp(const char *>I<exp_dn>B<, unsigned char *>I<comp_dn>B<,>\n"
14633 msgstr ""
14634
14635 #. type: Plain text
14636 #: build/C/man3/resolver.3:75
14637 #, no-wrap
14638 msgid ""
14639 "B<int >I<length>B<, unsigned char **>I<dnptrs>B<, unsigned char "
14640 "**>I<lastdnptr>B<);>\n"
14641 msgstr ""
14642
14643 #. type: Plain text
14644 #: build/C/man3/resolver.3:78
14645 #, no-wrap
14646 msgid ""
14647 "B<int dn_expand(const unsigned char *>I<msg>B<, const unsigned char "
14648 "*>I<eomorig>B<,>\n"
14649 msgstr ""
14650
14651 #. type: Plain text
14652 #: build/C/man3/resolver.3:81
14653 #, no-wrap
14654 msgid ""
14655 "B<const unsigned char *>I<comp_dn>B<, char *>I<exp_dn>B<,>\n"
14656 "B<int >I<length>B<);>\n"
14657 msgstr ""
14658
14659 #. type: Plain text
14660 #: build/C/man3/resolver.3:88
14661 msgid ""
14662 "These functions make queries to and interpret the responses from Internet "
14663 "domain name servers."
14664 msgstr ""
14665
14666 #. type: Plain text
14667 #: build/C/man3/resolver.3:102
14668 msgid ""
14669 "The B<res_init>()  function reads the configuration files (see "
14670 "B<resolv.conf>(5))  to get the default domain name, search order and name "
14671 "server address(es).  If no server is given, the local host is tried.  If no "
14672 "domain is given, that associated with the local host is used.  It can be "
14673 "overridden with the environment variable B<LOCALDOMAIN>.  B<res_init>()  is "
14674 "normally executed by the first call to one of the other functions."
14675 msgstr ""
14676
14677 #. type: Plain text
14678 #: build/C/man3/resolver.3:110
14679 msgid ""
14680 "The B<res_query>()  function queries the name server for the fully qualified "
14681 "domain name I<name> of specified I<type> and I<class>.  The reply is left in "
14682 "the buffer I<answer> of length I<anslen> supplied by the caller."
14683 msgstr ""
14684
14685 #. type: Plain text
14686 #: build/C/man3/resolver.3:123
14687 msgid ""
14688 "The B<res_search>()  function makes a query and waits for the response like "
14689 "B<res_query>(), but in addition implements the default and search rules "
14690 "controlled by B<RES_DEFNAMES> and B<RES_DNSRCH> (see description of I<_res> "
14691 "options below)."
14692 msgstr ""
14693
14694 #. type: Plain text
14695 #: build/C/man3/resolver.3:129
14696 msgid ""
14697 "The B<res_querydomain>()  function makes a query using B<res_query>()  on "
14698 "the concatenation of I<name> and I<domain>."
14699 msgstr ""
14700
14701 #. type: Plain text
14702 #: build/C/man3/resolver.3:132
14703 msgid "The following functions are lower-level routines used by B<res_query>()."
14704 msgstr ""
14705
14706 #. type: Plain text
14707 #: build/C/man3/resolver.3:143
14708 msgid ""
14709 "The B<res_mkquery>()  function constructs a query message in I<buf> of "
14710 "length I<buflen> for the domain name I<dname>.  The query type I<op> is "
14711 "usually B<QUERY>, but can be any of the types defined in "
14712 "I<E<lt>arpa/nameser.hE<gt>>.  I<newrr> is currently unused."
14713 msgstr ""
14714
14715 #. type: Plain text
14716 #: build/C/man3/resolver.3:153
14717 msgid ""
14718 "The B<res_send>()  function sends a preformatted query given in I<msg> of "
14719 "length I<msglen> and returns the answer in I<answer> which is of length "
14720 "I<anslen>.  It will call B<res_init>(), if it has not already been called."
14721 msgstr ""
14722
14723 #. type: Plain text
14724 #: build/C/man3/resolver.3:166
14725 msgid ""
14726 "The B<dn_comp>()  function compresses the domain name I<exp_dn> and stores "
14727 "it in the buffer I<comp_dn> of length I<length>.  The compression uses an "
14728 "array of pointers I<dnptrs> to previously compressed names in the current "
14729 "message.  The first pointer points to the beginning of the message and the "
14730 "list ends with NULL.  The limit of the array is specified by I<lastdnptr>.  "
14731 "If I<dnptr> is NULL, domain names are not compressed.  If I<lastdnptr> is "
14732 "NULL, the list of labels is not updated."
14733 msgstr ""
14734
14735 #. type: Plain text
14736 #: build/C/man3/resolver.3:175
14737 msgid ""
14738 "The B<dn_expand>()  function expands the compressed domain name I<comp_dn> "
14739 "to a full domain name, which is placed in the buffer I<exp_dn> of size "
14740 "I<length>.  The compressed name is contained in a query or reply message, "
14741 "and I<msg> points to the beginning of the message."
14742 msgstr ""
14743
14744 #. type: Plain text
14745 #: build/C/man3/resolver.3:183
14746 msgid ""
14747 "The resolver routines use global configuration and state information "
14748 "contained in the structure I<_res>, which is defined in "
14749 "I<E<lt>resolv.hE<gt>>.  The only field that is normally manipulated by the "
14750 "user is I<_res.options>.  This field can contain the bitwise \"OR\" of the "
14751 "following options:"
14752 msgstr ""
14753
14754 #. type: TP
14755 #: build/C/man3/resolver.3:183
14756 #, no-wrap
14757 msgid "B<RES_INIT>"
14758 msgstr ""
14759
14760 #. type: Plain text
14761 #: build/C/man3/resolver.3:188
14762 msgid "True if B<res_init>()  has been called."
14763 msgstr ""
14764
14765 #. type: TP
14766 #: build/C/man3/resolver.3:188
14767 #, no-wrap
14768 msgid "B<RES_DEBUG>"
14769 msgstr ""
14770
14771 #.  See resolv/README.
14772 #.  Support for RES_DEBUG was made conditional in glibc 2.2.
14773 #. type: Plain text
14774 #: build/C/man3/resolver.3:195
14775 msgid ""
14776 "Print debugging messages.  This option is available only if glibc was built "
14777 "with debugging enabled, which is not the default."
14778 msgstr ""
14779
14780 #. type: TP
14781 #: build/C/man3/resolver.3:195
14782 #, no-wrap
14783 msgid "B<RES_AAONLY>"
14784 msgstr ""
14785
14786 #. type: Plain text
14787 #: build/C/man3/resolver.3:202
14788 msgid ""
14789 "Accept authoritative answers only.  B<res_send>()  continues until it finds "
14790 "an authoritative answer or returns an error.  [Not currently implemented]."
14791 msgstr ""
14792
14793 #. type: TP
14794 #: build/C/man3/resolver.3:202
14795 #, no-wrap
14796 msgid "B<RES_USEVC>"
14797 msgstr ""
14798
14799 #. type: Plain text
14800 #: build/C/man3/resolver.3:205
14801 msgid "Use TCP connections for queries rather than UDP datagrams."
14802 msgstr ""
14803
14804 #. type: TP
14805 #: build/C/man3/resolver.3:205
14806 #, no-wrap
14807 msgid "B<RES_PRIMARY>"
14808 msgstr ""
14809
14810 #. type: Plain text
14811 #: build/C/man3/resolver.3:208
14812 msgid "Query primary domain name server only."
14813 msgstr ""
14814
14815 #. type: TP
14816 #: build/C/man3/resolver.3:208
14817 #, no-wrap
14818 msgid "B<RES_IGNTC>"
14819 msgstr ""
14820
14821 #. type: Plain text
14822 #: build/C/man3/resolver.3:213
14823 msgid ""
14824 "Ignore truncation errors.  Don't retry with TCP.  [Not currently "
14825 "implemented]."
14826 msgstr ""
14827
14828 #. type: TP
14829 #: build/C/man3/resolver.3:213
14830 #, no-wrap
14831 msgid "B<RES_RECURSE>"
14832 msgstr ""
14833
14834 #. type: Plain text
14835 #: build/C/man3/resolver.3:220
14836 msgid ""
14837 "Set the recursion desired bit in queries.  Recursion is carried out by the "
14838 "domain name server, not by B<res_send>().  [Enabled by default]."
14839 msgstr ""
14840
14841 #. type: TP
14842 #: build/C/man3/resolver.3:220
14843 #, no-wrap
14844 msgid "B<RES_DEFNAMES>"
14845 msgstr ""
14846
14847 #. type: Plain text
14848 #: build/C/man3/resolver.3:227
14849 msgid ""
14850 "If set, B<res_search>()  will append the default domain name to single "
14851 "component names\\(emthat is, those that do not contain a dot.  [Enabled by "
14852 "default]."
14853 msgstr ""
14854
14855 #. type: TP
14856 #: build/C/man3/resolver.3:227
14857 #, no-wrap
14858 msgid "B<RES_STAYOPEN>"
14859 msgstr ""
14860
14861 #. type: Plain text
14862 #: build/C/man3/resolver.3:232
14863 msgid "Used with B<RES_USEVC> to keep the TCP connection open between queries."
14864 msgstr ""
14865
14866 #. type: TP
14867 #: build/C/man3/resolver.3:232
14868 #, no-wrap
14869 msgid "B<RES_DNSRCH>"
14870 msgstr ""
14871
14872 #. type: Plain text
14873 #: build/C/man3/resolver.3:241
14874 msgid ""
14875 "If set, B<res_search>()  will search for hostnames in the current domain and "
14876 "in parent domains.  This option is used by B<gethostbyname>(3).  [Enabled by "
14877 "default]."
14878 msgstr ""
14879
14880 #. type: Plain text
14881 #: build/C/man3/resolver.3:245
14882 msgid ""
14883 "This list is not complete.  You can find some other flags described in "
14884 "B<resolv.conf>(5)."
14885 msgstr ""
14886
14887 #. type: Plain text
14888 #: build/C/man3/resolver.3:250
14889 msgid "The B<res_init>()  function returns 0 on success, or -1 if an error occurs."
14890 msgstr ""
14891
14892 #. type: Plain text
14893 #: build/C/man3/resolver.3:260
14894 msgid ""
14895 "The B<res_query>(), B<res_search>(), B<res_querydomain>(), B<res_mkquery>()  "
14896 "and B<res_send>()  functions return the length of the response, or -1 if an "
14897 "error occurs."
14898 msgstr ""
14899
14900 #. type: Plain text
14901 #: build/C/man3/resolver.3:267
14902 msgid ""
14903 "The B<dn_comp>()  and B<dn_expand>()  functions return the length of the "
14904 "compressed name, or -1 if an error occurs."
14905 msgstr ""
14906
14907 #. type: Plain text
14908 #: build/C/man3/resolver.3:271
14909 #, no-wrap
14910 msgid ""
14911 "/etc/resolv.conf          resolver configuration file\n"
14912 "/etc/host.conf            resolver configuration file\n"
14913 msgstr ""
14914
14915 #. type: Plain text
14916 #: build/C/man3/resolver.3:274
14917 msgid "4.3BSD."
14918 msgstr ""
14919
14920 #. type: Plain text
14921 #: build/C/man3/resolver.3:279
14922 msgid ""
14923 "B<gethostbyname>(3), B<resolv.conf>(5), B<resolver>(5), B<hostname>(7), "
14924 "B<named>(8)"
14925 msgstr ""
14926
14927 #. type: TH
14928 #: build/C/man3/rexec.3:41
14929 #, no-wrap
14930 msgid "REXEC"
14931 msgstr ""
14932
14933 #. type: Plain text
14934 #: build/C/man3/rexec.3:44
14935 msgid "rexec, rexec_af - return stream to a remote command"
14936 msgstr ""
14937
14938 #. type: Plain text
14939 #: build/C/man3/rexec.3:48
14940 #, no-wrap
14941 msgid ""
14942 "B<#define _BSD_SOURCE>             /* See feature_test_macros(7) */\n"
14943 "B<#include E<lt>netdb.hE<gt>>\n"
14944 msgstr ""
14945
14946 #. type: Plain text
14947 #: build/C/man3/rexec.3:51
14948 #, no-wrap
14949 msgid ""
14950 "B<int rexec(char **>I<ahost>B<, int >I<inport>B<, const char *>I<user>B<, "
14951 ">\n"
14952 "B<          const char *>I<passwd>B<, const char *>I<cmd>B<, int "
14953 "*>I<fd2p>B<);>\n"
14954 msgstr ""
14955
14956 #. type: Plain text
14957 #: build/C/man3/rexec.3:55
14958 #, no-wrap
14959 msgid ""
14960 "B<int rexec_af(char **>I<ahost>B<, int >I<inport>B<, const char *>I<user>B<, "
14961 ">\n"
14962 "B<             const char *>I<passwd>B<, const char *>I<cmd>B<, int "
14963 "*>I<fd2p>B<,>\n"
14964 "B<             sa_family_t >I<af>B<);>\n"
14965 msgstr ""
14966
14967 #. type: Plain text
14968 #: build/C/man3/rexec.3:59
14969 msgid "This interface is obsoleted by B<rcmd>(3)."
14970 msgstr ""
14971
14972 #. type: Plain text
14973 #: build/C/man3/rexec.3:78
14974 msgid ""
14975 "The B<rexec>()  function looks up the host I<*ahost> using "
14976 "B<gethostbyname>(3), returning -1 if the host does not exist.  Otherwise, "
14977 "I<*ahost> is set to the standard name of the host.  If a username and "
14978 "password are both specified, then these are used to authenticate to the "
14979 "foreign host; otherwise the environment and then the I<.netrc> file in "
14980 "user's home directory are searched for appropriate information.  If all this "
14981 "fails, the user is prompted for the information."
14982 msgstr ""
14983
14984 #. type: Plain text
14985 #: build/C/man3/rexec.3:89
14986 msgid ""
14987 "The port I<inport> specifies which well-known DARPA Internet port to use for "
14988 "the connection; the call I<getservbyname(\"exec\", \"tcp\")> (see "
14989 "B<getservent>(3))  will return a pointer to a structure that contains the "
14990 "necessary port.  The protocol for connection is described in detail in "
14991 "B<rexecd>(8)."
14992 msgstr ""
14993
14994 #. type: Plain text
14995 #: build/C/man3/rexec.3:122
14996 msgid ""
14997 "If the connection succeeds, a socket in the Internet domain of type "
14998 "B<SOCK_STREAM> is returned to the caller, and given to the remote command as "
14999 "I<stdin> and I<stdout>.  If I<fd2p> is nonzero, then an auxiliary channel to "
15000 "a control process will be setup, and a descriptor for it will be placed in "
15001 "I<*fd2p>.  The control process will return diagnostic output from the "
15002 "command (unit 2) on this channel, and will also accept bytes on this channel "
15003 "as being UNIX signal numbers, to be forwarded to the process group of the "
15004 "command.  The diagnostic information returned does not include remote "
15005 "authorization failure, as the secondary connection is set up after "
15006 "authorization has been verified.  If I<fd2p> is 0, then the I<stderr> (unit "
15007 "2 of the remote command) will be made the same as the I<stdout> and no "
15008 "provision is made for sending arbitrary signals to the remote process, "
15009 "although you may be able to get its attention by using out-of-band data."
15010 msgstr ""
15011
15012 #. type: SS
15013 #: build/C/man3/rexec.3:122
15014 #, no-wrap
15015 msgid "rexec_af()"
15016 msgstr ""
15017
15018 #. type: Plain text
15019 #: build/C/man3/rexec.3:138
15020 msgid ""
15021 "The B<rexec>()  function works over IPv4 (B<AF_INET>).  By contrast, the "
15022 "B<rexec_af>()  function provides an extra argument, I<af>, that allows the "
15023 "caller to select the protocol.  This argument can be specified as "
15024 "B<AF_INET>, B<AF_INET6>, or B<AF_UNSPEC> (to allow the implementation to "
15025 "select the protocol)."
15026 msgstr ""
15027
15028 #. type: Plain text
15029 #: build/C/man3/rexec.3:142
15030 msgid "The B<rexec_af>()  function was added to glibc in version 2.2."
15031 msgstr ""
15032
15033 #. type: Plain text
15034 #: build/C/man3/rexec.3:149
15035 msgid "The B<rexec>()  and B<rexec_af>()  functions are not thread-safe."
15036 msgstr ""
15037
15038 #. type: Plain text
15039 #: build/C/man3/rexec.3:158
15040 msgid ""
15041 "These functions are not in POSIX.1-2001.  The B<rexec>()  function first "
15042 "appeared in 4.2BSD, and is present on the BSDs, Solaris, and many other "
15043 "systems.  The B<rexec_af>()  function is more recent, and less widespread."
15044 msgstr ""
15045
15046 #. type: Plain text
15047 #: build/C/man3/rexec.3:162
15048 msgid "The B<rexec>()  function sends the unencrypted password across the network."
15049 msgstr ""
15050
15051 #. type: Plain text
15052 #: build/C/man3/rexec.3:167
15053 msgid ""
15054 "The underlying service is considered a big security hole and therefore not "
15055 "enabled on many sites; see B<rexecd>(8)  for explanations."
15056 msgstr ""
15057
15058 #. type: Plain text
15059 #: build/C/man3/rexec.3:169
15060 msgid "B<rcmd>(3), B<rexecd>(8)"
15061 msgstr ""
15062
15063 #. type: TH
15064 #: build/C/man5/services.5:34
15065 #, no-wrap
15066 msgid "SERVICES"
15067 msgstr ""
15068
15069 #. type: TH
15070 #: build/C/man5/services.5:34
15071 #, no-wrap
15072 msgid "2010-05-22"
15073 msgstr ""
15074
15075 #. type: Plain text
15076 #: build/C/man5/services.5:37
15077 msgid "services - Internet network services list"
15078 msgstr ""
15079
15080 #. type: Plain text
15081 #: build/C/man5/services.5:52
15082 msgid ""
15083 "B<services> is a plain ASCII file providing a mapping between human-friendly "
15084 "textual names for internet services, and their underlying assigned port "
15085 "numbers and protocol types.  Every networking program should look into this "
15086 "file to get the port number (and protocol) for its service.  The C library "
15087 "routines B<getservent>(3), B<getservbyname>(3), B<getservbyport>(3), "
15088 "B<setservent>(3), and B<endservent>(3)  support querying this file from "
15089 "programs."
15090 msgstr ""
15091
15092 #. type: Plain text
15093 #: build/C/man5/services.5:58
15094 msgid ""
15095 "Port numbers are assigned by the IANA (Internet Assigned Numbers Authority), "
15096 "and their current policy is to assign both TCP and UDP protocols when "
15097 "assigning a port number.  Therefore, most entries will have two entries, "
15098 "even for TCP-only services."
15099 msgstr ""
15100
15101 #. type: Plain text
15102 #: build/C/man5/services.5:70
15103 msgid ""
15104 "Port numbers below 1024 (so-called \"low numbered\" ports) can be bound to "
15105 "only by root (see B<bind>(2), B<tcp>(7), and B<udp>(7)).  This is so clients "
15106 "connecting to low numbered ports can trust that the service running on the "
15107 "port is the standard implementation, and not a rogue service run by a user "
15108 "of the machine.  Well-known port numbers specified by the IANA are normally "
15109 "located in this root-only space."
15110 msgstr ""
15111
15112 #. type: Plain text
15113 #: build/C/man5/services.5:85
15114 msgid ""
15115 "The presence of an entry for a service in the B<services> file does not "
15116 "necessarily mean that the service is currently running on the machine.  See "
15117 "B<inetd.conf>(5)  for the configuration of Internet services offered.  Note "
15118 "that not all networking services are started by B<inetd>(8), and so won't "
15119 "appear in B<inetd.conf>(5).  In particular, news (NNTP) and mail (SMTP) "
15120 "servers are often initialized from the system boot scripts."
15121 msgstr ""
15122
15123 #. type: Plain text
15124 #: build/C/man5/services.5:94
15125 msgid ""
15126 "The location of the B<services> file is defined by B<_PATH_SERVICES> in "
15127 "I<E<lt>netdb.hE<gt>>.  This is usually set to I</etc/services>."
15128 msgstr ""
15129
15130 #. type: Plain text
15131 #: build/C/man5/services.5:96
15132 msgid "Each line describes one service, and is of the form:"
15133 msgstr ""
15134
15135 #. type: Plain text
15136 #: build/C/man5/services.5:98
15137 msgid "I<service-name\\ \\ \\ port>B</>I<protocol\\ \\ \\ >[I<aliases ...>]"
15138 msgstr ""
15139
15140 #. type: TP
15141 #: build/C/man5/services.5:98
15142 #, no-wrap
15143 msgid "where:"
15144 msgstr ""
15145
15146 #. type: TP
15147 #: build/C/man5/services.5:100
15148 #, no-wrap
15149 msgid "I<service-name>"
15150 msgstr ""
15151
15152 #. type: Plain text
15153 #: build/C/man5/services.5:106
15154 msgid ""
15155 "is the friendly name the service is known by and looked up under.  It is "
15156 "case sensitive.  Often, the client program is named after the "
15157 "I<service-name>."
15158 msgstr ""
15159
15160 #. type: TP
15161 #: build/C/man5/services.5:106
15162 #, no-wrap
15163 msgid "I<port>"
15164 msgstr ""
15165
15166 #. type: Plain text
15167 #: build/C/man5/services.5:109
15168 msgid "is the port number (in decimal) to use for this service."
15169 msgstr ""
15170
15171 #. type: Plain text
15172 #: build/C/man5/services.5:120
15173 msgid ""
15174 "is the type of protocol to be used.  This field should match an entry in the "
15175 "B<protocols>(5)  file.  Typical values include B<tcp> and B<udp>."
15176 msgstr ""
15177
15178 #. type: Plain text
15179 #: build/C/man5/services.5:126
15180 msgid ""
15181 "is an optional space or tab separated list of other names for this service.  "
15182 "Again, the names are case sensitive."
15183 msgstr ""
15184
15185 #. type: Plain text
15186 #: build/C/man5/services.5:128
15187 msgid "Either spaces or tabs may be used to separate the fields."
15188 msgstr ""
15189
15190 #. type: Plain text
15191 #: build/C/man5/services.5:132
15192 msgid ""
15193 "Comments are started by the hash sign (#) and continue until the end of the "
15194 "line.  Blank lines are skipped."
15195 msgstr ""
15196
15197 #. type: Plain text
15198 #: build/C/man5/services.5:143
15199 msgid ""
15200 "The I<service-name> should begin in the first column of the file, since "
15201 "leading spaces are not stripped.  I<service-names> can be any printable "
15202 "characters excluding space and tab.  However, a conservative choice of "
15203 "characters should be used to minimize compatibility problems.  For example, "
15204 "a-z, 0-9, and hyphen (-) would seem a sensible choice."
15205 msgstr ""
15206
15207 #. type: Plain text
15208 #: build/C/man5/services.5:152
15209 msgid ""
15210 "Lines not matching this format should not be present in the file.  "
15211 "(Currently, they are silently skipped by B<getservent>(3), "
15212 "B<getservbyname>(3), and B<getservbyport>(3).  However, this behavior should "
15213 "not be relied on.)"
15214 msgstr ""
15215
15216 #. type: Plain text
15217 #: build/C/man5/services.5:169
15218 msgid "A sample B<services> file might look like this:"
15219 msgstr ""
15220
15221 #. type: Plain text
15222 #: build/C/man5/services.5:182
15223 #, no-wrap
15224 msgid ""
15225 "CW<netstat         15/tcp\n"
15226 "qotd            17/tcp          quote\n"
15227 "msp             18/tcp          # message send protocol\n"
15228 "msp             18/udp          # message send protocol\n"
15229 "chargen         19/tcp          ttytst source\n"
15230 "chargen         19/udp          ttytst source\n"
15231 "ftp             21/tcp\n"
15232 "# 22 - unassigned\n"
15233 "telnet          23/tcp>\n"
15234 msgstr ""
15235
15236 #. type: Plain text
15237 #: build/C/man5/services.5:189
15238 msgid "The Internet network services list"
15239 msgstr ""
15240
15241 #. type: TP
15242 #: build/C/man5/services.5:189
15243 #, no-wrap
15244 msgid "I<E<lt>netdb.hE<gt>>"
15245 msgstr ""
15246
15247 #.  .SH BUGS
15248 #.  It's not clear when/if the following was ever true;
15249 #.  it isn't true for glibc 2.8:
15250 #.     There is a maximum of 35 aliases, due to the way the
15251 #.     .BR getservent (3)
15252 #.     code is written.
15253 #
15254 #.  It's not clear when/if the following was ever true;
15255 #.  it isn't true for glibc 2.8:
15256 #.     Lines longer than
15257 #.     .B BUFSIZ
15258 #.     (currently 1024) characters will be ignored by
15259 #.     .BR getservent (3),
15260 #.     .BR getservbyname (3),
15261 #.     and
15262 #.     .BR getservbyport (3).
15263 #.     However, this will also cause the next line to be mis-parsed.
15264 #. type: Plain text
15265 #: build/C/man5/services.5:210
15266 msgid "Definition of B<_PATH_SERVICES>"
15267 msgstr ""
15268
15269 #. type: Plain text
15270 #: build/C/man5/services.5:220
15271 msgid ""
15272 "B<listen>(2), B<endservent>(3), B<getservbyname>(3), B<getservbyport>(3), "
15273 "B<getservent>(3), B<setservent>(3), B<inetd.conf>(5), B<protocols>(5), "
15274 "B<inetd>(8)"
15275 msgstr ""
15276
15277 #. type: Plain text
15278 #: build/C/man5/services.5:221
15279 msgid "Assigned Numbers RFC, most recently RFC\\ 1700, (AKA STD0002)."
15280 msgstr ""
15281
15282 #. type: TH
15283 #: build/C/man3/setnetgrent.3:10
15284 #, no-wrap
15285 msgid "SETNETGRENT"
15286 msgstr ""
15287
15288 #. type: Plain text
15289 #: build/C/man3/setnetgrent.3:14
15290 msgid ""
15291 "setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr - handle "
15292 "network group entries"
15293 msgstr ""
15294
15295 #. type: Plain text
15296 #: build/C/man3/setnetgrent.3:19
15297 #, no-wrap
15298 msgid "B<int setnetgrent(const char *>I<netgroup>B<);>\n"
15299 msgstr ""
15300
15301 #. type: Plain text
15302 #: build/C/man3/setnetgrent.3:21
15303 #, no-wrap
15304 msgid "B<void endnetgrent(void);>\n"
15305 msgstr ""
15306
15307 #. type: Plain text
15308 #: build/C/man3/setnetgrent.3:23
15309 #, no-wrap
15310 msgid ""
15311 "B<int getnetgrent(char **>I<host>B<, char **>I<user>B<, char "
15312 "**>I<domain>B<);>\n"
15313 msgstr ""
15314
15315 #. type: Plain text
15316 #: build/C/man3/setnetgrent.3:26
15317 #, no-wrap
15318 msgid ""
15319 "B<int getnetgrent_r(char **>I<host>B<, char **>I<user>B<,>\n"
15320 "B<                  char **>I<domain>B<, char *>I<buf>B<, size_t "
15321 ">I<buflen>B<);>\n"
15322 msgstr ""
15323
15324 #. type: Plain text
15325 #: build/C/man3/setnetgrent.3:29
15326 #, no-wrap
15327 msgid ""
15328 "B<int innetgr(const char *>I<netgroup>B<, const char *>I<host>B<,>\n"
15329 "B<            const char *>I<user>B<, const char *>I<domain>B<);>\n"
15330 msgstr ""
15331
15332 #. type: Plain text
15333 #: build/C/man3/setnetgrent.3:43
15334 msgid ""
15335 "B<setnetgrent>(), B<endnetgrent>(), B<getnetgrent>(), B<getnetgrent_r>(), "
15336 "B<innetgr>(): _BSD_SOURCE || _SVID_SOURCE"
15337 msgstr ""
15338
15339 #. type: Plain text
15340 #: build/C/man3/setnetgrent.3:57
15341 msgid ""
15342 "The I<netgroup> is a SunOS invention.  A netgroup database is a list of "
15343 "string triples (I<hostname>, I<username>, I<domainname>)  or other netgroup "
15344 "names.  Any of the elements in a triple can be empty, which means that "
15345 "anything matches.  The functions described here allow access to the netgroup "
15346 "databases.  The file I</etc/nsswitch.conf> defines what database is "
15347 "searched."
15348 msgstr ""
15349
15350 #. type: Plain text
15351 #: build/C/man3/setnetgrent.3:77
15352 msgid ""
15353 "The B<setnetgrent>()  call defines the netgroup that will be searched by "
15354 "subsequent B<getnetgrent>()  calls.  The B<getnetgrent>()  function "
15355 "retrieves the next netgroup entry, and returns pointers in I<host>, I<user>, "
15356 "I<domain>.  A null pointer means that the corresponding entry matches any "
15357 "string.  The pointers are valid only as long as there is no call to other "
15358 "netgroup-related functions.  To avoid this problem you can use the GNU "
15359 "function B<getnetgrent_r>()  that stores the strings in the supplied "
15360 "buffer.  To free all allocated buffers use B<endnetgrent>()."
15361 msgstr ""
15362
15363 #. type: Plain text
15364 #: build/C/man3/setnetgrent.3:86
15365 msgid ""
15366 "In most cases you want to check only if the triplet (I<hostname>, "
15367 "I<username>, I<domainname>)  is a member of a netgroup.  The function "
15368 "B<innetgr>()  can be used for this without calling the above three "
15369 "functions.  Again, a null pointer is a wildcard and matches any string.  The "
15370 "function is thread-safe."
15371 msgstr ""
15372
15373 #. type: Plain text
15374 #: build/C/man3/setnetgrent.3:88
15375 msgid "These functions return 1 on success and 0 for failure."
15376 msgstr ""
15377
15378 #. type: Plain text
15379 #: build/C/man3/setnetgrent.3:90
15380 msgid "I</etc/netgroup>"
15381 msgstr ""
15382
15383 #.  getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
15384 #. type: Plain text
15385 #: build/C/man3/setnetgrent.3:103
15386 msgid ""
15387 "These functions are not in POSIX.1-2001, but B<setnetgrent>(), "
15388 "B<endnetgrent>(), B<getnetgrent>(), and B<innetgr>()  are available on most "
15389 "UNIX systems.  B<getnetgrent_r>()  is not widely available on other systems."
15390 msgstr ""
15391
15392 #. type: Plain text
15393 #: build/C/man3/setnetgrent.3:107
15394 msgid "In the BSD implementation, B<setnetgrent>()  returns void."
15395 msgstr ""
15396
15397 #. type: Plain text
15398 #: build/C/man3/setnetgrent.3:110
15399 msgid "B<sethostent>(3), B<setprotoent>(3), B<setservent>(3)"
15400 msgstr ""
15401
15402 #. type: TH
15403 #: build/C/man2/shutdown.2:40
15404 #, no-wrap
15405 msgid "SHUTDOWN"
15406 msgstr ""
15407
15408 #. type: TH
15409 #: build/C/man2/shutdown.2:40
15410 #, no-wrap
15411 msgid "2012-09-06"
15412 msgstr ""
15413
15414 #. type: Plain text
15415 #: build/C/man2/shutdown.2:43
15416 msgid "shutdown - shut down part of a full-duplex connection"
15417 msgstr ""
15418
15419 #. type: Plain text
15420 #: build/C/man2/shutdown.2:47
15421 msgid "B<int shutdown(int >I<sockfd>B<, int >I<how>B<);>"
15422 msgstr ""
15423
15424 #. type: Plain text
15425 #: build/C/man2/shutdown.2:69
15426 msgid ""
15427 "The B<shutdown>()  call causes all or part of a full-duplex connection on "
15428 "the socket associated with I<sockfd> to be shut down.  If I<how> is "
15429 "B<SHUT_RD>, further receptions will be disallowed.  If I<how> is B<SHUT_WR>, "
15430 "further transmissions will be disallowed.  If I<how> is B<SHUT_RDWR>, "
15431 "further receptions and transmissions will be disallowed."
15432 msgstr ""
15433
15434 #. type: Plain text
15435 #: build/C/man2/shutdown.2:79
15436 msgid "I<sockfd> is not a valid descriptor."
15437 msgstr ""
15438
15439 #. type: Plain text
15440 #: build/C/man2/shutdown.2:84
15441 msgid "An invalid value was specified in I<how> (but see BUGS)."
15442 msgstr ""
15443
15444 #. type: Plain text
15445 #: build/C/man2/shutdown.2:87
15446 msgid "The specified socket is not connected."
15447 msgstr ""
15448
15449 #. type: Plain text
15450 #: build/C/man2/shutdown.2:91
15451 msgid "I<sockfd> is a file, not a socket."
15452 msgstr ""
15453
15454 #. type: Plain text
15455 #: build/C/man2/shutdown.2:95
15456 msgid ""
15457 "POSIX.1-2001, 4.4BSD (the B<shutdown>()  function call first appeared in "
15458 "4.2BSD)."
15459 msgstr ""
15460
15461 #. type: Plain text
15462 #: build/C/man2/shutdown.2:104
15463 msgid ""
15464 "The constants B<SHUT_RD>, B<SHUT_WR>, B<SHUT_RDWR> have the value 0, 1, 2, "
15465 "respectively, and are defined in I<E<lt>sys/socket.hE<gt>> since "
15466 "glibc-2.1.91."
15467 msgstr ""
15468
15469 #.  FIXME .
15470 #.  https://bugzilla.kernel.org/show_bug.cgi?id=47111
15471 #. type: Plain text
15472 #: build/C/man2/shutdown.2:113
15473 msgid ""
15474 "As currently implemented, checks for the validity of I<how> are done in "
15475 "domain-specific code, and not all domains perform these checks.  Most "
15476 "notably, UNIX domain sockets simply ignore invalid values; this may change "
15477 "in the future."
15478 msgstr ""
15479
15480 #. type: Plain text
15481 #: build/C/man2/shutdown.2:116
15482 msgid "B<connect>(2), B<socket>(2), B<socket>(7)"
15483 msgstr ""
15484
15485 #. type: TH
15486 #: build/C/man7/tcp.7:76
15487 #, no-wrap
15488 msgid "TCP"
15489 msgstr ""
15490
15491 #. type: TH
15492 #: build/C/man7/tcp.7:76
15493 #, no-wrap
15494 msgid "2015-01-10"
15495 msgstr ""
15496
15497 #. type: Plain text
15498 #: build/C/man7/tcp.7:79
15499 msgid "tcp - TCP protocol"
15500 msgstr ""
15501
15502 #. type: Plain text
15503 #: build/C/man7/tcp.7:85
15504 msgid "B<#include E<lt>netinet/tcp.hE<gt>>"
15505 msgstr ""
15506
15507 #. type: Plain text
15508 #: build/C/man7/tcp.7:87
15509 msgid "B<tcp_socket = socket(AF_INET, SOCK_STREAM, 0);>"
15510 msgstr ""
15511
15512 #. type: Plain text
15513 #: build/C/man7/tcp.7:100
15514 msgid ""
15515 "This is an implementation of the TCP protocol defined in RFC\\ 793, RFC\\ "
15516 "1122 and RFC\\ 2001 with the NewReno and SACK extensions.  It provides a "
15517 "reliable, stream-oriented, full-duplex connection between two sockets on top "
15518 "of B<ip>(7), for both v4 and v6 versions.  TCP guarantees that the data "
15519 "arrives in order and retransmits lost packets.  It generates and checks a "
15520 "per-packet checksum to catch transmission errors.  TCP does not preserve "
15521 "record boundaries."
15522 msgstr ""
15523
15524 #. type: Plain text
15525 #: build/C/man7/tcp.7:119
15526 msgid ""
15527 "A newly created TCP socket has no remote or local address and is not fully "
15528 "specified.  To create an outgoing TCP connection use B<connect>(2)  to "
15529 "establish a connection to another TCP socket.  To receive new incoming "
15530 "connections, first B<bind>(2)  the socket to a local address and port and "
15531 "then call B<listen>(2)  to put the socket into the listening state.  After "
15532 "that a new socket for each incoming connection can be accepted using "
15533 "B<accept>(2).  A socket which has had B<accept>(2)  or B<connect>(2)  "
15534 "successfully called on it is fully specified and may transmit data.  Data "
15535 "cannot be transmitted on listening or not yet connected sockets."
15536 msgstr ""
15537
15538 #. type: Plain text
15539 #: build/C/man7/tcp.7:139
15540 msgid ""
15541 "Linux supports RFC\\ 1323 TCP high performance extensions.  These include "
15542 "Protection Against Wrapped Sequence Numbers (PAWS), Window Scaling and "
15543 "Timestamps.  Window scaling allows the use of large (E<gt> 64K) TCP windows "
15544 "in order to support links with high latency or bandwidth.  To make use of "
15545 "them, the send and receive buffer sizes must be increased.  They can be set "
15546 "globally with the I</proc/sys/net/ipv4/tcp_wmem> and "
15547 "I</proc/sys/net/ipv4/tcp_rmem> files, or on individual sockets by using the "
15548 "B<SO_SNDBUF> and B<SO_RCVBUF> socket options with the B<setsockopt>(2)  "
15549 "call."
15550 msgstr ""
15551
15552 #. type: Plain text
15553 #: build/C/man7/tcp.7:170
15554 msgid ""
15555 "The maximum sizes for socket buffers declared via the B<SO_SNDBUF> and "
15556 "B<SO_RCVBUF> mechanisms are limited by the values in the "
15557 "I</proc/sys/net/core/rmem_max> and I</proc/sys/net/core/wmem_max> files.  "
15558 "Note that TCP actually allocates twice the size of the buffer requested in "
15559 "the B<setsockopt>(2)  call, and so a succeeding B<getsockopt>(2)  call will "
15560 "not return the same size of buffer as requested in the B<setsockopt>(2)  "
15561 "call.  TCP uses the extra space for administrative purposes and internal "
15562 "kernel structures, and the I</proc> file values reflect the larger sizes "
15563 "compared to the actual TCP windows.  On individual connections, the socket "
15564 "buffer size must be set prior to the B<listen>(2)  or B<connect>(2)  calls "
15565 "in order to have it take effect.  See B<socket>(7)  for more information."
15566 msgstr ""
15567
15568 #. type: Plain text
15569 #: build/C/man7/tcp.7:202
15570 msgid ""
15571 "TCP supports urgent data.  Urgent data is used to signal the receiver that "
15572 "some important message is part of the data stream and that it should be "
15573 "processed as soon as possible.  To send urgent data specify the B<MSG_OOB> "
15574 "option to B<send>(2).  When urgent data is received, the kernel sends a "
15575 "B<SIGURG> signal to the process or process group that has been set as the "
15576 "socket \"owner\" using the B<SIOCSPGRP> or B<FIOSETOWN> ioctls (or the "
15577 "POSIX.1-2001-specified B<fcntl>(2)  B<F_SETOWN> operation).  When the "
15578 "B<SO_OOBINLINE> socket option is enabled, urgent data is put into the normal "
15579 "data stream (a program can test for its location using the B<SIOCATMARK> "
15580 "ioctl described below), otherwise it can be received only when the "
15581 "B<MSG_OOB> flag is set for B<recv>(2)  or B<recvmsg>(2)."
15582 msgstr ""
15583
15584 #. type: Plain text
15585 #: build/C/man7/tcp.7:210
15586 msgid ""
15587 "Linux 2.4 introduced a number of changes for improved throughput and "
15588 "scaling, as well as enhanced functionality.  Some of these features include "
15589 "support for zero-copy B<sendfile>(2), Explicit Congestion Notification, new "
15590 "management of TIME_WAIT sockets, keep-alive socket options and support for "
15591 "Duplicate SACK extensions."
15592 msgstr ""
15593
15594 #. type: SS
15595 #: build/C/man7/tcp.7:210
15596 #, no-wrap
15597 msgid "Address formats"
15598 msgstr ""
15599
15600 #. type: Plain text
15601 #: build/C/man7/tcp.7:219
15602 msgid ""
15603 "TCP is built on top of IP (see B<ip>(7)).  The address formats defined by "
15604 "B<ip>(7)  apply to TCP.  TCP supports point-to-point communication only; "
15605 "broadcasting and multicasting are not supported."
15606 msgstr ""
15607
15608 #. type: Plain text
15609 #: build/C/man7/tcp.7:231
15610 msgid ""
15611 "System-wide TCP parameter settings can be accessed by files in the directory "
15612 "I</proc/sys/net/ipv4/>.  In addition, most IP I</proc> interfaces also apply "
15613 "to TCP; see B<ip>(7).  Variables described as I<Boolean> take an integer "
15614 "value, with a nonzero value (\"true\") meaning that the corresponding option "
15615 "is enabled, and a zero value (\"false\")  meaning that the option is "
15616 "disabled."
15617 msgstr ""
15618
15619 #. type: TP
15620 #: build/C/man7/tcp.7:231
15621 #, no-wrap
15622 msgid "I<tcp_abc> (Integer; default: 0; since Linux 2.6.15)"
15623 msgstr ""
15624
15625 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15626 #. type: Plain text
15627 #: build/C/man7/tcp.7:239
15628 msgid ""
15629 "Control the Appropriate Byte Count (ABC), defined in RFC 3465.  ABC is a way "
15630 "of increasing the congestion window (I<cwnd>)  more slowly in response to "
15631 "partial acknowledgments.  Possible values are:"
15632 msgstr ""
15633
15634 #. type: IP
15635 #: build/C/man7/tcp.7:240 build/C/man7/tcp.7:428 build/C/man7/tcp.7:449 build/C/man7/tcp.7:593
15636 #, no-wrap
15637 msgid "0"
15638 msgstr ""
15639
15640 #. type: Plain text
15641 #: build/C/man7/tcp.7:244
15642 msgid "increase I<cwnd> once per acknowledgment (no ABC)"
15643 msgstr ""
15644
15645 #. type: IP
15646 #: build/C/man7/tcp.7:244 build/C/man7/tcp.7:430 build/C/man7/tcp.7:456 build/C/man7/tcp.7:595
15647 #, no-wrap
15648 msgid "1"
15649 msgstr ""
15650
15651 #. type: Plain text
15652 #: build/C/man7/tcp.7:248
15653 msgid "increase I<cwnd> once per acknowledgment of full sized segment"
15654 msgstr ""
15655
15656 #. type: IP
15657 #: build/C/man7/tcp.7:248 build/C/man7/tcp.7:432 build/C/man7/tcp.7:463 build/C/man7/tcp.7:597
15658 #, no-wrap
15659 msgid "2"
15660 msgstr ""
15661
15662 #. type: Plain text
15663 #: build/C/man7/tcp.7:253
15664 msgid ""
15665 "allow increase I<cwnd> by two if acknowledgment is of two segments to "
15666 "compensate for delayed acknowledgments."
15667 msgstr ""
15668
15669 #. type: TP
15670 #: build/C/man7/tcp.7:254
15671 #, no-wrap
15672 msgid "I<tcp_abort_on_overflow> (Boolean; default: disabled; since Linux 2.4)"
15673 msgstr ""
15674
15675 #.  Since 2.3.41
15676 #. type: Plain text
15677 #: build/C/man7/tcp.7:266
15678 msgid ""
15679 "Enable resetting connections if the listening service is too slow and unable "
15680 "to keep up and accept them.  It means that if overflow occurred due to a "
15681 "burst, the connection will recover.  Enable this option I<only> if you are "
15682 "really sure that the listening daemon cannot be tuned to accept connections "
15683 "faster.  Enabling this option can harm the clients of your server."
15684 msgstr ""
15685
15686 #. type: TP
15687 #: build/C/man7/tcp.7:266
15688 #, no-wrap
15689 msgid "I<tcp_adv_win_scale> (integer; default: 2; since Linux 2.4)"
15690 msgstr ""
15691
15692 #.  Since 2.4.0-test7
15693 #. type: Plain text
15694 #: build/C/man7/tcp.7:278
15695 msgid ""
15696 "Count buffering overhead as I<bytes/2^tcp_adv_win_scale>, if "
15697 "I<tcp_adv_win_scale> is greater than 0; or "
15698 "I<bytes-bytes/2^(-tcp_adv_win_scale)>, if I<tcp_adv_win_scale> is less than "
15699 "or equal to zero."
15700 msgstr ""
15701
15702 #. type: Plain text
15703 #: build/C/man7/tcp.7:291
15704 msgid ""
15705 "The socket receive buffer space is shared between the application and "
15706 "kernel.  TCP maintains part of the buffer as the TCP window, this is the "
15707 "size of the receive window advertised to the other end.  The rest of the "
15708 "space is used as the \"application\" buffer, used to isolate the network "
15709 "from scheduling and application latencies.  The I<tcp_adv_win_scale> default "
15710 "value of 2 implies that the space used for the application buffer is one "
15711 "fourth that of the total."
15712 msgstr ""
15713
15714 #. type: TP
15715 #: build/C/man7/tcp.7:291
15716 #, no-wrap
15717 msgid ""
15718 "I<tcp_allowed_congestion_control> (String; default: see text; since Linux "
15719 "2.4.20)"
15720 msgstr ""
15721
15722 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15723 #. type: Plain text
15724 #: build/C/man7/tcp.7:304
15725 msgid ""
15726 "Show/set the congestion control algorithm choices available to unprivileged "
15727 "processes (see the description of the B<TCP_CONGESTION> socket option).  The "
15728 "items in the list are separated by white space and terminated by a newline "
15729 "character.  The list is a subset of those listed in "
15730 "I<tcp_available_congestion_control>.  The default value for this list is "
15731 "\"reno\" plus the default setting of I<tcp_congestion_control>."
15732 msgstr ""
15733
15734 #. type: TP
15735 #: build/C/man7/tcp.7:304
15736 #, no-wrap
15737 msgid "I<tcp_autocorking> (Boolean; default: enabled; since Linux 3.14)"
15738 msgstr ""
15739
15740 #.  commit f54b311142a92ea2e42598e347b84e1655caf8e3
15741 #.  Text heavily based on Documentation/networking/ip-sysctl.txt
15742 #. type: Plain text
15743 #: build/C/man7/tcp.7:321
15744 msgid ""
15745 "If this option is enabled, the kernel tries to coalesce small writes (from "
15746 "consecutive B<write>(2)  and B<sendmsg>(2)  calls) as much as possible, in "
15747 "order to decrease the total number of sent packets.  Coalescing is done if "
15748 "at least one prior packet for the flow is waiting in Qdisc queues or device "
15749 "transmit queue.  Applications can still use the B<TCP_CORK> socket option to "
15750 "obtain optimal behavior when they know how/when to uncork their sockets."
15751 msgstr ""
15752
15753 #. type: TP
15754 #: build/C/man7/tcp.7:321
15755 #, no-wrap
15756 msgid "I<tcp_available_congestion_control> (String; read-only; since Linux 2.4.20)"
15757 msgstr ""
15758
15759 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15760 #. type: Plain text
15761 #: build/C/man7/tcp.7:332
15762 msgid ""
15763 "Show a list of the congestion-control algorithms that are registered.  The "
15764 "items in the list are separated by white space and terminated by a newline "
15765 "character.  This list is a limiting set for the list in "
15766 "I<tcp_allowed_congestion_control>.  More congestion-control algorithms may "
15767 "be available as modules, but not loaded."
15768 msgstr ""
15769
15770 #. type: TP
15771 #: build/C/man7/tcp.7:332
15772 #, no-wrap
15773 msgid "I<tcp_app_win> (integer; default: 31; since Linux 2.4)"
15774 msgstr ""
15775
15776 #.  Since 2.4.0-test7
15777 #. type: Plain text
15778 #: build/C/man7/tcp.7:337
15779 msgid ""
15780 "This variable defines how many bytes of the TCP window are reserved for "
15781 "buffering overhead."
15782 msgstr ""
15783
15784 #
15785 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15786 #. type: Plain text
15787 #: build/C/man7/tcp.7:343
15788 msgid ""
15789 "A maximum of (I<window/2^tcp_app_win>, mss) bytes in the window are reserved "
15790 "for the application buffer.  A value of 0 implies that no amount is "
15791 "reserved."
15792 msgstr ""
15793
15794 #. type: TP
15795 #: build/C/man7/tcp.7:343
15796 #, no-wrap
15797 msgid "I<tcp_base_mss> (Integer; default: 512; since Linux 2.6.17)"
15798 msgstr ""
15799
15800 #
15801 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15802 #. type: Plain text
15803 #: build/C/man7/tcp.7:352
15804 msgid ""
15805 "The initial value of I<search_low> to be used by the packetization layer "
15806 "Path MTU discovery (MTU probing).  If MTU probing is enabled, this is the "
15807 "initial MSS used by the connection."
15808 msgstr ""
15809
15810 #. type: TP
15811 #: build/C/man7/tcp.7:352
15812 #, no-wrap
15813 msgid "I<tcp_bic> (Boolean; default: disabled; Linux 2.4.27/2.6.6 to 2.6.13)"
15814 msgstr ""
15815
15816 #
15817 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15818 #. type: Plain text
15819 #: build/C/man7/tcp.7:366
15820 msgid ""
15821 "Enable BIC TCP congestion control algorithm.  BIC-TCP is a sender-side only "
15822 "change that ensures a linear RTT fairness under large windows while offering "
15823 "both scalability and bounded TCP-friendliness.  The protocol combines two "
15824 "schemes called additive increase and binary search increase.  When the "
15825 "congestion window is large, additive increase with a large increment ensures "
15826 "linear RTT fairness as well as good scalability.  Under small congestion "
15827 "windows, binary search increase provides TCP friendliness."
15828 msgstr ""
15829
15830 #. type: TP
15831 #: build/C/man7/tcp.7:366
15832 #, no-wrap
15833 msgid "I<tcp_bic_low_window> (integer; default: 14; Linux 2.4.27/2.6.6 to 2.6.13)"
15834 msgstr ""
15835
15836 #
15837 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15838 #. type: Plain text
15839 #: build/C/man7/tcp.7:373
15840 msgid ""
15841 "Set the threshold window (in packets) where BIC TCP starts to adjust the "
15842 "congestion window.  Below this threshold BIC TCP behaves the same as the "
15843 "default TCP Reno."
15844 msgstr ""
15845
15846 #. type: TP
15847 #: build/C/man7/tcp.7:373
15848 #, no-wrap
15849 msgid ""
15850 "I<tcp_bic_fast_convergence> (Boolean; default: enabled; Linux 2.4.27/2.6.6 "
15851 "to 2.6.13)"
15852 msgstr ""
15853
15854 #. type: Plain text
15855 #: build/C/man7/tcp.7:377
15856 msgid ""
15857 "Force BIC TCP to more quickly respond to changes in congestion window.  "
15858 "Allows two flows sharing the same connection to converge more rapidly."
15859 msgstr ""
15860
15861 #. type: TP
15862 #: build/C/man7/tcp.7:377
15863 #, no-wrap
15864 msgid "I<tcp_congestion_control> (String; default: see text; since Linux 2.4.13)"
15865 msgstr ""
15866
15867 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
15868 #. type: Plain text
15869 #: build/C/man7/tcp.7:384
15870 msgid ""
15871 "Set the default congestion-control algorithm to be used for new "
15872 "connections.  The algorithm \"reno\" is always available, but additional "
15873 "choices may be available depending on kernel configuration.  The default "
15874 "value for this file is set as part of kernel configuration."
15875 msgstr ""
15876
15877 #. type: TP
15878 #: build/C/man7/tcp.7:384
15879 #, no-wrap
15880 msgid "I<tcp_dma_copybreak> (integer; default: 4096; since Linux 2.6.24)"
15881 msgstr ""
15882
15883 #. type: Plain text
15884 #: build/C/man7/tcp.7:391
15885 msgid ""
15886 "Lower limit, in bytes, of the size of socket reads that will be offloaded to "
15887 "a DMA copy engine, if one is present in the system and the kernel was "
15888 "configured with the B<CONFIG_NET_DMA> option."
15889 msgstr ""
15890
15891 #. type: TP
15892 #: build/C/man7/tcp.7:391
15893 #, no-wrap
15894 msgid "I<tcp_dsack> (Boolean; default: enabled; since Linux 2.4)"
15895 msgstr ""
15896
15897 #.  Since 2.4.0-test7
15898 #. type: Plain text
15899 #: build/C/man7/tcp.7:395
15900 msgid "Enable RFC\\ 2883 TCP Duplicate SACK support."
15901 msgstr ""
15902
15903 #. type: TP
15904 #: build/C/man7/tcp.7:395
15905 #, no-wrap
15906 msgid "I<tcp_ecn> (Boolean; default: disabled; since Linux 2.4)"
15907 msgstr ""
15908
15909 #.  Since 2.4.0-test7
15910 #. type: Plain text
15911 #: build/C/man7/tcp.7:402
15912 msgid ""
15913 "Enable RFC\\ 2884 Explicit Congestion Notification.  When enabled, "
15914 "connectivity to some destinations could be affected due to older, "
15915 "misbehaving routers along the path causing connections to be dropped."
15916 msgstr ""
15917
15918 #. type: TP
15919 #: build/C/man7/tcp.7:402
15920 #, no-wrap
15921 msgid "I<tcp_fack> (Boolean; default: enabled; since Linux 2.2)"
15922 msgstr ""
15923
15924 #.  Since 2.1.92
15925 #. type: Plain text
15926 #: build/C/man7/tcp.7:406
15927 msgid "Enable TCP Forward Acknowledgement support."
15928 msgstr ""
15929
15930 #. type: TP
15931 #: build/C/man7/tcp.7:406
15932 #, no-wrap
15933 msgid "I<tcp_fin_timeout> (integer; default: 60; since Linux 2.2)"
15934 msgstr ""
15935
15936 #.  Since 2.1.53
15937 #
15938 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
15939 #. type: Plain text
15940 #: build/C/man7/tcp.7:416
15941 msgid ""
15942 "This specifies how many seconds to wait for a final FIN packet before the "
15943 "socket is forcibly closed.  This is strictly a violation of the TCP "
15944 "specification, but required to prevent denial-of-service attacks.  In Linux "
15945 "2.2, the default value was 180."
15946 msgstr ""
15947
15948 #. type: TP
15949 #: build/C/man7/tcp.7:416
15950 #, no-wrap
15951 msgid "I<tcp_frto> (integer; default: 0; since Linux 2.4.21/2.6)"
15952 msgstr ""
15953
15954 #.  Since 2.4.21/2.5.43
15955 #. type: Plain text
15956 #: build/C/man7/tcp.7:425
15957 msgid ""
15958 "Enable F-RTO, an enhanced recovery algorithm for TCP retransmission timeouts "
15959 "(RTOs).  It is particularly beneficial in wireless environments where packet "
15960 "loss is typically due to random radio interference rather than intermediate "
15961 "router congestion.  See RFC 4138 for more details."
15962 msgstr ""
15963
15964 #. type: Plain text
15965 #: build/C/man7/tcp.7:427
15966 msgid "This file can have one of the following values:"
15967 msgstr ""
15968
15969 #. type: Plain text
15970 #: build/C/man7/tcp.7:430
15971 msgid "Disabled."
15972 msgstr ""
15973
15974 #. type: Plain text
15975 #: build/C/man7/tcp.7:432
15976 msgid "The basic version F-RTO algorithm is enabled."
15977 msgstr ""
15978
15979 #. type: Plain text
15980 #: build/C/man7/tcp.7:437
15981 msgid ""
15982 "Enable SACK-enhanced F-RTO if flow uses SACK.  The basic version can be used "
15983 "also when SACK is in use though in that case scenario(s) exists where F-RTO "
15984 "interacts badly with the packet counting of the SACK-enabled TCP flow."
15985 msgstr ""
15986
15987 #. type: Plain text
15988 #: build/C/man7/tcp.7:441
15989 msgid ""
15990 "Before Linux 2.6.22, this parameter was a Boolean value, supporting just "
15991 "values 0 and 1 above."
15992 msgstr ""
15993
15994 #. type: TP
15995 #: build/C/man7/tcp.7:441
15996 #, no-wrap
15997 msgid "I<tcp_frto_response> (integer; default: 0; since Linux 2.6.22)"
15998 msgstr ""
15999
16000 #. type: Plain text
16001 #: build/C/man7/tcp.7:448
16002 msgid ""
16003 "When F-RTO has detected that a TCP retransmission timeout was spurious (i.e, "
16004 "the timeout would have been avoided had TCP set a longer retransmission "
16005 "timeout), TCP has several options concerning what to do next.  Possible "
16006 "values are:"
16007 msgstr ""
16008
16009 #. type: Plain text
16010 #: build/C/man7/tcp.7:456
16011 msgid ""
16012 "Rate halving based; a smooth and conservative response, results in halved "
16013 "congestion window (I<cwnd>)  and slow-start threshold (I<ssthresh>)  after "
16014 "one RTT."
16015 msgstr ""
16016
16017 #. type: Plain text
16018 #: build/C/man7/tcp.7:463
16019 msgid ""
16020 "Very conservative response; not recommended because even though being valid, "
16021 "it interacts poorly with the rest of Linux TCP; halves I<cwnd> and "
16022 "I<ssthresh> immediately."
16023 msgstr ""
16024
16025 #. type: Plain text
16026 #: build/C/man7/tcp.7:472
16027 msgid ""
16028 "Aggressive response; undoes congestion-control measures that are now known "
16029 "to be unnecessary (ignoring the possibility of a lost retransmission that "
16030 "would require TCP to be more cautious); I<cwnd> and I<ssthresh> are restored "
16031 "to the values prior to timeout."
16032 msgstr ""
16033
16034 #. type: TP
16035 #: build/C/man7/tcp.7:473
16036 #, no-wrap
16037 msgid "I<tcp_keepalive_intvl> (integer; default: 75; since Linux 2.4)"
16038 msgstr ""
16039
16040 #.  Since 2.3.18
16041 #. type: Plain text
16042 #: build/C/man7/tcp.7:477
16043 msgid "The number of seconds between TCP keep-alive probes."
16044 msgstr ""
16045
16046 #. type: TP
16047 #: build/C/man7/tcp.7:477
16048 #, no-wrap
16049 msgid "I<tcp_keepalive_probes> (integer; default: 9; since Linux 2.2)"
16050 msgstr ""
16051
16052 #.  Since 2.1.43
16053 #. type: Plain text
16054 #: build/C/man7/tcp.7:483
16055 msgid ""
16056 "The maximum number of TCP keep-alive probes to send before giving up and "
16057 "killing the connection if no response is obtained from the other end."
16058 msgstr ""
16059
16060 #. type: TP
16061 #: build/C/man7/tcp.7:483
16062 #, no-wrap
16063 msgid "I<tcp_keepalive_time> (integer; default: 7200; since Linux 2.2)"
16064 msgstr ""
16065
16066 #.  Since 2.1.43
16067 #. type: Plain text
16068 #: build/C/man7/tcp.7:495
16069 msgid ""
16070 "The number of seconds a connection needs to be idle before TCP begins "
16071 "sending out keep-alive probes.  Keep-alives are sent only when the "
16072 "B<SO_KEEPALIVE> socket option is enabled.  The default value is 7200 seconds "
16073 "(2 hours).  An idle connection is terminated after approximately an "
16074 "additional 11 minutes (9 probes an interval of 75 seconds apart) when "
16075 "keep-alive is enabled."
16076 msgstr ""
16077
16078 #
16079 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16080 #. type: Plain text
16081 #: build/C/man7/tcp.7:500
16082 msgid ""
16083 "Note that underlying connection tracking mechanisms and application timeouts "
16084 "may be much shorter."
16085 msgstr ""
16086
16087 #. type: TP
16088 #: build/C/man7/tcp.7:500
16089 #, no-wrap
16090 msgid "I<tcp_low_latency> (Boolean; default: disabled; since Linux 2.4.21/2.6)"
16091 msgstr ""
16092
16093 #.  Since 2.4.21/2.5.60
16094 #. type: Plain text
16095 #: build/C/man7/tcp.7:508
16096 msgid ""
16097 "If enabled, the TCP stack makes decisions that prefer lower latency as "
16098 "opposed to higher throughput.  It this option is disabled, then higher "
16099 "throughput is preferred.  An example of an application where this default "
16100 "should be changed would be a Beowulf compute cluster."
16101 msgstr ""
16102
16103 #. type: TP
16104 #: build/C/man7/tcp.7:508
16105 #, no-wrap
16106 msgid "I<tcp_max_orphans> (integer; default: see below; since Linux 2.4)"
16107 msgstr ""
16108
16109 #.  Since 2.3.41
16110 #. type: Plain text
16111 #: build/C/man7/tcp.7:522
16112 msgid ""
16113 "The maximum number of orphaned (not attached to any user file handle) TCP "
16114 "sockets allowed in the system.  When this number is exceeded, the orphaned "
16115 "connection is reset and a warning is printed.  This limit exists only to "
16116 "prevent simple denial-of-service attacks.  Lowering this limit is not "
16117 "recommended.  Network conditions might require you to increase the number of "
16118 "orphans allowed, but note that each orphan can eat up to ~64K of unswappable "
16119 "memory.  The default initial value is set equal to the kernel parameter "
16120 "NR_FILE.  This initial default is adjusted depending on the memory in the "
16121 "system."
16122 msgstr ""
16123
16124 #. type: TP
16125 #: build/C/man7/tcp.7:522
16126 #, no-wrap
16127 msgid "I<tcp_max_syn_backlog> (integer; default: see below; since Linux 2.2)"
16128 msgstr ""
16129
16130 #.  Since 2.1.53
16131 #. type: Plain text
16132 #: build/C/man7/tcp.7:539
16133 msgid ""
16134 "The maximum number of queued connection requests which have still not "
16135 "received an acknowledgement from the connecting client.  If this number is "
16136 "exceeded, the kernel will begin dropping requests.  The default value of 256 "
16137 "is increased to 1024 when the memory present in the system is adequate or "
16138 "greater (E<gt>= 128Mb), and reduced to 128 for those systems with very low "
16139 "memory (E<lt>= 32Mb).  It is recommended that if this needs to be increased "
16140 "above 1024, TCP_SYNQ_HSIZE in I<include/net/tcp.h> be modified to keep "
16141 "TCP_SYNQ_HSIZE*16E<lt>=tcp_max_syn_backlog, and the kernel be recompiled."
16142 msgstr ""
16143
16144 #. type: TP
16145 #: build/C/man7/tcp.7:539
16146 #, no-wrap
16147 msgid "I<tcp_max_tw_buckets> (integer; default: see below; since Linux 2.4)"
16148 msgstr ""
16149
16150 #.  Since 2.3.41
16151 #. type: Plain text
16152 #: build/C/man7/tcp.7:549
16153 msgid ""
16154 "The maximum number of sockets in TIME_WAIT state allowed in the system.  "
16155 "This limit exists only to prevent simple denial-of-service attacks.  The "
16156 "default value of NR_FILE*2 is adjusted depending on the memory in the "
16157 "system.  If this number is exceeded, the socket is closed and a warning is "
16158 "printed."
16159 msgstr ""
16160
16161 #. type: TP
16162 #: build/C/man7/tcp.7:549
16163 #, no-wrap
16164 msgid "I<tcp_moderate_rcvbuf> (Boolean; default: enabled; since Linux 2.4.17/2.6.7)"
16165 msgstr ""
16166
16167 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16168 #. type: Plain text
16169 #: build/C/man7/tcp.7:556
16170 msgid ""
16171 "If enabled, TCP performs receive buffer auto-tuning, attempting to "
16172 "automatically size the buffer (no greater than I<tcp_rmem[2]>)  to match the "
16173 "size required by the path for full throughput."
16174 msgstr ""
16175
16176 #. type: TP
16177 #: build/C/man7/tcp.7:556
16178 #, no-wrap
16179 msgid "I<tcp_mem> (since Linux 2.4)"
16180 msgstr ""
16181
16182 #.  Since 2.4.0-test7
16183 #. type: Plain text
16184 #: build/C/man7/tcp.7:568
16185 msgid ""
16186 "This is a vector of 3 integers: [low, pressure, high].  These bounds, "
16187 "measured in units of the system page size, are used by TCP to track its "
16188 "memory usage.  The defaults are calculated at boot time from the amount of "
16189 "available memory.  (TCP can only use I<low memory> for this, which is "
16190 "limited to around 900 megabytes on 32-bit systems.  64-bit systems do not "
16191 "suffer this limitation.)"
16192 msgstr ""
16193
16194 #. type: TP
16195 #: build/C/man7/tcp.7:569
16196 #, no-wrap
16197 msgid "I<low>"
16198 msgstr ""
16199
16200 #. type: Plain text
16201 #: build/C/man7/tcp.7:573
16202 msgid ""
16203 "TCP doesn't regulate its memory allocation when the number of pages it has "
16204 "allocated globally is below this number."
16205 msgstr ""
16206
16207 #. type: TP
16208 #: build/C/man7/tcp.7:573 build/C/man7/udp.7:151
16209 #, no-wrap
16210 msgid "I<pressure>"
16211 msgstr ""
16212
16213 #. type: Plain text
16214 #: build/C/man7/tcp.7:582
16215 msgid ""
16216 "When the amount of memory allocated by TCP exceeds this number of pages, TCP "
16217 "moderates its memory consumption.  This memory pressure state is exited once "
16218 "the number of pages allocated falls below the I<low> mark."
16219 msgstr ""
16220
16221 #. type: TP
16222 #: build/C/man7/tcp.7:582
16223 #, no-wrap
16224 msgid "I<high>"
16225 msgstr ""
16226
16227 #. type: Plain text
16228 #: build/C/man7/tcp.7:586
16229 msgid ""
16230 "The maximum number of pages, globally, that TCP will allocate.  This value "
16231 "overrides any other limits imposed by the kernel."
16232 msgstr ""
16233
16234 #. type: TP
16235 #: build/C/man7/tcp.7:587
16236 #, no-wrap
16237 msgid "I<tcp_mtu_probing> (integer; default: 0; since Linux 2.6.17)"
16238 msgstr ""
16239
16240 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16241 #. type: Plain text
16242 #: build/C/man7/tcp.7:592
16243 msgid ""
16244 "This parameter controls TCP Packetization-Layer Path MTU Discovery.  The "
16245 "following values may be assigned to the file:"
16246 msgstr ""
16247
16248 #. type: Plain text
16249 #: build/C/man7/tcp.7:595
16250 msgid "Disabled"
16251 msgstr ""
16252
16253 #. type: Plain text
16254 #: build/C/man7/tcp.7:597
16255 msgid "Disabled by default, enabled when an ICMP black hole detected"
16256 msgstr ""
16257
16258 #. type: Plain text
16259 #: build/C/man7/tcp.7:600
16260 msgid "Always enabled, use initial MSS of I<tcp_base_mss>."
16261 msgstr ""
16262
16263 #. type: TP
16264 #: build/C/man7/tcp.7:601
16265 #, no-wrap
16266 msgid "I<tcp_no_metrics_save> (Boolean; default: disabled; since Linux 2.6.6)"
16267 msgstr ""
16268
16269 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16270 #. type: Plain text
16271 #: build/C/man7/tcp.7:612
16272 msgid ""
16273 "By default, TCP saves various connection metrics in the route cache when the "
16274 "connection closes, so that connections established in the near future can "
16275 "use these to set initial conditions.  Usually, this increases overall "
16276 "performance, but it may sometimes cause performance degradation.  If "
16277 "I<tcp_no_metrics_save> is enabled, TCP will not cache metrics on closing "
16278 "connections."
16279 msgstr ""
16280
16281 #. type: TP
16282 #: build/C/man7/tcp.7:612
16283 #, no-wrap
16284 msgid "I<tcp_orphan_retries> (integer; default: 8; since Linux 2.4)"
16285 msgstr ""
16286
16287 #.  Since 2.3.41
16288 #. type: Plain text
16289 #: build/C/man7/tcp.7:617
16290 msgid ""
16291 "The maximum number of attempts made to probe the other end of a connection "
16292 "which has been closed by our end."
16293 msgstr ""
16294
16295 #. type: TP
16296 #: build/C/man7/tcp.7:617
16297 #, no-wrap
16298 msgid "I<tcp_reordering> (integer; default: 3; since Linux 2.4)"
16299 msgstr ""
16300
16301 #.  Since 2.4.0-test7
16302 #. type: Plain text
16303 #: build/C/man7/tcp.7:626
16304 msgid ""
16305 "The maximum a packet can be reordered in a TCP packet stream without TCP "
16306 "assuming packet loss and going into slow start.  It is not advisable to "
16307 "change this number.  This is a packet reordering detection metric designed "
16308 "to minimize unnecessary back off and retransmits provoked by reordering of "
16309 "packets on a connection."
16310 msgstr ""
16311
16312 #. type: TP
16313 #: build/C/man7/tcp.7:626
16314 #, no-wrap
16315 msgid "I<tcp_retrans_collapse> (Boolean; default: enabled; since Linux 2.2)"
16316 msgstr ""
16317
16318 #.  Since 2.1.96
16319 #. type: Plain text
16320 #: build/C/man7/tcp.7:630
16321 msgid "Try to send full-sized packets during retransmit."
16322 msgstr ""
16323
16324 #. type: TP
16325 #: build/C/man7/tcp.7:630
16326 #, no-wrap
16327 msgid "I<tcp_retries1> (integer; default: 3; since Linux 2.2)"
16328 msgstr ""
16329
16330 #.  Since 2.1.43
16331 #. type: Plain text
16332 #: build/C/man7/tcp.7:640
16333 msgid ""
16334 "The number of times TCP will attempt to retransmit a packet on an "
16335 "established connection normally, without the extra effort of getting the "
16336 "network layers involved.  Once we exceed this number of retransmits, we "
16337 "first have the network layer update the route if possible before each new "
16338 "retransmit.  The default is the RFC specified minimum of 3."
16339 msgstr ""
16340
16341 #. type: TP
16342 #: build/C/man7/tcp.7:640
16343 #, no-wrap
16344 msgid "I<tcp_retries2> (integer; default: 15; since Linux 2.2)"
16345 msgstr ""
16346
16347 #.  Since 2.1.43
16348 #. type: Plain text
16349 #: build/C/man7/tcp.7:650
16350 msgid ""
16351 "The maximum number of times a TCP packet is retransmitted in established "
16352 "state before giving up.  The default value is 15, which corresponds to a "
16353 "duration of approximately between 13 to 30 minutes, depending on the "
16354 "retransmission timeout.  The RFC\\ 1122 specified minimum limit of 100 "
16355 "seconds is typically deemed too short."
16356 msgstr ""
16357
16358 #. type: TP
16359 #: build/C/man7/tcp.7:650
16360 #, no-wrap
16361 msgid "I<tcp_rfc1337> (Boolean; default: disabled; since Linux 2.2)"
16362 msgstr ""
16363
16364 #.  Since 2.1.90
16365 #. type: Plain text
16366 #: build/C/man7/tcp.7:658
16367 msgid ""
16368 "Enable TCP behavior conformant with RFC\\ 1337.  When disabled, if a RST is "
16369 "received in TIME_WAIT state, we close the socket immediately without waiting "
16370 "for the end of the TIME_WAIT period."
16371 msgstr ""
16372
16373 #. type: TP
16374 #: build/C/man7/tcp.7:658
16375 #, no-wrap
16376 msgid "I<tcp_rmem> (since Linux 2.4)"
16377 msgstr ""
16378
16379 #.  Since 2.4.0-test7
16380 #. type: Plain text
16381 #: build/C/man7/tcp.7:666
16382 msgid ""
16383 "This is a vector of 3 integers: [min, default, max].  These parameters are "
16384 "used by TCP to regulate receive buffer sizes.  TCP dynamically adjusts the "
16385 "size of the receive buffer from the defaults listed below, in the range of "
16386 "these values, depending on memory available in the system."
16387 msgstr ""
16388
16389 #. type: TP
16390 #: build/C/man7/tcp.7:667 build/C/man7/tcp.7:844 build/C/man7/udp.7:145
16391 #, no-wrap
16392 msgid "I<min>"
16393 msgstr ""
16394
16395 #. type: Plain text
16396 #: build/C/man7/tcp.7:682
16397 msgid ""
16398 "minimum size of the receive buffer used by each TCP socket.  The default "
16399 "value is the system page size.  (On Linux 2.4, the default value is 4K, "
16400 "lowered to B<PAGE_SIZE> bytes in low-memory systems.)  This value is used to "
16401 "ensure that in memory pressure mode, allocations below this size will still "
16402 "succeed.  This is not used to bound the size of the receive buffer declared "
16403 "using B<SO_RCVBUF> on a socket."
16404 msgstr ""
16405
16406 #. type: TP
16407 #: build/C/man7/tcp.7:682 build/C/man7/tcp.7:854
16408 #, no-wrap
16409 msgid "I<default>"
16410 msgstr ""
16411
16412 #. type: Plain text
16413 #: build/C/man7/tcp.7:696
16414 msgid ""
16415 "the default size of the receive buffer for a TCP socket.  This value "
16416 "overwrites the initial default buffer size from the generic global "
16417 "I<net.core.rmem_default> defined for all protocols.  The default value is "
16418 "87380 bytes.  (On Linux 2.4, this will be lowered to 43689 in low-memory "
16419 "systems.)  If larger receive buffer sizes are desired, this value should be "
16420 "increased (to affect all sockets).  To employ large TCP windows, the "
16421 "I<net.ipv4.tcp_window_scaling> must be enabled (default)."
16422 msgstr ""
16423
16424 #. type: TP
16425 #: build/C/man7/tcp.7:696 build/C/man7/tcp.7:868 build/C/man7/udp.7:157
16426 #, no-wrap
16427 msgid "I<max>"
16428 msgstr ""
16429
16430 #. type: Plain text
16431 #: build/C/man7/tcp.7:705
16432 msgid ""
16433 "the maximum size of the receive buffer used by each TCP socket.  This value "
16434 "does not override the global I<net.core.rmem_max>.  This is not used to "
16435 "limit the size of the receive buffer declared using B<SO_RCVBUF> on a "
16436 "socket.  The default value is calculated using the formula"
16437 msgstr ""
16438
16439 #. type: Plain text
16440 #: build/C/man7/tcp.7:707
16441 #, no-wrap
16442 msgid "    max(87380, min(4MB, I<tcp_mem>[1]*PAGE_SIZE/128))\n"
16443 msgstr ""
16444
16445 #. type: Plain text
16446 #: build/C/man7/tcp.7:710
16447 msgid ""
16448 "(On Linux 2.4, the default is 87380*2 bytes, lowered to 87380 in low-memory "
16449 "systems)."
16450 msgstr ""
16451
16452 #. type: TP
16453 #: build/C/man7/tcp.7:711
16454 #, no-wrap
16455 msgid "I<tcp_sack> (Boolean; default: enabled; since Linux 2.2)"
16456 msgstr ""
16457
16458 #.  Since 2.1.36
16459 #. type: Plain text
16460 #: build/C/man7/tcp.7:715
16461 msgid "Enable RFC\\ 2018 TCP Selective Acknowledgements."
16462 msgstr ""
16463
16464 #. type: TP
16465 #: build/C/man7/tcp.7:715
16466 #, no-wrap
16467 msgid "I<tcp_slow_start_after_idle> (Boolean; default: enabled; since Linux 2.6.18)"
16468 msgstr ""
16469
16470 #.  The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
16471 #. type: Plain text
16472 #: build/C/man7/tcp.7:723
16473 msgid ""
16474 "If enabled, provide RFC 2861 behavior and time out the congestion window "
16475 "after an idle period.  An idle period is defined as the current RTO "
16476 "(retransmission timeout).  If disabled, the congestion window will not be "
16477 "timed out after an idle period."
16478 msgstr ""
16479
16480 #. type: TP
16481 #: build/C/man7/tcp.7:723
16482 #, no-wrap
16483 msgid "I<tcp_stdurg> (Boolean; default: disabled; since Linux 2.2)"
16484 msgstr ""
16485
16486 #.  Since 2.1.44
16487 #.  RFC 793 was ambiguous in its specification of the meaning of the
16488 #.  urgent pointer.  RFC 1122 (and RFC 961) fixed on a particular
16489 #.  resolution of this ambiguity (unfortunately the "wrong" one).
16490 #. type: Plain text
16491 #: build/C/man7/tcp.7:737
16492 msgid ""
16493 "If this option is enabled, then use the RFC\\ 1122 interpretation of the TCP "
16494 "urgent-pointer field.  According to this interpretation, the urgent pointer "
16495 "points to the last byte of urgent data.  If this option is disabled, then "
16496 "use the BSD-compatible interpretation of the urgent pointer: the urgent "
16497 "pointer points to the first byte after the urgent data.  Enabling this "
16498 "option may lead to interoperability problems."
16499 msgstr ""
16500
16501 #. type: TP
16502 #: build/C/man7/tcp.7:737
16503 #, no-wrap
16504 msgid "I<tcp_syn_retries> (integer; default: 5; since Linux 2.2)"
16505 msgstr ""
16506
16507 #.  Since 2.1.38
16508 #. type: Plain text
16509 #: build/C/man7/tcp.7:744
16510 msgid ""
16511 "The maximum number of times initial SYNs for an active TCP connection "
16512 "attempt will be retransmitted.  This value should not be higher than 255.  "
16513 "The default value is 5, which corresponds to approximately 180 seconds."
16514 msgstr ""
16515
16516 #. type: TP
16517 #: build/C/man7/tcp.7:744
16518 #, no-wrap
16519 msgid "I<tcp_synack_retries> (integer; default: 5; since Linux 2.2)"
16520 msgstr ""
16521
16522 #.  Since 2.1.38
16523 #. type: Plain text
16524 #: build/C/man7/tcp.7:750
16525 msgid ""
16526 "The maximum number of times a SYN/ACK segment for a passive TCP connection "
16527 "will be retransmitted.  This number should not be higher than 255."
16528 msgstr ""
16529
16530 #. type: TP
16531 #: build/C/man7/tcp.7:750
16532 #, no-wrap
16533 msgid "I<tcp_syncookies> (Boolean; since Linux 2.2)"
16534 msgstr ""
16535
16536 #.  Since 2.1.43
16537 #. type: Plain text
16538 #: build/C/man7/tcp.7:770
16539 msgid ""
16540 "Enable TCP syncookies.  The kernel must be compiled with "
16541 "B<CONFIG_SYN_COOKIES>.  Send out syncookies when the syn backlog queue of a "
16542 "socket overflows.  The syncookies feature attempts to protect a socket from "
16543 "a SYN flood attack.  This should be used as a last resort, if at all.  This "
16544 "is a violation of the TCP protocol, and conflicts with other areas of TCP "
16545 "such as TCP extensions.  It can cause problems for clients and relays.  It "
16546 "is not recommended as a tuning mechanism for heavily loaded servers to help "
16547 "with overloaded or misconfigured conditions.  For recommended alternatives "
16548 "see I<tcp_max_syn_backlog>, I<tcp_synack_retries>, and "
16549 "I<tcp_abort_on_overflow>."
16550 msgstr ""
16551
16552 #. type: TP
16553 #: build/C/man7/tcp.7:770
16554 #, no-wrap
16555 msgid "I<tcp_timestamps> (Boolean; default: enabled; since Linux 2.2)"
16556 msgstr ""
16557
16558 #.  Since 2.1.36
16559 #. type: Plain text
16560 #: build/C/man7/tcp.7:774
16561 msgid "Enable RFC\\ 1323 TCP timestamps."
16562 msgstr ""
16563
16564 #. type: TP
16565 #: build/C/man7/tcp.7:774
16566 #, no-wrap
16567 msgid "I<tcp_tso_win_divisor> (integer; default: 3; since Linux 2.6.9)"
16568 msgstr ""
16569
16570 #. type: Plain text
16571 #: build/C/man7/tcp.7:780
16572 msgid ""
16573 "This parameter controls what percentage of the congestion window can be "
16574 "consumed by a single TCP Segmentation Offload (TSO) frame.  The setting of "
16575 "this parameter is a tradeoff between burstiness and building larger TSO "
16576 "frames."
16577 msgstr ""
16578
16579 #. type: TP
16580 #: build/C/man7/tcp.7:780
16581 #, no-wrap
16582 msgid "I<tcp_tw_recycle> (Boolean; default: disabled; since Linux 2.4)"
16583 msgstr ""
16584
16585 #.  Since 2.3.15
16586 #
16587 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16588 #. type: Plain text
16589 #: build/C/man7/tcp.7:790
16590 msgid ""
16591 "Enable fast recycling of TIME_WAIT sockets. Enabling this option is not "
16592 "recommended for devices communicating with the general Internet or using NAT "
16593 "(Network Address Translation). Since some NAT gateways pass through IP "
16594 "timestamp values, one IP can appear to have non-increasing timestamps. See "
16595 "RFC 1323 (PAWS), RFC 6191."
16596 msgstr ""
16597
16598 #. type: TP
16599 #: build/C/man7/tcp.7:790
16600 #, no-wrap
16601 msgid "I<tcp_tw_reuse> (Boolean; default: disabled; since Linux 2.4.19/2.6)"
16602 msgstr ""
16603
16604 #.  Since 2.4.19/2.5.43
16605 #
16606 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16607 #. type: Plain text
16608 #: build/C/man7/tcp.7:798
16609 msgid ""
16610 "Allow to reuse TIME_WAIT sockets for new connections when it is safe from "
16611 "protocol viewpoint.  It should not be changed without advice/request of "
16612 "technical experts."
16613 msgstr ""
16614
16615 #. type: TP
16616 #: build/C/man7/tcp.7:798
16617 #, no-wrap
16618 msgid "I<tcp_vegas_cong_avoid> (Boolean; default: disabled; Linux 2.2 to 2.6.13)"
16619 msgstr ""
16620
16621 #.  Since 2.1.8; removed in 2.6.13
16622 #
16623 #.  The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
16624 #. type: Plain text
16625 #: build/C/man7/tcp.7:809
16626 msgid ""
16627 "Enable TCP Vegas congestion avoidance algorithm.  TCP Vegas is a sender-side "
16628 "only change to TCP that anticipates the onset of congestion by estimating "
16629 "the bandwidth.  TCP Vegas adjusts the sending rate by modifying the "
16630 "congestion window.  TCP Vegas should provide less packet loss, but it is not "
16631 "as aggressive as TCP Reno."
16632 msgstr ""
16633
16634 #. type: TP
16635 #: build/C/man7/tcp.7:809
16636 #, no-wrap
16637 msgid "I<tcp_westwood> (Boolean; default: disabled; Linux 2.4.26/2.6.3 to 2.6.13)"
16638 msgstr ""
16639
16640 #. type: Plain text
16641 #: build/C/man7/tcp.7:821
16642 msgid ""
16643 "Enable TCP Westwood+ congestion control algorithm.  TCP Westwood+ is a "
16644 "sender-side only modification of the TCP Reno protocol stack that optimizes "
16645 "the performance of TCP congestion control.  It is based on end-to-end "
16646 "bandwidth estimation to set congestion window and slow start threshold after "
16647 "a congestion episode.  Using this estimation, TCP Westwood+ adaptively sets "
16648 "a slow start threshold and a congestion window which takes into account the "
16649 "bandwidth used at the time congestion is experienced.  TCP Westwood+ "
16650 "significantly increases fairness with respect to TCP Reno in wired networks "
16651 "and throughput over wireless links."
16652 msgstr ""
16653
16654 #. type: TP
16655 #: build/C/man7/tcp.7:821
16656 #, no-wrap
16657 msgid "I<tcp_window_scaling> (Boolean; default: enabled; since Linux 2.2)"
16658 msgstr ""
16659
16660 #.  Since 2.1.36
16661 #. type: Plain text
16662 #: build/C/man7/tcp.7:835
16663 msgid ""
16664 "Enable RFC\\ 1323 TCP window scaling.  This feature allows the use of a "
16665 "large window (E<gt> 64K) on a TCP connection, should the other end support "
16666 "it.  Normally, the 16 bit window length field in the TCP header limits the "
16667 "window size to less than 64K bytes.  If larger windows are desired, "
16668 "applications can increase the size of their socket buffers and the window "
16669 "scaling option will be employed.  If I<tcp_window_scaling> is disabled, TCP "
16670 "will not negotiate the use of window scaling with the other end during "
16671 "connection setup."
16672 msgstr ""
16673
16674 #. type: TP
16675 #: build/C/man7/tcp.7:835
16676 #, no-wrap
16677 msgid "I<tcp_wmem> (since Linux 2.4)"
16678 msgstr ""
16679
16680 #.  Since 2.4.0-test7
16681 #. type: Plain text
16682 #: build/C/man7/tcp.7:843
16683 msgid ""
16684 "This is a vector of 3 integers: [min, default, max].  These parameters are "
16685 "used by TCP to regulate send buffer sizes.  TCP dynamically adjusts the size "
16686 "of the send buffer from the default values listed below, in the range of "
16687 "these values, depending on memory available."
16688 msgstr ""
16689
16690 #. type: Plain text
16691 #: build/C/man7/tcp.7:854
16692 msgid ""
16693 "Minimum size of the send buffer used by each TCP socket.  The default value "
16694 "is the system page size.  (On Linux 2.4, the default value is 4K bytes.)  "
16695 "This value is used to ensure that in memory pressure mode, allocations below "
16696 "this size will still succeed.  This is not used to bound the size of the "
16697 "send buffer declared using B<SO_SNDBUF> on a socket."
16698 msgstr ""
16699
16700 #.  True in Linux 2.4 and 2.6
16701 #. type: Plain text
16702 #: build/C/man7/tcp.7:868
16703 msgid ""
16704 "The default size of the send buffer for a TCP socket.  This value overwrites "
16705 "the initial default buffer size from the generic global "
16706 "I</proc/sys/net/core/wmem_default> defined for all protocols.  The default "
16707 "value is 16K bytes.  If larger send buffer sizes are desired, this value "
16708 "should be increased (to affect all sockets).  To employ large TCP windows, "
16709 "the I</proc/sys/net/ipv4/tcp_window_scaling> must be set to a nonzero value "
16710 "(default)."
16711 msgstr ""
16712
16713 #. type: Plain text
16714 #: build/C/man7/tcp.7:877
16715 msgid ""
16716 "The maximum size of the send buffer used by each TCP socket.  This value "
16717 "does not override the value in I</proc/sys/net/core/wmem_max>.  This is not "
16718 "used to limit the size of the send buffer declared using B<SO_SNDBUF> on a "
16719 "socket.  The default value is calculated using the formula"
16720 msgstr ""
16721
16722 #. type: Plain text
16723 #: build/C/man7/tcp.7:879
16724 #, no-wrap
16725 msgid "    max(65536, min(4MB, I<tcp_mem>[1]*PAGE_SIZE/128))\n"
16726 msgstr ""
16727
16728 #. type: Plain text
16729 #: build/C/man7/tcp.7:882
16730 msgid ""
16731 "(On Linux 2.4, the default value is 128K bytes, lowered 64K depending on "
16732 "low-memory systems.)"
16733 msgstr ""
16734
16735 #. type: TP
16736 #: build/C/man7/tcp.7:883
16737 #, no-wrap
16738 msgid ""
16739 "I<tcp_workaround_signed_windows> (Boolean; default: disabled; since Linux "
16740 "2.6.26)"
16741 msgstr ""
16742
16743 #. type: Plain text
16744 #: build/C/man7/tcp.7:889
16745 msgid ""
16746 "If enabled, assume that no receipt of a window-scaling option means that the "
16747 "remote TCP is broken and treats the window as a signed quantity.  If "
16748 "disabled, assume that the remote TCP is not broken even if we do not receive "
16749 "a window scaling option from it."
16750 msgstr ""
16751
16752 #.  or SOL_TCP on Linux
16753 #. type: Plain text
16754 #: build/C/man7/tcp.7:907
16755 msgid ""
16756 "To set or get a TCP socket option, call B<getsockopt>(2)  to read or "
16757 "B<setsockopt>(2)  to write the option with the option level argument set to "
16758 "B<IPPROTO_TCP>.  Unless otherwise noted, I<optval> is a pointer to an "
16759 "I<int>.  In addition, most B<IPPROTO_IP> socket options are valid on TCP "
16760 "sockets.  For more information see B<ip>(7)."
16761 msgstr ""
16762
16763 #. type: TP
16764 #: build/C/man7/tcp.7:907
16765 #, no-wrap
16766 msgid "B<TCP_CONGESTION> (since Linux 2.6.13)"
16767 msgstr ""
16768
16769 #.          commit 5f8ef48d240963093451bcf83df89f1a1364f51d
16770 #.          Author: Stephen Hemminger <shemminger@osdl.org>
16771 #. type: Plain text
16772 #: build/C/man7/tcp.7:923
16773 msgid ""
16774 "The argument for this option is a string.  This option allows the caller to "
16775 "set the TCP congestion control algorithm to be used, on a per-socket basis.  "
16776 "Unprivileged processes are restricted to choosing one of the algorithms in "
16777 "I<tcp_allowed_congestion_control> (described above).  Privileged processes "
16778 "(B<CAP_NET_ADMIN>)  can choose from any of the available congestion-control "
16779 "algorithms (see the description of I<tcp_available_congestion_control> "
16780 "above)."
16781 msgstr ""
16782
16783 #. type: TP
16784 #: build/C/man7/tcp.7:923
16785 #, no-wrap
16786 msgid "B<TCP_CORK> (since Linux 2.2)"
16787 msgstr ""
16788
16789 #.  precisely: since 2.1.127
16790 #. type: Plain text
16791 #: build/C/man7/tcp.7:939
16792 msgid ""
16793 "If set, don't send out partial frames.  All queued partial frames are sent "
16794 "when the option is cleared again.  This is useful for prepending headers "
16795 "before calling B<sendfile>(2), or for throughput optimization.  As currently "
16796 "implemented, there is a 200 millisecond ceiling on the time for which output "
16797 "is corked by B<TCP_CORK>.  If this ceiling is reached, then queued data is "
16798 "automatically transmitted.  This option can be combined with B<TCP_NODELAY> "
16799 "only since Linux 2.5.71.  This option should not be used in code intended to "
16800 "be portable."
16801 msgstr ""
16802
16803 #. type: TP
16804 #: build/C/man7/tcp.7:939
16805 #, no-wrap
16806 msgid "B<TCP_DEFER_ACCEPT> (since Linux 2.4)"
16807 msgstr ""
16808
16809 #.  Precisely: since 2.3.38
16810 #.  Useful references:
16811 #.  http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
16812 #.  http://unix.stackexchange.com/questions/94104/real-world-use-of-tcp-defer-accept
16813 #. type: Plain text
16814 #: build/C/man7/tcp.7:950
16815 msgid ""
16816 "Allow a listener to be awakened only when data arrives on the socket.  Takes "
16817 "an integer value (seconds), this can bound the maximum number of attempts "
16818 "TCP will make to complete the connection.  This option should not be used in "
16819 "code intended to be portable."
16820 msgstr ""
16821
16822 #. type: TP
16823 #: build/C/man7/tcp.7:950
16824 #, no-wrap
16825 msgid "B<TCP_INFO> (since Linux 2.4)"
16826 msgstr ""
16827
16828 #. type: Plain text
16829 #: build/C/man7/tcp.7:956
16830 msgid ""
16831 "Used to collect information about this socket.  The kernel returns a "
16832 "I<struct tcp_info> as defined in the file I</usr/include/linux/tcp.h>.  This "
16833 "option should not be used in code intended to be portable."
16834 msgstr ""
16835
16836 #. type: TP
16837 #: build/C/man7/tcp.7:956
16838 #, no-wrap
16839 msgid "B<TCP_KEEPCNT> (since Linux 2.4)"
16840 msgstr ""
16841
16842 #.  Precisely: since 2.3.18
16843 #. type: Plain text
16844 #: build/C/man7/tcp.7:963
16845 msgid ""
16846 "The maximum number of keepalive probes TCP should send before dropping the "
16847 "connection.  This option should not be used in code intended to be portable."
16848 msgstr ""
16849
16850 #. type: TP
16851 #: build/C/man7/tcp.7:963
16852 #, no-wrap
16853 msgid "B<TCP_KEEPIDLE> (since Linux 2.4)"
16854 msgstr ""
16855
16856 #.  Precisely: since 2.3.18
16857 #. type: Plain text
16858 #: build/C/man7/tcp.7:972
16859 msgid ""
16860 "The time (in seconds) the connection needs to remain idle before TCP starts "
16861 "sending keepalive probes, if the socket option B<SO_KEEPALIVE> has been set "
16862 "on this socket.  This option should not be used in code intended to be "
16863 "portable."
16864 msgstr ""
16865
16866 #. type: TP
16867 #: build/C/man7/tcp.7:972
16868 #, no-wrap
16869 msgid "B<TCP_KEEPINTVL> (since Linux 2.4)"
16870 msgstr ""
16871
16872 #.  Precisely: since 2.3.18
16873 #. type: Plain text
16874 #: build/C/man7/tcp.7:977
16875 msgid ""
16876 "The time (in seconds) between individual keepalive probes.  This option "
16877 "should not be used in code intended to be portable."
16878 msgstr ""
16879
16880 #. type: TP
16881 #: build/C/man7/tcp.7:977
16882 #, no-wrap
16883 msgid "B<TCP_LINGER2> (since Linux 2.4)"
16884 msgstr ""
16885
16886 #.  Precisely: since 2.3.41
16887 #. type: Plain text
16888 #: build/C/man7/tcp.7:989
16889 msgid ""
16890 "The lifetime of orphaned FIN_WAIT2 state sockets.  This option can be used "
16891 "to override the system-wide setting in the file "
16892 "I</proc/sys/net/ipv4/tcp_fin_timeout> for this socket.  This is not to be "
16893 "confused with the B<socket>(7)  level option B<SO_LINGER>.  This option "
16894 "should not be used in code intended to be portable."
16895 msgstr ""
16896
16897 #. type: TP
16898 #: build/C/man7/tcp.7:989
16899 #, no-wrap
16900 msgid "B<TCP_MAXSEG>"
16901 msgstr ""
16902
16903 #.  Present in Linux 1.0
16904 #. type: Plain text
16905 #: build/C/man7/tcp.7:999
16906 msgid ""
16907 "The maximum segment size for outgoing TCP packets.  In Linux 2.2 and "
16908 "earlier, and in Linux 2.6.28 and later, if this option is set before "
16909 "connection establishment, it also changes the MSS value announced to the "
16910 "other end in the initial packet.  Values greater than the (eventual) "
16911 "interface MTU have no effect.  TCP will also impose its minimum and maximum "
16912 "bounds over the value provided."
16913 msgstr ""
16914
16915 #. type: TP
16916 #: build/C/man7/tcp.7:999
16917 #, no-wrap
16918 msgid "B<TCP_NODELAY>"
16919 msgstr ""
16920
16921 #.  Present in Linux 1.0
16922 #. type: Plain text
16923 #: build/C/man7/tcp.7:1016
16924 msgid ""
16925 "If set, disable the Nagle algorithm.  This means that segments are always "
16926 "sent as soon as possible, even if there is only a small amount of data.  "
16927 "When not set, data is buffered until there is a sufficient amount to send "
16928 "out, thereby avoiding the frequent sending of small packets, which results "
16929 "in poor utilization of the network.  This option is overridden by "
16930 "B<TCP_CORK>; however, setting this option forces an explicit flush of "
16931 "pending output, even if B<TCP_CORK> is currently set."
16932 msgstr ""
16933
16934 #. type: TP
16935 #: build/C/man7/tcp.7:1016
16936 #, no-wrap
16937 msgid "B<TCP_QUICKACK> (since Linux 2.4.4)"
16938 msgstr ""
16939
16940 #. type: Plain text
16941 #: build/C/man7/tcp.7:1031
16942 msgid ""
16943 "Enable quickack mode if set or disable quickack mode if cleared.  In "
16944 "quickack mode, acks are sent immediately, rather than delayed if needed in "
16945 "accordance to normal TCP operation.  This flag is not permanent, it only "
16946 "enables a switch to or from quickack mode.  Subsequent operation of the TCP "
16947 "protocol will once again enter/leave quickack mode depending on internal "
16948 "protocol processing and factors such as delayed ack timeouts occurring and "
16949 "data transfer.  This option should not be used in code intended to be "
16950 "portable."
16951 msgstr ""
16952
16953 #. type: TP
16954 #: build/C/man7/tcp.7:1031
16955 #, no-wrap
16956 msgid "B<TCP_SYNCNT> (since Linux 2.4)"
16957 msgstr ""
16958
16959 #.  Precisely: since 2.3.18
16960 #. type: Plain text
16961 #: build/C/man7/tcp.7:1038
16962 msgid ""
16963 "Set the number of SYN retransmits that TCP should send before aborting the "
16964 "attempt to connect.  It cannot exceed 255.  This option should not be used "
16965 "in code intended to be portable."
16966 msgstr ""
16967
16968 #. type: TP
16969 #: build/C/man7/tcp.7:1038
16970 #, no-wrap
16971 msgid "B<TCP_USER_TIMEOUT> (since Linux 2.6.37)"
16972 msgstr ""
16973
16974 #.          commit dca43c75e7e545694a9dd6288553f55c53e2a3a3
16975 #.          Author: Jerry Chu <hkchu@google.com>
16976 #.  The following text taken nearly verbatim from Jerry Chu's (excellent)
16977 #.  commit message.
16978 #. type: Plain text
16979 #: build/C/man7/tcp.7:1056
16980 msgid ""
16981 "This option takes an I<unsigned int> as an argument.  When the value is "
16982 "greater than 0, it specifies the maximum amount of time in milliseconds that "
16983 "transmitted data may remain unacknowledged before TCP will forcibly close "
16984 "the corresponding connection and return B<ETIMEDOUT> to the application.  If "
16985 "the option value is specified as 0, TCP will to use the system default."
16986 msgstr ""
16987
16988 #. type: Plain text
16989 #: build/C/man7/tcp.7:1063
16990 msgid ""
16991 "Increasing user timeouts allows a TCP connection to survive extended periods "
16992 "without end-to-end connectivity.  Decreasing user timeouts allows "
16993 "applications to \"fail fast\", if so desired.  Otherwise, failure may take "
16994 "up to 20 minutes with the current system defaults in a normal WAN "
16995 "environment."
16996 msgstr ""
16997
16998 #. type: Plain text
16999 #: build/C/man7/tcp.7:1073
17000 msgid ""
17001 "This option can be set during any state of a TCP connection, but is only "
17002 "effective during the synchronized states of a connection (ESTABLISHED, "
17003 "FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK).  Moreover, when "
17004 "used with the TCP keepalive (B<SO_KEEPALIVE>)  option, B<TCP_USER_TIMEOUT> "
17005 "will override keepalive to determine when to close a connection due to "
17006 "keepalive failure."
17007 msgstr ""
17008
17009 #. type: Plain text
17010 #: build/C/man7/tcp.7:1076
17011 msgid ""
17012 "The option has no effect on when TCP retransmits a packet, nor when a "
17013 "keepalive probe is sent."
17014 msgstr ""
17015
17016 #. type: Plain text
17017 #: build/C/man7/tcp.7:1080
17018 msgid ""
17019 "This option, like many others, will be inherited by the socket returned by "
17020 "B<accept>(2), if it was set on the listening socket."
17021 msgstr ""
17022
17023 #. type: Plain text
17024 #: build/C/man7/tcp.7:1083
17025 msgid ""
17026 "Further details on the user timeout feature can be found in RFC\\ 793 and "
17027 "RFC\\ 5482 (\"TCP User Timeout Option\")."
17028 msgstr ""
17029
17030 #. type: TP
17031 #: build/C/man7/tcp.7:1083
17032 #, no-wrap
17033 msgid "B<TCP_WINDOW_CLAMP> (since Linux 2.4)"
17034 msgstr ""
17035
17036 #.  Precisely: since 2.3.41
17037 #. type: Plain text
17038 #: build/C/man7/tcp.7:1090
17039 msgid ""
17040 "Bound the size of the advertised window to this value.  The kernel imposes a "
17041 "minimum size of SOCK_MIN_RCVBUF/2.  This option should not be used in code "
17042 "intended to be portable."
17043 msgstr ""
17044
17045 #. type: SS
17046 #: build/C/man7/tcp.7:1090 build/C/man7/unix.7:260
17047 #, no-wrap
17048 msgid "Sockets API"
17049 msgstr ""
17050
17051 #. type: Plain text
17052 #: build/C/man7/tcp.7:1099
17053 msgid ""
17054 "TCP provides limited support for out-of-band data, in the form of (a single "
17055 "byte of) urgent data.  In Linux this means if the other end sends newer "
17056 "out-of-band data the older urgent data is inserted as normal data into the "
17057 "stream (even when B<SO_OOBINLINE> is not set).  This differs from BSD-based "
17058 "stacks."
17059 msgstr ""
17060
17061 #. type: Plain text
17062 #: build/C/man7/tcp.7:1106
17063 msgid ""
17064 "Linux uses the BSD compatible interpretation of the urgent pointer field by "
17065 "default.  This violates RFC\\ 1122, but is required for interoperability "
17066 "with other stacks.  It can be changed via I</proc/sys/net/ipv4/tcp_stdurg>."
17067 msgstr ""
17068
17069 #. type: Plain text
17070 #: build/C/man7/tcp.7:1111
17071 msgid ""
17072 "It is possible to peek at out-of-band data using the B<recv>(2)  B<MSG_PEEK> "
17073 "flag."
17074 msgstr ""
17075
17076 #. type: Plain text
17077 #: build/C/man7/tcp.7:1127
17078 msgid ""
17079 "Since version 2.4, Linux supports the use of B<MSG_TRUNC> in the I<flags> "
17080 "argument of B<recv>(2)  (and B<recvmsg>(2)).  This flag causes the received "
17081 "bytes of data to be discarded, rather than passed back in a caller-supplied "
17082 "buffer.  Since Linux 2.4.4, B<MSG_TRUNC> also has this effect when used in "
17083 "conjunction with B<MSG_OOB> to receive out-of-band data."
17084 msgstr ""
17085
17086 #. type: Plain text
17087 #: build/C/man7/tcp.7:1133 build/C/man7/unix.7:373
17088 msgid ""
17089 "The following B<ioctl>(2)  calls return information in I<value>.  The "
17090 "correct syntax is:"
17091 msgstr ""
17092
17093 #. type: Plain text
17094 #: build/C/man7/tcp.7:1138
17095 #, no-wrap
17096 msgid ""
17097 "B<int>I< value>B<;>\n"
17098 "I<error>B< = ioctl(>I<tcp_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
17099 msgstr ""
17100
17101 #. type: Plain text
17102 #: build/C/man7/tcp.7:1143
17103 msgid "I<ioctl_type> is one of the following:"
17104 msgstr ""
17105
17106 #. type: TP
17107 #: build/C/man7/tcp.7:1143 build/C/man7/unix.7:383
17108 #, no-wrap
17109 msgid "B<SIOCINQ>"
17110 msgstr ""
17111
17112 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
17113 #.  filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
17114 #.  SIOCOUTQ also has an effect for UNIX domain sockets, but not
17115 #.  quite what userland might expect. It seems to return the number
17116 #.  of bytes allocated for buffers containing pending output.
17117 #.  That number is normally larger than the number of bytes of pending
17118 #.  output. Since this info is, from userland's point of view, imprecise,
17119 #.  and it may well change, probably best not to document this now.
17120 #. type: Plain text
17121 #: build/C/man7/tcp.7:1159 build/C/man7/unix.7:405
17122 msgid ""
17123 "Returns the amount of queued unread data in the receive buffer.  The socket "
17124 "must not be in LISTEN state, otherwise an error (B<EINVAL>)  is returned.  "
17125 "B<SIOCINQ> is defined in I<E<lt>linux/sockios.hE<gt>>.  Alternatively, you "
17126 "can use the synonymous B<FIONREAD>, defined in I<E<lt>sys/ioctl.hE<gt>>."
17127 msgstr ""
17128
17129 #. type: TP
17130 #: build/C/man7/tcp.7:1159
17131 #, no-wrap
17132 msgid "B<SIOCATMARK>"
17133 msgstr ""
17134
17135 #. type: Plain text
17136 #: build/C/man7/tcp.7:1164
17137 msgid ""
17138 "Returns true (i.e., I<value> is nonzero) if the inbound data stream is at "
17139 "the urgent mark."
17140 msgstr ""
17141
17142 #. type: Plain text
17143 #: build/C/man7/tcp.7:1180
17144 msgid ""
17145 "If the B<SO_OOBINLINE> socket option is set, and B<SIOCATMARK> returns true, "
17146 "then the next read from the socket will return the urgent data.  If the "
17147 "B<SO_OOBINLINE> socket option is not set, and B<SIOCATMARK> returns true, "
17148 "then the next read from the socket will return the bytes following the "
17149 "urgent data (to actually read the urgent data requires the B<recv(MSG_OOB)> "
17150 "flag)."
17151 msgstr ""
17152
17153 #. type: Plain text
17154 #: build/C/man7/tcp.7:1194
17155 msgid ""
17156 "Note that a read never reads across the urgent mark.  If an application is "
17157 "informed of the presence of urgent data via B<select>(2)  (using the "
17158 "I<exceptfds> argument) or through delivery of a B<SIGURG> signal, then it "
17159 "can advance up to the mark using a loop which repeatedly tests B<SIOCATMARK> "
17160 "and performs a read (requesting any number of bytes) as long as "
17161 "B<SIOCATMARK> returns false."
17162 msgstr ""
17163
17164 #. type: TP
17165 #: build/C/man7/tcp.7:1194
17166 #, no-wrap
17167 msgid "B<SIOCOUTQ>"
17168 msgstr ""
17169
17170 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
17171 #.  filed 2010-09-10, may cause SIOCOUTQ to be defined in glibc headers
17172 #. type: Plain text
17173 #: build/C/man7/tcp.7:1210
17174 msgid ""
17175 "Returns the amount of unsent data in the socket send queue.  The socket must "
17176 "not be in LISTEN state, otherwise an error (B<EINVAL>)  is returned.  "
17177 "B<SIOCOUTQ> is defined in I<E<lt>linux/sockios.hE<gt>>.  Alternatively, you "
17178 "can use the synonymous B<TIOCOUTQ>, defined in I<E<lt>sys/ioctl.hE<gt>>."
17179 msgstr ""
17180
17181 #. type: Plain text
17182 #: build/C/man7/tcp.7:1215
17183 msgid ""
17184 "When a network error occurs, TCP tries to resend the packet.  If it doesn't "
17185 "succeed after some time, either B<ETIMEDOUT> or the last received error on "
17186 "this connection is reported."
17187 msgstr ""
17188
17189 #. type: Plain text
17190 #: build/C/man7/tcp.7:1226
17191 msgid ""
17192 "Some applications require a quicker error notification.  This can be enabled "
17193 "with the B<IPPROTO_IP> level B<IP_RECVERR> socket option.  When this option "
17194 "is enabled, all incoming errors are immediately passed to the user program.  "
17195 "Use this option with care \\(em it makes TCP less tolerant to routing "
17196 "changes and other normal network conditions."
17197 msgstr ""
17198
17199 #. type: TP
17200 #: build/C/man7/tcp.7:1227
17201 #, no-wrap
17202 msgid "B<EAFNOTSUPPORT>"
17203 msgstr ""
17204
17205 #. type: Plain text
17206 #: build/C/man7/tcp.7:1233
17207 msgid "Passed socket address type in I<sin_family> was not B<AF_INET>."
17208 msgstr ""
17209
17210 #. type: Plain text
17211 #: build/C/man7/tcp.7:1237
17212 msgid ""
17213 "The other end closed the socket unexpectedly or a read is executed on a shut "
17214 "down socket."
17215 msgstr ""
17216
17217 #. type: TP
17218 #: build/C/man7/tcp.7:1237
17219 #, no-wrap
17220 msgid "B<ETIMEDOUT>"
17221 msgstr ""
17222
17223 #. type: Plain text
17224 #: build/C/man7/tcp.7:1240
17225 msgid "The other end didn't acknowledge retransmitted data after some time."
17226 msgstr ""
17227
17228 #. type: Plain text
17229 #: build/C/man7/tcp.7:1244
17230 msgid ""
17231 "Any errors defined for B<ip>(7)  or the generic socket layer may also be "
17232 "returned for TCP."
17233 msgstr ""
17234
17235 #. type: Plain text
17236 #: build/C/man7/tcp.7:1251
17237 msgid ""
17238 "Support for Explicit Congestion Notification, zero-copy B<sendfile>(2), "
17239 "reordering support and some SACK extensions (DSACK) were introduced in 2.4.  "
17240 "Support for forward acknowledgement (FACK), TIME_WAIT recycling, and "
17241 "per-connection keepalive socket options were introduced in 2.3."
17242 msgstr ""
17243
17244 #. type: Plain text
17245 #: build/C/man7/tcp.7:1253
17246 msgid "Not all errors are documented."
17247 msgstr ""
17248
17249 #.  Only a single Linux kernel version is described
17250 #.  Info for 2.2 was lost. Should be added again,
17251 #.  or put into a separate page.
17252 #.  .SH AUTHORS
17253 #.  This man page was originally written by Andi Kleen.
17254 #.  It was updated for 2.4 by Nivedita Singhvi with input from
17255 #.  Alexey Kuznetsov's Documentation/networking/ip-sysctl.txt
17256 #.  document.
17257 #. type: Plain text
17258 #: build/C/man7/tcp.7:1263
17259 msgid "IPv6 is not described."
17260 msgstr ""
17261
17262 #. type: Plain text
17263 #: build/C/man7/tcp.7:1275
17264 msgid ""
17265 "B<accept>(2), B<bind>(2), B<connect>(2), B<getsockopt>(2), B<listen>(2), "
17266 "B<recvmsg>(2), B<sendfile>(2), B<sendmsg>(2), B<socket>(2), B<ip>(7), "
17267 "B<socket>(7)"
17268 msgstr ""
17269
17270 #. type: Plain text
17271 #: build/C/man7/tcp.7:1277
17272 msgid "RFC\\ 793 for the TCP specification."
17273 msgstr ""
17274
17275 #. type: Plain text
17276 #: build/C/man7/tcp.7:1279
17277 msgid ""
17278 "RFC\\ 1122 for the TCP requirements and a description of the Nagle "
17279 "algorithm."
17280 msgstr ""
17281
17282 #. type: Plain text
17283 #: build/C/man7/tcp.7:1281
17284 msgid "RFC\\ 1323 for TCP timestamp and window scaling options."
17285 msgstr ""
17286
17287 #. type: Plain text
17288 #: build/C/man7/tcp.7:1283
17289 msgid "RFC\\ 1337 for a description of TIME_WAIT assassination hazards."
17290 msgstr ""
17291
17292 #. type: Plain text
17293 #: build/C/man7/tcp.7:1285
17294 msgid "RFC\\ 3168 for a description of Explicit Congestion Notification."
17295 msgstr ""
17296
17297 #. type: Plain text
17298 #: build/C/man7/tcp.7:1287
17299 msgid "RFC\\ 2581 for TCP congestion control algorithms."
17300 msgstr ""
17301
17302 #. type: Plain text
17303 #: build/C/man7/tcp.7:1288
17304 msgid "RFC\\ 2018 and RFC\\ 2883 for SACK and extensions to SACK."
17305 msgstr ""
17306
17307 #. type: TH
17308 #: build/C/man7/udp.7:12
17309 #, no-wrap
17310 msgid "UDP"
17311 msgstr ""
17312
17313 #. type: TH
17314 #: build/C/man7/udp.7:12
17315 #, no-wrap
17316 msgid "2013-07-31"
17317 msgstr ""
17318
17319 #. type: Plain text
17320 #: build/C/man7/udp.7:15
17321 msgid "udp - User Datagram Protocol for IPv4"
17322 msgstr ""
17323
17324 #. type: Plain text
17325 #: build/C/man7/udp.7:21
17326 msgid "B<#include E<lt>netinet/udp.hE<gt>>"
17327 msgstr ""
17328
17329 #. type: Plain text
17330 #: build/C/man7/udp.7:23
17331 msgid "B<udp_socket = socket(AF_INET, SOCK_DGRAM, 0);>"
17332 msgstr ""
17333
17334 #. type: Plain text
17335 #: build/C/man7/udp.7:29
17336 msgid ""
17337 "This is an implementation of the User Datagram Protocol described in RFC\\ "
17338 "768.  It implements a connectionless, unreliable datagram packet service.  "
17339 "Packets may be reordered or duplicated before they arrive.  UDP generates "
17340 "and checks checksums to catch transmission errors."
17341 msgstr ""
17342
17343 #. type: Plain text
17344 #: build/C/man7/udp.7:58
17345 msgid ""
17346 "When a UDP socket is created, its local and remote addresses are "
17347 "unspecified.  Datagrams can be sent immediately using B<sendto>(2)  or "
17348 "B<sendmsg>(2)  with a valid destination address as an argument.  When "
17349 "B<connect>(2)  is called on the socket, the default destination address is "
17350 "set and datagrams can now be sent using B<send>(2)  or B<write>(2)  without "
17351 "specifying a destination address.  It is still possible to send to other "
17352 "destinations by passing an address to B<sendto>(2)  or B<sendmsg>(2).  In "
17353 "order to receive packets, the socket can be bound to a local address first "
17354 "by using B<bind>(2).  Otherwise, the socket layer will automatically assign "
17355 "a free local port out of the range defined by "
17356 "I</proc/sys/net/ipv4/ip_local_port_range> and bind the socket to "
17357 "B<INADDR_ANY>."
17358 msgstr ""
17359
17360 #. type: Plain text
17361 #: build/C/man7/udp.7:66
17362 msgid ""
17363 "All receive operations return only one packet.  When the packet is smaller "
17364 "than the passed buffer, only that much data is returned; when it is bigger, "
17365 "the packet is truncated and the B<MSG_TRUNC> flag is set.  B<MSG_WAITALL> is "
17366 "not supported."
17367 msgstr ""
17368
17369 #. type: Plain text
17370 #: build/C/man7/udp.7:75
17371 msgid ""
17372 "IP options may be sent or received using the socket options described in "
17373 "B<ip>(7).  They are processed by the kernel only when the appropriate "
17374 "I</proc> parameter is enabled (but still passed to the user even when it is "
17375 "turned off).  See B<ip>(7)."
17376 msgstr ""
17377
17378 #. type: Plain text
17379 #: build/C/man7/udp.7:80
17380 msgid ""
17381 "When the B<MSG_DONTROUTE> flag is set on sending, the destination address "
17382 "must refer to a local interface address and the packet is sent only to that "
17383 "interface."
17384 msgstr ""
17385
17386 #. type: Plain text
17387 #: build/C/man7/udp.7:98
17388 msgid ""
17389 "By default, Linux UDP does path MTU (Maximum Transmission Unit) discovery.  "
17390 "This means the kernel will keep track of the MTU to a specific target IP "
17391 "address and return B<EMSGSIZE> when a UDP packet write exceeds it.  When "
17392 "this happens, the application should decrease the packet size.  Path MTU "
17393 "discovery can be also turned off using the B<IP_MTU_DISCOVER> socket option "
17394 "or the I</proc/sys/net/ipv4/ip_no_pmtu_disc> file; see B<ip>(7)  for "
17395 "details.  When turned off, UDP will fragment outgoing UDP packets that "
17396 "exceed the interface MTU.  However, disabling it is not recommended for "
17397 "performance and reliability reasons."
17398 msgstr ""
17399
17400 #. type: Plain text
17401 #: build/C/man7/udp.7:103
17402 msgid "UDP uses the IPv4 I<sockaddr_in> address format described in B<ip>(7)."
17403 msgstr ""
17404
17405 #. type: Plain text
17406 #: build/C/man7/udp.7:114
17407 msgid ""
17408 "All fatal errors will be passed to the user as an error return even when the "
17409 "socket is not connected.  This includes asynchronous errors received from "
17410 "the network.  You may get an error for an earlier packet that was sent on "
17411 "the same socket.  This behavior differs from many other BSD socket "
17412 "implementations which don't pass any errors unless the socket is connected.  "
17413 "Linux's behavior is mandated by B<RFC\\ 1122>."
17414 msgstr ""
17415
17416 #. type: Plain text
17417 #: build/C/man7/udp.7:128
17418 msgid ""
17419 "For compatibility with legacy code, in Linux 2.0 and 2.2 it was possible to "
17420 "set the B<SO_BSDCOMPAT> B<SOL_SOCKET> option to receive remote errors only "
17421 "when the socket has been connected (except for B<EPROTO> and B<EMSGSIZE>).  "
17422 "Locally generated errors are always passed.  Support for this socket option "
17423 "was removed in later kernels; see B<socket>(7)  for further information."
17424 msgstr ""
17425
17426 #. type: Plain text
17427 #: build/C/man7/udp.7:137
17428 msgid ""
17429 "When the B<IP_RECVERR> option is enabled, all errors are stored in the "
17430 "socket error queue, and can be received by B<recvmsg>(2)  with the "
17431 "B<MSG_ERRQUEUE> flag set."
17432 msgstr ""
17433
17434 #. type: Plain text
17435 #: build/C/man7/udp.7:140
17436 msgid ""
17437 "System-wide UDP parameter settings can be accessed by files in the directory "
17438 "I</proc/sys/net/ipv4/>."
17439 msgstr ""
17440
17441 #. type: TP
17442 #: build/C/man7/udp.7:140
17443 #, no-wrap
17444 msgid "I<udp_mem> (since Linux 2.6.25)"
17445 msgstr ""
17446
17447 #. type: Plain text
17448 #: build/C/man7/udp.7:144
17449 msgid ""
17450 "This is a vector of three integers governing the number of pages allowed for "
17451 "queueing by all UDP sockets."
17452 msgstr ""
17453
17454 #. type: Plain text
17455 #: build/C/man7/udp.7:151
17456 msgid ""
17457 "Below this number of pages, UDP is not bothered about its memory appetite.  "
17458 "When the amount of memory allocated by UDP exceeds this number, UDP starts "
17459 "to moderate memory usage."
17460 msgstr ""
17461
17462 #. type: Plain text
17463 #: build/C/man7/udp.7:157
17464 msgid ""
17465 "This value was introduced to follow the format of I<tcp_mem> (see "
17466 "B<tcp>(7))."
17467 msgstr ""
17468
17469 #. type: Plain text
17470 #: build/C/man7/udp.7:160
17471 msgid "Number of pages allowed for queueing by all UDP sockets."
17472 msgstr ""
17473
17474 #. type: Plain text
17475 #: build/C/man7/udp.7:164
17476 msgid ""
17477 "Defaults values for these three items are calculated at boot time from the "
17478 "amount of available memory."
17479 msgstr ""
17480
17481 #. type: TP
17482 #: build/C/man7/udp.7:164
17483 #, no-wrap
17484 msgid "I<udp_rmem_min> (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
17485 msgstr ""
17486
17487 #. type: Plain text
17488 #: build/C/man7/udp.7:171
17489 msgid ""
17490 "Minimal size, in bytes, of receive buffers used by UDP sockets in "
17491 "moderation.  Each UDP socket is able to use the size for receiving data, "
17492 "even if total pages of UDP sockets exceed I<udp_mem> pressure."
17493 msgstr ""
17494
17495 #. type: TP
17496 #: build/C/man7/udp.7:171
17497 #, no-wrap
17498 msgid "I<udp_wmem_min> (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
17499 msgstr ""
17500
17501 #. type: Plain text
17502 #: build/C/man7/udp.7:178
17503 msgid ""
17504 "Minimal size, in bytes, of send buffer used by UDP sockets in moderation.  "
17505 "Each UDP socket is able to use the size for sending data, even if total "
17506 "pages of UDP sockets exceed I<udp_mem> pressure."
17507 msgstr ""
17508
17509 #. type: Plain text
17510 #: build/C/man7/udp.7:189
17511 msgid ""
17512 "To set or get a UDP socket option, call B<getsockopt>(2)  to read or "
17513 "B<setsockopt>(2)  to write the option with the option level argument set to "
17514 "B<IPPROTO_UDP>.  Unless otherwise noted, I<optval> is a pointer to an "
17515 "I<int>."
17516 msgstr ""
17517
17518 #. type: TP
17519 #: build/C/man7/udp.7:189
17520 #, no-wrap
17521 msgid "B<UDP_CORK> (since Linux 2.5.44)"
17522 msgstr ""
17523
17524 #.  FIXME document UDP_ENCAP (new in kernel 2.5.67)
17525 #.  From include/linux/udp.h:
17526 #.  /* UDP encapsulation types */
17527 #.  #define UDP_ENCAP_ESPINUDP_NON_IKE      1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
17528 #.  #define UDP_ENCAP_ESPINUDP      2 /* draft-ietf-ipsec-udp-encaps-06 */
17529 #.  #define UDP_ENCAP_L2TPINUDP     3 /* rfc2661 */
17530 #. type: Plain text
17531 #: build/C/man7/udp.7:202
17532 msgid ""
17533 "If this option is enabled, then all data output on this socket is "
17534 "accumulated into a single datagram that is transmitted when the option is "
17535 "disabled.  This option should not be used in code intended to be portable."
17536 msgstr ""
17537
17538 #. type: Plain text
17539 #: build/C/man7/udp.7:206
17540 msgid "These ioctls can be accessed using B<ioctl>(2).  The correct syntax is:"
17541 msgstr ""
17542
17543 #. type: Plain text
17544 #: build/C/man7/udp.7:211
17545 #, no-wrap
17546 msgid ""
17547 "B<int>I< value>B<;>\n"
17548 "I<error>B< = ioctl(>I<udp_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
17549 msgstr ""
17550
17551 #. type: TP
17552 #: build/C/man7/udp.7:213
17553 #, no-wrap
17554 msgid "B<FIONREAD> (B<SIOCINQ>)"
17555 msgstr ""
17556
17557 #.  See http://www.securiteam.com/unixfocus/5KP0I15IKO.html
17558 #.  "GNUnet DoS (UDP Socket Unreachable)", 14 May 2006
17559 #. type: Plain text
17560 #: build/C/man7/udp.7:231
17561 msgid ""
17562 "Gets a pointer to an integer as argument.  Returns the size of the next "
17563 "pending datagram in the integer in bytes, or 0 when no datagram is pending.  "
17564 "B<Warning:> Using B<FIONREAD>, it is impossible to distinguish the case "
17565 "where no datagram is pending from the case where the next pending datagram "
17566 "contains zero bytes of data.  It is safer to use B<select>(2), B<poll>(2), "
17567 "or B<epoll>(7)  to distinguish these cases."
17568 msgstr ""
17569
17570 #. type: TP
17571 #: build/C/man7/udp.7:231
17572 #, no-wrap
17573 msgid "B<TIOCOUTQ> (B<SIOCOUTQ>)"
17574 msgstr ""
17575
17576 #. type: Plain text
17577 #: build/C/man7/udp.7:235
17578 msgid ""
17579 "Returns the number of data bytes in the local send queue.  Only supported "
17580 "with Linux 2.4 and above."
17581 msgstr ""
17582
17583 #. type: Plain text
17584 #: build/C/man7/udp.7:241
17585 msgid ""
17586 "In addition, all ioctls documented in B<ip>(7)  and B<socket>(7)  are "
17587 "supported."
17588 msgstr ""
17589
17590 #. type: Plain text
17591 #: build/C/man7/udp.7:247
17592 msgid ""
17593 "All errors documented for B<socket>(7)  or B<ip>(7)  may be returned by a "
17594 "send or receive on a UDP socket."
17595 msgstr ""
17596
17597 #. type: TP
17598 #: build/C/man7/udp.7:247 build/C/man7/unix.7:410
17599 #, no-wrap
17600 msgid "B<ECONNREFUSED>"
17601 msgstr ""
17602
17603 #. type: Plain text
17604 #: build/C/man7/udp.7:251
17605 msgid ""
17606 "No receiver was associated with the destination address.  This might be "
17607 "caused by a previous packet sent over the socket."
17608 msgstr ""
17609
17610 #.  .SH CREDITS
17611 #.  This man page was written by Andi Kleen.
17612 #. type: Plain text
17613 #: build/C/man7/udp.7:256
17614 msgid "B<IP_RECVERR> is a new feature in Linux 2.2."
17615 msgstr ""
17616
17617 #. type: Plain text
17618 #: build/C/man7/udp.7:261
17619 msgid "B<ip>(7), B<raw>(7), B<socket>(7), B<udplite>(7)"
17620 msgstr ""
17621
17622 #. type: Plain text
17623 #: build/C/man7/udp.7:263
17624 msgid "RFC\\ 768 for the User Datagram Protocol."
17625 msgstr ""
17626
17627 #. type: Plain text
17628 #: build/C/man7/udp.7:265
17629 msgid "RFC\\ 1122 for the host requirements."
17630 msgstr ""
17631
17632 #. type: Plain text
17633 #: build/C/man7/udp.7:266
17634 msgid "RFC\\ 1191 for a description of path MTU discovery."
17635 msgstr ""
17636
17637 #. type: TH
17638 #: build/C/man7/udplite.7:27
17639 #, no-wrap
17640 msgid "UDPLITE"
17641 msgstr ""
17642
17643 #. type: Plain text
17644 #: build/C/man7/udplite.7:30
17645 msgid "udplite - Lightweight User Datagram Protocol"
17646 msgstr ""
17647
17648 #. type: Plain text
17649 #: build/C/man7/udplite.7:38
17650 msgid "B<sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);>"
17651 msgstr ""
17652
17653 #. type: Plain text
17654 #: build/C/man7/udplite.7:41
17655 msgid ""
17656 "This is an implementation of the Lightweight User Datagram Protocol "
17657 "(UDP-Lite), as described in RFC\\ 3828."
17658 msgstr ""
17659
17660 #. type: Plain text
17661 #: build/C/man7/udplite.7:47
17662 msgid ""
17663 "UDP-Lite is an extension of UDP (RFC\\ 768) to support variable-length "
17664 "checksums.  This has advantages for some types of multimedia transport that "
17665 "may be able to make use of slightly damaged datagrams, rather than having "
17666 "them discarded by lower-layer protocols."
17667 msgstr ""
17668
17669 #. type: Plain text
17670 #: build/C/man7/udplite.7:53
17671 msgid ""
17672 "The variable-length checksum coverage is set via a B<setsockopt>(2)  "
17673 "option.  If this option is not set, the only difference to UDP is in using a "
17674 "different IP protocol identifier (IANA number 136)."
17675 msgstr ""
17676
17677 #. type: Plain text
17678 #: build/C/man7/udplite.7:58
17679 msgid ""
17680 "The UDP-Lite implementation is a full extension of B<udp>(7)\\(emthat is, it "
17681 "shares the same API and API behavior, and in addition offers two socket "
17682 "options to control the checksum coverage."
17683 msgstr ""
17684
17685 #. type: Plain text
17686 #: build/C/man7/udplite.7:67
17687 msgid ""
17688 "UDP-Litev4 uses the I<sockaddr_in> address format described in B<ip>(7).  "
17689 "UDP-Litev6 uses the I<sockaddr_in6> address format described in B<ipv6>(7)."
17690 msgstr ""
17691
17692 #. type: Plain text
17693 #: build/C/man7/udplite.7:80
17694 msgid ""
17695 "To set or get a UDP-Lite socket option, call B<getsockopt>(2)  to read or "
17696 "B<setsockopt>(2)  to write the option with the option level argument set to "
17697 "B<IPPROTO_UDPLITE>.  In addition, all B<IPPROTO_UDP> socket options are "
17698 "valid on a UDP-Lite socket.  See B<udp>(7)  for more information."
17699 msgstr ""
17700
17701 #. type: Plain text
17702 #: build/C/man7/udplite.7:82
17703 msgid "The following two options are specific to UDP-Lite."
17704 msgstr ""
17705
17706 #. type: TP
17707 #: build/C/man7/udplite.7:82
17708 #, no-wrap
17709 msgid "B<UDPLITE_SEND_CSCOV>"
17710 msgstr ""
17711
17712 #. type: Plain text
17713 #: build/C/man7/udplite.7:87
17714 msgid ""
17715 "This option sets the sender checksum coverage and takes an I<int> as "
17716 "argument, with a checksum coverage value in the range 0..2^16-1."
17717 msgstr ""
17718
17719 #. type: Plain text
17720 #: build/C/man7/udplite.7:91
17721 msgid ""
17722 "A value of 0 means that the entire datagram is always covered.  Values from "
17723 "1-7 are illegal (RFC\\ 3828, 3.1) and are rounded up to the minimum coverage "
17724 "of 8."
17725 msgstr ""
17726
17727 #. type: Plain text
17728 #: build/C/man7/udplite.7:97
17729 msgid ""
17730 "With regard to IPv6 jumbograms (RFC\\ 2675), the UDP-Litev6 checksum "
17731 "coverage is limited to the first 2^16-1 octets, as per RFC\\ 3828, 3.5.  "
17732 "Higher values are therefore silently truncated to 2^16-1.  If in doubt, the "
17733 "current coverage value can always be queried using B<getsockopt>(2)."
17734 msgstr ""
17735
17736 #. type: TP
17737 #: build/C/man7/udplite.7:97
17738 #, no-wrap
17739 msgid "B<UDPLITE_RECV_CSCOV>"
17740 msgstr ""
17741
17742 #. type: Plain text
17743 #: build/C/man7/udplite.7:108
17744 msgid ""
17745 "This is the receiver-side analogue and uses the same argument format and "
17746 "value range as B<UDPLITE_SEND_CSCOV>.  This option is not required to enable "
17747 "traffic with partial checksum coverage.  Its function is that of a traffic "
17748 "filter: when enabled, it instructs the kernel to drop all packets which have "
17749 "a coverage I<less> than the specified coverage value."
17750 msgstr ""
17751
17752 #.  SO_NO_CHECK exists and is supported by UDPv4, but is
17753 #.  commented out in socket(7), hence also commented out here
17754 #. .PP
17755 #. Since UDP-Lite mandates checksums, checksumming can not be disabled
17756 #. via the
17757 #. .B SO_NO_CHECK
17758 #. option from
17759 #. .BR socket (7).
17760 #. type: Plain text
17761 #: build/C/man7/udplite.7:121
17762 msgid ""
17763 "When the value of B<UDPLITE_RECV_CSCOV> exceeds the actual packet coverage, "
17764 "incoming packets are silently dropped, but may generate a warning message in "
17765 "the system log."
17766 msgstr ""
17767
17768 #. type: Plain text
17769 #: build/C/man7/udplite.7:126
17770 msgid ""
17771 "All errors documented for B<udp>(7)  may be returned.  UDP-Lite does not add "
17772 "further errors."
17773 msgstr ""
17774
17775 #. type: Plain text
17776 #: build/C/man7/udplite.7:129
17777 msgid "I</proc/net/snmp> - basic UDP-Litev4 statistics counters."
17778 msgstr ""
17779
17780 #. type: Plain text
17781 #: build/C/man7/udplite.7:132
17782 msgid "I</proc/net/snmp6> - basic UDP-Litev6 statistics counters."
17783 msgstr ""
17784
17785 #. type: Plain text
17786 #: build/C/man7/udplite.7:134
17787 msgid "UDP-Litev4/v6 first appeared in Linux 2.6.20."
17788 msgstr ""
17789
17790 #.  FIXME . remove this section once glibc supports UDP-Lite
17791 #. type: Plain text
17792 #: build/C/man7/udplite.7:137
17793 msgid "Where glibc support is missing, the following definitions are needed:"
17794 msgstr ""
17795
17796 #.  The following two are defined in the kernel in linux/net/udplite.h
17797 #. type: Plain text
17798 #: build/C/man7/udplite.7:144
17799 #, no-wrap
17800 msgid ""
17801 "#define IPPROTO_UDPLITE     136\n"
17802 "#define UDPLITE_SEND_CSCOV  10\n"
17803 "#define UDPLITE_RECV_CSCOV  11\n"
17804 msgstr ""
17805
17806 #. type: Plain text
17807 #: build/C/man7/udplite.7:151
17808 msgid "B<ip>(7), B<ipv6>(7), B<socket>(7), B<udp>(7)"
17809 msgstr ""
17810
17811 #. type: Plain text
17812 #: build/C/man7/udplite.7:153
17813 msgid "RFC\\ 3828 for the Lightweight User Datagram Protocol (UDP-Lite)."
17814 msgstr ""
17815
17816 #. type: Plain text
17817 #: build/C/man7/udplite.7:155
17818 msgid "I<Documentation/networking/udplite.txt> in the Linux kernel source tree"
17819 msgstr ""
17820
17821 #. type: TH
17822 #: build/C/man7/unix.7:20
17823 #, no-wrap
17824 msgid "UNIX"
17825 msgstr ""
17826
17827 #. type: Plain text
17828 #: build/C/man7/unix.7:23
17829 msgid "unix - sockets for local interprocess communication"
17830 msgstr ""
17831
17832 #. type: Plain text
17833 #: build/C/man7/unix.7:27
17834 msgid "B<#include E<lt>sys/un.hE<gt>>"
17835 msgstr ""
17836
17837 #. type: Plain text
17838 #: build/C/man7/unix.7:29
17839 msgid "I<unix_socket>B< = socket(AF_UNIX, type, 0);>"
17840 msgstr ""
17841
17842 #. type: Plain text
17843 #: build/C/man7/unix.7:31
17844 msgid "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>"
17845 msgstr ""
17846
17847 #. type: Plain text
17848 #: build/C/man7/unix.7:42
17849 msgid ""
17850 "The B<AF_UNIX> (also known as B<AF_LOCAL>)  socket family is used to "
17851 "communicate between processes on the same machine efficiently.  "
17852 "Traditionally, UNIX domain sockets can be either unnamed, or bound to a "
17853 "filesystem pathname (marked as being of type socket).  Linux also supports "
17854 "an abstract namespace which is independent of the filesystem."
17855 msgstr ""
17856
17857 #. type: Plain text
17858 #: build/C/man7/unix.7:54
17859 msgid ""
17860 "Valid socket types in the UNIX domain are: B<SOCK_STREAM>, for a "
17861 "stream-oriented socket; B<SOCK_DGRAM>, for a datagram-oriented socket that "
17862 "preserves message boundaries (as on most UNIX implementations, UNIX domain "
17863 "datagram sockets are always reliable and don't reorder datagrams); and "
17864 "(since Linux 2.6.4)  B<SOCK_SEQPACKET>, for a connection-oriented socket "
17865 "that preserves message boundaries and delivers messages in the order that "
17866 "they were sent."
17867 msgstr ""
17868
17869 #. type: Plain text
17870 #: build/C/man7/unix.7:57
17871 msgid ""
17872 "UNIX domain sockets support passing file descriptors or process credentials "
17873 "to other processes using ancillary data."
17874 msgstr ""
17875
17876 #. type: Plain text
17877 #: build/C/man7/unix.7:59
17878 msgid "A UNIX domain socket address is represented in the following structure:"
17879 msgstr ""
17880
17881 #. type: Plain text
17882 #: build/C/man7/unix.7:63
17883 #, no-wrap
17884 msgid "#define UNIX_PATH_MAX    108\n"
17885 msgstr ""
17886
17887 #. type: Plain text
17888 #: build/C/man7/unix.7:68
17889 #, no-wrap
17890 msgid ""
17891 "struct sockaddr_un {\n"
17892 "    sa_family_t sun_family;               /* AF_UNIX */\n"
17893 "    char        sun_path[UNIX_PATH_MAX];  /* pathname */\n"
17894 "};\n"
17895 msgstr ""
17896
17897 #. type: Plain text
17898 #: build/C/man7/unix.7:75
17899 msgid "The I<sun_family> field always contains B<AF_UNIX>."
17900 msgstr ""
17901
17902 #. type: Plain text
17903 #: build/C/man7/unix.7:91
17904 msgid ""
17905 "Various systems calls (for example, B<bind>(2), B<connect>(2), and "
17906 "B<sendto>(2))  take a I<sockaddr_un> argument as input.  Some other system "
17907 "calls (for example, B<getsockname>(2), B<getpeername>(2), B<recvfrom>(2), "
17908 "and B<accept>(2))  return an argument of this type."
17909 msgstr ""
17910
17911 #. type: Plain text
17912 #: build/C/man7/unix.7:95
17913 msgid "Three types of address are distinguished in the I<sockaddr_un> structure:"
17914 msgstr ""
17915
17916 #. type: Plain text
17917 #: build/C/man7/unix.7:103
17918 msgid ""
17919 "I<pathname>: a UNIX domain socket can be bound to a null-terminated "
17920 "filesystem pathname using B<bind>(2).  When the address of a pathname socket "
17921 "is returned (by one of the system calls noted above), its length is"
17922 msgstr ""
17923
17924 #. type: Plain text
17925 #: build/C/man7/unix.7:105
17926 #, no-wrap
17927 msgid "    offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
17928 msgstr ""
17929
17930 #. type: Plain text
17931 #: build/C/man7/unix.7:118
17932 msgid ""
17933 "and I<sun_path> contains the null-terminated pathname.  (On Linux, the above "
17934 "B<offsetof>()  expression equates to the same value as "
17935 "I<sizeof(sa_family_t)>, but some other implementations include other fields "
17936 "before I<sun_path>, so the B<offsetof>()  expression more portably describes "
17937 "the size of the address structure.)"
17938 msgstr ""
17939
17940 #. type: Plain text
17941 #: build/C/man7/unix.7:120
17942 msgid "For further details of pathname sockets, see below."
17943 msgstr ""
17944
17945 #.  There is quite some variation across implementations: FreeBSD
17946 #.  says the length is 16 bytes, HP-UX 11 says it's zero bytes.
17947 #. type: Plain text
17948 #: build/C/man7/unix.7:136
17949 msgid ""
17950 "I<unnamed>: A stream socket that has not been bound to a pathname using "
17951 "B<bind>(2)  has no name.  Likewise, the two sockets created by "
17952 "B<socketpair>(2)  are unnamed.  When the address of an unnamed socket is "
17953 "returned, its length is I<sizeof(sa_family_t)>, and I<sun_path> should not "
17954 "be inspected."
17955 msgstr ""
17956
17957 #. type: Plain text
17958 #: build/C/man7/unix.7:159
17959 msgid ""
17960 "I<abstract>: an abstract socket address is distinguished (from a pathname "
17961 "socket)  by the fact that I<sun_path[0]> is a null byte (\\(aq\\e0\\(aq).  "
17962 "The socket's address in this namespace is given by the additional bytes in "
17963 "I<sun_path> that are covered by the specified length of the address "
17964 "structure.  (Null bytes in the name have no special significance.)  The name "
17965 "has no connection with filesystem pathnames.  When the address of an "
17966 "abstract socket is returned, the returned I<addrlen> is greater than "
17967 "I<sizeof(sa_family_t)> (i.e., greater than 2), and the name of the socket is "
17968 "contained in the first I<(addrlen - sizeof(sa_family_t))> bytes of "
17969 "I<sun_path>.  The abstract socket namespace is a nonportable Linux "
17970 "extension."
17971 msgstr ""
17972
17973 #. type: SS
17974 #: build/C/man7/unix.7:159
17975 #, no-wrap
17976 msgid "Pathname sockets"
17977 msgstr ""
17978
17979 #. type: Plain text
17980 #: build/C/man7/unix.7:162
17981 msgid ""
17982 "When binding a socket to a pathname, a few rules should be observed for "
17983 "maximum portability and ease of coding:"
17984 msgstr ""
17985
17986 #. type: Plain text
17987 #: build/C/man7/unix.7:166
17988 msgid "The pathname in I<sun_path> should be null-terminated."
17989 msgstr ""
17990
17991 #. type: Plain text
17992 #: build/C/man7/unix.7:170
17993 msgid ""
17994 "The length of the pathname, including the terminating null byte, should not "
17995 "exceed the size of I<sun_path>."
17996 msgstr ""
17997
17998 #. type: Plain text
17999 #: build/C/man7/unix.7:176
18000 msgid ""
18001 "The I<addrlen> argument that describes the enclosing I<sockaddr_un> "
18002 "structure should have a value of at least:"
18003 msgstr ""
18004
18005 #. type: Plain text
18006 #: build/C/man7/unix.7:179
18007 #, no-wrap
18008 msgid "    offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
18009 msgstr ""
18010
18011 #. type: Plain text
18012 #: build/C/man7/unix.7:185
18013 msgid ""
18014 "or, more simply, I<addrlen> can be specified as I<sizeof(struct "
18015 "sockaddr_un)>."
18016 msgstr ""
18017
18018 #.  Linux does this, including for the case where the supplied path
18019 #.  is 108 bytes
18020 #. type: Plain text
18021 #: build/C/man7/unix.7:193
18022 msgid ""
18023 "There is some variation in how implementations handle UNIX domain socket "
18024 "addresses that do not follow the above rules.  For example, some (but not "
18025 "all) implementations append a null terminator if none is present in the "
18026 "supplied I<sun_path>."
18027 msgstr ""
18028
18029 #.  HP-UX
18030 #.  Modern BSDs generally have 104, Tru64 and AIX have 104,
18031 #.  Solaris and Irix have 108
18032 #. type: Plain text
18033 #: build/C/man7/unix.7:202
18034 msgid ""
18035 "When coding portable applications, keep in mind that some implementations "
18036 "have I<sun_path> as short as 92 bytes."
18037 msgstr ""
18038
18039 #. type: Plain text
18040 #: build/C/man7/unix.7:220
18041 msgid ""
18042 "Various system calls (B<accept>(2), B<recvfrom>(2), B<getsockname>(2), "
18043 "B<getpeername>(2))  return socket address structures.  When applied to UNIX "
18044 "domain sockets, the value-result I<addrlen> argument supplied to the call "
18045 "should be initialized as above.  Upon return, the argument is set to "
18046 "indicate the I<actual> size of the address structure.  The caller should "
18047 "check the value returned in this argument: if the output value exceeds the "
18048 "input value, then there is no guarantee that a null terminator is present in "
18049 "I<sun_path>.  (See BUGS.)"
18050 msgstr ""
18051
18052 #. type: Plain text
18053 #: build/C/man7/unix.7:233
18054 msgid ""
18055 "For historical reasons, these socket options are specified with a "
18056 "B<SOL_SOCKET> type even though they are B<AF_UNIX> specific.  They can be "
18057 "set with B<setsockopt>(2)  and read with B<getsockopt>(2)  by specifying "
18058 "B<SOL_SOCKET> as the socket family."
18059 msgstr ""
18060
18061 #. type: TP
18062 #: build/C/man7/unix.7:233
18063 #, no-wrap
18064 msgid "B<SO_PASSCRED>"
18065 msgstr ""
18066
18067 #. type: Plain text
18068 #: build/C/man7/unix.7:240
18069 msgid ""
18070 "Enables the receiving of the credentials of the sending process in an "
18071 "ancillary message.  When this option is set and the socket is not yet "
18072 "connected a unique name in the abstract namespace will be generated "
18073 "automatically.  Expects an integer boolean flag."
18074 msgstr ""
18075
18076 #. type: SS
18077 #: build/C/man7/unix.7:240
18078 #, no-wrap
18079 msgid "Autobind feature"
18080 msgstr ""
18081
18082 #.  i.e., sizeof(short)
18083 #. type: Plain text
18084 #: build/C/man7/unix.7:260
18085 msgid ""
18086 "If a B<bind>(2)  call specifies I<addrlen> as I<sizeof(sa_family_t)>, or the "
18087 "B<SO_PASSCRED> socket option was specified for a socket that was not "
18088 "explicitly bound to an address, then the socket is autobound to an abstract "
18089 "address.  The address consists of a null byte followed by 5 bytes in the "
18090 "character set I<[0-9a-f]>.  Thus, there is a limit of 2^20 autobind "
18091 "addresses.  (From Linux 2.1.15, when the autobind feature was added, 8 bytes "
18092 "were used, and the limit was thus 2^32 autobind addresses.  The change to 5 "
18093 "bytes came in Linux 2.3.15.)"
18094 msgstr ""
18095
18096 #. type: Plain text
18097 #: build/C/man7/unix.7:263
18098 msgid ""
18099 "The following paragraphs describe domain-specific details and unsupported "
18100 "features of the sockets API for UNIX domain sockets on Linux."
18101 msgstr ""
18102
18103 #. type: Plain text
18104 #: build/C/man7/unix.7:271
18105 msgid ""
18106 "UNIX domain sockets do not support the transmission of out-of-band data (the "
18107 "B<MSG_OOB> flag for B<send>(2)  and B<recv>(2))."
18108 msgstr ""
18109
18110 #. type: Plain text
18111 #: build/C/man7/unix.7:276
18112 msgid "The B<send>(2)  B<MSG_MORE> flag is not supported by UNIX domain sockets."
18113 msgstr ""
18114
18115 #. type: Plain text
18116 #: build/C/man7/unix.7:284
18117 msgid ""
18118 "The use of B<MSG_TRUNC> in the I<flags> argument of B<recv>(2)  is not "
18119 "supported by UNIX domain sockets."
18120 msgstr ""
18121
18122 #. type: Plain text
18123 #: build/C/man7/unix.7:296
18124 msgid ""
18125 "The B<SO_SNDBUF> socket option does have an effect for UNIX domain sockets, "
18126 "but the B<SO_RCVBUF> option does not.  For datagram sockets, the "
18127 "B<SO_SNDBUF> value imposes an upper limit on the size of outgoing "
18128 "datagrams.  This limit is calculated as the doubled (see B<socket>(7))  "
18129 "option value less 32 bytes used for overhead."
18130 msgstr ""
18131
18132 #. type: SS
18133 #: build/C/man7/unix.7:296
18134 #, no-wrap
18135 msgid "Ancillary messages"
18136 msgstr ""
18137
18138 #. type: Plain text
18139 #: build/C/man7/unix.7:318
18140 msgid ""
18141 "Ancillary data is sent and received using B<sendmsg>(2)  and B<recvmsg>(2).  "
18142 "For historical reasons the ancillary message types listed below are "
18143 "specified with a B<SOL_SOCKET> type even though they are B<AF_UNIX> "
18144 "specific.  To send them set the I<cmsg_level> field of the struct I<cmsghdr> "
18145 "to B<SOL_SOCKET> and the I<cmsg_type> field to the type.  For more "
18146 "information see B<cmsg>(3)."
18147 msgstr ""
18148
18149 #. type: TP
18150 #: build/C/man7/unix.7:318
18151 #, no-wrap
18152 msgid "B<SCM_RIGHTS>"
18153 msgstr ""
18154
18155 #. type: Plain text
18156 #: build/C/man7/unix.7:324
18157 msgid ""
18158 "Send or receive a set of open file descriptors from another process.  The "
18159 "data portion contains an integer array of the file descriptors.  The passed "
18160 "file descriptors behave as though they have been created with B<dup>(2)."
18161 msgstr ""
18162
18163 #. type: TP
18164 #: build/C/man7/unix.7:324
18165 #, no-wrap
18166 msgid "B<SCM_CREDENTIALS>"
18167 msgstr ""
18168
18169 #. type: Plain text
18170 #: build/C/man7/unix.7:334
18171 msgid ""
18172 "Send or receive UNIX credentials.  This can be used for authentication.  The "
18173 "credentials are passed as a I<struct ucred> ancillary message.  Thus "
18174 "structure is defined in I<E<lt>sys/socket.hE<gt>> as follows:"
18175 msgstr ""
18176
18177 #. type: Plain text
18178 #: build/C/man7/unix.7:342
18179 #, no-wrap
18180 msgid ""
18181 "struct ucred {\n"
18182 "    pid_t pid;    /* process ID of the sending process */\n"
18183 "    uid_t uid;    /* user ID of the sending process */\n"
18184 "    gid_t gid;    /* group ID of the sending process */\n"
18185 "};\n"
18186 msgstr ""
18187
18188 #. type: Plain text
18189 #: build/C/man7/unix.7:351
18190 msgid ""
18191 "Since glibc 2.8, the B<_GNU_SOURCE> feature test macro must be defined "
18192 "(before including I<any> header files) in order to obtain the definition of "
18193 "this structure."
18194 msgstr ""
18195
18196 #. type: Plain text
18197 #: build/C/man7/unix.7:367
18198 msgid ""
18199 "The credentials which the sender specifies are checked by the kernel.  A "
18200 "process with effective user ID 0 is allowed to specify values that do not "
18201 "match its own.  The sender must specify its own process ID (unless it has "
18202 "the capability B<CAP_SYS_ADMIN>), its user ID, effective user ID, or saved "
18203 "set-user-ID (unless it has B<CAP_SETUID>), and its group ID, effective group "
18204 "ID, or saved set-group-ID (unless it has B<CAP_SETGID>).  To receive a "
18205 "I<struct ucred> message the B<SO_PASSCRED> option must be enabled on the "
18206 "socket."
18207 msgstr ""
18208
18209 #. type: Plain text
18210 #: build/C/man7/unix.7:378
18211 #, no-wrap
18212 msgid ""
18213 "B<int>I< value>B<;>\n"
18214 "I<error>B< = ioctl(>I<unix_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
18215 msgstr ""
18216
18217 #. type: Plain text
18218 #: build/C/man7/unix.7:383
18219 msgid "I<ioctl_type> can be:"
18220 msgstr ""
18221
18222 #. type: Plain text
18223 #: build/C/man7/unix.7:410
18224 msgid ""
18225 "The specified local address is already in use or the filesystem socket "
18226 "object already exists."
18227 msgstr ""
18228
18229 #. type: Plain text
18230 #: build/C/man7/unix.7:416
18231 msgid ""
18232 "The remote address specified by B<connect>(2)  was not a listening socket.  "
18233 "This error can also occur if the target pathname is not a socket."
18234 msgstr ""
18235
18236 #. type: TP
18237 #: build/C/man7/unix.7:416
18238 #, no-wrap
18239 msgid "B<ECONNRESET>"
18240 msgstr ""
18241
18242 #. type: Plain text
18243 #: build/C/man7/unix.7:419
18244 msgid "Remote socket was unexpectedly closed."
18245 msgstr ""
18246
18247 #. type: Plain text
18248 #: build/C/man7/unix.7:422
18249 msgid "User memory address was not valid."
18250 msgstr ""
18251
18252 #. type: Plain text
18253 #: build/C/man7/unix.7:431
18254 msgid ""
18255 "Invalid argument passed.  A common cause is that the value B<AF_UNIX> was "
18256 "not specified in the I<sun_type> field of passed addresses, or the socket "
18257 "was in an invalid state for the applied operation."
18258 msgstr ""
18259
18260 #. type: Plain text
18261 #: build/C/man7/unix.7:436
18262 msgid ""
18263 "B<connect>(2)  called on an already connected socket or a target address was "
18264 "specified on a connected socket."
18265 msgstr ""
18266
18267 #. type: Plain text
18268 #: build/C/man7/unix.7:441
18269 msgid ""
18270 "The pathname in the remote address specified to B<connect>(2)  did not "
18271 "exist."
18272 msgstr ""
18273
18274 #. type: TP
18275 #: build/C/man7/unix.7:441
18276 #, no-wrap
18277 msgid "B<ENOMEM>"
18278 msgstr ""
18279
18280 #. type: Plain text
18281 #: build/C/man7/unix.7:447
18282 msgid "Socket operation needs a target address, but the socket is not connected."
18283 msgstr ""
18284
18285 #. type: Plain text
18286 #: build/C/man7/unix.7:451
18287 msgid ""
18288 "Stream operation called on non-stream oriented socket or tried to use the "
18289 "out-of-band data option."
18290 msgstr ""
18291
18292 #. type: Plain text
18293 #: build/C/man7/unix.7:455
18294 msgid "The sender passed invalid credentials in the I<struct ucred>."
18295 msgstr ""
18296
18297 #. type: Plain text
18298 #: build/C/man7/unix.7:467
18299 msgid ""
18300 "Remote socket was closed on a stream socket.  If enabled, a B<SIGPIPE> is "
18301 "sent as well.  This can be avoided by passing the B<MSG_NOSIGNAL> flag to "
18302 "B<sendmsg>(2)  or B<recvmsg>(2)."
18303 msgstr ""
18304
18305 #. type: TP
18306 #: build/C/man7/unix.7:467
18307 #, no-wrap
18308 msgid "B<EPROTONOSUPPORT>"
18309 msgstr ""
18310
18311 #. type: Plain text
18312 #: build/C/man7/unix.7:471
18313 msgid "Passed protocol is not B<AF_UNIX>."
18314 msgstr ""
18315
18316 #. type: TP
18317 #: build/C/man7/unix.7:471
18318 #, no-wrap
18319 msgid "B<EPROTOTYPE>"
18320 msgstr ""
18321
18322 #. type: Plain text
18323 #: build/C/man7/unix.7:477
18324 msgid ""
18325 "Remote socket does not match the local socket type (B<SOCK_DGRAM> versus "
18326 "B<SOCK_STREAM>)"
18327 msgstr ""
18328
18329 #. type: Plain text
18330 #: build/C/man7/unix.7:480
18331 msgid "Unknown socket type."
18332 msgstr ""
18333
18334 #. type: Plain text
18335 #: build/C/man7/unix.7:484
18336 msgid ""
18337 "Other errors can be generated by the generic socket layer or by the "
18338 "filesystem while generating a filesystem socket object.  See the appropriate "
18339 "manual pages for more information."
18340 msgstr ""
18341
18342 #. type: Plain text
18343 #: build/C/man7/unix.7:490
18344 msgid ""
18345 "B<SCM_CREDENTIALS> and the abstract namespace were introduced with Linux 2.2 "
18346 "and should not be used in portable programs.  (Some BSD-derived systems also "
18347 "support credential passing, but the implementation details differ.)"
18348 msgstr ""
18349
18350 #. type: Plain text
18351 #: build/C/man7/unix.7:501
18352 msgid ""
18353 "In the Linux implementation, sockets which are visible in the filesystem "
18354 "honor the permissions of the directory they are in.  Their owner, group, and "
18355 "permissions can be changed.  Creation of a new socket will fail if the "
18356 "process does not have write and search (execute) permission on the directory "
18357 "the socket is created in.  Connecting to the socket object requires "
18358 "read/write permission.  This behavior differs from many BSD-derived systems "
18359 "which ignore permissions for UNIX domain sockets.  Portable programs should "
18360 "not rely on this feature for security."
18361 msgstr ""
18362
18363 #. type: Plain text
18364 #: build/C/man7/unix.7:509
18365 msgid ""
18366 "Binding to a socket with a filename creates a socket in the filesystem that "
18367 "must be deleted by the caller when it is no longer needed (using "
18368 "B<unlink>(2)).  The usual UNIX close-behind semantics apply; the socket can "
18369 "be unlinked at any time and will be finally removed from the filesystem when "
18370 "the last reference to it is closed."
18371 msgstr ""
18372
18373 #. type: Plain text
18374 #: build/C/man7/unix.7:518
18375 msgid ""
18376 "To pass file descriptors or credentials over a B<SOCK_STREAM>, you need to "
18377 "send or receive at least one byte of nonancillary data in the same "
18378 "B<sendmsg>(2)  or B<recvmsg>(2)  call."
18379 msgstr ""
18380
18381 #. type: Plain text
18382 #: build/C/man7/unix.7:521
18383 msgid "UNIX domain stream sockets do not support the notion of out-of-band data."
18384 msgstr ""
18385
18386 #.  The behavior on Solaris is quite similar.
18387 #. type: Plain text
18388 #: build/C/man7/unix.7:546
18389 msgid ""
18390 "When binding a socket to an address, Linux is one of the implementations "
18391 "that appends a null terminator if none is supplied in I<sun_path>.  In most "
18392 "cases this is unproblematic: when the socket address is retrieved, it will "
18393 "be one byte longer than that supplied when the socket was bound.  However, "
18394 "there is one case where confusing behavior can result: if 108 non-null bytes "
18395 "are supplied when a socket is bound, then the addition of the null "
18396 "terminator takes the length of the pathname beyond I<sizeof(sun_path)>.  "
18397 "Consequently, when retrieving the socket address (for example, via "
18398 "B<accept>(2)), if the input I<addrlen> argument for the retrieving call is "
18399 "specified as I<sizeof(struct sockaddr_un)>, then the returned address "
18400 "structure I<won't> have a null terminator in I<sun_path>."
18401 msgstr ""
18402
18403 #.  i.e., traditional BSD
18404 #. type: Plain text
18405 #: build/C/man7/unix.7:556
18406 msgid ""
18407 "In addition, some implementations don't require a null terminator when "
18408 "binding a socket (the I<addrlen> argument is used to determine the length of "
18409 "I<sun_path>)  and when the socket address is retrieved on these "
18410 "implementations, there is no null terminator in I<sun_path>."
18411 msgstr ""
18412
18413 #. type: Plain text
18414 #: build/C/man7/unix.7:561
18415 msgid ""
18416 "Applications that retrieve socket addresses can (portably) code to handle "
18417 "the possibility that there is no null terminator in I<sun_path> by "
18418 "respecting the fact that the number of valid bytes in the pathname is:"
18419 msgstr ""
18420
18421 #.  The following patch to amend kernel behavior was rejected:
18422 #.  http://thread.gmane.org/gmane.linux.kernel.api/2437
18423 #.  Subject: [patch] Fix handling of overlength pathname in AF_UNIX sun_path
18424 #.  2012-04-17
18425 #.  And there was a related discussion in the Austin list:
18426 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/5735
18427 #.  Subject: Having a sun_path with no null terminator
18428 #.  2012-04-18
18429 #
18430 #.  FIXME . Track http://austingroupbugs.net/view.php?id=561
18431 #. type: Plain text
18432 #: build/C/man7/unix.7:573
18433 #, no-wrap
18434 msgid "    strnlen(addr.sun_path, addrlen - offsetof(sockaddr_un, sun_path))\n"
18435 msgstr ""
18436
18437 #. type: Plain text
18438 #: build/C/man7/unix.7:585
18439 msgid ""
18440 "Alternatively, an application can retrieve the socket address by allocating "
18441 "a buffer of size I<sizeof(struct sockaddr_un)+1> that is zeroed out before "
18442 "the retrieval.  The retrieving call can specify I<addrlen> as "
18443 "I<sizeof(struct sockaddr_un)>, and the extra zero byte ensures that there "
18444 "will be a null terminator for the string returned in I<sun_path>:"
18445 msgstr ""
18446
18447 #. type: Plain text
18448 #: build/C/man7/unix.7:589
18449 #, no-wrap
18450 msgid "void *addrp;\n"
18451 msgstr ""
18452
18453 #. type: Plain text
18454 #: build/C/man7/unix.7:595
18455 #, no-wrap
18456 msgid ""
18457 "addrlen = sizeof(struct sockaddr_un);\n"
18458 "addrp = malloc(addrlen + 1);\n"
18459 "if (addrp == NULL)\n"
18460 "    /* Handle error */ ;\n"
18461 "memset(addrp, 0, addrlen + 1);\n"
18462 msgstr ""
18463
18464 #. type: Plain text
18465 #: build/C/man7/unix.7:598
18466 #, no-wrap
18467 msgid ""
18468 "if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == -1)\n"
18469 "    /* handle error */ ;\n"
18470 msgstr ""
18471
18472 #. type: Plain text
18473 #: build/C/man7/unix.7:600
18474 #, no-wrap
18475 msgid ""
18476 "printf(\"sun_path = %s\\en\", ((struct sockaddr_un *) "
18477 "addrp)-E<gt>sun_path);\n"
18478 msgstr ""
18479
18480 #. type: Plain text
18481 #: build/C/man7/unix.7:608
18482 msgid ""
18483 "This sort of messiness can be avoided if it is guaranteed that the "
18484 "applications that I<create> pathname sockets follow the rules outlined above "
18485 "under I<Pathname sockets>."
18486 msgstr ""
18487
18488 #. type: Plain text
18489 #: build/C/man7/unix.7:611
18490 msgid "See B<bind>(2)."
18491 msgstr ""
18492
18493 #. type: Plain text
18494 #: build/C/man7/unix.7:616
18495 msgid "For an example of the use of B<SCM_RIGHTS> see B<cmsg>(3)."
18496 msgstr ""
18497
18498 #. type: Plain text
18499 #: build/C/man7/unix.7:624
18500 msgid ""
18501 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
18502 "B<capabilities>(7), B<credentials>(7), B<socket>(7)"
18503 msgstr ""
18504
18505 #. type: TH
18506 #: build/C/man7/x25.7:12
18507 #, no-wrap
18508 msgid "X25"
18509 msgstr ""
18510
18511 #. type: Plain text
18512 #: build/C/man7/x25.7:15
18513 msgid "x25 - ITU-T X.25 / ISO-8208 protocol interface."
18514 msgstr ""
18515
18516 #. type: Plain text
18517 #: build/C/man7/x25.7:19
18518 msgid "B<#include E<lt>linux/x25.hE<gt>>"
18519 msgstr ""
18520
18521 #. type: Plain text
18522 #: build/C/man7/x25.7:21
18523 msgid "B<x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);>"
18524 msgstr ""
18525
18526 #. type: Plain text
18527 #: build/C/man7/x25.7:30
18528 msgid ""
18529 "X25 sockets provide an interface to the X.25 packet layer protocol.  This "
18530 "allows applications to communicate over a public X.25 data network as "
18531 "standardized by International Telecommunication Union's recommendation X.25 "
18532 "(X.25 DTE-DCE mode).  X25 sockets can also be used for communication without "
18533 "an intermediate X.25 network (X.25 DTE-DTE mode) as described in ISO-8208."
18534 msgstr ""
18535
18536 #. type: Plain text
18537 #: build/C/man7/x25.7:47
18538 msgid ""
18539 "Message boundaries are preserved \\(em a B<read>(2)  from a socket will "
18540 "retrieve the same chunk of data as output with the corresponding B<write>(2)  "
18541 "to the peer socket.  When necessary, the kernel takes care of segmenting and "
18542 "reassembling long messages by means of the X.25 M-bit.  There is no "
18543 "hard-coded upper limit for the message size.  However, reassembling of a "
18544 "long message might fail if there is a temporary lack of system resources or "
18545 "when other constraints (such as socket memory or buffer size limits) become "
18546 "effective.  If that occurs, the X.25 connection will be reset."
18547 msgstr ""
18548
18549 #. type: SS
18550 #: build/C/man7/x25.7:47
18551 #, no-wrap
18552 msgid "Socket addresses"
18553 msgstr ""
18554
18555 #. type: Plain text
18556 #: build/C/man7/x25.7:54
18557 msgid ""
18558 "The B<AF_X25> socket address family uses the I<struct sockaddr_x25> for "
18559 "representing network addresses as defined in ITU-T recommendation X.121."
18560 msgstr ""
18561
18562 #. type: Plain text
18563 #: build/C/man7/x25.7:61
18564 #, no-wrap
18565 msgid ""
18566 "struct sockaddr_x25 {\n"
18567 "    sa_family_t sx25_family;    /* must be AF_X25 */\n"
18568 "    x25_address sx25_addr;      /* X.121 Address */\n"
18569 "};\n"
18570 msgstr ""
18571
18572 #. type: Plain text
18573 #: build/C/man7/x25.7:72
18574 msgid ""
18575 "I<sx25_addr> contains a char array I<x25_addr[]> to be interpreted as a "
18576 "null-terminated string.  I<sx25_addr.x25_addr[]> consists of up to 15 (not "
18577 "counting the terminating null byte) ASCII characters forming the X.121 "
18578 "address.  Only the decimal digit characters from \\(aq0\\(aq to \\(aq9\\(aq "
18579 "are allowed."
18580 msgstr ""
18581
18582 #. type: Plain text
18583 #: build/C/man7/x25.7:81
18584 msgid ""
18585 "The following X.25-specific socket options can be set by using "
18586 "B<setsockopt>(2)  and read with B<getsockopt>(2)  with the I<level> argument "
18587 "set to B<SOL_X25>."
18588 msgstr ""
18589
18590 #. type: TP
18591 #: build/C/man7/x25.7:81
18592 #, no-wrap
18593 msgid "B<X25_QBITINCL>"
18594 msgstr ""
18595
18596 #. type: Plain text
18597 #: build/C/man7/x25.7:100
18598 msgid ""
18599 "Controls whether the X.25 Q-bit (Qualified Data Bit) is accessible by the "
18600 "user.  It expects an integer argument.  If set to 0 (default), the Q-bit is "
18601 "never set for outgoing packets and the Q-bit of incoming packets is "
18602 "ignored.  If set to 1, an additional first byte is prepended to each message "
18603 "read from or written to the socket.  For data read from the socket, a 0 "
18604 "first byte indicates that the Q-bits of the corresponding incoming data "
18605 "packets were not set.  A first byte with value 1 indicates that the Q-bit of "
18606 "the corresponding incoming data packets was set.  If the first byte of the "
18607 "data written to the socket is 1, the Q-bit of the corresponding outgoing "
18608 "data packets will be set.  If the first byte is 0, the Q-bit will not be "
18609 "set."
18610 msgstr ""
18611
18612 #. type: Plain text
18613 #: build/C/man7/x25.7:102
18614 msgid "The AF_X25 protocol family is a new feature of Linux 2.2."
18615 msgstr ""
18616
18617 #. type: Plain text
18618 #: build/C/man7/x25.7:105
18619 msgid "Plenty, as the X.25 PLP implementation is B<CONFIG_EXPERIMENTAL>."
18620 msgstr ""
18621
18622 #. type: Plain text
18623 #: build/C/man7/x25.7:107
18624 msgid "This man page is incomplete."
18625 msgstr ""
18626
18627 #. type: Plain text
18628 #: build/C/man7/x25.7:114
18629 msgid ""
18630 "There is no dedicated application programmer's header file yet; you need to "
18631 "include the kernel header file I<E<lt>linux/x25.hE<gt>>.  "
18632 "B<CONFIG_EXPERIMENTAL> might also imply that future versions of the "
18633 "interface are not binary compatible."
18634 msgstr ""
18635
18636 #. type: Plain text
18637 #: build/C/man7/x25.7:118
18638 msgid ""
18639 "X.25 N-Reset events are not propagated to the user process yet.  Thus, if a "
18640 "reset occurred, data might be lost without notice."
18641 msgstr ""
18642
18643 #. type: Plain text
18644 #: build/C/man7/x25.7:121
18645 msgid "B<socket>(2), B<socket>(7)"
18646 msgstr ""
18647
18648 #. type: Plain text
18649 #: build/C/man7/x25.7:126
18650 msgid ""
18651 "Jonathan Simon Naylor: \\(lqThe Re-Analysis and Re-Implementation of "
18652 "X.25.\\(rq The URL is E<.UR "
18653 "ftp://ftp.pspt.fi\\:/pub\\:/ham\\:/linux\\:/ax25\\:/x25doc.tgz> E<.UE .>"
18654 msgstr ""