aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat_format.c')
-rw-r--r--src/plugins/nat/nat_format.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/plugins/nat/nat_format.c b/src/plugins/nat/nat_format.c
index 8287968e029..e47ba69b167 100644
--- a/src/plugins/nat/nat_format.c
+++ b/src/plugins/nat/nat_format.c
@@ -19,7 +19,6 @@
#include <nat/nat.h>
#include <nat/nat_inlines.h>
-#include <nat/nat_det.h>
uword
unformat_nat_protocol (unformat_input_t * input, va_list * args)
@@ -297,39 +296,6 @@ format_snat_static_map_to_resolve (u8 * s, va_list * args)
return s;
}
-u8 *
-format_det_map_ses (u8 * s, va_list * args)
-{
- snat_det_map_t *det_map = va_arg (*args, snat_det_map_t *);
- ip4_address_t in_addr, out_addr;
- u32 in_offset, out_offset;
- snat_det_session_t *ses = va_arg (*args, snat_det_session_t *);
- u32 *i = va_arg (*args, u32 *);
-
- u32 user_index = *i / SNAT_DET_SES_PER_USER;
- in_addr.as_u32 =
- clib_host_to_net_u32 (clib_net_to_host_u32 (det_map->in_addr.as_u32) +
- user_index);
- in_offset =
- clib_net_to_host_u32 (in_addr.as_u32) -
- clib_net_to_host_u32 (det_map->in_addr.as_u32);
- out_offset = in_offset / det_map->sharing_ratio;
- out_addr.as_u32 =
- clib_host_to_net_u32 (clib_net_to_host_u32 (det_map->out_addr.as_u32) +
- out_offset);
- s =
- format (s,
- "in %U:%d out %U:%d external host %U:%d state: %U expire: %d\n",
- format_ip4_address, &in_addr, clib_net_to_host_u16 (ses->in_port),
- format_ip4_address, &out_addr,
- clib_net_to_host_u16 (ses->out.out_port), format_ip4_address,
- &ses->out.ext_host_addr,
- clib_net_to_host_u16 (ses->out.ext_host_port),
- format_snat_session_state, ses->state, ses->expire);
-
- return s;
-}
-
/*
* fd.io coding-style-patch-verification: ON
*