/include/linux/netfilter/xt_set.h

https://bitbucket.org/cyanogenmod/android_kernel_asus_tf300t · C Header · 65 lines · 44 code · 13 blank · 8 comment · 0 complexity · 8f267198c808455a3297c908d8ec8f25 MD5 · raw file

  1. #ifndef _XT_SET_H
  2. #define _XT_SET_H
  3. #include <linux/types.h>
  4. #include <linux/netfilter/ipset/ip_set.h>
  5. /* Revision 0 interface: backward compatible with netfilter/iptables */
  6. /*
  7. * Option flags for kernel operations (xt_set_info_v0)
  8. */
  9. #define IPSET_SRC 0x01 /* Source match/add */
  10. #define IPSET_DST 0x02 /* Destination match/add */
  11. #define IPSET_MATCH_INV 0x04 /* Inverse matching */
  12. struct xt_set_info_v0 {
  13. ip_set_id_t index;
  14. union {
  15. __u32 flags[IPSET_DIM_MAX + 1];
  16. struct {
  17. __u32 __flags[IPSET_DIM_MAX];
  18. __u8 dim;
  19. __u8 flags;
  20. } compat;
  21. } u;
  22. };
  23. /* match and target infos */
  24. struct xt_set_info_match_v0 {
  25. struct xt_set_info_v0 match_set;
  26. };
  27. struct xt_set_info_target_v0 {
  28. struct xt_set_info_v0 add_set;
  29. struct xt_set_info_v0 del_set;
  30. };
  31. /* Revision 1 match and target */
  32. struct xt_set_info {
  33. ip_set_id_t index;
  34. __u8 dim;
  35. __u8 flags;
  36. };
  37. /* match and target infos */
  38. struct xt_set_info_match_v1 {
  39. struct xt_set_info match_set;
  40. };
  41. struct xt_set_info_target_v1 {
  42. struct xt_set_info add_set;
  43. struct xt_set_info del_set;
  44. };
  45. /* Revision 2 target */
  46. struct xt_set_info_target_v2 {
  47. struct xt_set_info add_set;
  48. struct xt_set_info del_set;
  49. u32 flags;
  50. u32 timeout;
  51. };
  52. #endif /*_XT_SET_H*/