# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2012-05-09 02:19+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: TH
#: original/man3/ipq_create_handle.3:1
#, no-wrap
msgid "IPQ_CREATE_HANDLE"
msgstr ""

#. type: TH
#: original/man3/ipq_create_handle.3:1 original/man3/ipq_errstr.3:1 original/man3/ipq_message_type.3:1 original/man3/ipq_read.3:1 original/man3/ipq_set_mode.3:1 original/man3/ipq_set_verdict.3:1 original/man3/libipq.3:1
#, no-wrap
msgid "16 October 2001"
msgstr ""

#. type: TH
#: original/man3/ipq_create_handle.3:1 original/man3/ipq_errstr.3:1 original/man3/ipq_message_type.3:1 original/man3/ipq_read.3:1 original/man3/ipq_set_mode.3:1 original/man3/ipq_set_verdict.3:1 original/man3/libipq.3:1
#, no-wrap
msgid "Linux iptables 1.2"
msgstr ""

#. type: TH
#: original/man3/ipq_create_handle.3:1 original/man3/ipq_errstr.3:1 original/man3/ipq_message_type.3:1 original/man3/ipq_read.3:1 original/man3/ipq_set_mode.3:1 original/man3/ipq_set_verdict.3:1 original/man3/libipq.3:1
#, no-wrap
msgid "Linux Programmer's Manual"
msgstr ""

