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_MAX 47 }; 48 #define CTA_MAX (__CTA_MAX - 1) 49 50 enum ctattr_tuple { 51 CTA_TUPLE_UNSPEC, 52 CTA_TUPLE_IP, 53 CTA_TUPLE_PROTO, 54 __CTA_TUPLE_MAX 55 }; 56 #define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1) 57 58 enum ctattr_ip { 59 CTA_IP_UNSPEC, 60 CTA_IP_V4_SRC, 61 CTA_IP_V4_DST, 62 CTA_IP_V6_SRC, 63 CTA_IP_V6_DST, 64 __CTA_IP_MAX 65 }; 66 #define CTA_IP_MAX (__CTA_IP_MAX - 1) 67 68 enum ctattr_l4proto { 69 CTA_PROTO_UNSPEC, 70 CTA_PROTO_NUM, 71 CTA_PROTO_SRC_PORT, 72 CTA_PROTO_DST_PORT, 73 CTA_PROTO_ICMP_ID, 74 CTA_PROTO_ICMP_TYPE, 75 CTA_PROTO_ICMP_CODE, 76 CTA_PROTO_ICMPV6_ID, 77 CTA_PROTO_ICMPV6_TYPE, 78 CTA_PROTO_ICMPV6_CODE, 79 __CTA_PROTO_MAX 80 }; 81 #define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1) 82 83 enum ctattr_protoinfo { 84 CTA_PROTOINFO_UNSPEC, 85 CTA_PROTOINFO_TCP, 86 CTA_PROTOINFO_DCCP, 87 CTA_PROTOINFO_SCTP, 88 __CTA_PROTOINFO_MAX 89 }; 90 #define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) 91 92 enum ctattr_protoinfo_tcp { 93 CTA_PROTOINFO_TCP_UNSPEC, 94 CTA_PROTOINFO_TCP_STATE, 95 CTA_PROTOINFO_TCP_WSCALE_ORIGINAL, 96 CTA_PROTOINFO_TCP_WSCALE_REPLY, 97 CTA_PROTOINFO_TCP_FLAGS_ORIGINAL, 98 CTA_PROTOINFO_TCP_FLAGS_REPLY, 99 __CTA_PROTOINFO_TCP_MAX 100 }; 101 #define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1) 102 103 enum ctattr_protoinfo_dccp { 104 CTA_PROTOINFO_DCCP_UNSPEC, 105 CTA_PROTOINFO_DCCP_STATE, 106 CTA_PROTOINFO_DCCP_ROLE, 107 CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ, 108 __CTA_PROTOINFO_DCCP_MAX, 109 }; 110 #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) 111 112 enum ctattr_protoinfo_sctp { 113 CTA_PROTOINFO_SCTP_UNSPEC, 114 CTA_PROTOINFO_SCTP_STATE, 115 CTA_PROTOINFO_SCTP_VTAG_ORIGINAL, 116 CTA_PROTOINFO_SCTP_VTAG_REPLY, 117 __CTA_PROTOINFO_SCTP_MAX 118 }; 119 #define CTA_PROTOINFO_SCTP_MAX (__CTA_PROTOINFO_SCTP_MAX - 1) 120 121 enum ctattr_counters { 122 CTA_COUNTERS_UNSPEC, 123 CTA_COUNTERS_PACKETS, /* 64bit counters */ 124 CTA_COUNTERS_BYTES, /* 64bit counters */ 125 CTA_COUNTERS32_PACKETS, /* old 32bit counters, unused */ 126 CTA_COUNTERS32_BYTES, /* old 32bit counters, unused */ 127 __CTA_COUNTERS_MAX 128 }; 129 #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) 130 131 enum ctattr_tstamp { 132 CTA_TIMESTAMP_UNSPEC, 133 CTA_TIMESTAMP_START, 134 CTA_TIMESTAMP_STOP, 135 __CTA_TIMESTAMP_MAX 136 }; 137 #define CTA_TIMESTAMP_MAX (__CTA_TIMESTAMP_MAX - 1) 138 139 enum ctattr_nat { 140 CTA_NAT_UNSPEC, 141 CTA_NAT_MINIP, 142 CTA_NAT_MAXIP, 143 CTA_NAT_PROTO, 144 __CTA_NAT_MAX 145 }; 146 #define CTA_NAT_MAX (__CTA_NAT_MAX - 1) 147 148 enum ctattr_protonat { 149 CTA_PROTONAT_UNSPEC, 150 CTA_PROTONAT_PORT_MIN, 151 CTA_PROTONAT_PORT_MAX, 152 __CTA_PROTONAT_MAX 153 }; 154 #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) 155 156 enum ctattr_natseq { 157 CTA_NAT_SEQ_UNSPEC, 158 CTA_NAT_SEQ_CORRECTION_POS, 159 CTA_NAT_SEQ_OFFSET_BEFORE, 160 CTA_NAT_SEQ_OFFSET_AFTER, 161 __CTA_NAT_SEQ_MAX 162 }; 163 #define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1) 164 165 enum ctattr_expect { 166 CTA_EXPECT_UNSPEC, 167 CTA_EXPECT_MASTER, 168 CTA_EXPECT_TUPLE, 169 CTA_EXPECT_MASK, 170 CTA_EXPECT_TIMEOUT, 171 CTA_EXPECT_ID, 172 CTA_EXPECT_HELP_NAME, 173 CTA_EXPECT_ZONE, 174 CTA_EXPECT_FLAGS, 175 __CTA_EXPECT_MAX 176 }; 177 #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) 178 179 enum ctattr_help { 180 CTA_HELP_UNSPEC, 181 CTA_HELP_NAME, 182 __CTA_HELP_MAX 183 }; 184 #define CTA_HELP_MAX (__CTA_HELP_MAX - 1) 185 186 enum ctattr_secctx { 187 CTA_SECCTX_UNSPEC, 188 CTA_SECCTX_NAME, 189 __CTA_SECCTX_MAX 190 }; 191 #define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1) 192 193 #endif /* _IPCONNTRACK_NETLINK_H */ 194