Expand description
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.
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.
Dynamic Host Configuration Protocol is a standard way of arranging those 1’s and 0’s that everyone can agree on. This library implements that protocol.
Message struct Message byte array
+-------------------------+ ---encoding--> +--------------------+
| op: Ops::Request | | 0000000100000001 |
| htype: HTypes::Ethernet | | ... |
| ... | | ... |
+-------------------------+ <--decoding--- +--------------------+