Debian Codegraph @

debian/rust-vendor/linux-raw-sys/src/s390x/if_packet.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_pkt {
70 pub spkt_family: crate::ctypes::c_ushort,
71 pub spkt_device: [crate::ctypes::c_uchar; 14usize],
72 pub spkt_protocol: __be16,
73 }
74 #[repr(C)]
75 #[derive(Debug, Copy, Clone)]
76 pub struct sockaddr_ll {
77 pub sll_family: crate::ctypes::c_ushort,
78 pub sll_protocol: __be16,
79 pub sll_ifindex: crate::ctypes::c_int,
80 pub sll_hatype: crate::ctypes::c_ushort,
81 pub sll_pkttype: crate::ctypes::c_uchar,
82 pub sll_halen: crate::ctypes::c_uchar,
83 pub sll_addr: [crate::ctypes::c_uchar; 8usize],
84 }
85 #[repr(C)]
86 #[derive(Debug, Copy, Clone)]
87 pub struct tpacket_stats {
88 pub tp_packets: crate::ctypes::c_uint,
89 pub tp_drops: crate::ctypes::c_uint,
90 }
91 #[repr(C)]
92 #[derive(Debug, Copy, Clone)]
93 pub struct tpacket_stats_v3 {
94 pub tp_packets: crate::ctypes::c_uint,
95 pub tp_drops: crate::ctypes::c_uint,
96 pub tp_freeze_q_cnt: crate::ctypes::c_uint,
97 }
98 #[repr(C)]
99 #[derive(Debug, Copy, Clone)]
100 pub struct tpacket_rollover_stats {
101 pub tp_all: __u64,
102 pub tp_huge: __u64,
103 pub tp_failed: __u64,
104 }
105 #[repr(C)]
106 #[derive(Debug, Copy, Clone)]
107 pub struct tpacket_auxdata {
108 pub tp_status: __u32,
109 pub tp_len: __u32,
110 pub tp_snaplen: __u32,
111 pub tp_mac: __u16,
112 pub tp_net: __u16,
113 pub tp_vlan_tci: __u16,
114 pub tp_vlan_tpid: __u16,
115 }
116 #[repr(C)]
117 #[derive(Debug, Copy, Clone)]
118 pub struct tpacket_hdr {
119 pub tp_status: crate::ctypes::c_ulong,
120 pub tp_len: crate::ctypes::c_uint,
121 pub tp_snaplen: crate::ctypes::c_uint,
122 pub tp_mac: crate::ctypes::c_ushort,
123 pub tp_net: crate::ctypes::c_ushort,
124 pub tp_sec: crate::ctypes::c_uint,
125 pub tp_usec: crate::ctypes::c_uint,
126 }
127 #[repr(C)]
128 #[derive(Debug, Copy, Clone)]
129 pub struct tpacket2_hdr {
130 pub tp_status: __u32,
131 pub tp_len: __u32,
132 pub tp_snaplen: __u32,
133 pub tp_mac: __u16,
134 pub tp_net: __u16,
135 pub tp_sec: __u32,
136 pub tp_nsec: __u32,
137 pub tp_vlan_tci: __u16,
138 pub tp_vlan_tpid: __u16,
139 pub tp_padding: [__u8; 4usize],
140 }
141 #[repr(C)]
142 #[derive(Debug, Copy, Clone)]
143 pub struct tpacket_hdr_variant1 {
144 pub tp_rxhash: __u32,
145 pub tp_vlan_tci: __u32,
146 pub tp_vlan_tpid: __u16,
147 pub tp_padding: __u16,
148 }
149 #[repr(C)]
150 #[derive(Copy, Clone)]
151 pub struct tpacket3_hdr {
152 pub tp_next_offset: __u32,
153 pub tp_sec: __u32,
154 pub tp_nsec: __u32,
155 pub tp_snaplen: __u32,
156 pub tp_len: __u32,
157 pub tp_status: __u32,
158 pub tp_mac: __u16,
159 pub tp_net: __u16,
160 pub __bindgen_anon_1: tpacket3_hdr__bindgen_ty_1,
161 pub tp_padding: [__u8; 8usize],
162 }
163 #[repr(C)]
164 #[derive(Copy, Clone)]
165 pub struct tpacket_bd_ts {
166 pub ts_sec: crate::ctypes::c_uint,
167 pub __bindgen_anon_1: tpacket_bd_ts__bindgen_ty_1,
168 }
169 #[repr(C)]
170 #[derive(Copy, Clone)]
171 pub struct tpacket_hdr_v1 {
172 pub block_status: __u32,
173 pub num_pkts: __u32,
174 pub offset_to_first_pkt: __u32,
175 pub blk_len: __u32,
176 pub seq_num: __u64,
177 pub ts_first_pkt: tpacket_bd_ts,
178 pub ts_last_pkt: tpacket_bd_ts,
179 }
180 #[repr(C)]
181 #[derive(Copy, Clone)]
182 pub struct tpacket_block_desc {
183 pub version: __u32,
184 pub offset_to_priv: __u32,
185 pub hdr: tpacket_bd_header_u,
186 }
187 #[repr(C)]
188 #[derive(Debug, Copy, Clone)]
189 pub struct tpacket_req {
190 pub tp_block_size: crate::ctypes::c_uint,
191 pub tp_block_nr: crate::ctypes::c_uint,
192 pub tp_frame_size: crate::ctypes::c_uint,
193 pub tp_frame_nr: crate::ctypes::c_uint,
194 }
195 #[repr(C)]
196 #[derive(Debug, Copy, Clone)]
197 pub struct tpacket_req3 {
198 pub tp_block_size: crate::ctypes::c_uint,
199 pub tp_block_nr: crate::ctypes::c_uint,
200 pub tp_frame_size: crate::ctypes::c_uint,
201 pub tp_frame_nr: crate::ctypes::c_uint,
202 pub tp_retire_blk_tov: crate::ctypes::c_uint,
203 pub tp_sizeof_priv: crate::ctypes::c_uint,
204 pub tp_feature_req_word: crate::ctypes::c_uint,
205 }
206 #[repr(C)]
207 #[derive(Debug, Copy, Clone)]
208 pub struct packet_mreq {
209 pub mr_ifindex: crate::ctypes::c_int,
210 pub mr_type: crate::ctypes::c_ushort,
211 pub mr_alen: crate::ctypes::c_ushort,
212 pub mr_address: [crate::ctypes::c_uchar; 8usize],
213 }
214 #[repr(C)]
215 #[derive(Debug, Copy, Clone)]
216 pub struct fanout_args {
217 pub type_flags: __u16,
218 pub id: __u16,
219 pub max_num_members: __u32,
220 }
221 pub const __BIG_ENDIAN: u32 = 4321;
222 pub const __BITS_PER_LONG_LONG: u32 = 64;
223 pub const PACKET_HOST: u32 = 0;
224 pub const PACKET_BROADCAST: u32 = 1;
225 pub const PACKET_MULTICAST: u32 = 2;
226 pub const PACKET_OTHERHOST: u32 = 3;
227 pub const PACKET_OUTGOING: u32 = 4;
228 pub const PACKET_LOOPBACK: u32 = 5;
229 pub const PACKET_USER: u32 = 6;
230 pub const PACKET_KERNEL: u32 = 7;
231 pub const PACKET_FASTROUTE: u32 = 6;
232 pub const PACKET_ADD_MEMBERSHIP: u32 = 1;
233 pub const PACKET_DROP_MEMBERSHIP: u32 = 2;
234 pub const PACKET_RECV_OUTPUT: u32 = 3;
235 pub const PACKET_RX_RING: u32 = 5;
236 pub const PACKET_STATISTICS: u32 = 6;
237 pub const PACKET_COPY_THRESH: u32 = 7;
238 pub const PACKET_AUXDATA: u32 = 8;
239 pub const PACKET_ORIGDEV: u32 = 9;
240 pub const PACKET_VERSION: u32 = 10;
241 pub const PACKET_HDRLEN: u32 = 11;
242 pub const PACKET_RESERVE: u32 = 12;
243 pub const PACKET_TX_RING: u32 = 13;
244 pub const PACKET_LOSS: u32 = 14;
245 pub const PACKET_VNET_HDR: u32 = 15;
246 pub const PACKET_TX_TIMESTAMP: u32 = 16;
247 pub const PACKET_TIMESTAMP: u32 = 17;
248 pub const PACKET_FANOUT: u32 = 18;
249 pub const PACKET_TX_HAS_OFF: u32 = 19;
250 pub const PACKET_QDISC_BYPASS: u32 = 20;
251 pub const PACKET_ROLLOVER_STATS: u32 = 21;
252 pub const PACKET_FANOUT_DATA: u32 = 22;
253 pub const PACKET_IGNORE_OUTGOING: u32 = 23;
254 pub const PACKET_VNET_HDR_SZ: u32 = 24;
255 pub const PACKET_FANOUT_HASH: u32 = 0;
256 pub const PACKET_FANOUT_LB: u32 = 1;
257 pub const PACKET_FANOUT_CPU: u32 = 2;
258 pub const PACKET_FANOUT_ROLLOVER: u32 = 3;
259 pub const PACKET_FANOUT_RND: u32 = 4;
260 pub const PACKET_FANOUT_QM: u32 = 5;
261 pub const PACKET_FANOUT_CBPF: u32 = 6;
262 pub const PACKET_FANOUT_EBPF: u32 = 7;
263 pub const PACKET_FANOUT_FLAG_ROLLOVER: u32 = 4096;
264 pub const PACKET_FANOUT_FLAG_UNIQUEID: u32 = 8192;
265 pub const PACKET_FANOUT_FLAG_IGNORE_OUTGOING: u32 = 16384;
266 pub const PACKET_FANOUT_FLAG_DEFRAG: u32 = 32768;
267 pub const TP_STATUS_KERNEL: u32 = 0;
268 pub const TP_STATUS_USER: u32 = 1;
269 pub const TP_STATUS_COPY: u32 = 2;
270 pub const TP_STATUS_LOSING: u32 = 4;
271 pub const TP_STATUS_CSUMNOTREADY: u32 = 8;
272 pub const TP_STATUS_VLAN_VALID: u32 = 16;
273 pub const TP_STATUS_BLK_TMO: u32 = 32;
274 pub const TP_STATUS_VLAN_TPID_VALID: u32 = 64;
275 pub const TP_STATUS_CSUM_VALID: u32 = 128;
276 pub const TP_STATUS_GSO_TCP: u32 = 256;
277 pub const TP_STATUS_AVAILABLE: u32 = 0;
278 pub const TP_STATUS_SEND_REQUEST: u32 = 1;
279 pub const TP_STATUS_SENDING: u32 = 2;
280 pub const TP_STATUS_WRONG_FORMAT: u32 = 4;
281 pub const TP_STATUS_TS_SOFTWARE: u32 = 536870912;
282 pub const TP_STATUS_TS_SYS_HARDWARE: u32 = 1073741824;
283 pub const TP_STATUS_TS_RAW_HARDWARE: u32 = 2147483648;
284 pub const TP_FT_REQ_FILL_RXHASH: u32 = 1;
285 pub const TPACKET_ALIGNMENT: u32 = 16;
286 pub const PACKET_MR_MULTICAST: u32 = 0;
287 pub const PACKET_MR_PROMISC: u32 = 1;
288 pub const PACKET_MR_ALLMULTI: u32 = 2;
289 pub const PACKET_MR_UNICAST: u32 = 3;
290 #[repr(u32)]
291 #[non_exhaustive]
292 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
293 pub enum tpacket_versions {
294 TPACKET_V1 = 0,
295 TPACKET_V2 = 1,
296 TPACKET_V3 = 2,
297 }
298 #[repr(C)]
299 #[derive(Copy, Clone)]
300 pub union __vector128__bindgen_ty_1 {
301 pub __bindgen_anon_1: __vector128__bindgen_ty_1__bindgen_ty_1,
302 pub u: [__u32; 4usize],
303 }
304 #[repr(C)]
305 #[derive(Copy, Clone)]
306 pub union tpacket_stats_u {
307 pub stats1: tpacket_stats,
308 pub stats3: tpacket_stats_v3,
309 }
310 #[repr(C)]
311 #[derive(Copy, Clone)]
312 pub union tpacket3_hdr__bindgen_ty_1 {
313 pub hv1: tpacket_hdr_variant1,
314 }
315 #[repr(C)]
316 #[derive(Copy, Clone)]
317 pub union tpacket_bd_ts__bindgen_ty_1 {
318 pub ts_usec: crate::ctypes::c_uint,
319 pub ts_nsec: crate::ctypes::c_uint,
320 }
321 #[repr(C)]
322 #[derive(Copy, Clone)]
323 pub union tpacket_bd_header_u {
324 pub bh1: tpacket_hdr_v1,
325 }
326 #[repr(C)]
327 #[derive(Copy, Clone)]
328 pub union tpacket_req_u {
329 pub req: tpacket_req,
330 pub req3: tpacket_req3,
331 }