etherparse/link/
macsec_ptype.rs

1use super::EtherType;
2
3/// Encryption & modification state of the payload
4/// of a mac sec packet including the next ether type if
5/// the payload is unencrypted & unmodified.
6#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
7pub enum MacsecPType {
8    /// Unencrypted & unmodified (`!tci.c && !tci.e`) containing
9    /// the ether type of the after the mac sec.
10    Unmodified(EtherType),
11
12    /// Unencrypted but modified payload (`tci.c && !tci.e`).
13    Modified,
14
15    /// Encrypted and modified payload (`tci.c && tci.e`).
16    Encrypted,
17
18    /// Encrypted and unmodified payload (`tci.c && !tci.e`).
19    /// This is not normal behavior.
20    ///
21    /// Normally if the "encryption" flag should always be set
22    /// together with the modification flag.
23    EncryptedUnmodified,
24}