Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 1 | #ifndef _IPCONNTRACK_NETLINK_H |
| 2 | #define _IPCONNTRACK_NETLINK_H |
| 3 | #include <linux/netfilter/nfnetlink.h> |
| 4 | |
| 5 | enum cntl_msg_types { |
| 6 | IPCTNL_MSG_CT_NEW, |
| 7 | IPCTNL_MSG_CT_GET, |
| 8 | IPCTNL_MSG_CT_DELETE, |
| 9 | IPCTNL_MSG_CT_GET_CTRZERO, |
| 10 | |
| 11 | IPCTNL_MSG_MAX |
| 12 | }; |
| 13 | |
| 14 | enum ctnl_exp_msg_types { |
| 15 | IPCTNL_MSG_EXP_NEW, |
| 16 | IPCTNL_MSG_EXP_GET, |
| 17 | IPCTNL_MSG_EXP_DELETE, |
| 18 | |
| 19 | IPCTNL_MSG_EXP_MAX |
| 20 | }; |
| 21 | |
| 22 | |
| 23 | enum ctattr_type { |
| 24 | CTA_UNSPEC, |
| 25 | CTA_TUPLE_ORIG, |
| 26 | CTA_TUPLE_REPLY, |
| 27 | CTA_STATUS, |
| 28 | CTA_PROTOINFO, |
| 29 | CTA_HELP, |
Patrick McHardy | 3726add | 2006-05-29 18:24:39 -0700 | [diff] [blame] | 30 | CTA_NAT_SRC, |
| 31 | #define CTA_NAT CTA_NAT_SRC /* backwards compatibility */ |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 32 | CTA_TIMEOUT, |
| 33 | CTA_MARK, |
| 34 | CTA_COUNTERS_ORIG, |
| 35 | CTA_COUNTERS_REPLY, |
| 36 | CTA_USE, |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 37 | CTA_ID, |
Patrick McHardy | 3726add | 2006-05-29 18:24:39 -0700 | [diff] [blame] | 38 | CTA_NAT_DST, |
Pablo Neira Ayuso | 5faa1f4 | 2007-09-28 14:43:53 -0700 | [diff] [blame] | 39 | CTA_TUPLE_MASTER, |
Pablo Neira Ayuso | 13eae15 | 2007-12-17 22:28:00 -0800 | [diff] [blame] | 40 | CTA_NAT_SEQ_ADJ_ORIG, |
| 41 | CTA_NAT_SEQ_ADJ_REPLY, |
Eric Paris | 1cc6324 | 2010-10-13 16:24:54 -0400 | [diff] [blame] | 42 | CTA_SECMARK, /* obsolete */ |
Patrick McHardy | ef00f89 | 2010-02-15 18:14:57 +0100 | [diff] [blame] | 43 | CTA_ZONE, |
Eric Paris | 1cc6324 | 2010-10-13 16:24:54 -0400 | [diff] [blame] | 44 | CTA_SECCTX, |
Pablo Neira Ayuso | a992ca2 | 2011-01-19 16:00:07 +0100 | [diff] [blame] | 45 | CTA_TIMESTAMP, |
Pablo Neira Ayuso | 0f298a2 | 2012-02-24 14:41:50 +0000 | [diff] [blame] | 46 | CTA_MARK_MASK, |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 47 | __CTA_MAX |
| 48 | }; |
| 49 | #define CTA_MAX (__CTA_MAX - 1) |
| 50 | |
| 51 | enum ctattr_tuple { |
| 52 | CTA_TUPLE_UNSPEC, |
| 53 | CTA_TUPLE_IP, |
| 54 | CTA_TUPLE_PROTO, |
| 55 | __CTA_TUPLE_MAX |
| 56 | }; |
| 57 | #define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1) |
| 58 | |
| 59 | enum ctattr_ip { |
| 60 | CTA_IP_UNSPEC, |
| 61 | CTA_IP_V4_SRC, |
| 62 | CTA_IP_V4_DST, |
| 63 | CTA_IP_V6_SRC, |
| 64 | CTA_IP_V6_DST, |
| 65 | __CTA_IP_MAX |
| 66 | }; |
| 67 | #define CTA_IP_MAX (__CTA_IP_MAX - 1) |
| 68 | |
| 69 | enum ctattr_l4proto { |
| 70 | CTA_PROTO_UNSPEC, |
| 71 | CTA_PROTO_NUM, |
| 72 | CTA_PROTO_SRC_PORT, |
| 73 | CTA_PROTO_DST_PORT, |
| 74 | CTA_PROTO_ICMP_ID, |
| 75 | CTA_PROTO_ICMP_TYPE, |
| 76 | CTA_PROTO_ICMP_CODE, |
Pablo Neira Ayuso | c1d10ad | 2006-01-05 12:19:05 -0800 | [diff] [blame] | 77 | CTA_PROTO_ICMPV6_ID, |
| 78 | CTA_PROTO_ICMPV6_TYPE, |
| 79 | CTA_PROTO_ICMPV6_CODE, |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 80 | __CTA_PROTO_MAX |
| 81 | }; |
| 82 | #define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1) |
| 83 | |
| 84 | enum ctattr_protoinfo { |
| 85 | CTA_PROTOINFO_UNSPEC, |
Pablo Neira Ayuso | e1c73b7 | 2005-10-10 20:55:49 -0700 | [diff] [blame] | 86 | CTA_PROTOINFO_TCP, |
Patrick McHardy | 2bc7804 | 2008-03-20 15:15:55 +0100 | [diff] [blame] | 87 | CTA_PROTOINFO_DCCP, |
Pablo Neira Ayuso | a258860 | 2008-06-09 15:56:39 -0700 | [diff] [blame] | 88 | CTA_PROTOINFO_SCTP, |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 89 | __CTA_PROTOINFO_MAX |
| 90 | }; |
| 91 | #define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) |
| 92 | |
Pablo Neira Ayuso | e1c73b7 | 2005-10-10 20:55:49 -0700 | [diff] [blame] | 93 | enum ctattr_protoinfo_tcp { |
| 94 | CTA_PROTOINFO_TCP_UNSPEC, |
| 95 | CTA_PROTOINFO_TCP_STATE, |
Pablo Neira Ayuso | c8e2078 | 2007-03-14 16:45:19 -0700 | [diff] [blame] | 96 | CTA_PROTOINFO_TCP_WSCALE_ORIGINAL, |
| 97 | CTA_PROTOINFO_TCP_WSCALE_REPLY, |
| 98 | CTA_PROTOINFO_TCP_FLAGS_ORIGINAL, |
| 99 | CTA_PROTOINFO_TCP_FLAGS_REPLY, |
Pablo Neira Ayuso | e1c73b7 | 2005-10-10 20:55:49 -0700 | [diff] [blame] | 100 | __CTA_PROTOINFO_TCP_MAX |
| 101 | }; |
| 102 | #define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1) |
| 103 | |
Patrick McHardy | 2bc7804 | 2008-03-20 15:15:55 +0100 | [diff] [blame] | 104 | enum ctattr_protoinfo_dccp { |
| 105 | CTA_PROTOINFO_DCCP_UNSPEC, |
| 106 | CTA_PROTOINFO_DCCP_STATE, |
Pablo Neira Ayuso | 71951b6 | 2009-04-24 16:58:41 +0200 | [diff] [blame] | 107 | CTA_PROTOINFO_DCCP_ROLE, |
Pablo Neira Ayuso | a17c859 | 2009-05-27 17:50:35 +0200 | [diff] [blame] | 108 | CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ, |
Patrick McHardy | 2bc7804 | 2008-03-20 15:15:55 +0100 | [diff] [blame] | 109 | __CTA_PROTOINFO_DCCP_MAX, |
| 110 | }; |
| 111 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) |
| 112 | |
Pablo Neira Ayuso | a258860 | 2008-06-09 15:56:39 -0700 | [diff] [blame] | 113 | enum ctattr_protoinfo_sctp { |
| 114 | CTA_PROTOINFO_SCTP_UNSPEC, |
| 115 | CTA_PROTOINFO_SCTP_STATE, |
| 116 | CTA_PROTOINFO_SCTP_VTAG_ORIGINAL, |
| 117 | CTA_PROTOINFO_SCTP_VTAG_REPLY, |
| 118 | __CTA_PROTOINFO_SCTP_MAX |
| 119 | }; |
| 120 | #define CTA_PROTOINFO_SCTP_MAX (__CTA_PROTOINFO_SCTP_MAX - 1) |
| 121 | |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 122 | enum ctattr_counters { |
| 123 | CTA_COUNTERS_UNSPEC, |
Krzysztof Piotr Oledzki | 5840157 | 2008-07-21 10:01:34 -0700 | [diff] [blame] | 124 | CTA_COUNTERS_PACKETS, /* 64bit counters */ |
| 125 | CTA_COUNTERS_BYTES, /* 64bit counters */ |
| 126 | CTA_COUNTERS32_PACKETS, /* old 32bit counters, unused */ |
| 127 | CTA_COUNTERS32_BYTES, /* old 32bit counters, unused */ |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 128 | __CTA_COUNTERS_MAX |
| 129 | }; |
| 130 | #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) |
| 131 | |
Pablo Neira Ayuso | a992ca2 | 2011-01-19 16:00:07 +0100 | [diff] [blame] | 132 | enum ctattr_tstamp { |
| 133 | CTA_TIMESTAMP_UNSPEC, |
| 134 | CTA_TIMESTAMP_START, |
| 135 | CTA_TIMESTAMP_STOP, |
| 136 | __CTA_TIMESTAMP_MAX |
| 137 | }; |
| 138 | #define CTA_TIMESTAMP_MAX (__CTA_TIMESTAMP_MAX - 1) |
| 139 | |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 140 | enum ctattr_nat { |
| 141 | CTA_NAT_UNSPEC, |
| 142 | CTA_NAT_MINIP, |
| 143 | CTA_NAT_MAXIP, |
| 144 | CTA_NAT_PROTO, |
| 145 | __CTA_NAT_MAX |
| 146 | }; |
| 147 | #define CTA_NAT_MAX (__CTA_NAT_MAX - 1) |
| 148 | |
| 149 | enum ctattr_protonat { |
| 150 | CTA_PROTONAT_UNSPEC, |
| 151 | CTA_PROTONAT_PORT_MIN, |
| 152 | CTA_PROTONAT_PORT_MAX, |
| 153 | __CTA_PROTONAT_MAX |
| 154 | }; |
| 155 | #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) |
| 156 | |
Pablo Neira Ayuso | 13eae15 | 2007-12-17 22:28:00 -0800 | [diff] [blame] | 157 | enum ctattr_natseq { |
Pablo Neira Ayuso | 092cab7 | 2008-12-16 01:19:41 -0800 | [diff] [blame] | 158 | CTA_NAT_SEQ_UNSPEC, |
Pablo Neira Ayuso | 13eae15 | 2007-12-17 22:28:00 -0800 | [diff] [blame] | 159 | CTA_NAT_SEQ_CORRECTION_POS, |
| 160 | CTA_NAT_SEQ_OFFSET_BEFORE, |
| 161 | CTA_NAT_SEQ_OFFSET_AFTER, |
| 162 | __CTA_NAT_SEQ_MAX |
| 163 | }; |
| 164 | #define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1) |
| 165 | |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 166 | enum ctattr_expect { |
| 167 | CTA_EXPECT_UNSPEC, |
Harald Welte | 1444fc5 | 2005-08-09 20:04:07 -0700 | [diff] [blame] | 168 | CTA_EXPECT_MASTER, |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 169 | CTA_EXPECT_TUPLE, |
| 170 | CTA_EXPECT_MASK, |
| 171 | CTA_EXPECT_TIMEOUT, |
| 172 | CTA_EXPECT_ID, |
Harald Welte | 1444fc5 | 2005-08-09 20:04:07 -0700 | [diff] [blame] | 173 | CTA_EXPECT_HELP_NAME, |
Patrick McHardy | ef00f89 | 2010-02-15 18:14:57 +0100 | [diff] [blame] | 174 | CTA_EXPECT_ZONE, |
Pablo Neira Ayuso | 8b008fa | 2010-09-22 08:36:59 +0200 | [diff] [blame] | 175 | CTA_EXPECT_FLAGS, |
Pablo Neira Ayuso | b8c5e52 | 2012-02-05 03:21:12 +0100 | [diff] [blame] | 176 | CTA_EXPECT_CLASS, |
Pablo Neira Ayuso | 076a0ca | 2012-02-05 03:41:52 +0100 | [diff] [blame] | 177 | CTA_EXPECT_NAT, |
Pablo Neira Ayuso | 544d5c7 | 2012-02-05 03:44:51 +0100 | [diff] [blame] | 178 | CTA_EXPECT_FN, |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 179 | __CTA_EXPECT_MAX |
| 180 | }; |
| 181 | #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) |
| 182 | |
Pablo Neira Ayuso | 076a0ca | 2012-02-05 03:41:52 +0100 | [diff] [blame] | 183 | enum ctattr_expect_nat { |
| 184 | CTA_EXPECT_NAT_UNSPEC, |
| 185 | CTA_EXPECT_NAT_DIR, |
| 186 | CTA_EXPECT_NAT_TUPLE, |
| 187 | __CTA_EXPECT_NAT_MAX |
| 188 | }; |
| 189 | #define CTA_EXPECT_NAT_MAX (__CTA_EXPECT_NAT_MAX - 1) |
| 190 | |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 191 | enum ctattr_help { |
| 192 | CTA_HELP_UNSPEC, |
| 193 | CTA_HELP_NAME, |
| 194 | __CTA_HELP_MAX |
| 195 | }; |
| 196 | #define CTA_HELP_MAX (__CTA_HELP_MAX - 1) |
| 197 | |
Eric Paris | 1cc6324 | 2010-10-13 16:24:54 -0400 | [diff] [blame] | 198 | enum ctattr_secctx { |
| 199 | CTA_SECCTX_UNSPEC, |
| 200 | CTA_SECCTX_NAME, |
| 201 | __CTA_SECCTX_MAX |
| 202 | }; |
| 203 | #define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1) |
| 204 | |
Harald Welte | 080774a | 2005-08-09 19:32:58 -0700 | [diff] [blame] | 205 | #endif /* _IPCONNTRACK_NETLINK_H */ |