FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
api.c File Reference
+ Include dependency graph for api.c:

Go to the source code of this file.

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define foreach_vpe_api_msg
 
#define QUOTE_(x)   #x
 
#define QUOTE(x)   QUOTE_(x)
 
#define BOUNCE_HANDLER(nn)
 
#define vl_msg_name_crc_list
 
#define vl_api_version_tuple(n, mj, mi, p)   vl_msg_api_add_version (am, #n, mj, mi, p);
 

Enumerations

enum  resolve_t { RESOLVE_IP4_ADD_DEL_ROUTE = 1, RESOLVE_IP6_ADD_DEL_ROUTE }
 

Functions

static clib_error_tmemclnt_delete_callback (u32 client_index)
 
 VL_MSG_API_REAPER_FUNCTION (memclnt_delete_callback)
 
static void vl_api_control_ping_t_handler (vl_api_control_ping_t *mp)
 
static void shmem_cli_output (uword arg, u8 *buffer, uword buffer_bytes)
 
static void vl_api_cli_t_handler (vl_api_cli_t *mp)
 
static void inband_cli_output (uword arg, u8 *buffer, uword buffer_bytes)
 
static void vl_api_cli_inband_t_handler (vl_api_cli_inband_t *mp)
 
static void vl_api_show_version_t_handler (vl_api_show_version_t *mp)
 
static void vl_api_get_node_index_t_handler (vl_api_get_node_index_t *mp)
 
static void vl_api_get_next_index_t_handler (vl_api_get_next_index_t *mp)
 
static void vl_api_add_node_next_t_handler (vl_api_add_node_next_t *mp)
 
static void vl_api_get_node_graph_t_handler (vl_api_get_node_graph_t *mp)
 
static void setup_message_id_table (api_main_t *am)
 
static clib_error_tvpe_api_hookup (vlib_main_t *vm)
 
 VLIB_API_INIT_FUNCTION (vpe_api_hookup)
 
static clib_error_tvpe_api_init (vlib_main_t *vm)
 
static clib_error_tapi_segment_config (vlib_main_t *vm, unformat_input_t *input)
 
void * get_unformat_vnet_sw_interface (void)
 
static u8format_arp_event (u8 *s, va_list *args)
 
static u8format_nd_event (u8 *s, va_list *args)
 
static clib_error_tshow_ip_arp_nd_events_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

vpe_api_main_t vpe_api_main
 
static vlib_cli_command_t show_ip_arp_nd_events
 (constructor) VLIB_CLI_COMMAND (show_ip_arp_nd_events) More...
 

Macro Definition Documentation

#define BOUNCE_HANDLER (   nn)
Value:
static void vl_api_##nn##_t_handler ( \
vl_api_##nn##_t *mp) \
{ \
vpe_client_registration_t *reg; \
vpe_api_main_t * vam = &vpe_api_main; \
\
/* One registration only... */ \
pool_foreach(reg, vam->nn##_registrations, \
({ \
q = vl_api_client_index_to_input_queue (reg->client_index); \
if (q) { \
/* \
* If the queue is stuffed, turf the msg and complain \
* It's unlikely that the intended recipient is \
* alive; avoid deadlock at all costs. \
*/ \
if (q->cursize == q->maxsize) { \
clib_warning ("ERROR: receiver queue full, drop msg"); \
vl_msg_api_free (mp); \
return; \
} \
vl_msg_api_send_shmem (q, (u8 *)&mp); \
return; \
} \
})); \
}
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:438
void vl_msg_api_free(void *)
vpe_api_main_t vpe_api_main
Definition: interface_api.c:49
struct _unix_shared_memory_queue unix_shared_memory_queue_t

Definition at line 395 of file api.c.

#define foreach_vpe_api_msg
Value:
_(CONTROL_PING, control_ping) \
_(CLI, cli) \
_(CLI_INBAND, cli_inband) \
_(GET_NODE_INDEX, get_node_index) \
_(ADD_NODE_NEXT, add_node_next) \
_(SHOW_VERSION, show_version) \
_(GET_NODE_GRAPH, get_node_graph) \
_(GET_NEXT_INDEX, get_next_index) \

Definition at line 75 of file api.c.

#define QUOTE (   x)    QUOTE_(x)

