summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_nht.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-19 14:04:17 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-06 19:22:43 +0200
commitb13e5ad68a740b66c921c5ab1314e0898f0ed310 (patch)
treef08e165c4507040ecfd17ec9c10b109f5b5fa941 /pbrd/pbr_nht.h
parentlib: Add hash and use const a bit more intelligently (diff)
downloadfrr-b13e5ad68a740b66c921c5ab1314e0898f0ed310.tar.xz
frr-b13e5ad68a740b66c921c5ab1314e0898f0ed310.zip
pbrd: Remove pbr_events
The pbr_events.c file was a mistake in that it overly complicated the code and made it hard to think about what was happening. Remove all the events and just do the work where needed. Additionally rethink the sending of the pbr map to zebra and only send one notification at a time instead of having the sending function attempt to figure out what to do. Clean up some of the no form of commands to make them work properly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_nht.h')
-rw-r--r--pbrd/pbr_nht.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/pbrd/pbr_nht.h b/pbrd/pbr_nht.h
index 2508f49e4..2cfb076f0 100644
--- a/pbrd/pbr_nht.h
+++ b/pbrd/pbr_nht.h
@@ -23,6 +23,8 @@
#include <lib/zclient.h>
#include <lib/nexthop_group.h>
+#include "pbr_map.h"
+
struct pbr_nexthop_group_cache {
char name[PBR_MAP_NAMELEN];
@@ -41,7 +43,7 @@ struct pbr_nexthop_group_cache {
struct pbr_nexthop_cache {
struct pbr_nexthop_group_cache *parent;
- struct nexthop nexthop;
+ struct nexthop *nexthop;
bool valid;
};
@@ -76,12 +78,12 @@ extern void pbr_nhgroup_delete_cb(const char *name);
extern bool pbr_nht_nexthop_valid(struct nexthop_group *nhg);
extern bool pbr_nht_nexthop_group_valid(const char *name);
-extern void pbr_nht_add_group(const char *name);
+extern struct pbr_nexthop_group_cache *pbr_nht_add_group(const char *name);
extern void pbr_nht_change_group(const char *name);
extern void pbr_nht_delete_group(const char *name);
-extern void pbr_nht_add_individual_nexthop(const char *name, uint32_t seqno);
-extern void pbr_nht_delete_individual_nexthop(const char *name, uint32_t seqno);
+extern void pbr_nht_add_individual_nexthop(struct pbr_map_sequence *pbrms);
+extern void pbr_nht_delete_individual_nexthop(struct pbr_map_sequence *pbrms);
/*
* Given the tableid of the installed default
* route, find the nexthop-group associated with