#
#.  $Id: libipq.3,v 1.5 2001/11/24 15:09:20 jamesm Exp $
#
#.      Copyright (c) 2000-2001 Netfilter Core Team
#
#.      This program is free software; you can redistribute it and/or modify
#.      it under the terms of the GNU General Public License as published by
#.      the Free Software Foundation; either version 2 of the License, or
#.      (at your option) any later version.
#
#.      This program is distributed in the hope that it will be useful,
#.      but WITHOUT ANY WARRANTY; without even the implied warranty of
#.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#.      GNU General Public License for more details.
#
#.      You should have received a copy of the GNU General Public License
#.      along with this program; if not, write to the Free Software
#.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#. type: SH
#: original/man3/ipq_create_handle.3:22 original/man3/ipq_errstr.3:22 original/man3/ipq_message_type.3:22 original/man3/ipq_read.3:22 original/man3/ipq_set_mode.3:22 original/man3/ipq_set_verdict.3:22 original/man3/libipq.3:22
#, no-wrap
msgid "NAME"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:24
msgid "ipq_create_handle, ipq_destroy_handle - create and destroy libipq handles."
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:24 original/man3/ipq_errstr.3:24 original/man3/ipq_message_type.3:24 original/man3/ipq_read.3:24 original/man3/ipq_set_mode.3:24 original/man3/ipq_set_verdict.3:24 original/man3/libipq.3:24
#, no-wrap
msgid "SYNOPSIS"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:26 original/man3/ipq_errstr.3:26 original/man3/ipq_message_type.3:26 original/man3/ipq_read.3:26 original/man3/ipq_set_mode.3:26 original/man3/ipq_set_verdict.3:26 original/man3/libipq.3:26
msgid "B<#include E<lt>linux/netfilter.hE<gt>>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:28 original/man3/ipq_errstr.3:28 original/man3/ipq_message_type.3:28 original/man3/ipq_read.3:28 original/man3/ipq_set_mode.3:28 original/man3/ipq_set_verdict.3:28 original/man3/libipq.3:28
msgid "B<#include E<lt>libipq.hE<gt>>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:30
msgid ""
"B<struct ipq_handle *ipq_create_handle(u_int32_t >I<flags>B<, u_int32_t "
">I<protocol>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:32
msgid "B<int ipq_destroy_handle(struct ipq_handle *>I<h>B<);>"
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:32 original/man3/ipq_errstr.3:32 original/man3/ipq_message_type.3:34 original/man3/ipq_read.3:30 original/man3/ipq_set_mode.3:30 original/man3/ipq_set_verdict.3:30 original/man3/libipq.3:28
#, no-wrap
msgid "DESCRIPTION"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:40
msgid ""
"The B<ipq_create_handle> function initialises libipq for an application, "
"attempts to bind to the Netlink socket used by ip_queue, and returns an "
"opaque context handle.  It should be the first libipq function to be called "
"by an application.  The handle returned should be used in all subsequent "
"library calls which require a handle parameter."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:45
msgid ""
"The I<flags> parameter is not currently used and should be set to zero by "
"the application for forward compatibility."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:51
msgid ""
"The I<protocol> parameter is used to specify the protocol of the packets to "
"be queued.  Valid values are PF_INET for IPv4 and PF_INET6 for IPv6.  "
"Currently, only one protocol may be queued at a time for a handle."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:57
msgid ""
"The B<ipq_destroy_handle> function frees up resources allocated by "
"B<ipq_create_handle>, and should be used when the handle is no longer "
"required by the application."
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:57
#, no-wrap
msgid "RETURN VALUES"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:61
msgid "On success, B<ipq_create_handle> returns a pointer to a context handle."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:63
msgid "On failure, NULL is returned."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:67
msgid "On success, B<ipq_destroy_handle> returns zero."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:69 original/man3/ipq_read.3:68 original/man3/ipq_set_mode.3:72 original/man3/ipq_set_verdict.3:77
msgid "On failure, -1 is returned."
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:69 original/man3/ipq_read.3:78 original/man3/ipq_set_mode.3:74 original/man3/ipq_set_verdict.3:79
#, no-wrap
msgid "ERRORS"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:74 original/man3/ipq_set_mode.3:79
msgid ""
"On failure, a descriptive error message will be available via the "
"B<ipq_errstr> function."
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:74 original/man3/ipq_errstr.3:56 original/man3/ipq_message_type.3:126 original/man3/ipq_read.3:92 original/man3/ipq_set_mode.3:97 original/man3/ipq_set_verdict.3:84 original/man3/libipq.3:248
#, no-wrap
msgid "BUGS"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:76 original/man3/ipq_errstr.3:58 original/man3/ipq_message_type.3:128 original/man3/ipq_read.3:94 original/man3/ipq_set_mode.3:99 original/man3/ipq_set_verdict.3:86
msgid "None known."
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:76 original/man3/ipq_errstr.3:58 original/man3/ipq_message_type.3:128 original/man3/ipq_read.3:94 original/man3/ipq_set_mode.3:99 original/man3/ipq_set_verdict.3:86 original/man3/libipq.3:250
#, no-wrap
msgid "AUTHOR"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:78 original/man3/ipq_errstr.3:60 original/man3/ipq_message_type.3:130 original/man3/ipq_read.3:96 original/man3/ipq_set_mode.3:101 original/man3/ipq_set_verdict.3:88 original/man3/libipq.3:252
msgid "James Morris E<lt>jmorris@intercode.com.auE<gt>"
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:78 original/man3/ipq_errstr.3:60 original/man3/ipq_message_type.3:130 original/man3/ipq_read.3:96 original/man3/ipq_set_mode.3:101 original/man3/ipq_set_verdict.3:88 original/man3/libipq.3:252
#, no-wrap
msgid "COPYRIGHT"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:80 original/man3/ipq_errstr.3:62 original/man3/ipq_message_type.3:132 original/man3/ipq_read.3:98 original/man3/ipq_set_mode.3:103 original/man3/ipq_set_verdict.3:90 original/man3/libipq.3:254
msgid "Copyright (c) 2000-2001 Netfilter Core Team."
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:82 original/man3/ipq_errstr.3:64 original/man3/ipq_message_type.3:134 original/man3/ipq_read.3:100 original/man3/ipq_set_mode.3:105 original/man3/ipq_set_verdict.3:92 original/man3/libipq.3:256
msgid "Distributed under the GNU General Public License."
msgstr ""

#. type: SH
#: original/man3/ipq_create_handle.3:82 original/man3/ipq_errstr.3:64 original/man3/ipq_message_type.3:134 original/man3/ipq_read.3:102 original/man3/ipq_set_mode.3:105 original/man3/ipq_set_verdict.3:92 original/man3/libipq.3:262
#, no-wrap
msgid "SEE ALSO"
msgstr ""

