37 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 44 #define foreach_vpe_api_msg \ 45 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \ 46 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) 64 (
u32 sw_if_index,
int enable_disable)
66 return VNET_API_ERROR_UNIMPLEMENTED;
73 register_vl_api_cop_interface_enable_disable_callback (
void *cb)
81 vl_api_cop_interface_enable_disable_reply_t *rmp;
94 REPLY_MACRO (VL_API_COP_INTERFACE_ENABLE_DISABLE_REPLY);
107 return VNET_API_ERROR_UNIMPLEMENTED;
123 vl_api_cop_whitelist_enable_disable_reply_t *rmp;
136 rv = (*whitelist_enable_disable_callback) (
a);
140 REPLY_MACRO (VL_API_COP_WHITELIST_ENABLE_DISABLE_REPLY);
150 #define vl_msg_name_crc_list 152 #undef vl_msg_name_crc_list 157 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 158 foreach_vl_msg_name_crc_cop;
168 vl_msg_api_set_handlers(VL_API_##N, #n, \ 169 vl_api_##n##_t_handler, \ 171 vl_api_##n##_t_endian, \ 172 vl_api_##n##_t_print, \ 173 sizeof(vl_api_##n##_t), 1); VLIB_API_INIT_FUNCTION(cop_api_hookup)
cop: enable/disable whitelist filtration features on an interface Note: the supplied fib_id must matc...
static void vl_api_cop_whitelist_enable_disable_t_handler(vl_api_cop_whitelist_enable_disable_t *mp)
static clib_error_t * cop_api_hookup(vlib_main_t *vm)
vl_api_interface_index_t sw_if_index
void register_vl_api_cop_whitelist_enable_disable_callback(void *cb)
static void setup_message_id_table(api_main_t *am)
API main structure, used by both vpp and binary API clients.
#define BAD_SW_IF_INDEX_LABEL
cop: enable/disable junk filtration features on an interface
static void vl_api_cop_interface_enable_disable_t_handler(vl_api_cop_interface_enable_disable_t *mp)
static int default_interface_enable_disable_callback(u32 sw_if_index, int enable_disable)
static int(* interface_enable_disable_callback)(u32, int)
#define foreach_vpe_api_msg
static int(* whitelist_enable_disable_callback)(cop_whitelist_enable_disable_args_t *a)=default_whitelist_enable_disable_callback
static int default_whitelist_enable_disable_callback(cop_whitelist_enable_disable_args_t *a)
static api_main_t * vlibapi_get_main(void)
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t sw_if_index
#define VALIDATE_SW_IF_INDEX(mp)