33 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 41 #define foreach_vpe_api_msg \ 42 _(PIPE_CREATE, pipe_create) \ 43 _(PIPE_DELETE, pipe_delete) \ 44 _(PIPE_DUMP, pipe_dump) 50 u32 parent_sw_if_index;
51 u32 pipe_sw_if_index[2];
57 &parent_sw_if_index, pipe_sw_if_index);
72 vl_api_pipe_delete_reply_t *rmp;
88 u32 pipe_sw_if_index[2],
u32 instance,
void *args)
97 mp->_vl_msg_id = ntohs (VL_API_PIPE_DETAILS);
134 #define vl_msg_name_crc_list 135 #include <vnet/devices/pipe/pipe.api.h> 136 #undef vl_msg_name_crc_list 141 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 142 foreach_vl_msg_name_crc_pipe;
152 vl_msg_api_set_handlers(VL_API_##N, #n, \ 153 vl_api_##n##_t_handler, \ 155 vl_api_##n##_t_endian, \ 156 vl_api_##n##_t_print, \ 157 sizeof(vl_api_##n##_t), 1);
#define REPLY_MACRO2(t, body)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void vl_api_pipe_delete_t_handler(vl_api_pipe_delete_t *mp)
void * vl_msg_api_alloc(int nbytes)
#define foreach_vpe_api_msg
enum walk_rc_t_ walk_rc_t
Walk return code.
static void vl_api_pipe_dump_t_handler(vl_api_pipe_dump_t *mp)
void pipe_walk(pipe_cb_fn_t fn, void *ctx)
Walk all the of pipe interfaces.
Reply for pipe dump request.
API main structure, used by both vpp and binary API clients.
An API client registration, only in vpp/vlib.
static void vl_api_pipe_create_t_handler(vl_api_pipe_create_t *mp)
int vnet_delete_pipe_interface(u32 sw_if_index)
Dump pipe interfaces request.
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
struct pipe_dump_walk_t_ pipe_dump_walk_t
Initialize a new pipe interface with the given paramters.
Reply for pipe create reply.
int vnet_create_pipe_interface(u8 is_specified, u32 user_instance, u32 *parent_sw_if_index, u32 pipe_sw_if_index[2])
Create a new pipe interface.
vl_api_registration_t * reg
static walk_rc_t pipe_send_details(u32 parent_sw_if_index, u32 pipe_sw_if_index[2], u32 instance, void *args)
static clib_error_t * pipe_api_hookup(vlib_main_t *vm)
static void setup_message_id_table(api_main_t *am)
VLIB_API_INIT_FUNCTION(pipe_api_hookup)
vpe_api_main_t vpe_api_main