Appends a pointer type name label to a message. Pointer label is used for name compression. It allows an entire name or a list of labels at the end of an encoded name to be replaced with a pointer to a prior occurrence of the same name within the message.
Finds the offset range of the TLV value for a given TLV type within @p aMessage. Can be used independent of whether the read TLV (from message) is an Extended TLV or not.
Parses and compares a full name from a message with a given name. Checks whether the encoded name in a message matches a given name string (using case-insensitive comparison). It checks the name in the message in place and handles compressed names. If the name read from the message does not match @p aName, it returns `kErrorNotFound`. `kErrorNone` indicates that the name matches @p aName. 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).
Parses and skips over a full name in a message.
Appends a TLV to the end of the message. On success, this method grows the message by the size of the TLV.
Searches for and reads a requested TLV out of a given message. Can be used independent of whether the read TLV (from message) is an Extended TLV or not.
Initializes the `OffsetRange` from a given `Message` from its offset to the message end. The start offset of the range is set to `aMessage.GetOffset()`, and the end offset is set to include all bytes in the message up to its current length `aMessage.GetLength()`.
Adds a message at a given position (head/tail) of the list.
Reads a full name from a message. On successful read, the read name follows "...", i.e., a sequence of labels separated by dot '.' character. The read name will ALWAYS end with a dot. Verifies that the labels after the first label in message do not contain any dot character. If they do, returns `kErrorParse`.
Parses and skips over a given number of resource records in a message from a given offset.
Appends bytes read from another or potentially the same message to the end of the current message. On success, this method grows the message by @p aLength bytes.
Removes a message from the list.
Appends a name label terminator to a message. An encoded name is terminated by an empty label (a zero byte).
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.
Parses the IPv6 and UDP/TCP/ICMP6 headers from a given message.
Parses the TLV from a given message at given offset, ensures the TLV is well-formed and its header and value are fully contained in the message. Can be used independent of whether the TLV is an Extended TLV or not.
Sets the name from a message at a given offset.
Parses and validates the IPv6 Option from a given message. The Option is read from @p aOffset in @p aMessage. This method then checks that the entire Option is present within @p aOffsetRange.
Searches in a given message starting from message offset for a TLV of given type and if found, parses the TLV and validates that the entire TLV is present in the message. Can be used independent of whether the TLV is an Extended TLV or not.
Encodes and appends a single name label to a message. The @p aLabel is assumed to contain a single name label as a C string (null-terminated). Unlike `AppendMultipleLabels()` which parses the label string and treats it as sequence of multiple (dot-separated) labels, this method always appends @p aLabel as a single whole label. This allows the label string to even contain dot '.' character, which, for example, is useful for "Service Instance Names" where portion is a user-friendly name and can contain dot characters.
Reads a name label from a message. Can be used to read labels one by one in a name. After a successful label read, @p aOffset is updated to point to the start of the next label. When we reach the end of the name, kErrorNotFound is returned. This method handles compressed names which use pointer labels. So as the labels in a name are read, the @p aOffset may jump back in the message and at the end the @p aOffset does not necessarily point to the end of the original name field. Unlike `ReadName()` which requires and verifies that the read label to contain no dot '.' character, this method allows the read label to include any character.
Appends an array of `TxtEntry` items to a message.
Decompresses lowpan frame and parses the IPv6 and UDP/TCP/ICMP6 headers.
Encodes and appends the `TxtEntry` to a message.
Removes a message from the queue and frees it.
Verifies the checksum in a given message (if UDP/ICMP6).
Calculates and then updates the checksum in a given message (if TCP/UDP/ICMPv6).
Appends a TLV with a given type and value to a message. If the TLV length is longer than maximum base TLV size defined by `kBaseTlvMaxLength` then appends extended TLV. On success this method grows the message by the size of the TLV.
Appends bytes read from a given message to the `FrameBuilder`.
Compresses an IPv6 header.
Initializes the `Appender` to append to a `Message`. New content is appended to the end of @p aMessage, growing its length.
Searches in a given message to find the first resource record matching a given record name.
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.
Searches among the Options is a given message and reads and validates the Update Lease Option if found. Reads the Update Lease Option whether it follows the short or long variant formats.
Parses and validates the IPv6 header from a given message. The header is read from @p aMessage at offset zero.
Decompresses a LOWPAN_NHC UDP header. If the header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes.
Removes a message from the list.
Searches within a given message for Channel Mask TLV, parses and validates the TLV value and returns the combined channel mask for all supported channel pages included in the TLV.
Sends an ICMPv6 error message.
Encodes and appends a sequence of name labels to a given message. The @p aLabels must follow "..", i.e., a sequence of labels separated by dot '.' char. E.g., "_http._tcp", "_http._tcp." (same as previous one), "host-1.test". Validates that the @p aLabels is a valid name format, i.e., no empty label, and labels are `kMaxLabelLength` (63) characters or less.
Compares a single name label from a message with a given label string. Can be used to compare labels one by one. It checks whether the label read from @p aMessage matches @p aLabel string (case-insensitive comparison). Unlike `CompareName()` which requires the labels in the the name string to contain no dot '.' character, this method allows @p aLabel to include any character.
Parses and reads the SRV target host name from a message. Also verifies that the SRV record is well-formed (e.g., the record data length `GetLength()` matches the SRV encoded name).
Initializes the `OffsetRange` from a given `Message` from zero offset up to to its full length. The start offset of the range is set to zero, and the end offset is set to include full length of @p aMessage.
Writes bytes read from another or potentially the same message to the message at a given offset. Will not resize the message. The bytes to write (with @p aLength) MUST fit within the existing message buffer (from the given @p aWriteOffset up to the message's length). Can be used to copy bytes within the same message in either direction, i.e., copy forward where `aWriteOffset > aReadOffset` or copy backward where `aWriteOffset < aReadOffset`.
Adds a message to the queue.
Prepares a Channel Mask TLV value and appends the TLV to a given message.
Encodes and appends the name to a message. If the name is empty (not specified), then root "." is appended to @p aMessage. If the name is from a C string then the string is checked and appended (similar to static `AppendName(const char *aName, Message &)` method). If the the name is from a message, then it is read from the message and appended to @p aMessage. Note that in this case independent of whether the name is compressed or not in its original message, the name is appended as full (uncompressed) in @p aMessage.
Parses and reads the TXT record data from a message. Also checks if the TXT data is well-formed by calling `VerifyTxtData()` when it is successfully read.
Reads the challenge bytes from given message. If the given @p aLength is longer than `kMaxSize`, only `kMaxSize` bytes will be read.
Removes a message from the queue and frees it.
Provides a received message to the SecureTransport object.
Checks and handles a received message provided to the SecureTransport object. If checks based on the message info and current connection state pass, the message is processed.
Handles a received UDP message with offset set to the payload.
Removes a message for indirect transmission to a sleepy child.
Decompresses a LOWPAN_IPHC header. If the header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes.
Parses and compares multiple name labels from a message. Can be used to read and compare a group of labels from an encoded DNS name in a message with possibly more labels remaining to read. The @p aLabels must follow "..", i.e., a sequence of labels separated by dot '.' char.
Appends the bytes from `Heap::Data` to a given message.
Indicates whether or not the IPv6 datagram passes the filter.
Sends data within the session.
Notifies MLE whether the Child ID Request message was transmitted successfully.
Returns the destination for a supervision message.
Sends a UDP message using a socket.
Handles a received UDP message.
Parses and validates the IPv4 header from a given message. The header is read from @p aMessage at offset zero.
Sends an ICMPv6 Echo Request message.
Handles an ICMPv6 message.
Processes an MPL option. When the MPL module acts as an MPL Forwarder it disseminates MPL Data Message using Trickle timer expirations. When acts as an MPL Seed it allows to send the first MPL Data Message directly, then sets up Trickle timer expirations for subsequent retransmissions.
Reads a TLV's value in a message at a given offset expecting a minimum length for the value. Can be used independent of whether the read TLV (from the message) is an Extended TLV or not.
Adds a message for indirect transmission to a sleepy child.
Decompresses the IPv6 ECN field in a LOWPAN_IPHC header.
Updates the compressed ECN field in a LOWPAN_IPHC header to `kEcnMarked`. MUST be used when the ECN field is not elided in the IPHC header. Note that the ECN is not elided when it is not zero (`kEcnNotCapable`).
Is used by non-Leader devices to set Network Data by reading it from a message from Leader.
Determines whether to send an ICMPv6 Destination Unreachable error to the sender based on reachability and source address. Specifically, if the Border Router (BR) decides to forward a unicast IPv6 message outside the AIL and the message's source address matches a BR-generated ULA OMR prefix (with low preference), and the destination is unreachable using this source address, then an ICMPv6 Destination Unreachable message is sent back to the sender.
Appends the footer data to the end of a given message.
Reads the footer data from a given message. Caller MUST ensure data was successfully appended to the message beforehand. Otherwise behavior is undefined.
Updates the footer data in a given message (rewriting over the previously appended data). Caller MUST ensure data was successfully appended to the message beforehand. Otherwise behavior is undefined.
Removes the footer data from a given message. Caller MUST ensure data was successfully appended to the message beforehand. Otherwise behavior is undefined.
Is used to pass UDP messages to the secure CoAP server.
Parses and reads the CNAME alias name from a message. Also verifies that the CNAME record is well-formed (e.g., the record data length `GetLength()` matches the CNAME encoded name).
Parses and reads the SIG signer name from a message.
Processes a received TCP segment.