path: root/include
diff options
authorVarsha Rao <>2017-06-30 14:56:19 +0530
committerPablo Neira Ayuso <>2017-06-30 12:44:54 +0200
commit5de112c239ab97ebaba5a935d29504bff0586be7 (patch)
treefa0845522c9e37e8f77fd3a245ab58826f5625e0 /include
parent27e4cf73880b7103bffb747cdce8f9eb10e03b39 (diff)
include: Remove datatype_register().
Remove datatype_register() function and its calling __init functions. Add arguments of datatype_register() function to datatype array. Signed-off-by: Varsha Rao <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
7 files changed, 24 insertions, 3 deletions
diff --git a/include/ct.h b/include/ct.h
index ae900ee4..becd09c6 100644
--- a/include/ct.h
+++ b/include/ct.h
@@ -35,4 +35,8 @@ extern struct error_record *ct_objtype_parse(const struct location *loc, const c
extern struct stmt *notrack_stmt_alloc(const struct location *loc);
+extern const struct datatype ct_dir_type;
+extern const struct datatype ct_state_type;
+extern const struct datatype ct_status_type;
#endif /* NFTABLES_CT_H */
diff --git a/include/datatype.h b/include/datatype.h
index 58c4d3e0..2e345910 100644
--- a/include/datatype.h
+++ b/include/datatype.h
@@ -152,7 +152,6 @@ struct datatype {
const struct symbol_table *sym_tbl;
-extern void datatype_register(const struct datatype *dtype);
extern const struct datatype *datatype_lookup(enum datatypes type);
extern const struct datatype *datatype_lookup_byname(const char *name);
diff --git a/include/exthdr.h b/include/exthdr.h
index a2647ee1..97ccc387 100644
--- a/include/exthdr.h
+++ b/include/exthdr.h
@@ -89,5 +89,6 @@ extern const struct exthdr_desc exthdr_rt2;
extern const struct exthdr_desc exthdr_frag;
extern const struct exthdr_desc exthdr_dst;
extern const struct exthdr_desc exthdr_mh;
+extern const struct datatype mh_type_type;
#endif /* NFTABLES_EXTHDR_H */
diff --git a/include/fib.h b/include/fib.h
index 3a019e65..9ce681cc 100644
--- a/include/fib.h
+++ b/include/fib.h
@@ -4,4 +4,6 @@
extern struct expr *fib_expr_alloc(const struct location *loc,
unsigned int flags,
unsigned int result);
+extern const struct datatype fib_addr_type;
#endif /* NFTABLES_FIB_H */
diff --git a/include/meta.h b/include/meta.h
index 55784609..47b16c4b 100644
--- a/include/meta.h
+++ b/include/meta.h
@@ -28,10 +28,15 @@ extern struct expr *meta_expr_alloc(const struct location *loc,
struct stmt *meta_stmt_meta_iiftype(const struct location *loc, uint16_t type);
-const struct datatype ifindex_type;
struct error_record *meta_key_parse(const struct location *loc,
const char *name,
unsigned int *value);
+extern const struct datatype ifindex_type;
+extern const struct datatype tchandle_type;
+extern const struct datatype gid_type;
+extern const struct datatype uid_type;
+extern const struct datatype devgroup_type;
+extern const struct datatype pkttype_type;
#endif /* NFTABLES_META_H */
diff --git a/include/proto.h b/include/proto.h
index 01188ab6..39aa4850 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -322,4 +322,12 @@ extern const struct proto_desc proto_netdev;
extern const struct proto_desc proto_unknown;
extern const struct proto_hdr_template proto_unknown_template;
+extern const struct datatype icmp_type_type;
+extern const struct datatype tcp_flag_type;
+extern const struct datatype dccp_pkttype_type;
+extern const struct datatype arpop_type;
+extern const struct datatype icmp6_type_type;
+extern const struct datatype dscp_type;
+extern const struct datatype ecn_type;
#endif /* NFTABLES_PROTO_H */
diff --git a/include/rt.h b/include/rt.h
index 728cf5f0..9828e634 100644
--- a/include/rt.h
+++ b/include/rt.h
@@ -30,4 +30,6 @@ extern struct expr *rt_expr_alloc(const struct location *loc,
enum nft_rt_keys key, bool invalid);
extern void rt_expr_update_type(struct proto_ctx *ctx, struct expr *expr);
+extern const struct datatype realm_type;
#endif /* NFTABLES_RT_H */