34 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 40 #define foreach_oam_api_msg \ 41 _(WANT_OAM_EVENTS, want_oam_events) \ 42 _(OAM_ADD_DEL, oam_add_del) 57 vl_reg = vl_api_client_index_to_registration (reg->client_index);
60 mp = vl_msg_api_alloc (sizeof (*mp));
61 mp->_vl_msg_id = ntohs (VL_API_OAM_EVENT);
62 clib_memcpy (mp->dst_address, &t->dst_address,
63 sizeof (mp->dst_address));
65 vl_api_send_msg (vl_reg, (u8 *)mp);
74 vl_api_oam_add_del_reply_t *rmp;
84 #define vl_msg_name_crc_list 85 #include <vpp/oam/oam.api.h> 86 #undef vl_msg_name_crc_list 91 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 92 foreach_vl_msg_name_crc_oam;
102 vl_msg_api_set_handlers(VL_API_##N, #n, \ 103 vl_api_##n##_t_handler, \ 105 vl_api_##n##_t_endian, \ 106 vl_api_##n##_t_print, \ 107 sizeof(vl_api_##n##_t), 1);
static void setup_message_id_table(api_main_t *am)
void send_oam_event(oam_target_t *t)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
VLIB_API_INIT_FUNCTION(oam_api_hookup)
pub_sub_handler(oam_events, OAM_EVENTS)
API main structure, used by both vpp and binary API clients.
An API client registration, only in vpp/vlib.
static clib_error_t * oam_api_hookup(vlib_main_t *vm)
int vpe_oam_add_del_target(ip4_address_t *src_address, ip4_address_t *dst_address, u32 fib_id, int is_add)
OAM add / del target request.
static void vl_api_oam_add_del_t_handler(vl_api_oam_add_del_t *mp)
#define foreach_oam_api_msg
vpe_api_main_t vpe_api_main