1*5c04f73eSAndrey V. Elsukov /*- 2*5c04f73eSAndrey V. Elsukov * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3*5c04f73eSAndrey V. Elsukov * 4*5c04f73eSAndrey V. Elsukov * Copyright (c) 2019 Yandex LLC 5*5c04f73eSAndrey V. Elsukov * Copyright (c) 2019 Andrey V. Elsukov <ae@FreeBSD.org> 6*5c04f73eSAndrey V. Elsukov * Copyright (c) 2019 Boris N. Lytochkin <lytboris@gmail.com> 7*5c04f73eSAndrey V. Elsukov * 8*5c04f73eSAndrey V. Elsukov * Redistribution and use in source and binary forms, with or without 9*5c04f73eSAndrey V. Elsukov * modification, are permitted provided that the following conditions 10*5c04f73eSAndrey V. Elsukov * are met: 11*5c04f73eSAndrey V. Elsukov * 12*5c04f73eSAndrey V. Elsukov * 1. Redistributions of source code must retain the above copyright 13*5c04f73eSAndrey V. Elsukov * notice, this list of conditions and the following disclaimer. 14*5c04f73eSAndrey V. Elsukov * 2. Redistributions in binary form must reproduce the above copyright 15*5c04f73eSAndrey V. Elsukov * notice, this list of conditions and the following disclaimer in the 16*5c04f73eSAndrey V. Elsukov * documentation and/or other materials provided with the distribution. 17*5c04f73eSAndrey V. Elsukov * 18*5c04f73eSAndrey V. Elsukov * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19*5c04f73eSAndrey V. Elsukov * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20*5c04f73eSAndrey V. Elsukov * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21*5c04f73eSAndrey V. Elsukov * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22*5c04f73eSAndrey V. Elsukov * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23*5c04f73eSAndrey V. Elsukov * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24*5c04f73eSAndrey V. Elsukov * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25*5c04f73eSAndrey V. Elsukov * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26*5c04f73eSAndrey V. Elsukov * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27*5c04f73eSAndrey V. Elsukov * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28*5c04f73eSAndrey V. Elsukov * 29*5c04f73eSAndrey V. Elsukov * $FreeBSD$ 30*5c04f73eSAndrey V. Elsukov */ 31*5c04f73eSAndrey V. Elsukov 32*5c04f73eSAndrey V. Elsukov #ifndef _IP_FW_NAT64CLAT_H_ 33*5c04f73eSAndrey V. Elsukov #define _IP_FW_NAT64CLAT_H_ 34*5c04f73eSAndrey V. Elsukov 35*5c04f73eSAndrey V. Elsukov #include "ip_fw_nat64.h" 36*5c04f73eSAndrey V. Elsukov #include "nat64_translate.h" 37*5c04f73eSAndrey V. Elsukov 38*5c04f73eSAndrey V. Elsukov struct nat64clat_cfg { 39*5c04f73eSAndrey V. Elsukov struct named_object no; 40*5c04f73eSAndrey V. Elsukov 41*5c04f73eSAndrey V. Elsukov struct nat64_config base; 42*5c04f73eSAndrey V. Elsukov #define NAT64CLAT_FLAGSMASK \ 43*5c04f73eSAndrey V. Elsukov (NAT64_LOG | NAT64_ALLOW_PRIVATE) /* flags to pass to userland */ 44*5c04f73eSAndrey V. Elsukov char name[64]; 45*5c04f73eSAndrey V. Elsukov }; 46*5c04f73eSAndrey V. Elsukov 47*5c04f73eSAndrey V. Elsukov VNET_DECLARE(uint16_t, nat64clat_eid); 48*5c04f73eSAndrey V. Elsukov #define V_nat64clat_eid VNET(nat64clat_eid) 49*5c04f73eSAndrey V. Elsukov #define IPFW_TLV_NAT64CLAT_NAME IPFW_TLV_EACTION_NAME(V_nat64clat_eid) 50*5c04f73eSAndrey V. Elsukov 51*5c04f73eSAndrey V. Elsukov int ipfw_nat64clat(struct ip_fw_chain *chain, struct ip_fw_args *args, 52*5c04f73eSAndrey V. Elsukov ipfw_insn *cmd, int *done); 53*5c04f73eSAndrey V. Elsukov 54*5c04f73eSAndrey V. Elsukov #endif 55