24 #include <vpp/app/version.h> 40 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 46 #define vl_api_version(n,v) static u32 api_version=(v); 50 #define REPLY_MSG_ID_BASE cm->msg_id_base 55 #define foreach_cdp_plugin_api_msg \ 56 _(CDP_ENABLE_DISABLE, cdp_enable_disable) 87 int enable_disable = 1;
118 .short_help =
"cdp enable | disable",
127 vl_api_cdp_enable_disable_reply_t *rmp;
142 vl_msg_api_set_handlers((VL_API_##N + cm->msg_id_base), \ 144 vl_api_##n##_t_handler, \ 146 vl_api_##n##_t_endian, \ 147 vl_api_##n##_t_print, \ 148 sizeof(vl_api_##n##_t), 1); 155 #define vl_msg_name_crc_list 157 #undef vl_msg_name_crc_list 162 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + cm->msg_id_base); 163 foreach_vl_msg_name_crc_cdp;
176 name =
format (0,
"cdp_%08x%c", api_version, 0);
197 .version = VPP_BUILD_VER,
198 .description =
"Cisco Discovery Protocol (CDP)",
#define foreach_cdp_plugin_api_msg
u32 cdp_process_node_index
static void setup_message_id_table(cdp_main_t *cm, api_main_t *am)
static clib_error_t * cdp_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
static void vl_api_cdp_enable_disable_t_handler(vl_api_cdp_enable_disable_t *mp)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
API main structure, used by both vpp and binary API clients.
void vnet_cdp_create_periodic_process(cdp_main_t *cmp)
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * cdp_plugin_api_hookup(vlib_main_t *vm)
int cdp_enable_disable(cdp_main_t *cm, int enable_disable)
u16 vl_msg_api_get_msg_ids(const char *name, int n)
static clib_error_t * cdp_init(vlib_main_t *vm)