Struct nc::types::bpf_fib_lookup_t

source ·
#[repr(C)]
pub struct bpf_fib_lookup_t {
Show 13 fields pub family: u8, pub l4_protocol: u8, pub sport: be16_t, pub dport: be16_t, pub tot_len: u16, pub ifindex: u32, pub inputs: bpf_fib_lookup_inputs_t, pub src: bpf_fib_lookup_addr_t, pub dest: bpf_fib_lookup_addr_t, pub h_vlan_proto: be16_t, pub h_vlan_tci: be16_t, pub smac: [u8; 6], pub dmac: [u8; 6],
}

Fields§

§family: u8

input: network family for lookup (AF_INET, AF_INET6) output: network family of egress nexthop

§l4_protocol: u8

set if lookup is to consider L4 data - e.g., FIB rules

§sport: be16_t§dport: be16_t§tot_len: u16

total length of packet from network header - used for MTU check

§ifindex: u32

input: L3 device index for lookup output: device index from FIB lookup

§inputs: bpf_fib_lookup_inputs_t§src: bpf_fib_lookup_addr_t§dest: bpf_fib_lookup_addr_t

input to bpf_fib_lookup, ipv{4,6}_dst is destination address in network header. output: bpf_fib_lookup sets to gateway address if FIB lookup returns gateway route

§h_vlan_proto: be16_t

output

§h_vlan_tci: be16_t§smac: [u8; 6]

ETH_ALEN

§dmac: [u8; 6]

ETH_ALEN

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.