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, 30 CTA_NAT_SRC, 31 #define CTA_NAT CTA_NAT_SRC /* backwards compatibility */ 32 CTA_TIMEOUT, 33 CTA_MARK, 34 CTA_COUNTERS_ORIG, 35 CTA_COUNTERS_REPLY, 36 CTA_USE, 37 CTA_ID, 38 CTA_NAT_DST, 39 CTA_TUPLE_MASTER, 40 CTA_NAT_SEQ_ADJ_ORIG, 41 CTA_NAT_SEQ_ADJ_REPLY, 42 CTA_SECMARK, /* obsolete */ 43 CTA_ZONE, 44 CTA_SECCTX, 45 CTA_TIMESTAMP, 46 CTA_MARK_MASK, 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, 77 CTA_PROTO_ICMPV6_ID, 78 CTA_PROTO_ICMPV6_TYPE, 79 CTA_PROTO_ICMPV6_CODE, 80 __CTA_PROTO_MAX 81 }; 82 #define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1) 83 84 enum ctattr_protoinfo { 85 CTA_PROTOINFO_UNSPEC, 86 CTA_PROTOINFO_TCP, 87 CTA_PROTOINFO_DCCP, 88 CTA_PROTOINFO_SCTP, 89 __CTA_PROTOINFO_MAX 90 }; 91 #define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) 92 93 enum ctattr_protoinfo_tcp { 94 CTA_PROTOINFO_TCP_UNSPEC, 95 CTA_PROTOINFO_TCP_STATE, 96 CTA_PROTOINFO_TCP_WSCALE_ORIGINAL, 97 CTA_PROTOINFO_TCP_WSCALE_REPLY, 98 CTA_PROTOINFO_TCP_FLAGS_ORIGINAL, 99 CTA_PROTOINFO_TCP_FLAGS_REPLY, 100 __CTA_PROTOINFO_TCP_MAX 101 }; 102 #define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1) 103 104 enum ctattr_protoinfo_dccp { 105 CTA_PROTOINFO_DCCP_UNSPEC, 106 CTA_PROTOINFO_DCCP_STATE, 107 CTA_PROTOINFO_DCCP_ROLE, 108 CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ, 109 __CTA_PROTOINFO_DCCP_MAX, 110 }; 111 #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) 112 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 122 enum ctattr_counters { 123 CTA_COUNTERS_UNSPEC, 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 */ 128 __CTA_COUNTERS_MAX 129 }; 130 #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) 131 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 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 157 enum ctattr_natseq { 158 CTA_NAT_SEQ_UNSPEC, 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 166 enum ctattr_expect { 167 CTA_EXPECT_UNSPEC, 168 CTA_EXPECT_MASTER, 169 CTA_EXPECT_TUPLE, 170 CTA_EXPECT_MASK, 171 CTA_EXPECT_TIMEOUT, 172 CTA_EXPECT_ID, 173 CTA_EXPECT_HELP_NAME, 174 CTA_EXPECT_ZONE, 175 CTA_EXPECT_FLAGS, 176 CTA_EXPECT_CLASS, 177 CTA_EXPECT_NAT, 178 CTA_EXPECT_FN, 179 __CTA_EXPECT_MAX 180 }; 181 #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) 182 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 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 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 205 #endif /* _IPCONNTRACK_NETLINK_H */ 206