[][src]Enum discv5::session::SessionState

pub(crate) enum SessionState {
    WhoAreYouSent,
    RandomSent,
    AwaitingResponse(Keys),
    EstablishedAwaitingResponse {
        current_keys: Keys,
        new_keys: Keys,
    },
    Established(Keys),
    Poisoned,
}

The current state of the session. This enum holds the encryption keys for various states.

Variants

WhoAreYouSent

A WHOAREYOU packet has been sent, and the Session is awaiting an Authentication response.

RandomSent

A RANDOM packet has been sent and the Session is awaiting a WHOAREYOU response.

AwaitingResponse(Keys)

An AuthMessage has been sent with a new set of generated keys. Once a response has been received that we can decrypt, the session transitions to an established state, replacing any current set of keys. No Session is currently active.

EstablishedAwaitingResponse

An established Session has received a WHOAREYOU. In this state, messages are sent out with the established sessions keys and new encrypted messages are first attempted to be decrypted with the established session keys, upon failure, the new keys are tried. If the new keys are successful, the session keys are updated and the state progresses to Established.

Fields of EstablishedAwaitingResponse

current_keys: Keys

The keys used in the current established session.

new_keys: Keys

New keys generated from a recent WHOARYOU request.

Established(Keys)

A Session has been established and the ENR IP matches the source IP.

Poisoned

Processing has failed. Fatal error.

Trait Implementations

impl PartialEq<SessionState> for SessionState[src]

impl StructuralPartialEq for SessionState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,