Skip to main content

encode_payload

Function encode_payload 

Source
pub fn encode_payload(ad: &CdpAdvertisement) -> Result<Vec<u8>>
Expand description

Serialise an advertisement to a CDP payload, checksum included.

TLVs are emitted in ascending type order, which is what real Cisco devices do and what makes the output diffable against a capture.