#[repr(u8)]pub enum OpCode {
ControlV1 = 4,
AckV1 = 5,
DataV1 = 6,
HardResetClientV2 = 7,
HardResetServerV2 = 8,
SoftResetV1 = 3,
DataV2 = 9,
HardResetClientV3 = 10,
ControlWkcV1 = 11,
}Expand description
OpenVPN packet opcode (high 5 bits of first byte)
Variants§
ControlV1 = 4
Control channel packet with reliability layer (P_CONTROL_V1)
AckV1 = 5
Acknowledgment packet (P_ACK_V1)
DataV1 = 6
Data channel packet with current key (P_DATA_V1)
HardResetClientV2 = 7
Hard reset from client v2 (P_CONTROL_HARD_RESET_CLIENT_V2)
HardResetServerV2 = 8
Hard reset from server v2 (P_CONTROL_HARD_RESET_SERVER_V2)
SoftResetV1 = 3
Soft reset v1 (P_CONTROL_SOFT_RESET_V1)
DataV2 = 9
Data channel v2 with peer-id (P_DATA_V2)
HardResetClientV3 = 10
Hard reset from client v3 (P_CONTROL_HARD_RESET_CLIENT_V3) - with tls-crypt-v2
ControlWkcV1 = 11
Control channel with tls-crypt (P_CONTROL_WKC_V1)
Implementations§
Source§impl OpCode
impl OpCode
Sourcepub fn is_control(&self) -> bool
pub fn is_control(&self) -> bool
Check if this is a control channel opcode
Sourcepub fn is_hard_reset(&self) -> bool
pub fn is_hard_reset(&self) -> bool
Check if this is a hard reset opcode
Trait Implementations§
impl Copy for OpCode
impl Eq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl Freeze for OpCode
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
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