#. type: Plain text
#: original/man3/ipq_create_handle.3:84 original/man3/ipq_errstr.3:66 original/man3/ipq_message_type.3:136 original/man3/ipq_set_verdict.3:95
msgid "B<iptables>(8), B<libipq>(3)."
msgstr ""

#. type: TH
#: original/man3/ipq_errstr.3:1
#, no-wrap
msgid "IPQ_ERRSTR"
msgstr ""

#. type: Plain text
#: original/man3/ipq_errstr.3:24
msgid "ipq_errstr, ipq_perror - libipq error handling routines"
msgstr ""

#. type: Plain text
#: original/man3/ipq_errstr.3:30
msgid "B<char *ipq_errstr(>I<void>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_errstr.3:32
msgid "B<void ipq_perror(const char *>I<s>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_errstr.3:40
msgid ""
"The B<ipq_errstr> function returns a descriptive error message based on the "
"current value of the internal B<ipq_errno> variable.  All libipq API "
"functions set this internal variable upon failure."
msgstr ""

#. type: Plain text
#: original/man3/ipq_errstr.3:53
msgid ""
"The B<ipq_perror> function prints an error message to stderr corresponding "
"to the current value of the internal B<ipq_error> variable, and the global "
"B<errno> variable (if set).  The error message is prefixed with the string "
"I<s> as supplied by the application. If I<s> is NULL, the error message is "
"prefixed with the string \"ERROR\"."
msgstr ""

#. type: SH
#: original/man3/ipq_errstr.3:53 original/man3/ipq_read.3:66 original/man3/ipq_set_mode.3:70 original/man3/ipq_set_verdict.3:75
#, no-wrap
msgid "RETURN VALUE"
msgstr ""

#. type: Plain text
#: original/man3/ipq_errstr.3:56
msgid "B<ipq_errstr> returns an error message as outlined above."
msgstr ""

#. type: TH
#: original/man3/ipq_message_type.3:1
#, no-wrap
msgid "IPQ_MESSAGE_TYPE"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:24
msgid "ipq_message_type, ipq_get_packet, ipq_getmsgerr - query queue messages"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:30
msgid "B<int ipq_message_type(const unsigned char *>I<buf>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:32
msgid "B<ipq_packet_msg_t *ipq_get_packet(const unsigned char *>I<buf>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:34
msgid "B<int ipq_get_msgerr(const unsigned char *>I<buf>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:40
msgid ""
"The B<ipq_message_type> function returns the type of queue message returned "
"to userspace via B<ipq_read>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:50
msgid ""
"B<ipq_message_type> should always be called following a successful call to "
"B<ipq_read> to determine whether the message is a packet message or an error "
"message. The I<buf> parameter should be the same data obtained from the "
"previous call to B<ipq_read>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:53
msgid "B<ipq_message_type> will return one of the following values:"
msgstr ""

#. type: TP
#: original/man3/ipq_message_type.3:53
#, no-wrap
msgid "B<NLMSG_ERROR>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:56
msgid "An error message generated by the Netlink transport."
msgstr ""

