Struct rtnetlink::AddressHandle
source · pub struct AddressHandle(_);
Implementations§
source§impl AddressHandle
impl AddressHandle
pub fn new(handle: Handle) -> Self
sourcepub fn get(&self) -> AddressGetRequest
pub fn get(&self) -> AddressGetRequest
Retrieve the list of ip addresses (equivalent to ip addr show
)
sourcepub fn add(&self, index: u32, address: IpAddr, prefix_len: u8) -> AddressAddRequest
pub fn add(&self, index: u32, address: IpAddr, prefix_len: u8) -> AddressAddRequest
Add an ip address on an interface (equivalent to ip addr add
)
sourcepub fn del(&self, address: AddressMessage) -> AddressDelRequest
pub fn del(&self, address: AddressMessage) -> AddressDelRequest
Delete the given address