pub struct VxlanAddRequest { /* private fields */ }
Expand description

A request to create a new vxlan link. This is equivalent to ip link add NAME vxlan id ID ... commands. It provides methods to customize the creation of the vxlan interface It provides almost all parameters that are listed by man ip link.

Implementations§

source§

impl VxlanAddRequest

source

pub async fn execute(self) -> Result<(), Error>

Execute the request.

source

pub fn up(self) -> Self

Sets the interface up This is equivalent to ip link set up dev NAME.

Adds the dev attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI dev LINK, dev LINK - specifies the physical device to use for tunnel endpoint communication. But instead of specifing a link name (LINK), we specify a link index.

source

pub fn port(self, port: u16) -> Self

Adds the dstport attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI dstport PORT. dstport PORT - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.

source

pub fn group(self, addr: Ipv4Addr) -> Self

Adds the group attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI group IPADDR, group IPADDR - specifies the multicast IP address to join. This function takes an IPv4 address WARNING: only one between remote and group can be present.

source

pub fn group6(self, addr: Ipv6Addr) -> Self

Adds the group attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI group IPADDR, group IPADDR - specifies the multicast IP address to join. This function takes an IPv6 address WARNING: only one between remote and group can be present.

source

pub fn remote(self, addr: Ipv4Addr) -> Self

Adds the remote attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI remote IPADDR, remote IPADDR - specifies the unicast destination IP address to use in outgoing packets when the destination link layer address is not known in the VXLAN device forwarding database. This function takes an IPv4 address. WARNING: only one between remote and group can be present.

source

pub fn remote6(self, addr: Ipv6Addr) -> Self

Adds the remote attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI remote IPADDR, remote IPADDR - specifies the unicast destination IP address to use in outgoing packets when the destination link layer address is not known in the VXLAN device forwarding database. This function takes an IPv6 address. WARNING: only one between remote and group can be present.

source

pub fn local(self, addr: Ipv4Addr) -> Self

Adds the local attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI local IPADDR, local IPADDR - specifies the source IP address to use in outgoing packets. This function takes an IPv4 address.

source

pub fn local6(self, addr: Ipv6Addr) -> Self

Adds the local attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI local IPADDR, local IPADDR - specifies the source IP address to use in outgoing packets. This function takes an IPv6 address.

source

pub fn tos(self, tos: u8) -> Self

Adds the tos attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI tos TOS. tos TOS - specifies the TOS value to use in outgoing packets.

source

pub fn ttl(self, ttl: u8) -> Self

Adds the ttl attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI ttl TTL. ttl TTL - specifies the TTL value to use in outgoing packets.

source

pub fn label(self, label: u32) -> Self

Adds the flowlabel attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI flowlabel LABEL. flowlabel LABEL - specifies the flow label to use in outgoing packets.

source

pub fn learning(self, learning: bool) -> Self

Adds the learning attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI [no]learning. [no]learning - specifies if unknown source link layer addresses and IP addresses are entered into the VXLAN device forwarding database.

source

pub fn ageing(self, seconds: u32) -> Self

Adds the ageing attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI ageing SECONDS. ageing SECONDS - specifies the lifetime in seconds of FDB entries learnt by the kernel.

source

pub fn limit(self, limit: u32) -> Self

Adds the maxaddress attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI maxaddress LIMIT. maxaddress LIMIT - specifies the maximum number of FDB entries.

source

pub fn port_range(self, min: u16, max: u16) -> Self

Adds the srcport attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI srcport MIN MAX. srcport MIN MAX - specifies the range of port numbers to use as UDP source ports to communicate to the remote VXLAN tunnel endpoint.

source

pub fn proxy(self, proxy: bool) -> Self

Adds the proxy attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI [no]proxy. [no]proxy - specifies ARP proxy is turned on.

source

pub fn rsc(self, rsc: bool) -> Self

Adds the rsc attribute to the VXLAN This is equivalent to ip link add name NAME type vxlan id VNI [no]rsc. [no]rsc - specifies if route short circuit is turned on.

source

pub fn l2miss(self, l2miss: bool) -> Self

This is equivalent to ip link add name NAME type vxlan id VNI [no]l2miss. [no]l2miss - specifies if netlink LLADDR miss notifications are generated.

source

pub fn l3miss(self, l3miss: bool) -> Self

This is equivalent to ip link add name NAME type vxlan id VNI [no]l3miss. [no]l3miss - specifies if netlink IP ADDR miss notifications are generated.

source

pub fn collect_metadata(self, collect_metadata: bool) -> Self

source

pub fn udp_csum(self, udp_csum: bool) -> Self

This is equivalent to ip link add name NAME type vxlan id VNI [no]udp_csum. [no]udpcsum - specifies if UDP checksum is calculated for transmitted packets over IPv4.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.