1 #ifndef _XT_U32_H 2 #define _XT_U32_H 1 3 4 enum xt_u32_ops { 5 XT_U32_AND, 6 XT_U32_LEFTSH, 7 XT_U32_RIGHTSH, 8 XT_U32_AT, 9 }; 10 11 struct xt_u32_location_element { 12 u_int32_t number; 13 u_int8_t nextop; 14 }; 15 16 struct xt_u32_value_element { 17 u_int32_t min; 18 u_int32_t max; 19 }; 20 21 /* 22 * Any way to allow for an arbitrary number of elements? 23 * For now, I settle with a limit of 10 each. 24 */ 25 #define XT_U32_MAXSIZE 10 26 27 struct xt_u32_test { 28 struct xt_u32_location_element location[XT_U32_MAXSIZE+1]; 29 struct xt_u32_value_element value[XT_U32_MAXSIZE+1]; 30 u_int8_t nnums; 31 u_int8_t nvalues; 32 }; 33 34 struct xt_u32 { 35 struct xt_u32_test tests[XT_U32_MAXSIZE+1]; 36 u_int8_t ntests; 37 u_int8_t invert; 38 }; 39 40 #endif /* _XT_U32_H */ 41