Debian Codegraph @

.cargo/vendor/linux-raw-sys/src/s390x/xdp.rs

raw
1 /* automatically generated by rust-bindgen 0.66.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 __le16 = __u16;
46 pub type __be16 = __u16;
47 pub type __le32 = __u32;
48 pub type __be32 = __u32;
49 pub type __le64 = __u64;
50 pub type __be64 = __u64;
51 pub type __sum16 = __u16;
52 pub type __wsum = __u32;
53 pub type __poll_t = crate::ctypes::c_uint;
54 #[repr(C, packed(4))]
55 #[derive(Copy, Clone)]
56 pub struct __vector128 {
57 pub __bindgen_anon_1: __vector128__bindgen_ty_1,
58 }
59 #[repr(C)]
60 #[derive(Debug, Copy, Clone)]
61 pub struct __vector128__bindgen_ty_1__bindgen_ty_1 {
62 pub high: __u64,
63 pub low: __u64,
64 }
65 #[repr(C)]
66 #[derive(Debug, Copy, Clone)]
67 pub struct sockaddr_xdp {
68 pub sxdp_family: __u16,
69 pub sxdp_flags: __u16,
70 pub sxdp_ifindex: __u32,
71 pub sxdp_queue_id: __u32,
72 pub sxdp_shared_umem_fd: __u32,
73 }
74 #[repr(C)]
75 #[derive(Debug, Copy, Clone)]
76 pub struct xdp_ring_offset {
77 pub producer: __u64,
78 pub consumer: __u64,
79 pub desc: __u64,
80 pub flags: __u64,
81 }
82 #[repr(C)]
83 #[derive(Debug, Copy, Clone)]
84 pub struct xdp_mmap_offsets {
85 pub rx: xdp_ring_offset,
86 pub tx: xdp_ring_offset,
87 pub fr: xdp_ring_offset,
88 pub cr: xdp_ring_offset,
89 }
90 #[repr(C)]
91 #[derive(Debug, Copy, Clone)]
92 pub struct xdp_umem_reg {
93 pub addr: __u64,
94 pub len: __u64,
95 pub chunk_size: __u32,
96 pub headroom: __u32,
97 pub flags: __u32,
98 }
99 #[repr(C)]
100 #[derive(Debug, Copy, Clone)]
101 pub struct xdp_statistics {
102 pub rx_dropped: __u64,
103 pub rx_invalid_descs: __u64,
104 pub tx_invalid_descs: __u64,
105 pub rx_ring_full: __u64,
106 pub rx_fill_ring_empty_descs: __u64,
107 pub tx_ring_empty_descs: __u64,
108 }
109 #[repr(C)]
110 #[derive(Debug, Copy, Clone)]
111 pub struct xdp_options {
112 pub flags: __u32,
113 }
114 #[repr(C)]
115 #[derive(Debug, Copy, Clone)]
116 pub struct xdp_desc {
117 pub addr: __u64,
118 pub len: __u32,
119 pub options: __u32,
120 }
121 #[repr(C)]
122 #[derive(Debug, Copy, Clone)]
123 pub struct xdp_ring_offset_v1 {
124 pub producer: __u64,
125 pub consumer: __u64,
126 pub desc: __u64,
127 }
128 #[repr(C)]
129 #[derive(Debug, Copy, Clone)]
130 pub struct xdp_mmap_offsets_v1 {
131 pub rx: xdp_ring_offset_v1,
132 pub tx: xdp_ring_offset_v1,
133 pub fr: xdp_ring_offset_v1,
134 pub cr: xdp_ring_offset_v1,
135 }
136 #[repr(C)]
137 #[derive(Debug, Copy, Clone)]
138 pub struct xdp_umem_reg_v1 {
139 pub addr: __u64,
140 pub len: __u64,
141 pub chunk_size: __u32,
142 pub headroom: __u32,
143 }
144 #[repr(C)]
145 #[derive(Debug, Copy, Clone)]
146 pub struct xdp_statistics_v1 {
147 pub rx_dropped: __u64,
148 pub rx_invalid_descs: __u64,
149 pub tx_invalid_descs: __u64,
150 }
151 pub const XDP_SHARED_UMEM: u32 = 1;
152 pub const XDP_COPY: u32 = 2;
153 pub const XDP_ZEROCOPY: u32 = 4;
154 pub const XDP_USE_NEED_WAKEUP: u32 = 8;
155 pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: u32 = 1;
156 pub const XDP_RING_NEED_WAKEUP: u32 = 1;
157 pub const XDP_MMAP_OFFSETS: u32 = 1;
158 pub const XDP_RX_RING: u32 = 2;
159 pub const XDP_TX_RING: u32 = 3;
160 pub const XDP_UMEM_REG: u32 = 4;
161 pub const XDP_UMEM_FILL_RING: u32 = 5;
162 pub const XDP_UMEM_COMPLETION_RING: u32 = 6;
163 pub const XDP_STATISTICS: u32 = 7;
164 pub const XDP_OPTIONS: u32 = 8;
165 pub const XDP_OPTIONS_ZEROCOPY: u32 = 1;
166 pub const XDP_PGOFF_RX_RING: u32 = 0;
167 pub const XDP_PGOFF_TX_RING: u32 = 2147483648;
168 pub const XDP_UMEM_PGOFF_FILL_RING: u64 = 4294967296;
169 pub const XDP_UMEM_PGOFF_COMPLETION_RING: u64 = 6442450944;
170 pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: u32 = 48;
171 pub const XSK_UNALIGNED_BUF_ADDR_MASK: u64 = 281474976710655;
172 pub const XDP_USE_SG: u32 = 16;
173 pub const XDP_PKT_CONTD: u32 = 1;
174 #[repr(C)]
175 #[derive(Copy, Clone)]
176 pub union __vector128__bindgen_ty_1 {
177 pub __bindgen_anon_1: __vector128__bindgen_ty_1__bindgen_ty_1,
178 pub u: [__u32; 4usize],
179 }