xref: /openbmc/qemu/linux-user/syscall_types.h (revision 5964ed56)
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(rtentry,
18        TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr),
19        TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID,
20        TYPE_ULONG, TYPE_ULONG, TYPE_SHORT)
21 
22 STRUCT(ifmap,
23        TYPE_ULONG, TYPE_ULONG, TYPE_SHORT, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR,
24        /* Spare 3 bytes */
25        TYPE_CHAR, TYPE_CHAR, TYPE_CHAR)
26 
27 /* The *_ifreq_list arrays deal with the fact that struct ifreq has unions */
28 
29 STRUCT(sockaddr_ifreq,
30        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_sockaddr))
31 
32 STRUCT(short_ifreq,
33        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_SHORT)
34 
35 STRUCT(int_ifreq,
36        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_INT)
37 
38 STRUCT(ifmap_ifreq,
39        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_ifmap))
40 
41 STRUCT(char_ifreq,
42        MK_ARRAY(TYPE_CHAR, IFNAMSIZ),
43        MK_ARRAY(TYPE_CHAR, IFNAMSIZ))
44 
45 STRUCT(ptr_ifreq,
46        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_PTRVOID)
47 
48 STRUCT(ifconf,
49        TYPE_INT, TYPE_PTRVOID)
50 
51 STRUCT(arpreq,
52        MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr),
53        MK_ARRAY(TYPE_CHAR, 16))
54 
55 STRUCT(arpreq_old,
56        MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr))
57 
58 STRUCT(cdrom_read_audio,
59        TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_PTRVOID,
60        TYPE_NULL)
61 
62 STRUCT(hd_geometry,
63        TYPE_CHAR, TYPE_CHAR, TYPE_SHORT, TYPE_ULONG)
64 
65 STRUCT(dirent,
66        TYPE_LONG, TYPE_LONG, TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 256))
67 
68 STRUCT(kbentry,
69        TYPE_CHAR, TYPE_CHAR, TYPE_SHORT)
70 
71 STRUCT(kbsentry,
72        TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512))
73 
74 STRUCT(audio_buf_info,
75        TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT)
76 
77 STRUCT(count_info,
78        TYPE_INT, TYPE_INT, TYPE_INT)
79 
80 STRUCT(buffmem_desc,
81        TYPE_PTRVOID, TYPE_INT)
82 
83 STRUCT(mixer_info,
84        MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10))
85 
86 STRUCT(snd_timer_id,
87        TYPE_INT, /* dev_class */
88        TYPE_INT, /* dev_sclass */
89        TYPE_INT, /* card */
90        TYPE_INT, /* device */
91        TYPE_INT) /* subdevice */
92 
93 STRUCT(snd_timer_ginfo,
94        MK_STRUCT(STRUCT_snd_timer_id), /* tid */
95        TYPE_INT, /* flags */
96        TYPE_INT, /* card */
97        MK_ARRAY(TYPE_CHAR, 64), /* id */
98        MK_ARRAY(TYPE_CHAR, 80), /* name */
99        TYPE_ULONG, /* reserved0 */
100        TYPE_ULONG, /* resolution */
101        TYPE_ULONG, /* resolution_min */
102        TYPE_ULONG, /* resolution_max */
103        TYPE_INT, /* clients */
104        MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
105 
106 STRUCT(snd_timer_gparams,
107        MK_STRUCT(STRUCT_snd_timer_id), /* tid */
108        TYPE_ULONG, /* period_num */
109        TYPE_ULONG, /* period_den */
110        MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
111 
112 STRUCT(snd_timer_gstatus,
113        MK_STRUCT(STRUCT_snd_timer_id), /* tid */
114        TYPE_ULONG, /* resolution */
115        TYPE_ULONG, /* resolution_num */
116        TYPE_ULONG, /* resolution_den */
117        MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
118 
119 STRUCT(snd_timer_select,
120        MK_STRUCT(STRUCT_snd_timer_id), /* id */
121        MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
122 
123 STRUCT(snd_timer_info,
124        TYPE_INT, /* flags */
125        TYPE_INT, /* card */
126        MK_ARRAY(TYPE_CHAR, 64), /* id */
127        MK_ARRAY(TYPE_CHAR, 80), /* name */
128        TYPE_ULONG, /* reserved0 */
129        TYPE_ULONG, /* resolution */
130        MK_ARRAY(TYPE_CHAR, 64)) /* reserved */
131 
132 STRUCT(snd_timer_params,
133        TYPE_INT, /* flags */
134        TYPE_INT, /* ticks */
135        TYPE_INT, /* queue_size */
136        TYPE_INT, /* reserved0 */
137        TYPE_INT, /* filter */
138        MK_ARRAY(TYPE_CHAR, 60)) /* reserved */
139 
140 STRUCT(timespec,
141        TYPE_LONG, /* tv_sec */
142        TYPE_LONG) /* tv_nsec */
143 
144 STRUCT(snd_timer_status,
145        MK_STRUCT(STRUCT_timespec), /* tstamp */
146        TYPE_INT, /* resolution */
147        TYPE_INT, /* lost */
148        TYPE_INT, /* overrun */
149        TYPE_INT, /* queue */
150        MK_ARRAY(TYPE_CHAR, 64)) /* reserved */
151 
152 /* loop device ioctls */
153 STRUCT(loop_info,
154        TYPE_INT,                 /* lo_number */
155        TYPE_OLDDEVT,             /* lo_device */
156        TYPE_ULONG,               /* lo_inode */
157        TYPE_OLDDEVT,             /* lo_rdevice */
158        TYPE_INT,                 /* lo_offset */
159        TYPE_INT,                 /* lo_encrypt_type */
160        TYPE_INT,                 /* lo_encrypt_key_size */
161        TYPE_INT,                 /* lo_flags */
162        MK_ARRAY(TYPE_CHAR, 64),  /* lo_name */
163        MK_ARRAY(TYPE_CHAR, 32),  /* lo_encrypt_key */
164        MK_ARRAY(TYPE_ULONG, 2),  /* lo_init */
165        MK_ARRAY(TYPE_CHAR, 4))   /* reserved */
166 
167 STRUCT(loop_info64,
168        TYPE_ULONGLONG,           /* lo_device */
169        TYPE_ULONGLONG,           /* lo_inode */
170        TYPE_ULONGLONG,           /* lo_rdevice */
171        TYPE_ULONGLONG,           /* lo_offset */
172        TYPE_ULONGLONG,           /* lo_sizelimit */
173        TYPE_INT,                 /* lo_number */
174        TYPE_INT,                 /* lo_encrypt_type */
175        TYPE_INT,                 /* lo_encrypt_key_size */
176        TYPE_INT,                 /* lo_flags */
177        MK_ARRAY(TYPE_CHAR, 64),  /* lo_name */
178        MK_ARRAY(TYPE_CHAR, 64),  /* lo_crypt_name */
179        MK_ARRAY(TYPE_CHAR, 32),  /* lo_encrypt_key */
180        MK_ARRAY(TYPE_ULONGLONG, 2))  /* lo_init */
181 
182 /* mag tape ioctls */
183 STRUCT(mtop, TYPE_SHORT, TYPE_INT)
184 STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG,
185        TYPE_INT, TYPE_INT)
186 STRUCT(mtpos, TYPE_LONG)
187 
188 STRUCT(fb_fix_screeninfo,
189        MK_ARRAY(TYPE_CHAR, 16), /* id */
190        TYPE_ULONG, /* smem_start */
191        TYPE_INT, /* smem_len */
192        TYPE_INT, /* type */
193        TYPE_INT, /* type_aux */
194        TYPE_INT, /* visual */
195        TYPE_SHORT, /* xpanstep */
196        TYPE_SHORT, /* ypanstep */
197        TYPE_SHORT, /* ywrapstep */
198        TYPE_INT, /* line_length */
199        TYPE_ULONG, /* mmio_start */
200        TYPE_INT, /* mmio_len */
201        TYPE_INT, /* accel */
202        MK_ARRAY(TYPE_CHAR, 3)) /* reserved */
203 
204 STRUCT(fb_var_screeninfo,
205        TYPE_INT, /* xres */
206        TYPE_INT, /* yres */
207        TYPE_INT, /* xres_virtual */
208        TYPE_INT, /* yres_virtual */
209        TYPE_INT, /* xoffset */
210        TYPE_INT, /* yoffset */
211        TYPE_INT, /* bits_per_pixel */
212        TYPE_INT, /* grayscale */
213        MK_ARRAY(TYPE_INT, 3), /* red */
214        MK_ARRAY(TYPE_INT, 3), /* green */
215        MK_ARRAY(TYPE_INT, 3), /* blue */
216        MK_ARRAY(TYPE_INT, 3), /* transp */
217        TYPE_INT, /* nonstd */
218        TYPE_INT, /* activate */
219        TYPE_INT, /* height */
220        TYPE_INT, /* width */
221        TYPE_INT, /* accel_flags */
222        TYPE_INT, /* pixclock */
223        TYPE_INT, /* left_margin */
224        TYPE_INT, /* right_margin */
225        TYPE_INT, /* upper_margin */
226        TYPE_INT, /* lower_margin */
227        TYPE_INT, /* hsync_len */
228        TYPE_INT, /* vsync_len */
229        TYPE_INT, /* sync */
230        TYPE_INT, /* vmode */
231        TYPE_INT, /* rotate */
232        MK_ARRAY(TYPE_INT, 5)) /* reserved */
233 
234 STRUCT(fb_cmap,
235        TYPE_INT, /* start  */
236        TYPE_INT, /* len    */
237        TYPE_PTRVOID, /* red    */
238        TYPE_PTRVOID, /* green  */
239        TYPE_PTRVOID, /* blue   */
240        TYPE_PTRVOID) /* transp */
241 
242 STRUCT(fb_con2fbmap,
243        TYPE_INT, /* console     */
244        TYPE_INT) /* framebuffer */
245 
246 
247 STRUCT(vt_stat,
248        TYPE_SHORT, /* v_active */
249        TYPE_SHORT, /* v_signal */
250        TYPE_SHORT) /* v_state */
251 
252 STRUCT(vt_mode,
253        TYPE_CHAR,  /* mode   */
254        TYPE_CHAR,  /* waitv  */
255        TYPE_SHORT, /* relsig */
256        TYPE_SHORT, /* acqsig */
257        TYPE_SHORT) /* frsig  */
258 
259 STRUCT(dm_ioctl,
260        MK_ARRAY(TYPE_INT, 3), /* version */
261        TYPE_INT, /* data_size */
262        TYPE_INT, /* data_start */
263        TYPE_INT, /* target_count*/
264        TYPE_INT, /* open_count */
265        TYPE_INT, /* flags */
266        TYPE_INT, /* event_nr */
267        TYPE_INT, /* padding */
268        TYPE_ULONGLONG, /* dev */
269        MK_ARRAY(TYPE_CHAR, 128), /* name */
270        MK_ARRAY(TYPE_CHAR, 129), /* uuid */
271        MK_ARRAY(TYPE_CHAR, 7)) /* data */
272 
273 STRUCT(dm_target_spec,
274        TYPE_ULONGLONG, /* sector_start */
275        TYPE_ULONGLONG, /* length */
276        TYPE_INT, /* status */
277        TYPE_INT, /* next */
278        MK_ARRAY(TYPE_CHAR, 16)) /* target_type */
279 
280 STRUCT(dm_target_deps,
281        TYPE_INT, /* count */
282        TYPE_INT) /* padding */
283 
284 STRUCT(dm_name_list,
285        TYPE_ULONGLONG, /* dev */
286        TYPE_INT) /* next */
287 
288 STRUCT(dm_target_versions,
289        TYPE_INT, /* next */
290        MK_ARRAY(TYPE_INT, 3)) /* version*/
291 
292 STRUCT(dm_target_msg,
293        TYPE_ULONGLONG) /* sector */
294 
295 STRUCT(file_clone_range,
296        TYPE_LONGLONG, /* src_fd */
297        TYPE_ULONGLONG, /* src_offset */
298        TYPE_ULONGLONG, /* src_length */
299        TYPE_ULONGLONG) /* dest_offset */
300 
301 STRUCT(fiemap_extent,
302        TYPE_ULONGLONG, /* fe_logical */
303        TYPE_ULONGLONG, /* fe_physical */
304        TYPE_ULONGLONG, /* fe_length */
305        MK_ARRAY(TYPE_ULONGLONG, 2), /* fe_reserved64[2] */
306        TYPE_INT, /* fe_flags */
307        MK_ARRAY(TYPE_INT, 3)) /* fe_reserved[3] */
308 
309 STRUCT(fiemap,
310        TYPE_ULONGLONG, /* fm_start */
311        TYPE_ULONGLONG, /* fm_length */
312        TYPE_INT, /* fm_flags */
313        TYPE_INT, /* fm_mapped_extents */
314        TYPE_INT, /* fm_extent_count */
315        TYPE_INT) /* fm_reserved */
316 
317 STRUCT(blkpg_partition,
318        TYPE_LONGLONG, /* start */
319        TYPE_LONGLONG, /* length */
320        TYPE_INT, /* pno */
321        MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */
322        MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */
323 
324 STRUCT(rtc_time,
325        TYPE_INT, /* tm_sec */
326        TYPE_INT, /* tm_min */
327        TYPE_INT, /* tm_hour */
328        TYPE_INT, /* tm_mday */
329        TYPE_INT, /* tm_mon */
330        TYPE_INT, /* tm_year */
331        TYPE_INT, /* tm_wday */
332        TYPE_INT, /* tm_yday */
333        TYPE_INT) /* tm_isdst */
334 
335 STRUCT(rtc_wkalrm,
336        TYPE_CHAR, /* enabled */
337        TYPE_CHAR, /* pending */
338        MK_STRUCT(STRUCT_rtc_time)) /* time */
339 
340 STRUCT(rtc_pll_info,
341        TYPE_INT, /* pll_ctrl */
342        TYPE_INT, /* pll_value */
343        TYPE_INT, /* pll_max */
344        TYPE_INT, /* pll_min */
345        TYPE_INT, /* pll_posmult */
346        TYPE_INT, /* pll_negmult */
347        TYPE_LONG) /* pll_clock */
348 
349 STRUCT(blkpg_ioctl_arg,
350        TYPE_INT, /* op */
351        TYPE_INT, /* flags */
352        TYPE_INT, /* datalen */
353        TYPE_PTRVOID) /* data */
354 
355 STRUCT(format_descr,
356        TYPE_INT,     /* device */
357        TYPE_INT,     /* head */
358        TYPE_INT)     /* track */
359 
360 STRUCT(floppy_max_errors,
361        TYPE_INT, /* abort */
362        TYPE_INT, /* read_track */
363        TYPE_INT, /* reset */
364        TYPE_INT, /* recal */
365        TYPE_INT) /* reporting */
366 
367 #if defined(CONFIG_USBFS)
368 /* usb device ioctls */
369 STRUCT(usbdevfs_ctrltransfer,
370         TYPE_CHAR, /* bRequestType */
371         TYPE_CHAR, /* bRequest */
372         TYPE_SHORT, /* wValue */
373         TYPE_SHORT, /* wIndex */
374         TYPE_SHORT, /* wLength */
375         TYPE_INT, /* timeout */
376         TYPE_PTRVOID) /* data */
377 
378 STRUCT(usbdevfs_bulktransfer,
379         TYPE_INT, /* ep */
380         TYPE_INT, /* len */
381         TYPE_INT, /* timeout */
382         TYPE_PTRVOID) /* data */
383 
384 STRUCT(usbdevfs_setinterface,
385         TYPE_INT, /* interface */
386         TYPE_INT) /* altsetting */
387 
388 STRUCT(usbdevfs_disconnectsignal,
389         TYPE_INT, /* signr */
390         TYPE_PTRVOID) /* context */
391 
392 STRUCT(usbdevfs_getdriver,
393         TYPE_INT, /* interface */
394         MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */
395 
396 STRUCT(usbdevfs_connectinfo,
397         TYPE_INT, /* devnum */
398         TYPE_CHAR) /* slow */
399 
400 STRUCT(usbdevfs_iso_packet_desc,
401         TYPE_INT, /* length */
402         TYPE_INT, /* actual_length */
403         TYPE_INT) /* status */
404 
405 STRUCT(usbdevfs_urb,
406         TYPE_CHAR, /* type */
407         TYPE_CHAR, /* endpoint */
408         TYPE_INT, /* status */
409         TYPE_INT, /* flags */
410         TYPE_PTRVOID, /* buffer */
411         TYPE_INT, /* buffer_length */
412         TYPE_INT, /* actual_length */
413         TYPE_INT, /* start_frame */
414         TYPE_INT, /* union number_of_packets stream_id */
415         TYPE_INT, /* error_count */
416         TYPE_INT, /* signr */
417         TYPE_PTRVOID, /* usercontext */
418         MK_ARRAY(MK_STRUCT(STRUCT_usbdevfs_iso_packet_desc), 0)) /* desc */
419 
420 STRUCT(usbdevfs_ioctl,
421         TYPE_INT, /* ifno */
422         TYPE_INT, /* ioctl_code */
423         TYPE_PTRVOID) /* data */
424 
425 STRUCT(usbdevfs_hub_portinfo,
426         TYPE_CHAR, /* nports */
427         MK_ARRAY(TYPE_CHAR, 127)) /* port */
428 
429 STRUCT(usbdevfs_disconnect_claim,
430         TYPE_INT, /* interface */
431         TYPE_INT, /* flags */
432         MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */
433 #endif /* CONFIG_USBFS */
434