pub struct NewClientParams {
pub interface_id: u64,
pub address: Ipv6SocketAddress,
pub config: ClientConfig,
pub duid: Option<Duid>,
}
Expand description
Parameters to configure a new client.
Fields§
§interface_id: u64
The ID of the interface the client will run on.
address: Ipv6SocketAddress
The socket address to use when communicating with servers.
DHCPv6 servers listen for link-local multicasts, so not using a link-local address here may cause interoperability issues.
Client creation will fail with INVALID_ARGS
if:
- a multicast address is provided;
- or a link-local address is provided, and its zone index
doesn’t match
interface_id
(Fuchsia has a 1:1 mapping from zone index to interface ID).
Client creation will fail if it fails to bind a socket to this address.
config: ClientConfig
Configuration for starting the DHCPv6 client.
If the configuration requests both addresses and other configuration parameters, all information is requested in the same message exchange, running in stateful mode. If only configuration parameters are requested (no addresses), the client runs in stateless mode, as described in RFC 8415, Section 6.1.
Client creation will fail if config
is not requesting any
information (all fields are empty), or if it contains invalid
fields.
duid: Option<Duid>
DHCP Unique Identifier (DUID) configuration.
The DUID is used by the client to identify itself to servers, as defined in RFC 8415 section 11.
Trait Implementations§
Source§impl Clone for NewClientParams
impl Clone for NewClientParams
Source§fn clone(&self) -> NewClientParams
fn clone(&self) -> NewClientParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more