summaryrefslogtreecommitdiffstats
path: root/src/expr/data_reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/data_reg.h')
-rw-r--r--src/expr/data_reg.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/expr/data_reg.h b/src/expr/data_reg.h
new file mode 100644
index 0000000..00eab63
--- /dev/null
+++ b/src/expr/data_reg.h
@@ -0,0 +1,23 @@
+#ifndef _DATA_H_
+#define _DATA_H_
+
+enum {
+ DATA_VALUE,
+ DATA_VERDICT,
+ DATA_CHAIN,
+};
+
+union nft_data_reg {
+ struct {
+ uint32_t val[4];
+ size_t len;
+ };
+ struct {
+ int verdict;
+ char *chain;
+ };
+};
+
+int nft_parse_data(union nft_data_reg *data, struct nlattr *attr, int *type);
+
+#endif