/*-1* Copyright (c) 2016 Yandex LLC2* Copyright (c) 2016 Andrey V. Elsukov <[email protected]>3* All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8*9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR16* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES17* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.18* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,19* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT20* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,21* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY22* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF24* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.25*/2627#ifndef _NETINET6_IP_FW_NPTV6_H_28#define _NETINET6_IP_FW_NPTV6_H_2930struct ipfw_nptv6_stats {31uint64_t in2ex; /* Int->Ext packets translated */32uint64_t ex2in; /* Ext->Int packets translated */33uint64_t dropped; /* dropped due to some errors */34uint64_t reserved[5];35};3637typedef struct _ipfw_nptv6_cfg {38char name[64]; /* NPTv6 instance name */39struct in6_addr internal; /* NPTv6 internal prefix */40union {41struct in6_addr external; /* NPTv6 external prefix */42char if_name[IF_NAMESIZE];43};44uint8_t plen; /* Prefix length */45uint8_t set; /* Named instance set [0..31] */46uint8_t spare[2];47uint32_t flags;48#define NPTV6_DYNAMIC_PREFIX 1 /* Use dynamic external prefix */49} ipfw_nptv6_cfg;5051#endif /* _NETINET6_IP_FW_NPTV6_H_ */525354