Home | History | Annotate | Download | only in netfilter
      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 	__u32 number;
     13 	__u8 nextop;
     14 };
     15 
     16 struct xt_u32_value_element {
     17 	__u32 min;
     18 	__u32 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 	__u8 nnums;
     31 	__u8 nvalues;
     32 };
     33 
     34 struct xt_u32 {
     35 	struct xt_u32_test tests[XT_U32_MAXSIZE+1];
     36 	__u8 ntests;
     37 	__u8 invert;
     38 };
     39 
     40 #endif /* _XT_U32_H */
     41