#. type: TP
#: original/man3/ipq_message_type.3:57
#, no-wrap
msgid "B<IPQM_PACKET>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:60
msgid ""
"A packet message containing packet metadata and optional packet payload "
"data."
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:74
msgid ""
"The B<ipq_get_packet> function should be called if B<ipq_message_type> "
"returns B<IPQM_PACKET>.  The I<buf> parameter should point to the same data "
"used for the call to B<ipq_message_type>.  The pointer returned by "
"B<ipq_get_packet> points to a packet message, which is declared as follows:"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:92
#, no-wrap
msgid ""
"typedef struct ipq_packet_msg {\n"
"\tunsigned long packet_id;        /* ID of queued packet */\n"
"\tunsigned long mark;             /* Netfilter mark value */\n"
"\tlong timestamp_sec;             /* Packet arrival time (seconds) */\n"
"\tlong timestamp_usec;            /* Packet arrvial time (+useconds) */\n"
"\tunsigned int hook;              /* Netfilter hook we rode in on */\n"
"\tchar indev_name[IFNAMSIZ];      /* Name of incoming interface */\n"
"\tchar outdev_name[IFNAMSIZ];     /* Name of outgoing interface */\n"
"\tunsigned short hw_protocol;     /* Hardware protocol (network order) */\n"
"\tunsigned short hw_type;         /* Hardware type */\n"
"\tunsigned char hw_addrlen;       /* Hardware address length */\n"
"\tunsigned char hw_addr[8];       /* Hardware address */\n"
"\tsize_t data_len;                /* Length of packet data */\n"
"\tunsigned char payload[0];       /* Optional packet data */\n"
"} ipq_packet_msg_t;\n"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:105
msgid ""
"Each of these fields may be read by the application.  If the queue mode is "
"B<IPQ_COPY_PACKET> and the I<data_len> value is greater than zero, the "
"packet payload contents may be accessed in the memory following the "
"B<ipq_packet_msg_t> structure to a range of I<data_len.>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:110
msgid ""
"The I<packet_id> field contains a packet identifier to be used when calling "
"B<ipq_set_verdict>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_message_type.3:126
msgid ""
"The B<ipq_get_msgerr> function should be called if B<ipq_message_type> "
"returns B<NLMSG_ERROR.> The I<buf> parameter should point to the same data "
"used for the call to B<ipq_message_type>.  The value returned by "
"B<ipq_get_msgerr> is set by higher level kernel code and corresponds to "
"standard B<errno> values."
msgstr ""

#. type: TH
#: original/man3/ipq_read.3:1
#, no-wrap
msgid "IPQ_READ"
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:24
msgid "ipq_read - read queue messages from ip_queue and read into supplied buffer"
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:30
msgid ""
"B<ssize_t ipq_read(const struct ipq_handle *>I<h>B<, unsigned char "
"*>I<buf>B<, size_t >I<len>B<, int >I<timeout>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:38
msgid ""
"The B<ipq_read> function reads a queue message from the kernel and copies it "
"to the memory pointed to by I<buf> to a maximum length of I<len>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:44 original/man3/ipq_set_mode.3:42 original/man3/ipq_set_verdict.3:43
msgid ""
"The I<h> parameter is a context handle which must previously have been "
"returned successfully from a call to B<ipq_create_handle>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:50
msgid ""
"The caller is responsible for ensuring that the memory pointed to by I<buf> "
"is large enough to contain I<len> bytes."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:58
msgid ""
"The I<timeout> parameter may be used to set a timeout for the operation, "
"specified in microseconds.  This is implemented internally by the library "
"via the B<select> system call.  A value of zero provides normal, "
"backwards-compatible blocking behaviour with no timeout.  A negative value "
"causes the function to return immediately."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:66
msgid ""
"Data returned via I<buf> should not be accessed directly.  Use the "
"B<ipq_message_type>, B<ipq_get_packet>, and B<ipq_get_msgerr> functions to "
"access the queue message in the buffer."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:71
msgid ""
"On success, a non-zero positive value is returned when no timeout value is "
"specified."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:78
msgid ""
"On success with a timeout value specified, zero is returned if no data was "
"available to read, or if a non-blocked signal was caught.  In the latter "
"case, the global B<errno> value will be set to B<EINTR>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:83 original/man3/ipq_set_verdict.3:84
msgid ""
"On error, a descriptive error message will be available via the "
"B<ipq_errstr> function."
msgstr ""

#. type: SH
#: original/man3/ipq_read.3:83 original/man3/ipq_set_mode.3:79 original/man3/libipq.3:233
#, no-wrap
msgid "DIAGNOSTICS"
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:92
msgid ""
"While the B<ipq_read> function may return successfully, the queue message "
"copied to the buffer may itself be an error message from a higher level "
"kernel component.  Use B<ipq_message_type> to determine if it is an error "
"message, and B<ipq_get_msgerr> to access the value of the message."
msgstr ""

