pub struct PacketHeader {
pub opcode: OpCode,
pub key_id: KeyId,
pub session_id: Option<SessionId>,
pub hmac: Option<[u8; 32]>,
pub packet_id: Option<PacketId>,
pub timestamp: Option<u32>,
}Expand description
OpenVPN packet header
Fields§
§opcode: OpCodePacket opcode
key_id: KeyIdKey ID for data channel
session_id: Option<SessionId>Local session ID (for control channel)
hmac: Option<[u8; 32]>HMAC (if tls-auth enabled)
packet_id: Option<PacketId>Packet ID (for replay protection with tls-auth)
timestamp: Option<u32>Timestamp (for tls-auth)
Implementations§
Trait Implementations§
Source§impl Clone for PacketHeader
impl Clone for PacketHeader
Source§fn clone(&self) -> PacketHeader
fn clone(&self) -> PacketHeader
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for PacketHeader
impl RefUnwindSafe for PacketHeader
impl Send for PacketHeader
impl Sync for PacketHeader
impl Unpin for PacketHeader
impl UnwindSafe for PacketHeader
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