Struct zettabgp::BgpSessionParams[][src]

pub struct BgpSessionParams {
    pub as_num: u32,
    pub hold_time: u16,
    pub peer_mode: BgpTransportMode,
    pub has_as32bit: bool,
    pub router_id: Ipv4Addr,
    pub caps: HashSet<BgpCapability>,
}
Expand description

BGP session parameters - AS, hold time, capabilities etc.

Fields

as_num: u32

Autonomous system number.

hold_time: u16

Hold time in seconds.

peer_mode: BgpTransportMode

IP transport mode.

has_as32bit: bool

Flag that session has 32-bit AS numbers capability.

router_id: Ipv4Addr

Router ID.

caps: HashSet<BgpCapability>

Capability set for this session.

Implementations

Constructs BGP OPEN message from params.

Check capability set and validates has_as32bit flag.

Decode message head from buffer. Returns following message kind and length.

Receive message head from buffer. Returns following message kind and length.

Stores BGP message head (19 bytes) into the buffer.

Writes buffer with BGP message into the target.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.