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 moreSource§impl Debug for NewClientParams
impl Debug for NewClientParams
Source§impl From<NewClientParams> for NewClientParams
impl From<NewClientParams> for NewClientParams
Source§fn from(src: NewClientParams) -> NewClientParams
fn from(src: NewClientParams) -> NewClientParams
Source§impl PartialEq for NewClientParams
impl PartialEq for NewClientParams
Source§impl TryFrom<NewClientParams> for NewClientParams
impl TryFrom<NewClientParams> for NewClientParams
Source§type Error = NewClientParamsValidationError
type Error = NewClientParamsValidationError
impl StructuralPartialEq for NewClientParams
Auto Trait Implementations§
impl Freeze for NewClientParams
impl RefUnwindSafe for NewClientParams
impl Send for NewClientParams
impl Sync for NewClientParams
impl Unpin for NewClientParams
impl UnwindSafe for NewClientParams
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
)