ip_queue.h revision 11cd02dfb91661c65134cac258cf5924270e9d2b
1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12#ifndef _IP_QUEUE_H 13#define _IP_QUEUE_H 14 15#include <net/if.h> 16 17typedef struct ipq_packet_msg { 18 unsigned long packet_id; 19 unsigned long mark; 20 long timestamp_sec; 21 long timestamp_usec; 22 unsigned int hook; 23 char indev_name[IFNAMSIZ]; 24 char outdev_name[IFNAMSIZ]; 25 unsigned short hw_protocol; 26 unsigned short hw_type; 27 unsigned char hw_addrlen; 28 unsigned char hw_addr[8]; 29 size_t data_len; 30 unsigned char payload[0]; 31} ipq_packet_msg_t; 32 33typedef struct ipq_mode_msg { 34 unsigned char value; 35 size_t range; 36} ipq_mode_msg_t; 37 38typedef struct ipq_verdict_msg { 39 unsigned int value; 40 unsigned long id; 41 size_t data_len; 42 unsigned char payload[0]; 43} ipq_verdict_msg_t; 44 45typedef struct ipq_peer_msg { 46 union { 47 ipq_verdict_msg_t verdict; 48 ipq_mode_msg_t mode; 49 } msg; 50} ipq_peer_msg_t; 51 52enum { 53 IPQ_COPY_NONE, 54 IPQ_COPY_META, 55 IPQ_COPY_PACKET 56}; 57#define IPQ_COPY_MAX IPQ_COPY_PACKET 58 59#define IPQM_BASE 0x10 60#define IPQM_MODE (IPQM_BASE + 1) 61#define IPQM_VERDICT (IPQM_BASE + 2) 62#define IPQM_PACKET (IPQM_BASE + 3) 63#define IPQM_MAX (IPQM_BASE + 4) 64 65#endif 66