Module wire

Module wire 

Source
Expand description

Shared TLV encoding/decoding helpers for discovery packet builders.

Structs§

RawData
Parse Data name and Content from raw wire bytes.
RawInterest
Parsed fields from a raw Interest TLV without digest validation.

Functions§

encode_name_tlv
Encode a standalone Name TLV and return its wire bytes.
parse_name_from_tlv
Parse a Name from a slice that starts with a Name TLV (type 0x07).
parse_raw_data
parse_raw_interest
Parse Interest name and AppParams from raw wire bytes without validating the ParametersSha256DigestComponent that Interest::decode requires.
unwrap_lp
If raw is an LP-framed packet (0x64), extract and return the inner fragment bytes. Otherwise return raw unchanged.
write_name_tlv
Write a Name TLV (type 0x07) into a TlvWriter.
write_nni
Encode a non-negative integer as the minimal-width big-endian representation.