pub enum DhcpOption {
Show 76 variants
Pad(),
End(),
SubnetMask(PrefixLength<Ipv4>),
TimeOffset(i32),
Router(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
TimeServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
NameServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
DomainNameServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
LogServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
CookieServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
LprServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
ImpressServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
ResourceLocationServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
HostName(String),
BootFileSize(u16),
MeritDumpFile(String),
DomainName(String),
SwapServer(Ipv4Addr),
RootPath(String),
ExtensionsPath(String),
IpForwarding(bool),
NonLocalSourceRouting(bool),
PolicyFilter(AtLeast<2, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
MaxDatagramReassemblySize(u16),
DefaultIpTtl(NonZeroU8),
PathMtuAgingTimeout(u32),
PathMtuPlateauTable(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u16>>>),
InterfaceMtu(u16),
AllSubnetsLocal(bool),
BroadcastAddress(Ipv4Addr),
PerformMaskDiscovery(bool),
MaskSupplier(bool),
PerformRouterDiscovery(bool),
RouterSolicitationAddress(Ipv4Addr),
StaticRoute(AtLeast<2, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
TrailerEncapsulation(bool),
ArpCacheTimeout(u32),
EthernetEncapsulation(bool),
TcpDefaultTtl(NonZeroU8),
TcpKeepaliveInterval(u32),
TcpKeepaliveGarbage(bool),
NetworkInformationServiceDomain(String),
NetworkInformationServers(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
NetworkTimeProtocolServers(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
VendorSpecificInformation(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u8>>>),
NetBiosOverTcpipNameServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
NetBiosOverTcpipDatagramDistributionServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
NetBiosOverTcpipNodeType(NodeType),
NetBiosOverTcpipScope(String),
XWindowSystemFontServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
XWindowSystemDisplayManager(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
NetworkInformationServicePlusDomain(String),
NetworkInformationServicePlusServers(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
MobileIpHomeAgent(AtLeast<0, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
SmtpServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
Pop3Server(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
NntpServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
DefaultWwwServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
DefaultFingerServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
DefaultIrcServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
StreetTalkServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
StreetTalkDirectoryAssistanceServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>),
RequestedIpAddress(Ipv4Addr),
IpAddressLeaseTime(u32),
OptionOverload(Overload),
TftpServerName(String),
BootfileName(String),
DhcpMessageType(MessageType),
ServerIdentifier(Ipv4Addr),
ParameterRequestList(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<OptionCode>>>),
Message(String),
MaxDhcpMessageSize(u16),
RenewalTimeValue(u32),
RebindingTimeValue(u32),
VendorClassIdentifier(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u8>>>),
ClientIdentifier(AtLeast<{ CLIENT_IDENTIFIER_MINIMUM_LENGTH }, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u8>>>),
}
Expand description
A DHCP Option as defined in RFC 2132. DHCP Options provide a mechanism for transmitting configuration parameters between the Server and Client and vice-versa. DHCP Options also include some control and meta information needed for the operation of the DHCP protocol but which could not be included in the DHCP header because of the backwards compatibility requirement with the older BOOTP protocol.
Variants§
Pad()
End()
SubnetMask(PrefixLength<Ipv4>)
TimeOffset(i32)
Router(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
TimeServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
NameServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
DomainNameServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
LogServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
CookieServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
LprServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
ImpressServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
ResourceLocationServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
HostName(String)
BootFileSize(u16)
MeritDumpFile(String)
DomainName(String)
SwapServer(Ipv4Addr)
RootPath(String)
ExtensionsPath(String)
IpForwarding(bool)
NonLocalSourceRouting(bool)
PolicyFilter(AtLeast<2, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
MaxDatagramReassemblySize(u16)
DefaultIpTtl(NonZeroU8)
PathMtuAgingTimeout(u32)
PathMtuPlateauTable(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u16>>>)
InterfaceMtu(u16)
AllSubnetsLocal(bool)
BroadcastAddress(Ipv4Addr)
PerformMaskDiscovery(bool)
MaskSupplier(bool)
PerformRouterDiscovery(bool)
RouterSolicitationAddress(Ipv4Addr)
StaticRoute(AtLeast<2, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
TrailerEncapsulation(bool)
ArpCacheTimeout(u32)
EthernetEncapsulation(bool)
TcpDefaultTtl(NonZeroU8)
TcpKeepaliveInterval(u32)
TcpKeepaliveGarbage(bool)
NetworkInformationServiceDomain(String)
NetworkInformationServers(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
NetworkTimeProtocolServers(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
VendorSpecificInformation(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u8>>>)
NetBiosOverTcpipNameServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
NetBiosOverTcpipDatagramDistributionServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
NetBiosOverTcpipNodeType(NodeType)
NetBiosOverTcpipScope(String)
XWindowSystemFontServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
XWindowSystemDisplayManager(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
NetworkInformationServicePlusDomain(String)
NetworkInformationServicePlusServers(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
MobileIpHomeAgent(AtLeast<0, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
SmtpServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
Pop3Server(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
NntpServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
DefaultWwwServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
DefaultFingerServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
DefaultIrcServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
StreetTalkServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
StreetTalkDirectoryAssistanceServer(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<Ipv4Addr>>>)
RequestedIpAddress(Ipv4Addr)
IpAddressLeaseTime(u32)
OptionOverload(Overload)
TftpServerName(String)
BootfileName(String)
DhcpMessageType(MessageType)
ServerIdentifier(Ipv4Addr)
ParameterRequestList(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<OptionCode>>>)
Message(String)
According to RFC 2132 section 9.9, “The message consists of n octets of NVT ASCII text, which the client may display on an available output device”. According to RFC 3629 section 1, UTF-8 preserves US-ASCII octets.
While it’s somewhat ambiguous from RFC 854 whether “NVT ASCII” includes the non-standard-7-bit-ASCII control codes or not, RFC 698 states that “it is expected normal NVT ASCII would be used for 7-bit ASCII”, suggesting that NVT ASCII does designate only the US-ASCII-compatible subset of characters that can be output by NVT terminals.
Thus, it is safe to represent incoming Message options as a UTF-8 String and discard Message options that cannot be represented in UTF-8.
However, outgoing Message options (e.g. ones written by a DHCP server implemented using this library) must be careful to use only ASCII text rather than full UTF-8.
MaxDhcpMessageSize(u16)
RenewalTimeValue(u32)
RebindingTimeValue(u32)
VendorClassIdentifier(AtLeast<1, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u8>>>)
ClientIdentifier(AtLeast<{ CLIENT_IDENTIFIER_MINIMUM_LENGTH }, AtMostBytes<{ size_constrained::U8_MAX_AS_USIZE }, Vec<u8>>>)
Implementations§
Source§impl DhcpOption
impl DhcpOption
Sourcepub fn code(&self) -> OptionCode
pub fn code(&self) -> OptionCode
Returns the OptionCode
variant corresponding to self
.
Trait Implementations§
Source§impl Clone for DhcpOption
impl Clone for DhcpOption
Source§fn clone(&self) -> DhcpOption
fn clone(&self) -> DhcpOption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more