IPQ_SET_MODE - Online Linux Manual PageSection : 3
Updated : 16 October 2001
Source : Linux iptables 1.2
Note : Linux Programmer's Manual
NAMEipq_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);
DESCRIPTIONThe 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 VALUEOn failure, −1 is returned.
On success, a non-zero positive value is returned.
ERRORSOn failure, a descriptive error message will be available via the ipq_errstr function.
DIAGNOSTICSA 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
BUGSNone known.
AUTHORJames Morris <jmorris@intercode.com.au>
COPYRIGHTCopyright (c) 2000-2001 Netfilter Core Team. Distributed under the GNU General Public License.
SEE ALSOlibipq(3), iptables(8). 0
Johanes Gumabo
Data Size : 7,765 byte
man-ipq_set_mode.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 239,119
Visitor ID : :
Visitor IP : 3.138.179.120 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.