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

search text in:





Poll
Which screen resolution 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_SET_MODE

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

NAME

ipq_set_mode --- set the ip_queue queuing mode  

SYNOPSIS

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

int ipq_set_mode(const struct ipq_handle *h, u_int8_t mode, size_t range);  

DESCRIPTION

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

The h parameter is a context handle which must previously have been returned successfully from a call to ipq_create_handle.

The mode parameter must be one of:

IPQ_COPY_META
Copy only packet metadata to userspace.
IPQ_COPY_PACKET
Copy packet metadata and packet payloads to userspace.

The range parameter is used to specify how many bytes of the payload to copy to userspace. It is only valid for IPQ_COPY_PACKET mode and is otherwise ignored. The maximum useful value for range is 65535 (greater values will be clamped to this by ip_queue).

ipq_set_mode is usually used immediately following ipq_create_handle to enable the flow of packets to userspace.

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.  

RETURN VALUE

On failure, -1 is returned.
On success, a non-zero positive value is returned.  

ERRORS

On failure, a descriptive error message will be available via the ipq_errstr function.  

DIAGNOSTICS

A relatively common failure may occur if the ip_queue module is not loaded. In this case, the following code excerpt:

status = ipq_set_mode(h, IPQ_COPY_META, 0);
if (status < 0) {
        ipq_perror("myapp");
        ipq_destroy_handle(h);
        exit(1);
}

would generate the following output:

myapp: Failed to send netlink message: Connection refused  

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

libipq(3), iptables(8).


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
DIAGNOSTICS
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: 37.5 ms
system status display