1 #ifndef _XT_TCPUDP_H 2 #define _XT_TCPUDP_H 3 4 /* TCP matching stuff */ 5 struct xt_tcp 6 { 7 u_int16_t spts[2]; /* Source port range. */ 8 u_int16_t dpts[2]; /* Destination port range. */ 9 u_int8_t option; /* TCP Option iff non-zero*/ 10 u_int8_t flg_mask; /* TCP flags mask byte */ 11 u_int8_t flg_cmp; /* TCP flags compare byte */ 12 u_int8_t invflags; /* Inverse flags */ 13 }; 14 15 /* Values for "inv" field in struct ipt_tcp. */ 16 #define XT_TCP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ 17 #define XT_TCP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ 18 #define XT_TCP_INV_FLAGS 0x04 /* Invert the sense of TCP flags. */ 19 #define XT_TCP_INV_OPTION 0x08 /* Invert the sense of option test. */ 20 #define XT_TCP_INV_MASK 0x0F /* All possible flags. */ 21 22 /* UDP matching stuff */ 23 struct xt_udp 24 { 25 u_int16_t spts[2]; /* Source port range. */ 26 u_int16_t dpts[2]; /* Destination port range. */ 27 u_int8_t invflags; /* Inverse flags */ 28 }; 29 30 /* Values for "invflags" field in struct ipt_udp. */ 31 #define XT_UDP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ 32 #define XT_UDP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ 33 #define XT_UDP_INV_MASK 0x03 /* All possible flags. */ 34 35 36 #endif 37