FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
srp.h File Reference
+ Include dependency graph for srp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  srp_interface_ring_t
 
struct  srp_interface_config_t
 
struct  srp_interface_t
 
struct  srp_main_t
 

Macros

#define foreach_srp_ips_state
 
#define foreach_srp_error
 

Typedefs

typedef void( srp_hw_wrap_function_t) (u32 hw_if_index, u32 wrap_enable)
 
typedef void( srp_hw_enable_function_t) (struct srp_interface_t *si, u32 wrap_enable)
 
typedef struct srp_interface_t srp_interface_t
 

Enumerations

enum  srp_ips_state_t { SRP_N_IPS_STATE }
 
enum  srp_ring_type_t {
  SRP_RING_OUTER, SRP_RING_INNER, SRP_N_RING = 2, SRP_SIDE_A = SRP_RING_OUTER,
  SRP_SIDE_B = SRP_RING_INNER, SRP_N_SIDE = 2
}
 
enum  srp_error_t { SRP_N_ERROR }
 

Functions

void srp_register_interface (u32 *hw_if_indices)
 
void srp_interface_enable_ips (u32 hw_if_index)
 
void srp_interface_set_hw_wrap_function (u32 hw_if_index, srp_hw_wrap_function_t *f)
 
void srp_interface_set_hw_enable_function (u32 hw_if_index, srp_hw_enable_function_t *f)
 
void srp_ips_rx_packet (u32 sw_if_index, srp_ips_header_t *ips_packet)
 
void srp_ips_local_request (u32 sw_if_index, srp_ips_request_type_t request)
 
static void srp_ips_link_change (u32 sw_if_index, u32 link_is_up)
 
void srp_interface_get_interface_config (u32 hw_if_index, srp_interface_config_t *c)
 
void srp_interface_set_interface_config (u32 hw_if_index, srp_interface_config_t *c)
 
static srp_interface_tsrp_get_interface_from_vnet_hw_interface (u32 hw_if_index)
 
u8format_srp_header (u8 *s, va_list *args)
 
u8format_srp_header_with_length (u8 *s, va_list *args)
 
u8format_srp_device (u8 *s, va_list *args)
 
uword unformat_srp_header (unformat_input_t *input, va_list *args)
 
uword unformat_pg_srp_header (unformat_input_t *input, va_list *args)
 
static void srp_setup_node (vlib_main_t *vm, u32 node_index)
 

Variables

vnet_hw_interface_class_t srp_hw_interface_class
 
vlib_node_registration_t srp_ips_process_node
 
srp_main_t srp_main
 
serialize_function_t serialize_srp_main
 
serialize_function_t unserialize_srp_main
 

Macro Definition Documentation

#define foreach_srp_error
Value:
_ (NONE, "no error") \
_ (UNKNOWN_MODE, "unknown mode in SRP header") \
_ (KEEP_ALIVE_DROPPED, "v1 keep alive mode in SRP header") \
_ (CONTROL_PACKETS_PROCESSED, "control packets processed") \
_ (IPS_PACKETS_PROCESSED, "IPS packets processed") \
_ (UNKNOWN_CONTROL, "unknown control packet") \
_ (CONTROL_VERSION_NON_ZERO, "control packet with non-zero version") \
_ (CONTROL_BAD_CHECKSUM, "control packet with bad checksum") \
_ (TOPOLOGY_BAD_LENGTH, "topology packet with bad length")

Definition at line 202 of file srp.h.

#define foreach_srp_ips_state
Value:
_ (idle) \
_ (pass_thru) \
_ (wrapped)

Definition at line 51 of file srp.h.

Typedef Documentation

typedef void( srp_hw_enable_function_t) (struct srp_interface_t *si, u32 wrap_enable)

Definition at line 95 of file srp.h.

typedef void( srp_hw_wrap_function_t) (u32 hw_if_index, u32 wrap_enable)

Definition at line 94 of file srp.h.

Enumeration Type Documentation

Enumerator
SRP_N_ERROR 

Definition at line 213 of file srp.h.

Enumerator
SRP_N_IPS_STATE 

Definition at line 56 of file srp.h.

Enumerator
SRP_RING_OUTER 
SRP_RING_INNER 
SRP_N_RING 
SRP_SIDE_A 
SRP_SIDE_B 
SRP_N_SIDE 

Definition at line 63 of file srp.h.

Function Documentation

u8* format_srp_device ( u8 s,
va_list *  args 
)

Definition at line 553 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_srp_header ( u8 s,
va_list *  args 
)

Definition at line 104 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_srp_header_with_length ( u8 s,
va_list *  args 
)

Definition at line 63 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static srp_interface_t* srp_get_interface_from_vnet_hw_interface ( u32  hw_if_index)
inlinestatic

Definition at line 175 of file srp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void srp_interface_enable_ips ( u32  hw_if_index)

Definition at line 168 of file interface.c.

+ Here is the call graph for this function:

void srp_interface_get_interface_config ( u32  hw_if_index,
srp_interface_config_t c 
)

Definition at line 252 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void srp_interface_set_hw_enable_function ( u32  hw_if_index,
srp_hw_enable_function_t f 
)

Definition at line 162 of file interface.c.

+ Here is the call graph for this function:

void srp_interface_set_hw_wrap_function ( u32  hw_if_index,
srp_hw_wrap_function_t f 
)

Definition at line 156 of file interface.c.

+ Here is the call graph for this function:

void srp_interface_set_interface_config ( u32  hw_if_index,
srp_interface_config_t c 
)

Definition at line 259 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void srp_ips_link_change ( u32  sw_if_index,
u32  link_is_up 
)
inlinestatic

Definition at line 161 of file srp.h.

+ Here is the call graph for this function:

void srp_ips_local_request ( u32  sw_if_index,
srp_ips_request_type_t  request 
)

Definition at line 750 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void srp_ips_rx_packet ( u32  sw_if_index,
srp_ips_header_t ips_packet 
)

Definition at line 667 of file node.c.

+ Here is the call graph for this function:

void srp_register_interface ( u32 hw_if_indices)

Definition at line 151 of file interface.c.

+ Here is the call graph for this function:

static void srp_setup_node ( vlib_main_t vm,
u32  node_index 
)
inlinestatic

Definition at line 193 of file srp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_pg_srp_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 78 of file pg.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_srp_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 111 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

serialize_function_t serialize_srp_main

Definition at line 220 of file srp.h.

vnet_hw_interface_class_t srp_hw_interface_class
vlib_node_registration_t srp_ips_process_node

Definition at line 857 of file node.c.

srp_main_t srp_main

Definition at line 44 of file node.c.

serialize_function_t unserialize_srp_main

Definition at line 220 of file srp.h.