|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #include <pnat/pnat.api_enum.h>
17 #include <pnat/pnat.api_types.h>
25 #include <vpp/app/version.h>
31 #define REPLY_MSG_ID_BASE pm->msg_id_base
46 vl_api_pnat_binding_attach_reply_t *rmp;
51 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
65 vl_api_pnat_binding_detach_reply_t *rmp;
70 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
83 vl_api_pnat_binding_del_reply_t *rmp;
95 #include <pnat/pnat.api.h>
111 vl_api_pnat_bindings_details_t_endian(rmp);
112 rmp->_vl_msg_id = htons(rmp->_vl_msg_id);
132 send_bindings_details(cursor, rp, mp->context);
145 VL_API_PNAT_INTERFACES_DETAILS, rp,
context, ({
153 vl_api_pnat_interfaces_details_t_endian(rmp);
154 rmp->_vl_msg_id = htons(rmp->_vl_msg_id);
175 VL_API_PNAT_INTERFACES_GET_REPLY, pm->
interfaces,
176 ({ send_interfaces_details(cursor, rp, mp->context); }));
181 #include <pnat/pnat.api.c>
197 .version = VPP_BUILD_VER,
198 .description =
"Policy 1:1 NAT",
203 memset(pm, 0,
sizeof(*pm));
#define REPLY_MACRO_END(t)
#define REPLY_MACRO2_END(t, body)
int pnat_binding_attach(u32 sw_if_index, pnat_attachment_point_t attachment, u32 binding_index)
#define clib_memcpy(d, s, n)
int pnat_binding_del(u32 index)
vl_api_interface_index_t sw_if_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void vl_api_pnat_binding_add_t_handler(vl_api_pnat_binding_add_t *mp)
pnat_rewrite_tuple_t rewrite
static void vl_api_pnat_binding_attach_t_handler(vl_api_pnat_binding_attach_t *mp)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_pnat_rewrite_tuple_t rewrite
static void vl_api_pnat_binding_detach_t_handler(vl_api_pnat_binding_detach_t *mp)
vl_api_pnat_match_tuple_t match
static void vl_api_pnat_interfaces_get_t_handler(vl_api_pnat_interfaces_get_t *mp)
clib_error_t * pnat_init(vlib_main_t *vm)
IPv6 shallow virtual reassembly.
IPv4 shallow virtual reassembly.
int pnat_binding_detach(u32 sw_if_index, pnat_attachment_point_t attachment, u32 binding_index)
pnat_translation_t * translations
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
static void vl_api_pnat_binding_del_t_handler(vl_api_pnat_binding_del_t *mp)
#define REPLY_MACRO_DETAILS4(t, rp, context, body)
vl_api_pnat_match_tuple_t match
vl_api_pnat_rewrite_tuple_t rewrite
#define REPLY_AND_DETAILS_MACRO(t, p, body)
vl_api_pnat_mask_t lookup_mask[2]
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
vl_api_pnat_attachment_point_t attachment
vl_api_interface_index_t sw_if_index
vl_api_pnat_attachment_point_t attachment
vl_api_interface_index_t sw_if_index
#define VLIB_INIT_FUNCTION(x)
static void send_interfaces_details(u32 index, vl_api_registration_t *rp, u32 context)
static uword pool_elts(void *v)
Number of active elements in a pool.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
clib_error_t * pnat_plugin_api_hookup(vlib_main_t *vm)
pnat_interface_t * interfaces
int pnat_binding_add(pnat_match_tuple_t *match, pnat_rewrite_tuple_t *rewrite, u32 *index)
static void send_bindings_details(u32 index, vl_api_registration_t *rp, u32 context)
static void vl_api_pnat_bindings_get_t_handler(vl_api_pnat_bindings_get_t *mp)