1#ifndef _IPT_MPORT_H 2#define _IPT_MPORT_H 3#include <linux/netfilter_ipv4/ip_tables.h> 4 5#define IPT_MPORT_SOURCE (1<<0) 6#define IPT_MPORT_DESTINATION (1<<1) 7#define IPT_MPORT_EITHER (IPT_MPORT_SOURCE|IPT_MPORT_DESTINATION) 8 9#define IPT_MULTI_PORTS 15 10 11/* Must fit inside union ipt_matchinfo: 32 bytes */ 12/* every entry in ports[] except for the last one has one bit in pflags 13 * associated with it. If this bit is set, the port is the first port of 14 * a portrange, with the next entry being the last. 15 * End of list is marked with pflags bit set and port=65535. 16 * If 14 ports are used (last one does not have a pflag), the last port 17 * is repeated to fill the last entry in ports[] */ 18struct ipt_mport 19{ 20 u_int8_t flags:2; /* Type of comparison */ 21 u_int16_t pflags:14; /* Port flags */ 22 u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ 23}; 24#endif /*_IPT_MPORT_H*/ 25