Home
last modified time | relevance | path

Searched full:nat64 (Results 1 – 25 of 74) sorted by relevance

123

/openthread-latest/include/openthread/
Dnat64.h32 * This file defines the OpenThread API for NAT64 on a border router.
46 * @addtogroup api-nat64
48 …* @brief This module includes functions and structs for the NAT64 function on the border router. T…
88 * Represents the counters for NAT64.
99 * Represents the counters for the protocols supported by NAT64.
123 * Represents the counters of dropped packets due to errors when handling NAT64 packets.
132 * Gets NAT64 translator counters.
139 …* @param[out] aCounters A pointer to an `otNat64Counters` where the counters of NAT64 translator w…
144 * Gets the NAT64 translator error counters.
149 …* @param[out] aCounters A pointer to an `otNat64Counters` where the counters of NAT64 translator w…
[all …]
Ddns_client.h68 * Type represents the NAT64 mode in an `otDnsQueryConfig`.
70 …* The NAT64 mode indicates whether to allow or disallow NAT64 address translation during DNS clien…
75 OT_DNS_NAT64_UNSPECIFIED = 0, ///< NAT64 mode is not specified. Use default NAT64 mode.
76 …OT_DNS_NAT64_ALLOW = 1, ///< Allow NAT64 address translation during DNS client address resol…
77 …OT_DNS_NAT64_DISALLOW = 2, ///< Do not allow NAT64 address translation during DNS client addres…
120 …otDnsNat64Mode mNat64Mode; ///< Allow/Disallow NAT64 address translation during address…
238 …* When a successful response is received, the addresses are returned from @p aCallback as NAT64 IP…
253 …* @retval OT_ERROR_INVALID_ARGS The host name is not valid format or NAT64 is not enabled in conf…
296 * @retval OT_ERROR_INVALID_STATE No NAT64 prefix (applicable only when NAT64 is allowed).
Dborder_routing.h397 * Gets the local NAT64 Prefix of the Border Router.
399 * NAT64 Prefix might not be advertised in the Thread network.
407 * @retval OT_ERROR_NONE Successfully retrieved the NAT64 prefix.
412 * Gets the currently favored NAT64 prefix.
414 …* The favored NAT64 prefix can be discovered from infrastructure link or can be this device's loca…
417 * @param[out] aPrefix A pointer to output the favored NAT64 prefix.
421 * @retval OT_ERROR_NONE Successfully retrieved the favored NAT64 prefix.
/openthread-latest/src/core/net/
Dnat64_translator.hpp31 * This file includes definitions for the NAT64 translator.
48 namespace Nat64 { namespace
54 …tateIdle = OT_NAT64_STATE_IDLE, ///< NAT64 is enabled, but this BR is not an active N…
70 * Implements the NAT64 translator.
82 * The possible results of NAT64 translation.
86 …kNotTranslated, ///< The message is not translated, it might be sending to an non-nat64 prefix (fo…
94 * Represents the counters for the protocols supported by NAT64.
117 * Represents the counters of dropped packets due to errors when handling NAT64 packets.
146 * Initializes the NAT64 translator.
151 * Set the state of NAT64 translator.
[all …]
Dnat64_translator.cpp31 * This file includes implementation for the NAT64 translator.
41 namespace Nat64 { namespace
43 RegisterLogModule("Nat64");
211 // The NAT64 translation is bypassed (will be handled externally) in TranslateToIp6()
212 LogWarn("incoming message is an IPv4 datagram but no IPv4 CIDR for NAT64 configured, drop"); in TranslateToIp6()
218 LogWarn("incoming message is an IPv4 datagram but no NAT64 prefix configured, drop"); in TranslateToIp6()
504 …LogInfo("IPv4 CIDR for NAT64: %s (actual address pool: %s - %s, %lu addresses)", aCidr.ToString().… in SetIp4Cidr()
536 LogInfo("IPv6 Prefix for NAT64 updated to %s", aNat64Prefix.ToString().AsCString()); in SetNat64Prefix()
546 LogInfo("IPv6 Prefix for NAT64 cleared"); in ClearNat64Prefix()
672 LogInfo("NAT64 translator is now %s", StateToString(mState)); in UpdateState()
[all …]
Ddns_client.hpp131 * Type represents the NAT64 mode.
135 …kNat64Unspecified = OT_DNS_NAT64_UNSPECIFIED, ///< NAT64 mode is not specified. Use default NAT64
136 kNat64Allow = OT_DNS_NAT64_ALLOW, ///< Allow NAT64 address translation.
137 kNat64Disallow = OT_DNS_NAT64_DISALLOW, ///< Disallow NAT64 address translation.
202 * Gets the NAT64 mode.
204 * @returns The NAT64 mode.
321 // in the additional data section for NAT64 address synthesis.
372 * @retval kErrorInvalidState No NAT64 prefix (applicable only when NAT64 is allowed).
632 …cessful response is received, the addresses are returned from @p aCallback as NAT64 IPv6 translated
646 …* @retval kErrorInvalidArgs The host name is not valid format or NAT64 is not enabled in config.
[all …]
Dip4_types.hpp41 #include <openthread/nat64.h>
63 * This namespace includes definitions for IPv4 networking used by NAT64.
80 * This module includes definitions for IPv4 networking used by NAT64.
129 …* Sets the IPv4 address by performing NAT64 address translation from a given IPv6 address as speci…
132 …* The NAT64 @p aPrefixLength MUST be one of the following values: 32, 40, 48, 56, 64, or 96, other…
545 …* Note: ICMP(v4) messages will only be generated / handled by NAT64. So only header definition is …
558 // A few ICMP types, only the ICMP types work with NAT64 are listed here.
/openthread-latest/tests/scripts/thread-cert/border_router/internet/
Dtest_single_border_router.py37 # For NAT64 connectivity tests
42 # This test verifies publishing the local NAT64 prefix in Thread network
43 # when no NAT64 prefix found on infrastructure interface.
59 # The prefix is set small enough that a random-generated ULA NAT64 prefix is very
62 # The prefix is set larger than a random-generated ULA NAT64 prefix.
122 # When feature flag is enabled, NAT64 might be disabled by default. So
123 # ensure NAT64 is enabled here.
135 # Case 1. Border router advertises its local NAT64 prefix.
146 # User adds a smaller NAT64 prefix (same preference) and the local prefix is withdrawn.
147 # User removes the smaller NAT64 prefix and the local prefix is re-added.
[all …]
Dtest_multi_border_routers.py36 # This test verifies that a single NAT64 prefix is published when there are
99 # When feature flag is enabled, NAT64 might be disabled by default. So
100 # ensure NAT64 is enabled here.
113 # it will add the infrastructure nat64 prefix to Network Data.
114 # Note: NAT64 translator will be bypassed.
117 # When feature flag is enabled, NAT64 might be disabled by default. So
118 # ensure NAT64 is enabled here.
148 # Case 2. Disable NAT64 on BR2.
149 # BR1 will add its local nat64 prefix.
168 # its local nat64 prefix to Network Data.
[all …]
Dtest_with_infrastructure_prefix.py35 # This test verifies publishing infrastructure NAT64 prefix in Thread network.
51 # The prefix is set smaller than the default infrastructure NAT64 prefix.
84 # When feature flag is enabled, NAT64 might be disabled by default. So
85 # ensure NAT64 is enabled here.
106 # Case 2 Add OMR prefix. BR publishes the infrastructure nat64 prefix
125 br.add_route(SMALL_NAT64_PREFIX, stable=False, nat64=True, prf='med')
144 br.add_route(SMALL_NAT64_PREFIX, stable=False, nat64=True, prf='low')
159 # Case 5 Infrastructure nat64 prefix no longer presents
172 # Case 6 Infrastructure nat64 prefix is recovered
184 # Case 7 Change infrastructure nat64 prefix
/openthread-latest/src/core/api/
Dnat64_api.cpp31 * This file implements the OpenThread APIs for handling IPv4 (NAT64) messages
41 // - Using OpenThread's routing manager, while using external NAT64 translator (like tayga).
42 // - Using OpenThread's NAT64 translator, while using external routing manager.
49 return AsCoreType(aInstance).Get<Nat64::Translator>().SetIp4Cidr(AsCoreType(aCidr)); in otNat64SetIp4Cidr()
52 void otNat64ClearIp4Cidr(otInstance *aInstance) { AsCoreType(aInstance).Get<Nat64::Translator>().Cl… in otNat64ClearIp4Cidr()
56 …return AsCoreType(aInstance).Get<Nat64::Translator>().NewIp4Message(Message::Settings::From(aSetti… in otIp4NewMessage()
61 return AsCoreType(aInstance).Get<Nat64::Translator>().SendMessage(AsCoreType(aMessage)); in otNat64Send()
73 AsCoreType(aInstance).Get<Nat64::Translator>().InitAddressMappingIterator(*aIterator); in otNat64InitAddressMappingIterator()
83 …return AsCoreType(aInstance).Get<Nat64::Translator>().GetNextAddressMapping(*aIterator, *aMapping); in otNat64GetNextAddressMapping()
88 AsCoreType(aInstance).Get<Nat64::Translator>().GetCounters(AsCoreType(aCounters)); in otNat64GetCounters()
[all …]
/openthread-latest/tests/unit/
Dtest_nat64.cpp94 Nat64::Translator::Result aResult, in TestCase6To4()
100 printf("Testing NAT64 6 to 4: %s\n", aTestName); in TestCase6To4()
107 VerifyOrQuit(sInstance->Get<Nat64::Translator>().TranslateFromIp6(*msg) == aResult); in TestCase6To4()
121 Nat64::Translator::Result aResult, in TestCase4To6()
127 printf("Testing NAT64 4 to 6: %s\n", aTestName); in TestCase4To6()
134 VerifyOrQuit(sInstance->Get<Nat64::Translator>().TranslateToIp6(*msg) == aResult); in TestCase4To6()
191 SuccessOrQuit(sInstance->Get<Nat64::Translator>().SetIp4Cidr(nat64cidr)); in TestNat64()
192 sInstance->Get<Nat64::Translator>().SetNat64Prefix(nat64prefix); in TestNat64()
207 …TestCase6To4("good v6 udp datagram", kIp6Packet, Nat64::Translator::kForward, kIp4Packet, sizeof(k… in TestNat64()
222 …TestCase4To6("good v4 udp datagram", kIp4Packet, Nat64::Translator::kForward, kIp6Packet, sizeof(k… in TestNat64()
[all …]
/openthread-latest/src/core/config/
Dnat64.h31 * This file includes compile-time configurations for NAT64.
38 * @addtogroup config-nat64
41 * This module includes configuration variables for NAT64.
49 * Define to 1 to enable the internal NAT64 translator.
58 * Specifies maximum number of active mappings for NAT64.
76 * Define to 1 to enable NAT64 support in Border Routing Manager.
Ddns_client.h61 …* Define to 1 to enable support for NAT64 address translation (from IPv4 to IPv6) during address r…
71 …* Specifies the default NAT64 mode, i.e., whether to allow or disallow NAT64 address translation d…
/openthread-latest/include/openthread/platform/
Dinfra_if.h142 …* Send a request to discover the NAT64 prefix on the infrastructure interface with @p aInfraIfInde…
144 * OpenThread will call this method periodically to monitor the presence or change of NAT64 prefix.
146 …* @param[in] aInfraIfIndex The index of the infrastructure interface to discover the NAT64 prefi…
148 * @retval OT_ERROR_NONE Successfully request NAT64 prefix discovery.
149 * @retval OT_ERROR_FAILED Failed to request NAT64 prefix discovery.
155 * the discovery of NAT64 prefix is done.
158 * If no NAT64 prefix is discovered, @p aIp6Prefix shall point to an empty prefix with zero length.
161 …* @param[in] aInfraIfIndex The index of the infrastructure interface on which the NAT64 prefix i…
162 * @param[in] aIp6Prefix A pointer to NAT64 prefix.
/openthread-latest/.github/workflows/
Dotbr.yml123 nat64: 0
129 nat64: 0
135 nat64: 0
141 nat64: 0
147 nat64: 1
153 nat64: 0
159 nat64: 0
165 nat64: 0
181 NAT64: ${{ matrix.nat64 }}
/openthread-latest/src/cli/
DREADME.md81 - [nat64](#nat64-cidr)
1215 - BR prefixes (OMR, on-link, NAT64)
1324 - Whether to allow/disallow NAT64 address translation during address resolution (requires `OPENTHRE…
1416 …address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the ne…
1418 …InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavaila…
1429 Send DNS query to obtain IPv4 address for a given hostname and provide the NAT64 synthesized IPv6 a…
1435 This command requires a NAT64 prefix to be configured and present in Thread Network Data.
1437 For example, if a NAT64 prefix of `2001:db8:122:344::/96` is used within the Thread mesh, the outpu…
1484 …erred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS serv…
1492 …erred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS serv…
[all …]
DREADME_UDP.md109 …address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the ne…
111 > Note: The command will return `InvalidState` when the preferred NAT64 prefix is unavailable.
169 …address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the ne…
171 > Note: The command will return `InvalidState` when the preferred NAT64 prefix is unavailable.
Dcli_udp.cpp37 #include <openthread/nat64.h>
125 * using the preferred NAT64 prefix from the network data. The command returns
126 * `InvalidState` when the preferred NAT64 prefix is unavailable.
237 * NAT64 prefix from the network data. (If the preferred NAT64 prefix
Dcli_dns.cpp235 * IPv6 address using the preferred NAT64 prefix from the network data.
238 * address but the preferred NAT64 prefix is unavailable.
316 * address using the preferred NAT64 prefix from the network data. The command will return
317 * `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix
356 * to an IPv6 address using the preferred NAT64 prefix from the network data.
358 * address but the preferred NAT64 prefix is unavailable.
385 * to an IPv6 address using the preferred NAT64 prefix from the network data.
387 * address but the preferred NAT64 prefix is unavailable.
/openthread-latest/src/core/border_router/
Dinfra_if.hpp162 * Sends a request to discover the NAT64 prefix on the infrastructure interface.
166 * @retval kErrorNone Successfully request NAT64 prefix discovery.
167 * @retval kErrorFailed Failed to request NAT64 prefix discovery.
172 * Processes the discovered NAT64 prefix.
175 * @param[in] aPrefix The NAT64 prefix on the infrastructure link.
Drouting_manager.hpp58 #include <openthread/nat64.h>
124 * - One entry for NAT64 published prefix.
349 * Gets the state of NAT64 prefix publishing.
351 * @retval kStateDisabled NAT64 is disabled.
352 …* @retval kStateNotRunning NAT64 is enabled, but is not running since routing manager is not runn…
353 …* @retval kStateIdle NAT64 is enabled, but the border router is not publishing a NAT64 pref…
354 …* when there is another border router publishing a NAT64 prefix with hig…
356 * @retval kStateActive The Border router is publishing a NAT64 prefix.
358 Nat64::State GetNat64PrefixManagerState(void) const { return mNat64PrefixManager.GetState(); } in GetNat64PrefixManagerState()
361 * Enable or disable NAT64 prefix publishing.
[all …]
/openthread-latest/tools/harness-simulation/posix/
Dconfig.yml54 - NAT64=0
73 - NAT64=0
/openthread-latest/tools/harness-simulation/posix/etc/
DDockerfile37 ARG NAT64
53 ENV NAT64=${NAT64:-1}
/openthread-latest/script/
Dtest71 NAT64="${NAT64:-0}"
72 readonly NAT64
364 "NAT64=${NAT64}"
366 "DNS64=${NAT64}"
373 if [[ ${NAT64} != 1 ]]; then
374 …# We are testing upstream DNS forwarding in the NAT64 tests, and OPENTHREAD_CONFIG_DNSSD_SERVER_BI…

123