pub struct EncapsulationHeader {
pub src_ip: Ipv4Address,
pub dst_ip: Ipv4Address,
pub protocol: EncapProtocol,
pub src_port: u16,
pub dst_port: u16,
}Expand description
Outer encapsulation header for tunnel packets
Fields§
§src_ip: Ipv4AddressOuter source IP address
dst_ip: Ipv4AddressOuter destination IP address
protocol: EncapProtocolTransport protocol (UDP or TCP)
src_port: u16Outer source port
dst_port: u16Outer destination port
Implementations§
Source§impl EncapsulationHeader
impl EncapsulationHeader
Sourcepub fn new(
src_ip: Ipv4Address,
dst_ip: Ipv4Address,
protocol: EncapProtocol,
src_port: u16,
dst_port: u16,
) -> Self
pub fn new( src_ip: Ipv4Address, dst_ip: Ipv4Address, protocol: EncapProtocol, src_port: u16, dst_port: u16, ) -> Self
Create a new encapsulation header
Trait Implementations§
Source§impl Clone for EncapsulationHeader
impl Clone for EncapsulationHeader
Source§fn clone(&self) -> EncapsulationHeader
fn clone(&self) -> EncapsulationHeader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncapsulationHeader
impl Debug for EncapsulationHeader
Source§impl PartialEq for EncapsulationHeader
impl PartialEq for EncapsulationHeader
impl Copy for EncapsulationHeader
impl Eq for EncapsulationHeader
impl StructuralPartialEq for EncapsulationHeader
Auto Trait Implementations§
impl Freeze for EncapsulationHeader
impl RefUnwindSafe for EncapsulationHeader
impl Send for EncapsulationHeader
impl Sync for EncapsulationHeader
impl Unpin for EncapsulationHeader
impl UnwindSafe for EncapsulationHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)