ot::Dns::Name::Matches() const method
Matches the `Name` with a given set of labels and domain name. This method allows the caller to specify name components separately, enabling scenarios like comparing "service instance name" with separate instance label (which can include dot character), service type, and domain strings. @p aFirstLabel can be `nullptr` if not needed. But if non-null, it is treated as a single label and can itself include dot `.` character. The @p aLabels MUST NOT be `nullptr` and MUST follow "..", i.e., a sequence of one or more labels separated by dot '.' char, and it MUST NOT end with dot `.`. @p aDomain MUST NOT be `nullptr` and MUST have at least one label and MUST always end with a dot `.` character. If the above conditions are not satisfied, the behavior of this method is undefined.
Arguments
aFirstLabel
A first label to check. Can be `nullptr`.
aLabels
A string of dot separated labels, MUST NOT end with dot.
aDomain
Domain name. MUST end with dot.
Return value
TRUE The name matches the given components. FALSE The name does not match the given components.
ot::Dns::Name::Matches() const calls 6 functions:
![]()
ot::Dns::Name::Matches() const
ot::Dns::Name::Matches() const reads 4 variables:
![]()
ot::Dns::Name::Matches() const