Expand description
Information sent over a UDP connection between a DHCP client and server
Structs§
- Address
List Option - This represents one of several Message options that takes a list of Ipv4Addr values.
- Address
Option - This represents one of several Message options that takes an Ipv4Addr value.
- Encoder
- Keeps track of the state of the output and provides methods to add data to the output.
- File
- A null-terminated string that always maps to the 128 bytes assigned to it in Message.
- File
Option - Similar to the File struct, used for the fixed-length Message file field, but is a variable-length option used for the Message options field.
- Flags
- Wraps a bit field used in Message.
- MaxMessage
- This option specifies the maximum length DHCP message that it is willing to accept.
- Message
- Wraps all the data sent between DHCP clients and servers.
- Opaque
Option - An option that contains ambiguous bytes. For example, it might be an id, with no special meaning, sent by the client.
- SName
- A null-terminated string that always maps to the 64 bytes assigned to it in Message.
- SName
Option - Similar to the SName struct, used for the fixed-length Message sname field, but is a variable-length option used for the Message options field.
- Slicer
- Takes a slice as input and divides it into smaller slices. This processes the slice from start to end by user-provided len sized chunks.
- Socket
- A connection to a UdpSocket that understands how to send/receive Deliverable. Meant to be used by both Client and Server.
- String
Option - An option that represents a string of variable length with a minimum length of 1.
- Time
Offset - This type specifies the offset of the client’s subnet in
seconds from Coordinated Universal Time (UTC) through an
i32. - Time
Option - An option that represents seconds as a u32.
- Undecoded
Message - UndecodedMessage takes a message’s byte array from the socket. It can return smaller slices that
can be later decoded into a Message’s field via
DecodeMessage.
Enums§
- HTypes
- Variants of a htype field in Message.
- Message
Options - Variants of an options field in Message. Options are also referred to as “configuration parameters”.
- Message
Types - Variants of option 53 in MessageOptions.
- Ops
- Variants of an op field in Message.
- Overload
Options - Variants of option 52 in MessageOptions.
Constants§
- MAGIC
- The first four octets of options field with values 99, 130, 83, 99
Traits§
- Decodable
- A supertrait that defines everything a custom message needs to be decoded after being received by a socket.
- Decode
Message - Define how the bytes of a DHCP message’s fields decode into your custom Message’s types.
- Encodable
- A supertrait that defines everything a custom message needs to be encoded before being sent by a socket.
- Encode
Message - Define how your custom Message type encodes itself into the bytes of a DHCP message’s fields.
- Message
Helpers - Define common methods on your custom Message that a client or server will need to use.
Type Aliases§
- Message
Buffer - Bytes, received from the socket, that can be decoded into a Message.