Definition at line 86 of file api.c.

#define QUOTE_ (   x)    #x

Definition at line 85 of file api.c.

#define vl_api_version_tuple (   n,
  mj,
  mi,
 
)    vl_msg_api_add_version (am, #n, mj, mi, p);
#define vl_endianfun   /* define message structures */

Definition at line 66 of file api.c.

#define vl_msg_name_crc_list

Definition at line 689 of file api.c.

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 70 of file api.c.

#define vl_printfun

Definition at line 71 of file api.c.

#define vl_typedefs   /* define message structures */

Definition at line 63 of file api.c.

Enumeration Type Documentation

enum resolve_t
Enumerator
RESOLVE_IP4_ADD_DEL_ROUTE 
RESOLVE_IP6_ADD_DEL_ROUTE 

Definition at line 87 of file api.c.

Function Documentation

static clib_error_t* api_segment_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 494 of file api.c.

+ Here is the call graph for this function:

static u8* format_arp_event ( u8 s,
va_list *  args 
)
static

Definition at line 618 of file api.c.

+ Here is the call graph for this function:

static u8* format_nd_event ( u8 s,
va_list *  args 
)
static

Definition at line 628 of file api.c.

+ Here is the call graph for this function:

void* get_unformat_vnet_sw_interface ( void  )

Definition at line 612 of file api.c.

static void inband_cli_output ( uword  arg,
u8 buffer,
uword  buffer_bytes 
)
static

Definition at line 198 of file api.c.

+ Here is the caller graph for this function:

static clib_error_t* memclnt_delete_callback ( u32  client_index)
static

Definition at line 97 of file api.c.

+ Here is the call graph for this function:

static void setup_message_id_table ( api_main_t am)
static

Definition at line 694 of file api.c.

+ Here is the caller graph for this function:

static void shmem_cli_output ( uword  arg,
u8 buffer,
uword  buffer_bytes 
)
static

Definition at line 135 of file api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 638 of file api.c.

+ Here is the call graph for this function:

static void vl_api_add_node_next_t_handler ( vl_api_add_node_next_t mp)
static

Definition at line 327 of file api.c.

+ Here is the call graph for this function:

static void vl_api_cli_inband_t_handler ( vl_api_cli_inband_t mp)
static

Definition at line 210 of file api.c.

+ Here is the call graph for this function:

static void vl_api_cli_t_handler ( vl_api_cli_t mp)
static

Definition at line 162 of file api.c.

+ Here is the call graph for this function:

static void vl_api_control_ping_t_handler ( vl_api_control_ping_t mp)
static

Definition at line 121 of file api.c.

static void vl_api_get_next_index_t_handler ( vl_api_get_next_index_t mp)
static

Definition at line 280 of file api.c.

+ Here is the call graph for this function:

static void vl_api_get_node_graph_t_handler ( vl_api_get_node_graph_t mp)
static

Definition at line 360 of file api.c.

+ Here is the call graph for this function:

static void vl_api_get_node_index_t_handler ( vl_api_get_node_index_t mp)
static

Definition at line 256 of file api.c.

+ Here is the call graph for this function:

static void vl_api_show_version_t_handler ( vl_api_show_version_t mp)
static

Definition at line 233 of file api.c.

+ Here is the call graph for this function:

VL_MSG_API_REAPER_FUNCTION ( memclnt_delete_callback  )

+ Here is the caller graph for this function:

VLIB_API_INIT_FUNCTION ( vpe_api_hookup  )

+ Here is the caller graph for this function:

static clib_error_t* vpe_api_hookup ( vlib_main_t vm)
static

Definition at line 435 of file api.c.

+ Here is the call graph for this function:

static clib_error_t* vpe_api_init ( vlib_main_t vm)
static

Definition at line 473 of file api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t show_ip_arp_nd_events
static
Initial value:
= {
.path = "show arp-nd-event registrations",
.short_help = "Show ip4 arp and ip6 nd event registrations",
}
static clib_error_t * show_ip_arp_nd_events_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: api.c:638

(constructor) VLIB_CLI_COMMAND (show_ip_arp_nd_events)

Definition at line 682 of file api.c.

vpe_api_main_t vpe_api_main

Definition at line 49 of file interface_api.c.