#[repr(u8)]
pub enum MessageType { Discover = 1, Offer = 2, Request = 3, Decline = 4, Ack = 5, Nak = 6, Release = 7, Inform = 8, }
Expand description

DHCP Message Type.

§Standards

The semantics of the various DHCP message types are described in RFC 2131 (see Table 2). Their numeric values are described in Section 9.6 of RFC 2132, which begins:

This option is used to convey the type of the DHCP message. The code for this option is 53, and its length is 1.

Variants§

§

Discover = 1

Client broadcast to locate available servers.

§

Offer = 2

Server to client in response to DHCPDISCOVER with offer of configuration parameters.

§

Request = 3

Client message to servers either (a) requesting offered parameters from one server and implicitly declining offers from all others, (b) confirming correctness of previously allocated address after, e.g., system reboot, or (c) extending the lease on a particular network address.

§

Decline = 4

Client to server indicating network address is already in use.

§

Ack = 5

Server to client with configuration parameters, including committed network address.

§

Nak = 6

Server to client indicating client’s notion of network address is incorrect (e.g., client has moved to new subnet) or client’s lease as expired.

§

Release = 7

Client to server relinquishing network address and cancelling remaining lease.

§

Inform = 8

Client to server, asking only for local configuration parameters; client already has externally configured network address.

Trait Implementations§

source§

impl Clone for MessageType

source§

fn clone(&self) -> MessageType

Returns a copy 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 Debug for MessageType

source§

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

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

impl Display for MessageType

source§

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

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

impl PartialEq for MessageType

source§

fn eq(&self, other: &MessageType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<u8> for MessageType

§

type Error = TryFromPrimitiveError<MessageType>

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

fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
source§

impl TryFromPrimitive for MessageType

§

type Primitive = u8

§

type Error = TryFromPrimitiveError<MessageType>

source§

const NAME: &'static str = "MessageType"

source§

fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>

source§

impl Copy for MessageType

source§

impl Eq for MessageType

source§

impl StructuralPartialEq for MessageType

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.