[ip6] add Ip6::Address::IsLinkLocalUnicastOrMulticast() (#10405)

This commit adds `IsLinkLocalUnicastOrMulticast()` to `Ip6::Address`
to indicate whether the address is either a link-local unicast or a
link-local multicast address.

The existing `IsLinkLocal()` is renamed to `IsLinkLocalUnicast()` to
clarify its purpose and align its name with `IsLinkLocalMulticast()`
and the new method.
This commit is contained in:
Abtin Keshavarzian
2024-06-19 16:53:29 -07:00
committed by GitHub
parent 3345af0780
commit e581f07414
18 changed files with 44 additions and 33 deletions
+2 -2
View File
@@ -208,9 +208,9 @@ bool Agent::IsTmfMessage(const Ip6::Address &aSourceAddress, const Ip6::Address
VerifyOrExit(aDestPort == kUdpPort);
if (aSourceAddress.IsLinkLocal())
if (aSourceAddress.IsLinkLocalUnicast())
{
isTmf = aDestAddress.IsLinkLocal() || aDestAddress.IsLinkLocalMulticast();
isTmf = aDestAddress.IsLinkLocalUnicastOrMulticast();
ExitNow();
}