FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
rd_cp.c File Reference
+ Include dependency graph for rd_cp.c:

Go to the source code of this file.

Data Structures

struct  slaac_address_t
 
struct  default_route_t
 
struct  interface_config_t
 
struct  rd_cp_main_t
 

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define foreach_rd_cp_msg   _(IP6_ND_ADDRESS_AUTOCONFIG, ip6_nd_address_autoconfig)
 
#define foreach_client_rd_cp_msg
 
#define vl_api_ip6_nd_address_autoconfig_t_print   vl_noop_handler
 
#define PREFIX_FLAG_A   (1 << 6)
 
#define PREFIX_FLAG_L   (1 << 7)
 
#define vl_msg_name_crc_list
 

Enumerations

enum  { RD_CP_EVENT_INTERRUPT }
 

Functions

static void msg_api_config (vl_msg_api_msg_config_t *c)
 
static void set_handler (int id, char *name, void *handler)
 
static_always_inline void check_queue (void)
 
static_always_inline int wait_for_reply (void)
 
static_always_inline void send_msg (void *msg)
 
static_always_inline int send_msg_and_wait_for_reply (void *msg)
 
static int router_solicitation_start_stop (u32 sw_if_index, u8 start)
 
static void vl_api_ip6nd_send_router_solicitation_reply_t_handler (vl_api_ip6nd_send_router_solicitation_reply_t *mp)
 
static int ip6_ra_events_enable_disable (int enable)
 
static void vl_api_want_ip6_ra_events_reply_t_handler (vl_api_want_ip6_ra_events_reply_t *mp)
 
static void interrupt_process (void)
 
static int add_slaac_address (vlib_main_t *vm, u32 sw_if_index, u8 address_length, ip6_address_t *address, f64 due_time)
 
static void vl_api_sw_interface_add_del_address_reply_t_handler (vl_api_sw_interface_add_del_address_reply_t *mp)
 
static int add_default_route (vlib_main_t *vm, u32 sw_if_index, ip6_address_t *next_hop_address, f64 due_time)
 
static void vl_api_ip_add_del_route_reply_t_handler (vl_api_ip_add_del_route_reply_t *mp)
 
static int remove_slaac_address (vlib_main_t *vm, slaac_address_t *slaac_address)
 
static int remove_default_route (vlib_main_t *vm, default_route_t *default_route)
 
static u32 get_interface_mac_address (u32 sw_if_index, u8 mac[])
 
static void vl_api_sw_interface_get_mac_address_reply_t_handler (vl_api_sw_interface_get_mac_address_reply_t *mp)
 
static u32 ip6_enable (u32 sw_if_index)
 
static void vl_api_sw_interface_ip6_enable_disable_reply_t_handler (vl_api_sw_interface_ip6_enable_disable_reply_t *mp)
 
static u8 ip6_prefixes_equal (ip6_address_t *prefix1, ip6_address_t *prefix2, u8 len)
 
static void vl_api_ip6_ra_event_t_handler (vl_api_ip6_ra_event_t *mp)
 
static uword rd_cp_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static int create_api_loopback (void)
 
static int set_address_autoconfig (u32 sw_if_index, u8 enable, u8 install_default_routes)
 
