xref: /openbmc/qemu/linux-user/syscall_types.h (revision a8d25326)
1 STRUCT_SPECIAL(termios)
2 
3 STRUCT(winsize,
4        TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT)
5 
6 STRUCT(serial_multiport_struct,
7        TYPE_INT, TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_CHAR, TYPE_CHAR,
8        TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT,
9        MK_ARRAY(TYPE_INT, 32))
10 
11 STRUCT(serial_icounter_struct,
12        TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, MK_ARRAY(TYPE_INT, 16))
13 
14 STRUCT(sockaddr,
15        TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 14))
16 
17 STRUCT(timeval,
18        MK_ARRAY(TYPE_LONG, 2))
19 
20 STRUCT(timespec,
21        MK_ARRAY(TYPE_LONG, 2))
22 
23 STRUCT(rtentry,
24        TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr),
25        TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID,
26        TYPE_ULONG, TYPE_ULONG, TYPE_SHORT)
27 
28 STRUCT(ifmap,
29        TYPE_ULONG, TYPE_ULONG, TYPE_SHORT, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR,
30        /* Spare 3 bytes */
31        TYPE_CHAR, TYPE_CHAR, TYPE_CHAR)
32 
33 /* The *_ifreq_list arrays deal with the fact that struct ifreq has unions */
34 
35 STRUCT(sockaddr_ifreq,
36        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_sockaddr))
37 
38 STRUCT(short_ifreq,
39        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_SHORT)
40 
41 STRUCT(int_ifreq,
42        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_INT)
43 
44 STRUCT(ifmap_ifreq,
45        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_ifmap))
46 
47 STRUCT(char_ifreq,
48        MK_ARRAY(TYPE_CHAR, IFNAMSIZ),
49        MK_ARRAY(TYPE_CHAR, IFNAMSIZ))
50 
51 STRUCT(ptr_ifreq,
52        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_PTRVOID)
53 
54 STRUCT(ifconf,
55        TYPE_INT, TYPE_PTRVOID)
56 
57 STRUCT(arpreq,
58        MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr),
59        MK_ARRAY(TYPE_CHAR, 16))
60 
61 STRUCT(arpreq_old,
62        MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr))
63 
64 STRUCT(cdrom_read_audio,
65        TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_PTRVOID,
66        TYPE_NULL)
67 
68 STRUCT(hd_geometry,
69        TYPE_CHAR, TYPE_CHAR, TYPE_SHORT, TYPE_ULONG)
70 
71 STRUCT(dirent,
72        TYPE_LONG, TYPE_LONG, TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 256))
73 
74 STRUCT(kbentry,
75        TYPE_CHAR, TYPE_CHAR, TYPE_SHORT)
76 
77 STRUCT(kbsentry,
78        TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512))
79 
80 STRUCT(audio_buf_info,
81        TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT)
82 
83 STRUCT(count_info,
84        TYPE_INT, TYPE_INT, TYPE_INT)
85 
86 STRUCT(buffmem_desc,
87        TYPE_PTRVOID, TYPE_INT)
88 
89 STRUCT(mixer_info,
90        MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10))
91 
92 /* loop device ioctls */
93 STRUCT(loop_info,
94        TYPE_INT,                 /* lo_number */
95        TYPE_OLDDEVT,             /* lo_device */
96        TYPE_ULONG,               /* lo_inode */
97        TYPE_OLDDEVT,             /* lo_rdevice */
98        TYPE_INT,                 /* lo_offset */
99        TYPE_INT,                 /* lo_encrypt_type */
100        TYPE_INT,                 /* lo_encrypt_key_size */
101        TYPE_INT,                 /* lo_flags */
102        MK_ARRAY(TYPE_CHAR, 64),  /* lo_name */
103        MK_ARRAY(TYPE_CHAR, 32),  /* lo_encrypt_key */
104        MK_ARRAY(TYPE_ULONG, 2),  /* lo_init */
105        MK_ARRAY(TYPE_CHAR, 4))   /* reserved */
106 
107 STRUCT(loop_info64,
108        TYPE_ULONGLONG,           /* lo_device */
109        TYPE_ULONGLONG,           /* lo_inode */
110        TYPE_ULONGLONG,           /* lo_rdevice */
111        TYPE_ULONGLONG,           /* lo_offset */
112        TYPE_ULONGLONG,           /* lo_sizelimit */
113        TYPE_INT,                 /* lo_number */
114        TYPE_INT,                 /* lo_encrypt_type */
115        TYPE_INT,                 /* lo_encrypt_key_size */
116        TYPE_INT,                 /* lo_flags */
117        MK_ARRAY(TYPE_CHAR, 64),  /* lo_name */
118        MK_ARRAY(TYPE_CHAR, 64),  /* lo_crypt_name */
119        MK_ARRAY(TYPE_CHAR, 32),  /* lo_encrypt_key */
120        MK_ARRAY(TYPE_ULONGLONG, 2))  /* lo_init */
121 
122 /* mag tape ioctls */
123 STRUCT(mtop, TYPE_SHORT, TYPE_INT)
124 STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG,
125        TYPE_INT, TYPE_INT)
126 STRUCT(mtpos, TYPE_LONG)
127 
128 STRUCT(fb_fix_screeninfo,
129        MK_ARRAY(TYPE_CHAR, 16), /* id */
130        TYPE_ULONG, /* smem_start */
131        TYPE_INT, /* smem_len */
132        TYPE_INT, /* type */
133        TYPE_INT, /* type_aux */
134        TYPE_INT, /* visual */
135        TYPE_SHORT, /* xpanstep */
136        TYPE_SHORT, /* ypanstep */
137        TYPE_SHORT, /* ywrapstep */
138        TYPE_INT, /* line_length */
139        TYPE_ULONG, /* mmio_start */
140        TYPE_INT, /* mmio_len */
141        TYPE_INT, /* accel */
142        MK_ARRAY(TYPE_CHAR, 3)) /* reserved */
143 
144 STRUCT(fb_var_screeninfo,
145        TYPE_INT, /* xres */
146        TYPE_INT, /* yres */
147        TYPE_INT, /* xres_virtual */
148        TYPE_INT, /* yres_virtual */
149        TYPE_INT, /* xoffset */
150        TYPE_INT, /* yoffset */
151        TYPE_INT, /* bits_per_pixel */
152        TYPE_INT, /* grayscale */
153        MK_ARRAY(TYPE_INT, 3), /* red */
154        MK_ARRAY(TYPE_INT, 3), /* green */
155        MK_ARRAY(TYPE_INT, 3), /* blue */
156        MK_ARRAY(TYPE_INT, 3), /* transp */
157        TYPE_INT, /* nonstd */
158        TYPE_INT, /* activate */
159        TYPE_INT, /* height */
160        TYPE_INT, /* width */
161        TYPE_INT, /* accel_flags */
162        TYPE_INT, /* pixclock */
163        TYPE_INT, /* left_margin */
164        TYPE_INT, /* right_margin */
165        TYPE_INT, /* upper_margin */
166        TYPE_INT, /* lower_margin */
167        TYPE_INT, /* hsync_len */
168        TYPE_INT, /* vsync_len */
169        TYPE_INT, /* sync */
170        TYPE_INT, /* vmode */
171        TYPE_INT, /* rotate */
172        MK_ARRAY(TYPE_INT, 5)) /* reserved */
173 
174 STRUCT(fb_cmap,
175        TYPE_INT, /* start  */
176        TYPE_INT, /* len    */
177        TYPE_PTRVOID, /* red    */
178        TYPE_PTRVOID, /* green  */
179        TYPE_PTRVOID, /* blue   */
180        TYPE_PTRVOID) /* transp */
181 
182 STRUCT(fb_con2fbmap,
183        TYPE_INT, /* console     */
184        TYPE_INT) /* framebuffer */
185 
186 
187 STRUCT(vt_stat,
188        TYPE_SHORT, /* v_active */
189        TYPE_SHORT, /* v_signal */
190        TYPE_SHORT) /* v_state */
191 
192 STRUCT(vt_mode,
193        TYPE_CHAR,  /* mode   */
194        TYPE_CHAR,  /* waitv  */
195        TYPE_SHORT, /* relsig */
196        TYPE_SHORT, /* acqsig */
197        TYPE_SHORT) /* frsig  */
198 
199 STRUCT(dm_ioctl,
200        MK_ARRAY(TYPE_INT, 3), /* version */
201        TYPE_INT, /* data_size */
202        TYPE_INT, /* data_start */
203        TYPE_INT, /* target_count*/
204        TYPE_INT, /* open_count */
205        TYPE_INT, /* flags */
206        TYPE_INT, /* event_nr */
207        TYPE_INT, /* padding */
208        TYPE_ULONGLONG, /* dev */
209        MK_ARRAY(TYPE_CHAR, 128), /* name */
210        MK_ARRAY(TYPE_CHAR, 129), /* uuid */
211        MK_ARRAY(TYPE_CHAR, 7)) /* data */
212 
213 STRUCT(dm_target_spec,
214        TYPE_ULONGLONG, /* sector_start */
215        TYPE_ULONGLONG, /* length */
216        TYPE_INT, /* status */
217        TYPE_INT, /* next */
218        MK_ARRAY(TYPE_CHAR, 16)) /* target_type */
219 
220 STRUCT(dm_target_deps,
221        TYPE_INT, /* count */
222        TYPE_INT) /* padding */
223 
224 STRUCT(dm_name_list,
225        TYPE_ULONGLONG, /* dev */
226        TYPE_INT) /* next */
227 
228 STRUCT(dm_target_versions,
229        TYPE_INT, /* next */
230        MK_ARRAY(TYPE_INT, 3)) /* version*/
231 
232 STRUCT(dm_target_msg,
233        TYPE_ULONGLONG) /* sector */
234 
235 STRUCT(file_clone_range,
236        TYPE_LONGLONG, /* src_fd */
237        TYPE_ULONGLONG, /* src_offset */
238        TYPE_ULONGLONG, /* src_length */
239        TYPE_ULONGLONG) /* dest_offset */
240 
241 STRUCT(fiemap_extent,
242        TYPE_ULONGLONG, /* fe_logical */
243        TYPE_ULONGLONG, /* fe_physical */
244        TYPE_ULONGLONG, /* fe_length */
245        MK_ARRAY(TYPE_ULONGLONG, 2), /* fe_reserved64[2] */
246        TYPE_INT, /* fe_flags */
247        MK_ARRAY(TYPE_INT, 3)) /* fe_reserved[3] */
248 
249 STRUCT(fiemap,
250        TYPE_ULONGLONG, /* fm_start */
251        TYPE_ULONGLONG, /* fm_length */
252        TYPE_INT, /* fm_flags */
253        TYPE_INT, /* fm_mapped_extents */
254        TYPE_INT, /* fm_extent_count */
255        TYPE_INT) /* fm_reserved */
256 
257 STRUCT(blkpg_partition,
258        TYPE_LONGLONG, /* start */
259        TYPE_LONGLONG, /* length */
260        TYPE_INT, /* pno */
261        MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */
262        MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */
263 
264 STRUCT(blkpg_ioctl_arg,
265        TYPE_INT, /* op */
266        TYPE_INT, /* flags */
267        TYPE_INT, /* datalen */
268        TYPE_PTRVOID) /* data */
269 
270 #if defined(CONFIG_USBFS)
271 /* usb device ioctls */
272 STRUCT(usbdevfs_ctrltransfer,
273         TYPE_CHAR, /* bRequestType */
274         TYPE_CHAR, /* bRequest */
275         TYPE_SHORT, /* wValue */
276         TYPE_SHORT, /* wIndex */
277         TYPE_SHORT, /* wLength */
278         TYPE_INT, /* timeout */
279         TYPE_PTRVOID) /* data */
280 
281 STRUCT(usbdevfs_bulktransfer,
282         TYPE_INT, /* ep */
283         TYPE_INT, /* len */
284         TYPE_INT, /* timeout */
285         TYPE_PTRVOID) /* data */
286 
287 STRUCT(usbdevfs_setinterface,
288         TYPE_INT, /* interface */
289         TYPE_INT) /* altsetting */
290 
291 STRUCT(usbdevfs_disconnectsignal,
292         TYPE_INT, /* signr */
293         TYPE_PTRVOID) /* context */
294 
295 STRUCT(usbdevfs_getdriver,
296         TYPE_INT, /* interface */
297         MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */
298 
299 STRUCT(usbdevfs_connectinfo,
300         TYPE_INT, /* devnum */
301         TYPE_CHAR) /* slow */
302 
303 STRUCT(usbdevfs_iso_packet_desc,
304         TYPE_INT, /* length */
305         TYPE_INT, /* actual_length */
306         TYPE_INT) /* status */
307 
308 STRUCT(usbdevfs_urb,
309         TYPE_CHAR, /* type */
310         TYPE_CHAR, /* endpoint */
311         TYPE_INT, /* status */
312         TYPE_INT, /* flags */
313         TYPE_PTRVOID, /* buffer */
314         TYPE_INT, /* buffer_length */
315         TYPE_INT, /* actual_length */
316         TYPE_INT, /* start_frame */
317         TYPE_INT, /* union number_of_packets stream_id */
318         TYPE_INT, /* error_count */
319         TYPE_INT, /* signr */
320         TYPE_PTRVOID, /* usercontext */
321         MK_ARRAY(MK_STRUCT(STRUCT_usbdevfs_iso_packet_desc), 0)) /* desc */
322 
323 STRUCT(usbdevfs_ioctl,
324         TYPE_INT, /* ifno */
325         TYPE_INT, /* ioctl_code */
326         TYPE_PTRVOID) /* data */
327 
328 STRUCT(usbdevfs_hub_portinfo,
329         TYPE_CHAR, /* nports */
330         MK_ARRAY(TYPE_CHAR, 127)) /* port */
331 
332 STRUCT(usbdevfs_disconnect_claim,
333         TYPE_INT, /* interface */
334         TYPE_INT, /* flags */
335         MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */
336 #endif /* CONFIG_USBFS */
337