Enum netlink_packet_xfrm::XfrmMessage
source · pub enum XfrmMessage {
Show 27 variants
AddPolicy(PolicyModifyMessage),
DeletePolicy(PolicyDelGetMessage),
GetPolicy(PolicyDelGetMessage),
GetSpdInfo(GetSpdInfoMessage),
NewSpdInfo(NewSpdInfoMessage),
UpdatePolicy(PolicyModifyMessage),
FlushPolicy(PolicyFlushMessage),
SetPolicyDefault(DefaultMessage),
GetPolicyDefault(DefaultMessage),
AddSa(StateModifyMessage),
AllocSpi(AllocSpiMessage),
DeleteSa(StateDelGetMessage),
FlushSa(StateFlushMessage),
GetSa(StateDelGetMessage),
GetDumpSa(GetDumpMessage),
GetSadInfo(GetSadInfoMessage),
NewSadInfo(NewSadInfoMessage),
UpdateSa(StateModifyMessage),
Acquire(AcquireMessage),
Expire(ExpireMessage),
GetAsyncEvent(GetAsyncEventMessage),
NewAsyncEvent(NewAsyncEventMessage),
PolicyExpire(PolicyExpireMessage),
Report(ReportMessage),
Mapping(MappingMessage),
Migrate(MigrateMessage),
Other((u16, Vec<u8>)),
}
Variants§
AddPolicy(PolicyModifyMessage)
DeletePolicy(PolicyDelGetMessage)
GetPolicy(PolicyDelGetMessage)
GetSpdInfo(GetSpdInfoMessage)
NewSpdInfo(NewSpdInfoMessage)
UpdatePolicy(PolicyModifyMessage)
FlushPolicy(PolicyFlushMessage)
SetPolicyDefault(DefaultMessage)
GetPolicyDefault(DefaultMessage)
AddSa(StateModifyMessage)
AllocSpi(AllocSpiMessage)
DeleteSa(StateDelGetMessage)
FlushSa(StateFlushMessage)
GetSa(StateDelGetMessage)
GetDumpSa(GetDumpMessage)
GetSadInfo(GetSadInfoMessage)
NewSadInfo(NewSadInfoMessage)
UpdateSa(StateModifyMessage)
Acquire(AcquireMessage)
Expire(ExpireMessage)
GetAsyncEvent(GetAsyncEventMessage)
NewAsyncEvent(NewAsyncEventMessage)
PolicyExpire(PolicyExpireMessage)
Report(ReportMessage)
Mapping(MappingMessage)
Migrate(MigrateMessage)
Other((u16, Vec<u8>))
Implementations§
source§impl XfrmMessage
impl XfrmMessage
pub fn message_type(&self) -> u16
Trait Implementations§
source§impl Clone for XfrmMessage
impl Clone for XfrmMessage
source§fn clone(&self) -> XfrmMessage
fn clone(&self) -> XfrmMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for XfrmMessage
impl Debug for XfrmMessage
source§impl Emitable for XfrmMessage
impl Emitable for XfrmMessage
source§impl From<XfrmMessage> for NetlinkPayload<XfrmMessage>
impl From<XfrmMessage> for NetlinkPayload<XfrmMessage>
source§fn from(message: XfrmMessage) -> Self
fn from(message: XfrmMessage) -> Self
Converts to this type from the input type.
source§impl NetlinkDeserializable for XfrmMessage
impl NetlinkDeserializable for XfrmMessage
type Error = DecodeError
source§fn deserialize(
header: &NetlinkHeader,
payload: &[u8]
) -> Result<Self, Self::Error>
fn deserialize( header: &NetlinkHeader, payload: &[u8] ) -> Result<Self, Self::Error>
Deserialize the given buffer into
Self
.source§impl NetlinkSerializable for XfrmMessage
impl NetlinkSerializable for XfrmMessage
fn message_type(&self) -> u16
source§fn buffer_len(&self) -> usize
fn buffer_len(&self) -> usize
Return the length of the serialized data. Read more
source§fn serialize(&self, buffer: &mut [u8])
fn serialize(&self, buffer: &mut [u8])
Serialize this types and write the serialized data into the given
buffer.
buffer
’s length is exactly InnerMessage::buffer_len()
.
It means that if InnerMessage::buffer_len()
is buggy and does not
return the appropriate length, bad things can happen: Read moresource§impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<XfrmBuffer<&'a T>, u16> for XfrmMessage
impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<XfrmBuffer<&'a T>, u16> for XfrmMessage
source§fn parse_with_param(
buf: &XfrmBuffer<&'a T>,
message_type: u16
) -> Result<Self, DecodeError>
fn parse_with_param( buf: &XfrmBuffer<&'a T>, message_type: u16 ) -> Result<Self, DecodeError>
Deserialize the current type.
source§impl PartialEq<XfrmMessage> for XfrmMessage
impl PartialEq<XfrmMessage> for XfrmMessage
source§fn eq(&self, other: &XfrmMessage) -> bool
fn eq(&self, other: &XfrmMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for XfrmMessage
impl StructuralEq for XfrmMessage
impl StructuralPartialEq for XfrmMessage
Auto Trait Implementations§
impl RefUnwindSafe for XfrmMessage
impl Send for XfrmMessage
impl Sync for XfrmMessage
impl Unpin for XfrmMessage
impl UnwindSafe for XfrmMessage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more