pub struct ManagedSa {
pub sa: SecurityAssociation,
pub state: SaState,
pub key_id: Option<u16>,
}Expand description
A managed Security Association with lifecycle state.
Fields§
§sa: SecurityAssociationThe underlying SA parameters.
state: SaStateCurrent lifecycle state.
key_id: Option<u16>Assigned encryption key ID (if keyed).
Implementations§
Source§impl ManagedSa
impl ManagedSa
Sourcepub fn new(spi: u16, service_type: ServiceType) -> Result<Self, Error>
pub fn new(spi: u16, service_type: ServiceType) -> Result<Self, Error>
Creates a new SA in UNKEYED state.
Sourcepub fn rekey(&mut self, key_id: u16) -> Result<(), Error>
pub fn rekey(&mut self, key_id: u16) -> Result<(), Error>
Assign a key to this SA (UNKEYED → KEYED).
Per Section 3.3.3.3.4: SA must be in the Unkeyed state.
Sourcepub fn start(&mut self) -> Result<(), Error>
pub fn start(&mut self) -> Result<(), Error>
Activate the SA for operations (KEYED → OPERATIONAL).
Auto Trait Implementations§
impl Freeze for ManagedSa
impl RefUnwindSafe for ManagedSa
impl Send for ManagedSa
impl Sync for ManagedSa
impl Unpin for ManagedSa
impl UnsafeUnpin for ManagedSa
impl UnwindSafe for ManagedSa
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