FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
cdp.c File Reference
+ Include dependency graph for cdp.c:

Go to the source code of this file.

Macros

#define vl_typedefs
 
#define vl_endianfun
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define vl_api_version(n, v)   static u32 api_version=(v);
 
#define REPLY_MACRO(t)
 
#define foreach_cdp_plugin_api_msg   _(CDP_ENABLE_DISABLE, cdp_enable_disable)
 
#define vl_msg_name_crc_list
 

Functions

int cdp_enable_disable (cdp_main_t *cm, int enable_disable)
 
static clib_error_tcdp_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void vl_api_cdp_enable_disable_t_handler (vl_api_cdp_enable_disable_t *mp)
 
static clib_error_tcdp_plugin_api_hookup (vlib_main_t *vm)
 
static void setup_message_id_table (cdp_main_t *cm, api_main_t *am)
 
static clib_error_tcdp_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static vlib_cli_command_t cdp_command
 (constructor) VLIB_CLI_COMMAND (cdp_command) More...
 

Macro Definition Documentation

#define foreach_cdp_plugin_api_msg   _(CDP_ENABLE_DISABLE, cdp_enable_disable)

Definition at line 76 of file cdp.c.

#define REPLY_MACRO (   t)
Value:
do { \
if (!q) \
return; \
\
rmp = vl_msg_api_alloc (sizeof (*rmp)); \
rmp->_vl_msg_id = ntohs((t)+cm->msg_id_base); \
rmp->context = mp->context; \
rmp->retval = ntohl(rv); \
vl_msg_api_send_shmem (q, (u8 *)&rmp); \
} while(0);
void * vl_msg_api_alloc(int nbytes)
unsigned char u8
Definition: types.h:56
svm_queue_t unix_shared_memory_queue_t
Definition: queue.h:132
void vl_msg_api_send_shmem(svm_queue_t *q, u8 *elem)
svm_queue_t * vl_api_client_index_to_input_queue(u32 index)
Definition: memory_api.c:759

Definition at line 58 of file cdp.c.

#define vl_api_version (   n,
  v 
)    static u32 api_version=(v);

Definition at line 46 of file cdp.c.

#define vl_endianfun

Definition at line 35 of file cdp.c.

#define vl_msg_name_crc_list

Definition at line 170 of file cdp.c.

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

Definition at line 40 of file cdp.c.

#define vl_printfun

Definition at line 41 of file cdp.c.

#define vl_typedefs

Definition at line 30 of file cdp.c.

Function Documentation

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

Definition at line 98 of file cdp.c.

+ Here is the call graph for this function:

int cdp_enable_disable ( cdp_main_t cm,
int  enable_disable 
)

Definition at line 82 of file cdp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* cdp_init ( vlib_main_t vm)
static

Definition at line 183 of file cdp.c.

+ Here is the call graph for this function:

static clib_error_t* cdp_plugin_api_hookup ( vlib_main_t vm)
static

Definition at line 153 of file cdp.c.

+ Here is the caller graph for this function:

static void setup_message_id_table ( cdp_main_t cm,
api_main_t am 
)
static

Definition at line 175 of file cdp.c.

+ Here is the caller graph for this function:

static void vl_api_cdp_enable_disable_t_handler ( vl_api_cdp_enable_disable_t mp)
static

Definition at line 140 of file cdp.c.

+ Here is the call graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t cdp_command
static
Initial value:
=
{
.path = "cdp",
.short_help = "cdp enable | disable",
.function = cdp_command_fn,
}
static clib_error_t * cdp_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cdp.c:98

(constructor) VLIB_CLI_COMMAND (cdp_command)

Definition at line 130 of file cdp.c.