]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_pbr.h
Merge pull request #5703 from ton31337/feature/limit_outgoing_prefixes
[mirror_frr.git] / bgpd / bgp_pbr.h
index eebfdf37151c2534c1bab4ffa09e794ec66f085d..393b08da4819285da0f92111b98635e487b76c80 100644 (file)
@@ -158,6 +158,19 @@ struct bgp_pbr_config {
 
 extern struct bgp_pbr_config *bgp_pbr_cfg;
 
+struct bgp_pbr_rule {
+       uint32_t flags;
+       struct prefix src;
+       struct prefix dst;
+       struct bgp_pbr_action *action;
+       vrf_id_t vrf_id;
+       uint32_t unique;
+       uint32_t priority;
+       bool installed;
+       bool install_in_progress;
+       void *path;
+};
+
 struct bgp_pbr_match {
        char ipset_name[ZEBRA_IPSET_NAME_SIZE];
 
@@ -173,6 +186,7 @@ struct bgp_pbr_match {
        uint16_t tcp_mask_flags;
        uint8_t dscp_value;
        uint8_t fragment;
+       uint8_t protocol;
 
        vrf_id_t vrf_id;
 
@@ -242,6 +256,9 @@ struct bgp_pbr_action {
        struct bgp *bgp;
 };
 
+extern struct bgp_pbr_rule *bgp_pbr_rule_lookup(vrf_id_t vrf_id,
+                                               uint32_t unique);
+
 extern struct bgp_pbr_action *bgp_pbr_action_rule_lookup(vrf_id_t vrf_id,
                                                         uint32_t unique);
 
@@ -257,13 +274,16 @@ extern struct bgp_pbr_match *bgp_pbr_match_iptable_lookup(vrf_id_t vrf_id,
 extern void bgp_pbr_cleanup(struct bgp *bgp);
 extern void bgp_pbr_init(struct bgp *bgp);
 
-extern uint32_t bgp_pbr_action_hash_key(void *arg);
+extern uint32_t bgp_pbr_rule_hash_key(const void *arg);
+extern bool bgp_pbr_rule_hash_equal(const void *arg1,
+                                  const void *arg2);
+extern uint32_t bgp_pbr_action_hash_key(const void *arg);
 extern bool bgp_pbr_action_hash_equal(const void *arg1,
                                     const void *arg2);
-extern uint32_t bgp_pbr_match_entry_hash_key(void *arg);
+extern uint32_t bgp_pbr_match_entry_hash_key(const void *arg);
 extern bool bgp_pbr_match_entry_hash_equal(const void *arg1,
                                          const void *arg2);
-extern uint32_t bgp_pbr_match_hash_key(void *arg);
+extern uint32_t bgp_pbr_match_hash_key(const void *arg);
 extern bool bgp_pbr_match_hash_equal(const void *arg1,
                                    const void *arg2);