]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
headers: sync headers for new register values
authorPatrick McHardy <kaber@trash.net>
Sun, 12 Apr 2015 20:10:41 +0000 (21:10 +0100)
committerPatrick McHardy <kaber@trash.net>
Tue, 2 Jun 2015 11:03:58 +0000 (13:03 +0200)
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter/nf_tables.h

index 0e96443936df4d11aaba131b6c64c83d8b8438af..33056dc21ff9fa2f5ba0322732873d74483f0100 100644 (file)
@@ -4,16 +4,45 @@
 #define NFT_CHAIN_MAXNAMELEN   32
 #define NFT_USERDATA_MAXLEN    256
 
+/**
+ * enum nft_registers - nf_tables registers
+ *
+ * nf_tables used to have five registers: a verdict register and four data
+ * registers of size 16. The data registers have been changed to 16 registers
+ * of size 4. For compatibility reasons, the NFT_REG_[1-4] registers still
+ * map to areas of size 16, the 4 byte registers are addressed using
+ * NFT_REG32_00 - NFT_REG32_15.
+ */
 enum nft_registers {
        NFT_REG_VERDICT,
        NFT_REG_1,
        NFT_REG_2,
        NFT_REG_3,
        NFT_REG_4,
-       __NFT_REG_MAX
+       __NFT_REG_MAX,
+
+       NFT_REG32_00    = 8,
+       MFT_REG32_01,
+       NFT_REG32_02,
+       NFT_REG32_03,
+       NFT_REG32_04,
+       NFT_REG32_05,
+       NFT_REG32_06,
+       NFT_REG32_07,
+       NFT_REG32_08,
+       NFT_REG32_09,
+       NFT_REG32_10,
+       NFT_REG32_11,
+       NFT_REG32_12,
+       NFT_REG32_13,
+       NFT_REG32_14,
+       NFT_REG32_15,
 };
 #define NFT_REG_MAX    (__NFT_REG_MAX - 1)
 
+#define NFT_REG_SIZE   16
+#define NFT_REG32_SIZE 4
+
 /**
  * enum nft_verdicts - nf_tables internal verdicts
  *
@@ -358,6 +387,9 @@ enum nft_data_attributes {
 };
 #define NFTA_DATA_MAX          (__NFTA_DATA_MAX - 1)
 
+/* Maximum length of a value */
+#define NFT_DATA_VALUE_MAXLEN  64
+
 /**
  * enum nft_verdict_attributes - nf_tables verdict netlink attributes
  *