summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_pbr.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-08-27 21:24:02 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-24 12:54:29 +0200
commit62f20a52ab08c89697c094d4f44df5cf0272499a (patch)
tree864e73d9a8c5034b89edb28ac8ad89d61ca259b4 /zebra/zebra_pbr.h
parentzebra: Move rules_hash to zrouter (diff)
downloadfrr-62f20a52ab08c89697c094d4f44df5cf0272499a.tar.xz
frr-62f20a52ab08c89697c094d4f44df5cf0272499a.zip
zebra: Move ipset_hash, ipset_entry_hash and iptable_hash into zrouter
These three data structures belong in the `zebra_router` structure as that they do not belong in `struct zebra_ns`. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_pbr.h')
-rw-r--r--zebra/zebra_pbr.h59
1 files changed, 23 insertions, 36 deletions
diff --git a/zebra/zebra_pbr.h b/zebra/zebra_pbr.h
index bc651d511..b0791f974 100644
--- a/zebra/zebra_pbr.h
+++ b/zebra/zebra_pbr.h
@@ -155,21 +155,14 @@ const char *zebra_pbr_ipset_type2str(uint32_t type);
void zebra_pbr_add_rule(struct zebra_pbr_rule *rule);
void zebra_pbr_del_rule(struct zebra_pbr_rule *rule);
-void zebra_pbr_create_ipset(struct zebra_ns *zns,
- struct zebra_pbr_ipset *ipset);
-void zebra_pbr_destroy_ipset(struct zebra_ns *zns,
- struct zebra_pbr_ipset *ipset);
-struct zebra_pbr_ipset *zebra_pbr_lookup_ipset_pername(struct zebra_ns *zns,
- char *ipsetname);
-void zebra_pbr_add_ipset_entry(struct zebra_ns *zns,
- struct zebra_pbr_ipset_entry *ipset);
-void zebra_pbr_del_ipset_entry(struct zebra_ns *zns,
- struct zebra_pbr_ipset_entry *ipset);
-
-void zebra_pbr_add_iptable(struct zebra_ns *zns,
- struct zebra_pbr_iptable *iptable);
-void zebra_pbr_del_iptable(struct zebra_ns *zns,
- struct zebra_pbr_iptable *iptable);
+void zebra_pbr_create_ipset(struct zebra_pbr_ipset *ipset);
+void zebra_pbr_destroy_ipset(struct zebra_pbr_ipset *ipset);
+struct zebra_pbr_ipset *zebra_pbr_lookup_ipset_pername(char *ipsetname);
+void zebra_pbr_add_ipset_entry(struct zebra_pbr_ipset_entry *ipset);
+void zebra_pbr_del_ipset_entry(struct zebra_pbr_ipset_entry *ipset);
+
+void zebra_pbr_add_iptable(struct zebra_pbr_iptable *iptable);
+void zebra_pbr_del_iptable(struct zebra_pbr_iptable *iptable);
/*
* Install specified rule for a specific interface.
@@ -243,26 +236,20 @@ extern void zebra_pbr_iptable_update_interfacelist(struct stream *s,
size_t zebra_pbr_tcpflags_snprintf(char *buffer, size_t len,
uint16_t tcp_val);
-DECLARE_HOOK(zebra_pbr_ipset_entry_wrap_script_get_stat, (struct zebra_ns *zns,
- struct zebra_pbr_ipset_entry *ipset,
- uint64_t *pkts, uint64_t *bytes),
- (zns, ipset, pkts, bytes))
-DECLARE_HOOK(zebra_pbr_iptable_wrap_script_get_stat, (struct zebra_ns *zns,
- struct zebra_pbr_iptable *iptable,
- uint64_t *pkts, uint64_t *bytes),
- (zns, iptable, pkts, bytes))
-DECLARE_HOOK(zebra_pbr_iptable_wrap_script_update, (struct zebra_ns *zns,
- int cmd,
- struct zebra_pbr_iptable *iptable),
- (zns, cmd, iptable));
-
-DECLARE_HOOK(zebra_pbr_ipset_entry_wrap_script_update, (struct zebra_ns *zns,
- int cmd,
- struct zebra_pbr_ipset_entry *ipset),
- (zns, cmd, ipset));
-DECLARE_HOOK(zebra_pbr_ipset_wrap_script_update, (struct zebra_ns *zns,
- int cmd,
- struct zebra_pbr_ipset *ipset),
- (zns, cmd, ipset));
+DECLARE_HOOK(zebra_pbr_ipset_entry_wrap_script_get_stat,
+ (struct zebra_pbr_ipset_entry *ipset, uint64_t *pkts,
+ uint64_t *bytes),
+ (ipset, pkts, bytes))
+DECLARE_HOOK(zebra_pbr_iptable_wrap_script_get_stat,
+ (struct zebra_pbr_iptable *iptable, uint64_t *pkts,
+ uint64_t *bytes),
+ (iptable, pkts, bytes))
+DECLARE_HOOK(zebra_pbr_iptable_wrap_script_update,
+ (int cmd, struct zebra_pbr_iptable *iptable), (cmd, iptable));
+
+DECLARE_HOOK(zebra_pbr_ipset_entry_wrap_script_update,
+ (int cmd, struct zebra_pbr_ipset_entry *ipset), (cmd, ipset));
+DECLARE_HOOK(zebra_pbr_ipset_wrap_script_update,
+ (int cmd, struct zebra_pbr_ipset *ipset), (cmd, ipset));
#endif /* _ZEBRA_PBR_H */