37 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 42 #define vl_api_version(n,v) static u32 api_version=(v); 46 #define REPLY_MSG_ID_BASE sctp_main.msg_id_base 49 #define foreach_sctp_plugin_api_msg \ 50 _(SCTP_ADD_SRC_DST_CONNECTION, sctp_add_src_dst_connection) \ 51 _(SCTP_DEL_SRC_DST_CONNECTION, sctp_del_src_dst_connection) \ 52 _(SCTP_CONFIG, sctp_config) 59 vl_api_sctp_add_src_dst_connection_reply_t *rmp;
71 REPLY_MACRO (VL_API_SCTP_ADD_SRC_DST_CONNECTION_REPLY);
78 vl_api_sctp_del_src_dst_connection_reply_t *rmp;
88 REPLY_MACRO (VL_API_SCTP_ADD_SRC_DST_CONNECTION_REPLY);
95 vl_api_sctp_config_reply_t *rmp;
105 #define vl_msg_name_crc_list 107 #undef vl_msg_name_crc_list 112 #define _(id,n,crc) \ 113 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + sm->msg_id_base); 114 foreach_vl_msg_name_crc_sctp;
126 name =
format (0,
"sctp_%08x%c", api_version, 0);
133 vl_msg_api_set_handlers((VL_API_##N + sm->msg_id_base), \ 135 vl_api_##n##_t_handler, \ 137 vl_api_##n##_t_endian, \ 138 vl_api_##n##_t_print, \ 139 sizeof(vl_api_##n##_t), 1); struct _sctp_main sctp_main_t
static void vl_api_sctp_add_src_dst_connection_t_handler(vl_api_sctp_add_src_dst_connection_t *mp)
clib_error_t * sctp_plugin_api_hookup(vlib_main_t *vm)
#define foreach_sctp_plugin_api_msg
struct _sctp_user_configuration sctp_user_configuration_t
u8 sctp_configure(sctp_user_configuration_t config)
u8 sctp_sub_connection_add_ip4(vlib_main_t *vm, ip4_address_t *lcl_addr, ip4_address_t *rmt_addr)
static void setup_message_id_table(sctp_main_t *sm, api_main_t *am)
API main structure, used by both vpp and binary API clients.
u8 sctp_sub_connection_del_ip4(ip4_address_t *lcl_addr, ip4_address_t *rmt_addr)
#define vec_free(V)
Free vector's memory (no header).
static void vl_api_sctp_config_t_handler(vl_api_sctp_config_t *mp)
static void vl_api_sctp_del_src_dst_connection_t_handler(vl_api_sctp_del_src_dst_connection_t *mp)
static vlib_main_t * vlib_get_main(void)
u8 sctp_sub_connection_del_ip6(ip6_address_t *lcl_addr, ip6_address_t *rmt_addr)
u8 sctp_sub_connection_add_ip6(vlib_main_t *vm, ip6_address_t *lcl_addr, ip6_address_t *rmt_addr)
Configure SCTP source addresses, for active-open SCTP sessions.
u16 vl_msg_api_get_msg_ids(const char *name, int n)