pull/1344/merge
Aurélien DEROIDE 3 days ago committed by GitHub
commit 23ff45f572
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -113,6 +113,19 @@ mod intrinsics {
}
}
/// Builds a flag for [`SkBuffContext::adjust_room`] that defines L2 encapsulation,
/// using `len` as the inner MAC header length.
///
/// Equivalent to the [`BPF_F_ADJ_ROOM_ENCAP_L2`][uapi-bpf-adj-room-encap-l2] macro
/// in the Linux user-space API.
///
/// [uapi-bpf-adj-room-encap-l2]: https://elixir.bootlin.com/linux/v6.16.4/source/include/uapi/linux/bpf.h#L6149
#[inline(always)]
#[allow(non_snake_case)]
pub fn BPF_F_ADJ_ROOM_ENCAP_L2(len: u64) -> u64 {
(len & u64::from(bindings::BPF_ADJ_ROOM_ENCAP_L2_MASK)) << bindings::BPF_ADJ_ROOM_ENCAP_L2_SHIFT
}
/// Check if a value is within a range, using conditional forms compatible with
/// the verifier.
#[inline(always)]

@ -2989,4 +2989,5 @@ impl aya_ebpf::EbpfContext for aya_ebpf::programs::tracepoint::TracePointContext
pub fn aya_ebpf::programs::tracepoint::TracePointContext::as_ptr(&self) -> *mut core::ffi::c_void
impl aya_ebpf::EbpfContext for aya_ebpf::programs::xdp::XdpContext
pub fn aya_ebpf::programs::xdp::XdpContext::as_ptr(&self) -> *mut core::ffi::c_void
pub fn aya_ebpf::BPF_F_ADJ_ROOM_ENCAP_L2(len: u64) -> u64
pub fn aya_ebpf::check_bounds_signed(value: i64, lower: i64, upper: i64) -> bool

Loading…
Cancel
Save