1/* automatically generated by rust-bindgen 0.66.1 */
2
3pub type __s8 = crate::ctypes::c_schar;
4pub type __u8 = crate::ctypes::c_uchar;
5pub type __s16 = crate::ctypes::c_short;
6pub type __u16 = crate::ctypes::c_ushort;
7pub type __s32 = crate::ctypes::c_int;
8pub type __u32 = crate::ctypes::c_uint;
9pub type __s64 = crate::ctypes::c_longlong;
10pub type __u64 = crate::ctypes::c_ulonglong;
11pub type __kernel_key_t = crate::ctypes::c_int;
12pub type __kernel_mqd_t = crate::ctypes::c_int;
13pub type __kernel_old_uid_t = crate::ctypes::c_ushort;
14pub type __kernel_old_gid_t = crate::ctypes::c_ushort;
15pub type __kernel_old_dev_t = crate::ctypes::c_ulong;
16pub type __kernel_long_t = crate::ctypes::c_long;
17pub type __kernel_ulong_t = crate::ctypes::c_ulong;
18pub type __kernel_ino_t = __kernel_ulong_t;
19pub type __kernel_mode_t = crate::ctypes::c_uint;
20pub type __kernel_pid_t = crate::ctypes::c_int;
21pub type __kernel_ipc_pid_t = crate::ctypes::c_int;
22pub type __kernel_uid_t = crate::ctypes::c_uint;
23pub type __kernel_gid_t = crate::ctypes::c_uint;
24pub type __kernel_suseconds_t = __kernel_long_t;
25pub type __kernel_daddr_t = crate::ctypes::c_int;
26pub type __kernel_uid32_t = crate::ctypes::c_uint;
27pub type __kernel_gid32_t = crate::ctypes::c_uint;
28pub type __kernel_size_t = __kernel_ulong_t;
29pub type __kernel_ssize_t = __kernel_long_t;
30pub type __kernel_ptrdiff_t = __kernel_long_t;
31pub type __kernel_off_t = __kernel_long_t;
32pub type __kernel_loff_t = crate::ctypes::c_longlong;
33pub type __kernel_old_time_t = __kernel_long_t;
34pub type __kernel_time_t = __kernel_long_t;
35pub type __kernel_time64_t = crate::ctypes::c_longlong;
36pub type __kernel_clock_t = __kernel_long_t;
37pub type __kernel_timer_t = crate::ctypes::c_int;
38pub type __kernel_clockid_t = crate::ctypes::c_int;
39pub type __kernel_caddr_t = *mut crate::ctypes::c_char;
40pub type __kernel_uid16_t = crate::ctypes::c_ushort;
41pub type __kernel_gid16_t = crate::ctypes::c_ushort;
42pub type __le16 = __u16;
43pub type __be16 = __u16;
44pub type __le32 = __u32;
45pub type __be32 = __u32;
46pub type __le64 = __u64;
47pub type __be64 = __u64;
48pub type __sum16 = __u16;
49pub type __wsum = __u32;
50pub type __poll_t = crate::ctypes::c_uint;
51#[repr(C)]
52#[derive(Debug, Copy, Clone)]
53pub struct sockaddr_xdp {
54pub sxdp_family: __u16,
55pub sxdp_flags: __u16,
56pub sxdp_ifindex: __u32,
57pub sxdp_queue_id: __u32,
58pub sxdp_shared_umem_fd: __u32,
59}
60#[repr(C)]
61#[derive(Debug, Copy, Clone)]
62pub struct xdp_ring_offset {
63pub producer: __u64,
64pub consumer: __u64,
65pub desc: __u64,
66pub flags: __u64,
67}
68#[repr(C)]
69#[derive(Debug, Copy, Clone)]
70pub struct xdp_mmap_offsets {
71pub rx: xdp_ring_offset,
72pub tx: xdp_ring_offset,
73pub fr: xdp_ring_offset,
74pub cr: xdp_ring_offset,
75}
76#[repr(C)]
77#[derive(Debug, Copy, Clone)]
78pub struct xdp_umem_reg {
79pub addr: __u64,
80pub len: __u64,
81pub chunk_size: __u32,
82pub headroom: __u32,
83pub flags: __u32,
84}
85#[repr(C)]
86#[derive(Debug, Copy, Clone)]
87pub struct xdp_statistics {
88pub rx_dropped: __u64,
89pub rx_invalid_descs: __u64,
90pub tx_invalid_descs: __u64,
91pub rx_ring_full: __u64,
92pub rx_fill_ring_empty_descs: __u64,
93pub tx_ring_empty_descs: __u64,
94}
95#[repr(C)]
96#[derive(Debug, Copy, Clone)]
97pub struct xdp_options {
98pub flags: __u32,
99}
100#[repr(C)]
101#[derive(Debug, Copy, Clone)]
102pub struct xdp_desc {
103pub addr: __u64,
104pub len: __u32,
105pub options: __u32,
106}
107#[repr(C)]
108#[derive(Debug, Copy, Clone)]
109pub struct xdp_ring_offset_v1 {
110pub producer: __u64,
111pub consumer: __u64,
112pub desc: __u64,
113}
114#[repr(C)]
115#[derive(Debug, Copy, Clone)]
116pub struct xdp_mmap_offsets_v1 {
117pub rx: xdp_ring_offset_v1,
118pub tx: xdp_ring_offset_v1,
119pub fr: xdp_ring_offset_v1,
120pub cr: xdp_ring_offset_v1,
121}
122#[repr(C)]
123#[derive(Debug, Copy, Clone)]
124pub struct xdp_umem_reg_v1 {
125pub addr: __u64,
126pub len: __u64,
127pub chunk_size: __u32,
128pub headroom: __u32,
129}
130#[repr(C)]
131#[derive(Debug, Copy, Clone)]
132pub struct xdp_statistics_v1 {
133pub rx_dropped: __u64,
134pub rx_invalid_descs: __u64,
135pub tx_invalid_descs: __u64,
136}
137pub const XDP_SHARED_UMEM: u32 = 1;
138pub const XDP_COPY: u32 = 2;
139pub const XDP_ZEROCOPY: u32 = 4;
140pub const XDP_USE_NEED_WAKEUP: u32 = 8;
141pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: u32 = 1;
142pub const XDP_RING_NEED_WAKEUP: u32 = 1;
143pub const XDP_MMAP_OFFSETS: u32 = 1;
144pub const XDP_RX_RING: u32 = 2;
145pub const XDP_TX_RING: u32 = 3;
146pub const XDP_UMEM_REG: u32 = 4;
147pub const XDP_UMEM_FILL_RING: u32 = 5;
148pub const XDP_UMEM_COMPLETION_RING: u32 = 6;
149pub const XDP_STATISTICS: u32 = 7;
150pub const XDP_OPTIONS: u32 = 8;
151pub const XDP_OPTIONS_ZEROCOPY: u32 = 1;
152pub const XDP_PGOFF_RX_RING: u32 = 0;
153pub const XDP_PGOFF_TX_RING: u32 = 2147483648;
154pub const XDP_UMEM_PGOFF_FILL_RING: u64 = 4294967296;
155pub const XDP_UMEM_PGOFF_COMPLETION_RING: u64 = 6442450944;
156pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: u32 = 48;
157pub const XSK_UNALIGNED_BUF_ADDR_MASK: u64 = 281474976710655;
158pub const XDP_USE_SG: u32 = 16;
159pub const XDP_PKT_CONTD: u32 = 1;
160

Provided by KDAB

Privacy Policy
Improve your Profiling and Debugging skills
Find out more