| @@ -0,0 +1,63 @@ | ||
| +/* Header file for kernel module to match connection tracking information. | ||
| + * GPL (C) 2001 Marc Boucher (marc@mbsi.ca). | ||
| + */ | ||
| + | ||
| +#ifndef _XT_CONNTRACK_H | ||
| +#define _XT_CONNTRACK_H | ||
| + | ||
| +#include <linux/netfilter/nf_conntrack_tuple_common.h> | ||
| +#include <linux/in.h> | ||
| + | ||
| +#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | ||
| +#define XT_CONNTRACK_STATE_INVALID (1 << 0) | ||
| + | ||
| +#define XT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1)) | ||
| +#define XT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2)) | ||
| +#define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3)) | ||
| + | ||
| +/* flags, invflags: */ | ||
| +#define XT_CONNTRACK_STATE 0x01 | ||
| +#define XT_CONNTRACK_PROTO 0x02 | ||
| +#define XT_CONNTRACK_ORIGSRC 0x04 | ||
| +#define XT_CONNTRACK_ORIGDST 0x08 | ||
| +#define XT_CONNTRACK_REPLSRC 0x10 | ||
| +#define XT_CONNTRACK_REPLDST 0x20 | ||
| +#define XT_CONNTRACK_STATUS 0x40 | ||
| +#define XT_CONNTRACK_EXPIRES 0x80 | ||
| + | ||
| +/* This is exposed to userspace, so remains frozen in time. */ | ||
| +struct ip_conntrack_old_tuple | ||
| +{ | ||
| + struct { | ||
| + __u32 ip; | ||
| + union { | ||
| + __u16 all; | ||
| + } u; | ||
| + } src; | ||
| + | ||
| + struct { | ||
| + __u32 ip; | ||
| + union { | ||
| + __u16 all; | ||
| + } u; | ||
| + | ||
| + /* The protocol. */ | ||
| + u16 protonum; | ||
| + } dst; | ||
| +}; | ||
| + | ||
| +struct xt_conntrack_info | ||
| +{ | ||
| + unsigned int statemask, statusmask; | ||
| + | ||
| + struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX]; | ||
| + struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX]; | ||
| + | ||
| + unsigned long expires_min, expires_max; | ||
| + | ||
| + /* Flags word */ | ||
| + u_int8_t flags; | ||
| + /* Inverse flags */ | ||
| + u_int8_t invflags; | ||
| +}; | ||
| +#endif /*_XT_CONNTRACK_H*/ |
| @@ -0,0 +1,23 @@ | ||
| +#ifndef _XT_DCCP_H_ | ||
| +#define _XT_DCCP_H_ | ||
| + | ||
| +#define XT_DCCP_SRC_PORTS 0x01 | ||
| +#define XT_DCCP_DEST_PORTS 0x02 | ||
| +#define XT_DCCP_TYPE 0x04 | ||
| +#define XT_DCCP_OPTION 0x08 | ||
| + | ||
| +#define XT_DCCP_VALID_FLAGS 0x0f | ||
| + | ||
| +struct xt_dccp_info { | ||
| + u_int16_t dpts[2]; /* Min, Max */ | ||
| + u_int16_t spts[2]; /* Min, Max */ | ||
| + | ||
| + u_int16_t flags; | ||
| + u_int16_t invflags; | ||
| + | ||
| + u_int16_t typemask; | ||
| + u_int8_t option; | ||
| +}; | ||
| + | ||
| +#endif /* _XT_DCCP_H_ */ | ||
| + |
| @@ -0,0 +1,8 @@ | ||
| +#ifndef _XT_HELPER_H | ||
| +#define _XT_HELPER_H | ||
| + | ||
| +struct xt_helper_info { | ||
| + int invert; | ||
| + char name[30]; | ||
| +}; | ||
| +#endif /* _XT_HELPER_H */ |
| @@ -0,0 +1,9 @@ | ||
| +#ifndef _XT_LENGTH_H | ||
| +#define _XT_LENGTH_H | ||
| + | ||
| +struct xt_length_info { | ||
| + u_int16_t min, max; | ||
| + u_int8_t invert; | ||
| +}; | ||
| + | ||
| +#endif /*_XT_LENGTH_H*/ |
| @@ -0,0 +1,21 @@ | ||
| +#ifndef _XT_RATE_H | ||
| +#define _XT_RATE_H | ||
| + | ||
| +/* timings are in milliseconds. */ | ||
| +#define XT_LIMIT_SCALE 10000 | ||
| + | ||
| +/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | ||
| + seconds, or one every 59 hours. */ | ||
| +struct xt_rateinfo { | ||
| + u_int32_t avg; /* Average secs between packets * scale */ | ||
| + u_int32_t burst; /* Period multiplier for upper limit. */ | ||
| + | ||
| + /* Used internally by the kernel */ | ||
| + unsigned long prev; | ||
| + u_int32_t credit; | ||
| + u_int32_t credit_cap, cost; | ||
| + | ||
| + /* Ugly, ugly fucker. */ | ||
| + struct xt_rateinfo *master; | ||
| +}; | ||
| +#endif /*_XT_RATE_H*/ |
| @@ -0,0 +1,8 @@ | ||
| +#ifndef _XT_MAC_H | ||
| +#define _XT_MAC_H | ||
| + | ||
| +struct xt_mac_info { | ||
| + unsigned char srcaddr[ETH_ALEN]; | ||
| + int invert; | ||
| +}; | ||
| +#endif /*_XT_MAC_H*/ |
| @@ -0,0 +1,9 @@ | ||
| +#ifndef _XT_MARK_H | ||
| +#define _XT_MARK_H | ||
| + | ||
| +struct xt_mark_info { | ||
| + unsigned long mark, mask; | ||
| + u_int8_t invert; | ||
| +}; | ||
| + | ||
| +#endif /*_XT_MARK_H*/ |
| @@ -0,0 +1,24 @@ | ||
| +#ifndef _XT_PHYSDEV_H | ||
| +#define _XT_PHYSDEV_H | ||
| + | ||
| +#ifdef __KERNEL__ | ||
| +#include <linux/if.h> | ||
| +#endif | ||
| + | ||
| +#define XT_PHYSDEV_OP_IN 0x01 | ||
| +#define XT_PHYSDEV_OP_OUT 0x02 | ||
| +#define XT_PHYSDEV_OP_BRIDGED 0x04 | ||
| +#define XT_PHYSDEV_OP_ISIN 0x08 | ||
| +#define XT_PHYSDEV_OP_ISOUT 0x10 | ||
| +#define XT_PHYSDEV_OP_MASK (0x20 - 1) | ||
| + | ||
| +struct xt_physdev_info { | ||
| + char physindev[IFNAMSIZ]; | ||
| + char in_mask[IFNAMSIZ]; | ||
| + char physoutdev[IFNAMSIZ]; | ||
| + char out_mask[IFNAMSIZ]; | ||
| + u_int8_t invert; | ||
| + u_int8_t bitmask; | ||
| +}; | ||
| + | ||
| +#endif /*_XT_PHYSDEV_H*/ |
| @@ -0,0 +1,8 @@ | ||
| +#ifndef _XT_PKTTYPE_H | ||
| +#define _XT_PKTTYPE_H | ||
| + | ||
| +struct xt_pkttype_info { | ||
| + int pkttype; | ||
| + int invert; | ||
| +}; | ||
| +#endif /*_XT_PKTTYPE_H*/ |
| @@ -0,0 +1,10 @@ | ||
| +#ifndef _XT_REALM_H | ||
| +#define _XT_REALM_H | ||
| + | ||
| +struct xt_realm_info { | ||
| + u_int32_t id; | ||
| + u_int32_t mask; | ||
| + u_int8_t invert; | ||
| +}; | ||
| + | ||
| +#endif /* _XT_REALM_H */ |
| @@ -0,0 +1,107 @@ | ||
| +#ifndef _XT_SCTP_H_ | ||
| +#define _XT_SCTP_H_ | ||
| + | ||
| +#define XT_SCTP_SRC_PORTS 0x01 | ||
| +#define XT_SCTP_DEST_PORTS 0x02 | ||
| +#define XT_SCTP_CHUNK_TYPES 0x04 | ||
| + | ||
| +#define XT_SCTP_VALID_FLAGS 0x07 | ||
| + | ||
| +#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0])) | ||
| + | ||
| + | ||
| +struct xt_sctp_flag_info { | ||
| + u_int8_t chunktype; | ||
| + u_int8_t flag; | ||
| + u_int8_t flag_mask; | ||
| +}; | ||
| + | ||
| +#define XT_NUM_SCTP_FLAGS 4 | ||
| + | ||
| +struct xt_sctp_info { | ||
| + u_int16_t dpts[2]; /* Min, Max */ | ||
| + u_int16_t spts[2]; /* Min, Max */ | ||
| + | ||
| + u_int32_t chunkmap[256 / sizeof (u_int32_t)]; /* Bit mask of chunks to be matched according to RFC 2960 */ | ||
| + | ||
| +#define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */ | ||
| +#define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */ | ||
| +#define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */ | ||
| + | ||
| + u_int32_t chunk_match_type; | ||
| + struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS]; | ||
| + int flag_count; | ||
| + | ||
| + u_int32_t flags; | ||
| + u_int32_t invflags; | ||
| +}; | ||
| + | ||
| +#define bytes(type) (sizeof(type) * 8) | ||
| + | ||
| +#define SCTP_CHUNKMAP_SET(chunkmap, type) \ | ||
| + do { \ | ||
| + chunkmap[type / bytes(u_int32_t)] |= \ | ||
| + 1 << (type % bytes(u_int32_t)); \ | ||
| + } while (0) | ||
| + | ||
| +#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ | ||
| + do { \ | ||
| + chunkmap[type / bytes(u_int32_t)] &= \ | ||
| + ~(1 << (type % bytes(u_int32_t))); \ | ||
| + } while (0) | ||
| + | ||
| +#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ | ||
| +({ \ | ||
| + (chunkmap[type / bytes (u_int32_t)] & \ | ||
| + (1 << (type % bytes (u_int32_t)))) ? 1: 0; \ | ||
| +}) | ||
| + | ||
| +#define SCTP_CHUNKMAP_RESET(chunkmap) \ | ||
| + do { \ | ||
| + int i; \ | ||
| + for (i = 0; i < ELEMCOUNT(chunkmap); i++) \ | ||
| + chunkmap[i] = 0; \ | ||
| + } while (0) | ||
| + | ||
| +#define SCTP_CHUNKMAP_SET_ALL(chunkmap) \ | ||
| + do { \ | ||
| + int i; \ | ||
| + for (i = 0; i < ELEMCOUNT(chunkmap); i++) \ | ||
| + chunkmap[i] = ~0; \ | ||
| + } while (0) | ||
| + | ||
| +#define SCTP_CHUNKMAP_COPY(destmap, srcmap) \ | ||
| + do { \ | ||
| + int i; \ | ||
| + for (i = 0; i < ELEMCOUNT(chunkmap); i++) \ | ||
| + destmap[i] = srcmap[i]; \ | ||
| + } while (0) | ||
| + | ||
| +#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ | ||
| +({ \ | ||
| + int i; \ | ||
| + int flag = 1; \ | ||
| + for (i = 0; i < ELEMCOUNT(chunkmap); i++) { \ | ||
| + if (chunkmap[i]) { \ | ||
| + flag = 0; \ | ||
| + break; \ | ||
| + } \ | ||
| + } \ | ||
| + flag; \ | ||
| +}) | ||
| + | ||
| +#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ | ||
| +({ \ | ||
| + int i; \ | ||
| + int flag = 1; \ | ||
| + for (i = 0; i < ELEMCOUNT(chunkmap); i++) { \ | ||
| + if (chunkmap[i] != ~0) { \ | ||
| + flag = 0; \ | ||
| + break; \ | ||
| + } \ | ||
| + } \ | ||
| + flag; \ | ||
| +}) | ||
| + | ||
| +#endif /* _XT_SCTP_H_ */ | ||
| + |
| @@ -0,0 +1,13 @@ | ||
| +#ifndef _XT_STATE_H | ||
| +#define _XT_STATE_H | ||
| + | ||
| +#define XT_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | ||
| +#define XT_STATE_INVALID (1 << 0) | ||
| + | ||
| +#define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1)) | ||
| + | ||
| +struct xt_state_info | ||
| +{ | ||
| + unsigned int statemask; | ||
| +}; | ||
| +#endif /*_XT_STATE_H*/ |
| @@ -0,0 +1,18 @@ | ||
| +#ifndef _XT_STRING_H | ||
| +#define _XT_STRING_H | ||
| + | ||
| +#define XT_STRING_MAX_PATTERN_SIZE 128 | ||
| +#define XT_STRING_MAX_ALGO_NAME_SIZE 16 | ||
| + | ||
| +struct xt_string_info | ||
| +{ | ||
| + u_int16_t from_offset; | ||
| + u_int16_t to_offset; | ||
| + char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; | ||
| + char pattern[XT_STRING_MAX_PATTERN_SIZE]; | ||
| + u_int8_t patlen; | ||
| + u_int8_t invert; | ||
| + struct ts_config __attribute__((aligned(8))) *config; | ||
| +}; | ||
| + | ||
| +#endif /*_XT_STRING_H*/ |
| @@ -0,0 +1,9 @@ | ||
| +#ifndef _XT_TCPMSS_MATCH_H | ||
| +#define _XT_TCPMSS_MATCH_H | ||
| + | ||
| +struct xt_tcpmss_match_info { | ||
| + u_int16_t mss_min, mss_max; | ||
| + u_int8_t invert; | ||
| +}; | ||
| + | ||
| +#endif /*_XT_TCPMSS_MATCH_H*/ |
| @@ -0,0 +1,36 @@ | ||
| +#ifndef _XT_TCPUDP_H | ||
| +#define _XT_TCPUDP_H | ||
| + | ||
| +/* TCP matching stuff */ | ||
| +struct xt_tcp | ||
| +{ | ||
| + u_int16_t spts[2]; /* Source port range. */ | ||
| + u_int16_t dpts[2]; /* Destination port range. */ | ||
| + u_int8_t option; /* TCP Option iff non-zero*/ | ||
| + u_int8_t flg_mask; /* TCP flags mask byte */ | ||
| + u_int8_t flg_cmp; /* TCP flags compare byte */ | ||
| + u_int8_t invflags; /* Inverse flags */ | ||
| +}; | ||
| + | ||
| +/* Values for "inv" field in struct ipt_tcp. */ | ||
| +#define XT_TCP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ | ||
| +#define XT_TCP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ | ||
| +#define XT_TCP_INV_FLAGS 0x04 /* Invert the sense of TCP flags. */ | ||
| +#define XT_TCP_INV_OPTION 0x08 /* Invert the sense of option test. */ | ||
| +#define XT_TCP_INV_MASK 0x0F /* All possible flags. */ | ||
| + | ||
| +/* UDP matching stuff */ | ||
| +struct xt_udp | ||
| +{ | ||
| + u_int16_t spts[2]; /* Source port range. */ | ||
| + u_int16_t dpts[2]; /* Destination port range. */ | ||
| + u_int8_t invflags; /* Inverse flags */ | ||
| +}; | ||
| + | ||
| +/* Values for "invflags" field in struct ipt_udp. */ | ||
| +#define XT_UDP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ | ||
| +#define XT_UDP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ | ||
| +#define XT_UDP_INV_MASK 0x03 /* All possible flags. */ | ||
| + | ||
| + | ||
| +#endif |
| @@ -1,8 +1,7 @@ | ||
| #ifndef _IPT_CLASSIFY_H | ||
| #define _IPT_CLASSIFY_H | ||
| -struct ipt_classify_target_info { | ||
| - u_int32_t priority; | ||
| -}; | ||
| +#include <linux/netfilter/xt_CLASSIFY.h> | ||
| +#define ipt_classify_target_info xt_classify_target_info | ||
| #endif /*_IPT_CLASSIFY_H */ |
| @@ -1,20 +1,18 @@ | ||
| #ifndef _IPT_MARK_H_target | ||
| #define _IPT_MARK_H_target | ||
| +/* Backwards compatibility for old userspace */ | ||
| + | ||
| +#include <linux/netfilter/xt_MARK.h> | ||
| + | ||
| /* Version 0 */ | ||
| -struct ipt_mark_target_info { | ||
| - unsigned long mark; | ||
| -}; | ||
| +#define ipt_mark_target_info xt_mark_target_info | ||
| /* Version 1 */ | ||
| -enum { | ||
| - IPT_MARK_SET=0, | ||
| - IPT_MARK_AND, | ||
| - IPT_MARK_OR | ||
| -}; | ||
| +#define IPT_MARK_SET XT_MARK_SET | ||
| +#define IPT_MARK_AND XT_MARK_AND | ||
| +#define IPT_MARK_OR XT_MARK_OR | ||
| + | ||
| +#define ipt_mark_target_info_v1 xt_mark_target_info_v1 | ||
| -struct ipt_mark_target_info_v1 { | ||
| - unsigned long mark; | ||
| - u_int8_t mode; | ||
| -}; | ||
| #endif /*_IPT_MARK_H_target*/ |
| @@ -1,10 +1,10 @@ | ||
| #ifndef _IPT_COMMENT_H | ||
| #define _IPT_COMMENT_H | ||
| -#define IPT_MAX_COMMENT_LEN 256 | ||
| +#include <linux/netfilter/xt_comment.h> | ||
| -struct ipt_comment_info { | ||
| - unsigned char comment[IPT_MAX_COMMENT_LEN]; | ||
| -}; | ||
| +#define IPT_MAX_COMMENT_LEN XT_MAX_COMMENT_LEN | ||
| + | ||
| +#define ipt_comment_info xt_comment_info | ||
| #endif /* _IPT_COMMENT_H */ |
| @@ -1,25 +1,18 @@ | ||
| #ifndef _IPT_CONNBYTES_H | ||
| #define _IPT_CONNBYTES_H | ||
| -enum ipt_connbytes_what { | ||
| - IPT_CONNBYTES_PKTS, | ||
| - IPT_CONNBYTES_BYTES, | ||
| - IPT_CONNBYTES_AVGPKT, | ||
| -}; | ||
| +#include <net/netfilter/xt_connbytes.h> | ||
| +#define ipt_connbytes_what xt_connbytes_what | ||
| -enum ipt_connbytes_direction { | ||
| - IPT_CONNBYTES_DIR_ORIGINAL, | ||
| - IPT_CONNBYTES_DIR_REPLY, | ||
| - IPT_CONNBYTES_DIR_BOTH, | ||
| -}; | ||
| +#define IPT_CONNBYTES_PKTS XT_CONNBYTES_PACKETS | ||
| +#define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES | ||
| +#define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT | ||
| + | ||
| +#define ipt_connbytes_direction xt_connbytes_direction | ||
| +#define IPT_CONNBYTES_DIR_ORIGINAL XT_CONNBYTES_DIR_ORIGINAL | ||
| +#define IPT_CONNBYTES_DIR_REPLY XT_CONNBYTES_DIR_REPLY | ||
| +#define IPT_CONNBYTES_DIR_BOTH XT_CONNBYTES_DIR_BOTH | ||
| + | ||
| +#define ipt_connbytes_info xt_connbytes_info | ||
| -struct ipt_connbytes_info | ||
| -{ | ||
| - struct { | ||
| - aligned_u64 from; /* count to be matched */ | ||
| - aligned_u64 to; /* count to be matched */ | ||
| - } count; | ||
| - u_int8_t what; /* ipt_connbytes_what */ | ||
| - u_int8_t direction; /* ipt_connbytes_direction */ | ||
| -}; | ||
| #endif |
| @@ -1,18 +1,7 @@ | ||
| #ifndef _IPT_CONNMARK_H | ||
| #define _IPT_CONNMARK_H | ||
| -/* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> | ||
| - * by Henrik Nordstrom <hno@marasystems.com> | ||
| - * | ||
| - * This program is free software; you can redistribute it and/or modify | ||
| - * it under the terms of the GNU General Public License as published by | ||
| - * the Free Software Foundation; either version 2 of the License, or | ||
| - * (at your option) any later version. | ||
| - */ | ||
| - | ||
| -struct ipt_connmark_info { | ||
| - unsigned long mark, mask; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_connmark.h> | ||
| +#define ipt_connmark_info xt_connmark_info | ||
| #endif /*_IPT_CONNMARK_H*/ |
| @@ -1,23 +1,15 @@ | ||
| #ifndef _IPT_DCCP_H_ | ||
| #define _IPT_DCCP_H_ | ||
| -#define IPT_DCCP_SRC_PORTS 0x01 | ||
| -#define IPT_DCCP_DEST_PORTS 0x02 | ||
| -#define IPT_DCCP_TYPE 0x04 | ||
| -#define IPT_DCCP_OPTION 0x08 | ||
| +#include <linux/netfilter/xt_dccp.h> | ||
| +#define IPT_DCCP_SRC_PORTS XT_DCCP_SRC_PORTS | ||
| +#define IPT_DCCP_DEST_PORTS XT_DCCP_DEST_PORTS | ||
| +#define IPT_DCCP_TYPE XT_DCCP_TYPE | ||
| +#define IPT_DCCP_OPTION XT_DCCP_OPTION | ||
| -#define IPT_DCCP_VALID_FLAGS 0x0f | ||
| +#define IPT_DCCP_VALID_FLAGS XT_DCCP_VALID_FLAGS | ||
| -struct ipt_dccp_info { | ||
| - u_int16_t dpts[2]; /* Min, Max */ | ||
| - u_int16_t spts[2]; /* Min, Max */ | ||
| - | ||
| - u_int16_t flags; | ||
| - u_int16_t invflags; | ||
| - | ||
| - u_int16_t typemask; | ||
| - u_int8_t option; | ||
| -}; | ||
| +#define ipt_dccp_info xt_dccp_info | ||
| #endif /* _IPT_DCCP_H_ */ | ||
| @@ -1,8 +1,7 @@ | ||
| #ifndef _IPT_HELPER_H | ||
| #define _IPT_HELPER_H | ||
| -struct ipt_helper_info { | ||
| - int invert; | ||
| - char name[30]; | ||
| -}; | ||
| +#include <linux/netfilter/xt_helper.h> | ||
| +#define ipt_helper_info xt_helper_info | ||
| + | ||
| #endif /* _IPT_HELPER_H */ |
| @@ -1,9 +1,7 @@ | ||
| #ifndef _IPT_LENGTH_H | ||
| #define _IPT_LENGTH_H | ||
| -struct ipt_length_info { | ||
| - u_int16_t min, max; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_length.h> | ||
| +#define ipt_length_info xt_length_info | ||
| #endif /*_IPT_LENGTH_H*/ |
| @@ -1,21 +1,8 @@ | ||
| #ifndef _IPT_RATE_H | ||
| #define _IPT_RATE_H | ||
| -/* timings are in milliseconds. */ | ||
| -#define IPT_LIMIT_SCALE 10000 | ||
| +#include <linux/netfilter/xt_limit.h> | ||
| +#define IPT_LIMIT_SCALE XT_LIMIT_SCALE | ||
| +#define ipt_rateinfo xt_rateinfo | ||
| -/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | ||
| - seconds, or one every 59 hours. */ | ||
| -struct ipt_rateinfo { | ||
| - u_int32_t avg; /* Average secs between packets * scale */ | ||
| - u_int32_t burst; /* Period multiplier for upper limit. */ | ||
| - | ||
| - /* Used internally by the kernel */ | ||
| - unsigned long prev; | ||
| - u_int32_t credit; | ||
| - u_int32_t credit_cap, cost; | ||
| - | ||
| - /* Ugly, ugly fucker. */ | ||
| - struct ipt_rateinfo *master; | ||
| -}; | ||
| #endif /*_IPT_RATE_H*/ |
| @@ -1,8 +1,7 @@ | ||
| #ifndef _IPT_MAC_H | ||
| #define _IPT_MAC_H | ||
| -struct ipt_mac_info { | ||
| - unsigned char srcaddr[ETH_ALEN]; | ||
| - int invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_mac.h> | ||
| +#define ipt_mac_info xt_mac_info | ||
| + | ||
| #endif /*_IPT_MAC_H*/ |
| @@ -1,9 +1,9 @@ | ||
| #ifndef _IPT_MARK_H | ||
| #define _IPT_MARK_H | ||
| -struct ipt_mark_info { | ||
| - unsigned long mark, mask; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +/* Backwards compatibility for old userspace */ | ||
| +#include <linux/netfilter/xt_mark.h> | ||
| + | ||
| +#define ipt_mark_info xt_mark_info | ||
| #endif /*_IPT_MARK_H*/ |
| @@ -1,24 +1,17 @@ | ||
| #ifndef _IPT_PHYSDEV_H | ||
| #define _IPT_PHYSDEV_H | ||
| -#ifdef __KERNEL__ | ||
| -#include <linux/if.h> | ||
| -#endif | ||
| +/* Backwards compatibility for old userspace */ | ||
| -#define IPT_PHYSDEV_OP_IN 0x01 | ||
| -#define IPT_PHYSDEV_OP_OUT 0x02 | ||
| -#define IPT_PHYSDEV_OP_BRIDGED 0x04 | ||
| -#define IPT_PHYSDEV_OP_ISIN 0x08 | ||
| -#define IPT_PHYSDEV_OP_ISOUT 0x10 | ||
| -#define IPT_PHYSDEV_OP_MASK (0x20 - 1) | ||
| +#include <linux/netfilter/xt_physdev.h> | ||
| -struct ipt_physdev_info { | ||
| - char physindev[IFNAMSIZ]; | ||
| - char in_mask[IFNAMSIZ]; | ||
| - char physoutdev[IFNAMSIZ]; | ||
| - char out_mask[IFNAMSIZ]; | ||
| - u_int8_t invert; | ||
| - u_int8_t bitmask; | ||
| -}; | ||
| +#define IPT_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN | ||
| +#define IPT_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT | ||
| +#define IPT_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED | ||
| +#define IPT_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN | ||
| +#define IPT_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT | ||
| +#define IPT_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK | ||
| + | ||
| +#define ipt_physdev_info xt_physdev_info | ||
| #endif /*_IPT_PHYSDEV_H*/ |
| @@ -1,8 +1,7 @@ | ||
| #ifndef _IPT_PKTTYPE_H | ||
| #define _IPT_PKTTYPE_H | ||
| -struct ipt_pkttype_info { | ||
| - int pkttype; | ||
| - int invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_pkttype.h> | ||
| +#define ipt_pkttype_info xt_pkttype_info | ||
| + | ||
| #endif /*_IPT_PKTTYPE_H*/ |
| @@ -1,10 +1,7 @@ | ||
| #ifndef _IPT_REALM_H | ||
| #define _IPT_REALM_H | ||
| -struct ipt_realm_info { | ||
| - u_int32_t id; | ||
| - u_int32_t mask; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_realm.h> | ||
| +#define ipt_realm_info xt_realm_info | ||
| #endif /* _IPT_REALM_H */ |
| @@ -1,13 +1,15 @@ | ||
| #ifndef _IPT_STATE_H | ||
| #define _IPT_STATE_H | ||
| -#define IPT_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | ||
| -#define IPT_STATE_INVALID (1 << 0) | ||
| +/* Backwards compatibility for old userspace */ | ||
| -#define IPT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1)) | ||
| +#include <linux/netfilter/xt_state.h> | ||
| + | ||
| +#define IPT_STATE_BIT XT_STATE_BIT | ||
| +#define IPT_STATE_INVALID XT_STATE_INVALID | ||
| + | ||
| +#define IPT_STATE_UNTRACKED XT_STATE_UNTRACKED | ||
| + | ||
| +#define ipt_state_info xt_state_info | ||
| -struct ipt_state_info | ||
| -{ | ||
| - unsigned int statemask; | ||
| -}; | ||
| #endif /*_IPT_STATE_H*/ |
| @@ -1,18 +1,10 @@ | ||
| #ifndef _IPT_STRING_H | ||
| #define _IPT_STRING_H | ||
| -#define IPT_STRING_MAX_PATTERN_SIZE 128 | ||
| -#define IPT_STRING_MAX_ALGO_NAME_SIZE 16 | ||
| +#include <linux/netfilter/xt_string.h> | ||
| -struct ipt_string_info | ||
| -{ | ||
| - u_int16_t from_offset; | ||
| - u_int16_t to_offset; | ||
| - char algo[IPT_STRING_MAX_ALGO_NAME_SIZE]; | ||
| - char pattern[IPT_STRING_MAX_PATTERN_SIZE]; | ||
| - u_int8_t patlen; | ||
| - u_int8_t invert; | ||
| - struct ts_config __attribute__((aligned(8))) *config; | ||
| -}; | ||
| +#define IPT_STRING_MAX_PATTERN_SIZE XT_STRING_MAX_PATTERN_SIZE | ||
| +#define IPT_STRING_MAX_ALGO_NAME_SIZE XT_STRING_MAX_ALGO_NAME_SIZE | ||
| +#define ipt_string_info xt_string_info | ||
| #endif /*_IPT_STRING_H*/ |
| @@ -1,9 +1,7 @@ | ||
| #ifndef _IPT_TCPMSS_MATCH_H | ||
| #define _IPT_TCPMSS_MATCH_H | ||
| -struct ipt_tcpmss_match_info { | ||
| - u_int16_t mss_min, mss_max; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_tcpmss.h> | ||
| +#define ipt_tcpmss_match_info xt_tcpmss_match_info | ||
| #endif /*_IPT_TCPMSS_MATCH_H*/ |
| @@ -1,8 +1,9 @@ | ||
| #ifndef _IP6T_MARK_H_target | ||
| #define _IP6T_MARK_H_target | ||
| -struct ip6t_mark_target_info { | ||
| - unsigned long mark; | ||
| -}; | ||
| +/* Backwards compatibility for old userspace */ | ||
| +#include <linux/netfilter/xt_MARK.h> | ||
| -#endif /*_IPT_MARK_H_target*/ | ||
| +#define ip6t_mark_target_info xt_mark_target_info | ||
| + | ||
| +#endif /*_IP6T_MARK_H_target*/ |
| @@ -1,10 +1,8 @@ | ||
| #ifndef _IP6T_LENGTH_H | ||
| #define _IP6T_LENGTH_H | ||
| -struct ip6t_length_info { | ||
| - u_int16_t min, max; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +#include <linux/netfilter/xt_length.h> | ||
| +#define ip6t_length_info xt_length_info | ||
| #endif /*_IP6T_LENGTH_H*/ | ||
| @@ -1,21 +1,8 @@ | ||
| #ifndef _IP6T_RATE_H | ||
| #define _IP6T_RATE_H | ||
| -/* timings are in milliseconds. */ | ||
| -#define IP6T_LIMIT_SCALE 10000 | ||
| +#include <linux/netfilter/xt_limit.h> | ||
| +#define IP6T_LIMIT_SCALE XT_LIMIT_SCALE | ||
| +#define ip6t_rateinfo xt_rateinfo | ||
| -/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | ||
| - seconds, or one every 59 hours. */ | ||
| -struct ip6t_rateinfo { | ||
| - u_int32_t avg; /* Average secs between packets * scale */ | ||
| - u_int32_t burst; /* Period multiplier for upper limit. */ | ||
| - | ||
| - /* Used internally by the kernel */ | ||
| - unsigned long prev; | ||
| - u_int32_t credit; | ||
| - u_int32_t credit_cap, cost; | ||
| - | ||
| - /* Ugly, ugly fucker. */ | ||
| - struct ip6t_rateinfo *master; | ||
| -}; | ||
| -#endif /*_IPT_RATE_H*/ | ||
| +#endif /*_IP6T_RATE_H*/ |
| @@ -1,8 +1,7 @@ | ||
| #ifndef _IP6T_MAC_H | ||
| #define _IP6T_MAC_H | ||
| -struct ip6t_mac_info { | ||
| - unsigned char srcaddr[ETH_ALEN]; | ||
| - int invert; | ||
| -}; | ||
| -#endif /*_IPT_MAC_H*/ | ||
| +#include <linux/netfilter/xt_mac.h> | ||
| +#define ip6t_mac_info xt_mac_info | ||
| + | ||
| +#endif /*_IP6T_MAC_H*/ |
| @@ -1,9 +1,9 @@ | ||
| #ifndef _IP6T_MARK_H | ||
| #define _IP6T_MARK_H | ||
| -struct ip6t_mark_info { | ||
| - unsigned long mark, mask; | ||
| - u_int8_t invert; | ||
| -}; | ||
| +/* Backwards compatibility for old userspace */ | ||
| +#include <linux/netfilter/xt_mark.h> | ||
| + | ||
| +#define ip6t_mark_info xt_mark_info | ||
| #endif /*_IPT_MARK_H*/ |
| @@ -1,24 +1,17 @@ | ||
| #ifndef _IP6T_PHYSDEV_H | ||
| #define _IP6T_PHYSDEV_H | ||
| -#ifdef __KERNEL__ | ||
| -#include <linux/if.h> | ||
| -#endif | ||
| +/* Backwards compatibility for old userspace */ | ||
| -#define IP6T_PHYSDEV_OP_IN 0x01 | ||
| -#define IP6T_PHYSDEV_OP_OUT 0x02 | ||
| -#define IP6T_PHYSDEV_OP_BRIDGED 0x04 | ||
| -#define IP6T_PHYSDEV_OP_ISIN 0x08 | ||
| -#define IP6T_PHYSDEV_OP_ISOUT 0x10 | ||
| -#define IP6T_PHYSDEV_OP_MASK (0x20 - 1) | ||
| +#include <linux/netfilter/xt_physdev.h> | ||
| -struct ip6t_physdev_info { | ||
| - char physindev[IFNAMSIZ]; | ||
| - char in_mask[IFNAMSIZ]; | ||
| - char physoutdev[IFNAMSIZ]; | ||
| - char out_mask[IFNAMSIZ]; | ||
| - u_int8_t invert; | ||
| - u_int8_t bitmask; | ||
| -}; | ||
| +#define IP6T_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN | ||
| +#define IP6T_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT | ||
| +#define IP6T_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED | ||
| +#define IP6T_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN | ||
| +#define IP6T_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT | ||
| +#define IP6T_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK | ||
| + | ||
| +#define ip6t_physdev_info xt_physdev_info | ||
| #endif /*_IP6T_PHYSDEV_H*/ |
| @@ -1,70 +0,0 @@ | ||
| -/* iptables module for using new netfilter netlink queue | ||
| - * | ||
| - * (C) 2005 by Harald Welte <laforge@netfilter.org> | ||
| - * | ||
| - * This program is free software; you can redistribute it and/or modify | ||
| - * it under the terms of the GNU General Public License version 2 as | ||
| - * published by the Free Software Foundation. | ||
| - * | ||
| - */ | ||
| - | ||
| -#include <linux/module.h> | ||
| -#include <linux/skbuff.h> | ||
| - | ||
| -#include <linux/netfilter.h> | ||
| -#include <linux/netfilter_ipv4/ip_tables.h> | ||
| -#include <linux/netfilter_ipv4/ipt_NFQUEUE.h> | ||
| - | ||
| -MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); | ||
| -MODULE_DESCRIPTION("iptables NFQUEUE target"); | ||
| -MODULE_LICENSE("GPL"); | ||
| - | ||
| -static unsigned int | ||
| -target(struct sk_buff **pskb, | ||
| - const struct net_device *in, | ||
| - const struct net_device *out, | ||
| - unsigned int hooknum, | ||
| - const void *targinfo, | ||
| - void *userinfo) | ||
| -{ | ||
| - const struct ipt_NFQ_info *tinfo = targinfo; | ||
| - | ||
| - return NF_QUEUE_NR(tinfo->queuenum); | ||
| -} | ||
| - | ||
| -static int | ||
| -checkentry(const char *tablename, | ||
| - const struct ipt_entry *e, | ||
| - void *targinfo, | ||
| - unsigned int targinfosize, | ||
| - unsigned int hook_mask) | ||
| -{ | ||
| - if (targinfosize != IPT_ALIGN(sizeof(struct ipt_NFQ_info))) { | ||
| - printk(KERN_WARNING "NFQUEUE: targinfosize %u != %Zu\n", | ||
| - targinfosize, | ||
| - IPT_ALIGN(sizeof(struct ipt_NFQ_info))); | ||
| - return 0; | ||
| - } | ||
| - | ||
| - return 1; | ||
| -} | ||
| - | ||
| -static struct ipt_target ipt_NFQ_reg = { | ||
| - .name = "NFQUEUE", | ||
| - .target = target, | ||
| - .checkentry = checkentry, | ||
| - .me = THIS_MODULE, | ||
| -}; | ||
| - | ||
| -static int __init init(void) | ||
| -{ | ||
| - return ipt_register_target(&ipt_NFQ_reg); | ||
| -} | ||
| - | ||
| -static void __exit fini(void) | ||
| -{ | ||
| - ipt_unregister_target(&ipt_NFQ_reg); | ||
| -} | ||
| - | ||
| -module_init(init); | ||
| -module_exit(fini); |
| @@ -1,64 +0,0 @@ | ||
| -/* Kernel module to match packet length. */ | ||
| -/* (C) 1999-2001 James Morris <jmorros@intercode.com.au> | ||
| - * | ||
| - * This program is free software; you can redistribute it and/or modify | ||
| - * it under the terms of the GNU General Public License version 2 as | ||
| - * published by the Free Software Foundation. | ||
| - */ | ||
| - | ||
| -#include <linux/module.h> | ||
| -#include <linux/skbuff.h> | ||
| - | ||
| -#include <linux/netfilter_ipv4/ipt_length.h> | ||
| -#include <linux/netfilter_ipv4/ip_tables.h> | ||
| - | ||
| -MODULE_AUTHOR("James Morris <jmorris@intercode.com.au>"); | ||
| -MODULE_DESCRIPTION("IP tables packet length matching module"); | ||
| -MODULE_LICENSE("GPL"); | ||
| - | ||
| -static int | ||
| -match(const struct sk_buff *skb, | ||
| - const struct net_device *in, | ||
| - const struct net_device *out, | ||
| - const void *matchinfo, | ||
| - int offset, | ||
| - int *hotdrop) | ||
| -{ | ||
| - const struct ipt_length_info *info = matchinfo; | ||
| - u_int16_t pktlen = ntohs(skb->nh.iph->tot_len); | ||
| - | ||
| - return (pktlen >= info->min && pktlen <= info->max) ^ info->invert; | ||
| -} | ||
| - | ||
| -static int | ||
| -checkentry(const char *tablename, | ||
| - const struct ipt_ip *ip, | ||
| - void *matchinfo, | ||
| - unsigned int matchsize, | ||
| - unsigned int hook_mask) | ||
| -{ | ||
| - if (matchsize != IPT_ALIGN(sizeof(struct ipt_length_info))) | ||
| - return 0; | ||
| - | ||
| - return 1; | ||
| -} | ||
| - | ||
| -static struct ipt_match length_match = { | ||
| - .name = "length", | ||
| - .match = &match, | ||
| - .checkentry = &checkentry, | ||
| - .me = THIS_MODULE, | ||
| -}; | ||
| - | ||
| -static int __init init(void) | ||
| -{ | ||
| - return ipt_register_match(&length_match); | ||
| -} | ||
| - | ||
| -static void __exit fini(void) | ||
| -{ | ||
| - ipt_unregister_match(&length_match); | ||
| -} | ||
| - | ||
| -module_init(init); | ||
| -module_exit(fini); |
| @@ -1,135 +0,0 @@ | ||
| -/* Kernel module to match the bridge port in and | ||
| - * out device for IP packets coming into contact with a bridge. */ | ||
| - | ||
| -/* (C) 2001-2003 Bart De Schuymer <bdschuym@pandora.be> | ||
| - * | ||
| - * This program is free software; you can redistribute it and/or modify | ||
| - * it under the terms of the GNU General Public License version 2 as | ||
| - * published by the Free Software Foundation. | ||
| - */ | ||
| - | ||
| -#include <linux/module.h> | ||
| -#include <linux/netdevice.h> | ||
| -#include <linux/skbuff.h> | ||
| -#include <linux/netfilter_ipv4/ipt_physdev.h> | ||
| -#include <linux/netfilter_ipv4/ip_tables.h> | ||
| -#include <linux/netfilter_bridge.h> | ||
| -#define MATCH 1 | ||
| -#define NOMATCH 0 | ||
| - | ||
| -MODULE_LICENSE("GPL"); | ||
| -MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>"); | ||
| -MODULE_DESCRIPTION("iptables bridge physical device match module"); | ||
| - | ||
| -static int | ||
| -match(const struct sk_buff *skb, | ||
| - const struct net_device *in, | ||
| - const struct net_device *out, | ||
| - const void *matchinfo, | ||
| - int offset, | ||
| - int *hotdrop) | ||
| -{ | ||
| - int i; | ||
| - static const char nulldevname[IFNAMSIZ]; | ||
| - const struct ipt_physdev_info *info = matchinfo; | ||
| - unsigned int ret; | ||
| - const char *indev, *outdev; | ||
| - struct nf_bridge_info *nf_bridge; | ||
| - | ||
| - /* Not a bridged IP packet or no info available yet: | ||
| - * LOCAL_OUT/mangle and LOCAL_OUT/nat don't know if | ||
| - * the destination device will be a bridge. */ | ||
| - if (!(nf_bridge = skb->nf_bridge)) { | ||
| - /* Return MATCH if the invert flags of the used options are on */ | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_BRIDGED) && | ||
| - !(info->invert & IPT_PHYSDEV_OP_BRIDGED)) | ||
| - return NOMATCH; | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_ISIN) && | ||
| - !(info->invert & IPT_PHYSDEV_OP_ISIN)) | ||
| - return NOMATCH; | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_ISOUT) && | ||
| - !(info->invert & IPT_PHYSDEV_OP_ISOUT)) | ||
| - return NOMATCH; | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_IN) && | ||
| - !(info->invert & IPT_PHYSDEV_OP_IN)) | ||
| - return NOMATCH; | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_OUT) && | ||
| - !(info->invert & IPT_PHYSDEV_OP_OUT)) | ||
| - return NOMATCH; | ||
| - return MATCH; | ||
| - } | ||
| - | ||
| - /* This only makes sense in the FORWARD and POSTROUTING chains */ | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_BRIDGED) && | ||
| - (!!(nf_bridge->mask & BRNF_BRIDGED) ^ | ||
| - !(info->invert & IPT_PHYSDEV_OP_BRIDGED))) | ||
| - return NOMATCH; | ||
| - | ||
| - if ((info->bitmask & IPT_PHYSDEV_OP_ISIN && | ||
| - (!nf_bridge->physindev ^ !!(info->invert & IPT_PHYSDEV_OP_ISIN))) || | ||
| - (info->bitmask & IPT_PHYSDEV_OP_ISOUT && | ||
| - (!nf_bridge->physoutdev ^ !!(info->invert & IPT_PHYSDEV_OP_ISOUT)))) | ||
| - return NOMATCH; | ||
| - | ||
| - if (!(info->bitmask & IPT_PHYSDEV_OP_IN)) | ||
| - goto match_outdev; | ||
| - indev = nf_bridge->physindev ? nf_bridge->physindev->name : nulldevname; | ||
| - for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned int); i++) { | ||
| - ret |= (((const unsigned int *)indev)[i] | ||
| - ^ ((const unsigned int *)info->physindev)[i]) | ||
| - & ((const unsigned int *)info->in_mask)[i]; | ||
| - } | ||
| - | ||
| - if ((ret == 0) ^ !(info->invert & IPT_PHYSDEV_OP_IN)) | ||
| - return NOMATCH; | ||
| - | ||
| -match_outdev: | ||
| - if (!(info->bitmask & IPT_PHYSDEV_OP_OUT)) | ||
| - return MATCH; | ||
| - outdev = nf_bridge->physoutdev ? | ||
| - nf_bridge->physoutdev->name : nulldevname; | ||
| - for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned int); i++) { | ||
| - ret |= (((const unsigned int *)outdev)[i] | ||
| - ^ ((const unsigned int *)info->physoutdev)[i]) | ||
| - & ((const unsigned int *)info->out_mask)[i]; | ||
| - } | ||
| - | ||
| - return (ret != 0) ^ !(info->invert & IPT_PHYSDEV_OP_OUT); | ||
| -} | ||
| - | ||
| -static int | ||
| -checkentry(const char *tablename, | ||
| - const struct ipt_ip *ip, | ||
| - void *matchinfo, | ||
| - unsigned int matchsize, | ||
| - unsigned int hook_mask) | ||
| -{ | ||
| - const struct ipt_physdev_info *info = matchinfo; | ||
| - | ||
| - if (matchsize != IPT_ALIGN(sizeof(struct ipt_physdev_info))) | ||
| - return 0; | ||
| - if (!(info->bitmask & IPT_PHYSDEV_OP_MASK) || | ||
| - info->bitmask & ~IPT_PHYSDEV_OP_MASK) | ||
| - return 0; | ||
| - return 1; | ||
| -} | ||
| - | ||
| -static struct ipt_match physdev_match = { | ||
| - .name = "physdev", | ||
| - .match = &match, | ||
| - .checkentry = &checkentry, | ||
| - .me = THIS_MODULE, | ||
| -}; | ||
| - | ||
| -static int __init init(void) | ||
| -{ | ||
| - return ipt_register_match(&physdev_match); | ||
| -} | ||
| - | ||
| -static void __exit fini(void) | ||
| -{ | ||
| - ipt_unregister_match(&physdev_match); | ||
| -} | ||
| - | ||
| -module_init(init); | ||
| -module_exit(fini); |