46 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 52 #define vl_api_version(n,v) static u32 api_version=(v); 64 #define REPLY_MACRO(t) \ 66 unix_shared_memory_queue_t * q = \ 67 vl_api_client_index_to_input_queue (mp->client_index); \ 71 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 72 rmp->_vl_msg_id = ntohs((t)+sm->msg_id_base); \ 73 rmp->context = mp->context; \ 74 rmp->retval = ntohl(rv); \ 76 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 82 #define foreach_ioam_export_plugin_api_msg \ 83 _(IOAM_EXPORT_IP6_ENABLE_DISABLE, ioam_export_ip6_enable_disable) 157 REPLY_MACRO (VL_API_IOAM_EXPORT_IP6_ENABLE_DISABLE_REPLY);
166 vl_msg_api_set_handlers((VL_API_##N + sm->msg_id_base), \ 168 vl_api_##n##_t_handler, \ 170 vl_api_##n##_t_endian, \ 171 vl_api_##n##_t_print, \ 172 sizeof(vl_api_##n##_t), 1); 197 else if (
unformat (input,
"disable"))
203 if (collector.
as_u32 == 0)
226 .path =
"set ioam export ipfix",.short_help =
227 "set ioam export ipfix collector <ip4-address> src <ip4-address>",.
240 name =
format (0,
"ioam_export_%08x%c", api_version, 0);
void ip6_hbh_set_next_override(uword next)
u32 export_process_node_index
static f64 vlib_time_now(vlib_main_t *vm)
vlib_node_registration_t export_node
(constructor) VLIB_REGISTER_NODE (export_node)
ip4_address_t ipfix_collector
int ioam_export_ip6_enable_disable(ioam_export_main_t *em, u8 is_disable, ip4_address_t *collector_address, ip4_address_t *src_address)
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
static clib_error_t * set_ioam_export_ipfix_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
ethernet_main_t * ethernet_main
#define VLIB_INIT_FUNCTION(x)
#define foreach_ioam_export_plugin_api_msg
static int ioam_export_header_create(ip4_address_t *collector_address, ip4_address_t *src_address)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
static clib_error_t * ioam_export_init(vlib_main_t *vm)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * ioam_export_plugin_api_hookup(vlib_main_t *vm)
#define vec_free(V)
Free vector's memory (no header).
ip4_address_t src_address
static void ioam_export_header_cleanup(ip4_address_t *collector_address, ip4_address_t *src_address)
clib_error_t * vlib_plugin_register(vlib_main_t *vm, vnet_plugin_handoff_t *h, int from_early_init)
#define VLIB_CLI_COMMAND(x,...)
ethernet_main_t * ethernet_main
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static int ioam_export_thread_buffer_init(vlib_main_t *vm)
static void vl_api_ioam_export_ip6_enable_disable_t_handler(vl_api_ioam_export_ip6_enable_disable_t *mp)
static void ioam_export_thread_buffer_free(void)
u16 vl_msg_api_get_msg_ids(char *name, int n)
#define clib_error_return(e, args...)
ioam_export_main_t ioam_export_main