Debian Codegraph @

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