1303012Sae/*- 2303012Sae * Copyright (c) 2016 Yandex LLC 3303012Sae * Copyright (c) 2016 Andrey V. Elsukov <ae@FreeBSD.org> 4303012Sae * All rights reserved. 5303012Sae * 6303012Sae * Redistribution and use in source and binary forms, with or without 7303012Sae * modification, are permitted provided that the following conditions 8303012Sae * are met: 9303012Sae * 10303012Sae * 1. Redistributions of source code must retain the above copyright 11303012Sae * notice, this list of conditions and the following disclaimer. 12303012Sae * 2. Redistributions in binary form must reproduce the above copyright 13303012Sae * notice, this list of conditions and the following disclaimer in the 14303012Sae * documentation and/or other materials provided with the distribution. 15303012Sae * 16303012Sae * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17303012Sae * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18303012Sae * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19303012Sae * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20303012Sae * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21303012Sae * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22303012Sae * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23303012Sae * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24303012Sae * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25303012Sae * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26303012Sae * 27303012Sae * $FreeBSD: stable/11/sys/netinet6/ip_fw_nptv6.h 316444 2017-04-03 07:30:47Z ae $ 28303012Sae */ 29303012Sae 30303012Sae#ifndef _NETINET6_IP_FW_NPTV6_H_ 31303012Sae#define _NETINET6_IP_FW_NPTV6_H_ 32303012Sae 33303012Saestruct ipfw_nptv6_stats { 34303012Sae uint64_t in2ex; /* Int->Ext packets translated */ 35303012Sae uint64_t ex2in; /* Ext->Int packets translated */ 36303012Sae uint64_t dropped; /* dropped due to some errors */ 37303012Sae uint64_t reserved[5]; 38303012Sae}; 39303012Sae 40303012Saetypedef struct _ipfw_nptv6_cfg { 41303012Sae char name[64]; /* NPTv6 instance name */ 42303012Sae struct in6_addr internal; /* NPTv6 internal prefix */ 43303012Sae struct in6_addr external; /* NPTv6 external prefix */ 44303012Sae uint8_t plen; /* Prefix length */ 45303012Sae uint8_t set; /* Named instance set [0..31] */ 46303012Sae uint8_t spare[2]; 47303012Sae uint32_t flags; 48303012Sae} ipfw_nptv6_cfg; 49303012Sae 50303012Sae#endif /* _NETINET6_IP_FW_NPTV6_H_ */ 51303012Sae 52