40 #ifndef included_srp_h 41 #define included_srp_h 51 #define foreach_srp_ips_state \ 57 #define _(f) SRP_IPS_STATE_##f, 82 u8 rx_neighbor_address[6];
165 ? SRP_IPS_REQUEST_wait_to_restore
166 : SRP_IPS_REQUEST_signal_fail);
202 #define foreach_srp_error \ 203 _ (NONE, "no error") \ 204 _ (UNKNOWN_MODE, "unknown mode in SRP header") \ 205 _ (KEEP_ALIVE_DROPPED, "v1 keep alive mode in SRP header") \ 206 _ (CONTROL_PACKETS_PROCESSED, "control packets processed") \ 207 _ (IPS_PACKETS_PROCESSED, "IPS packets processed") \ 208 _ (UNKNOWN_CONTROL, "unknown control packet") \ 209 _ (CONTROL_VERSION_NON_ZERO, "control packet with non-zero version") \ 210 _ (CONTROL_BAD_CHECKSUM, "control packet with bad checksum") \ 211 _ (TOPOLOGY_BAD_LENGTH, "topology packet with bad length") 214 #define _(n,s) SRP_ERROR_##n,
f64 wait_to_restore_start_time
#define foreach_srp_error
u8 rx_neighbor_address_valid
u8 * format_srp_header_with_length(u8 *s, va_list *args)
void( srp_hw_wrap_function_t)(u32 hw_if_index, u32 wrap_enable)
void srp_interface_set_hw_enable_function(u32 hw_if_index, srp_hw_enable_function_t *f)
static pg_node_t * pg_get_node(uword node_index)
srp_interface_t * interface_pool
void srp_interface_enable_ips(u32 hw_if_index)
u8 * format_srp_header(u8 *s, va_list *args)
static void srp_setup_node(vlib_main_t *vm, u32 node_index)
static srp_interface_t * srp_get_interface_from_vnet_hw_interface(u32 hw_if_index)
vlib_node_registration_t srp_ips_process_node
u8 * format_srp_device(u8 *s, va_list *args)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
srp_interface_ring_t rings[SRP_N_RING]
vlib_one_time_waiting_process_t * srp_register_interface_waiting_process_pool
serialize_function_t unserialize_srp_main
void srp_ips_rx_packet(u32 sw_if_index, srp_ips_header_t *ips_packet)
#define foreach_srp_ips_state
vnet_hw_interface_class_t srp_hw_interface_class
void srp_interface_set_hw_wrap_function(u32 hw_if_index, srp_hw_wrap_function_t *f)
srp_hw_wrap_function_t * hw_wrap_function
void srp_interface_get_interface_config(u32 hw_if_index, srp_interface_config_t *c)
format_function_t * format_buffer
void srp_interface_set_interface_config(u32 hw_if_index, srp_interface_config_t *c)
serialize_function_t serialize_srp_main
uword * interface_index_by_hw_if_index
uword unformat_pg_srp_header(unformat_input_t *input, va_list *args)
f64 wait_to_restore_idle_delay
void srp_ips_local_request(u32 sw_if_index, srp_ips_request_type_t request)
struct srp_interface_t srp_interface_t
unformat_function_t * unformat_buffer
unformat_function_t * unformat_edit
srp_hw_enable_function_t * hw_enable_function
void srp_register_interface(u32 *hw_if_indices)
uword unformat_srp_header(unformat_input_t *input, va_list *args)
struct _vlib_node_registration vlib_node_registration_t
uword * srp_register_interface_waiting_process_pool_index_by_hw_if_index
static void srp_ips_link_change(u32 sw_if_index, u32 link_is_up)
struct _vnet_hw_interface_class vnet_hw_interface_class_t
void( serialize_function_t)(serialize_main_t *m, va_list *va)
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
void( srp_hw_enable_function_t)(struct srp_interface_t *si, u32 wrap_enable)
srp_interface_config_t config
srp_ips_state_t current_ips_state