Merge pull request #1141 from gth828r/1140.xdp-context-if-index-support

aya-ebpf: add ifindex support to XdpContext
reviewable/pr1199/r1
Dave Tucker 1 week ago committed by GitHub
commit 0fa300f696
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -21,6 +21,12 @@ impl XdpContext {
unsafe { (*self.ctx).data_end as usize } unsafe { (*self.ctx).data_end as usize }
} }
/// Return the interface of the index as determined by the OS.
#[inline]
pub fn ingress_ifindex(&self) -> usize {
unsafe { (*self.ctx).ingress_ifindex as usize }
}
/// Return the raw address of the XdpContext metadata. /// Return the raw address of the XdpContext metadata.
#[inline(always)] #[inline(always)]
pub fn metadata(&self) -> usize { pub fn metadata(&self) -> usize {

@ -2020,6 +2020,7 @@ pub aya_ebpf::programs::xdp::XdpContext::ctx: *mut aya_ebpf_bindings::x86_64::bi
impl aya_ebpf::programs::xdp::XdpContext impl aya_ebpf::programs::xdp::XdpContext
pub fn aya_ebpf::programs::xdp::XdpContext::data(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::data(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::data_end(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::data_end(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::ingress_ifindex(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::metadata(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::metadata_end(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata_end(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> aya_ebpf::programs::xdp::XdpContext
@ -2633,6 +2634,7 @@ pub aya_ebpf::programs::XdpContext::ctx: *mut aya_ebpf_bindings::x86_64::binding
impl aya_ebpf::programs::xdp::XdpContext impl aya_ebpf::programs::xdp::XdpContext
pub fn aya_ebpf::programs::xdp::XdpContext::data(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::data(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::data_end(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::data_end(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::ingress_ifindex(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::metadata(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::metadata_end(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata_end(&self) -> usize
pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> aya_ebpf::programs::xdp::XdpContext

Loading…
Cancel
Save