encode_lp_packet

Function encode_lp_packet 

Source
pub fn encode_lp_packet(packet: &[u8]) -> Bytes
Expand description

Wrap a bare Interest or Data in a minimal NDNLPv2 LpPacket.

If the packet is already an LpPacket (starts with 0x64), returns it unchanged.

LpPacket (0x64)
  Fragment (0x50)
    <original packet wire bytes>