[iptables PATCH 07/17] xtables: arp: Make rule_to_cs callback private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since it is not directly called from outside of nft-arp.c anymore, make
it private and reduce the overlong name it had.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 iptables/nft-arp.c | 10 +++++-----
 iptables/nft-arp.h |  3 ---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c
index 164c3971f1f4f..a6241498c08e6 100644
--- a/iptables/nft-arp.c
+++ b/iptables/nft-arp.c
@@ -365,8 +365,8 @@ static void nft_arp_parse_payload(struct nft_xt_ctx *ctx,
 	}
 }
 
-void nft_rule_to_arptables_command_state(const struct nftnl_rule *r,
-					 struct iptables_command_state *cs)
+static void nft_arp_rule_to_cs(const struct nftnl_rule *r,
+			       struct iptables_command_state *cs)
 {
 	struct nftnl_expr_iter *iter;
 	struct nftnl_expr *expr;
@@ -583,7 +583,7 @@ nft_arp_print_firewall(struct nftnl_rule *r, unsigned int num,
 {
 	struct iptables_command_state cs = {};
 
-	nft_rule_to_arptables_command_state(r, &cs);
+	nft_arp_rule_to_cs(r, &cs);
 
 	if (format & FMT_LINENUMBERS)
 		printf("%u ", num);
@@ -641,7 +641,7 @@ static bool nft_arp_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r,
 	struct iptables_command_state this = {};
 
 	/* Delete by matching rule case */
-	nft_rule_to_arptables_command_state(r, &this);
+	nft_arp_rule_to_cs(r, &this);
 
 	if (!nft_arp_is_same(&cs->arp, &this.arp))
 		return false;
@@ -667,7 +667,7 @@ struct nft_family_ops nft_family_ops_arp = {
 	.save_firewall		= NULL,
 	.save_counters		= NULL,
 	.post_parse		= NULL,
-	.rule_to_cs		= nft_rule_to_arptables_command_state,
+	.rule_to_cs		= nft_arp_rule_to_cs,
 	.clear_cs		= NULL,
 	.rule_find		= nft_arp_rule_find,
 	.parse_target		= nft_arp_parse_target,
diff --git a/iptables/nft-arp.h b/iptables/nft-arp.h
index e33bb74803562..da6bd380162c3 100644
--- a/iptables/nft-arp.h
+++ b/iptables/nft-arp.h
@@ -4,7 +4,4 @@
 extern char *opcodes[];
 #define NUMOPCODES 9
 
-void nft_rule_to_arptables_command_state(const struct nftnl_rule *r,
-					 struct iptables_command_state *cs);
-
 #endif
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux