Trait zettabgp::BgpMessage
source · pub trait BgpMessage {
// Required methods
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§
sourcefn decode_from(
&mut self,
peer: &BgpSessionParams,
buf: &[u8]
) -> Result<(), BgpError>
fn decode_from( &mut self, peer: &BgpSessionParams, buf: &[u8] ) -> Result<(), BgpError>
Decode from buffer.