#[repr(u8)]pub enum PP2Tlvs {
TypeAlpn(Vec<Vec<u8>>),
TypeAuthority(String),
TypeCrc32c(u32),
TypeNoop = 4,
TypeUniqId(Vec<u8>),
TypeSsl {
client: PP2TlvClient,
verify: u32,
},
TypeSubtypeSslVersion(Cow<'static, str>),
TypeSubtypeSslCn(Cow<'static, str>),
TypeSubtypeSslCipher(Cow<'static, str>),
TypeSubtypeSslSigAlg(Cow<'static, str>),
TypeSubtypeSslKeyAlg(Cow<'static, str>),
TypeNetNs(String),
}Expand description
Can be used for testing.
Variants§
TypeAlpn(Vec<Vec<u8>>)
Application-Layer Protocol Negotiation (ALPN).
TypeAuthority(String)
“SNI” i.e the “server_name” extension as defined by RFC3546 UTF8-encoded string
TypeCrc32c(u32)
32-bit number storing the CRC32c checksum of the PROXY protocol header
TypeNoop = 4
The TLV of this type should be ignored when parsed. The value is zero or more bytes. Can be used for data padding or alignment. Note that it can be used to align only by 3 or more bytes because a TLV can not be smaller than that.
TypeUniqId(Vec<u8>)
opaque byte sequence of up to 128 bytes generated by the upstream proxy that uniquely identifies the connection.
TypeSsl
SSL properties
TypeSubtypeSslVersion(Cow<'static, str>)
US-ASCII string representation of the TLS version (format?)
TypeSubtypeSslCn(Cow<'static, str>)
In all cases, the string representation (in UTF8) of the Common Name field (OID: 2.5.4.3) of the client certificate’s Distinguished Name, is appended using the TLV format and the type PP2_SUBTYPE_SSL_CN. E.g. “example.com”.
TypeSubtypeSslCipher(Cow<'static, str>)
US-ASCII string name of the used cipher, for example “ECDHE-RSA-AES128-GCM-SHA256”.
TypeSubtypeSslSigAlg(Cow<'static, str>)
US-ASCII string name of the algorithm used to sign the certificate presented by the frontend when the incoming connection was made over an SSL/TLS transport layer, for example “SHA256”.
TypeSubtypeSslKeyAlg(Cow<'static, str>)
US-ASCII string name of the algorithm used to generate the key of the certificate presented by the frontend when the incoming connection was made over an SSL/TLS transport layer, for example “RSA2048”.
TypeNetNs(String)
US-ASCII string representation of the namespace’s name
Implementations§
Source§impl PP2Tlvs
impl PP2Tlvs
Sourcepub const TLV_TYPE_MAIN_RANGES: &'static [RangeInclusive<u8>]
pub const TLV_TYPE_MAIN_RANGES: &'static [RangeInclusive<u8>]
A constraints by range of all types.
Sourcepub const TLV_TYPE_SSL_SUB_RANGE: &'static [RangeInclusive<u8>]
pub const TLV_TYPE_SSL_SUB_RANGE: &'static [RangeInclusive<u8>]
A constraints for the SSL subtypes.
pub const TYPE_ALPN: u8 = 1u8
pub const TYPE_AUTHORITY: u8 = 2u8
pub const TYPE_CRC32C: u8 = 3u8
pub const TYPE_NOOP: u8 = 4u8
pub const TYPE_UNIQID: u8 = 5u8
pub const TYPE_SSL: u8 = 32u8
pub const TYPE_SUBTYPE_SSL_VERSION: u8 = 33u8
pub const TYPE_SUBTYPE_SSL_CN: u8 = 34u8
pub const TYPE_SUBTYPE_SSL_CIPHER: u8 = 35u8
pub const TYPE_SUBTYPE_SSL_SIGALG: u8 = 36u8
pub const TYPE_SUBTYPE_SSL_KEYALG: u8 = 37u8
pub const TYPE_NETNS: u8 = 48u8
pub fn contains_subtype(&self) -> bool
pub fn conntains_subtype_discr(discr: u8) -> bool
Trait Implementations§
Source§impl PP2TlvDump for PP2Tlvs
impl PP2TlvDump for PP2Tlvs
Source§impl PP2TlvRestore for PP2Tlvs
Implementation of the PP2TlvRestore for the build-in protocol PP2Tlvs items.
impl PP2TlvRestore for PP2Tlvs
Implementation of the PP2TlvRestore for the build-in protocol PP2Tlvs items.
Source§fn contains_subtype(&self) -> bool
fn contains_subtype(&self) -> bool
true if the current instance contains subtypes.Source§fn is_in_range(tlv_type: u8, tlv_parent_type: Option<u8>) -> bool
fn is_in_range(tlv_type: u8, tlv_parent_type: Option<u8>) -> bool
tlv_parent_type parent. If
tlv_parent_type is None then the tlv_type can be checked against the
main range. The tlv_parent_type is set when the current tlv_type is a
subset of the parent. Read more