Debian Codegraph @

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