Expand description
Layered text rendering of MRT records.
One record becomes one indented block: session context
(TIME/TYPE/PEER/LOCAL), then the message body — UPDATE: sections
for withdrawn/announced prefixes and every path attribute, OPEN:
capabilities, session states, RIB entries, or the peer table. RFC 7606
validation findings appear under WARNINGS: when present.
The layout is our own (built from this crate’s Display vocabulary);
inspired by bgpdump’s human-readable output, not byte-compatible with
it.
Style::ansi adds terminal colors for labels, section headers,
prefixes, and next hops; the plain blocks are unchanged by it, since
styling is a post-pass over the rendered text rather than part of it.
Structs§
- Style
- ANSI styling for the text format.
Functions§
- format_
record - Render one MRT record as a layered text block.
- format_
record_ with_ hex - Render a record block with a trailing
HEX:line carrying the raw bytes (e.g. fromcrate::render::hex::encode), so the block can be pasted straight into a byte-level dissector. - format_
record_ with_ hex_ and_ style - Render a record block with a trailing
HEX:line (seeformat_record_with_hex), styled for a terminal. - format_
record_ with_ style - Render one MRT record as a layered text block, styled for a terminal.