/openthread-3.5.0/src/core/net/ |
D | nd6.cpp | 93 void PrefixInfoOption::SetPrefix(const Prefix &aPrefix) in SetPrefix() argument 95 mPrefixLength = aPrefix.mLength; in SetPrefix() 96 mPrefix = AsCoreType(&aPrefix.mPrefix); in SetPrefix() 99 void PrefixInfoOption::GetPrefix(Prefix &aPrefix) const { aPrefix.Set(mPrefix.GetBytes(), mPrefixLe… in GetPrefix() 127 void RouteInfoOption::SetPrefix(const Prefix &aPrefix) in SetPrefix() argument 129 SetLength(OptionLengthForPrefix(aPrefix.mLength)); in SetPrefix() 130 mPrefixLength = aPrefix.mLength; in SetPrefix() 131 memcpy(GetPrefixBytes(), aPrefix.GetBytes(), aPrefix.GetBytesSize()); in SetPrefix() 134 void RouteInfoOption::GetPrefix(Prefix &aPrefix) const { aPrefix.Set(GetPrefixBytes(), mPrefixLengt… in GetPrefix() 222 Error RouterAdvertMessage::AppendPrefixInfoOption(const Prefix &aPrefix, in AppendPrefixInfoOption() argument [all …]
|
D | ip6_address.hpp | 149 void Set(const uint8_t *aPrefix, uint8_t aLength); 554 void ApplyPrefix(const Prefix &aPrefix); 831 void GetPrefix(uint8_t aLength, Prefix &aPrefix) const { aPrefix.Set(mFields.m8, aLength); } in GetPrefix() 842 bool MatchesPrefix(const Prefix &aPrefix) const; 854 bool MatchesPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const; 866 …void SetPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) { CopyBits(mFields.m8, aPrefix, aPre… in SetPrefix() argument 885 void SetPrefix(const Prefix &aPrefix); 894 void SetMulticastNetworkPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength); 913 void SetMulticastNetworkPrefix(const Prefix &aPrefix) in SetMulticastNetworkPrefix() argument 915 SetMulticastNetworkPrefix(aPrefix.GetBytes(), aPrefix.GetLength()); in SetMulticastNetworkPrefix() [all …]
|
D | ip6_address.cpp | 67 void Prefix::Set(const uint8_t *aPrefix, uint8_t aLength) in Set() argument 69 memcpy(mPrefix.mFields.m8, aPrefix, SizeForLength(aLength)); in Set() 315 void InterfaceIdentifier::ApplyPrefix(const Prefix &aPrefix) in ApplyPrefix() argument 317 if (aPrefix.GetLength() > NetworkPrefix::kLength) in ApplyPrefix() 319 Address::CopyBits(mFields.m8, aPrefix.GetBytes() + NetworkPrefix::kSize, in ApplyPrefix() 320 aPrefix.GetLength() - NetworkPrefix::kLength); in ApplyPrefix() 388 bool Address::MatchesPrefix(const Prefix &aPrefix) const in MatchesPrefix() 390 …return Prefix::MatchLength(mFields.m8, aPrefix.GetBytes(), aPrefix.GetBytesSize()) >= aPrefix.GetL… in MatchesPrefix() 393 bool Address::MatchesPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const in MatchesPrefix() argument 395 …return Prefix::MatchLength(mFields.m8, aPrefix, Prefix::SizeForLength(aPrefixLength)) >= aPrefixLe… in MatchesPrefix() [all …]
|
D | nd6.hpp | 269 void SetPrefix(const Prefix &aPrefix); 277 void GetPrefix(Prefix &aPrefix) const; 385 void SetPrefix(const Prefix &aPrefix); 393 void GetPrefix(Prefix &aPrefix) const; 651 …Error AppendPrefixInfoOption(const Prefix &aPrefix, uint32_t aValidLifetime, uint32_t aPreferredLi… 664 …Error AppendRouteInfoOption(const Prefix &aPrefix, uint32_t aRouteLifetime, RoutePreference aPrefe…
|
D | dhcp6_server.hpp | 170 …void Set(const Ip6::Prefix &aPrefix, const Ip6::NetworkPrefix &aMeshLocalPrefix, uint8_t aContextI… in Set() argument 172 mPrefix = aPrefix; in Set() 199 Error AddIaAddress(Message &aMessage, const Ip6::Address &aPrefix, ClientIdentifier &aClientId);
|
/openthread-3.5.0/src/core/thread/ |
D | network_data_local.hpp | 101 Error RemoveOnMeshPrefix(const Ip6::Prefix &aPrefix) { return RemovePrefix(aPrefix); } in RemoveOnMeshPrefix() argument 112 bool ContainsOnMeshPrefix(const Ip6::Prefix &aPrefix) const; 135 Error RemoveHasRoutePrefix(const Ip6::Prefix &aPrefix) { return RemovePrefix(aPrefix); } in RemoveHasRoutePrefix() argument 173 …Error AddPrefix(const Ip6::Prefix &aPrefix, NetworkDataTlv::Type aSubTlvType, uint16_t aFlags, boo… 174 Error RemovePrefix(const Ip6::Prefix &aPrefix);
|
D | network_data_leader_ftd.cpp | 454 Error Leader::ValidatePrefix(const PrefixTlv &aPrefix, uint16_t aRloc16) in ValidatePrefix() argument 461 const NetworkDataTlv *subEnd = aPrefix.GetNext(); in ValidatePrefix() 467 …for (const NetworkDataTlv *subCur = aPrefix.GetSubTlvs(); subCur < subEnd; subCur = subCur->GetNex… in ValidatePrefix() 575 bool Leader::ContainsMatchingEntry(const PrefixTlv *aPrefix, bool aStable, const HasRouteEntry &aEn… in ContainsMatchingEntry() argument 580 …return (aPrefix == nullptr) ? false : ContainsMatchingEntry(aPrefix->FindSubTlv<HasRouteTlv>(aStab… in ContainsMatchingEntry() 604 bool Leader::ContainsMatchingEntry(const PrefixTlv *aPrefix, bool aStable, const BorderRouterEntry … in ContainsMatchingEntry() argument 609 …return (aPrefix == nullptr) ? false : ContainsMatchingEntry(aPrefix->FindSubTlv<BorderRouterTlv>(a… in ContainsMatchingEntry() 659 Leader::UpdateStatus Leader::UpdatePrefix(PrefixTlv &aPrefix) { return UpdateTlv(aPrefix, aPrefix.G… in UpdatePrefix() argument 791 Error Leader::AddPrefix(const PrefixTlv &aPrefix, ChangedFlags &aChangedFlags) in AddPrefix() argument 794 PrefixTlv *dstPrefix = FindPrefix(aPrefix.GetPrefix(), aPrefix.GetPrefixLength()); in AddPrefix() [all …]
|
D | network_data_leader_ftd.hpp | 180 bool ContainsOmrPrefix(const Ip6::Prefix &aPrefix); 275 Error AddPrefix(const PrefixTlv &aPrefix, ChangedFlags &aChangedFlags); 284 void RemoveContext(PrefixTlv &aPrefix, uint8_t aContextId); 293 void RemoveRlocInPrefix(PrefixTlv &aPrefix, 303 void RemoveRlocInHasRoute(PrefixTlv &aPrefix, 309 void RemoveRlocInBorderRouter(PrefixTlv &aPrefix, 319 static Error ValidatePrefix(const PrefixTlv &aPrefix, uint16_t aRloc16); 322 …static bool ContainsMatchingEntry(const PrefixTlv *aPrefix, bool aStable, const HasRouteEntry &aEn… 324 …static bool ContainsMatchingEntry(const PrefixTlv *aPrefix, bool aStable, const BorderRouterEntry … 328 UpdateStatus UpdatePrefix(PrefixTlv &aPrefix);
|
D | network_data.hpp | 290 bool ContainsOnMeshPrefix(const OnMeshPrefixConfig &aPrefix) const; 436 const PrefixTlv *FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const; 446 const PrefixTlv *FindPrefix(const Ip6::Prefix &aPrefix) const in FindPrefix() 448 return FindPrefix(aPrefix.GetBytes(), aPrefix.GetLength()); in FindPrefix() 677 PrefixTlv *FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) in FindPrefix() argument 679 return AsNonConst(AsConst(this)->FindPrefix(aPrefix, aPrefixLength)); in FindPrefix() 690 …PrefixTlv *FindPrefix(const Ip6::Prefix &aPrefix) { return FindPrefix(aPrefix.GetBytes(), aPrefix.… in FindPrefix() argument 770 void RemoveTemporaryDataIn(PrefixTlv &aPrefix);
|
D | network_data_publisher.hpp | 302 Error ReplacePublishedExternalRoute(const Ip6::Prefix &aPrefix, 316 bool IsPrefixAdded(const Ip6::Prefix &aPrefix) const; 327 Error UnpublishPrefix(const Ip6::Prefix &aPrefix); 465 bool Matches(const Ip6::Prefix &aPrefix) const { return mPrefix == aPrefix; } in Matches() 486 …void Publish(const Ip6::Prefix &aPrefix, uint16_t aNewFlags, Type aNewType, Requester aRequester); 507 PrefixEntry *FindOrAllocatePrefixEntry(const Ip6::Prefix &aPrefix, Requester aRequester); 508 PrefixEntry *FindMatchingPrefixEntry(const Ip6::Prefix &aPrefix); 509 const PrefixEntry *FindMatchingPrefixEntry(const Ip6::Prefix &aPrefix) const; 511 void NotifyPrefixEntryChange(Event aEvent, const Ip6::Prefix &aPrefix) const;
|
D | network_data_local.cpp | 67 bool Local::ContainsOnMeshPrefix(const Ip6::Prefix &aPrefix) const in ContainsOnMeshPrefix() 72 VerifyOrExit((tlv = FindPrefix(aPrefix)) != nullptr); in ContainsOnMeshPrefix() 93 Error Local::AddPrefix(const Ip6::Prefix &aPrefix, NetworkDataTlv::Type aSubTlvType, uint16_t aFlag… in AddPrefix() argument 99 IgnoreError(RemovePrefix(aPrefix)); in AddPrefix() 105 prefixTlv = As<PrefixTlv>(AppendTlv(sizeof(PrefixTlv) + aPrefix.GetBytesSize() + subTlvLength)); in AddPrefix() 108 prefixTlv->Init(0, aPrefix); in AddPrefix() 147 Error Local::RemovePrefix(const Ip6::Prefix &aPrefix) in RemovePrefix() argument 152 VerifyOrExit((tlv = FindPrefix(aPrefix)) != nullptr, error = kErrorNotFound); in RemovePrefix()
|
D | network_data_publisher.cpp | 102 Error Publisher::ReplacePublishedExternalRoute(const Ip6::Prefix &aPrefix, in ReplacePublishedExternalRoute() argument 112 entry = FindOrAllocatePrefixEntry(aPrefix, aRequester); in ReplacePublishedExternalRoute() 121 bool Publisher::IsPrefixAdded(const Ip6::Prefix &aPrefix) const in IsPrefixAdded() 126 entry = FindMatchingPrefixEntry(aPrefix); in IsPrefixAdded() 135 Error Publisher::UnpublishPrefix(const Ip6::Prefix &aPrefix) in UnpublishPrefix() argument 140 entry = FindMatchingPrefixEntry(aPrefix); in UnpublishPrefix() 149 Publisher::PrefixEntry *Publisher::FindOrAllocatePrefixEntry(const Ip6::Prefix &aPrefix, Requester … in FindOrAllocatePrefixEntry() argument 167 if (entry.Matches(aPrefix)) in FindOrAllocatePrefixEntry() 195 Publisher::PrefixEntry *Publisher::FindMatchingPrefixEntry(const Ip6::Prefix &aPrefix) in FindMatchingPrefixEntry() argument 197 return AsNonConst(AsConst(this)->FindMatchingPrefixEntry(aPrefix)); in FindMatchingPrefixEntry() [all …]
|
D | network_data_tlvs.hpp | 643 void Init(uint8_t aDomainId, uint8_t aPrefixLength, const uint8_t *aPrefix) in Init() argument 649 memcpy(GetPrefix(), aPrefix, Ip6::Prefix::SizeForLength(aPrefixLength)); in Init() 660 void Init(uint8_t aDomainId, const Ip6::Prefix aPrefix) in Init() argument 662 Init(aDomainId, aPrefix.GetLength(), aPrefix.GetBytes()); in Init() 717 void CopyPrefixTo(Ip6::Prefix &aPrefix) const { aPrefix.Set(GetPrefix(), GetPrefixLength()); } in CopyPrefixTo() 728 …bool IsEqual(Ip6::Prefix &aPrefix) const { return aPrefix.IsEqual(GetPrefix(), GetPrefixLength());… in IsEqual() 740 bool IsEqual(const uint8_t *aPrefix, uint8_t aPrefixLength) const in IsEqual() argument 743 … (Ip6::Prefix::MatchLength(GetPrefix(), aPrefix, Ip6::Prefix::SizeForLength(aPrefixLength)) >= in IsEqual()
|
D | network_data.cpp | 320 bool NetworkData::ContainsOnMeshPrefix(const OnMeshPrefixConfig &aPrefix) const in ContainsOnMeshPrefix() 326 while (GetNextOnMeshPrefix(iterator, aPrefix.mRloc16, prefix) == kErrorNone) in ContainsOnMeshPrefix() 328 if (prefix == aPrefix) in ContainsOnMeshPrefix() 458 void MutableNetworkData::RemoveTemporaryDataIn(PrefixTlv &aPrefix) in RemoveTemporaryDataIn() argument 460 NetworkDataTlv *cur = aPrefix.GetSubTlvs(); in RemoveTemporaryDataIn() 462 while (cur < aPrefix.GetNext()) in RemoveTemporaryDataIn() 471 ContextTlv *context = aPrefix.FindSubTlv<ContextTlv>(); in RemoveTemporaryDataIn() 516 aPrefix.SetSubTlvsLength(aPrefix.GetSubTlvsLength() - subTlvSize); in RemoveTemporaryDataIn() 552 const PrefixTlv *NetworkData::FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const in FindPrefix() argument 559 if (prefixTlv->IsEqual(aPrefix, aPrefixLength)) in FindPrefix()
|
/openthread-3.5.0/src/core/api/ |
D | border_routing_api.cpp | 95 otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix) in otBorderRoutingGetOmrPrefix() argument 97 …return AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetOmrPrefix(AsCoreType(aPrefix)); in otBorderRoutingGetOmrPrefix() 109 otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix, otRoutePref… in otBorderRoutingGetFavoredOmrPrefix() argument 117 AsCoreType(aPrefix), preference)); in otBorderRoutingGetFavoredOmrPrefix() 124 otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix) in otBorderRoutingGetOnLinkPrefix() argument 126 …urn AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetOnLinkPrefix(AsCoreType(aPrefix)); in otBorderRoutingGetOnLinkPrefix() 129 otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix) in otBorderRoutingGetFavoredOnLinkPrefix() argument 131 …oreType(aInstance).Get<BorderRouter::RoutingManager>().GetFavoredOnLinkPrefix(AsCoreType(aPrefix)); in otBorderRoutingGetFavoredOnLinkPrefix() 135 otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix) in otBorderRoutingGetNat64Prefix() argument 137 …turn AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetNat64Prefix(AsCoreType(aPrefix)); in otBorderRoutingGetNat64Prefix() [all …]
|
D | netdata_publisher_api.cpp | 96 const otIp6Prefix *aPrefix, in otNetDataReplacePublishedExternalRoute() argument 100 AsCoreType(aPrefix), AsCoreType(aConfig), NetworkData::Publisher::kFromUser); in otNetDataReplacePublishedExternalRoute() 103 bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix) in otNetDataIsPrefixAdded() argument 105 return AsCoreType(aInstance).Get<NetworkData::Publisher>().IsPrefixAdded(AsCoreType(aPrefix)); in otNetDataIsPrefixAdded() 115 otError otNetDataUnpublishPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix) in otNetDataUnpublishPrefix() argument 117 return AsCoreType(aInstance).Get<NetworkData::Publisher>().UnpublishPrefix(AsCoreType(aPrefix)); in otNetDataUnpublishPrefix()
|
D | border_router_api.cpp | 70 otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix) in otBorderRouterRemoveOnMeshPrefix() argument 75 …error = AsCoreType(aInstance).Get<BackboneRouter::Local>().RemoveDomainPrefix(AsCoreType(aPrefix)); in otBorderRouterRemoveOnMeshPrefix() 80 … error = AsCoreType(aInstance).Get<NetworkData::Local>().RemoveOnMeshPrefix(AsCoreType(aPrefix)); in otBorderRouterRemoveOnMeshPrefix() 100 otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPrefix) in otBorderRouterRemoveRoute() argument 102 … return AsCoreType(aInstance).Get<NetworkData::Local>().RemoveHasRoutePrefix(AsCoreType(aPrefix)); in otBorderRouterRemoveRoute()
|
D | ip6_api.cpp | 190 otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix) in otIp6PrefixFromString() argument 192 return AsCoreType(aPrefix).FromString(aString); in otIp6PrefixFromString() 209 void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSize) in otIp6PrefixToString() argument 213 AsCoreType(aPrefix).ToString(aBuffer, aSize); in otIp6PrefixToString() 221 void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix *aPrefix) in otIp6GetPrefix() argument 223 AsCoreType(aAddress).GetPrefix(aLength, AsCoreType(aPrefix)); in otIp6GetPrefix()
|
/openthread-3.5.0/src/core/border_router/ |
D | routing_manager.hpp | 276 Error GetOmrPrefix(Ip6::Prefix &aPrefix) const; 309 Error GetFavoredOmrPrefix(Ip6::Prefix &aPrefix, RoutePreference &aPreference) const; 324 Error GetOnLinkPrefix(Ip6::Prefix &aPrefix) const; 337 Error GetFavoredOnLinkPrefix(Ip6::Prefix &aPrefix) const; 370 Error GetNat64Prefix(Ip6::Prefix &aPrefix); 384 Error GetFavoredNat64Prefix(Ip6::Prefix &aPrefix, RoutePreference &aRoutePreference); 393 …andleDiscoverNat64PrefixDone(const Ip6::Prefix &aPrefix) { mNat64PrefixManager.HandleDiscoverDone(… in HandleDiscoverNat64PrefixDone() argument 434 static bool IsValidOmrPrefix(const Ip6::Prefix &aPrefix); 610 void FindFavoredOnLinkPrefix(Ip6::Prefix &aPrefix) const; 612 void RemoveOnLinkPrefix(const Ip6::Prefix &aPrefix); [all …]
|
D | routing_manager.cpp | 196 Error RoutingManager::GetOmrPrefix(Ip6::Prefix &aPrefix) const in GetOmrPrefix() 201 aPrefix = mOmrPrefixManager.GetGeneratedPrefix(); in GetOmrPrefix() 220 Error RoutingManager::GetFavoredOmrPrefix(Ip6::Prefix &aPrefix, RoutePreference &aPreference) const in GetFavoredOmrPrefix() argument 225 aPrefix = mOmrPrefixManager.GetFavoredPrefix().GetPrefix(); in GetFavoredOmrPrefix() 232 Error RoutingManager::GetOnLinkPrefix(Ip6::Prefix &aPrefix) const in GetOnLinkPrefix() 237 aPrefix = mOnLinkPrefixManager.GetLocalPrefix(); in GetOnLinkPrefix() 243 Error RoutingManager::GetFavoredOnLinkPrefix(Ip6::Prefix &aPrefix) const in GetFavoredOnLinkPrefix() 248 aPrefix = mOnLinkPrefixManager.GetFavoredDiscoveredPrefix(); in GetFavoredOnLinkPrefix() 250 if (aPrefix.GetLength() == 0) in GetFavoredOnLinkPrefix() 252 aPrefix = mOnLinkPrefixManager.GetLocalPrefix(); in GetFavoredOnLinkPrefix() [all …]
|
/openthread-3.5.0/src/cli/ |
D | cli_output.cpp | 178 void Output::OutputIp6Prefix(const otIp6Prefix &aPrefix) in OutputIp6Prefix() argument 182 otIp6PrefixToString(&aPrefix, string, sizeof(string)); in OutputIp6Prefix() 187 void Output::OutputIp6PrefixLine(const otIp6Prefix &aPrefix) in OutputIp6PrefixLine() argument 189 OutputIp6Prefix(aPrefix); in OutputIp6PrefixLine() 193 void Output::OutputIp6Prefix(const otIp6NetworkPrefix &aPrefix) in OutputIp6Prefix() argument 195 …OutputFormat("%x:%x:%x:%x::/64", (aPrefix.m8[0] << 8) | aPrefix.m8[1], (aPrefix.m8[2] << 8) | aPre… in OutputIp6Prefix() 196 (aPrefix.m8[4] << 8) | aPrefix.m8[5], (aPrefix.m8[6] << 8) | aPrefix.m8[7]); in OutputIp6Prefix() 199 void Output::OutputIp6PrefixLine(const otIp6NetworkPrefix &aPrefix) in OutputIp6PrefixLine() argument 201 OutputIp6Prefix(aPrefix); in OutputIp6PrefixLine()
|
D | cli_output.hpp | 392 void OutputIp6Prefix(const otIp6Prefix &aPrefix); 400 void OutputIp6PrefixLine(const otIp6Prefix &aPrefix); 408 void OutputIp6Prefix(const otIp6NetworkPrefix &aPrefix); 416 void OutputIp6PrefixLine(const otIp6NetworkPrefix &aPrefix);
|
/openthread-3.5.0/include/openthread/ |
D | border_routing.h | 276 otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix); 311 otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix, otRoutePref… 326 otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix); 340 otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix); 356 otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix); 372 otIp6Prefix *aPrefix,
|
D | netdata_publisher.h | 94 const otIp6Prefix *aPrefix, 273 const otIp6Prefix *aPrefix, 289 bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix); 320 otError otNetDataUnpublishPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix);
|
D | border_router.h | 94 otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix); 139 otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPrefix);
|