logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

xt_set.h (1827B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _XT_SET_H
  3. #define _XT_SET_H
  4. #include <linux/types.h>
  5. #include <linux/netfilter/ipset/ip_set.h>
  6. /* Revision 0 interface: backward compatible with netfilter/iptables */
  7. /*
  8. * Option flags for kernel operations (xt_set_info_v0)
  9. */
  10. #define IPSET_SRC 0x01 /* Source match/add */
  11. #define IPSET_DST 0x02 /* Destination match/add */
  12. #define IPSET_MATCH_INV 0x04 /* Inverse matching */
  13. struct xt_set_info_v0 {
  14. ip_set_id_t index;
  15. union {
  16. __u32 flags[IPSET_DIM_MAX + 1];
  17. struct {
  18. __u32 __flags[IPSET_DIM_MAX];
  19. __u8 dim;
  20. __u8 flags;
  21. } compat;
  22. } u;
  23. };
  24. /* match and target infos */
  25. struct xt_set_info_match_v0 {
  26. struct xt_set_info_v0 match_set;
  27. };
  28. struct xt_set_info_target_v0 {
  29. struct xt_set_info_v0 add_set;
  30. struct xt_set_info_v0 del_set;
  31. };
  32. /* Revision 1 match and target */
  33. struct xt_set_info {
  34. ip_set_id_t index;
  35. __u8 dim;
  36. __u8 flags;
  37. };
  38. /* match and target infos */
  39. struct xt_set_info_match_v1 {
  40. struct xt_set_info match_set;
  41. };
  42. struct xt_set_info_target_v1 {
  43. struct xt_set_info add_set;
  44. struct xt_set_info del_set;
  45. };
  46. /* Revision 2 target */
  47. struct xt_set_info_target_v2 {
  48. struct xt_set_info add_set;
  49. struct xt_set_info del_set;
  50. __u32 flags;
  51. __u32 timeout;
  52. };
  53. /* Revision 3 match */
  54. struct xt_set_info_match_v3 {
  55. struct xt_set_info match_set;
  56. struct ip_set_counter_match0 packets;
  57. struct ip_set_counter_match0 bytes;
  58. __u32 flags;
  59. };
  60. /* Revision 3 target */
  61. struct xt_set_info_target_v3 {
  62. struct xt_set_info add_set;
  63. struct xt_set_info del_set;
  64. struct xt_set_info map_set;
  65. __u32 flags;
  66. __u32 timeout;
  67. };
  68. /* Revision 4 match */
  69. struct xt_set_info_match_v4 {
  70. struct xt_set_info match_set;
  71. struct ip_set_counter_match packets;
  72. struct ip_set_counter_match bytes;
  73. __u32 flags;
  74. };
  75. #endif /*_XT_SET_H*/