#. type: SH
#: original/man3/ipq_read.3:100 original/man3/libipq.3:256
#, no-wrap
msgid "CREDITS"
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:102
msgid ""
"Joost Remijn implemented the timeout feature, which appeared in the 1.2.4 "
"release of iptables."
msgstr ""

#. type: Plain text
#: original/man3/ipq_read.3:106
msgid "B<iptables>(8), B<libipq>(3), B<select>(2)."
msgstr ""

#. type: TH
#: original/man3/ipq_set_mode.3:1
#, no-wrap
msgid "IPQ_SET_MODE"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:24
msgid "ipq_set_mode - set the ip_queue queuing mode"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:30
msgid ""
"B<int ipq_set_mode(const struct ipq_handle *>I<h>B<, u_int8_t >I<mode>B<, "
"size_t >I<range>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:36
msgid ""
"The B<ipq_set_mode> function sends a message to the kernel ip_queue module, "
"specifying whether packet metadata only, or packet payloads as well as "
"metadata should be copied to userspace."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:46
msgid "The I<mode> parameter must be one of:"
msgstr ""

#. type: TP
#: original/man3/ipq_set_mode.3:46
#, no-wrap
msgid "B<IPQ_COPY_META>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:49
msgid "Copy only packet metadata to userspace."
msgstr ""

#. type: TP
#: original/man3/ipq_set_mode.3:49
#, no-wrap
msgid "B<IPQ_COPY_PACKET>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:52
msgid "Copy packet metadata and packet payloads to userspace."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:61
msgid ""
"The I<range> parameter is used to specify how many bytes of the payload to "
"copy to userspace.  It is only valid for B<IPQ_COPY_PACKET> mode and is "
"otherwise ignored.  The maximum useful value for I<range> is 65535 (greater "
"values will be clamped to this by ip_queue)."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:66
msgid ""
"B<ipq_set_mode> is usually used immediately following B<ipq_create_handle> "
"to enable the flow of packets to userspace."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:70
msgid ""
"Note that as the underlying Netlink messaging transport is connectionless, "
"the ip_queue module does not know that a userspace application is ready to "
"communicate until it receives a message such as this."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:74 original/man3/ipq_set_verdict.3:79
msgid "On success, a non-zero positive value is returned."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:82
msgid ""
"A relatively common failure may occur if the ip_queue module is not loaded.  "
"In this case, the following code excerpt:"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:91
#, no-wrap
msgid ""
"status = ipq_set_mode(h, IPQ_COPY_META, 0);\n"
"if (status E<lt> 0) {\n"
"\tipq_perror(\"myapp\");\n"
"\tipq_destroy_handle(h);\n"
"\texit(1);\n"
"}\n"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:95
msgid "would generate the following output:"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:97
msgid "I<myapp: Failed to send netlink message: Connection refused>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_mode.3:107
msgid "B<libipq>(3), B<iptables>(8)."
msgstr ""

#. type: TH
#: original/man3/ipq_set_verdict.3:1
#, no-wrap
msgid "IPQ_SET_VERDICT"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:24
msgid "ipq_set_verdict - issue verdict and optionally modified packet to kernel"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:30
msgid ""
"B<int ipq_set_verdict(const struct ipq_handle *>I<h>B<, ipq_id_t >I<id>B<, "
"unsigned int >I<verdict>B<, size_t >I<data_len>B<, unsigned char "
"*>I<buf>B<);>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:37
msgid ""
"The B<ipq_set_verdict> function issues a verdict on a packet previously "
"obtained with B<ipq_read>, specifing the intended disposition of the packet, "
"and optionally supplying a modified version of the payload data."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:48
msgid "The I<id> parameter is the packet identifier obtained via B<ipq_get_packet>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:52
msgid "The I<verdict> parameter must be one of:"
msgstr ""

#. type: TP
#: original/man3/ipq_set_verdict.3:52
#, no-wrap
msgid "B<NF_ACCEPT>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:55
msgid "Accept the packet and continue traversal within the kernel."
msgstr ""

