1304046Sae/*- 2346211Sae * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3304046Sae * 4346211Sae * Copyright (c) 2015-2019 Yandex LLC 5346211Sae * Copyright (c) 2015-2019 Andrey V. Elsukov <ae@FreeBSD.org> 6346211Sae * 7304046Sae * Redistribution and use in source and binary forms, with or without 8304046Sae * modification, are permitted provided that the following conditions 9304046Sae * are met: 10304046Sae * 11304046Sae * 1. Redistributions of source code must retain the above copyright 12304046Sae * notice, this list of conditions and the following disclaimer. 13304046Sae * 2. Redistributions in binary form must reproduce the above copyright 14304046Sae * notice, this list of conditions and the following disclaimer in the 15304046Sae * documentation and/or other materials provided with the distribution. 16304046Sae * 17304046Sae * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18304046Sae * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19304046Sae * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20304046Sae * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21304046Sae * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22304046Sae * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23304046Sae * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24304046Sae * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25304046Sae * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26304046Sae * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27304046Sae * 28304046Sae * $FreeBSD: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h 346212 2019-04-14 12:39:09Z ae $ 29304046Sae */ 30304046Sae 31304046Sae#ifndef _IP_FW_NAT64_H_ 32304046Sae#define _IP_FW_NAT64_H_ 33304046Sae 34304046Sae#define DPRINTF(mask, fmt, ...) \ 35334836Sae if (V_nat64_debug & (mask)) \ 36304046Sae printf("NAT64: %s: " fmt "\n", __func__, ## __VA_ARGS__) 37304046Sae#define DP_GENERIC 0x0001 38304046Sae#define DP_OBJ 0x0002 39304046Sae#define DP_JQUEUE 0x0004 40304046Sae#define DP_STATE 0x0008 41304046Sae#define DP_DROPS 0x0010 42304046Sae#define DP_ALL 0xFFFF 43304046Sae 44334836SaeVNET_DECLARE(int, nat64_debug); 45334836Sae#define V_nat64_debug VNET(nat64_debug) 46334836Sae 47304046Sae#if 0 48304046Sae#define NAT64NOINLINE __noinline 49304046Sae#else 50304046Sae#define NAT64NOINLINE 51304046Sae#endif 52304046Sae 53334836Saeint nat64stl_init(struct ip_fw_chain *ch, int first); 54334836Saevoid nat64stl_uninit(struct ip_fw_chain *ch, int last); 55334836Saeint nat64lsn_init(struct ip_fw_chain *ch, int first); 56334836Saevoid nat64lsn_uninit(struct ip_fw_chain *ch, int last); 57346212Saeint nat64clat_init(struct ip_fw_chain *ch, int first); 58346212Saevoid nat64clat_uninit(struct ip_fw_chain *ch, int last); 59304046Sae 60334836Sae#endif /* _IP_FW_NAT64_H_ */ 61