Debian Codegraph @

debian/rust-vendor/linux-raw-sys/src/powerpc/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_ipc_pid_t = crate::ctypes::c_short;
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_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 = crate::ctypes::c_uint;
29 pub type __kernel_ssize_t = crate::ctypes::c_int;
30 pub type __kernel_ptrdiff_t = crate::ctypes::c_int;
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 __le16 = __u16;
43 pub type __be16 = __u16;
44 pub type __le32 = __u32;
45 pub type __be32 = __u32;
46 pub type __le64 = __u64;
47 pub type __be64 = __u64;
48 pub type __sum16 = __u16;
49 pub type __wsum = __u32;
50 pub type __poll_t = crate::ctypes::c_uint;
51 #[repr(C)]
52 #[repr(align(16))]
53 #[derive(Debug, Copy, Clone)]
54 pub struct __vector128 {
55 pub u: [__u32; 4usize],
56 }
57 #[repr(C)]
58 #[derive(Debug, Copy, Clone)]
59 pub struct sockaddr_xdp {
60 pub sxdp_family: __u16,
61 pub sxdp_flags: __u16,
62 pub sxdp_ifindex: __u32,
63 pub sxdp_queue_id: __u32,
64 pub sxdp_shared_umem_fd: __u32,
65 }
66 #[repr(C)]
67 #[derive(Debug, Copy, Clone)]
68 pub struct xdp_ring_offset {
69 pub producer: __u64,
70 pub consumer: __u64,
71 pub desc: __u64,
72 pub flags: __u64,
73 }
74 #[repr(C)]
75 #[derive(Debug, Copy, Clone)]
76 pub struct xdp_mmap_offsets {
77 pub rx: xdp_ring_offset,
78 pub tx: xdp_ring_offset,
79 pub fr: xdp_ring_offset,
80 pub cr: xdp_ring_offset,
81 }
82 #[repr(C)]
83 #[derive(Debug, Copy, Clone)]
84 pub struct xdp_umem_reg {
85 pub addr: __u64,
86 pub len: __u64,
87 pub chunk_size: __u32,
88 pub headroom: __u32,
89 pub flags: __u32,
90 pub tx_metadata_len: __u32,
91 }
92 #[repr(C)]
93 #[derive(Debug, Copy, Clone)]
94 pub struct xdp_statistics {
95 pub rx_dropped: __u64,
96 pub rx_invalid_descs: __u64,
97 pub tx_invalid_descs: __u64,
98 pub rx_ring_full: __u64,
99 pub rx_fill_ring_empty_descs: __u64,
100 pub tx_ring_empty_descs: __u64,
101 }
102 #[repr(C)]
103 #[derive(Debug, Copy, Clone)]
104 pub struct xdp_options {
105 pub flags: __u32,
106 }
107 #[repr(C)]
108 #[derive(Copy, Clone)]
109 pub struct xsk_tx_metadata {
110 pub flags: __u64,
111 pub __bindgen_anon_1: xsk_tx_metadata__bindgen_ty_1,
112 }
113 #[repr(C)]
114 #[derive(Debug, Copy, Clone)]
115 pub struct xsk_tx_metadata__bindgen_ty_1__bindgen_ty_1 {
116 pub csum_start: __u16,
117 pub csum_offset: __u16,
118 pub launch_time: __u64,
119 }
120 #[repr(C)]
121 #[derive(Debug, Copy, Clone)]
122 pub struct xsk_tx_metadata__bindgen_ty_1__bindgen_ty_2 {
123 pub tx_timestamp: __u64,
124 }
125 #[repr(C)]
126 #[derive(Debug, Copy, Clone)]
127 pub struct xdp_desc {
128 pub addr: __u64,
129 pub len: __u32,
130 pub options: __u32,
131 }
132 #[repr(C)]
133 #[derive(Debug, Copy, Clone)]
134 pub struct xdp_ring_offset_v1 {
135 pub producer: __u64,
136 pub consumer: __u64,
137 pub desc: __u64,
138 }
139 #[repr(C)]
140 #[derive(Debug, Copy, Clone)]
141 pub struct xdp_mmap_offsets_v1 {
142 pub rx: xdp_ring_offset_v1,
143 pub tx: xdp_ring_offset_v1,
144 pub fr: xdp_ring_offset_v1,
145 pub cr: xdp_ring_offset_v1,
146 }
147 #[repr(C)]
148 #[derive(Debug, Copy, Clone)]
149 pub struct xdp_umem_reg_v1 {
150 pub addr: __u64,
151 pub len: __u64,
152 pub chunk_size: __u32,
153 pub headroom: __u32,
154 }
155 #[repr(C)]
156 #[derive(Debug, Copy, Clone)]
157 pub struct xdp_statistics_v1 {
158 pub rx_dropped: __u64,
159 pub rx_invalid_descs: __u64,
160 pub tx_invalid_descs: __u64,
161 }
162 pub const __BITS_PER_LONG_LONG: u32 = 64;
163 pub const XDP_SHARED_UMEM: u32 = 1;
164 pub const XDP_COPY: u32 = 2;
165 pub const XDP_ZEROCOPY: u32 = 4;
166 pub const XDP_USE_NEED_WAKEUP: u32 = 8;
167 pub const XDP_USE_SG: u32 = 16;
168 pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: u32 = 1;
169 pub const XDP_UMEM_TX_SW_CSUM: u32 = 2;
170 pub const XDP_UMEM_TX_METADATA_LEN: u32 = 4;
171 pub const XDP_RING_NEED_WAKEUP: u32 = 1;
172 pub const XDP_MMAP_OFFSETS: u32 = 1;
173 pub const XDP_RX_RING: u32 = 2;
174 pub const XDP_TX_RING: u32 = 3;
175 pub const XDP_UMEM_REG: u32 = 4;
176 pub const XDP_UMEM_FILL_RING: u32 = 5;
177 pub const XDP_UMEM_COMPLETION_RING: u32 = 6;
178 pub const XDP_STATISTICS: u32 = 7;
179 pub const XDP_OPTIONS: u32 = 8;
180 pub const XDP_MAX_TX_SKB_BUDGET: u32 = 9;
181 pub const XDP_OPTIONS_ZEROCOPY: u32 = 1;
182 pub const XDP_PGOFF_RX_RING: u32 = 0;
183 pub const XDP_PGOFF_TX_RING: u32 = 2147483648;
184 pub const XDP_UMEM_PGOFF_FILL_RING: u64 = 4294967296;
185 pub const XDP_UMEM_PGOFF_COMPLETION_RING: u64 = 6442450944;
186 pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: u32 = 48;
187 pub const XSK_UNALIGNED_BUF_ADDR_MASK: u64 = 281474976710655;
188 pub const XDP_TXMD_FLAGS_TIMESTAMP: u32 = 1;
189 pub const XDP_TXMD_FLAGS_CHECKSUM: u32 = 2;
190 pub const XDP_TXMD_FLAGS_LAUNCH_TIME: u32 = 4;
191 pub const XDP_PKT_CONTD: u32 = 1;
192 pub const XDP_TX_METADATA: u32 = 2;
193 #[repr(C)]
194 #[derive(Copy, Clone)]
195 pub union xsk_tx_metadata__bindgen_ty_1 {
196 pub request: xsk_tx_metadata__bindgen_ty_1__bindgen_ty_1,
197 pub completion: xsk_tx_metadata__bindgen_ty_1__bindgen_ty_2,
198 }