21 #ifndef included_vnet_sr_h 22 #define included_vnet_sr_h 28 #include <openssl/opensslconf.h> 32 #include <openssl/crypto.h> 33 #include <openssl/sha.h> 34 #include <openssl/opensslv.h> 35 #include <openssl/hmac.h> HMAC_CTX * hmac_ctx
Openssl var.
Segment Route tunnel key.
Args for creating a policy.
uword * tunnel_index_by_key
find an sr "tunnel" by its outer-IP src/dst
u32 tx_fib_index
TX Fib index.
u32 policy_index
Indicates that this tunnel is part of a policy comprising of multiple tunnels.
u32 dst_mask_width
Mask width for FIB entry.
ip6_address_t * multicast_address
multicast IP6 address
u8 * name
Pptional tunnel name.
struct _vlib_node_registration vlib_node_registration_t
ip6_address_t * tags
"Tag" list, aka segments inserted at the end of the list, past last_seg
ip6_sr_tunnel_key_t key
src, dst address
u32 rx_fib_index
RX Fib index.
ip6_address_t * segments
segment list, when inserting an ip6 SR header
int ip6_sr_add_del_policy(ip6_sr_add_del_policy_args_t *a)
Add or Delete a Segment Routing policy.
ip6_sr_hmac_key_t * hmac_keys
pool of hmac keys
u8 * name
optional name argument - for referencing SR tunnel/policy by name
int ip6_sr_add_del_multicastmap(ip6_sr_add_del_multicastmap_args_t *a)
Add or Delete a mapping of IP6 multicast address to Segment Routing policy.
format_function_t format_ip6_sr_header_with_length
Args required for add/del tunnel.
void sr_fix_hmac(ip6_sr_main_t *sm, ip6_header_t *ip, ip6_sr_header_t *sr)
Use passed HMAC key in ip6_sr_header_t in OpenSSL HMAC routines.
u8 is_del
Delete the tunnnel?
Args for mapping of multicast address to policy name.
vlib_main_t * vlib_main
convenience
void vnet_register_sr_app_callback(void *cb)
Register a callback routine to set next0 in sr_local.
The Segment Routing Header (SRH).
void * sr_local_cb
application API callback
u8 is_debug
enable debug spew
int ip6_sr_add_del_tunnel(ip6_sr_add_del_tunnel_args_t *a)
Add or Delete a Segment Routing tunnel.
u16 flags_net_byte_order
Flags, e.g.
u32 ip6_lookup_sr_replicate_index
ip6-replicate next index for multicast tunnel
ip6_address_t * src_address
Key (header imposition case)
u8 * policy_name
optional policy name
vnet_main_t * vnet_main
convenience
u8 * rewrite
The actual ip6 SR header.
vlib_node_registration_t ip6_sr_input_node
u32 * tunnel_indices
vector to SR tunnel index
u8 * policy_name
name of policy to map to
u8 validate_hmac
validate hmac keys
ip6_address_t first_hop
First hop, to save 1 elt in the segment list.
ip6_sr_tunnel_t * tunnels
pool of tunnel instances, sr entry only
uword * policy_index_by_policy_name
find a policy by name
u8 is_del
Delete the policy?
uword * tunnel_index_by_name
find an sr "tunnel" by its name
u32 ip6_lookup_sr_next_index
ip6-lookup next index for imposition FIB entries
format_function_t format_ip6_sr_header
u8 * shared_secret
Shared secret => generate SHA-256 HMAC security fields.
uword * hmac_key_by_shared_secret
hmac key id by shared secret
uword * policy_index_by_multicast_address
multicast address to policy mapping
vlib_node_registration_t sr_replicate_node
(constructor) VLIB_REGISTER_NODE (sr_replicate_node)
ip6_sr_policy_t * policies
policy pool
ip6_address_t * dst_address
u8 ** tunnel_names
tunnel names
Shared secret for keyed-hash message authentication code (HMAC).
u8 is_del
Delete the mapping.
u32 ip6_rewrite_sr_next_index
ip6-rewrite next index for reinstalling the original dst address