PP2Tlvs

Enum PP2Tlvs 

Source
#[repr(u8)]
pub enum PP2Tlvs<'zc> {
Show 14 variants TypeAlpn(Cow<'zc, [Cow<'zc, [u8]>]>), TypeAuthority(Cow<'zc, str>), TypeCrc32c(u32), TypeNoop = 4, TypeUniqId(Cow<'zc, [u8]>), TypeSsl { client: PP2TlvClient, verify: u32, }, TypeSubtypeSslVersion(Cow<'zc, str>), TypeSubtypeSslCn(Cow<'zc, str>), TypeSubtypeSslCipher(Cow<'zc, str>), TypeSubtypeSslSigAlg(Cow<'zc, str>), TypeSubtypeSslKeyAlg(Cow<'zc, str>), TypeSubTypeSslGroup(Cow<'zc, str>), TypeSubTypeSslSigScheme(Cow<'zc, str>), TypeNetNs(Cow<'zc, str>),
}
Expand description

Can be used for testing.

Variants§

§

TypeAlpn(Cow<'zc, [Cow<'zc, [u8]>]>)

Application-Layer Protocol Negotiation (ALPN).

§

TypeAuthority(Cow<'zc, str>)

“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(Cow<'zc, [u8]>)

opaque byte sequence of up to 128 bytes generated by the upstream proxy that uniquely identifies the connection.

§

TypeSsl

SSL properties

Fields

§verify: u32
§

TypeSubtypeSslVersion(Cow<'zc, str>)

US-ASCII string representation of the TLS version (format?)

§

TypeSubtypeSslCn(Cow<'zc, 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<'zc, str>)

US-ASCII string name of the used cipher, for example “ECDHE-RSA-AES128-GCM-SHA256”.

§

TypeSubtypeSslSigAlg(Cow<'zc, 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<'zc, 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”.

§

TypeSubTypeSslGroup(Cow<'zc, str>)

US-ASCII string name of the key exchange algorithm used for the frontend TLS connection, for example “secp256r1”.

§

TypeSubTypeSslSigScheme(Cow<'zc, str>)

US-ASCII string name of the algorithm the frontend used to sign the ServerKeyExchange or CertificateVerify message, for example “rsa_pss_rsae_sha256”.

§

TypeNetNs(Cow<'zc, str>)

US-ASCII string representation of the namespace’s name

Implementations§

Source§

impl<'zc> PP2Tlvs<'zc>

Source

pub const TLV_TYPE_MAIN_RANGES: &'static [RangeInclusive<u8>]

A constraints by range of all types.

Source

pub const TLV_TYPE_SSL_SUB_RANGE: &'static [RangeInclusive<u8>]

A constraints for the SSL subtypes.

Source

pub const TYPE_ALPN: u8 = 1u8

Source

pub const TYPE_AUTHORITY: u8 = 2u8

Source

pub const TYPE_CRC32C: u8 = 3u8

Source

pub const TYPE_NOOP: u8 = 4u8

Source

pub const TYPE_UNIQID: u8 = 5u8

Source

pub const TYPE_SSL: u8 = 32u8

Source

pub const TYPE_SUBTYPE_SSL_VERSION: u8 = 33u8

Source

pub const TYPE_SUBTYPE_SSL_CN: u8 = 34u8

Source

pub const TYPE_SUBTYPE_SSL_CIPHER: u8 = 35u8

Source

pub const TYPE_SUBTYPE_SSL_SIGALG: u8 = 36u8

Source

pub const TYPE_SUBTYPE_SSL_KEYALG: u8 = 37u8

Source

pub const TYPE_SUBTYPE_SSL_GROUP: u8 = 38u8

TLV PP2_SUBTYPE_SSL_GROUP provides the US-ASCII string name

Source

pub const TYPE_SUBTYPE_SSL_SIG_SCHEME: u8 = 39u8

Source

pub const TYPE_NETNS: u8 = 48u8

Source

pub fn contains_subtype(&self) -> bool

Source

pub fn conntains_subtype_discr(discr: u8) -> bool

Trait Implementations§

Source§

impl<'zc> Clone for PP2Tlvs<'zc>

Source§

fn clone(&self) -> PP2Tlvs<'zc>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'zc> Debug for PP2Tlvs<'zc>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'zc> Display for PP2Tlvs<'zc>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'zc> From<&PP2Tlvs<'zc>> for u8

Source§

fn from(value: &PP2Tlvs<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'zc> From<PP2Tlvs<'zc>> for u8

Source§

fn from(value: PP2Tlvs<'zc>) -> Self

Converts to this type from the input type.
Source§

impl<'sz> PP2TlvDump for PP2Tlvs<'sz>

Source§

fn get_type(&self) -> u8

Returns the type number of the TLV.
Source§

fn dump(&self, cur: &mut Cursor<Vec<u8>>) -> HaProxRes<()>

Writes the content of the instance to the TLV’s payload. It must NOT write the TLV header, it is written before and after. Read more
Source§

impl<'zc> PartialEq for PP2Tlvs<'zc>

Source§

fn eq(&self, other: &PP2Tlvs<'zc>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'zc> Eq for PP2Tlvs<'zc>

Source§

impl<'zc> StructuralPartialEq for PP2Tlvs<'zc>

Auto Trait Implementations§

§

impl<'zc> Freeze for PP2Tlvs<'zc>

§

impl<'zc> RefUnwindSafe for PP2Tlvs<'zc>

§

impl<'zc> Send for PP2Tlvs<'zc>

§

impl<'zc> Sync for PP2Tlvs<'zc>

§

impl<'zc> Unpin for PP2Tlvs<'zc>

§

impl<'zc> UnwindSafe for PP2Tlvs<'zc>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.