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 moreSource§impl Debug for DhcpOption
impl Debug for DhcpOption
Source§impl<'de> Deserialize<'de> for DhcpOption
impl<'de> Deserialize<'de> for DhcpOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FidlCompatible<Option_> for DhcpOption
impl FidlCompatible<Option_> for DhcpOption
type FromError = ProtocolError
type IntoError = ProtocolError
fn try_into_fidl(self) -> Result<Option_, Self::IntoError>
fn try_from_fidl(v: Option_) -> Result<Self, Self::FromError>
Source§impl Hash for DhcpOption
impl Hash for DhcpOption
Source§impl PartialEq for DhcpOption
impl PartialEq for DhcpOption
Source§impl Serialize for DhcpOption
impl Serialize for DhcpOption
impl Eq for DhcpOption
impl StructuralPartialEq for DhcpOption
Auto Trait Implementations§
impl Freeze for DhcpOption
impl RefUnwindSafe for DhcpOption
impl Send for DhcpOption
impl Sync for DhcpOption
impl Unpin for DhcpOption
impl UnwindSafe for DhcpOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)