diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:24:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:24:32 +0000 |
commit | 35cadacd2bb9383686753731e31bd7e145fb2506 (patch) | |
tree | 4489adbde75a837989533837185b2b8369a0bf68 /staticd/static_vrf.h | |
parent | Adding debian version 9.1-0.1. (diff) | |
download | frr-35cadacd2bb9383686753731e31bd7e145fb2506.tar.xz frr-35cadacd2bb9383686753731e31bd7e145fb2506.zip |
Merging upstream version 10.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'staticd/static_vrf.h')
-rw-r--r-- | staticd/static_vrf.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/staticd/static_vrf.h b/staticd/static_vrf.h index 8f55775..26ee28f 100644 --- a/staticd/static_vrf.h +++ b/staticd/static_vrf.h @@ -7,15 +7,27 @@ #ifndef __STATIC_VRF_H__ #define __STATIC_VRF_H__ +#include "openbsd-tree.h" + #ifdef __cplusplus extern "C" { #endif struct static_vrf { + RB_ENTRY(static_vrf) entry; + + char name[VRF_NAMSIZ + 1]; struct vrf *vrf; struct route_table *stable[AFI_MAX][SAFI_MAX]; }; +RB_HEAD(svrf_name_head, static_vrf); +RB_PROTOTYPE(svrf_name_head, static_vrf, entry, svrf_name_compare) + +extern struct svrf_name_head svrfs; + +struct static_vrf *static_vrf_alloc(const char *name); +void static_vrf_free(struct static_vrf *svrf); struct stable_info { struct static_vrf *svrf; @@ -25,8 +37,6 @@ struct stable_info { #define GET_STABLE_VRF_ID(info) info->svrf->vrf->vrf_id -struct static_vrf *static_vrf_lookup_by_name(const char *vrf_name); - void static_vrf_init(void); struct route_table *static_vrf_static_table(afi_t afi, safi_t safi, |