from small one page howto to huge articles all in one place
 

search text in:





Poll
Which filesystem do you use?






poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

20240

userrating:

average rating: 3.4 (205 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

36019

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

20986

userrating:

average rating: 1.0 (50 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion
You are here: manpages





IPQ_MESSAGE_TYPE

Section: Linux Programmer's Manual (3)
Updated: 16 October 2001
Index Return to Main Contents
 

NAME

ipq_message_type, ipq_get_packet, ipq_getmsgerr --- query queue messages  

SYNOPSIS

#include <linux/netfilter.h>
#include <libipq.h>

int ipq_message_type(const unsigned char *buf);
ipq_packet_msg_t *ipq_get_packet(const unsigned char *buf);
int ipq_get_msgerr(const unsigned char *buf);  

DESCRIPTION

The 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:

NLMSG_ERROR
An error message generated by the Netlink transport.

IPQM_PACKET
A packet message containing packet metadata and optional packet payload data.

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:

typedef struct ipq_packet_msg {
        unsigned long packet_id;        /* ID of queued packet */
        unsigned long mark;             /* Netfilter mark value */
        long timestamp_sec;             /* Packet arrival time (seconds) */
        long timestamp_usec;            /* Packet arrvial time (+useconds) */
        unsigned int hook;              /* Netfilter hook we rode in on */
        char indev_name[IFNAMSIZ];      /* Name of incoming interface */
        char outdev_name[IFNAMSIZ];     /* Name of outgoing interface */
        unsigned short hw_protocol;     /* Hardware protocol (network order) */
        unsigned short hw_type;         /* Hardware type */
        unsigned char hw_addrlen;       /* Hardware address length */
        unsigned char hw_addr[8];       /* Hardware address */
        size_t data_len;                /* Length of packet data */
        unsigned char payload[0];       /* Optional packet data */
} ipq_packet_msg_t;

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.  

BUGS

None known.  

AUTHOR

James Morris <jmorris@intercode.com.au>  

COPYRIGHT

Copyright (c) 2000-2001 Netfilter Core Team.

Distributed under the GNU General Public License.  

SEE ALSO

iptables(8), libipq(3).


 

Index

NAME
SYNOPSIS
DESCRIPTION
BUGS
AUTHOR
COPYRIGHT
SEE ALSO

Please read "Why adblockers are badwww.cars2fast4u.de



Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2011 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 22.6 ms
system status display