pub enum Parameter {
IpAddrs(Vec<Ipv4Address>),
AddressPool(AddressPool),
Lease(LeaseLength),
PermittedMacs(Vec<MacAddress>),
StaticallyAssignedAddrs(Vec<StaticAssignment>),
ArpProbe(bool),
BoundDeviceNames(Vec<String>),
// some variants omitted
}
Expand description
The configurable server parameters.
Variants§
IpAddrs(Vec<Ipv4Address>)
The IP addresses to which the server is bound. The vector bound has been arbitrarily selected as a generous upper limit.
AddressPool(AddressPool)
The pool of addresses managed by a DHCP server and from which leases are supplied.
The pool is valid iff all of the following are true:
- All fields are present.
- The stop address is larger than the start address.
- The prefix length is large enough to fit the full range of addresses.
For example, a pool of 4 addresses with a 24 bit subnet mask could be specified as: { prefix_length: 24, range_start: 192.168.1.2, range_stop: 192.168.1.5, }
Changing the address pool will not cancel existing leases because the DHCP protocol does not provide a mechanism for doing so. Administrators should take care when changing the address pool for a server with active leases.
Lease(LeaseLength)
The duration of leases offered by the server.
PermittedMacs(Vec<MacAddress>)
The client MAC addresses which the server will issue leases to. By default, the server will not have a permitted MAC list, in which case it will attempt to issue a lease to every client which requests one. If permitted_macs has a non-zero length then the server will only respond to lease requests from clients with MAC in the list. The vector bound has been arbitrarily selected as a generous upper limit.
StaticallyAssignedAddrs(Vec<StaticAssignment>)
Addresses statically assigned to specific hosts or devices. Typically, a network administrator will statically assign addresses to always-on network devices which should always have the same IP address, such as network printers. The vector bound has been arbitrarily selected as a generous upper limit.
ArpProbe(bool)
Enables server behavior where the server ARPs an IP address prior to issuing it in a lease. If the server receives a response, the server will mark the address as in-use and try again with a different address.
BoundDeviceNames(Vec<String>)
The names of the interface to which the server will listen. If this vector is empty, the server will listen on all interfaces and will process incoming DHCP messages regardless of the interface on which they arrive. If this vector is not empty, then the server will only listen for incoming DHCP messages on the named interfaces contained by this vector. The string and vectors bounds have been arbitrarily selected as generous upper limits.
Implementations§
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Parameter, D> for Parameter
impl<D: ResourceDialect> Decode<Parameter, D> for Parameter
Source§impl TypeMarker for Parameter
impl TypeMarker for Parameter
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Parameter
impl ValueTypeMarker for Parameter
impl Persistable for Parameter
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
)