openthread-br  0.3.0-72c0388
Functions
dns_utils.hpp File Reference
#include "openthread-br/config.h"
#include <string>

Go to the source code of this file.

Functions

std::string otbr::DnsUtils::UnescapeInstanceName (const std::string &aName)
 
void otbr::DnsUtils::CheckHostnameSanity (const std::string &aHostName)
 
void otbr::DnsUtils::CheckServiceNameSanity (const std::string &aServiceName)
 

Detailed Description

This file includes definition for DNS utilities.

Function Documentation

◆ CheckHostnameSanity()

void otbr::DnsUtils::CheckHostnameSanity ( const std::string &  aHostName)

This function checks a given host name for sanity.

Check criteria: The host name must ends with dot.

Parameters
[in]aHostNameThe host name to check.

◆ CheckServiceNameSanity()

void otbr::DnsUtils::CheckServiceNameSanity ( const std::string &  aServiceName)

This function checks a given service name for sanity.

Check criteria: The service name must contain exactly one dot. The service name must not end with dot.

Parameters
[in]aServiceNameThe service name to check.

◆ UnescapeInstanceName()

std::string otbr::DnsUtils::UnescapeInstanceName ( const std::string &  aName)

This function unescapes a DNS Service Instance name according to "DNS Name Escaping".

See also
"Notes on DNS Name Escaping" at https://opensource.apple.com/source/mDNSResponder/mDNSResponder-1310.140.1/mDNSShared/dns_sd.h.auto.html.
Parameters
[in]aNameThe DNS Service Instance name to unescape.
Returns
The unescaped DNS Service Instance name.