Home
last modified time | relevance | path

Searched full:prefix (Results 1 – 25 of 267) sorted by relevance

1234567891011

/openthread-3.5.0/src/core/net/
Dip6_address.hpp69 * Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address).
77 …static constexpr uint8_t kLength = OT_IP6_PREFIX_SIZE * CHAR_BIT; ///< Length of Network Prefix in…
80 … * Generates and sets the Network Prefix to a crypto-secure random Unique Local Address (ULA) based
83 * @retval kErrorNone Successfully generated a random ULA Network Prefix
84 * @retval kErrorFailed Failed to generate random ULA Network Prefix.
92 * Represents an IPv6 Prefix.
96 class Prefix : public otIp6Prefix, public Clearable<Prefix>, public Unequatable<Prefix> class
99 …constexpr uint8_t kMaxLength = OT_IP6_ADDRESS_SIZE * CHAR_BIT; ///< Max length of a prefix in bits.
100 …ic constexpr uint8_t kMaxSize = OT_IP6_ADDRESS_SIZE; ///< Max (byte) size of a prefix.
111 * Gets the prefix as a pointer to a byte array.
[all …]
Ddhcp6_server.hpp84 * Applies the Mesh Local Prefix.
94 * Indicates whether or not @p aAddress has a matching prefix.
98 * @retval TRUE if the address has a matching prefix.
99 * @retval FALSE if the address does not have a matching prefix.
136 * Returns the IPv6 prefix.
138 * @returns The IPv6 prefix.
141 const Ip6::Prefix &GetPrefix(void) const { return mPrefix; } in GetPrefix()
144 * Returns the IPv6 prefix.
146 * @returns The IPv6 prefix.
149 Ip6::Prefix &GetPrefix(void) { return mPrefix; } in GetPrefix()
[all …]
Dip6_address.cpp65 // Prefix methods
67 void Prefix::Set(const uint8_t *aPrefix, uint8_t aLength) in Set()
73 bool Prefix::IsLinkLocal(void) const in IsLinkLocal()
78 bool Prefix::IsMulticast(void) const { return (mLength >= 8) && (mPrefix.mFields.m8[0] == 0xff); } in IsMulticast()
80 bool Prefix::IsUniqueLocal(void) const { return (mLength >= 7) && ((mPrefix.mFields.m8[0] & 0xfe) =… in IsUniqueLocal()
82 bool Prefix::IsEqual(const uint8_t *aPrefixBytes, uint8_t aPrefixLength) const in IsEqual()
87 bool Prefix::ContainsPrefix(const Prefix &aSubPrefix) const in ContainsPrefix()
93 bool Prefix::ContainsPrefix(const NetworkPrefix &aSubPrefix) const in ContainsPrefix()
99 void Prefix::Tidy(void) in Tidy()
115 bool Prefix::operator==(const Prefix &aOther) const in operator ==()
[all …]
Dnd6.hpp78 kTypePrefixInfo = 3, ///< Prefix Information Option.
170 * Represents the Prefix Information Option.
181 static constexpr Type kType = kTypePrefixInfo; ///< Prefix Information Option Type.
184 …* Initializes the Prefix Info option with proper type and length and sets all other fields to zero.
232 * Sets the valid lifetime of the prefix in seconds.
240 * THis method gets the valid lifetime of the prefix in seconds.
248 * Sets the preferred lifetime of the prefix in seconds.
256 * THis method returns the preferred lifetime of the prefix in seconds.
264 * Sets the prefix.
266 * @param[in] aPrefix The prefix contained in this option.
[all …]
/openthread-3.5.0/tests/toranj/ncp/
Dtest-030-slaac-address-ncp.py38 # - Verify that adding prefix (with SLAAC flag) causes a corresponding SLAAC IPv6 address to be add…
39 # - Verify that removing the prefix, would remove the SLAAC address.
40 # - Verify behavior when same prefix is added/removed on multiple nodes (with or without SLAAC flag…
41 # - Check behavior when a user-added address with the same prefix already exists.
42 # - Check behavior when a user-added address with same prefix is removed (SLAAC module should add a…
43 # - Ensure removal of prefix does not remove user-added address with same prefix.
45 # - Check behavior when prefix is added while SLAAC module is disabled and then enabled later.
55 def verify_address(node_list, prefix): argument
57 …unction verifies that all nodes in the `node_list` contain an IPv6 address with the given `prefix`.
61 verify(any([addr.startswith(prefix[:-1]) for addr in all_addrs]))
[all …]
Dtest-026-slaac-address-wpantund.py47 def verify_address(node_list, prefix): argument
49 …unction verifies that all nodes in the `node_list` contain an IPv6 address with the given `prefix`.
53 verify(any([addr.startswith(prefix[:-1]) for addr in all_addrs]))
56 def verify_no_address(node_list, prefix): argument
58 …ion verifies that none of nodes in the `node_list` contain an IPv6 address with the given `prefix`.
62 verify(all([not addr.startswith(prefix[:-1]) for addr in all_addrs]))
67 prefix,
79 This function verifies that the `prefix` is present on all nodes in the `node_list`.
84 if p.prefix == prefix:
90 raise wpan.VerifyError("Did not find prefix {} on node {}".format(prefix, node))
[all …]
Dtest-015-same-prefix-on-multiple-nodes.py33 # Test description: Adding addresses with same prefix on multiple nodes.
69 r1.form("same-prefix")
90 # Verify (within 5 seconds) that corresponding prefix is seen on both nodes.
97 if p.prefix == IP6_PREFIX:
102 else: # `for` loop finished without finding the prefix.
103 raise wpan.VerifyError('Did not find prefix {} on node {}'.format(IP6_PREFIX, r1))
108 # After prefix is seen on r1, add an address with same prefix on r1.
111 # Verify that the prefix is still seen on both nodes.
114 # Remove the address from r2 which should remove the corresponding the prefix as well
115 # After this since r1 still has the address, the prefix should be present
[all …]
/openthread-3.5.0/src/core/border_router/
Drouting_manager.hpp86 typedef otBorderRoutingPrefixTableIterator PrefixTableIterator; ///< Prefix Table Iterator.
87 typedef otBorderRoutingPrefixTableEntry PrefixTableEntry; ///< Prefix Table Entry.
96 * - Route prefix `fc00::/7` or `::/0`
97 * - One entry for NAT64 published prefix.
265 * Returns the local generated off-mesh-routable (OMR) prefix.
267 …* The randomly generated 64-bit prefix will be added to the Thread Network Data if there isn't alr…
268 * prefix.
270 * @param[out] aPrefix A reference to where the prefix will be output to.
273 * @retval kErrorNone Successfully retrieved the OMR prefix.
276 Error GetOmrPrefix(Ip6::Prefix &aPrefix) const;
[all …]
Drouting_manager.cpp196 Error RoutingManager::GetOmrPrefix(Ip6::Prefix &aPrefix) const in GetOmrPrefix()
220 Error RoutingManager::GetFavoredOmrPrefix(Ip6::Prefix &aPrefix, RoutePreference &aPreference) const in GetFavoredOmrPrefix()
232 Error RoutingManager::GetOnLinkPrefix(Ip6::Prefix &aPrefix) const in GetOnLinkPrefix()
243 Error RoutingManager::GetFavoredOnLinkPrefix(Ip6::Prefix &aPrefix) const in GetFavoredOnLinkPrefix()
266 Error RoutingManager::GetNat64Prefix(Ip6::Prefix &aPrefix) in GetNat64Prefix()
277 Error RoutingManager::GetFavoredNat64Prefix(Ip6::Prefix &aPrefix, RoutePreference &aRoutePreference) in GetFavoredNat64Prefix()
298 LogNote("No valid /48 BR ULA prefix found in settings, generating new one"); in LoadOrGenerateRandomBrUlaPrefix()
312 …LogNote("BR ULA prefix: %s (%s)", mBrUlaPrefix.ToString().AsCString(), generated ? "generated" : "… in LoadOrGenerateRandomBrUlaPrefix()
317 LogCrit("Failed to generate random /48 BR ULA prefix"); in LoadOrGenerateRandomBrUlaPrefix()
477 // discovered prefix table. Also check if we have in UpdateDiscoveredPrefixTableOnNetDataChange()
[all …]
/openthread-3.5.0/include/openthread/
Dborder_routing.h63 …* Routing Manager manages the Off-Mesh Routable (OMR) prefix on the Thread Network data which conf…
64 …h a suitable Off-Mesh Routable IPv6 address. It announces the reachability of this prefix on AIL by
67 …* Routing Manager also monitors and adds on-link prefix on the infrastructure network. If a router…
68 …* providing RA messages containing an IPv6 Prefix Information Option (PIO) that enables IPv6 devic…
70 …* Border Router finds no such RA message on AIL, it generates a ULA on-link prefix which it then a…
76 * Represents an iterator to iterate through the Border Router's discovered prefix table.
92 * Represents an entry from the discovered prefix table.
94 …* The entries in the discovered table track the Prefix/Route Info Options in the received Router A…
101 otIp6Prefix mPrefix; ///< The discovered IPv6 prefix.
102 …ol mIsOnLink; ///< Indicates whether the prefix is on-link or route prefix.
[all …]
Dnetdata_publisher.h49 … Publisher provides mechanisms to limit the number of similar Service and/or Prefix (on-mesh prefix
82 …* Pointer type defines the callback used to notify when a prefix (on-mesh or external route) entry…
89 * @param[in] aPrefix A pointer to the prefix entry.
189 * Requests an on-mesh prefix to be published in the Thread Network Data.
195 …* A subsequent call to this method will replace a previous request for the same prefix. In particu…
196 …* only changes the flags (e.g., preference level) and the prefix is already added in the Network D…
199 …k Data after determining there are other nodes that are publishing the same prefix with the same or
203 * @param[in] aConfig The on-mesh prefix config to publish (MUST NOT be NULL).
205 * @retval OT_ERROR_NONE The on-mesh prefix is published successfully.
206 …* @retval OT_ERROR_INVALID_ARGS The @p aConfig is not valid (bad prefix, invalid flag combination…
[all …]
Dnetdata.h60 otIp6Prefix mPrefix; ///< The IPv6 prefix.
62 bool mPreferred : 1; ///< Whether prefix is preferred.
63 …bool mSlaac : 1; ///< Whether prefix can be used for address auto-configuration (SLA…
66 bool mDefaultRoute : 1; ///< Whether border router is a default router for prefix.
67 bool mOnMesh : 1; ///< Whether this prefix is considered on-mesh.
70 …bool mDp : 1; ///< Whether prefix is a Thread Domain Prefix (added since Thread 1…
75 * Represents 6LoWPAN Context ID information associated with a prefix in Network Data.
82 otIp6Prefix mPrefix; ///< The associated IPv6 prefix.
91 otIp6Prefix mPrefix; ///< The IPv6 prefix.
94 bool mNat64 : 1; ///< Whether this is a NAT64 prefix.
[all …]
/openthread-3.5.0/tests/scripts/thread-cert/border_router/
Dtest_manual_omr_prefix.py84 # Add a smaller OMR prefix. Verify BR_1 withdraws its OMR prefix.
86 # Add a bigger OMR prefix. Verify BR_1 does not withdraw its OMR prefix.
88 # Add a high preference bigger OMR prefix. Verify BR_1 withdraws its OMR prefix.
90 …# Add a smaller but invalid OMR prefix (P_on_mesh = 0). Verify BR_1 does not withdraw its OMR pref…
92 …# Add a smaller but invalid OMR prefix (P_stable = 0). Verify BR_1 does not withdraw its OMR prefi…
94 … # Add a deprecating OMR prefix (P_preferred = 0). Verify BR_1 does not withdraw its OMR prefix.
113 … # Verify BR_1 sends RA RIO for both BR OMR prefix and deprecating OMR prefix (i.e. 2004::/64)
114 …ilter(lambda p: ICMPV6_RA_OPT_TYPE_RIO in p.icmpv6.opt.type and '2004::' in p.icmpv6.opt.prefix and
115 BR_1_OMR_PREFIX in p.icmpv6.opt.prefix).must_next()
117 def _test_manual_omr_prefix(self, prefix, flags, expect_withdraw, prf='med'): argument
[all …]
/openthread-3.5.0/src/core/thread/
Dnetwork_data_publisher.hpp67 …* It provides mechanisms to limit the number of similar Service and/or Prefix (on-mesh prefix or e…
87 * Represents the requester associated with a published prefix.
196 …* Represents the callback function pointer used to notify when a prefix (on-mesh or external route)
207 … * Sets a callback for notifying when a published prefix entry is actually added to or removed from
219 * Requests an on-mesh prefix to be published in the Thread Network Data.
223 …* A subsequent call to this method will replace a previous request for the same prefix. In particu…
224 …* new call only changes the flags (e.g., preference level) and the prefix is already added in the …
228 * same prefix with the same or higher preference.
230 * @param[in] aConfig The on-mesh prefix config to publish.
233 * @retval kErrorNone The on-mesh prefix is published successfully.
[all …]
Dnetwork_data_types.hpp159 * Represents an On-mesh Prefix (Border Router) configuration.
173 * Gets the prefix.
175 * @return The prefix.
178 const Ip6::Prefix &GetPrefix(void) const { return AsCoreType(&mPrefix); } in GetPrefix()
181 * Gets the prefix.
183 * @return The prefix.
186 Ip6::Prefix &GetPrefix(void) { return AsCoreType(&mPrefix); } in GetPrefix()
198 * Indicates whether or not the prefix configuration is valid.
202 * @retval TRUE The config is a valid on-mesh prefix.
203 * @retval FALSE The config is not a valid on-mesh prefix.
[all …]
Dnetwork_data_local.hpp83 * @param[in] aConfig A reference to the on mesh prefix configuration.
87 * @retval kErrorInvalidArgs The prefix is mesh local prefix.
95 * @param[in] aPrefix The Prefix to remove.
101 Error RemoveOnMeshPrefix(const Ip6::Prefix &aPrefix) { return RemovePrefix(aPrefix); } in RemoveOnMeshPrefix()
104 * Indicates whether or not the Thread Network Data contains a given on mesh prefix.
106 * @param[in] aPrefix The on mesh prefix to check.
108 * @retval TRUE if Network Data contains mesh prefix @p aPrefix.
109 * @retval FALSE if Network Data does not contain mesh prefix @p aPrefix.
112 bool ContainsOnMeshPrefix(const Ip6::Prefix &aPrefix) const;
129 * @param[in] aPrefix The Prefix to remove.
[all …]
Dnetwork_data.hpp195 * Provides the next On Mesh prefix in the Thread Network Data.
198 …* @param[out] aConfig A reference to a config variable where the On Mesh Prefix information…
200 * @retval kErrorNone Successfully found the next On Mesh prefix.
201 * @retval kErrorNotFound No subsequent On Mesh prefix exists in the Thread Network Data.
207 * Provides the next On Mesh prefix in the Thread Network Data for a given RLOC16.
211 …* @param[out] aConfig A reference to a config variable where the On Mesh Prefix information…
213 * @retval kErrorNone Successfully found the next On Mesh prefix.
214 * @retval kErrorNotFound No subsequent On Mesh prefix exists in the Thread Network Data.
282 * Indicates whether or not the Thread Network Data contains a given on mesh prefix entry.
284 * @param[in] aPrefix The on mesh prefix config to check.
[all …]
/openthread-3.5.0/tests/unit/
Dtest_ip_address.cpp87 // Short prefix and full IID. in TestIp6AddressFromString()
172 // Validate parsing all test vectors now as an IPv6 prefix. in TestIp6AddressFromString()
178 ot::Ip6::Prefix prefix; in TestIp6AddressFromString() local
189 VerifyOrQuit(prefix.FromString(string) == testVector.mError); in TestIp6AddressFromString()
193 … VerifyOrQuit(memcmp(prefix.GetBytes(), testVector.mAddr, sizeof(ot::Ip6::Address)) == 0); in TestIp6AddressFromString()
194 VerifyOrQuit(prefix.GetLength() == 128); in TestIp6AddressFromString()
201 ot::Ip6::Prefix prefix; in TestIp6PrefixFromString() local
203 SuccessOrQuit(prefix.FromString("::/128")); in TestIp6PrefixFromString()
204 VerifyOrQuit(prefix.GetLength() == 128); in TestIp6PrefixFromString()
206 SuccessOrQuit(prefix.FromString("::/0128")); in TestIp6PrefixFromString()
[all …]
Dtest_routing_manager.cpp129 …kPioAdvertisingLocalOnLink, // Expect to see local on-link prefix advertised (non-zero preferred l…
130 …kPioDeprecatingLocalOnLink, // Expect to see local on-link prefix deprecated (zero preferred lifet…
137 DeprecatingPrefix(const Ip6::Prefix &aPrefix, uint32_t aLifetime) in DeprecatingPrefix()
143 bool Matches(const Ip6::Prefix &aPrefix) const { return mPrefix == aPrefix; } in Matches()
145 Ip6::Prefix mPrefix; // Old on-link prefix being deprecated.
146 uint32_t mLifetime; // Valid lifetime of prefix from PIO.
156 uint32_t sOnLinkLifetime; // Valid lifetime for local on-link prefix from the last processed RA.
167 explicit RioPrefix(const Ip6::Prefix &aPrefix) in RioPrefix()
174 … bool mSawInRa; // Indicate whether or not this prefix was seen in the emitted RA (as RIO).
175 Ip6::Prefix mPrefix; // The RIO prefix.
[all …]
/openthread-3.5.0/src/cli/
DREADME_NETDATA.md13 ### Form Network and Configure Prefix
25 Mesh Local Prefix: fd3d:b50b:f96d:722d::/64
61 5. Register an IPv6 prefix assigned to the Thread network.
64 > prefix add fd00:dead:beef:cafe::/64 paros
245 …rovides mechanisms to limit the number of similar Service and/or Prefix (on-mesh prefix or externa…
274 ### publish prefix \<prefix\> [padcrosnD][prf]
276 Publish an on-mesh prefix entry.
286 - D: Domain Prefix flag (only available for Thread 1.2).
290 > netdata publish prefix fd00:1234:5678::/64 paos med
294 ### publish route \<prefix\> [sn][prf]
[all …]
/openthread-3.5.0/tests/scripts/thread-cert/
DCert_7_1_07_BorderRouterAsLeader.py56 # Router_1 is configured as Border Router for prefix 2001:db8:1::/64.
57 # Router_2 is configured as Border Router for prefix 2001:db8:1::/64.
213 # information(Prefix, Border Router):
228 p.thread_nwd.tlv.prefix and\
248 # - At least one Prefix TLV (Prefix 1)
263 p.thread_nwd.tlv.prefix and\
291 is_sublist([Ipv6Addr(PREFIX_1[:-3])], p.thread_nwd.tlv.prefix)
298 # At least one Prefix TLV (Prefix 1) including:
317 is_sublist([Ipv6Addr(PREFIX_1[:-3])], p.thread_nwd.tlv.prefix) and\
326 # information (Prefix, Border Router) to the Leader:
[all …]
/openthread-3.5.0/tests/scripts/thread-cert/border_router/nat64/
Dtest_single_border_router.py42 # 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.
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.
165 # User adds a larger NAT64 prefix (higher preference) and the local prefix is withdrawn.
166 # User removes the larger NAT64 prefix and the local prefix is re-added.
188 # NAT64 prefix is withdrawn from 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.
94 # Case 1 No infra-derived OMR prefix. BR publishes its local prefix.
106 # Case 2 Add OMR prefix. BR publishes the infrastructure nat64 prefix
123 # Case 3 Unpublish infrastructure prefix when a smaller prefix in medium
143 # Case 4 No change when a smaller prefix in low preference is present
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-3.5.0/src/core/backbone_router/
Dbbr_leader.hpp70 * Represents Domain Prefix changes.
75 kDomainPrefixAdded, ///< Domain Prefix Added.
76 kDomainPrefixRemoved, ///< Domain Prefix Removed.
77 kDomainPrefixRefreshed, ///< Domain Prefix Changed.
78 kDomainPrefixUnchanged, ///< Domain Prefix did not change.
160 * Gets the Domain Prefix in the Thread Network.
162 * @retval A pointer to the Domain Prefix or nullptr if there is no Domain Prefix.
165 const Ip6::Prefix *GetDomainPrefix(void) const in GetDomainPrefix()
171 * Indicates whether or not the Domain Prefix is available in the Thread Network.
173 * @retval TRUE If there is Domain Prefix.
[all …]
Dbbr_local.hpp195 * Gets the Domain Prefix configuration.
197 * @param[out] aConfig A reference to the Domain Prefix configuration.
199 * @retval kErrorNone Successfully got the Domain Prefix configuration.
200 * @retval kErrorNotFound No Domain Prefix was configured.
206 * Removes the local Domain Prefix configuration.
208 * @param[in] aPrefix A reference to the IPv6 Domain Prefix.
210 * @retval kErrorNone Successfully removed the Domain Prefix.
212 * @retval kErrorNotFound No Domain Prefix was configured or @p aPrefix doesn't match.
215 Error RemoveDomainPrefix(const Ip6::Prefix &aPrefix);
218 * Sets the local Domain Prefix configuration.
[all …]

1234567891011