Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/nat64/nat64stl.h
- This file was copied to sys/netpfil/ipfw/nat64/nat64clat.h.
/*- | /*- | ||||
* Copyright (c) 2015-2016 Yandex LLC | * SPDX-License-Identifier: BSD-2-Clause-FreeBSD | ||||
* Copyright (c) 2015-2016 Andrey V. Elsukov <ae@FreeBSD.org> | |||||
* All rights reserved. | |||||
* | * | ||||
* Copyright (c) 2015-2019 Yandex LLC | |||||
* Copyright (c) 2015-2019 Andrey V. Elsukov <ae@FreeBSD.org> | |||||
* | |||||
* 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. | ||||
* 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright | ||||
* notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the | ||||
Show All 24 Lines | struct nat64stl_cfg { | ||||
uint16_t map64; /* table with 6to4 mapping */ | uint16_t map64; /* table with 6to4 mapping */ | ||||
uint16_t map46; /* table with 4to6 mapping */ | uint16_t map46; /* table with 4to6 mapping */ | ||||
struct nat64_config base; | struct nat64_config base; | ||||
#define NAT64STL_KIDX 0x0100 | #define NAT64STL_KIDX 0x0100 | ||||
#define NAT64STL_46T 0x0200 | #define NAT64STL_46T 0x0200 | ||||
#define NAT64STL_64T 0x0400 | #define NAT64STL_64T 0x0400 | ||||
#define NAT64STL_FLAGSMASK (NAT64_LOG) /* flags to pass to userland */ | #define NAT64STL_FLAGSMASK (NAT64_LOG|NAT64_ALLOW_PRIVATE) /* flags to pass to userland */ | ||||
char name[64]; | char name[64]; | ||||
}; | }; | ||||
VNET_DECLARE(uint16_t, nat64stl_eid); | VNET_DECLARE(uint16_t, nat64stl_eid); | ||||
#define V_nat64stl_eid VNET(nat64stl_eid) | #define V_nat64stl_eid VNET(nat64stl_eid) | ||||
#define IPFW_TLV_NAT64STL_NAME IPFW_TLV_EACTION_NAME(V_nat64stl_eid) | #define IPFW_TLV_NAT64STL_NAME IPFW_TLV_EACTION_NAME(V_nat64stl_eid) | ||||
int ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_args *args, | int ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_args *args, | ||||
ipfw_insn *cmd, int *done); | ipfw_insn *cmd, int *done); | ||||
#endif | #endif | ||||