#. type: TP
#: original/man3/ipq_set_verdict.3:56
#, no-wrap
msgid "B<NF_DROP>"
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:59
msgid "Drop the packet."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:66
msgid ""
"The I<data_len> parameter is the length of the data pointed to by I<buf>, "
"the optional replacement payload data."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:72
msgid ""
"If simply setting a verdict without modifying the payload data, use zero for "
"I<data_len> and NULL for I<buf>."
msgstr ""

#. type: Plain text
#: original/man3/ipq_set_verdict.3:75
msgid ""
"The application is responsible for recalculating any packet checksums when "
"modifying packets."
msgstr ""

#. type: TH
#: original/man3/libipq.3:1
#, no-wrap
msgid "LIBIPQ"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:24
msgid "libipq - iptables userspace packet queuing library."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:30
msgid "libipq is a development library for iptables userspace packet queuing."
msgstr ""

#. type: SS
#: original/man3/libipq.3:30
#, no-wrap
msgid "Userspace Packet Queuing"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:36
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:41
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:45
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:49
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:"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:51
msgid "  # modprobe iptable_filter"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:53
msgid "  # modprobe ip_queue"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:55
msgid "  # iptables -A OUTPUT -p icmp -j QUEUE"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:60
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"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:62
msgid "An application may receive and process these packets via libipq."
msgstr ""

#. type: SS
#: original/man3/libipq.3:64
#, no-wrap
msgid "Libipq Overview"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:68
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:70
msgid "B<Initialisation>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:75
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:77
msgid "B<Setting the Queue Mode>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:83
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:85
msgid "B<Receiving Packets from the Queue>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:93
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.>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:96
msgid "The type of packet may be determined with B<ipq_message_type>(3)."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:99
msgid ""
"If it's a packet message, the metadata and optional payload may be retrieved "
"with B<ipq_get_packet>(3)."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:102
msgid "To retrieve the value of an error message, use B<ipq_get_msgerr>(3)."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:104
msgid "B<Issuing Verdicts on Packets>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:108
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)."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:110
msgid "B<Error Handling>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:116
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)."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:124
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."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:126
msgid "B<Cleaning Up>"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:130
msgid ""
"To free up the Netlink socket and destroy resources associated with the "
"context handle, call B<ipq_destroy_handle>(3)."
msgstr ""

#. type: SH
#: original/man3/libipq.3:130
#, no-wrap
msgid "SUMMARY"
msgstr ""

#. type: TP
#: original/man3/libipq.3:131
#, no-wrap
msgid "B<ipq_create_handle>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:134
msgid "Initialise library, return context handle."
msgstr ""

#. type: TP
#: original/man3/libipq.3:134
#, no-wrap
msgid "B<ipq_set_mode>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:138
msgid ""
"Set the queue mode, to copy either packet metadata, or payloads as well as "
"metadata to userspace."
msgstr ""

#. type: TP
#: original/man3/libipq.3:138
#, no-wrap
msgid "B<ipq_read>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:142
msgid "Wait for a queue message to arrive from ip_queue and read it into a buffer."
msgstr ""

#. type: TP
#: original/man3/libipq.3:142
#, no-wrap
msgid "B<ipq_message_type>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:145
msgid "Determine message type in the buffer."
msgstr ""

#. type: TP
#: original/man3/libipq.3:145
#, no-wrap
msgid "B<ipq_get_packet>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:148
msgid "Retrieve a packet message from the buffer."
msgstr ""

#. type: TP
#: original/man3/libipq.3:148
#, no-wrap
msgid "B<ipq_get_msgerr>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:151
msgid "Retrieve an error message from the buffer."
msgstr ""

#. type: TP
#: original/man3/libipq.3:151
#, no-wrap
msgid "B<ipq_set_verdict>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:154
msgid "Set a verdict on a packet, optionally replacing its contents."
msgstr ""

#. type: TP
#: original/man3/libipq.3:154
#, no-wrap
msgid "B<ipq_errstr>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:157
msgid "Return an error message corresponding to the internal ipq_errno variable."
msgstr ""

#. type: TP
#: original/man3/libipq.3:157
#, no-wrap
msgid "B<ipq_perror>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:160
msgid "Helper function to print error messages to stderr."
msgstr ""

