Enum MessageTypes

Source
#[repr(u8)]
pub enum MessageTypes {
Show 19 variants Discover, Offer, Request, Decline, Ack, Nak, Release, Inform, ForceRenew, LeaseQuery, LeaseUnassigned, LeaseUnknown, LeaseActive, BulkLeaseQuery, LeaseQueryDone, ActiveLeaseQuery, LeaseQueryStatus, Tls, Other(u8),
}
Expand description

Variants of option 53 in MessageOptions.

Variants§

§

Discover

Client broadcast to locate available servers.

Value 1. Defined in RFC-2132.

§

Offer

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

Value 2. Defined in RFC-2132.

§

Request

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.

Value 3. Defined in RFC-2132.

§

Decline

Client to server indicating network address is already in use.

Value 4. Defined in RFC-2132.

§

Ack

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

Value 5. Defined in RFC-2132.

§

Nak

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

If the selected server is unable to satisfy the DHCPREQUEST message (example: the requested network address has been allocated), the server SHOULD respond with a DHCPNAK message.

Value 6. Defined in RFC-2132.

§

Release

Client to server relinquishing network address and cancelling remaining lease.

Value 7. Defined in RFC-2132.

§

Inform

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

Value 8. Defined in RFC-2132.

§

ForceRenew

Server to client which forces the client into the RENEW state.

Value 9. Defined in RFC-3203.

§

LeaseQuery

Relay agent to server asking for lease information to know the location of an IP endpoint.

Value 10. Defined in RFC-4388.

§

LeaseUnassigned

Server to relay agent indicating that there is currently no active lease on the resultant IP address but that this DHCP server is authoritative for this IP address.

Value 11. Defined in RFC-4388.

§

LeaseUnknown

Server to relay agent indicating that the DHCP server has no knowledge of the information specified in the query (e.g., IP address, MAC address, or Client-identifier option).

Value 12. Defined in RFC-4388.

§

LeaseActive

Server to relay agent which allows the agent to determine the IP endpoint location and the remaining duration of the IP address lease.

Value 13. Defined in RFC-4388.

§

BulkLeaseQuery

Client to server asking for information concerning existing DHCPv4 IPv4 address bindings managed by the DHCPv4 server.

Value 14. Defined in RFC-6926.

§

LeaseQueryDone

Server to client after processing the bulk query is complete.

Value 15. Defined in RFC-6926.

§

ActiveLeaseQuery

Client to server requesting that the server sends updates whenever some activity occurs that changes the binding state.

Value 16. Defined in RFC-7724 which updates RFC-6926.

§

LeaseQueryStatus

Server to client. May unilaterally terminate a successful ActiveLeaseQuery request, that is currently in progress, in the event that the server determines that it cannot continue processing it. For example, when a server is requested to shut down, it should send a LeaseQueryStatus message with a dhcp-status-code of QueryTerminated and include in the message a base-time. This must be the last message on that connection, and once the message has been transmitted, the server must close the connection.

Value 17. Defined in RFC-7724 which updates RFC-6926.

§

Tls

Client to server over a newly created TCP connection to request a TLS connection.

If the server supports TLS connections, it must respond with a Tls message with no dhcp-status-code. If the server does not support TLS connections, it must respond with a Tls message with a dhcp-status-code of TLSConnectionRefused.

Value 18. Defined in RFC-7724 which updates RFC-6926.

§

Other(u8)

Not implemented

Implementations§

Source§

impl MessageTypes

Source

pub fn extend_into(&self, bytes: &mut Vec<u8>, tag: u8)

Used, when serializing, to add to the byte buffer.

Trait Implementations§

Source§

impl Clone for MessageTypes

Source§

fn clone(&self) -> MessageTypes

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for MessageTypes

Source§

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

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

impl<'de> Deserialize<'de> for MessageTypes

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&[u8]> for MessageTypes

Source§

fn from(value: &[u8]) -> Self

Converts to this type from the input type.
Source§

impl From<&MessageTypes> for u8

Source§

fn from(mtype: &MessageTypes) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for MessageTypes

Source§

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

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

const 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 Serialize for MessageTypes

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MessageTypes

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> 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, 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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,