38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_tcp_api_msg \ 46 _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) 53 vl_api_tcp_configure_src_addresses_reply_t *rmp;
56 ip46_address_t first_address, last_address;
59 vrf_id = clib_net_to_host_u32 (mp->
vrf_id);
66 rv = VNET_API_ERROR_INVALID_VALUE;
72 (vm, &first_address.ip6, &last_address.ip6, vrf_id);
75 (vm, &first_address.ip4, &last_address.ip4, vrf_id);
78 REPLY_MACRO (VL_API_TCP_CONFIGURE_SRC_ADDRESSES_REPLY);
81 #define vl_msg_name_crc_list 82 #include <vnet/tcp/tcp.api.h> 83 #undef vl_msg_name_crc_list 88 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 89 foreach_vl_msg_name_crc_tcp;
99 vl_msg_api_set_handlers(VL_API_##N, #n, \ 100 vl_api_##n##_t_handler, \ 102 vl_api_##n##_t_endian, \ 103 vl_api_##n##_t_print, \ 104 sizeof(vl_api_##n##_t), 1);
static void vl_api_tcp_configure_src_addresses_t_handler(vl_api_tcp_configure_src_addresses_t *mp)
static clib_error_t * tcp_api_hookup(vlib_main_t *vm)
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
void tcp_api_reference(void)
API main structure, used by both vpp and binary API clients.
int tcp_configure_v4_source_address_range(vlib_main_t *vm, ip4_address_t *start, ip4_address_t *end, u32 table_id)
Configure an ipv4 source address range.
#define foreach_tcp_api_msg
static void setup_message_id_table(api_main_t *am)
VLIB_API_INIT_FUNCTION(tcp_api_hookup)
int tcp_configure_v6_source_address_range(vlib_main_t *vm, ip6_address_t *start, ip6_address_t *end, u32 table_id)
Configure an ipv6 source address range.
static vlib_main_t * vlib_get_main(void)
static api_main_t * vlibapi_get_main(void)