35 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 42 #define foreach_feature_api_msg \ 43 _(FEATURE_ENABLE_DISABLE, feature_enable_disable) 48 vl_api_feature_enable_disable_reply_t *rmp;
61 (
const char *) feature_name);
63 rv = VNET_API_ERROR_INVALID_VALUE;
69 if (reg->enable_disable_cb)
70 error = reg->enable_disable_cb (sw_if_index, mp->
enable);
73 (
const char *) feature_name,
74 sw_if_index, mp->
enable, 0, 0);
78 rv = VNET_API_ERROR_CANNOT_ENABLE_DISABLE_FEATURE;
90 #define vl_msg_name_crc_list 91 #include <vnet/feature/feature.api.h> 92 #undef vl_msg_name_crc_list 97 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 98 foreach_vl_msg_name_crc_feature;
108 vl_msg_api_set_handlers(VL_API_##N, #n, \ 109 vl_api_##n##_t_handler, \ 111 vl_api_##n##_t_endian, \ 112 vl_api_##n##_t_print, \ 113 sizeof(vl_api_##n##_t), 1);
#define vec_terminate_c_string(V)
(If necessary) NULL terminate a vector containing a c-string.
vnet_feature_registration_t * vnet_get_feature_reg(const char *arc_name, const char *node_name)
#define foreach_feature_api_msg
static void vl_api_feature_enable_disable_t_handler(vl_api_feature_enable_disable_t *mp)
VLIB_API_INIT_FUNCTION(feature_api_hookup)
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
#define vec_free(V)
Free vector's memory (no header).
Feature path enable/disable request.
static clib_error_t * feature_api_hookup(vlib_main_t *vm)
#define clib_error_report(e)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
#define VALIDATE_SW_IF_INDEX(mp)
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object