static clib_error_tip6_nd_address_autoconfig (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void vl_api_ip6_nd_address_autoconfig_t_handler (vl_api_ip6_nd_address_autoconfig_t *mp)
 
static void setup_message_id_table (api_main_t *am)
 
static clib_error_trd_cp_init (vlib_main_t *vm)
 

Variables

rd_cp_main_t rd_cp_main
 
vlib_node_registration_t rd_cp_process_node
 (constructor) VLIB_REGISTER_NODE (rd_cp_process_node) More...
 
static vlib_cli_command_t ip6_nd_address_autoconfig_command
 (constructor) VLIB_CLI_COMMAND (ip6_nd_address_autoconfig_command) More...
 

Macro Definition Documentation

#define foreach_client_rd_cp_msg
Value:
_(IP6_RA_EVENT, ip6_ra_event) \
_(IP6ND_SEND_ROUTER_SOLICITATION_REPLY, ip6nd_send_router_solicitation_reply) \
_(WANT_IP6_RA_EVENTS_REPLY, want_ip6_ra_events_reply) \
_(SW_INTERFACE_ADD_DEL_ADDRESS_REPLY, sw_interface_add_del_address_reply) \
_(IP_ADD_DEL_ROUTE_REPLY, ip_add_del_route_reply) \
_(SW_INTERFACE_GET_MAC_ADDRESS_REPLY, sw_interface_get_mac_address_reply) \
_(SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY, sw_interface_ip6_enable_disable_reply)

Definition at line 21 of file rd_cp.c.

#define foreach_rd_cp_msg   _(IP6_ND_ADDRESS_AUTOCONFIG, ip6_nd_address_autoconfig)

Definition at line 18 of file rd_cp.c.

#define PREFIX_FLAG_A   (1 << 6)

Definition at line 465 of file rd_cp.c.

#define PREFIX_FLAG_L   (1 << 7)

Definition at line 466 of file rd_cp.c.

#define vl_api_ip6_nd_address_autoconfig_t_print   vl_noop_handler

Definition at line 89 of file rd_cp.c.

#define vl_endianfun   /* define message structures */

Definition at line 12 of file rd_cp.c.

#define vl_msg_name_crc_list

Definition at line 875 of file rd_cp.c.

#define vl_typedefs   /* define message structures */

Definition at line 8 of file rd_cp.c.

Enumeration Type Documentation

anonymous enum
Enumerator
RD_CP_EVENT_INTERRUPT 

Definition at line 84 of file rd_cp.c.

Function Documentation

static int add_default_route ( vlib_main_t vm,
u32  sw_if_index,
ip6_address_t next_hop_address,
f64  due_time 
)
static

Definition at line 303 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int add_slaac_address ( vlib_main_t vm,
u32  sw_if_index,
u8  address_length,
ip6_address_t address,
f64  due_time 
)
static

Definition at line 262 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void check_queue ( void  )

Definition at line 125 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int create_api_loopback ( void  )
static

Definition at line 706 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 get_interface_mac_address ( u32  sw_if_index,
u8  mac[] 
)
static

Definition at line 388 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void interrupt_process ( void  )
static

Definition at line 696 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 ip6_enable ( u32  sw_if_index)
static

Definition at line 422 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* ip6_nd_address_autoconfig ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 797 of file rd_cp.c.

+ Here is the call graph for this function:

static u8 ip6_prefixes_equal ( ip6_address_t prefix1,
ip6_address_t prefix2,
u8  len 
)
static

Definition at line 451 of file rd_cp.c.

static int ip6_ra_events_enable_disable ( int  enable)
static

Definition at line 228 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void msg_api_config ( vl_msg_api_msg_config_t c)
static

Definition at line 92 of file rd_cp.c.

+ Here is the caller graph for this function:

static clib_error_t* rd_cp_init ( vlib_main_t vm)
static

Definition at line 888 of file rd_cp.c.

+ Here is the call graph for this function:

static uword rd_cp_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 618 of file rd_cp.c.

+ Here is the call graph for this function:

static int remove_default_route ( vlib_main_t vm,
default_route_t default_route 
)
static

Definition at line 365 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int remove_slaac_address ( vlib_main_t vm,
slaac_address_t slaac_address 
)
static

Definition at line 342 of file rd_cp.c.

+ Here is the call graph for this function:

static int router_solicitation_start_stop ( u32  sw_if_index,
u8  start 
)
static

Definition at line 193 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void send_msg ( void *  msg)

Definition at line 174 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline int send_msg_and_wait_for_reply ( void *  msg)

Definition at line 183 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int set_address_autoconfig ( u32  sw_if_index,
u8  enable,
u8  install_default_routes 
)
static

Definition at line 729 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_handler ( int  id,
char *  name,
void *  handler 
)
static

Definition at line 108 of file rd_cp.c.

+ Here is the call graph for this function:

static void setup_message_id_table ( api_main_t am)
static

Definition at line 880 of file rd_cp.c.

+ Here is the caller graph for this function:

static void vl_api_ip6_nd_address_autoconfig_t_handler ( vl_api_ip6_nd_address_autoconfig_t mp)
static

Definition at line 855 of file rd_cp.c.

+ Here is the call graph for this function:

static void vl_api_ip6_ra_event_t_handler ( vl_api_ip6_ra_event_t mp)
static

Definition at line 469 of file rd_cp.c.

+ Here is the call graph for this function:

static void vl_api_ip6nd_send_router_solicitation_reply_t_handler ( vl_api_ip6nd_send_router_solicitation_reply_t *  mp)
static

Definition at line 219 of file rd_cp.c.

+ Here is the caller graph for this function:

static void vl_api_ip_add_del_route_reply_t_handler ( vl_api_ip_add_del_route_reply_t *  mp)
static

Definition at line 333 of file rd_cp.c.

static void vl_api_sw_interface_add_del_address_reply_t_handler ( vl_api_sw_interface_add_del_address_reply_t *  mp)
static

Definition at line 294 of file rd_cp.c.

+ Here is the caller graph for this function:

static void vl_api_sw_interface_get_mac_address_reply_t_handler ( vl_api_sw_interface_get_mac_address_reply_t mp)
static

Definition at line 410 of file rd_cp.c.

+ Here is the caller graph for this function:

static void vl_api_sw_interface_ip6_enable_disable_reply_t_handler ( vl_api_sw_interface_ip6_enable_disable_reply_t *  mp)
static

Definition at line 442 of file rd_cp.c.

+ Here is the caller graph for this function:

static void vl_api_want_ip6_ra_events_reply_t_handler ( vl_api_want_ip6_ra_events_reply_t *  mp)
static

Definition at line 250 of file rd_cp.c.

+ Here is the call graph for this function:

static_always_inline int wait_for_reply ( void  )

Definition at line 152 of file rd_cp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t ip6_nd_address_autoconfig_command
static
Initial value:
= {
.path = "ip6 nd address autoconfig",
.short_help = "ip6 nd address autoconfig <interface> [default-route|disable]",
}
static clib_error_t * ip6_nd_address_autoconfig(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: rd_cp.c:797

(constructor) VLIB_CLI_COMMAND (ip6_nd_address_autoconfig_command)

Definition at line 847 of file rd_cp.c.

rd_cp_main_t rd_cp_main

Definition at line 82 of file rd_cp.c.

vlib_node_registration_t rd_cp_process_node
Initial value:
= {
.function = rd_cp_process,
.name = "rd-cp-process",
}
static uword rd_cp_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: rd_cp.c:618

(constructor) VLIB_REGISTER_NODE (rd_cp_process_node)

Definition at line 688 of file rd_cp.c.