bpf: update bindings against libbpf 8bdc267e7b853ca08ed762b21fecc0e019ddc332

pull/56/head
Alessandro Decina 3 years ago
parent a678f3b38e
commit d7ef47686b

@ -228,8 +228,6 @@ pub const SO_TIMESTAMPING_NEW: u32 = 65;
pub const SO_RCVTIMEO_NEW: u32 = 66;
pub const SO_SNDTIMEO_NEW: u32 = 67;
pub const SO_DETACH_REUSEPORT_BPF: u32 = 68;
pub const SO_PREFER_BUSY_POLL: u32 = 69;
pub const SO_BUSY_POLL_BUDGET: u32 = 70;
pub const SO_TIMESTAMP: u32 = 29;
pub const SO_TIMESTAMPNS: u32 = 35;
pub const SO_TIMESTAMPING: u32 = 37;
@ -1054,6 +1052,20 @@ pub struct bpf_spin_lock {
pub val: __u32,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
}
impl bpf_timer {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 16usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sysctl {
pub write: __u32,

@ -1025,6 +1025,7 @@ impl bpf_spin_lock {
unsafe { crate::bpf_probe_read(&self.val) }.ok()
}
}
impl bpf_timer {}
impl bpf_sysctl {
pub fn write(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.write) }.ok()

@ -1710,3 +1710,52 @@ pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_bpf_cty::c_long {
::core::mem::transmute(168usize);
fun(fd)
}
pub unsafe fn bpf_timer_init(
timer: *mut bpf_timer,
map: *mut ::aya_bpf_cty::c_void,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
map: *mut ::aya_bpf_cty::c_void,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(169usize);
fun(timer, map, flags)
}
pub unsafe fn bpf_timer_set_callback(
timer: *mut bpf_timer,
callback_fn: *mut ::aya_bpf_cty::c_void,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
callback_fn: *mut ::aya_bpf_cty::c_void,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(170usize);
fun(timer, callback_fn)
}
pub unsafe fn bpf_timer_start(
timer: *mut bpf_timer,
nsecs: __u64,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
nsecs: __u64,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(171usize);
fun(timer, nsecs, flags)
}
pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_bpf_cty::c_long =
::core::mem::transmute(172usize);
fun(timer)
}
pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 {
let fun: unsafe extern "C" fn(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 =
::core::mem::transmute(173usize);
fun(ctx)
}
pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 {
let fun: unsafe extern "C" fn(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 =
::core::mem::transmute(174usize);
fun(ctx)
}

@ -228,8 +228,6 @@ pub const SO_TIMESTAMPING_NEW: u32 = 65;
pub const SO_RCVTIMEO_NEW: u32 = 66;
pub const SO_SNDTIMEO_NEW: u32 = 67;
pub const SO_DETACH_REUSEPORT_BPF: u32 = 68;
pub const SO_PREFER_BUSY_POLL: u32 = 69;
pub const SO_BUSY_POLL_BUDGET: u32 = 70;
pub const SO_TIMESTAMP: u32 = 29;
pub const SO_TIMESTAMPNS: u32 = 35;
pub const SO_TIMESTAMPING: u32 = 37;
@ -1054,6 +1052,20 @@ pub struct bpf_spin_lock {
pub val: __u32,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
}
impl bpf_timer {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 16usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sysctl {
pub write: __u32,

@ -1025,6 +1025,7 @@ impl bpf_spin_lock {
unsafe { crate::bpf_probe_read(&self.val) }.ok()
}
}
impl bpf_timer {}
impl bpf_sysctl {
pub fn write(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.write) }.ok()

@ -1710,3 +1710,52 @@ pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_bpf_cty::c_long {
::core::mem::transmute(168usize);
fun(fd)
}
pub unsafe fn bpf_timer_init(
timer: *mut bpf_timer,
map: *mut ::aya_bpf_cty::c_void,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
map: *mut ::aya_bpf_cty::c_void,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(169usize);
fun(timer, map, flags)
}
pub unsafe fn bpf_timer_set_callback(
timer: *mut bpf_timer,
callback_fn: *mut ::aya_bpf_cty::c_void,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
callback_fn: *mut ::aya_bpf_cty::c_void,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(170usize);
fun(timer, callback_fn)
}
pub unsafe fn bpf_timer_start(
timer: *mut bpf_timer,
nsecs: __u64,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
nsecs: __u64,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(171usize);
fun(timer, nsecs, flags)
}
pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_bpf_cty::c_long =
::core::mem::transmute(172usize);
fun(timer)
}
pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 {
let fun: unsafe extern "C" fn(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 =
::core::mem::transmute(173usize);
fun(ctx)
}
pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 {
let fun: unsafe extern "C" fn(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 =
::core::mem::transmute(174usize);
fun(ctx)
}

@ -228,8 +228,6 @@ pub const SO_TIMESTAMPING_NEW: u32 = 65;
pub const SO_RCVTIMEO_NEW: u32 = 66;
pub const SO_SNDTIMEO_NEW: u32 = 67;
pub const SO_DETACH_REUSEPORT_BPF: u32 = 68;
pub const SO_PREFER_BUSY_POLL: u32 = 69;
pub const SO_BUSY_POLL_BUDGET: u32 = 70;
pub const SO_TIMESTAMP: u32 = 29;
pub const SO_TIMESTAMPNS: u32 = 35;
pub const SO_TIMESTAMPING: u32 = 37;
@ -1054,6 +1052,20 @@ pub struct bpf_spin_lock {
pub val: __u32,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
}
impl bpf_timer {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 16usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sysctl {
pub write: __u32,

@ -1025,6 +1025,7 @@ impl bpf_spin_lock {
unsafe { crate::bpf_probe_read(&self.val) }.ok()
}
}
impl bpf_timer {}
impl bpf_sysctl {
pub fn write(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.write) }.ok()

@ -1710,3 +1710,52 @@ pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_bpf_cty::c_long {
::core::mem::transmute(168usize);
fun(fd)
}
pub unsafe fn bpf_timer_init(
timer: *mut bpf_timer,
map: *mut ::aya_bpf_cty::c_void,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
map: *mut ::aya_bpf_cty::c_void,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(169usize);
fun(timer, map, flags)
}
pub unsafe fn bpf_timer_set_callback(
timer: *mut bpf_timer,
callback_fn: *mut ::aya_bpf_cty::c_void,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
callback_fn: *mut ::aya_bpf_cty::c_void,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(170usize);
fun(timer, callback_fn)
}
pub unsafe fn bpf_timer_start(
timer: *mut bpf_timer,
nsecs: __u64,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
timer: *mut bpf_timer,
nsecs: __u64,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(171usize);
fun(timer, nsecs, flags)
}
pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_bpf_cty::c_long =
::core::mem::transmute(172usize);
fun(timer)
}
pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 {
let fun: unsafe extern "C" fn(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 =
::core::mem::transmute(173usize);
fun(ctx)
}
pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 {
let fun: unsafe extern "C" fn(ctx: *mut ::aya_bpf_cty::c_void) -> __u64 =
::core::mem::transmute(174usize);
fun(ctx)
}

Loading…
Cancel
Save