OSDN Git Service

b603e081e73835836b129aa76d5d28c62b5ec0d5
[linuxjm/iptables.git] / po4a / man3 / libipq.3.ja.po
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: 2013-04-08 14:07+0900\n"
11 "PO-Revision-Date: 2013-04-08 14:30+0900\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 #, no-wrap
21 msgid "LIBIPQ"
22 msgstr ""
23
24 #. type: TH
25 #, no-wrap
26 msgid "16 October 2001"
27 msgstr ""
28
29 #. type: TH
30 #, no-wrap
31 msgid "Linux iptables 1.2"
32 msgstr ""
33
34 #. type: TH
35 #, no-wrap
36 msgid "Linux Programmer's Manual"
37 msgstr ""
38
39 #
40 #
41 #
42 #
43 #.      Copyright (c) 2000-2001 Netfilter Core Team
44 #.      This program is free software; you can redistribute it and/or modify
45 #.      it under the terms of the GNU General Public License as published by
46 #.      the Free Software Foundation; either version 2 of the License, or
47 #.      (at your option) any later version.
48 #.      This program is distributed in the hope that it will be useful,
49 #.      but WITHOUT ANY WARRANTY; without even the implied warranty of
50 #.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
51 #.      GNU General Public License for more details.
52 #.      You should have received a copy of the GNU General Public License
53 #.      along with this program; if not, write to the Free Software
54 #.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
55 #. type: SH
56 #, no-wrap
57 msgid "NAME"
58 msgstr ""
59
60 #. type: Plain text
61 msgid "libipq \\(em iptables userspace packet queuing library."
62 msgstr ""
63
64 #. type: SH
65 #, no-wrap
66 msgid "SYNOPSIS"
67 msgstr ""
68
69 #. type: Plain text
70 msgid "B<#include E<lt>linux/netfilter.hE<gt>>"
71 msgstr ""
72
73 #. type: Plain text
74 msgid "B<#include E<lt>libipq.hE<gt>>"
75 msgstr ""
76
77 #. type: SH
78 #, no-wrap
79 msgid "DESCRIPTION"
80 msgstr ""
81
82 #. type: Plain text
83 msgid "libipq is a development library for iptables userspace packet queuing."
84 msgstr ""
85
86 #. type: SS
87 #, no-wrap
88 msgid "Userspace Packet Queuing"
89 msgstr ""
90
91 #. type: Plain text
92 msgid "Netfilter provides a mechanism for passing packets out of the stack for queueing to userspace, then receiving these packets back into the kernel with a verdict specifying what to do with the packets (such as ACCEPT or DROP).  These packets may also be modified in userspace prior to reinjection back into the kernel."
93 msgstr ""
94
95 #. type: Plain text
96 msgid "For each supported protocol, a kernel module called a I<queue handler> may register with Netfilter to perform the mechanics of passing packets to and from userspace."
97 msgstr ""
98
99 #. type: Plain text
100 msgid "The standard queue handler for IPv4 is ip_queue.  It is provided as an experimental module with 2.4 kernels, and uses a Netlink socket for kernel/userspace communication."
101 msgstr ""
102
103 #. type: Plain text
104 msgid "Once ip_queue is loaded, IP packets may be selected with iptables and queued for userspace processing via the QUEUE target.  For example, running the following commands:"
105 msgstr ""
106
107 #. type: Plain text
108 msgid "  # modprobe iptable_filter"
109 msgstr ""
110
111 #. type: Plain text
112 msgid "  # modprobe ip_queue"
113 msgstr ""
114
115 #. type: Plain text
116 msgid "  # iptables -A OUTPUT -p icmp -j QUEUE"
117 msgstr ""
118
119 #. type: Plain text
120 msgid "will cause any locally generated ICMP packets (e.g. ping output) to be sent to the ip_queue module, which will then attempt to deliver the packets to a userspace application.  If no userspace application is waiting, the packets will be dropped"
121 msgstr ""
122
123 #. type: Plain text
124 msgid "An application may receive and process these packets via libipq."
125 msgstr ""
126
127 #. type: SS
128 #, no-wrap
129 msgid "Libipq Overview"
130 msgstr ""
131
132 #. type: Plain text
133 msgid "Libipq provides an API for communicating with ip_queue.  The following is an overview of API usage, refer to individual man pages for more details on each function."
134 msgstr ""
135
136 #. type: Plain text
137 msgid "B<Initialisation>"
138 msgstr ""
139
140 #. type: Plain text
141 msgid "To initialise the library, call B<ipq_create_handle>(3).  This will attempt to bind to the Netlink socket used by ip_queue and return an opaque context handle for subsequent library calls."
142 msgstr ""
143
144 #. type: Plain text
145 msgid "B<Setting the Queue Mode>"
146 msgstr ""
147
148 #. type: Plain text
149 msgid "B<ipq_set_mode>(3)  allows the application to specify whether packet metadata, or packet payloads as well as metadata are copied to userspace.  It is also used to initially notify ip_queue that an application is ready to receive queue messages."
150 msgstr ""
151
152 #. type: Plain text
153 msgid "B<Receiving Packets from the Queue>"
154 msgstr ""
155
156 #. type: Plain text
157 msgid "B<ipq_read>(3)  waits for queue messages to arrive from ip_queue and copies them into a supplied buffer.  Queue messages may be I<packet messages> or I<error messages.>"
158 msgstr ""
159
160 #. type: Plain text
161 msgid "The type of packet may be determined with B<ipq_message_type>(3)."
162 msgstr ""
163
164 #. type: Plain text
165 msgid "If it's a packet message, the metadata and optional payload may be retrieved with B<ipq_get_packet>(3)."
166 msgstr ""
167
168 #. type: Plain text
169 msgid "To retrieve the value of an error message, use B<ipq_get_msgerr>(3)."
170 msgstr ""
171
172 #. type: Plain text
173 msgid "B<Issuing Verdicts on Packets>"
174 msgstr ""
175
176 #. type: Plain text
177 msgid "To issue a verdict on a packet, and optionally return a modified version of the packet to the kernel, call B<ipq_set_verdict>(3)."
178 msgstr ""
179
180 #. type: Plain text
181 msgid "B<Error Handling>"
182 msgstr ""
183
184 #. type: Plain text
185 msgid "An error string corresponding to the current value of the internal error variable B<ipq_errno> may be obtained with B<ipq_errstr>(3)."
186 msgstr ""
187
188 #. type: Plain text
189 msgid "For simple applications, calling B<ipq_perror>(3)  will print the same message as B<ipq_errstr>(3), as well as the string corresponding to the global B<errno> value (if set) to stderr."
190 msgstr ""
191
192 #. type: Plain text
193 msgid "B<Cleaning Up>"
194 msgstr ""
195
196 #. type: Plain text
197 msgid "To free up the Netlink socket and destroy resources associated with the context handle, call B<ipq_destroy_handle>(3)."
198 msgstr ""
199
200 #. type: SH
201 #, no-wrap
202 msgid "SUMMARY"
203 msgstr ""
204
205 #. type: TP
206 #, no-wrap
207 msgid "B<ipq_create_handle>(3)"
208 msgstr ""
209
210 #. type: Plain text
211 msgid "Initialise library, return context handle."
212 msgstr ""
213
214 #. type: TP
215 #, no-wrap
216 msgid "B<ipq_set_mode>(3)"
217 msgstr ""
218
219 #. type: Plain text
220 msgid "Set the queue mode, to copy either packet metadata, or payloads as well as metadata to userspace."
221 msgstr ""
222
223 #. type: TP
224 #, no-wrap
225 msgid "B<ipq_read>(3)"
226 msgstr ""
227
228 #. type: Plain text
229 msgid "Wait for a queue message to arrive from ip_queue and read it into a buffer."
230 msgstr ""
231
232 #. type: TP
233 #, no-wrap
234 msgid "B<ipq_message_type>(3)"
235 msgstr ""
236
237 #. type: Plain text
238 msgid "Determine message type in the buffer."
239 msgstr ""
240
241 #. type: TP
242 #, no-wrap
243 msgid "B<ipq_get_packet>(3)"
244 msgstr ""
245
246 #. type: Plain text
247 msgid "Retrieve a packet message from the buffer."
248 msgstr ""
249
250 #. type: TP
251 #, no-wrap
252 msgid "B<ipq_get_msgerr>(3)"
253 msgstr ""
254
255 #. type: Plain text
256 msgid "Retrieve an error message from the buffer."
257 msgstr ""
258
259 #. type: TP
260 #, no-wrap
261 msgid "B<ipq_set_verdict>(3)"
262 msgstr ""
263
264 #. type: Plain text
265 msgid "Set a verdict on a packet, optionally replacing its contents."
266 msgstr ""
267
268 #. type: TP
269 #, no-wrap
270 msgid "B<ipq_errstr>(3)"
271 msgstr ""
272
273 #. type: Plain text
274 msgid "Return an error message corresponding to the internal ipq_errno variable."
275 msgstr ""
276
277 #. type: TP
278 #, no-wrap
279 msgid "B<ipq_perror>(3)"
280 msgstr ""
281
282 #. type: Plain text
283 msgid "Helper function to print error messages to stderr."
284 msgstr ""
285
286 #. type: TP
287 #, no-wrap
288 msgid "B<ipq_destroy_handle>(3)"
289 msgstr ""
290
291 #. type: Plain text
292 msgid "Destroy context handle and associated resources."
293 msgstr ""
294
295 #. type: SH
296 #, no-wrap
297 msgid "EXAMPLE"
298 msgstr ""
299
300 #. type: Plain text
301 msgid "The following is an example of a simple application which receives packets and issues NF_ACCEPT verdicts on each packet."
302 msgstr ""
303
304 #. type: Plain text
305 #, no-wrap
306 msgid ""
307 "/*\n"
308 " * This code is GPL.\n"
309 " */\n"
310 "#include E<lt>linux/netfilter.hE<gt>\n"
311 "#include E<lt>libipq.hE<gt>\n"
312 "#include E<lt>stdio.hE<gt>\n"
313 msgstr ""
314
315 #. type: Plain text
316 #, no-wrap
317 msgid "#define BUFSIZE 2048 \n"
318 msgstr ""
319
320 #. type: Plain text
321 #, no-wrap
322 msgid ""
323 "static void die(struct ipq_handle *h)\n"
324 "{\n"
325 "\tipq_perror(\"passer\");\n"
326 "\tipq_destroy_handle(h);\n"
327 "\texit(1);\n"
328 "}\n"
329 msgstr ""
330
331 #. type: Plain text
332 #, no-wrap
333 msgid ""
334 "int main(int argc, char **argv)\n"
335 "{\n"
336 "\tint status;\n"
337 "\tunsigned char buf[BUFSIZE];\n"
338 "\tstruct ipq_handle *h;\n"
339 "\t\n"
340 "\th = ipq_create_handle(0, NFPROTO_IPV4);\n"
341 "\tif (!h)\n"
342 "\t\tdie(h);\n"
343 "\t\t\n"
344 "\tstatus = ipq_set_mode(h, IPQ_COPY_PACKET, BUFSIZE);\n"
345 "\tif (status E<lt> 0)\n"
346 "\t\tdie(h);\n"
347 "\t\t\n"
348 "\tdo{\n"
349 "\t\tstatus = ipq_read(h, buf, BUFSIZE, 0);\n"
350 "\t\tif (status E<lt> 0)\n"
351 "\t\t\tdie(h);\n"
352 "\t\t\t\n"
353 "\t\tswitch (ipq_message_type(buf)) {\n"
354 "\t\t\tcase NLMSG_ERROR:\n"
355 "\t\t\t\tfprintf(stderr, \"Received error message %d\\en\",\n"
356 "\t\t\t\t        ipq_get_msgerr(buf));\n"
357 "\t\t\t\tbreak;\n"
358 "\t\t\t\t\n"
359 "\t\t\tcase IPQM_PACKET: {\n"
360 "\t\t\t\tipq_packet_msg_t *m = ipq_get_packet(buf);\n"
361 "\t\t\t\t\n"
362 "\t\t\t\tstatus = ipq_set_verdict(h, m-E<gt>packet_id,\n"
363 "\t\t\t\t                         NF_ACCEPT, 0, NULL);\n"
364 "\t\t\t\tif (status E<lt> 0)\n"
365 "\t\t\t\t\tdie(h);\n"
366 "\t\t\t\tbreak;\n"
367 "\t\t\t}\n"
368 "\t\t\t\n"
369 "\t\t\tdefault:\n"
370 "\t\t\t\tfprintf(stderr, \"Unknown message type!\\en\");\n"
371 "\t\t\t\tbreak;\n"
372 "\t\t}\n"
373 "\t} while (1);\n"
374 "\t\n"
375 "\tipq_destroy_handle(h);\n"
376 "\treturn 0;\n"
377 "}\n"
378 msgstr ""
379
380 #. type: Plain text
381 msgid "Pointers to more libipq application examples may be found in The Netfilter FAQ."
382 msgstr ""
383
384 #. type: SH
385 #, no-wrap
386 msgid "DIAGNOSTICS"
387 msgstr ""
388
389 #. type: Plain text
390 msgid "For information about monitoring and tuning ip_queue, refer to the Linux 2.4 Packet Filtering HOWTO."
391 msgstr ""
392
393 #. type: Plain text
394 msgid "If an application modifies a packet, it needs to also update any checksums for the packet.  Typically, the kernel will silently discard modified packets with invalid checksums."
395 msgstr ""
396
397 #. type: SH
398 #, no-wrap
399 msgid "SECURITY"
400 msgstr ""
401
402 #. type: Plain text
403 msgid "Processes require CAP_NET_ADMIN capabilty to access the kernel ip_queue module.  Such processes can potentially access and modify any IP packets received, generated or forwarded by the kernel."
404 msgstr ""
405
406 #. type: SH
407 #, no-wrap
408 msgid "TODO"
409 msgstr ""
410
411 #. type: Plain text
412 msgid "Per-handle B<ipq_errno> values."
413 msgstr ""
414
415 #. type: SH
416 #, no-wrap
417 msgid "BUGS"
418 msgstr ""
419
420 #. type: Plain text
421 msgid "Probably."
422 msgstr ""
423
424 #. type: SH
425 #, no-wrap
426 msgid "AUTHOR"
427 msgstr ""
428
429 #. type: Plain text
430 msgid "James Morris E<lt>jmorris@intercode.com.auE<gt>"
431 msgstr ""
432
433 #. type: SH
434 #, no-wrap
435 msgid "COPYRIGHT"
436 msgstr ""
437
438 #. type: Plain text
439 msgid "Copyright (c) 2000-2001 Netfilter Core Team."
440 msgstr ""
441
442 #. type: Plain text
443 msgid "Distributed under the GNU General Public License."
444 msgstr ""
445
446 #. type: SH
447 #, no-wrap
448 msgid "CREDITS"
449 msgstr ""
450
451 #. type: Plain text
452 msgid "Joost Remijn implemented the B<ipq_read> timeout feature, which appeared in the 1.2.4 release of iptables."
453 msgstr ""
454
455 #. type: Plain text
456 msgid "Fernando Anton added support for IPv6."
457 msgstr ""
458
459 #. type: SH
460 #, no-wrap
461 msgid "SEE ALSO"
462 msgstr ""
463
464 #. type: Plain text
465 msgid "B<iptables>(8), B<ipq_create_handle>(3), B<ipq_destroy_handle>(3), B<ipq_errstr>(3), B<ipq_get_msgerr>(3), B<ipq_get_packet>(3), B<ipq_message_type>(3), B<ipq_perror>(3), B<ipq_read>(3), B<ipq_set_mode>(3), B<ipq_set_verdict>(3)."
466 msgstr ""
467
468 #. type: Plain text
469 msgid "The Netfilter home page at http://netfilter.samba.org/ which has links to The Networking Concepts HOWTO, The Linux 2.4 Packet Filtering HOWTO, The Linux 2.4 NAT HOWTO, The Netfilter Hacking HOWTO, The Netfilter FAQ and many other useful resources."
470 msgstr ""