Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/nat64/nat64clat.h
- This file was copied from sys/netpfil/ipfw/nat64/nat64stl.h.
/*- | /*- | ||||
* Copyright (c) 2015-2016 Yandex LLC | * SPDX-License-Identifier: BSD-2-Clause-FreeBSD | ||||
* Copyright (c) 2015-2016 Andrey V. Elsukov <ae@FreeBSD.org> | * | ||||
* Copyright (c) 2019 Yandex LLC | |||||
* Copyright (c) 2019 Andrey V. Elsukov <ae@FreeBSD.org> | |||||
* Copyright (c) 2019 Boris N. Lytochkin <lytboris@gmail.com> | |||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* | * | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
* notice, this list of conditions and the following disclaimer. | * notice, this list of conditions and the following disclaimer. | ||||
Show All 10 Lines | |||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _IP_FW_NAT64STL_H_ | #ifndef _IP_FW_NAT64CLAT_H_ | ||||
#define _IP_FW_NAT64STL_H_ | #define _IP_FW_NAT64CLAT_H_ | ||||
#include "ip_fw_nat64.h" | #include "ip_fw_nat64.h" | ||||
#include "nat64_translate.h" | #include "nat64_translate.h" | ||||
struct nat64stl_cfg { | struct nat64clat_cfg { | ||||
struct named_object no; | struct named_object no; | ||||
uint16_t map64; /* table with 6to4 mapping */ | |||||
uint16_t map46; /* table with 4to6 mapping */ | |||||
struct nat64_config base; | struct nat64_config base; | ||||
#define NAT64STL_KIDX 0x0100 | #define NAT64CLAT_FLAGSMASK \ | ||||
#define NAT64STL_46T 0x0200 | (NAT64_LOG | NAT64_ALLOW_PRIVATE) /* flags to pass to userland */ | ||||
#define NAT64STL_64T 0x0400 | |||||
#define NAT64STL_FLAGSMASK (NAT64_LOG) /* flags to pass to userland */ | |||||
char name[64]; | char name[64]; | ||||
}; | }; | ||||
VNET_DECLARE(uint16_t, nat64stl_eid); | VNET_DECLARE(uint16_t, nat64clat_eid); | ||||
#define V_nat64stl_eid VNET(nat64stl_eid) | #define V_nat64clat_eid VNET(nat64clat_eid) | ||||
#define IPFW_TLV_NAT64STL_NAME IPFW_TLV_EACTION_NAME(V_nat64stl_eid) | #define IPFW_TLV_NAT64CLAT_NAME IPFW_TLV_EACTION_NAME(V_nat64clat_eid) | ||||
int ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_args *args, | int ipfw_nat64clat(struct ip_fw_chain *chain, struct ip_fw_args *args, | ||||
ipfw_insn *cmd, int *done); | ipfw_insn *cmd, int *done); | ||||
#endif | #endif | ||||