//! Bidirectional Forwarding Detection (BFD, RFC 5880 / RFC 5881) Layer 3 wire builder.
//!
//! Serializes a [`BfdSpec`] into a 24-byte RFC 5880 BFD Version 1 Control packet carried over
//! UDP destination port `3784` (single-hop, RFC 5881) or custom multihop ports (`4784`, RFC 5883).
//! Byte 0 packs the 3-bit `Vers` (`1`) in bits `7..5` and the 5-bit Diagnostic code (`DIAG`, default
//! `0`) in bits `4..0`. Byte 1 encodes the 2-bit session `State` (`STATE`, default `3` Up) in bits
//! `7..6`, followed by `Detect Mult` (`MULT`, default `3`), `Length` (`24`), 32-bit `My Discriminator`
//! (`MY_DISC`), 32-bit `Your Discriminator` (`YOUR_DISC`), and 32-bit `MIN_TX` / `MIN_RX` timers.
//!
//! Canonical `.fasm` syntax:
//! `a -> b BFD [STATE <0..3>] [DIAG <0..31>] [MY_DISC <u32>] [YOUR_DISC <u32>] [MIN_TX <u32>] [MIN_RX <u32>] [MULT <u8>]`
use crate*;
use Vec;
/// Builds an RFC 5880 BFD Control packet payload over UDP destination port `3784`.