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.
- Message
Slicer - MessageSlicer wraps a Slicer to provide:
- 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.
For example
&[1, 2, 3, 4] --> &[1, 2] and &[3, 4]. - 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.
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§
- Decode
Message - Define how the bytes of a DHCP message’s fields decode into your custom Message’s types.
- Deliverable
- A supertrait that defines everything a custom message needs to be properly usable by a client and server.
- 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.