pub struct AddAddressV4 { /* private fields */ }
Expand description
An information type used to add an IPv4 address and its associated information (desination address, netmask, etc.) to an interface.
Implementations§
Source§impl AddAddressV4
impl AddAddressV4
Sourcepub fn new(addr: Ipv4Addr) -> Self
pub fn new(addr: Ipv4Addr) -> Self
Constructs a new AddAddress
request for the given IPv4 address.
Sourcepub fn set_broadcast(&mut self, addr: Ipv4Addr)
pub fn set_broadcast(&mut self, addr: Ipv4Addr)
Adds an associated broadcast address to the request.
Note that only one of broadcast and destination addresses may be set for a request; if both
are set, then any invocation of add_addr()
the request is used for will fail with an error
of kind io::ErrorKind::InvalidInput
.
Sourcepub fn set_destination(&mut self, addr: Ipv4Addr)
pub fn set_destination(&mut self, addr: Ipv4Addr)
Adds an associated destination address to the request.
Note that only one of broadcast and destination addresses may be set for a request; if both
are set, then any invocation of add_addr()
the request is used for will fail with an error
of kind io::ErrorKind::InvalidInput
.
Sourcepub fn set_netmask(&mut self, netmask: Netmask)
pub fn set_netmask(&mut self, netmask: Netmask)
Adds an associated netmask for the given request.
The netmask must between 0 and 32 inclusive; if a value outside of this range is used, then
any invocation of add_addr()
the request is used for will fail with an error of kind
io::ErrorKind::InvalidInput
.
Trait Implementations§
Source§impl Clone for AddAddressV4
impl Clone for AddAddressV4
Source§fn clone(&self) -> AddAddressV4
fn clone(&self) -> AddAddressV4
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more