Copyright (C) 2000-2012 |
Manpages IPQ_MESSAGE_TYPESection: Linux Programmer's Manual (3)Updated: 16 October 2001 Index Return to Main Contents NAMEipq_message_type, ipq_get_packet, ipq_getmsgerr - query queue messagesSYNOPSIS#include <linux/netfilter.h>#include <libipq.h>
int ipq_message_type(const unsigned char *buf);
DESCRIPTIONThe ipq_message_type function returns the type of queue message returned to userspace via ipq_read.ipq_message_type should always be called following a successful call to ipq_read to determine whether the message is a packet message or an error message. The buf parameter should be the same data obtained from the previous call to ipq_read. ipq_message_type will return one of the following values:
The ipq_get_packet function should be called if ipq_message_type returns IPQM_PACKET. The buf parameter should point to the same data used for the call to ipq_message_type. The pointer returned by ipq_get_packet points to a packet message, which is declared as follows:
Each of these fields may be read by the application. If the queue mode is IPQ_COPY_PACKET and the data_len value is greater than zero, the packet payload contents may be accessed in the memory following the ipq_packet_msg_t structure to a range of data_len. The packet_id field contains a packet identifier to be used when calling ipq_set_verdict. The ipq_get_msgerr function should be called if ipq_message_type returns NLMSG_ERROR. The buf parameter should point to the same data used for the call to ipq_message_type. The value returned by ipq_get_msgerr is set by higher level kernel code and corresponds to standard errno values. BUGSNone known.AUTHORJames Morris <jmorris@intercode.com.au>COPYRIGHTCopyright (c) 2000-2001 Netfilter Core Team.Distributed under the GNU General Public License. SEE ALSOiptables(8), libipq(3).
IndexThis document was created by man2html, using the manual pages. Time: 11:42:20 GMT, April 24, 2024 |