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