#include <vlib/vlib.h>
#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
#include <vnet/ip/ip.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/ip4_fib.h>
#include <nat/nat.h>
-#include <nat/nat_ipfix_logging.h>
+#include <nat/lib/ipfix_logging.h>
#include <nat/nat_inlines.h>
#include <nat/nat44/inlines.h>
#include <nat/nat_syslog.h>
if (clib_bihash_add_del_8_8 (&tsm->in2out, &s_kv, 0))
nat_elog_warn ("out2in key del failed");
- snat_ipfix_logging_nat44_ses_delete (ctx->thread_index,
- s->in2out.addr.as_u32,
- s->out2in.addr.as_u32,
- s->nat_proto,
- s->in2out.port,
- s->out2in.port,
- s->in2out.fib_index);
+ nat_ipfix_logging_nat44_ses_delete (ctx->thread_index,
+ s->in2out.addr.as_u32,
+ s->out2in.addr.as_u32,
+ s->nat_proto,
+ s->in2out.port,
+ s->out2in.port,
+ s->in2out.fib_index);
nat_syslog_nat44_apmdel (s->user_index, s->in2out.fib_index,
&s->in2out.addr, s->in2out.port,
nat_elog_notice ("out2in key add failed");
/* log NAT event */
- snat_ipfix_logging_nat44_ses_create (thread_index,
- s->in2out.addr.as_u32,
- s->out2in.addr.as_u32,
- s->nat_proto,
- s->in2out.port,
- s->out2in.port, s->in2out.fib_index);
+ nat_ipfix_logging_nat44_ses_create (thread_index,
+ s->in2out.addr.as_u32,
+ s->out2in.addr.as_u32,
+ s->nat_proto,
+ s->in2out.port,
+ s->out2in.port, s->in2out.fib_index);
nat_syslog_nat44_apmadd (s->user_index, s->in2out.fib_index,
&s->in2out.addr, s->in2out.port, &s->out2in.addr,
if (snat_static_mapping_match
(sm, *addr, *port, *fib_index, *proto,
&mapping_addr, &mapping_port, &mapping_fib_index, 1, &is_addr_only,
- 0, 0, 0, &identity_nat))
+ 0, 0, 0, &identity_nat, 0))
{
if (!sm->forwarding_enabled)
{
}
if (snat_static_mapping_match
(sm, addr, port, rx_fib_index0, *proto, mapping_addr, mapping_port,
- mapping_fib_index, 1, &is_addr_only, 0, 0, 0, 0))
+ mapping_fib_index, 1, &is_addr_only, 0, 0, 0, 0, 0))
{
/* Don't NAT packet aimed at the intfc address */
if (is_interface_addr (sm, node, sw_if_index0, ip0->dst_address.as_u32))
(sm, ip0->dst_address,
vnet_buffer (b0)->ip.reass.l4_dst_port, rx_fib_index0,
proto0, &sm_addr0, &sm_port0, &sm_fib_index0, 1, 0, 0, 0,
- 0, &identity_nat0))
+ 0, &identity_nat0, 0))
{
/*
* Send DHCP packets to the ipv4 stack, or we won't
(sm, ip1->dst_address,
vnet_buffer (b1)->ip.reass.l4_dst_port, proto1,
rx_fib_index1, &sm_addr1, &sm_port1, &sm_fib_index1, 1, 0,
- 0, 0, 0, &identity_nat1))
+ 0, 0, 0, &identity_nat1, 0))
{
/*
* Send DHCP packets to the ipv4 stack, or we won't
(sm, ip0->dst_address,
vnet_buffer (b0)->ip.reass.l4_dst_port, rx_fib_index0,
proto0, &sm_addr0, &sm_port0, &sm_fib_index0, 1, 0, 0, 0,
- 0, &identity_nat0))
+ 0, &identity_nat0, 0))
{
/*
* Send DHCP packets to the ipv4 stack, or we won't
if (snat_static_mapping_match
(sm, ip0->dst_address, udp0->dst_port, rx_fib_index0, proto0,
- &sm_addr0, &sm_port0, &sm_fib_index0, 1, 0, 0, 0, 0, 0))
+ &sm_addr0, &sm_port0, &sm_fib_index0, 1, 0, 0, 0, 0, 0, 0))
{
b0->error = node->errors[SNAT_OUT2IN_ERROR_NO_TRANSLATION];
goto trace00;