21 #include <nat/dslite/dslite.api_enum.h> 22 #include <nat/dslite/dslite.api_types.h> 27 #define REPLY_MSG_ID_BASE dm->msg_id_base 33 vl_api_dslite_set_aftr_addr_reply_t *rmp;
36 ip6_address_t ip6_addr;
39 memcpy (&ip6_addr.as_u8, mp->
ip6_addr, 16);
68 vl_api_dslite_set_b4_addr_reply_t *rmp;
71 ip6_address_t ip6_addr;
74 memcpy (&ip6_addr.as_u8, mp->
ip6_addr, 16);
104 vl_api_dslite_add_del_pool_addr_range_reply_t *rmp;
108 u32 start_host_order, end_host_order;
113 start_host_order = clib_host_to_net_u32 (tmp[0]);
115 end_host_order = clib_host_to_net_u32 (tmp[0]);
120 count = (end_host_order - start_host_order) + 1;
125 REPLY_MACRO (VL_API_DSLITE_ADD_DEL_POOL_ADDR_RANGE_REPLY);
167 #include <nat/dslite/dslite.api.c> static void vl_api_dslite_get_aftr_addr_t_handler(vl_api_dslite_get_aftr_addr_t *mp)
Set AFTR IPv6 and IPv4 addresses.
ip4_address_t aftr_ip4_addr
#define REPLY_MACRO2(t, body)
vl_api_ip4_address_t ip4_addr
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Add/delete address range to DS-Lite pool.
static void vl_api_dslite_get_b4_addr_t_handler(vl_api_dslite_get_b4_addr_t *mp)
void * vl_msg_api_alloc(int nbytes)
vl_api_ip4_address_t start_addr
static void vl_api_dslite_add_del_pool_addr_range_t_handler(vl_api_dslite_add_del_pool_addr_range_t *mp)
#define clib_memcpy(d, s, n)
vl_api_ip4_address_t ip4_addr
Response to get AFTR IPv6 and IPv4 addresses.
ip6_address_t b4_ip6_addr
Get B4 IPv6 and IPv4 addresses.
static void vl_api_dslite_address_dump_t_handler(vl_api_dslite_address_dump_t *mp)
int dslite_set_b4_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
static void vl_api_dslite_set_b4_addr_t_handler(vl_api_dslite_set_b4_addr_t *mp)
clib_error_t * dslite_api_hookup(vlib_main_t *vm)
nat_ip4_pool_addr_t * pool_addr
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
ip6_address_t aftr_ip6_addr
vl_api_ip4_address_t ip4_addr
vl_api_ip4_address_t ip_address
ip4_address_t b4_ip4_addr
static void vl_api_dslite_set_aftr_addr_t_handler(vl_api_dslite_set_aftr_addr_t *mp)
dslite_main_t dslite_main
vl_api_ip6_address_t ip6_addr
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static void send_dslite_address_details(nat_ip4_pool_addr_t *a, vl_api_registration_t *reg, u32 context)
vl_api_ip4_address_t end_addr
vl_api_ip6_address_t ip6_addr
DS-Lite address details response.
vl_api_ip6_address_t ip6_addr
Set B4 IPv6 and IPv4 addresses.
vl_api_ip6_address_t ip6_addr
vl_api_ip4_address_t ip4_addr
int dslite_set_aftr_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
int dslite_set_b4_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
#define vec_foreach(var, vec)
Vector iterator.
int nat_add_del_ip4_pool_addrs(nat_ip4_pool_t *pool, ip4_address_t addr, u32 count, u8 is_add, void *opaque)
Response to get B4 IPv6 and IPv4 addresses.
Get AFTR IPv6 and IPv4 addresses.
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)