summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_api.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-02-25 11:01:41 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-02-26 01:55:07 +0000
commit27647a27c7b1e800547e3a3ea97b099b25618177 (patch)
tree9d5a9cb030eb3e1f6616d5dd5ce9944ec6811c68 /src/plugins/cnat/cnat_api.c
parentb80d67ca43e13305734aebf7a493bb6fbb8db31e (diff)
cnat: fixes & prepare maglev
Notable changes: - ip[46]-cnat-snat is renamed to cnat-snat-ip[46] - indent fixes - common trace primitives - bihash is now 40_56 with alias Type: refactor Change-Id: I0a82cfe3b40efd96473e51061d7135ffe412ddfc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat_api.c')
-rw-r--r--src/plugins/cnat/cnat_api.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/cnat/cnat_api.c b/src/plugins/cnat/cnat_api.c
index c215caae86f..1c6ef7b6cf4 100644
--- a/src/plugins/cnat/cnat_api.c
+++ b/src/plugins/cnat/cnat_api.c
@@ -124,12 +124,10 @@ vl_api_cnat_translation_update_t_handler (vl_api_cnat_translation_update_t
vec_free (paths);
done:
- /* *INDENT-OFF* */
REPLY_MACRO2 (VL_API_CNAT_TRANSLATION_UPDATE_REPLY,
({
rmp->id = htonl (id);
}));
- /* *INDENT-ON* */
}
static void
@@ -246,6 +244,7 @@ cnat_session_send_details (const cnat_session_t * session, void *args)
cnat_endpoint_encode (&ep, &mp->session.dst);
mp->session.ip_proto = ip_proto_encode (session->key.cs_proto);
+ mp->session.location = session->key.cs_loc;
vl_api_send_msg (ctx->rp, (u8 *) mp);
@@ -289,14 +288,12 @@ vl_api_cnat_get_snat_addresses_t_handler (vl_api_cnat_get_snat_addresses_t
vl_api_cnat_get_snat_addresses_reply_t *rmp;
int rv = 0;
- /* *INDENT-OFF* */
REPLY_MACRO2 (VL_API_CNAT_GET_SNAT_ADDRESSES_REPLY,
({
ip6_address_encode (&ip_addr_v6(&cnat_main.snat_ip6.ce_ip), rmp->snat_ip6);
ip4_address_encode (&ip_addr_v4(&cnat_main.snat_ip4.ce_ip), rmp->snat_ip4);
rmp->sw_if_index = clib_host_to_net_u32 (cnat_main.snat_ip6.ce_sw_if_index);
}));
- /* *INDENT-ON* */
}
static void
@@ -347,12 +344,10 @@ cnat_api_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (cnat_api_init);
-/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
.description = "CNat Translate",
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON