toe-beans 0.10.0

DHCP library, client, and server
Documentation
//! Toe Beans is a DHCP library. It includes an optional DHCP client and server that implements the library.
//!
//! A DHCP client may use this library to encode a message it sends as a request to a DHCP server, or decode a response from a DHCP server.
//!
//! A DHCP server may use this library to decode a request from a DHCP client, perform some logic, and then encode a response.
//!
//! ```text
//!     DHCP Client                      DHCP Server      
//! +----------------+               +----------------+
//! | encode message | ---request--> | decode message |
//! | decode message | <--response-- | encode message |
//! +----------------+               +----------------+
//!
//! ```
//! Encoding converts a Message struct, that is easy for humans to use, into a byte array. The byte array contains many 1's and 0's that are easy for computers to use. Decoding, the reverse of encoding, is where the byte array is converted into a Message struct.
//!
//! **D**ynamic **H**ost **C**onfiguration **P**rotocol is a standard way of arranging those 1's and 0's that everyone can agree on. This library implements that protocol.
//!
//! ```text
//!       Message struct                          Message byte array  
//! +-------------------------+ ---encoding--> +--------------------+
//! | op: Ops::Request        |                | 0000000100000001   |
//! | htype: HTypes::Ethernet |                | ...                |
//! | ...                     |                | ...                |
//! +-------------------------+ <--decoding--- +--------------------+
//! ```

/// Used to lease [IPv4](https://en.wikipedia.org/wiki/Internet_Protocol_version_4) addresses to clients.
///
/// Implements DHCPv4 with the following RFCs:
/// - [RFC-2131](https://datatracker.ietf.org/doc/html/rfc2131#section-2)
pub mod v4;