#. type: TP
#: original/man3/libipq.3:160
#, no-wrap
msgid "B<ipq_destroy_handle>(3)"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:163
msgid "Destroy context handle and associated resources."
msgstr ""

#. type: SH
#: original/man3/libipq.3:163
#, no-wrap
msgid "EXAMPLE"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:166
msgid ""
"The following is an example of a simple application which receives packets "
"and issues NF_ACCEPT verdicts on each packet."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:174
#, no-wrap
msgid ""
"/*\n"
" * This code is GPL.\n"
" */\n"
"#include E<lt>linux/netfilter.hE<gt>\n"
"#include E<lt>libipq.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:176
#, no-wrap
msgid "#define BUFSIZE 2048 \n"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:183
#, no-wrap
msgid ""
"static void die(struct ipq_handle *h)\n"
"{\n"
"\tipq_perror(\"passer\");\n"
"\tipq_destroy_handle(h);\n"
"\texit(1);\n"
"}\n"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:228
#, no-wrap
msgid ""
"int main(int argc, char **argv)\n"
"{\n"
"\tint status;\n"
"\tunsigned char buf[BUFSIZE];\n"
"\tstruct ipq_handle *h;\n"
"\t\n"
"\th = ipq_create_handle(0, PF_INET);\n"
"\tif (!h)\n"
"\t\tdie(h);\n"
"\t\t\n"
"\tstatus = ipq_set_mode(h, IPQ_COPY_PACKET, BUFSIZE);\n"
"\tif (status E<lt> 0)\n"
"\t\tdie(h);\n"
"\t\t\n"
"\tdo{\n"
"\t\tstatus = ipq_read(h, buf, BUFSIZE, 0);\n"
"\t\tif (status E<lt> 0)\n"
"\t\t\tdie(h);\n"
"\t\t\t\n"
"\t\tswitch (ipq_message_type(buf)) {\n"
"\t\t\tcase NLMSG_ERROR:\n"
"\t\t\t\tfprintf(stderr, \"Received error message %d\\en\",\n"
"\t\t\t\t        ipq_get_msgerr(buf));\n"
"\t\t\t\tbreak;\n"
"\t\t\t\t\n"
"\t\t\tcase IPQM_PACKET: {\n"
"\t\t\t\tipq_packet_msg_t *m = ipq_get_packet(buf);\n"
"\t\t\t\t\n"
"\t\t\t\tstatus = ipq_set_verdict(h, m-E<gt>packet_id,\n"
"\t\t\t\t                         NF_ACCEPT, 0, NULL);\n"
"\t\t\t\tif (status E<lt> 0)\n"
"\t\t\t\t\tdie(h);\n"
"\t\t\t\tbreak;\n"
"\t\t\t}\n"
"\t\t\t\n"
"\t\t\tdefault:\n"
"\t\t\t\tfprintf(stderr, \"Unknown message type!\\en\");\n"
"\t\t\t\tbreak;\n"
"\t\t}\n"
"\t} while (1);\n"
"\t\n"
"\tipq_destroy_handle(h);\n"
"\treturn 0;\n"
"}\n"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:233
msgid ""
"Pointers to more libipq application examples may be found in The Netfilter "
"FAQ."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:236
msgid ""
"For information about monitoring and tuning ip_queue, refer to the Linux 2.4 "
"Packet Filtering HOWTO."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:240
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."
msgstr ""

#. type: SH
#: original/man3/libipq.3:240
#, no-wrap
msgid "SECURITY"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:244
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."
msgstr ""

#. type: SH
#: original/man3/libipq.3:244
#, no-wrap
msgid "TODO"
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:248
msgid "Per-handle B<ipq_errno> values."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:250
msgid "Probably."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:260
msgid ""
"Joost Remijn implemented the B<ipq_read> timeout feature, which appeared in "
"the 1.2.4 release of iptables."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:262
msgid "Fernando Anton added support for IPv6."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:274
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)."
msgstr ""

#. type: Plain text
#: original/man3/libipq.3:279
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."
msgstr ""
