encode_interest

Function encode_interest 

Source
pub fn encode_interest(name: &Name, app_params: Option<&[u8]>) -> Bytes
Expand description

Encode a minimal Interest TLV.

Includes:

  • Name built from name
  • Nonce (4 bytes, process-local counter XOR process ID — sufficient for loop detection; not cryptographically random)
  • InterestLifetime fixed at 4 000 ms
  • ApplicationParameters (TLV type 0x24) if app_params is Some

The returned Bytes is a complete, self-contained TLV suitable for direct transmission over any NDN face.