Debian Codegraph @

debian/rust-vendor/linux-raw-sys/src/riscv64/xdp.rs

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