FD.io VPP
v16.09
Vector Packet Processing
|
Segment Routing main functions. More...
Go to the source code of this file.
Data Structures | |
struct | sr_rewrite_trace_t |
Struct for data for SR rewrite packet trace. More... | |
struct | sr_fix_addr_trace_t |
Information for fix address trace. More... | |
struct | sr_local_trace_t |
Struct for packet trace of SR local. More... | |
Macros | |
#define | foreach_sr_rewrite_next |
Defined valid next nodes. More... | |
#define | sr_error(n, s) s, |
#define | sr_error(n, s) SR_REWRITE_ERROR_##n, |
#define | foreach_sr_fix_dst_addr_next _(DROP, "error-drop") |
#define | sr_fix_dst_error(n, s) s, |
#define | sr_fix_dst_error(n, s) SR_FIX_DST_ERROR_##n, |
#define | foreach_sr_local_next |
Definition of next-nodes for SR local. More... | |
#define | sr_error(n, s) s, |
#define | sr_error(n, s) SR_LOCAL_ERROR_##n, |
Enumerations | |
enum | sr_rewrite_next_t { SR_REWRITE_N_NEXT } |
Struct for defined valid next nodes. More... | |
enum | sr_rewrite_error_t { sr_error, sr_error } |
Struct for SR rewrite error strings. More... | |
enum | sr_fix_dst_addr_next_t { SR_FIX_DST_ADDR_N_NEXT } |
Struct for valid next-nodes for SR fix destination address node. More... | |
enum | sr_fix_dst_error_t { sr_fix_dst_error, sr_fix_dst_error } |
Struct for errors for SR Fix Destination rewrite. More... | |
enum | sr_local_next_t { SR_LOCAL_N_NEXT } |
Struct for definition of next-nodes for SR local. More... | |
enum | sr_local_error_t { sr_error, sr_error } |
Struct for definition of SR local error-strings. More... | |
Functions | |
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. More... | |
u8 * | format_ip6_sr_header_flags (u8 *s, va_list *args) |
Format function for decoding various SR flags. More... | |
u8 * | format_ip6_sr_header (u8 *s, va_list *args) |
Format function for decoding ip6_sr_header_t. More... | |
u8 * | format_ip6_sr_header_with_length (u8 *s, va_list *args) |
Format function for decoding ip6_sr_header_t with length. More... | |
u8 * | format_sr_rewrite_trace (u8 *s, va_list *args) |
Format function for SR rewrite trace. More... | |
static uword | sr_rewrite (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
Main processing dual-loop for Segment Routing Rewrite. More... | |
static int | ip6_delete_route_no_next_hop (ip6_address_t *dst_address_arg, u32 dst_address_length, u32 rx_table_id) |
static ip6_sr_hmac_key_t * | find_or_add_shared_secret (ip6_sr_main_t *sm, u8 *secret, u32 *indexp) |
Find or add if not found - HMAC shared secret. More... | |
int | ip6_sr_add_del_tunnel (ip6_sr_add_del_tunnel_args_t *a) |
Add or Delete a Segment Routing tunnel. More... | |
static clib_error_t * | sr_add_del_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI parser for Add or Delete a Segment Routing tunnel. More... | |
void | ip6_sr_tunnel_display (vlib_main_t *vm, ip6_sr_tunnel_t *t) |
Display Segment Routing tunnel. More... | |
static clib_error_t * | show_sr_tunnel_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI Parser for Display Segment Routing tunnel. More... | |
int | ip6_sr_add_del_policy (ip6_sr_add_del_policy_args_t *a) |
Add or Delete a Segment Routing policy. More... | |
static clib_error_t * | sr_add_del_policy_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI Parser for Add or Delete a Segment Routing policy. More... | |
static clib_error_t * | show_sr_policy_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI Parser for Displaying Segment Routing policy. More... | |
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. More... | |
static clib_error_t * | sr_add_del_multicast_map_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI Parser for Adding or Delete a mapping of IP6 multicast address to Segment Routing policy. More... | |
static clib_error_t * | show_sr_multicast_map_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI Parser for Displaying a mapping of IP6 multicast address to Segment Routing policy. More... | |
u8 * | format_sr_fix_addr_trace (u8 *s, va_list *args) |
Formatter for fix address trace. More... | |
static uword | sr_fix_dst_addr (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
Fix SR destination address - dual-loop. More... | |
static clib_error_t * | sr_init (vlib_main_t *vm) |
u8 * | format_sr_local_trace (u8 *s, va_list *args) |
Format SR local trace. More... | |
static int | sr_validate_hmac (ip6_sr_main_t *sm, ip6_header_t *ip, ip6_sr_header_t *sr) |
Validate the SR HMAC. More... | |
static uword | sr_local (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
SR local node. More... | |
ip6_sr_main_t * | sr_get_main (vlib_main_t *vm) |
static clib_error_t * | set_ip6_sr_rewrite_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI parser for SR fix destination rewrite node. More... | |
void | vnet_register_sr_app_callback (void *cb) |
Register a callback routine to set next0 in sr_local. More... | |
static clib_error_t * | test_sr_hmac_validate_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Test routine for validation of HMAC. More... | |
i32 | sr_hmac_add_del_key (ip6_sr_main_t *sm, u32 key_id, u8 *shared_secret, u8 is_del) |
Add or Delete HMAC key. More... | |
static clib_error_t * | sr_hmac_add_del_key_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
static clib_error_t * | show_sr_hmac_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI parser for show HMAC key shared secrets. More... | |
static clib_error_t * | test_sr_debug_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Test for SR debug flag. More... | |
Variables | |
ip6_sr_main_t | sr_main |
static vlib_node_registration_t | sr_local_node |
(constructor) VLIB_REGISTER_NODE (sr_local_node) More... | |
static char * | sr_rewrite_error_strings [] |
Error strings for SR rewrite. More... | |
vlib_node_registration_t | sr_rewrite_node |
(constructor) VLIB_REGISTER_NODE (sr_rewrite_node) More... | |
static vlib_cli_command_t | sr_tunnel_command |
(constructor) VLIB_CLI_COMMAND (sr_tunnel_command) More... | |
static vlib_cli_command_t | show_sr_tunnel_command |
(constructor) VLIB_CLI_COMMAND (show_sr_tunnel_command) More... | |
static vlib_cli_command_t | sr_policy_command |
(constructor) VLIB_CLI_COMMAND (sr_policy_command) More... | |
static vlib_cli_command_t | show_sr_policy_command |
(constructor) VLIB_CLI_COMMAND (show_sr_policy_command) More... | |
static vlib_cli_command_t | sr_multicast_map_command |
(constructor) VLIB_CLI_COMMAND (sr_multicast_map_command) More... | |
static vlib_cli_command_t | show_sr_multicast_map_command |
(constructor) VLIB_CLI_COMMAND (show_sr_multicast_map_command) More... | |
static char * | sr_fix_dst_error_strings [] |
Error strings for SR Fix Destination rewrite. More... | |
vlib_node_registration_t | sr_fix_dst_addr_node |
(constructor) VLIB_REGISTER_NODE (sr_fix_dst_addr_node) More... | |
static char * | sr_local_error_strings [] |
Definition of SR local error-strings. More... | |
static vlib_cli_command_t | set_ip6_sr_rewrite |
(constructor) VLIB_CLI_COMMAND (set_ip6_sr_rewrite) More... | |
static vlib_cli_command_t | test_sr_hmac_validate |
(constructor) VLIB_CLI_COMMAND (test_sr_hmac_validate) More... | |
static vlib_cli_command_t | sr_hmac |
(constructor) VLIB_CLI_COMMAND (sr_hmac) More... | |
static vlib_cli_command_t | show_sr_hmac |
(constructor) VLIB_CLI_COMMAND (show_sr_hmac) More... | |
static vlib_cli_command_t | test_sr_debug |
(constructor) VLIB_CLI_COMMAND (test_sr_debug) More... | |
Segment Routing main functions.
Definition in file sr.c.
#define foreach_sr_local_next |
#define foreach_sr_rewrite_next |
enum sr_fix_dst_error_t |
enum sr_local_error_t |
enum sr_local_next_t |
enum sr_rewrite_error_t |
enum sr_rewrite_next_t |
|
static |
Find or add if not found - HMAC shared secret.
sm | ip6_sr_main_t * |
secret | u8 * |
indexp | u32 * |
Definition at line 781 of file sr.c.
Format function for decoding ip6_sr_header_t.
s | u8 * - formatted string |
args | va_list * - ip6_sr_header_t |
Definition at line 167 of file sr.c.
Format function for decoding ip6_sr_header_t with length.
s | u8 * - formatted string |
args | va_list * - ip6_header_t + ip6_sr_header_t |
Definition at line 235 of file sr.c.
|
static |
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.
a | ip6_sr_add_del_multicastmap_args_t * |
Definition at line 1678 of file sr.c.
int ip6_sr_add_del_policy | ( | ip6_sr_add_del_policy_args_t * | a | ) |
Add or Delete a Segment Routing policy.
a | ip6_sr_add_del_policy_args_t * |
Definition at line 1426 of file sr.c.
int ip6_sr_add_del_tunnel | ( | ip6_sr_add_del_tunnel_args_t * | a | ) |
Add or Delete a Segment Routing tunnel.
a | ip6_sr_add_del_tunnel_args_t * |
Definition at line 837 of file sr.c.
void ip6_sr_tunnel_display | ( | vlib_main_t * | vm, |
ip6_sr_tunnel_t * | t | ||
) |
Display Segment Routing tunnel.
vm | vlib_main_t * |
t | ip6_sr_tunnel_t * |
Definition at line 1316 of file sr.c.
|
static |
CLI parser for SR fix destination rewrite node.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 2884 of file sr.c.
|
static |
CLI parser for show HMAC key shared secrets.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 3107 of file sr.c.
|
static |
CLI Parser for Displaying a mapping of IP6 multicast address to Segment Routing policy.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
|
static |
CLI Parser for Displaying Segment Routing policy.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 1599 of file sr.c.
|
static |
CLI Parser for Display Segment Routing tunnel.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 1361 of file sr.c.
|
static |
CLI Parser for Adding or Delete a mapping of IP6 multicast address to Segment Routing policy.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 1785 of file sr.c.
|
static |
CLI Parser for Add or Delete a Segment Routing policy.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 1508 of file sr.c.
|
static |
CLI parser for Add or Delete a Segment Routing tunnel.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 1138 of file sr.c.
|
static |
Fix SR destination address - dual-loop.
sr-fix-dst-addr
vm | vlib_main_t * |
node | vlib_node_runtime_t * |
from_frame | vlib_frame_t * |
Definition at line 2017 of file sr.c.
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.
sm | ip6_sr_main_t * |
ip | ip6_header_t * |
sr | ip6_sr_header_t * |
Definition at line 39 of file sr.c.
ip6_sr_main_t* sr_get_main | ( | vlib_main_t * | vm | ) |
i32 sr_hmac_add_del_key | ( | ip6_sr_main_t * | sm, |
u32 | key_id, | ||
u8 * | shared_secret, | ||
u8 | is_del | ||
) |
Add or Delete HMAC key.
sm | ip6_sr_main_t * |
key_id | u32 |
shared_secret | u8 * |
is_del | u8 |
Definition at line 3000 of file sr.c.
|
static |
|
static |
|
static |
SR local node.
sr-local
vm | vlib_main_t * |
node | vlib_node_runtime_t * |
from_frame | vlib_frame_t * |
Definition at line 2442 of file sr.c.
|
static |
Main processing dual-loop for Segment Routing Rewrite.
sr-rewrite
vm | vlib_main_t * |
node | vlib_node_runtime_t * |
from_frame | vlib_frame_t * |
Definition at line 356 of file sr.c.
|
static |
Validate the SR HMAC.
sm | ip6_sr_main_t * |
ip | ip6_header_t * |
sr | ip6_sr_header_t * |
Definition at line 2341 of file sr.c.
|
static |
Test for SR debug flag.
vm | vlib_main_t * |
input | unformat_input_t * |
cmd | vlib_cli_command_t * |
Definition at line 3140 of file sr.c.
|
static |
void vnet_register_sr_app_callback | ( | void * | cb | ) |
|
static |
(constructor) VLIB_CLI_COMMAND (set_ip6_sr_rewrite)
|
static |
(constructor) VLIB_CLI_COMMAND (show_sr_hmac)
|
static |
(constructor) VLIB_CLI_COMMAND (show_sr_multicast_map_command)
|
static |
(constructor) VLIB_CLI_COMMAND (show_sr_policy_command)
|
static |
(constructor) VLIB_CLI_COMMAND (show_sr_tunnel_command)
vlib_node_registration_t sr_fix_dst_addr_node |
(constructor) VLIB_REGISTER_NODE (sr_fix_dst_addr_node)
|
static |
Error strings for SR Fix Destination rewrite.
|
static |
(constructor) VLIB_CLI_COMMAND (sr_hmac)
|
static |
Definition of SR local error-strings.
|
static |
(constructor) VLIB_REGISTER_NODE (sr_local_node)
ip6_sr_main_t sr_main |
|
static |
(constructor) VLIB_CLI_COMMAND (sr_multicast_map_command)
|
static |
(constructor) VLIB_CLI_COMMAND (sr_policy_command)
|
static |
Error strings for SR rewrite.
vlib_node_registration_t sr_rewrite_node |
(constructor) VLIB_REGISTER_NODE (sr_rewrite_node)
|
static |
(constructor) VLIB_CLI_COMMAND (sr_tunnel_command)
|
static |
(constructor) VLIB_CLI_COMMAND (test_sr_debug)
|
static |
(constructor) VLIB_CLI_COMMAND (test_sr_hmac_validate)