Init()
Initializes the PTR Resource Record by setting its type and class. Other record fields (TTL, length) remain unchanged/uninitialized.
ReadPtrName() const
Parses and reads the PTR name from a message. Also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches the PTR encoded name). Unlike the previous method which reads the entire PTR name into a single char buffer, this method reads the first label separately and into a different buffer @p aLabelBuffer and the rest of the name into @p aNameBuffer. The @p aNameBuffer can be set to `nullptr` if the caller is only interested in the first label. This method is intended for "Service Instance Name" where first label (`` portion) can be a user-friendly string and can contain dot character.
ReadPtrName() const
Parses and reads the PTR name from a message. Also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches the PTR encoded name). Unlike the previous method which reads the entire PTR name into a single char buffer, this method reads the first label separately and into a different buffer @p aLabelBuffer and the rest of the name into @p aNameBuffer. The @p aNameBuffer can be set to `nullptr` if the caller is only interested in the first label. This method is intended for "Service Instance Name" where first label (`` portion) can be a user-friendly string and can contain dot character.
ReadPtrName() const
Parses and reads the PTR name from a message. Also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches the PTR encoded name). Unlike the previous method which reads the entire PTR name into a single char buffer, this method reads the first label separately and into a different buffer @p aLabelBuffer and the rest of the name into @p aNameBuffer. The @p aNameBuffer can be set to `nullptr` if the caller is only interested in the first label. This method is intended for "Service Instance Name" where first label (`` portion) can be a user-friendly string and can contain dot character.