diff options
author | Donald Sharp <sharpd@nvidia.com> | 2020-11-02 18:55:45 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2020-11-15 15:49:14 +0100 |
commit | 6c924775b52e9a636f6e2e4d45f844ee998bc5b6 (patch) | |
tree | 8f2830477ad686180093b6a7a759e0eff1b3b91f /bgpd/bgp_attr.h | |
parent | bgpd: Abstract attr->cluster to accessor/set functions (diff) | |
download | frr-6c924775b52e9a636f6e2e4d45f844ee998bc5b6.tar.xz frr-6c924775b52e9a636f6e2e4d45f844ee998bc5b6.zip |
bgpd: Convert attr->evpn_overlay to accessor functions
Convert usage of the attr->evpn_overlay to get/set functionality.
Future commits will allow us to abstract this data to when
we actually need it for the `struct attr`.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_attr.h')
-rw-r--r-- | bgpd/bgp_attr.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index cfbf5d253..e154b9eef 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -502,4 +502,17 @@ static inline void bgp_attr_set_cluster(struct attr *attr, { attr->cluster1 = cl; } + +static inline const struct bgp_route_evpn * +bgp_attr_get_evpn_overlay(const struct attr *attr) +{ + return &attr->evpn_overlay; +} + +static inline void bgp_attr_set_evpn_overlay(struct attr *attr, + struct bgp_route_evpn *eo) +{ + memcpy(&attr->evpn_overlay, eo, sizeof(struct bgp_route_evpn)); +} + #endif /* _QUAGGA_BGP_ATTR_H */ |