ot::Dns::Name::AppendName() method
Encodes and appends a full name to a message. The @p aName must follow "..", i.e., a sequence of labels separated by dot '.' char. E.g., "example.com", "example.com." (same as previous one), "local.", "default.service.arpa", "." or "" (root). Validates that the @p aName is a valid name format, i.e. no empty labels, and labels are `kMaxLabelLength` (63) characters or less, and the name is `kMaxLength` (255) characters or less.
Arguments
aName
A name string. Can be `nullptr` (then treated as "." or root).
aMessage
The message to append to.
Return value
kErrorNone Successfully encoded and appended the name to @p aMessage. kErrorInvalidArgs Name @p aName is not valid. kErrorNoBufs Insufficient available buffers to grow the message.
ot::Dns::Name::AppendName() is called by 5 functions and calls 2 functions:
![]()
ot::Dns::Name::AppendName()
ot::Dns::Name::AppendName():
![]()
ot::Dns::Name::AppendName()