openthread-br  0.3.0-72c0388
Classes | Functions
dns_utils.hpp File Reference
#include "common/types.hpp"

Go to the source code of this file.

Classes

struct  DnsNameInfo
 

Functions

DnsNameInfo SplitFullDnsName (const std::string &aName)
 
otbrError SplitFullServiceName (const std::string &aFullName, std::string &aType, std::string &aDomain)
 
otbrError SplitFullServiceInstanceName (const std::string &aFullName, std::string &aInstanceName, std::string &aType, std::string &aDomain)
 
otbrError SplitFullHostName (const std::string &aFullName, std::string &aHostName, std::string &aDomain)
 

Detailed Description

This file includes DNS utilities.

Function Documentation

◆ SplitFullDnsName()

DnsNameInfo SplitFullDnsName ( const std::string &  aName)

This method splits a full DNS name into name components.

Parameters
[in]aNameThe full DNS name to dissect.
Returns
A DnsNameInfo structure containing DNS name information.
See also
DnsNameInfo

◆ SplitFullHostName()

otbrError SplitFullHostName ( const std::string &  aFullName,
std::string &  aHostName,
std::string &  aDomain 
)

This function splits a full host name into components.

Parameters
[in]aFullNameThe full host name to split.
[out]aHostNameA reference to a string to receive the host name.
[out]aDomainA reference to a string to receive the domain.
Return values
OTBR_ERROR_NONESuccessfully split the full host name.
OTBR_ERROR_INVALID_ARGSIf the full host name is not valid.

◆ SplitFullServiceInstanceName()

otbrError SplitFullServiceInstanceName ( const std::string &  aFullName,
std::string &  aInstanceName,
std::string &  aType,
std::string &  aDomain 
)

This function splits a full service instance name into components.

Parameters
[in]aFullNameThe full service instance name to split.
[out]aInstanceNameA reference to a string to receive the instance name.
[out]aTypeA reference to a string to receive the service type.
[out]aDomainA reference to a string to receive the domain.
Return values
OTBR_ERROR_NONESuccessfully split the full service instance name.
OTBR_ERROR_INVALID_ARGSIf the full service instance name is not valid.

◆ SplitFullServiceName()

otbrError SplitFullServiceName ( const std::string &  aFullName,
std::string &  aType,
std::string &  aDomain 
)

This function splits a full service name into components.

Parameters
[in]aFullNameThe full service name to split.
[out]aTypeA reference to a string to receive the service type.
[out]aDomainA reference to a string to receive the domain.
Return values
OTBR_ERROR_NONESuccessfully split the full service name.
OTBR_ERROR_INVALID_ARGSIf the full service name is not valid.