21 #ifndef included_vnet_srmpls_h 22 #define included_vnet_srmpls_h 36 #define SR_POLICY_TYPE_DEFAULT 0 37 #define SR_POLICY_TYPE_SPRAY 1 39 #define SR_SEGMENT_LIST_WEIGHT_DEFAULT 1 41 #define SR_STEER_IPV4 4 42 #define SR_STEER_IPV6 6 44 #define SR_TE_CO_BITS_00 0 45 #define SR_TE_CO_BITS_01 1 46 #define SR_TE_CO_BITS_10 2 47 #define SR_TE_CO_BITS_11 3 150 ip46_address_t * endpoint,
151 u8 endpoint_type,
u32 color);
156 u8 traffic_type, ip46_address_t * next_hop,
157 u8 nh_type,
u32 color,
char co_bits,
u8 traffic_type
Traffic type (IPv4, IPv6, L2)
u32 * color
Vector of SR TE colors.
ip46_address_t next_hop
SR TE NH.
Optimized string handling code, including c11-compliant "safe C library" variants.
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
ip46_address_t prefix
IP address of the prefix.
u32 mpls_label_t
A label value only, i.e.
mhash_t sr_steer_policies_hash
SR Segment List (SID list)
u32 fib_table
VRF of the prefix.
int sr_mpls_policy_add(mpls_label_t bsid, mpls_label_t *segments, u8 behavior, u32 weight)
Create a new SR policy.
mpls_sr_steering_policy_t * steer_policies
mpls_label_t bsid
BindingSID (key)
int sr_mpls_steering_policy_del(ip46_address_t *prefix, u32 mask_width, u8 traffic_type, u32 table_id, u32 color)
Delete steering rule for an SR-MPLS policy.
uint32_t mask_width(const boost::asio::ip::address &addr)
Get the prefix mask length of a host route from the boost address.
sr_mpls_steering_key_t classify
Traffic classification.
u32 mask_width
Mask width of the prefix.
mpls_sr_policy_t * sr_policies
Segment Routing main datastructure.
void internal_label_lock(ip46_address_t endpoint, u32 color)
lock the label for (NH, C) endpoint might be NULL or ANY NULL = 0, ANY=~0
int sr_mpls_policy_del(mpls_label_t bsid)
Delete a SR policy.
ip46_address_t endpoint
Optional NH for SR TE.
uword * sr_policies_index_hash
u32 find_or_create_internal_label(ip46_address_t endpoint, u32 color)
find the corresponding label for (endpoint, color) and lock it endpoint might be NULL or ANY NULL = 0...
mpls_label_t bsid
SR Policy index.
mhash_t sr_policies_c2e2eclabel_hash
SR TE.
u32 color
Optional color for SR TE.
int sr_mpls_policy_assign_endpoint_color(mpls_label_t bsid, ip46_address_t *endpoint, u8 endpoint_type, u32 color)
Update the Endpoint,Color tuple of an SR policy.
char co_bits
Color-Only bits.
u8 type
Type (default is 0)
u32 * segments_lists
Pool of SID lists indexes.
int sr_mpls_policy_mod(mpls_label_t bsid, u8 operation, mpls_label_t *segments, u32 sl_index, u32 weight)
Modify an existing SR policy.
mpls_sr_main_t sr_mpls_main
int sr_mpls_steering_policy_add(mpls_label_t bsid, u32 table_id, ip46_address_t *prefix, u32 mask_width, u8 traffic_type, ip46_address_t *next_hop, u8 nh_type, u32 color, char co_bits, mpls_label_t vpn_label)
Steer traffic L3 traffic through a given SR-MPLS policy.
void internal_label_unlock(ip46_address_t endpoint, u32 color)
Release lock on label for (endpoint, color) endpoint might be NULL or ANY NULL = 0, ANY=~0.