Trait zettabgp::BgpMessage [−][src]
pub trait BgpMessage { fn decode_from(
&mut self,
peer: &BgpSessionParams,
buf: &[u8]
) -> Result<(), BgpError>; fn encode_to(
&self,
peer: &BgpSessionParams,
buf: &mut [u8]
) -> Result<usize, BgpError>; }
Expand description
This trait represens BGP protocol message.
Required methods
fn decode_from(
&mut self,
peer: &BgpSessionParams,
buf: &[u8]
) -> Result<(), BgpError>
fn decode_from(
&mut self,
peer: &BgpSessionParams,
buf: &[u8]
) -> Result<(), BgpError>
Decode from buffer.