diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-06-30 14:56:19 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-06-30 12:44:54 +0200 |
commit | 5de112c239ab97ebaba5a935d29504bff0586be7 (patch) | |
tree | fa0845522c9e37e8f77fd3a245ab58826f5625e0 /src/proto.c | |
parent | 27e4cf73880b7103bffb747cdce8f9eb10e03b39 (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 <rvarsha016@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/proto.c')
-rw-r--r-- | src/proto.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/proto.c b/src/proto.c index 64d06325..7ac0ee03 100644 --- a/src/proto.c +++ b/src/proto.c @@ -406,7 +406,7 @@ static const struct symbol_table tcp_flag_tbl = { }, }; -static const struct datatype tcp_flag_type = { +const struct datatype tcp_flag_type = { .type = TYPE_TCP_FLAG, .name = "tcp_flag", .desc = "TCP flag", @@ -467,7 +467,7 @@ static const struct symbol_table dccp_pkttype_tbl = { }, }; -static const struct datatype dccp_pkttype_type = { +const struct datatype dccp_pkttype_type = { .type = TYPE_DCCP_PKTTYPE, .name = "dccp_pkttype", .desc = "DCCP packet type", @@ -545,7 +545,7 @@ static const struct symbol_table dscp_type_tbl = { }, }; -static const struct datatype dscp_type = { +const struct datatype dscp_type = { .type = TYPE_DSCP, .name = "dscp", .desc = "Differentiated Services Code Point", @@ -567,7 +567,7 @@ static const struct symbol_table ecn_type_tbl = { }, }; -static const struct datatype ecn_type = { +const struct datatype ecn_type = { .type = TYPE_ECN, .name = "ecn", .desc = "Explicit Congestion Notification", @@ -662,7 +662,7 @@ static const struct symbol_table icmp6_type_tbl = { }, }; -static const struct datatype icmp6_type_type = { +const struct datatype icmp6_type_type = { .type = TYPE_ICMP6_TYPE, .name = "icmpv6_type", .desc = "ICMPv6 type", @@ -807,7 +807,7 @@ static const struct symbol_table arpop_tbl = { }, }; -static const struct datatype arpop_type = { +const struct datatype arpop_type = { .type = TYPE_ARPOP, .name = "arp_op", .desc = "ARP operation", @@ -960,15 +960,3 @@ const struct proto_desc proto_netdev = { [0] = PROTO_META_TEMPLATE("protocol", ðertype_type, NFT_META_PROTOCOL, 16), }, }; - -static void __init proto_init(void) -{ - datatype_register(&icmp_type_type); - datatype_register(&tcp_flag_type); - datatype_register(&dccp_pkttype_type); - datatype_register(&arpop_type); - datatype_register(ðertype_type); - datatype_register(&icmp6_type_type); - datatype_register(&dscp_type); - datatype_register(&ecn_type); -} |