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) 81 int enable_disable = 1;
112 .short_help =
"cdp enable | disable",
121 vl_api_cdp_enable_disable_reply_t *rmp;
136 vl_msg_api_set_handlers((VL_API_##N + cm->msg_id_base), \ 138 vl_api_##n##_t_handler, \ 140 vl_api_##n##_t_endian, \ 141 vl_api_##n##_t_print, \ 142 sizeof(vl_api_##n##_t), 1); 149 #define vl_msg_name_crc_list 151 #undef vl_msg_name_crc_list 156 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + cm->msg_id_base); 157 foreach_vl_msg_name_crc_cdp;
170 name =
format (0,
"cdp_%08x%c", api_version, 0);
191 .version = VPP_BUILD_VER,
#define foreach_cdp_plugin_api_msg
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.
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
vlib_node_registration_t cdp_process_node
(constructor) VLIB_REGISTER_NODE (cdp_process_node)
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)