Files
vpp/src/plugins/npt66/npt66.h
Ole Troan 6ee3aa41c3 npt66: network prefix translation for ipv6
This is the initial commit of a NPTv6 (RFC6296) implementation for VPP.
It's restricted to a single internal to external binding and runs
as an output/input feature on the egress interface.

Type: feature
Change-Id: I0e3497af97f1ebd99377b84dbf599ecea935ca24
Signed-off-by: Ole Troan <otroan@employees.org>
2023-08-25 09:15:32 +02:00

29 lines
672 B
C

// SPDX-License-Identifier: Apache-2.0
// Copyright(c) 2023 Cisco Systems, Inc.
#include <vlib/vlib.h>
#include <vnet/ip/ip6_packet.h>
typedef struct
{
u32 sw_if_index;
ip6_address_t internal;
ip6_address_t external;
u8 internal_plen;
u8 external_plen;
uword delta;
} npt66_binding_t;
typedef struct
{
u32 *interface_by_sw_if_index;
npt66_binding_t *bindings;
u16 msg_id_base;
} npt66_main_t;
extern npt66_main_t npt66_main;
int npt66_binding_add_del (u32 sw_if_index, ip6_address_t *internal,
int internal_plen, ip6_address_t *external,
int external_plen, bool is_add);
npt66_binding_t *npt66_interface_by_sw_if_index (u32 sw_if_index);