10b57cec5SDimitry Andric//===-- sanitizer_interceptors_ioctl_netbsd.inc -----------------*- C++ -*-===//
20b57cec5SDimitry Andric//
30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric//
70b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric//
90b57cec5SDimitry Andric// Ioctl handling in common sanitizer interceptors.
100b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
110b57cec5SDimitry Andric
120b57cec5SDimitry Andric#if SANITIZER_NETBSD
130b57cec5SDimitry Andric
140b57cec5SDimitry Andric#include "sanitizer_flags.h"
150b57cec5SDimitry Andric
160b57cec5SDimitry Andricstruct ioctl_desc {
170b57cec5SDimitry Andric  unsigned req;
180b57cec5SDimitry Andric  // FIXME: support read+write arguments. Currently READWRITE and WRITE do the
190b57cec5SDimitry Andric  // same thing.
200b57cec5SDimitry Andric  // XXX: The declarations below may use WRITE instead of READWRITE, unless
210b57cec5SDimitry Andric  // explicitly noted.
220b57cec5SDimitry Andric  enum { NONE, READ, WRITE, READWRITE, CUSTOM } type : 3;
230b57cec5SDimitry Andric  unsigned size : 29;
240b57cec5SDimitry Andric  const char *name;
250b57cec5SDimitry Andric};
260b57cec5SDimitry Andric
27480093f4SDimitry Andricconst unsigned ioctl_table_max = 1238;
280b57cec5SDimitry Andricstatic ioctl_desc ioctl_table[ioctl_table_max];
290b57cec5SDimitry Andricstatic unsigned ioctl_table_size = 0;
300b57cec5SDimitry Andric
310b57cec5SDimitry Andric// This can not be declared as a global, because references to struct_*_sz
320b57cec5SDimitry Andric// require a global initializer. And this table must be available before global
330b57cec5SDimitry Andric// initializers are run.
340b57cec5SDimitry Andricstatic void ioctl_table_fill() {
350b57cec5SDimitry Andric#define _(rq, tp, sz)                                                          \
360b57cec5SDimitry Andric  if (IOCTL_##rq != IOCTL_NOT_PRESENT) {                                       \
370b57cec5SDimitry Andric    CHECK(ioctl_table_size < ioctl_table_max);                                 \
380b57cec5SDimitry Andric    ioctl_table[ioctl_table_size].req = IOCTL_##rq;                            \
390b57cec5SDimitry Andric    ioctl_table[ioctl_table_size].type = ioctl_desc::tp;                       \
400b57cec5SDimitry Andric    ioctl_table[ioctl_table_size].size = sz;                                   \
410b57cec5SDimitry Andric    ioctl_table[ioctl_table_size].name = #rq;                                  \
420b57cec5SDimitry Andric    ++ioctl_table_size;                                                        \
430b57cec5SDimitry Andric  }
440b57cec5SDimitry Andric
450b57cec5SDimitry Andric  /* Entries from file: altq/altq_afmap.h */
460b57cec5SDimitry Andric  _(AFM_ADDFMAP, READWRITE, struct_atm_flowmap_sz);
470b57cec5SDimitry Andric  _(AFM_DELFMAP, READWRITE, struct_atm_flowmap_sz);
480b57cec5SDimitry Andric  _(AFM_CLEANFMAP, READWRITE, struct_atm_flowmap_sz);
490b57cec5SDimitry Andric  _(AFM_GETFMAP, READWRITE, struct_atm_flowmap_sz);
500b57cec5SDimitry Andric  /* Entries from file: altq/altq.h */
510b57cec5SDimitry Andric  _(ALTQGTYPE, READWRITE, struct_altqreq_sz);
520b57cec5SDimitry Andric  _(ALTQTBRSET, READ, struct_tbrreq_sz);
530b57cec5SDimitry Andric  _(ALTQTBRGET, READWRITE, struct_tbrreq_sz);
540b57cec5SDimitry Andric  /* Entries from file: altq/altq_blue.h */
550b57cec5SDimitry Andric  _(BLUE_IF_ATTACH, READ, struct_blue_interface_sz);
560b57cec5SDimitry Andric  _(BLUE_DISABLE, READ, struct_blue_interface_sz);
570b57cec5SDimitry Andric  _(BLUE_CONFIG, READWRITE, struct_blue_conf_sz);
580b57cec5SDimitry Andric  _(BLUE_GETSTATS, READWRITE, struct_blue_stats_sz);
590b57cec5SDimitry Andric  /* Entries from file: altq/altq_cbq.h */
600b57cec5SDimitry Andric  _(CBQ_ENABLE, READ, struct_cbq_interface_sz);
610b57cec5SDimitry Andric  _(CBQ_ADD_CLASS, READWRITE, struct_cbq_add_class_sz);
620b57cec5SDimitry Andric  _(CBQ_DEL_CLASS, READ, struct_cbq_delete_class_sz);
630b57cec5SDimitry Andric  _(CBQ_MODIFY_CLASS, READWRITE, struct_cbq_modify_class_sz);
640b57cec5SDimitry Andric  _(CBQ_DEL_FILTER, READ, struct_cbq_delete_filter_sz);
650b57cec5SDimitry Andric  _(CBQ_GETSTATS, READWRITE, struct_cbq_getstats_sz);
660b57cec5SDimitry Andric  /* Entries from file: altq/altq_cdnr.h */
670b57cec5SDimitry Andric  _(CDNR_IF_DETACH, READ, struct_cdnr_interface_sz);
680b57cec5SDimitry Andric  _(CDNR_ADD_FILTER, READWRITE, struct_cdnr_add_filter_sz);
690b57cec5SDimitry Andric  _(CDNR_GETSTATS, READWRITE, struct_cdnr_get_stats_sz);
700b57cec5SDimitry Andric  _(CDNR_ADD_ELEM, READWRITE, struct_cdnr_add_element_sz);
710b57cec5SDimitry Andric  _(CDNR_DEL_ELEM, READ, struct_cdnr_delete_element_sz);
720b57cec5SDimitry Andric  _(CDNR_ADD_TBM, READWRITE, struct_cdnr_add_tbmeter_sz);
730b57cec5SDimitry Andric  _(CDNR_MOD_TBM, READ, struct_cdnr_modify_tbmeter_sz);
740b57cec5SDimitry Andric  _(CDNR_TBM_STATS, READWRITE, struct_cdnr_tbmeter_stats_sz);
750b57cec5SDimitry Andric  _(CDNR_ADD_TCM, READWRITE, struct_cdnr_add_trtcm_sz);
760b57cec5SDimitry Andric  _(CDNR_MOD_TCM, READWRITE, struct_cdnr_modify_trtcm_sz);
770b57cec5SDimitry Andric  _(CDNR_TCM_STATS, READWRITE, struct_cdnr_tcm_stats_sz);
780b57cec5SDimitry Andric  _(CDNR_ADD_TSW, READWRITE, struct_cdnr_add_tswtcm_sz);
790b57cec5SDimitry Andric  _(CDNR_MOD_TSW, READWRITE, struct_cdnr_modify_tswtcm_sz);
800b57cec5SDimitry Andric  /* Entries from file: altq/altq_fifoq.h */
810b57cec5SDimitry Andric  _(FIFOQ_CONFIG, READWRITE, struct_fifoq_conf_sz);
820b57cec5SDimitry Andric  _(FIFOQ_GETSTATS, READWRITE, struct_fifoq_getstats_sz);
830b57cec5SDimitry Andric  /* Entries from file: altq/altq_hfsc.h */
840b57cec5SDimitry Andric  _(HFSC_CLEAR_HIERARCHY, READ, struct_hfsc_interface_sz);
850b57cec5SDimitry Andric  _(HFSC_ADD_CLASS, READWRITE, struct_hfsc_add_class_sz);
860b57cec5SDimitry Andric  _(HFSC_GETSTATS, READWRITE, struct_hfsc_class_stats_sz);
870b57cec5SDimitry Andric  /* Entries from file: altq/altq_jobs.h */
880b57cec5SDimitry Andric  _(JOBS_IF_ATTACH, READ, struct_jobs_attach_sz);
890b57cec5SDimitry Andric  _(JOBS_IF_DETACH, READ, struct_jobs_interface_sz);
900b57cec5SDimitry Andric  _(JOBS_ENABLE, READ, struct_jobs_interface_sz);
910b57cec5SDimitry Andric  _(JOBS_DISABLE, READ, struct_jobs_interface_sz);
920b57cec5SDimitry Andric  _(JOBS_CLEAR, READ, struct_jobs_interface_sz);
930b57cec5SDimitry Andric  _(JOBS_ADD_CLASS, READWRITE, struct_jobs_add_class_sz);
940b57cec5SDimitry Andric  _(JOBS_MOD_CLASS, READ, struct_jobs_modify_class_sz);
950b57cec5SDimitry Andric  /* Entries from file: altq/altq_priq.h */
960b57cec5SDimitry Andric  _(PRIQ_IF_ATTACH, READ, struct_priq_interface_sz);
970b57cec5SDimitry Andric  _(PRIQ_CLEAR, READ, struct_priq_interface_sz);
980b57cec5SDimitry Andric  _(PRIQ_ADD_CLASS, READWRITE, struct_priq_add_class_sz);
990b57cec5SDimitry Andric  _(PRIQ_DEL_CLASS, READ, struct_priq_delete_class_sz);
1000b57cec5SDimitry Andric  _(PRIQ_MOD_CLASS, READ, struct_priq_modify_class_sz);
1010b57cec5SDimitry Andric  _(PRIQ_ADD_FILTER, READWRITE, struct_priq_add_filter_sz);
1020b57cec5SDimitry Andric  _(PRIQ_DEL_FILTER, READ, struct_priq_delete_filter_sz);
1030b57cec5SDimitry Andric  _(PRIQ_GETSTATS, READWRITE, struct_priq_class_stats_sz);
1040b57cec5SDimitry Andric  /* Entries from file: altq/altq_red.h */
1050b57cec5SDimitry Andric  _(RED_CONFIG, READWRITE, struct_red_conf_sz);
1060b57cec5SDimitry Andric  _(RED_GETSTATS, READWRITE, struct_red_stats_sz);
1070b57cec5SDimitry Andric  _(RED_SETDEFAULTS, READ, struct_redparams_sz);
1080b57cec5SDimitry Andric  /* Entries from file: altq/altq_rio.h */
1090b57cec5SDimitry Andric  _(RIO_CONFIG, READWRITE, struct_rio_conf_sz);
1100b57cec5SDimitry Andric  _(RIO_GETSTATS, READWRITE, struct_rio_stats_sz);
1110b57cec5SDimitry Andric  _(RIO_SETDEFAULTS, READ, struct_redparams_sz);
1120b57cec5SDimitry Andric  /* Entries from file: altq/altq_wfq.h */
1130b57cec5SDimitry Andric  _(WFQ_CONFIG, READWRITE, struct_wfq_conf_sz);
1140b57cec5SDimitry Andric  _(WFQ_GET_QID, READWRITE, struct_wfq_getqid_sz);
1150b57cec5SDimitry Andric  _(WFQ_SET_WEIGHT, READWRITE, struct_wfq_setweight_sz);
1160b57cec5SDimitry Andric  /* Entries from file: crypto/cryptodev.h */
1170b57cec5SDimitry Andric  _(CRIOGET, READWRITE, sizeof(u32));
1180b57cec5SDimitry Andric  _(CIOCFSESSION, READ, sizeof(u32));
1190b57cec5SDimitry Andric  _(CIOCKEY, READWRITE, struct_crypt_kop_sz);
1200b57cec5SDimitry Andric  _(CIOCNFKEYM, READWRITE, struct_crypt_mkop_sz);
1210b57cec5SDimitry Andric  _(CIOCNFSESSION, READ, struct_crypt_sfop_sz);
1220b57cec5SDimitry Andric  _(CIOCNCRYPTRETM, READWRITE, struct_cryptret_sz);
1230b57cec5SDimitry Andric  _(CIOCNCRYPTRET, READWRITE, struct_crypt_result_sz);
1240b57cec5SDimitry Andric  _(CIOCGSESSION, READWRITE, struct_session_op_sz);
1250b57cec5SDimitry Andric  _(CIOCNGSESSION, READWRITE, struct_crypt_sgop_sz);
1260b57cec5SDimitry Andric  _(CIOCCRYPT, READWRITE, struct_crypt_op_sz);
1270b57cec5SDimitry Andric  _(CIOCNCRYPTM, READWRITE, struct_crypt_mop_sz);
1280b57cec5SDimitry Andric  _(CIOCASYMFEAT, WRITE, sizeof(u32));
1290b57cec5SDimitry Andric  /* Entries from file: dev/apm/apmio.h */
1300b57cec5SDimitry Andric  _(APM_IOC_REJECT, READ, struct_apm_event_info_sz);
1310b57cec5SDimitry Andric  _(OAPM_IOC_GETPOWER, WRITE, struct_apm_power_info_sz);
1320b57cec5SDimitry Andric  _(APM_IOC_GETPOWER, READWRITE, struct_apm_power_info_sz);
1330b57cec5SDimitry Andric  _(APM_IOC_NEXTEVENT, WRITE, struct_apm_event_info_sz);
1340b57cec5SDimitry Andric  _(APM_IOC_DEV_CTL, READ, struct_apm_ctl_sz);
1350b57cec5SDimitry Andric  /* Entries from file: dev/dm/netbsd-dm.h */
1360b57cec5SDimitry Andric  _(NETBSD_DM_IOCTL, READWRITE, struct_plistref_sz);
1370b57cec5SDimitry Andric  /* Entries from file: dev/dmover/dmover_io.h */
1380b57cec5SDimitry Andric  _(DMIO_SETFUNC, READ, struct_dmio_setfunc_sz);
1390b57cec5SDimitry Andric  /* Entries from file: dev/dtv/dtvio_demux.h */
1400b57cec5SDimitry Andric  _(DMX_START, NONE, 0);
1410b57cec5SDimitry Andric  _(DMX_STOP, NONE, 0);
1420b57cec5SDimitry Andric  _(DMX_SET_FILTER, READ, struct_dmx_sct_filter_params_sz);
1430b57cec5SDimitry Andric  _(DMX_SET_PES_FILTER, READ, struct_dmx_pes_filter_params_sz);
1440b57cec5SDimitry Andric  _(DMX_SET_BUFFER_SIZE, NONE, 0);
1450b57cec5SDimitry Andric  _(DMX_GET_STC, READWRITE, struct_dmx_stc_sz);
1460b57cec5SDimitry Andric  _(DMX_ADD_PID, READ, sizeof(u16));
1470b57cec5SDimitry Andric  _(DMX_REMOVE_PID, READ, sizeof(u16));
1480b57cec5SDimitry Andric  _(DMX_GET_CAPS, WRITE, struct_dmx_caps_sz);
1490b57cec5SDimitry Andric  _(DMX_SET_SOURCE, READ, enum_dmx_source_sz);
1500b57cec5SDimitry Andric  /* Entries from file: dev/dtv/dtvio_frontend.h */
1510b57cec5SDimitry Andric  _(FE_READ_STATUS, WRITE, enum_fe_status_sz);
1520b57cec5SDimitry Andric  _(FE_READ_BER, WRITE, sizeof(u32));
1530b57cec5SDimitry Andric  _(FE_READ_SNR, WRITE, sizeof(u16));
1540b57cec5SDimitry Andric  _(FE_READ_SIGNAL_STRENGTH, WRITE, sizeof(u16));
1550b57cec5SDimitry Andric  _(FE_READ_UNCORRECTED_BLOCKS, WRITE, sizeof(u32));
1560b57cec5SDimitry Andric  _(FE_SET_FRONTEND, READWRITE, struct_dvb_frontend_parameters_sz);
1570b57cec5SDimitry Andric  _(FE_GET_FRONTEND, WRITE, struct_dvb_frontend_parameters_sz);
1580b57cec5SDimitry Andric  _(FE_GET_EVENT, WRITE, struct_dvb_frontend_event_sz);
1590b57cec5SDimitry Andric  _(FE_GET_INFO, WRITE, struct_dvb_frontend_info_sz);
1600b57cec5SDimitry Andric  _(FE_DISEQC_RESET_OVERLOAD, NONE, 0);
1610b57cec5SDimitry Andric  _(FE_DISEQC_SEND_MASTER_CMD, READ, struct_dvb_diseqc_master_cmd_sz);
1620b57cec5SDimitry Andric  _(FE_DISEQC_RECV_SLAVE_REPLY, WRITE, struct_dvb_diseqc_slave_reply_sz);
1630b57cec5SDimitry Andric  _(FE_DISEQC_SEND_BURST, READ, enum_fe_sec_mini_cmd_sz);
1640b57cec5SDimitry Andric  _(FE_SET_TONE, READ, enum_fe_sec_tone_mode_sz);
1650b57cec5SDimitry Andric  _(FE_SET_VOLTAGE, READ, enum_fe_sec_voltage_sz);
1660b57cec5SDimitry Andric  _(FE_ENABLE_HIGH_LNB_VOLTAGE, READ, sizeof(int));
1670b57cec5SDimitry Andric  _(FE_SET_FRONTEND_TUNE_MODE, READ, sizeof(unsigned int));
1680b57cec5SDimitry Andric  _(FE_DISHNETWORK_SEND_LEGACY_CMD, READ, sizeof(unsigned long));
1690b57cec5SDimitry Andric  /* Entries from file: dev/hdaudio/hdaudioio.h */
1700b57cec5SDimitry Andric  _(HDAUDIO_FGRP_INFO, READWRITE, struct_plistref_sz);
1710b57cec5SDimitry Andric  _(HDAUDIO_FGRP_GETCONFIG, READWRITE, struct_plistref_sz);
1720b57cec5SDimitry Andric  _(HDAUDIO_FGRP_SETCONFIG, READWRITE, struct_plistref_sz);
1730b57cec5SDimitry Andric  _(HDAUDIO_FGRP_WIDGET_INFO, READWRITE, struct_plistref_sz);
1740b57cec5SDimitry Andric  _(HDAUDIO_FGRP_CODEC_INFO, READWRITE, struct_plistref_sz);
1750b57cec5SDimitry Andric  _(HDAUDIO_AFG_WIDGET_INFO, READWRITE, struct_plistref_sz);
1760b57cec5SDimitry Andric  _(HDAUDIO_AFG_CODEC_INFO, READWRITE, struct_plistref_sz);
1770b57cec5SDimitry Andric  /* Entries from file: dev/hdmicec/hdmicecio.h */
1780b57cec5SDimitry Andric  _(CEC_GET_PHYS_ADDR, WRITE, sizeof(u16));
1790b57cec5SDimitry Andric  _(CEC_GET_LOG_ADDRS, WRITE, sizeof(u16));
1800b57cec5SDimitry Andric  _(CEC_SET_LOG_ADDRS, READ, sizeof(u16));
1810b57cec5SDimitry Andric  _(CEC_GET_VENDOR_ID, WRITE, sizeof(u32));
1820b57cec5SDimitry Andric  /* Entries from file: dev/hpc/hpcfbio.h */
1830b57cec5SDimitry Andric  _(HPCFBIO_GCONF, READWRITE, struct_hpcfb_fbconf_sz);
1840b57cec5SDimitry Andric  _(HPCFBIO_SCONF, READ, struct_hpcfb_fbconf_sz);
1850b57cec5SDimitry Andric  _(HPCFBIO_GDSPCONF, READWRITE, struct_hpcfb_dspconf_sz);
1860b57cec5SDimitry Andric  _(HPCFBIO_SDSPCONF, READ, struct_hpcfb_dspconf_sz);
1870b57cec5SDimitry Andric  _(HPCFBIO_GOP, WRITE, struct_hpcfb_dsp_op_sz);
1880b57cec5SDimitry Andric  _(HPCFBIO_SOP, READWRITE, struct_hpcfb_dsp_op_sz);
1890b57cec5SDimitry Andric  /* Entries from file: dev/i2o/iopio.h */
1900b57cec5SDimitry Andric  _(IOPIOCPT, READWRITE, struct_ioppt_sz);
1910b57cec5SDimitry Andric  _(IOPIOCGLCT, READWRITE, struct_iovec_sz);
1920b57cec5SDimitry Andric  _(IOPIOCGSTATUS, READWRITE, struct_iovec_sz);
1930b57cec5SDimitry Andric  _(IOPIOCRECONFIG, NONE, 0);
1940b57cec5SDimitry Andric  _(IOPIOCGTIDMAP, READWRITE, struct_iovec_sz);
1950b57cec5SDimitry Andric  /* Entries from file: dev/ic/athioctl.h */
1960b57cec5SDimitry Andric  _(SIOCGATHSTATS, READWRITE, struct_ifreq_sz);
1970b57cec5SDimitry Andric  _(SIOCGATHDIAG, READWRITE, struct_ath_diag_sz);
1980b57cec5SDimitry Andric  /* Entries from file: dev/ic/bt8xx.h */
1990b57cec5SDimitry Andric  _(METEORCAPTUR, READ, sizeof(int));
2000b57cec5SDimitry Andric  _(METEORCAPFRM, READ, struct_meteor_capframe_sz);
2010b57cec5SDimitry Andric  _(METEORSETGEO, READ, struct_meteor_geomet_sz);
2020b57cec5SDimitry Andric  _(METEORGETGEO, WRITE, struct_meteor_geomet_sz);
2030b57cec5SDimitry Andric  _(METEORSTATUS, WRITE, sizeof(unsigned short));
2040b57cec5SDimitry Andric  _(METEORSHUE, READ, sizeof(signed char));
2050b57cec5SDimitry Andric  _(METEORGHUE, WRITE, sizeof(signed char));
2060b57cec5SDimitry Andric  _(METEORSFMT, READ, sizeof(unsigned int));
2070b57cec5SDimitry Andric  _(METEORGFMT, WRITE, sizeof(unsigned int));
2080b57cec5SDimitry Andric  _(METEORSINPUT, READ, sizeof(unsigned int));
2090b57cec5SDimitry Andric  _(METEORGINPUT, WRITE, sizeof(unsigned int));
2100b57cec5SDimitry Andric  _(METEORSCHCV, READ, sizeof(unsigned char));
2110b57cec5SDimitry Andric  _(METEORGCHCV, WRITE, sizeof(unsigned char));
2120b57cec5SDimitry Andric  _(METEORSCOUNT, READ, struct_meteor_counts_sz);
2130b57cec5SDimitry Andric  _(METEORGCOUNT, WRITE, struct_meteor_counts_sz);
2140b57cec5SDimitry Andric  _(METEORSFPS, READ, sizeof(unsigned short));
2150b57cec5SDimitry Andric  _(METEORGFPS, WRITE, sizeof(unsigned short));
2160b57cec5SDimitry Andric  _(METEORSSIGNAL, READ, sizeof(unsigned int));
2170b57cec5SDimitry Andric  _(METEORGSIGNAL, WRITE, sizeof(unsigned int));
2180b57cec5SDimitry Andric  _(METEORSVIDEO, READ, struct_meteor_video_sz);
2190b57cec5SDimitry Andric  _(METEORGVIDEO, WRITE, struct_meteor_video_sz);
2200b57cec5SDimitry Andric  _(METEORSBRIG, READ, sizeof(unsigned char));
2210b57cec5SDimitry Andric  _(METEORGBRIG, WRITE, sizeof(unsigned char));
2220b57cec5SDimitry Andric  _(METEORSCSAT, READ, sizeof(unsigned char));
2230b57cec5SDimitry Andric  _(METEORGCSAT, WRITE, sizeof(unsigned char));
2240b57cec5SDimitry Andric  _(METEORSCONT, READ, sizeof(unsigned char));
2250b57cec5SDimitry Andric  _(METEORGCONT, WRITE, sizeof(unsigned char));
2260b57cec5SDimitry Andric  _(METEORSHWS, READ, sizeof(unsigned char));
2270b57cec5SDimitry Andric  _(METEORGHWS, WRITE, sizeof(unsigned char));
2280b57cec5SDimitry Andric  _(METEORSVWS, READ, sizeof(unsigned char));
2290b57cec5SDimitry Andric  _(METEORGVWS, WRITE, sizeof(unsigned char));
2300b57cec5SDimitry Andric  _(METEORSTS, READ, sizeof(unsigned char));
2310b57cec5SDimitry Andric  _(METEORGTS, WRITE, sizeof(unsigned char));
2320b57cec5SDimitry Andric  _(TVTUNER_SETCHNL, READ, sizeof(unsigned int));
2330b57cec5SDimitry Andric  _(TVTUNER_GETCHNL, WRITE, sizeof(unsigned int));
2340b57cec5SDimitry Andric  _(TVTUNER_SETTYPE, READ, sizeof(unsigned int));
2350b57cec5SDimitry Andric  _(TVTUNER_GETTYPE, WRITE, sizeof(unsigned int));
2360b57cec5SDimitry Andric  _(TVTUNER_GETSTATUS, WRITE, sizeof(unsigned int));
2370b57cec5SDimitry Andric  _(TVTUNER_SETFREQ, READ, sizeof(unsigned int));
2380b57cec5SDimitry Andric  _(TVTUNER_GETFREQ, WRITE, sizeof(unsigned int));
2390b57cec5SDimitry Andric  _(TVTUNER_SETAFC, READ, sizeof(int));
2400b57cec5SDimitry Andric  _(TVTUNER_GETAFC, WRITE, sizeof(int));
2410b57cec5SDimitry Andric  _(RADIO_SETMODE, READ, sizeof(unsigned int));
2420b57cec5SDimitry Andric  _(RADIO_GETMODE, WRITE, sizeof(unsigned char));
2430b57cec5SDimitry Andric  _(RADIO_SETFREQ, READ, sizeof(unsigned int));
2440b57cec5SDimitry Andric  _(RADIO_GETFREQ, WRITE, sizeof(unsigned int));
2450b57cec5SDimitry Andric  _(METEORSACTPIXFMT, READ, sizeof(int));
2460b57cec5SDimitry Andric  _(METEORGACTPIXFMT, WRITE, sizeof(int));
2470b57cec5SDimitry Andric  _(METEORGSUPPIXFMT, READWRITE, struct_meteor_pixfmt_sz);
2480b57cec5SDimitry Andric  _(TVTUNER_GETCHNLSET, READWRITE, struct_bktr_chnlset_sz);
2490b57cec5SDimitry Andric  _(REMOTE_GETKEY, WRITE, struct_bktr_remote_sz);
2500b57cec5SDimitry Andric  /* Entries from file: dev/ic/icp_ioctl.h */
2510b57cec5SDimitry Andric  _(GDT_IOCTL_GENERAL, READWRITE, struct_gdt_ucmd_sz);
2520b57cec5SDimitry Andric  _(GDT_IOCTL_DRVERS, WRITE, sizeof(int));
2530b57cec5SDimitry Andric  _(GDT_IOCTL_CTRTYPE, READWRITE, struct_gdt_ctrt_sz);
2540b57cec5SDimitry Andric  _(GDT_IOCTL_OSVERS, WRITE, struct_gdt_osv_sz);
2550b57cec5SDimitry Andric  _(GDT_IOCTL_CTRCNT, WRITE, sizeof(int));
2560b57cec5SDimitry Andric  _(GDT_IOCTL_EVENT, READWRITE, struct_gdt_event_sz);
2570b57cec5SDimitry Andric  _(GDT_IOCTL_STATIST, WRITE, struct_gdt_statist_sz);
2580b57cec5SDimitry Andric  _(GDT_IOCTL_RESCAN, READWRITE, struct_gdt_rescan_sz);
2590b57cec5SDimitry Andric  /* Entries from file: dev/ic/isp_ioctl.h */
2600b57cec5SDimitry Andric  _(ISP_SDBLEV, READWRITE, sizeof(int));
2610b57cec5SDimitry Andric  _(ISP_RESETHBA, NONE, 0);
2620b57cec5SDimitry Andric  _(ISP_RESCAN, NONE, 0);
2630b57cec5SDimitry Andric  _(ISP_SETROLE, READWRITE, sizeof(int));
2640b57cec5SDimitry Andric  _(ISP_GETROLE, WRITE, sizeof(int));
2650b57cec5SDimitry Andric  _(ISP_GET_STATS, WRITE, struct_isp_stats_sz);
2660b57cec5SDimitry Andric  _(ISP_CLR_STATS, NONE, 0);
2670b57cec5SDimitry Andric  _(ISP_FC_LIP, NONE, 0);
2680b57cec5SDimitry Andric  _(ISP_FC_GETDINFO, READWRITE, struct_isp_fc_device_sz);
2690b57cec5SDimitry Andric  _(ISP_GET_FW_CRASH_DUMP, NONE, 0);
2700b57cec5SDimitry Andric  _(ISP_FORCE_CRASH_DUMP, NONE, 0);
2710b57cec5SDimitry Andric  _(ISP_FC_GETHINFO, READWRITE, struct_isp_hba_device_sz);
2720b57cec5SDimitry Andric  _(ISP_TSK_MGMT, READWRITE, struct_isp_fc_tsk_mgmt_sz);
2730b57cec5SDimitry Andric  _(ISP_FC_GETDLIST, NONE, 0);
2740b57cec5SDimitry Andric  /* Entries from file: dev/ic/mlxio.h */
2750b57cec5SDimitry Andric  _(MLXD_STATUS, WRITE, sizeof(int));
2760b57cec5SDimitry Andric  _(MLXD_CHECKASYNC, WRITE, sizeof(int));
2770b57cec5SDimitry Andric  _(MLXD_DETACH, READ, sizeof(int));
2780b57cec5SDimitry Andric  _(MLX_RESCAN_DRIVES, NONE, 0);
2790b57cec5SDimitry Andric  _(MLX_PAUSE_CHANNEL, READ, struct_mlx_pause_sz);
2800b57cec5SDimitry Andric  _(MLX_COMMAND, READWRITE, struct_mlx_usercommand_sz);
2810b57cec5SDimitry Andric  _(MLX_REBUILDASYNC, READWRITE, struct_mlx_rebuild_request_sz);
2820b57cec5SDimitry Andric  _(MLX_REBUILDSTAT, WRITE, struct_mlx_rebuild_status_sz);
2830b57cec5SDimitry Andric  _(MLX_GET_SYSDRIVE, READWRITE, sizeof(int));
2840b57cec5SDimitry Andric  _(MLX_GET_CINFO, WRITE, struct_mlx_cinfo_sz);
2850b57cec5SDimitry Andric  /* Entries from file: dev/ic/nvmeio.h */
2860b57cec5SDimitry Andric  _(NVME_PASSTHROUGH_CMD, READWRITE, struct_nvme_pt_command_sz);
2870b57cec5SDimitry Andric  /* Entries from file: dev/ic/qemufwcfgio.h */
2880b57cec5SDimitry Andric  _(FWCFGIO_SET_INDEX, READ, sizeof(u16));
2890b57cec5SDimitry Andric  /* Entries from file: dev/ir/irdaio.h */
2900b57cec5SDimitry Andric  _(IRDA_RESET_PARAMS, NONE, 0);
2910b57cec5SDimitry Andric  _(IRDA_SET_PARAMS, READ, struct_irda_params_sz);
2920b57cec5SDimitry Andric  _(IRDA_GET_SPEEDMASK, WRITE, sizeof(unsigned int));
2930b57cec5SDimitry Andric  _(IRDA_GET_TURNAROUNDMASK, WRITE, sizeof(unsigned int));
2940b57cec5SDimitry Andric  _(IRFRAMETTY_GET_DEVICE, WRITE, sizeof(unsigned int));
2950b57cec5SDimitry Andric  _(IRFRAMETTY_GET_DONGLE, WRITE, sizeof(unsigned int));
2960b57cec5SDimitry Andric  _(IRFRAMETTY_SET_DONGLE, READ, sizeof(unsigned int));
2970b57cec5SDimitry Andric  /* Entries from file: dev/isa/isvio.h */
2980b57cec5SDimitry Andric  _(ISV_CMD, READWRITE, struct_isv_cmd_sz);
2990b57cec5SDimitry Andric  /* Entries from file: dev/isa/wtreg.h */
3000b57cec5SDimitry Andric  _(WTQICMD, NONE, 0);
3010b57cec5SDimitry Andric  /* Entries from file: dev/iscsi/iscsi_ioctl.h */
3020b57cec5SDimitry Andric  _(ISCSI_GET_VERSION, READWRITE, struct_iscsi_get_version_parameters_sz);
3030b57cec5SDimitry Andric  _(ISCSI_LOGIN, READWRITE, struct_iscsi_login_parameters_sz);
3040b57cec5SDimitry Andric  _(ISCSI_LOGOUT, READWRITE, struct_iscsi_logout_parameters_sz);
3050b57cec5SDimitry Andric  _(ISCSI_ADD_CONNECTION, READWRITE, struct_iscsi_login_parameters_sz);
3060b57cec5SDimitry Andric  _(ISCSI_RESTORE_CONNECTION, READWRITE, struct_iscsi_login_parameters_sz);
3070b57cec5SDimitry Andric  _(ISCSI_REMOVE_CONNECTION, READWRITE, struct_iscsi_remove_parameters_sz);
3080b57cec5SDimitry Andric  _(ISCSI_CONNECTION_STATUS, READWRITE, struct_iscsi_conn_status_parameters_sz);
3090b57cec5SDimitry Andric  _(ISCSI_SEND_TARGETS, READWRITE, struct_iscsi_send_targets_parameters_sz);
3100b57cec5SDimitry Andric  _(ISCSI_SET_NODE_NAME, READWRITE, struct_iscsi_set_node_name_parameters_sz);
3110b57cec5SDimitry Andric  _(ISCSI_IO_COMMAND, READWRITE, struct_iscsi_iocommand_parameters_sz);
3120b57cec5SDimitry Andric  _(ISCSI_REGISTER_EVENT, READWRITE, struct_iscsi_register_event_parameters_sz);
3130b57cec5SDimitry Andric  _(ISCSI_DEREGISTER_EVENT, READWRITE,
3140b57cec5SDimitry Andric    struct_iscsi_register_event_parameters_sz);
3150b57cec5SDimitry Andric  _(ISCSI_WAIT_EVENT, READWRITE, struct_iscsi_wait_event_parameters_sz);
3160b57cec5SDimitry Andric  _(ISCSI_POLL_EVENT, READWRITE, struct_iscsi_wait_event_parameters_sz);
3170b57cec5SDimitry Andric  /* Entries from file: dev/ofw/openfirmio.h */
3180b57cec5SDimitry Andric  _(OFIOCGET, READWRITE, struct_ofiocdesc_sz);
3190b57cec5SDimitry Andric  _(OFIOCSET, READ, struct_ofiocdesc_sz);
3200b57cec5SDimitry Andric  _(OFIOCNEXTPROP, READWRITE, struct_ofiocdesc_sz);
3210b57cec5SDimitry Andric  _(OFIOCGETOPTNODE, WRITE, sizeof(int));
3220b57cec5SDimitry Andric  _(OFIOCGETNEXT, READWRITE, sizeof(int));
3230b57cec5SDimitry Andric  _(OFIOCGETCHILD, READWRITE, sizeof(int));
3240b57cec5SDimitry Andric  _(OFIOCFINDDEVICE, READWRITE, struct_ofiocdesc_sz);
3250b57cec5SDimitry Andric  /* Entries from file: dev/pci/amrio.h */
3260b57cec5SDimitry Andric  _(AMR_IO_VERSION, WRITE, sizeof(int));
3270b57cec5SDimitry Andric  _(AMR_IO_COMMAND, READWRITE, struct_amr_user_ioctl_sz);
3280b57cec5SDimitry Andric  /* Entries from file: dev/pci/mlyio.h */
3290b57cec5SDimitry Andric  _(MLYIO_COMMAND, READWRITE, struct_mly_user_command_sz);
3300b57cec5SDimitry Andric  _(MLYIO_HEALTH, READ, struct_mly_user_health_sz);
3310b57cec5SDimitry Andric  /* Entries from file: dev/pci/pciio.h */
3320b57cec5SDimitry Andric  _(PCI_IOC_CFGREAD, READWRITE, struct_pciio_cfgreg_sz);
3330b57cec5SDimitry Andric  _(PCI_IOC_CFGWRITE, READ, struct_pciio_cfgreg_sz);
3340b57cec5SDimitry Andric  _(PCI_IOC_BDF_CFGREAD, READWRITE, struct_pciio_bdf_cfgreg_sz);
3350b57cec5SDimitry Andric  _(PCI_IOC_BDF_CFGWRITE, READ, struct_pciio_bdf_cfgreg_sz);
3360b57cec5SDimitry Andric  _(PCI_IOC_BUSINFO, WRITE, struct_pciio_businfo_sz);
3370b57cec5SDimitry Andric  _(PCI_IOC_DRVNAME, READWRITE, struct_pciio_drvname_sz);
3380b57cec5SDimitry Andric  _(PCI_IOC_DRVNAMEONBUS, READWRITE, struct_pciio_drvnameonbus_sz);
3390b57cec5SDimitry Andric  /* Entries from file: dev/pci/tweio.h */
3400b57cec5SDimitry Andric  _(TWEIO_COMMAND, READWRITE, struct_twe_usercommand_sz);
3410b57cec5SDimitry Andric  _(TWEIO_STATS, READWRITE, union_twe_statrequest_sz);
3420b57cec5SDimitry Andric  _(TWEIO_AEN_POLL, WRITE, sizeof(int));
3430b57cec5SDimitry Andric  _(TWEIO_AEN_WAIT, WRITE, sizeof(int));
3440b57cec5SDimitry Andric  _(TWEIO_SET_PARAM, READ, struct_twe_paramcommand_sz);
3450b57cec5SDimitry Andric  _(TWEIO_GET_PARAM, READ, struct_twe_paramcommand_sz);
3460b57cec5SDimitry Andric  _(TWEIO_RESET, NONE, 0);
3470b57cec5SDimitry Andric  _(TWEIO_ADD_UNIT, READ, struct_twe_drivecommand_sz);
3480b57cec5SDimitry Andric  _(TWEIO_DEL_UNIT, READ, struct_twe_drivecommand_sz);
3490b57cec5SDimitry Andric  /* Entries from file: dev/pcmcia/if_cnwioctl.h */
3500b57cec5SDimitry Andric  _(SIOCSCNWDOMAIN, READ, struct_ifreq_sz);
3510b57cec5SDimitry Andric  _(SIOCGCNWDOMAIN, READWRITE, struct_ifreq_sz);
3520b57cec5SDimitry Andric  _(SIOCSCNWKEY, READWRITE, struct_ifreq_sz);
3530b57cec5SDimitry Andric  _(SIOCGCNWSTATUS, READWRITE, struct_cnwstatus_sz);
3540b57cec5SDimitry Andric  _(SIOCGCNWSTATS, READWRITE, struct_cnwistats_sz);
3550b57cec5SDimitry Andric  _(SIOCGCNWTRAIL, READWRITE, struct_cnwitrail_sz);
3560b57cec5SDimitry Andric  /* Entries from file: dev/pcmcia/if_rayreg.h */
3570b57cec5SDimitry Andric  _(SIOCGRAYSIGLEV, READWRITE, struct_ifreq_sz);
3580b57cec5SDimitry Andric  /* Entries from file: dev/raidframe/raidframeio.h */
3590b57cec5SDimitry Andric  _(RAIDFRAME_SHUTDOWN, NONE, 0);
3600b57cec5SDimitry Andric  _(RAIDFRAME_TUR, READ, sizeof(u64));
3610b57cec5SDimitry Andric  _(RAIDFRAME_FAIL_DISK, READ, struct_rf_recon_req_sz);
3620b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_RECON_STATUS, READWRITE, sizeof(int));
3630b57cec5SDimitry Andric  _(RAIDFRAME_REWRITEPARITY, NONE, 0);
3640b57cec5SDimitry Andric  _(RAIDFRAME_COPYBACK, NONE, 0);
3650b57cec5SDimitry Andric  _(RAIDFRAME_SPARET_WAIT, WRITE, struct_RF_SparetWait_sz);
3660b57cec5SDimitry Andric  _(RAIDFRAME_SEND_SPARET, READ, sizeof(uptr));
3670b57cec5SDimitry Andric  _(RAIDFRAME_ABORT_SPARET_WAIT, NONE, 0);
3680b57cec5SDimitry Andric  _(RAIDFRAME_START_ATRACE, NONE, 0);
3690b57cec5SDimitry Andric  _(RAIDFRAME_STOP_ATRACE, NONE, 0);
3700b57cec5SDimitry Andric  _(RAIDFRAME_GET_SIZE, WRITE, sizeof(int));
3710b57cec5SDimitry Andric  _(RAIDFRAME_RESET_ACCTOTALS, NONE, 0);
3720b57cec5SDimitry Andric  _(RAIDFRAME_KEEP_ACCTOTALS, READ, sizeof(int));
3730b57cec5SDimitry Andric  _(RAIDFRAME_GET_COMPONENT_LABEL, READWRITE, struct_RF_ComponentLabel_sz);
3740b57cec5SDimitry Andric  _(RAIDFRAME_SET_COMPONENT_LABEL, READ, struct_RF_ComponentLabel_sz);
3750b57cec5SDimitry Andric  _(RAIDFRAME_INIT_LABELS, READ, struct_RF_ComponentLabel_sz);
3760b57cec5SDimitry Andric  _(RAIDFRAME_ADD_HOT_SPARE, READ, struct_RF_SingleComponent_sz);
3770b57cec5SDimitry Andric  _(RAIDFRAME_REMOVE_HOT_SPARE, READ, struct_RF_SingleComponent_sz);
3780b57cec5SDimitry Andric  _(RAIDFRAME_REBUILD_IN_PLACE, READ, struct_RF_SingleComponent_sz);
3790b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_PARITY, READWRITE, sizeof(int));
3800b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_PARITYREWRITE_STATUS, READWRITE, sizeof(int));
3810b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_COPYBACK_STATUS, READWRITE, sizeof(int));
3820b57cec5SDimitry Andric  _(RAIDFRAME_SET_AUTOCONFIG, READWRITE, sizeof(int));
3830b57cec5SDimitry Andric  _(RAIDFRAME_SET_ROOT, READWRITE, sizeof(int));
3840b57cec5SDimitry Andric  _(RAIDFRAME_DELETE_COMPONENT, READ, struct_RF_SingleComponent_sz);
3850b57cec5SDimitry Andric  _(RAIDFRAME_INCORPORATE_HOT_SPARE, READ, struct_RF_SingleComponent_sz);
3860b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_RECON_STATUS_EXT, READWRITE, struct_RF_ProgressInfo_sz);
3870b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT, READWRITE,
3880b57cec5SDimitry Andric    struct_RF_ProgressInfo_sz);
3890b57cec5SDimitry Andric  _(RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, READWRITE, struct_RF_ProgressInfo_sz);
3900b57cec5SDimitry Andric  _(RAIDFRAME_PARITYMAP_STATUS, WRITE, struct_rf_pmstat_sz);
3910b57cec5SDimitry Andric  _(RAIDFRAME_PARITYMAP_GET_DISABLE, WRITE, sizeof(int));
3920b57cec5SDimitry Andric  _(RAIDFRAME_PARITYMAP_SET_DISABLE, READ, sizeof(int));
3930b57cec5SDimitry Andric  _(RAIDFRAME_PARITYMAP_SET_PARAMS, READ, struct_rf_pmparams_sz);
3940b57cec5SDimitry Andric  _(RAIDFRAME_SET_LAST_UNIT, READ, sizeof(int));
3950b57cec5SDimitry Andric  _(RAIDFRAME_GET_INFO, READWRITE, sizeof(uptr));
3960b57cec5SDimitry Andric  _(RAIDFRAME_CONFIGURE, READ, sizeof(uptr));
3970b57cec5SDimitry Andric  /* Entries from file: dev/sbus/mbppio.h */
3980b57cec5SDimitry Andric  _(MBPPIOCSPARAM, READ, struct_mbpp_param_sz);
3990b57cec5SDimitry Andric  _(MBPPIOCGPARAM, WRITE, struct_mbpp_param_sz);
4000b57cec5SDimitry Andric  _(MBPPIOCGSTAT, WRITE, sizeof(int));
4010b57cec5SDimitry Andric  /* Entries from file: dev/scsipi/ses.h */
4020b57cec5SDimitry Andric  _(SESIOC_GETNOBJ, NONE, 0);
4030b57cec5SDimitry Andric  _(SESIOC_GETOBJMAP, NONE, 0);
4040b57cec5SDimitry Andric  _(SESIOC_GETENCSTAT, NONE, 0);
4050b57cec5SDimitry Andric  _(SESIOC_SETENCSTAT, NONE, 0);
4060b57cec5SDimitry Andric  _(SESIOC_GETOBJSTAT, NONE, 0);
4070b57cec5SDimitry Andric  _(SESIOC_SETOBJSTAT, NONE, 0);
4080b57cec5SDimitry Andric  _(SESIOC_GETTEXT, NONE, 0);
4090b57cec5SDimitry Andric  _(SESIOC_INIT, NONE, 0);
4100b57cec5SDimitry Andric  /* Entries from file: dev/sun/disklabel.h */
4110b57cec5SDimitry Andric  _(SUN_DKIOCGGEOM, WRITE, struct_sun_dkgeom_sz);
4120b57cec5SDimitry Andric  _(SUN_DKIOCINFO, WRITE, struct_sun_dkctlr_sz);
4130b57cec5SDimitry Andric  _(SUN_DKIOCGPART, WRITE, struct_sun_dkpart_sz);
4140b57cec5SDimitry Andric  /* Entries from file: dev/sun/fbio.h */
4150b57cec5SDimitry Andric  _(FBIOGTYPE, WRITE, struct_fbtype_sz);
4160b57cec5SDimitry Andric  _(FBIOPUTCMAP, READ, struct_fbcmap_sz);
4170b57cec5SDimitry Andric  _(FBIOGETCMAP, READ, struct_fbcmap_sz);
4180b57cec5SDimitry Andric  _(FBIOGATTR, WRITE, struct_fbgattr_sz);
4190b57cec5SDimitry Andric  _(FBIOSVIDEO, READ, sizeof(int));
4200b57cec5SDimitry Andric  _(FBIOGVIDEO, WRITE, sizeof(int));
4210b57cec5SDimitry Andric  _(FBIOSCURSOR, READ, struct_fbcursor_sz);
4220b57cec5SDimitry Andric  _(FBIOGCURSOR, READWRITE, struct_fbcursor_sz);
4230b57cec5SDimitry Andric  _(FBIOSCURPOS, READ, struct_fbcurpos_sz);
4240b57cec5SDimitry Andric  _(FBIOGCURPOS, READ, struct_fbcurpos_sz);
4250b57cec5SDimitry Andric  _(FBIOGCURMAX, WRITE, struct_fbcurpos_sz);
4260b57cec5SDimitry Andric  /* Entries from file: dev/sun/kbio.h */
4270b57cec5SDimitry Andric  _(KIOCTRANS, READ, sizeof(int));
4280b57cec5SDimitry Andric  _(KIOCSETKEY, READWRITE, struct_okiockey_sz);
4290b57cec5SDimitry Andric  _(KIOCGETKEY, READWRITE, struct_okiockey_sz);
4300b57cec5SDimitry Andric  _(KIOCGTRANS, WRITE, sizeof(int));
4310b57cec5SDimitry Andric  _(KIOCCMD, READ, sizeof(int));
4320b57cec5SDimitry Andric  _(KIOCTYPE, WRITE, sizeof(int));
4330b57cec5SDimitry Andric  _(KIOCSDIRECT, READ, sizeof(int));
4340b57cec5SDimitry Andric  _(KIOCSKEY, READ, struct_kiockeymap_sz);
4350b57cec5SDimitry Andric  _(KIOCGKEY, READWRITE, struct_kiockeymap_sz);
4360b57cec5SDimitry Andric  _(KIOCSLED, READ, sizeof(char));
4370b57cec5SDimitry Andric  _(KIOCGLED, WRITE, sizeof(char));
4380b57cec5SDimitry Andric  _(KIOCLAYOUT, WRITE, sizeof(int));
4390b57cec5SDimitry Andric  /* Entries from file: dev/sun/vuid_event.h */
4400b57cec5SDimitry Andric  _(VUIDSFORMAT, READ, sizeof(int));
4410b57cec5SDimitry Andric  _(VUIDGFORMAT, WRITE, sizeof(int));
4420b57cec5SDimitry Andric  /* Entries from file: dev/tc/sticio.h */
4430b57cec5SDimitry Andric  _(STICIO_GXINFO, WRITE, struct_stic_xinfo_sz);
4440b57cec5SDimitry Andric  _(STICIO_RESET, NONE, 0);
4450b57cec5SDimitry Andric  _(STICIO_STARTQ, NONE, 0);
4460b57cec5SDimitry Andric  _(STICIO_STOPQ, NONE, 0);
4470b57cec5SDimitry Andric  /* Entries from file: dev/usb/ukyopon.h */
4480b57cec5SDimitry Andric  _(UKYOPON_IDENTIFY, WRITE, struct_ukyopon_identify_sz);
4490b57cec5SDimitry Andric  /* Entries from file: dev/usb/usb.h */
4500b57cec5SDimitry Andric  _(USB_REQUEST, READWRITE, struct_usb_ctl_request_sz);
4510b57cec5SDimitry Andric  _(USB_SETDEBUG, READ, sizeof(int));
4520b57cec5SDimitry Andric  _(USB_DISCOVER, NONE, 0);
4530b57cec5SDimitry Andric  _(USB_DEVICEINFO, READWRITE, struct_usb_device_info_sz);
4540b57cec5SDimitry Andric  _(USB_DEVICEINFO_OLD, READWRITE, struct_usb_device_info_old_sz);
4550b57cec5SDimitry Andric  _(USB_DEVICESTATS, WRITE, struct_usb_device_stats_sz);
4560b57cec5SDimitry Andric  _(USB_GET_REPORT_DESC, WRITE, struct_usb_ctl_report_desc_sz);
4570b57cec5SDimitry Andric  _(USB_SET_IMMED, READ, sizeof(int));
4580b57cec5SDimitry Andric  _(USB_GET_REPORT, READWRITE, struct_usb_ctl_report_sz);
4590b57cec5SDimitry Andric  _(USB_SET_REPORT, READ, struct_usb_ctl_report_sz);
4600b57cec5SDimitry Andric  _(USB_GET_REPORT_ID, WRITE, sizeof(int));
4610b57cec5SDimitry Andric  _(USB_GET_CONFIG, WRITE, sizeof(int));
4620b57cec5SDimitry Andric  _(USB_SET_CONFIG, READ, sizeof(int));
4630b57cec5SDimitry Andric  _(USB_GET_ALTINTERFACE, READWRITE, struct_usb_alt_interface_sz);
4640b57cec5SDimitry Andric  _(USB_SET_ALTINTERFACE, READWRITE, struct_usb_alt_interface_sz);
4650b57cec5SDimitry Andric  _(USB_GET_NO_ALT, READWRITE, struct_usb_alt_interface_sz);
4660b57cec5SDimitry Andric  _(USB_GET_DEVICE_DESC, WRITE, struct_usb_device_descriptor_sz);
4670b57cec5SDimitry Andric  _(USB_GET_CONFIG_DESC, READWRITE, struct_usb_config_desc_sz);
4680b57cec5SDimitry Andric  _(USB_GET_INTERFACE_DESC, READWRITE, struct_usb_interface_desc_sz);
4690b57cec5SDimitry Andric  _(USB_GET_ENDPOINT_DESC, READWRITE, struct_usb_endpoint_desc_sz);
4700b57cec5SDimitry Andric  _(USB_GET_FULL_DESC, READWRITE, struct_usb_full_desc_sz);
4710b57cec5SDimitry Andric  _(USB_GET_STRING_DESC, READWRITE, struct_usb_string_desc_sz);
4720b57cec5SDimitry Andric  _(USB_DO_REQUEST, READWRITE, struct_usb_ctl_request_sz);
4730b57cec5SDimitry Andric  _(USB_GET_DEVICEINFO, WRITE, struct_usb_device_info_sz);
4740b57cec5SDimitry Andric  _(USB_GET_DEVICEINFO_OLD, WRITE, struct_usb_device_info_old_sz);
4750b57cec5SDimitry Andric  _(USB_SET_SHORT_XFER, READ, sizeof(int));
4760b57cec5SDimitry Andric  _(USB_SET_TIMEOUT, READ, sizeof(int));
4770b57cec5SDimitry Andric  _(USB_SET_BULK_RA, READ, sizeof(int));
4780b57cec5SDimitry Andric  _(USB_SET_BULK_WB, READ, sizeof(int));
4790b57cec5SDimitry Andric  _(USB_SET_BULK_RA_OPT, READ, struct_usb_bulk_ra_wb_opt_sz);
4800b57cec5SDimitry Andric  _(USB_SET_BULK_WB_OPT, READ, struct_usb_bulk_ra_wb_opt_sz);
4810b57cec5SDimitry Andric  _(USB_GET_CM_OVER_DATA, WRITE, sizeof(int));
4820b57cec5SDimitry Andric  _(USB_SET_CM_OVER_DATA, READ, sizeof(int));
4830b57cec5SDimitry Andric  /* Entries from file: dev/usb/utoppy.h */
4840b57cec5SDimitry Andric  _(UTOPPYIOTURBO, READ, sizeof(int));
4850b57cec5SDimitry Andric  _(UTOPPYIOREBOOT, NONE, 0);
4860b57cec5SDimitry Andric  _(UTOPPYIOSTATS, WRITE, struct_utoppy_stats_sz);
4870b57cec5SDimitry Andric  _(UTOPPYIORENAME, READ, struct_utoppy_rename_sz);
4880b57cec5SDimitry Andric  _(UTOPPYIOMKDIR, READ, sizeof(uptr));
4890b57cec5SDimitry Andric  _(UTOPPYIODELETE, READ, sizeof(uptr));
4900b57cec5SDimitry Andric  _(UTOPPYIOREADDIR, READ, sizeof(uptr));
4910b57cec5SDimitry Andric  _(UTOPPYIOREADFILE, READ, struct_utoppy_readfile_sz);
4920b57cec5SDimitry Andric  _(UTOPPYIOWRITEFILE, READ, struct_utoppy_writefile_sz);
4930b57cec5SDimitry Andric  /* Entries from file: dev/vme/xio.h */
4940b57cec5SDimitry Andric  _(DIOSXDCMD, READWRITE, struct_xd_iocmd_sz);
4950b57cec5SDimitry Andric  /* Entries from file: dev/wscons/wsdisplay_usl_io.h */
4960b57cec5SDimitry Andric  _(VT_OPENQRY, WRITE, sizeof(int));
4970b57cec5SDimitry Andric  _(VT_SETMODE, READ, struct_vt_mode_sz);
4980b57cec5SDimitry Andric  _(VT_GETMODE, WRITE, struct_vt_mode_sz);
4990b57cec5SDimitry Andric  _(VT_RELDISP, NONE, 0);
5000b57cec5SDimitry Andric  _(VT_ACTIVATE, NONE, 0);
5010b57cec5SDimitry Andric  _(VT_WAITACTIVE, NONE, 0);
5020b57cec5SDimitry Andric  _(VT_GETACTIVE, WRITE, sizeof(int));
5030b57cec5SDimitry Andric  _(VT_GETSTATE, WRITE, struct_vt_stat_sz);
5040b57cec5SDimitry Andric  _(KDGETKBENT, READWRITE, struct_kbentry_sz);
5050b57cec5SDimitry Andric  _(KDGKBMODE, WRITE, sizeof(int));
5060b57cec5SDimitry Andric  _(KDSKBMODE, NONE, 0);
5070b57cec5SDimitry Andric  _(KDMKTONE, NONE, 0);
5080b57cec5SDimitry Andric  _(KDSETMODE, NONE, 0);
5090b57cec5SDimitry Andric  _(KDENABIO, NONE, 0);
5100b57cec5SDimitry Andric  _(KDDISABIO, NONE, 0);
5110b57cec5SDimitry Andric  _(KDGKBTYPE, WRITE, sizeof(char));
5120b57cec5SDimitry Andric  _(KDGETLED, WRITE, sizeof(int));
5130b57cec5SDimitry Andric  _(KDSETLED, NONE, 0);
5140b57cec5SDimitry Andric  _(KDSETRAD, NONE, 0);
5150b57cec5SDimitry Andric  _(VGAPCVTID, READWRITE, struct_pcvtid_sz);
5160b57cec5SDimitry Andric  _(CONS_GETVERS, WRITE, sizeof(int));
5170b57cec5SDimitry Andric  /* Entries from file: dev/wscons/wsconsio.h */
5180b57cec5SDimitry Andric  _(WSKBDIO_GTYPE, WRITE, sizeof(unsigned int));
5190b57cec5SDimitry Andric  _(WSKBDIO_BELL, NONE, 0);
5200b57cec5SDimitry Andric  _(WSKBDIO_COMPLEXBELL, READ, struct_wskbd_bell_data_sz);
5210b57cec5SDimitry Andric  _(WSKBDIO_SETBELL, READ, struct_wskbd_bell_data_sz);
5220b57cec5SDimitry Andric  _(WSKBDIO_GETBELL, WRITE, struct_wskbd_bell_data_sz);
5230b57cec5SDimitry Andric  _(WSKBDIO_SETDEFAULTBELL, READ, struct_wskbd_bell_data_sz);
5240b57cec5SDimitry Andric  _(WSKBDIO_GETDEFAULTBELL, WRITE, struct_wskbd_bell_data_sz);
5250b57cec5SDimitry Andric  _(WSKBDIO_SETKEYREPEAT, READ, struct_wskbd_keyrepeat_data_sz);
5260b57cec5SDimitry Andric  _(WSKBDIO_GETKEYREPEAT, WRITE, struct_wskbd_keyrepeat_data_sz);
5270b57cec5SDimitry Andric  _(WSKBDIO_SETDEFAULTKEYREPEAT, READ, struct_wskbd_keyrepeat_data_sz);
5280b57cec5SDimitry Andric  _(WSKBDIO_GETDEFAULTKEYREPEAT, WRITE, struct_wskbd_keyrepeat_data_sz);
5290b57cec5SDimitry Andric  _(WSKBDIO_SETLEDS, READ, sizeof(int));
5300b57cec5SDimitry Andric  _(WSKBDIO_GETLEDS, WRITE, sizeof(int));
5310b57cec5SDimitry Andric  _(WSKBDIO_GETMAP, READWRITE, struct_wskbd_map_data_sz);
5320b57cec5SDimitry Andric  _(WSKBDIO_SETMAP, READ, struct_wskbd_map_data_sz);
5330b57cec5SDimitry Andric  _(WSKBDIO_GETENCODING, WRITE, sizeof(int));
5340b57cec5SDimitry Andric  _(WSKBDIO_SETENCODING, READ, sizeof(int));
5350b57cec5SDimitry Andric  _(WSKBDIO_SETMODE, READ, sizeof(int));
5360b57cec5SDimitry Andric  _(WSKBDIO_GETMODE, WRITE, sizeof(int));
5370b57cec5SDimitry Andric  _(WSKBDIO_SETKEYCLICK, READ, sizeof(int));
5380b57cec5SDimitry Andric  _(WSKBDIO_GETKEYCLICK, WRITE, sizeof(int));
5390b57cec5SDimitry Andric  _(WSKBDIO_GETSCROLL, WRITE, struct_wskbd_scroll_data_sz);
5400b57cec5SDimitry Andric  _(WSKBDIO_SETSCROLL, READ, struct_wskbd_scroll_data_sz);
5410b57cec5SDimitry Andric  _(WSKBDIO_SETVERSION, READ, sizeof(int));
5420b57cec5SDimitry Andric  _(WSMOUSEIO_GTYPE, WRITE, sizeof(unsigned int));
5430b57cec5SDimitry Andric  _(WSMOUSEIO_SRES, READ, sizeof(unsigned int));
5440b57cec5SDimitry Andric  _(WSMOUSEIO_SSCALE, READ, sizeof(unsigned int));
5450b57cec5SDimitry Andric  _(WSMOUSEIO_SRATE, READ, sizeof(unsigned int));
5460b57cec5SDimitry Andric  _(WSMOUSEIO_SCALIBCOORDS, READ, struct_wsmouse_calibcoords_sz);
5470b57cec5SDimitry Andric  _(WSMOUSEIO_GCALIBCOORDS, WRITE, struct_wsmouse_calibcoords_sz);
5480b57cec5SDimitry Andric  _(WSMOUSEIO_GETID, READWRITE, struct_wsmouse_id_sz);
5490b57cec5SDimitry Andric  _(WSMOUSEIO_GETREPEAT, WRITE, struct_wsmouse_repeat_sz);
5500b57cec5SDimitry Andric  _(WSMOUSEIO_SETREPEAT, READ, struct_wsmouse_repeat_sz);
5510b57cec5SDimitry Andric  _(WSMOUSEIO_SETVERSION, READ, sizeof(int));
5520b57cec5SDimitry Andric  _(WSDISPLAYIO_GTYPE, WRITE, sizeof(unsigned int));
5530b57cec5SDimitry Andric  _(WSDISPLAYIO_GINFO, WRITE, struct_wsdisplay_fbinfo_sz);
5540b57cec5SDimitry Andric  _(WSDISPLAYIO_GETCMAP, READ, struct_wsdisplay_cmap_sz);
5550b57cec5SDimitry Andric  _(WSDISPLAYIO_PUTCMAP, READ, struct_wsdisplay_cmap_sz);
5560b57cec5SDimitry Andric  _(WSDISPLAYIO_GVIDEO, WRITE, sizeof(unsigned int));
5570b57cec5SDimitry Andric  _(WSDISPLAYIO_SVIDEO, READ, sizeof(unsigned int));
5580b57cec5SDimitry Andric  _(WSDISPLAYIO_GCURPOS, WRITE, struct_wsdisplay_curpos_sz);
5590b57cec5SDimitry Andric  _(WSDISPLAYIO_SCURPOS, READ, struct_wsdisplay_curpos_sz);
5600b57cec5SDimitry Andric  _(WSDISPLAYIO_GCURMAX, WRITE, struct_wsdisplay_curpos_sz);
5610b57cec5SDimitry Andric  _(WSDISPLAYIO_GCURSOR, READWRITE, struct_wsdisplay_cursor_sz);
5620b57cec5SDimitry Andric  _(WSDISPLAYIO_SCURSOR, READ, struct_wsdisplay_cursor_sz);
5630b57cec5SDimitry Andric  _(WSDISPLAYIO_GMODE, WRITE, sizeof(unsigned int));
5640b57cec5SDimitry Andric  _(WSDISPLAYIO_SMODE, READ, sizeof(unsigned int));
5650b57cec5SDimitry Andric  _(WSDISPLAYIO_LDFONT, READ, struct_wsdisplay_font_sz);
5660b57cec5SDimitry Andric  _(WSDISPLAYIO_ADDSCREEN, READ, struct_wsdisplay_addscreendata_sz);
5670b57cec5SDimitry Andric  _(WSDISPLAYIO_DELSCREEN, READ, struct_wsdisplay_delscreendata_sz);
5680b57cec5SDimitry Andric  _(WSDISPLAYIO_SFONT, READ, struct_wsdisplay_usefontdata_sz);
5690b57cec5SDimitry Andric  _(_O_WSDISPLAYIO_SETKEYBOARD, READWRITE, struct_wsdisplay_kbddata_sz);
5700b57cec5SDimitry Andric  _(WSDISPLAYIO_GETPARAM, READWRITE, struct_wsdisplay_param_sz);
5710b57cec5SDimitry Andric  _(WSDISPLAYIO_SETPARAM, READWRITE, struct_wsdisplay_param_sz);
5720b57cec5SDimitry Andric  _(WSDISPLAYIO_GETACTIVESCREEN, WRITE, sizeof(int));
5730b57cec5SDimitry Andric  _(WSDISPLAYIO_GETWSCHAR, READWRITE, struct_wsdisplay_char_sz);
5740b57cec5SDimitry Andric  _(WSDISPLAYIO_PUTWSCHAR, READWRITE, struct_wsdisplay_char_sz);
5750b57cec5SDimitry Andric  _(WSDISPLAYIO_DGSCROLL, WRITE, struct_wsdisplay_scroll_data_sz);
5760b57cec5SDimitry Andric  _(WSDISPLAYIO_DSSCROLL, READ, struct_wsdisplay_scroll_data_sz);
5770b57cec5SDimitry Andric  _(WSDISPLAYIO_GMSGATTRS, WRITE, struct_wsdisplay_msgattrs_sz);
5780b57cec5SDimitry Andric  _(WSDISPLAYIO_SMSGATTRS, READ, struct_wsdisplay_msgattrs_sz);
5790b57cec5SDimitry Andric  _(WSDISPLAYIO_GBORDER, WRITE, sizeof(int));
5800b57cec5SDimitry Andric  _(WSDISPLAYIO_SBORDER, READ, sizeof(int));
5810b57cec5SDimitry Andric  _(WSDISPLAYIO_SSPLASH, READ, sizeof(int));
5820b57cec5SDimitry Andric  _(WSDISPLAYIO_SPROGRESS, READ, sizeof(int));
5830b57cec5SDimitry Andric  _(WSDISPLAYIO_LINEBYTES, WRITE, sizeof(unsigned int));
5840b57cec5SDimitry Andric  _(WSDISPLAYIO_SETVERSION, READ, sizeof(int));
5850b57cec5SDimitry Andric  _(WSMUXIO_ADD_DEVICE, READ, struct_wsmux_device_sz);
5860b57cec5SDimitry Andric  _(WSMUXIO_REMOVE_DEVICE, READ, struct_wsmux_device_sz);
5870b57cec5SDimitry Andric  _(WSMUXIO_LIST_DEVICES, READWRITE, struct_wsmux_device_list_sz);
5880b57cec5SDimitry Andric  _(WSMUXIO_INJECTEVENT, READ, struct_wscons_event_sz);
5890b57cec5SDimitry Andric  _(WSDISPLAYIO_GET_BUSID, WRITE, struct_wsdisplayio_bus_id_sz);
5900b57cec5SDimitry Andric  _(WSDISPLAYIO_GET_EDID, READWRITE, struct_wsdisplayio_edid_info_sz);
5910b57cec5SDimitry Andric  _(WSDISPLAYIO_SET_POLLING, READ, sizeof(int));
5920b57cec5SDimitry Andric  _(WSDISPLAYIO_GET_FBINFO, READWRITE, struct_wsdisplayio_fbinfo_sz);
5930b57cec5SDimitry Andric  _(WSDISPLAYIO_DOBLIT, READWRITE, struct_wsdisplayio_blit_sz);
5940b57cec5SDimitry Andric  _(WSDISPLAYIO_WAITBLIT, READWRITE, struct_wsdisplayio_blit_sz);
5950b57cec5SDimitry Andric  /* Entries from file: dev/biovar.h */
5960b57cec5SDimitry Andric  _(BIOCLOCATE, READWRITE, struct_bio_locate_sz);
5970b57cec5SDimitry Andric  _(BIOCINQ, READWRITE, struct_bioc_inq_sz);
5980b57cec5SDimitry Andric  _(BIOCDISK_NOVOL, READWRITE, struct_bioc_disk_sz);
5990b57cec5SDimitry Andric  _(BIOCDISK, READWRITE, struct_bioc_disk_sz);
6000b57cec5SDimitry Andric  _(BIOCVOL, READWRITE, struct_bioc_vol_sz);
6010b57cec5SDimitry Andric  _(BIOCALARM, READWRITE, struct_bioc_alarm_sz);
6020b57cec5SDimitry Andric  _(BIOCBLINK, READWRITE, struct_bioc_blink_sz);
6030b57cec5SDimitry Andric  _(BIOCSETSTATE, READWRITE, struct_bioc_setstate_sz);
6040b57cec5SDimitry Andric  _(BIOCVOLOPS, READWRITE, struct_bioc_volops_sz);
6050b57cec5SDimitry Andric  /* Entries from file: dev/md.h */
6060b57cec5SDimitry Andric  _(MD_GETCONF, WRITE, struct_md_conf_sz);
6070b57cec5SDimitry Andric  _(MD_SETCONF, READ, struct_md_conf_sz);
6080b57cec5SDimitry Andric  /* Entries from file: dev/ccdvar.h */
6090b57cec5SDimitry Andric  _(CCDIOCSET, READWRITE, struct_ccd_ioctl_sz);
6100b57cec5SDimitry Andric  _(CCDIOCCLR, READ, struct_ccd_ioctl_sz);
6110b57cec5SDimitry Andric  /* Entries from file: dev/cgdvar.h */
6120b57cec5SDimitry Andric  _(CGDIOCSET, READWRITE, struct_cgd_ioctl_sz);
6130b57cec5SDimitry Andric  _(CGDIOCCLR, READ, struct_cgd_ioctl_sz);
6140b57cec5SDimitry Andric  _(CGDIOCGET, READWRITE, struct_cgd_user_sz);
6150b57cec5SDimitry Andric  /* Entries from file: dev/fssvar.h */
6160b57cec5SDimitry Andric  _(FSSIOCSET, READ, struct_fss_set_sz);
6170b57cec5SDimitry Andric  _(FSSIOCGET, WRITE, struct_fss_get_sz);
6180b57cec5SDimitry Andric  _(FSSIOCCLR, NONE, 0);
6190b57cec5SDimitry Andric  _(FSSIOFSET, READ, sizeof(int));
6200b57cec5SDimitry Andric  _(FSSIOFGET, WRITE, sizeof(int));
6210b57cec5SDimitry Andric  /* Entries from file: dev/bluetooth/btdev.h */
6220b57cec5SDimitry Andric  _(BTDEV_ATTACH, READ, struct_plistref_sz);
6230b57cec5SDimitry Andric  _(BTDEV_DETACH, READ, struct_plistref_sz);
6240b57cec5SDimitry Andric  /* Entries from file: dev/bluetooth/btsco.h */
6250b57cec5SDimitry Andric  _(BTSCO_GETINFO, WRITE, struct_btsco_info_sz);
6260b57cec5SDimitry Andric  /* Entries from file: dev/kttcpio.h */
6270b57cec5SDimitry Andric  _(KTTCP_IO_SEND, READWRITE, struct_kttcp_io_args_sz);
6280b57cec5SDimitry Andric  _(KTTCP_IO_RECV, READWRITE, struct_kttcp_io_args_sz);
6290b57cec5SDimitry Andric  /* Entries from file: dev/lockstat.h */
6300b57cec5SDimitry Andric  _(IOC_LOCKSTAT_GVERSION, WRITE, sizeof(int));
6310b57cec5SDimitry Andric  _(IOC_LOCKSTAT_ENABLE, READ, struct_lsenable_sz);
6320b57cec5SDimitry Andric  _(IOC_LOCKSTAT_DISABLE, WRITE, struct_lsdisable_sz);
6330b57cec5SDimitry Andric  /* Entries from file: dev/vndvar.h */
6340b57cec5SDimitry Andric  _(VNDIOCSET, READWRITE, struct_vnd_ioctl_sz);
6350b57cec5SDimitry Andric  _(VNDIOCCLR, READ, struct_vnd_ioctl_sz);
6360b57cec5SDimitry Andric  _(VNDIOCGET, READWRITE, struct_vnd_user_sz);
6370b57cec5SDimitry Andric  /* Entries from file: dev/spkrio.h */
6380b57cec5SDimitry Andric  _(SPKRTONE, READ, struct_tone_sz);
6390b57cec5SDimitry Andric  _(SPKRTUNE, NONE, 0);
6400b57cec5SDimitry Andric  _(SPKRGETVOL, WRITE, sizeof(unsigned int));
6410b57cec5SDimitry Andric  _(SPKRSETVOL, READ, sizeof(unsigned int));
6420b57cec5SDimitry Andric#if defined(__x86_64__)
6430b57cec5SDimitry Andric  /* Entries from file: dev/nvmm/nvmm_ioctl.h */
6440b57cec5SDimitry Andric  _(NVMM_IOC_CAPABILITY, WRITE, struct_nvmm_ioc_capability_sz);
6450b57cec5SDimitry Andric  _(NVMM_IOC_MACHINE_CREATE, READWRITE, struct_nvmm_ioc_machine_create_sz);
6460b57cec5SDimitry Andric  _(NVMM_IOC_MACHINE_DESTROY, READ, struct_nvmm_ioc_machine_destroy_sz);
6470b57cec5SDimitry Andric  _(NVMM_IOC_MACHINE_CONFIGURE, READ, struct_nvmm_ioc_machine_configure_sz);
6480b57cec5SDimitry Andric  _(NVMM_IOC_VCPU_CREATE, READ, struct_nvmm_ioc_vcpu_create_sz);
6490b57cec5SDimitry Andric  _(NVMM_IOC_VCPU_DESTROY, READ, struct_nvmm_ioc_vcpu_destroy_sz);
650480093f4SDimitry Andric  _(NVMM_IOC_VCPU_CONFIGURE, READ, struct_nvmm_ioc_vcpu_configure_sz);
6510b57cec5SDimitry Andric  _(NVMM_IOC_VCPU_SETSTATE, READ, struct_nvmm_ioc_vcpu_setstate_sz);
6520b57cec5SDimitry Andric  _(NVMM_IOC_VCPU_GETSTATE, READ, struct_nvmm_ioc_vcpu_getstate_sz);
6530b57cec5SDimitry Andric  _(NVMM_IOC_VCPU_INJECT, READ, struct_nvmm_ioc_vcpu_inject_sz);
6540b57cec5SDimitry Andric  _(NVMM_IOC_VCPU_RUN, READWRITE, struct_nvmm_ioc_vcpu_run_sz);
6550b57cec5SDimitry Andric  _(NVMM_IOC_GPA_MAP, READ, struct_nvmm_ioc_gpa_map_sz);
6560b57cec5SDimitry Andric  _(NVMM_IOC_GPA_UNMAP, READ, struct_nvmm_ioc_gpa_unmap_sz);
6570b57cec5SDimitry Andric  _(NVMM_IOC_HVA_MAP, READ, struct_nvmm_ioc_hva_map_sz);
6580b57cec5SDimitry Andric  _(NVMM_IOC_HVA_UNMAP, READ, struct_nvmm_ioc_hva_unmap_sz);
6590b57cec5SDimitry Andric  _(NVMM_IOC_CTL, READ, struct_nvmm_ioc_ctl_sz);
6600b57cec5SDimitry Andric#endif
6610b57cec5SDimitry Andric  /* Entries from file: dev/spi/spi_io.h */
6620b57cec5SDimitry Andric  _(SPI_IOCTL_CONFIGURE, READ, struct_spi_ioctl_configure_sz);
6630b57cec5SDimitry Andric  _(SPI_IOCTL_TRANSFER, READ, struct_spi_ioctl_transfer_sz);
6640b57cec5SDimitry Andric  /* Entries from file: fs/autofs/autofs_ioctl.h */
6650b57cec5SDimitry Andric  _(AUTOFSREQUEST, WRITE, struct_autofs_daemon_request_sz);
6660b57cec5SDimitry Andric  _(AUTOFSDONE, READ, struct_autofs_daemon_done_sz);
6670b57cec5SDimitry Andric  /* Entries from file: net/bpf.h */
6680b57cec5SDimitry Andric  _(BIOCGBLEN, WRITE, sizeof(unsigned int));
6690b57cec5SDimitry Andric  _(BIOCSBLEN, READWRITE, sizeof(unsigned int));
6700b57cec5SDimitry Andric  _(BIOCSETF, READ, struct_bpf_program_sz);
6710b57cec5SDimitry Andric  _(BIOCFLUSH, NONE, 0);
6720b57cec5SDimitry Andric  _(BIOCPROMISC, NONE, 0);
6730b57cec5SDimitry Andric  _(BIOCGDLT, WRITE, sizeof(unsigned int));
6740b57cec5SDimitry Andric  _(BIOCGETIF, WRITE, struct_ifreq_sz);
6750b57cec5SDimitry Andric  _(BIOCSETIF, READ, struct_ifreq_sz);
6760b57cec5SDimitry Andric  _(BIOCGSTATS, WRITE, struct_bpf_stat_sz);
6770b57cec5SDimitry Andric  _(BIOCGSTATSOLD, WRITE, struct_bpf_stat_old_sz);
6780b57cec5SDimitry Andric  _(BIOCIMMEDIATE, READ, sizeof(unsigned int));
6790b57cec5SDimitry Andric  _(BIOCVERSION, WRITE, struct_bpf_version_sz);
6800b57cec5SDimitry Andric  _(BIOCSTCPF, READ, struct_bpf_program_sz);
6810b57cec5SDimitry Andric  _(BIOCSUDPF, READ, struct_bpf_program_sz);
6820b57cec5SDimitry Andric  _(BIOCGHDRCMPLT, WRITE, sizeof(unsigned int));
6830b57cec5SDimitry Andric  _(BIOCSHDRCMPLT, READ, sizeof(unsigned int));
6840b57cec5SDimitry Andric  _(BIOCSDLT, READ, sizeof(unsigned int));
6850b57cec5SDimitry Andric  _(BIOCGDLTLIST, READWRITE, struct_bpf_dltlist_sz);
6860b57cec5SDimitry Andric  _(BIOCGDIRECTION, WRITE, sizeof(unsigned int));
6870b57cec5SDimitry Andric  _(BIOCSDIRECTION, READ, sizeof(unsigned int));
6880b57cec5SDimitry Andric  _(BIOCSRTIMEOUT, READ, struct_timeval_sz);
6890b57cec5SDimitry Andric  _(BIOCGRTIMEOUT, WRITE, struct_timeval_sz);
6900b57cec5SDimitry Andric  _(BIOCGFEEDBACK, WRITE, sizeof(unsigned int));
6910b57cec5SDimitry Andric  _(BIOCSFEEDBACK, READ, sizeof(unsigned int));
6920b57cec5SDimitry Andric  /* Entries from file: net/if_gre.h */
6930b57cec5SDimitry Andric  _(GRESADDRS, READ, struct_ifreq_sz);
6940b57cec5SDimitry Andric  _(GRESADDRD, READ, struct_ifreq_sz);
6950b57cec5SDimitry Andric  _(GREGADDRS, READWRITE, struct_ifreq_sz);
6960b57cec5SDimitry Andric  _(GREGADDRD, READWRITE, struct_ifreq_sz);
6970b57cec5SDimitry Andric  _(GRESPROTO, READ, struct_ifreq_sz);
6980b57cec5SDimitry Andric  _(GREGPROTO, READWRITE, struct_ifreq_sz);
6990b57cec5SDimitry Andric  _(GRESSOCK, READ, struct_ifreq_sz);
7000b57cec5SDimitry Andric  _(GREDSOCK, READ, struct_ifreq_sz);
7010b57cec5SDimitry Andric  /* Entries from file: net/if_ppp.h */
7020b57cec5SDimitry Andric  _(PPPIOCGRAWIN, WRITE, struct_ppp_rawin_sz);
7030b57cec5SDimitry Andric  _(PPPIOCGFLAGS, WRITE, sizeof(int));
7040b57cec5SDimitry Andric  _(PPPIOCSFLAGS, READ, sizeof(int));
7050b57cec5SDimitry Andric  _(PPPIOCGASYNCMAP, WRITE, sizeof(int));
7060b57cec5SDimitry Andric  _(PPPIOCSASYNCMAP, READ, sizeof(int));
7070b57cec5SDimitry Andric  _(PPPIOCGUNIT, WRITE, sizeof(int));
7080b57cec5SDimitry Andric  _(PPPIOCGRASYNCMAP, WRITE, sizeof(int));
7090b57cec5SDimitry Andric  _(PPPIOCSRASYNCMAP, READ, sizeof(int));
7100b57cec5SDimitry Andric  _(PPPIOCGMRU, WRITE, sizeof(int));
7110b57cec5SDimitry Andric  _(PPPIOCSMRU, READ, sizeof(int));
7120b57cec5SDimitry Andric  _(PPPIOCSMAXCID, READ, sizeof(int));
7130b57cec5SDimitry Andric  _(PPPIOCGXASYNCMAP, WRITE, (8 * sizeof(u32)));
7140b57cec5SDimitry Andric  _(PPPIOCSXASYNCMAP, READ, (8 * sizeof(u32)));
7150b57cec5SDimitry Andric  _(PPPIOCXFERUNIT, NONE, 0);
7160b57cec5SDimitry Andric  _(PPPIOCSCOMPRESS, READ, struct_ppp_option_data_sz);
7170b57cec5SDimitry Andric  _(PPPIOCGNPMODE, READWRITE, struct_npioctl_sz);
7180b57cec5SDimitry Andric  _(PPPIOCSNPMODE, READ, struct_npioctl_sz);
7190b57cec5SDimitry Andric  _(PPPIOCGIDLE, WRITE, struct_ppp_idle_sz);
7200b57cec5SDimitry Andric  _(PPPIOCGMTU, WRITE, sizeof(int));
7210b57cec5SDimitry Andric  _(PPPIOCSMTU, READ, sizeof(int));
7220b57cec5SDimitry Andric  _(SIOCGPPPSTATS, READWRITE, struct_ifpppstatsreq_sz);
7230b57cec5SDimitry Andric  _(SIOCGPPPCSTATS, READWRITE, struct_ifpppcstatsreq_sz);
7240b57cec5SDimitry Andric  /* Entries from file: net/npf.h */
7250b57cec5SDimitry Andric  _(IOC_NPF_VERSION, WRITE, sizeof(int));
7260b57cec5SDimitry Andric  _(IOC_NPF_SWITCH, READ, sizeof(int));
7270b57cec5SDimitry Andric  _(IOC_NPF_LOAD, READWRITE, struct_nvlist_ref_sz);
7280b57cec5SDimitry Andric  _(IOC_NPF_TABLE, READ, struct_npf_ioctl_table_sz);
7290b57cec5SDimitry Andric  _(IOC_NPF_STATS, READ, sizeof(uptr));
7300b57cec5SDimitry Andric  _(IOC_NPF_SAVE, WRITE, struct_nvlist_ref_sz);
7310b57cec5SDimitry Andric  _(IOC_NPF_RULE, READWRITE, struct_nvlist_ref_sz);
7320b57cec5SDimitry Andric  _(IOC_NPF_CONN_LOOKUP, READWRITE, struct_nvlist_ref_sz);
733480093f4SDimitry Andric  _(IOC_NPF_TABLE_REPLACE, READWRITE, struct_nvlist_ref_sz);
7340b57cec5SDimitry Andric  /* Entries from file: net/if_pppoe.h */
7350b57cec5SDimitry Andric  _(PPPOESETPARMS, READ, struct_pppoediscparms_sz);
7360b57cec5SDimitry Andric  _(PPPOEGETPARMS, READWRITE, struct_pppoediscparms_sz);
7370b57cec5SDimitry Andric  _(PPPOEGETSESSION, READWRITE, struct_pppoeconnectionstate_sz);
7380b57cec5SDimitry Andric  /* Entries from file: net/if_sppp.h */
7390b57cec5SDimitry Andric  _(SPPPGETAUTHCFG, READWRITE, struct_spppauthcfg_sz);
7400b57cec5SDimitry Andric  _(SPPPSETAUTHCFG, READ, struct_spppauthcfg_sz);
7410b57cec5SDimitry Andric  _(SPPPGETLCPCFG, READWRITE, struct_sppplcpcfg_sz);
7420b57cec5SDimitry Andric  _(SPPPSETLCPCFG, READ, struct_sppplcpcfg_sz);
7430b57cec5SDimitry Andric  _(SPPPGETSTATUS, READWRITE, struct_spppstatus_sz);
7440b57cec5SDimitry Andric  _(SPPPGETSTATUSNCP, READWRITE, struct_spppstatusncp_sz);
7450b57cec5SDimitry Andric  _(SPPPGETIDLETO, READWRITE, struct_spppidletimeout_sz);
7460b57cec5SDimitry Andric  _(SPPPSETIDLETO, READ, struct_spppidletimeout_sz);
7470b57cec5SDimitry Andric  _(SPPPGETAUTHFAILURES, READWRITE, struct_spppauthfailurestats_sz);
7480b57cec5SDimitry Andric  _(SPPPSETAUTHFAILURE, READ, struct_spppauthfailuresettings_sz);
7490b57cec5SDimitry Andric  _(SPPPSETDNSOPTS, READ, struct_spppdnssettings_sz);
7500b57cec5SDimitry Andric  _(SPPPGETDNSOPTS, READWRITE, struct_spppdnssettings_sz);
7510b57cec5SDimitry Andric  _(SPPPGETDNSADDRS, READWRITE, struct_spppdnsaddrs_sz);
7520b57cec5SDimitry Andric  _(SPPPSETKEEPALIVE, READ, struct_spppkeepalivesettings_sz);
7530b57cec5SDimitry Andric  _(SPPPGETKEEPALIVE, READWRITE, struct_spppkeepalivesettings_sz);
7540b57cec5SDimitry Andric  /* Entries from file: net/if_srt.h */
7550b57cec5SDimitry Andric  _(SRT_GETNRT, WRITE, sizeof(unsigned int));
7560b57cec5SDimitry Andric  _(SRT_GETRT, READWRITE, struct_srt_rt_sz);
7570b57cec5SDimitry Andric  _(SRT_SETRT, READ, struct_srt_rt_sz);
7580b57cec5SDimitry Andric  _(SRT_DELRT, READ, sizeof(unsigned int));
7590b57cec5SDimitry Andric  _(SRT_SFLAGS, READ, sizeof(unsigned int));
7600b57cec5SDimitry Andric  _(SRT_GFLAGS, WRITE, sizeof(unsigned int));
7610b57cec5SDimitry Andric  _(SRT_SGFLAGS, READWRITE, sizeof(unsigned int));
7620b57cec5SDimitry Andric  _(SRT_DEBUG, READ, sizeof(uptr));
7630b57cec5SDimitry Andric  /* Entries from file: net/if_tap.h */
7640b57cec5SDimitry Andric  _(TAPGIFNAME, WRITE, struct_ifreq_sz);
7650b57cec5SDimitry Andric  /* Entries from file: net/if_tun.h */
7660b57cec5SDimitry Andric  _(TUNSDEBUG, READ, sizeof(int));
7670b57cec5SDimitry Andric  _(TUNGDEBUG, WRITE, sizeof(int));
7680b57cec5SDimitry Andric  _(TUNSIFMODE, READ, sizeof(int));
7690b57cec5SDimitry Andric  _(TUNSIFHEAD, READ, sizeof(int));
7700b57cec5SDimitry Andric  _(TUNGIFHEAD, WRITE, sizeof(int));
7710b57cec5SDimitry Andric  /* Entries from file: net/pfvar.h */
7720b57cec5SDimitry Andric  _(DIOCSTART, NONE, 0);
7730b57cec5SDimitry Andric  _(DIOCSTOP, NONE, 0);
7740b57cec5SDimitry Andric  _(DIOCADDRULE, READWRITE, struct_pfioc_rule_sz);
7750b57cec5SDimitry Andric  _(DIOCGETRULES, READWRITE, struct_pfioc_rule_sz);
7760b57cec5SDimitry Andric  _(DIOCGETRULE, READWRITE, struct_pfioc_rule_sz);
7770b57cec5SDimitry Andric  _(DIOCSETLCK, READWRITE, sizeof(u32));
7780b57cec5SDimitry Andric  _(DIOCCLRSTATES, READWRITE, struct_pfioc_state_kill_sz);
7790b57cec5SDimitry Andric  _(DIOCGETSTATE, READWRITE, struct_pfioc_state_sz);
7800b57cec5SDimitry Andric  _(DIOCSETSTATUSIF, READWRITE, struct_pfioc_if_sz);
7810b57cec5SDimitry Andric  _(DIOCGETSTATUS, READWRITE, struct_pf_status_sz);
7820b57cec5SDimitry Andric  _(DIOCCLRSTATUS, NONE, 0);
7830b57cec5SDimitry Andric  _(DIOCNATLOOK, READWRITE, struct_pfioc_natlook_sz);
7840b57cec5SDimitry Andric  _(DIOCSETDEBUG, READWRITE, sizeof(u32));
7850b57cec5SDimitry Andric  _(DIOCGETSTATES, READWRITE, struct_pfioc_states_sz);
7860b57cec5SDimitry Andric  _(DIOCCHANGERULE, READWRITE, struct_pfioc_rule_sz);
7870b57cec5SDimitry Andric  _(DIOCSETTIMEOUT, READWRITE, struct_pfioc_tm_sz);
7880b57cec5SDimitry Andric  _(DIOCGETTIMEOUT, READWRITE, struct_pfioc_tm_sz);
7890b57cec5SDimitry Andric  _(DIOCADDSTATE, READWRITE, struct_pfioc_state_sz);
7900b57cec5SDimitry Andric  _(DIOCCLRRULECTRS, NONE, 0);
7910b57cec5SDimitry Andric  _(DIOCGETLIMIT, READWRITE, struct_pfioc_limit_sz);
7920b57cec5SDimitry Andric  _(DIOCSETLIMIT, READWRITE, struct_pfioc_limit_sz);
7930b57cec5SDimitry Andric  _(DIOCKILLSTATES, READWRITE, struct_pfioc_state_kill_sz);
7940b57cec5SDimitry Andric  _(DIOCSTARTALTQ, NONE, 0);
7950b57cec5SDimitry Andric  _(DIOCSTOPALTQ, NONE, 0);
7960b57cec5SDimitry Andric  _(DIOCADDALTQ, READWRITE, struct_pfioc_altq_sz);
7970b57cec5SDimitry Andric  _(DIOCGETALTQS, READWRITE, struct_pfioc_altq_sz);
7980b57cec5SDimitry Andric  _(DIOCGETALTQ, READWRITE, struct_pfioc_altq_sz);
7990b57cec5SDimitry Andric  _(DIOCCHANGEALTQ, READWRITE, struct_pfioc_altq_sz);
8000b57cec5SDimitry Andric  _(DIOCGETQSTATS, READWRITE, struct_pfioc_qstats_sz);
8010b57cec5SDimitry Andric  _(DIOCBEGINADDRS, READWRITE, struct_pfioc_pooladdr_sz);
8020b57cec5SDimitry Andric  _(DIOCADDADDR, READWRITE, struct_pfioc_pooladdr_sz);
8030b57cec5SDimitry Andric  _(DIOCGETADDRS, READWRITE, struct_pfioc_pooladdr_sz);
8040b57cec5SDimitry Andric  _(DIOCGETADDR, READWRITE, struct_pfioc_pooladdr_sz);
8050b57cec5SDimitry Andric  _(DIOCCHANGEADDR, READWRITE, struct_pfioc_pooladdr_sz);
8060b57cec5SDimitry Andric  _(DIOCADDSTATES, READWRITE, struct_pfioc_states_sz);
8070b57cec5SDimitry Andric  _(DIOCGETRULESETS, READWRITE, struct_pfioc_ruleset_sz);
8080b57cec5SDimitry Andric  _(DIOCGETRULESET, READWRITE, struct_pfioc_ruleset_sz);
8090b57cec5SDimitry Andric  _(DIOCRCLRTABLES, READWRITE, struct_pfioc_table_sz);
8100b57cec5SDimitry Andric  _(DIOCRADDTABLES, READWRITE, struct_pfioc_table_sz);
8110b57cec5SDimitry Andric  _(DIOCRDELTABLES, READWRITE, struct_pfioc_table_sz);
8120b57cec5SDimitry Andric  _(DIOCRGETTABLES, READWRITE, struct_pfioc_table_sz);
8130b57cec5SDimitry Andric  _(DIOCRGETTSTATS, READWRITE, struct_pfioc_table_sz);
8140b57cec5SDimitry Andric  _(DIOCRCLRTSTATS, READWRITE, struct_pfioc_table_sz);
8150b57cec5SDimitry Andric  _(DIOCRCLRADDRS, READWRITE, struct_pfioc_table_sz);
8160b57cec5SDimitry Andric  _(DIOCRADDADDRS, READWRITE, struct_pfioc_table_sz);
8170b57cec5SDimitry Andric  _(DIOCRDELADDRS, READWRITE, struct_pfioc_table_sz);
8180b57cec5SDimitry Andric  _(DIOCRSETADDRS, READWRITE, struct_pfioc_table_sz);
8190b57cec5SDimitry Andric  _(DIOCRGETADDRS, READWRITE, struct_pfioc_table_sz);
8200b57cec5SDimitry Andric  _(DIOCRGETASTATS, READWRITE, struct_pfioc_table_sz);
8210b57cec5SDimitry Andric  _(DIOCRCLRASTATS, READWRITE, struct_pfioc_table_sz);
8220b57cec5SDimitry Andric  _(DIOCRTSTADDRS, READWRITE, struct_pfioc_table_sz);
8230b57cec5SDimitry Andric  _(DIOCRSETTFLAGS, READWRITE, struct_pfioc_table_sz);
8240b57cec5SDimitry Andric  _(DIOCRINADEFINE, READWRITE, struct_pfioc_table_sz);
8250b57cec5SDimitry Andric  _(DIOCOSFPFLUSH, NONE, 0);
8260b57cec5SDimitry Andric  _(DIOCOSFPADD, READWRITE, struct_pf_osfp_ioctl_sz);
8270b57cec5SDimitry Andric  _(DIOCOSFPGET, READWRITE, struct_pf_osfp_ioctl_sz);
8280b57cec5SDimitry Andric  _(DIOCXBEGIN, READWRITE, struct_pfioc_trans_sz);
8290b57cec5SDimitry Andric  _(DIOCXCOMMIT, READWRITE, struct_pfioc_trans_sz);
8300b57cec5SDimitry Andric  _(DIOCXROLLBACK, READWRITE, struct_pfioc_trans_sz);
8310b57cec5SDimitry Andric  _(DIOCGETSRCNODES, READWRITE, struct_pfioc_src_nodes_sz);
8320b57cec5SDimitry Andric  _(DIOCCLRSRCNODES, NONE, 0);
8330b57cec5SDimitry Andric  _(DIOCSETHOSTID, READWRITE, sizeof(u32));
8340b57cec5SDimitry Andric  _(DIOCIGETIFACES, READWRITE, struct_pfioc_iface_sz);
8350b57cec5SDimitry Andric  _(DIOCSETIFFLAG, READWRITE, struct_pfioc_iface_sz);
8360b57cec5SDimitry Andric  _(DIOCCLRIFFLAG, READWRITE, struct_pfioc_iface_sz);
8370b57cec5SDimitry Andric  _(DIOCKILLSRCNODES, READWRITE, struct_pfioc_src_node_kill_sz);
8380b57cec5SDimitry Andric  /* Entries from file: netbt/hci.h */
8390b57cec5SDimitry Andric  _(SIOCGBTINFO, READWRITE, struct_btreq_sz);
8400b57cec5SDimitry Andric  _(SIOCGBTINFOA, READWRITE, struct_btreq_sz);
8410b57cec5SDimitry Andric  _(SIOCNBTINFO, READWRITE, struct_btreq_sz);
8420b57cec5SDimitry Andric  _(SIOCSBTFLAGS, READWRITE, struct_btreq_sz);
8430b57cec5SDimitry Andric  _(SIOCSBTPOLICY, READWRITE, struct_btreq_sz);
8440b57cec5SDimitry Andric  _(SIOCSBTPTYPE, READWRITE, struct_btreq_sz);
8450b57cec5SDimitry Andric  _(SIOCGBTSTATS, READWRITE, struct_btreq_sz);
8460b57cec5SDimitry Andric  _(SIOCZBTSTATS, READWRITE, struct_btreq_sz);
8470b57cec5SDimitry Andric  _(SIOCBTDUMP, READ, struct_btreq_sz);
8480b57cec5SDimitry Andric  _(SIOCSBTSCOMTU, READWRITE, struct_btreq_sz);
8490b57cec5SDimitry Andric  _(SIOCGBTFEAT, READWRITE, struct_btreq_sz);
8500b57cec5SDimitry Andric  /* Entries from file: netinet/ip_nat.h */
8510b57cec5SDimitry Andric  _(SIOCADNAT, READ, struct_ipfobj_sz);
8520b57cec5SDimitry Andric  _(SIOCRMNAT, READ, struct_ipfobj_sz);
8530b57cec5SDimitry Andric  _(SIOCGNATS, READWRITE, struct_ipfobj_sz);
8540b57cec5SDimitry Andric  _(SIOCGNATL, READWRITE, struct_ipfobj_sz);
8550b57cec5SDimitry Andric  _(SIOCPURGENAT, READWRITE, struct_ipfobj_sz);
8560b57cec5SDimitry Andric  /* Entries from file: netinet/sctp_uio.h */
8570b57cec5SDimitry Andric  _(SIOCCONNECTX, READWRITE, struct_sctp_connectx_addrs_sz);
8580b57cec5SDimitry Andric  _(SIOCCONNECTXDEL, READWRITE, struct_sctp_connectx_addrs_sz);
8590b57cec5SDimitry Andric  /* Entries from file: netinet6/in6_var.h */
8600b57cec5SDimitry Andric  _(SIOCSIFINFO_FLAGS, READWRITE, struct_in6_ndireq_sz);
8610b57cec5SDimitry Andric  _(SIOCAADDRCTL_POLICY, READ, struct_in6_addrpolicy_sz);
8620b57cec5SDimitry Andric  _(SIOCDADDRCTL_POLICY, READ, struct_in6_addrpolicy_sz);
8630b57cec5SDimitry Andric  /* Entries from file: netsmb/smb_dev.h */
8640b57cec5SDimitry Andric  _(SMBIOC_OPENSESSION, READ, struct_smbioc_ossn_sz);
8650b57cec5SDimitry Andric  _(SMBIOC_OPENSHARE, READ, struct_smbioc_oshare_sz);
8660b57cec5SDimitry Andric  _(SMBIOC_REQUEST, READWRITE, struct_smbioc_rq_sz);
8670b57cec5SDimitry Andric  _(SMBIOC_SETFLAGS, READ, struct_smbioc_flags_sz);
8680b57cec5SDimitry Andric  _(SMBIOC_LOOKUP, READ, struct_smbioc_lookup_sz);
8690b57cec5SDimitry Andric  _(SMBIOC_READ, READWRITE, struct_smbioc_rw_sz);
8700b57cec5SDimitry Andric  _(SMBIOC_WRITE, READWRITE, struct_smbioc_rw_sz);
8710b57cec5SDimitry Andric  /* Entries from file: sys/agpio.h */
8720b57cec5SDimitry Andric  _(AGPIOC_INFO, WRITE, struct__agp_info_sz);
8730b57cec5SDimitry Andric  _(AGPIOC_ACQUIRE, NONE, 0);
8740b57cec5SDimitry Andric  _(AGPIOC_RELEASE, NONE, 0);
8750b57cec5SDimitry Andric  _(AGPIOC_SETUP, READ, struct__agp_setup_sz);
8760b57cec5SDimitry Andric  _(AGPIOC_ALLOCATE, READWRITE, struct__agp_allocate_sz);
8770b57cec5SDimitry Andric  _(AGPIOC_DEALLOCATE, READ, sizeof(int));
8780b57cec5SDimitry Andric  _(AGPIOC_BIND, READ, struct__agp_bind_sz);
8790b57cec5SDimitry Andric  _(AGPIOC_UNBIND, READ, struct__agp_unbind_sz);
8800b57cec5SDimitry Andric  /* Entries from file: sys/audioio.h */
8810b57cec5SDimitry Andric  _(AUDIO_GETINFO, WRITE, struct_audio_info_sz);
8820b57cec5SDimitry Andric  _(AUDIO_SETINFO, READWRITE, struct_audio_info_sz);
8830b57cec5SDimitry Andric  _(AUDIO_DRAIN, NONE, 0);
8840b57cec5SDimitry Andric  _(AUDIO_FLUSH, NONE, 0);
8850b57cec5SDimitry Andric  _(AUDIO_WSEEK, WRITE, sizeof(unsigned long));
8860b57cec5SDimitry Andric  _(AUDIO_RERROR, WRITE, sizeof(int));
8870b57cec5SDimitry Andric  _(AUDIO_GETDEV, WRITE, struct_audio_device_sz);
8880b57cec5SDimitry Andric  _(AUDIO_GETENC, READWRITE, struct_audio_encoding_sz);
8890b57cec5SDimitry Andric  _(AUDIO_GETFD, WRITE, sizeof(int));
8900b57cec5SDimitry Andric  _(AUDIO_SETFD, READWRITE, sizeof(int));
8910b57cec5SDimitry Andric  _(AUDIO_PERROR, WRITE, sizeof(int));
8920b57cec5SDimitry Andric  _(AUDIO_GETIOFFS, WRITE, struct_audio_offset_sz);
8930b57cec5SDimitry Andric  _(AUDIO_GETOOFFS, WRITE, struct_audio_offset_sz);
8940b57cec5SDimitry Andric  _(AUDIO_GETPROPS, WRITE, sizeof(int));
8950b57cec5SDimitry Andric  _(AUDIO_GETBUFINFO, WRITE, struct_audio_info_sz);
8960b57cec5SDimitry Andric  _(AUDIO_SETCHAN, READ, sizeof(int));
8970b57cec5SDimitry Andric  _(AUDIO_GETCHAN, WRITE, sizeof(int));
8980b57cec5SDimitry Andric  _(AUDIO_QUERYFORMAT, READWRITE, struct_audio_format_query_sz);
8990b57cec5SDimitry Andric  _(AUDIO_GETFORMAT, WRITE, struct_audio_info_sz);
9000b57cec5SDimitry Andric  _(AUDIO_SETFORMAT, READ, struct_audio_info_sz);
9010b57cec5SDimitry Andric  _(AUDIO_MIXER_READ, READWRITE, struct_mixer_ctrl_sz);
9020b57cec5SDimitry Andric  _(AUDIO_MIXER_WRITE, READWRITE, struct_mixer_ctrl_sz);
9030b57cec5SDimitry Andric  _(AUDIO_MIXER_DEVINFO, READWRITE, struct_mixer_devinfo_sz);
9040b57cec5SDimitry Andric  /* Entries from file: sys/ataio.h */
9050b57cec5SDimitry Andric  _(ATAIOCCOMMAND, READWRITE, struct_atareq_sz);
9060b57cec5SDimitry Andric  _(ATABUSIOSCAN, READ, struct_atabusioscan_args_sz);
9070b57cec5SDimitry Andric  _(ATABUSIORESET, NONE, 0);
9080b57cec5SDimitry Andric  _(ATABUSIODETACH, READ, struct_atabusiodetach_args_sz);
9090b57cec5SDimitry Andric  /* Entries from file: sys/cdio.h */
9100b57cec5SDimitry Andric  _(CDIOCPLAYTRACKS, READ, struct_ioc_play_track_sz);
9110b57cec5SDimitry Andric  _(CDIOCPLAYBLOCKS, READ, struct_ioc_play_blocks_sz);
9120b57cec5SDimitry Andric  _(CDIOCREADSUBCHANNEL, READWRITE, struct_ioc_read_subchannel_sz);
9130b57cec5SDimitry Andric  _(CDIOREADTOCHEADER, WRITE, struct_ioc_toc_header_sz);
9140b57cec5SDimitry Andric  _(CDIOREADTOCENTRIES, READWRITE, struct_ioc_read_toc_entry_sz);
9150b57cec5SDimitry Andric  _(CDIOREADMSADDR, READWRITE, sizeof(int));
9160b57cec5SDimitry Andric  _(CDIOCSETPATCH, READ, struct_ioc_patch_sz);
9170b57cec5SDimitry Andric  _(CDIOCGETVOL, WRITE, struct_ioc_vol_sz);
9180b57cec5SDimitry Andric  _(CDIOCSETVOL, READ, struct_ioc_vol_sz);
9190b57cec5SDimitry Andric  _(CDIOCSETMONO, NONE, 0);
9200b57cec5SDimitry Andric  _(CDIOCSETSTEREO, NONE, 0);
9210b57cec5SDimitry Andric  _(CDIOCSETMUTE, NONE, 0);
9220b57cec5SDimitry Andric  _(CDIOCSETLEFT, NONE, 0);
9230b57cec5SDimitry Andric  _(CDIOCSETRIGHT, NONE, 0);
9240b57cec5SDimitry Andric  _(CDIOCSETDEBUG, NONE, 0);
9250b57cec5SDimitry Andric  _(CDIOCCLRDEBUG, NONE, 0);
9260b57cec5SDimitry Andric  _(CDIOCPAUSE, NONE, 0);
9270b57cec5SDimitry Andric  _(CDIOCRESUME, NONE, 0);
9280b57cec5SDimitry Andric  _(CDIOCRESET, NONE, 0);
9290b57cec5SDimitry Andric  _(CDIOCSTART, NONE, 0);
9300b57cec5SDimitry Andric  _(CDIOCSTOP, NONE, 0);
9310b57cec5SDimitry Andric  _(CDIOCEJECT, NONE, 0);
9320b57cec5SDimitry Andric  _(CDIOCALLOW, NONE, 0);
9330b57cec5SDimitry Andric  _(CDIOCPREVENT, NONE, 0);
9340b57cec5SDimitry Andric  _(CDIOCCLOSE, NONE, 0);
9350b57cec5SDimitry Andric  _(CDIOCPLAYMSF, READ, struct_ioc_play_msf_sz);
9360b57cec5SDimitry Andric  _(CDIOCLOADUNLOAD, READ, struct_ioc_load_unload_sz);
9370b57cec5SDimitry Andric  /* Entries from file: sys/chio.h */
9380b57cec5SDimitry Andric  _(CHIOMOVE, READ, struct_changer_move_request_sz);
9390b57cec5SDimitry Andric  _(CHIOEXCHANGE, READ, struct_changer_exchange_request_sz);
9400b57cec5SDimitry Andric  _(CHIOPOSITION, READ, struct_changer_position_request_sz);
9410b57cec5SDimitry Andric  _(CHIOSPICKER, READ, sizeof(int));
9420b57cec5SDimitry Andric  _(CHIOGPARAMS, WRITE, struct_changer_params_sz);
9430b57cec5SDimitry Andric  _(CHIOIELEM, NONE, 0);
9440b57cec5SDimitry Andric  _(OCHIOGSTATUS, READ, struct_ochanger_element_status_request_sz);
9450b57cec5SDimitry Andric  _(CHIOGSTATUS, READ, struct_changer_element_status_request_sz);
9460b57cec5SDimitry Andric  _(CHIOSVOLTAG, READ, struct_changer_set_voltag_request_sz);
9470b57cec5SDimitry Andric  /* Entries from file: sys/clockctl.h */
9480b57cec5SDimitry Andric  _(CLOCKCTL_SETTIMEOFDAY, READ, struct_clockctl_settimeofday_sz);
9490b57cec5SDimitry Andric  _(CLOCKCTL_ADJTIME, READWRITE, struct_clockctl_adjtime_sz);
9500b57cec5SDimitry Andric  _(CLOCKCTL_CLOCK_SETTIME, READ, struct_clockctl_clock_settime_sz);
9510b57cec5SDimitry Andric  _(CLOCKCTL_NTP_ADJTIME, READWRITE, struct_clockctl_ntp_adjtime_sz);
9520b57cec5SDimitry Andric  /* Entries from file: sys/cpuio.h */
9530b57cec5SDimitry Andric  _(IOC_CPU_SETSTATE, READ, struct_cpustate_sz);
9540b57cec5SDimitry Andric  _(IOC_CPU_GETSTATE, READWRITE, struct_cpustate_sz);
9550b57cec5SDimitry Andric  _(IOC_CPU_GETCOUNT, WRITE, sizeof(int));
9560b57cec5SDimitry Andric  _(IOC_CPU_MAPID, READWRITE, sizeof(int));
9570b57cec5SDimitry Andric  _(IOC_CPU_UCODE_GET_VERSION, READWRITE, struct_cpu_ucode_version_sz);
9580b57cec5SDimitry Andric  _(IOC_CPU_UCODE_APPLY, READ, struct_cpu_ucode_sz);
9590b57cec5SDimitry Andric  /* Entries from file: sys/dkio.h */
9600b57cec5SDimitry Andric  _(DIOCGDINFO, WRITE, struct_disklabel_sz);
9610b57cec5SDimitry Andric  _(DIOCSDINFO, READ, struct_disklabel_sz);
9620b57cec5SDimitry Andric  _(DIOCWDINFO, READ, 0);
9630b57cec5SDimitry Andric  _(DIOCRFORMAT, READWRITE, struct_format_op_sz);
9640b57cec5SDimitry Andric  _(DIOCWFORMAT, READWRITE, struct_format_op_sz);
9650b57cec5SDimitry Andric  _(DIOCSSTEP, READ, sizeof(int));
9660b57cec5SDimitry Andric  _(DIOCSRETRIES, READ, sizeof(int));
9670b57cec5SDimitry Andric  _(DIOCKLABEL, READ, sizeof(int));
9680b57cec5SDimitry Andric  _(DIOCWLABEL, READ, sizeof(int));
9690b57cec5SDimitry Andric  _(DIOCSBAD, READ, struct_dkbad_sz);
9700b57cec5SDimitry Andric  _(DIOCEJECT, READ, sizeof(int));
9710b57cec5SDimitry Andric  _(ODIOCEJECT, NONE, 0);
9720b57cec5SDimitry Andric  _(DIOCLOCK, READ, sizeof(int));
9730b57cec5SDimitry Andric  _(DIOCGDEFLABEL, WRITE, struct_disklabel_sz);
9740b57cec5SDimitry Andric  _(DIOCCLRLABEL, NONE, 0);
9750b57cec5SDimitry Andric  _(DIOCGCACHE, WRITE, sizeof(int));
9760b57cec5SDimitry Andric  _(DIOCSCACHE, READ, sizeof(int));
9770b57cec5SDimitry Andric  _(DIOCCACHESYNC, READ, sizeof(int));
9780b57cec5SDimitry Andric  _(DIOCBSLIST, READWRITE, struct_disk_badsecinfo_sz);
9790b57cec5SDimitry Andric  _(DIOCBSFLUSH, NONE, 0);
9800b57cec5SDimitry Andric  _(DIOCAWEDGE, READWRITE, struct_dkwedge_info_sz);
9810b57cec5SDimitry Andric  _(DIOCGWEDGEINFO, WRITE, struct_dkwedge_info_sz);
9820b57cec5SDimitry Andric  _(DIOCDWEDGE, READ, struct_dkwedge_info_sz);
9830b57cec5SDimitry Andric  _(DIOCLWEDGES, READWRITE, struct_dkwedge_list_sz);
9840b57cec5SDimitry Andric  _(DIOCGSTRATEGY, WRITE, struct_disk_strategy_sz);
9850b57cec5SDimitry Andric  _(DIOCSSTRATEGY, READ, struct_disk_strategy_sz);
9860b57cec5SDimitry Andric  _(DIOCGDISKINFO, WRITE, struct_plistref_sz);
9870b57cec5SDimitry Andric  _(DIOCTUR, WRITE, sizeof(int));
9880b57cec5SDimitry Andric  _(DIOCMWEDGES, WRITE, sizeof(int));
9890b57cec5SDimitry Andric  _(DIOCGSECTORSIZE, WRITE, sizeof(unsigned int));
9900b57cec5SDimitry Andric  _(DIOCGMEDIASIZE, WRITE, sizeof(uptr));
9910b57cec5SDimitry Andric  _(DIOCRMWEDGES, WRITE, sizeof(int));
9920b57cec5SDimitry Andric  /* Entries from file: sys/drvctlio.h */
9930b57cec5SDimitry Andric  _(DRVDETACHDEV, READ, struct_devdetachargs_sz);
9940b57cec5SDimitry Andric  _(DRVRESCANBUS, READ, struct_devrescanargs_sz);
9950b57cec5SDimitry Andric  _(DRVCTLCOMMAND, READWRITE, struct_plistref_sz);
9960b57cec5SDimitry Andric  _(DRVRESUMEDEV, READ, struct_devpmargs_sz);
9970b57cec5SDimitry Andric  _(DRVLISTDEV, READWRITE, struct_devlistargs_sz);
9980b57cec5SDimitry Andric  _(DRVGETEVENT, WRITE, struct_plistref_sz);
9990b57cec5SDimitry Andric  _(DRVSUSPENDDEV, READ, struct_devpmargs_sz);
10000b57cec5SDimitry Andric  /* Entries from file: sys/dvdio.h */
10010b57cec5SDimitry Andric  _(DVD_READ_STRUCT, READWRITE, union_dvd_struct_sz);
10020b57cec5SDimitry Andric  _(DVD_WRITE_STRUCT, READWRITE, union_dvd_struct_sz);
10030b57cec5SDimitry Andric  _(DVD_AUTH, READWRITE, union_dvd_authinfo_sz);
10040b57cec5SDimitry Andric  /* Entries from file: sys/envsys.h */
10050b57cec5SDimitry Andric  _(ENVSYS_GETDICTIONARY, READWRITE, struct_plistref_sz);
10060b57cec5SDimitry Andric  _(ENVSYS_SETDICTIONARY, READWRITE, struct_plistref_sz);
10070b57cec5SDimitry Andric  _(ENVSYS_REMOVEPROPS, READWRITE, struct_plistref_sz);
10080b57cec5SDimitry Andric  _(ENVSYS_GTREDATA, READWRITE, struct_envsys_tre_data_sz);
10090b57cec5SDimitry Andric  _(ENVSYS_GTREINFO, READWRITE, struct_envsys_basic_info_sz);
10100b57cec5SDimitry Andric  /* Entries from file: sys/event.h */
10110b57cec5SDimitry Andric  _(KFILTER_BYFILTER, READWRITE, struct_kfilter_mapping_sz);
10120b57cec5SDimitry Andric  _(KFILTER_BYNAME, READWRITE, struct_kfilter_mapping_sz);
10130b57cec5SDimitry Andric  /* Entries from file: sys/fdio.h */
10140b57cec5SDimitry Andric  _(FDIOCGETOPTS, WRITE, 0);
10150b57cec5SDimitry Andric  _(FDIOCSETOPTS, READ, sizeof(int));
10160b57cec5SDimitry Andric  _(FDIOCSETFORMAT, READ, struct_fdformat_parms_sz);
10170b57cec5SDimitry Andric  _(FDIOCGETFORMAT, WRITE, struct_fdformat_parms_sz);
10180b57cec5SDimitry Andric  _(FDIOCFORMAT_TRACK, READ, struct_fdformat_cmd_sz);
10190b57cec5SDimitry Andric  /* Entries from file: sys/filio.h */
10200b57cec5SDimitry Andric  _(FIOCLEX, NONE, 0);
10210b57cec5SDimitry Andric  _(FIONCLEX, NONE, 0);
10220b57cec5SDimitry Andric  _(FIOSEEKDATA, READWRITE, sizeof(uptr));
10230b57cec5SDimitry Andric  _(FIOSEEKHOLE, READWRITE, sizeof(uptr));
10240b57cec5SDimitry Andric  _(FIONREAD, WRITE, sizeof(int));
10250b57cec5SDimitry Andric  _(FIONBIO, READ, sizeof(int));
10260b57cec5SDimitry Andric  _(FIOASYNC, READ, sizeof(int));
10270b57cec5SDimitry Andric  _(FIOSETOWN, READ, sizeof(int));
10280b57cec5SDimitry Andric  _(FIOGETOWN, WRITE, sizeof(int));
10290b57cec5SDimitry Andric  _(OFIOGETBMAP, READWRITE, sizeof(u32));
10300b57cec5SDimitry Andric  _(FIOGETBMAP, READWRITE, sizeof(u64));
10310b57cec5SDimitry Andric  _(FIONWRITE, WRITE, sizeof(int));
10320b57cec5SDimitry Andric  _(FIONSPACE, WRITE, sizeof(int));
10330b57cec5SDimitry Andric  /* Entries from file: sys/gpio.h */
10340b57cec5SDimitry Andric  _(GPIOINFO, WRITE, struct_gpio_info_sz);
10350b57cec5SDimitry Andric  _(GPIOSET, READWRITE, struct_gpio_set_sz);
10360b57cec5SDimitry Andric  _(GPIOUNSET, READWRITE, struct_gpio_set_sz);
10370b57cec5SDimitry Andric  _(GPIOREAD, READWRITE, struct_gpio_req_sz);
10380b57cec5SDimitry Andric  _(GPIOWRITE, READWRITE, struct_gpio_req_sz);
10390b57cec5SDimitry Andric  _(GPIOTOGGLE, READWRITE, struct_gpio_req_sz);
10400b57cec5SDimitry Andric  _(GPIOATTACH, READWRITE, struct_gpio_attach_sz);
10410b57cec5SDimitry Andric  /* Entries from file: sys/ioctl.h */
10420b57cec5SDimitry Andric  _(PTIOCNETBSD, READ, struct_ioctl_pt_sz);
10430b57cec5SDimitry Andric  _(PTIOCSUNOS, READ, struct_ioctl_pt_sz);
10440b57cec5SDimitry Andric  _(PTIOCLINUX, READ, struct_ioctl_pt_sz);
10450b57cec5SDimitry Andric  _(PTIOCFREEBSD, READ, struct_ioctl_pt_sz);
10460b57cec5SDimitry Andric  _(PTIOCULTRIX, READ, struct_ioctl_pt_sz);
10470b57cec5SDimitry Andric  /* Entries from file: sys/ioctl_compat.h */
10480b57cec5SDimitry Andric  _(TIOCHPCL, NONE, 0);
10490b57cec5SDimitry Andric  _(TIOCGETP, WRITE, struct_sgttyb_sz);
10500b57cec5SDimitry Andric  _(TIOCSETP, READ, struct_sgttyb_sz);
10510b57cec5SDimitry Andric  _(TIOCSETN, READ, 0);
10520b57cec5SDimitry Andric  _(TIOCSETC, READ, struct_tchars_sz);
10530b57cec5SDimitry Andric  _(TIOCGETC, WRITE, struct_tchars_sz);
10540b57cec5SDimitry Andric  _(TIOCLBIS, READ, sizeof(int));
10550b57cec5SDimitry Andric  _(TIOCLBIC, READ, sizeof(int));
10560b57cec5SDimitry Andric  _(TIOCLSET, READ, sizeof(int));
10570b57cec5SDimitry Andric  _(TIOCLGET, WRITE, sizeof(int));
10580b57cec5SDimitry Andric  _(TIOCSLTC, READ, struct_ltchars_sz);
10590b57cec5SDimitry Andric  _(TIOCGLTC, WRITE, struct_ltchars_sz);
10600b57cec5SDimitry Andric  _(OTIOCCONS, NONE, 0);
10610b57cec5SDimitry Andric  /* Entries from file: sys/joystick.h */
10620b57cec5SDimitry Andric  _(JOY_SETTIMEOUT, READ, sizeof(int));
10630b57cec5SDimitry Andric  _(JOY_GETTIMEOUT, WRITE, sizeof(int));
10640b57cec5SDimitry Andric  _(JOY_SET_X_OFFSET, READ, sizeof(int));
10650b57cec5SDimitry Andric  _(JOY_SET_Y_OFFSET, READ, sizeof(int));
10660b57cec5SDimitry Andric  _(JOY_GET_Y_OFFSET, WRITE, sizeof(int));
10670b57cec5SDimitry Andric  /* Entries from file: sys/ksyms.h */
10680b57cec5SDimitry Andric  _(OKIOCGSYMBOL, READ, struct_ksyms_ogsymbol_sz);
10690b57cec5SDimitry Andric  _(OKIOCGVALUE, READ, struct_ksyms_ogsymbol_sz);
10700b57cec5SDimitry Andric  _(KIOCGSIZE, WRITE, sizeof(int));
10710b57cec5SDimitry Andric  _(KIOCGVALUE, READWRITE, struct_ksyms_gvalue_sz);
10720b57cec5SDimitry Andric  _(KIOCGSYMBOL, READWRITE, struct_ksyms_gsymbol_sz);
10730b57cec5SDimitry Andric  /* Entries from file: sys/lua.h */
10740b57cec5SDimitry Andric  _(LUAINFO, READWRITE, struct_lua_info_sz);
10750b57cec5SDimitry Andric  _(LUACREATE, READWRITE, struct_lua_create_sz);
10760b57cec5SDimitry Andric  _(LUADESTROY, READWRITE, struct_lua_create_sz);
10770b57cec5SDimitry Andric  _(LUAREQUIRE, READWRITE, struct_lua_require_sz);
10780b57cec5SDimitry Andric  _(LUALOAD, READWRITE, struct_lua_load_sz);
10790b57cec5SDimitry Andric  /* Entries from file: sys/midiio.h */
10800b57cec5SDimitry Andric  _(MIDI_PRETIME, READWRITE, sizeof(int));
10810b57cec5SDimitry Andric  _(MIDI_MPUMODE, READWRITE, sizeof(int));
10820b57cec5SDimitry Andric  _(MIDI_MPUCMD, READWRITE, struct_mpu_command_rec_sz);
10830b57cec5SDimitry Andric  _(SEQUENCER_RESET, NONE, 0);
10840b57cec5SDimitry Andric  _(SEQUENCER_SYNC, NONE, 0);
10850b57cec5SDimitry Andric  _(SEQUENCER_INFO, READWRITE, struct_synth_info_sz);
10860b57cec5SDimitry Andric  _(SEQUENCER_CTRLRATE, READWRITE, sizeof(int));
10870b57cec5SDimitry Andric  _(SEQUENCER_GETOUTCOUNT, WRITE, sizeof(int));
10880b57cec5SDimitry Andric  _(SEQUENCER_GETINCOUNT, WRITE, sizeof(int));
10890b57cec5SDimitry Andric  _(SEQUENCER_RESETSAMPLES, READ, sizeof(int));
10900b57cec5SDimitry Andric  _(SEQUENCER_NRSYNTHS, WRITE, sizeof(int));
10910b57cec5SDimitry Andric  _(SEQUENCER_NRMIDIS, WRITE, sizeof(int));
10920b57cec5SDimitry Andric  _(SEQUENCER_THRESHOLD, READ, sizeof(int));
10930b57cec5SDimitry Andric  _(SEQUENCER_MEMAVL, READWRITE, sizeof(int));
10940b57cec5SDimitry Andric  _(SEQUENCER_PANIC, NONE, 0);
10950b57cec5SDimitry Andric  _(SEQUENCER_OUTOFBAND, READ, struct_seq_event_rec_sz);
10960b57cec5SDimitry Andric  _(SEQUENCER_GETTIME, WRITE, sizeof(int));
10970b57cec5SDimitry Andric  _(SEQUENCER_TMR_TIMEBASE, READWRITE, sizeof(int));
10980b57cec5SDimitry Andric  _(SEQUENCER_TMR_START, NONE, 0);
10990b57cec5SDimitry Andric  _(SEQUENCER_TMR_STOP, NONE, 0);
11000b57cec5SDimitry Andric  _(SEQUENCER_TMR_CONTINUE, NONE, 0);
11010b57cec5SDimitry Andric  _(SEQUENCER_TMR_TEMPO, READWRITE, sizeof(int));
11020b57cec5SDimitry Andric  _(SEQUENCER_TMR_SOURCE, READWRITE, sizeof(int));
11030b57cec5SDimitry Andric  _(SEQUENCER_TMR_METRONOME, READ, sizeof(int));
11040b57cec5SDimitry Andric  _(SEQUENCER_TMR_SELECT, READ, sizeof(int));
11050b57cec5SDimitry Andric  /* Entries from file: sys/mtio.h */
11060b57cec5SDimitry Andric  _(MTIOCTOP, READ, struct_mtop_sz);
11070b57cec5SDimitry Andric  _(MTIOCGET, WRITE, struct_mtget_sz);
11080b57cec5SDimitry Andric  _(MTIOCIEOT, NONE, 0);
11090b57cec5SDimitry Andric  _(MTIOCEEOT, NONE, 0);
11100b57cec5SDimitry Andric  _(MTIOCRDSPOS, WRITE, sizeof(u32));
11110b57cec5SDimitry Andric  _(MTIOCRDHPOS, WRITE, sizeof(u32));
11120b57cec5SDimitry Andric  _(MTIOCSLOCATE, READ, sizeof(u32));
11130b57cec5SDimitry Andric  _(MTIOCHLOCATE, READ, sizeof(u32));
11140b57cec5SDimitry Andric  /* Entries from file: sys/power.h */
11150b57cec5SDimitry Andric  _(POWER_EVENT_RECVDICT, READWRITE, struct_plistref_sz);
11160b57cec5SDimitry Andric  _(POWER_IOC_GET_TYPE, WRITE, struct_power_type_sz);
11170b57cec5SDimitry Andric  /* Entries from file: sys/radioio.h */
11180b57cec5SDimitry Andric  _(RIOCGINFO, WRITE, struct_radio_info_sz);
11190b57cec5SDimitry Andric  _(RIOCSINFO, READWRITE, struct_radio_info_sz);
11200b57cec5SDimitry Andric  _(RIOCSSRCH, READ, sizeof(int));
11210b57cec5SDimitry Andric  /* Entries from file: sys/rndio.h */
11220b57cec5SDimitry Andric  _(RNDGETENTCNT, WRITE, sizeof(u32));
11230b57cec5SDimitry Andric  _(RNDGETSRCNUM, READWRITE, struct_rndstat_sz);
11240b57cec5SDimitry Andric  _(RNDGETSRCNAME, READWRITE, struct_rndstat_name_sz);
11250b57cec5SDimitry Andric  _(RNDCTL, READ, struct_rndctl_sz);
11260b57cec5SDimitry Andric  _(RNDADDDATA, READ, struct_rnddata_sz);
11270b57cec5SDimitry Andric  _(RNDGETPOOLSTAT, WRITE, struct_rndpoolstat_sz);
11280b57cec5SDimitry Andric  _(RNDGETESTNUM, READWRITE, struct_rndstat_est_sz);
11290b57cec5SDimitry Andric  _(RNDGETESTNAME, READWRITE, struct_rndstat_est_name_sz);
11300b57cec5SDimitry Andric  /* Entries from file: sys/scanio.h */
11310b57cec5SDimitry Andric  _(SCIOCGET, WRITE, struct_scan_io_sz);
11320b57cec5SDimitry Andric  _(SCIOCSET, READ, struct_scan_io_sz);
11330b57cec5SDimitry Andric  _(SCIOCRESTART, NONE, 0);
11340b57cec5SDimitry Andric  /* Entries from file: sys/scsiio.h */
11350b57cec5SDimitry Andric  _(SCIOCCOMMAND, READWRITE, struct_scsireq_sz);
11360b57cec5SDimitry Andric  _(SCIOCDEBUG, READ, sizeof(int));
11370b57cec5SDimitry Andric  _(SCIOCIDENTIFY, WRITE, struct_scsi_addr_sz);
11380b57cec5SDimitry Andric  _(OSCIOCIDENTIFY, WRITE, struct_oscsi_addr_sz);
11390b57cec5SDimitry Andric  _(SCIOCDECONFIG, NONE, 0);
11400b57cec5SDimitry Andric  _(SCIOCRECONFIG, NONE, 0);
11410b57cec5SDimitry Andric  _(SCIOCRESET, NONE, 0);
11420b57cec5SDimitry Andric  _(SCBUSIOSCAN, READ, struct_scbusioscan_args_sz);
11430b57cec5SDimitry Andric  _(SCBUSIORESET, NONE, 0);
11440b57cec5SDimitry Andric  _(SCBUSIODETACH, READ, struct_scbusiodetach_args_sz);
11450b57cec5SDimitry Andric  _(SCBUSACCEL, READ, struct_scbusaccel_args_sz);
11460b57cec5SDimitry Andric  /* Entries from file: sys/sockio.h */
11470b57cec5SDimitry Andric  _(SIOCSHIWAT, READ, sizeof(int));
11480b57cec5SDimitry Andric  _(SIOCGHIWAT, WRITE, sizeof(int));
11490b57cec5SDimitry Andric  _(SIOCSLOWAT, READ, sizeof(int));
11500b57cec5SDimitry Andric  _(SIOCGLOWAT, WRITE, sizeof(int));
11510b57cec5SDimitry Andric  _(SIOCATMARK, WRITE, sizeof(int));
11520b57cec5SDimitry Andric  _(SIOCSPGRP, READ, sizeof(int));
11530b57cec5SDimitry Andric  _(SIOCGPGRP, WRITE, sizeof(int));
11540b57cec5SDimitry Andric  _(SIOCPEELOFF, READWRITE, sizeof(int));
11550b57cec5SDimitry Andric  _(SIOCADDRT, READ, struct_ortentry_sz);
11560b57cec5SDimitry Andric  _(SIOCDELRT, READ, struct_ortentry_sz);
11570b57cec5SDimitry Andric  _(SIOCSIFADDR, READ, struct_ifreq_sz);
11580b57cec5SDimitry Andric  _(SIOCGIFADDR, READWRITE, struct_ifreq_sz);
11590b57cec5SDimitry Andric  _(SIOCSIFDSTADDR, READ, struct_ifreq_sz);
11600b57cec5SDimitry Andric  _(SIOCGIFDSTADDR, READWRITE, struct_ifreq_sz);
11610b57cec5SDimitry Andric  _(SIOCSIFFLAGS, READ, struct_ifreq_sz);
11620b57cec5SDimitry Andric  _(SIOCGIFFLAGS, READWRITE, struct_ifreq_sz);
11630b57cec5SDimitry Andric  _(SIOCGIFBRDADDR, READWRITE, struct_ifreq_sz);
11640b57cec5SDimitry Andric  _(SIOCSIFBRDADDR, READ, struct_ifreq_sz);
11650b57cec5SDimitry Andric  _(SIOCGIFCONF, READWRITE, struct_ifconf_sz);
11660b57cec5SDimitry Andric  _(SIOCGIFNETMASK, READWRITE, struct_ifreq_sz);
11670b57cec5SDimitry Andric  _(SIOCSIFNETMASK, READ, struct_ifreq_sz);
11680b57cec5SDimitry Andric  _(SIOCGIFMETRIC, READWRITE, struct_ifreq_sz);
11690b57cec5SDimitry Andric  _(SIOCSIFMETRIC, READ, struct_ifreq_sz);
11700b57cec5SDimitry Andric  _(SIOCDIFADDR, READ, struct_ifreq_sz);
11710b57cec5SDimitry Andric  _(SIOCAIFADDR, READ, struct_ifaliasreq_sz);
11720b57cec5SDimitry Andric  _(SIOCGIFALIAS, READWRITE, struct_ifaliasreq_sz);
11730b57cec5SDimitry Andric  _(SIOCGIFAFLAG_IN, READWRITE, struct_ifreq_sz);
11740b57cec5SDimitry Andric  _(SIOCALIFADDR, READ, struct_if_laddrreq_sz);
11750b57cec5SDimitry Andric  _(SIOCGLIFADDR, READWRITE, struct_if_laddrreq_sz);
11760b57cec5SDimitry Andric  _(SIOCDLIFADDR, READ, struct_if_laddrreq_sz);
11770b57cec5SDimitry Andric  _(SIOCSIFADDRPREF, READ, struct_if_addrprefreq_sz);
11780b57cec5SDimitry Andric  _(SIOCGIFADDRPREF, READWRITE, struct_if_addrprefreq_sz);
11790b57cec5SDimitry Andric  _(SIOCADDMULTI, READ, struct_ifreq_sz);
11800b57cec5SDimitry Andric  _(SIOCDELMULTI, READ, struct_ifreq_sz);
11810b57cec5SDimitry Andric  _(SIOCGETVIFCNT, READWRITE, struct_sioc_vif_req_sz);
11820b57cec5SDimitry Andric  _(SIOCGETSGCNT, READWRITE, struct_sioc_sg_req_sz);
11830b57cec5SDimitry Andric  _(SIOCSIFMEDIA, READWRITE, struct_ifreq_sz);
11840b57cec5SDimitry Andric  _(SIOCGIFMEDIA, READWRITE, struct_ifmediareq_sz);
11850b57cec5SDimitry Andric  _(SIOCSIFGENERIC, READ, struct_ifreq_sz);
11860b57cec5SDimitry Andric  _(SIOCGIFGENERIC, READWRITE, struct_ifreq_sz);
11870b57cec5SDimitry Andric  _(SIOCSIFPHYADDR, READ, struct_ifaliasreq_sz);
11880b57cec5SDimitry Andric  _(SIOCGIFPSRCADDR, READWRITE, struct_ifreq_sz);
11890b57cec5SDimitry Andric  _(SIOCGIFPDSTADDR, READWRITE, struct_ifreq_sz);
11900b57cec5SDimitry Andric  _(SIOCDIFPHYADDR, READ, struct_ifreq_sz);
11910b57cec5SDimitry Andric  _(SIOCSLIFPHYADDR, READ, struct_if_laddrreq_sz);
11920b57cec5SDimitry Andric  _(SIOCGLIFPHYADDR, READWRITE, struct_if_laddrreq_sz);
11930b57cec5SDimitry Andric  _(SIOCSIFMTU, READ, struct_ifreq_sz);
11940b57cec5SDimitry Andric  _(SIOCGIFMTU, READWRITE, struct_ifreq_sz);
11950b57cec5SDimitry Andric  _(SIOCSDRVSPEC, READ, struct_ifdrv_sz);
11960b57cec5SDimitry Andric  _(SIOCGDRVSPEC, READWRITE, struct_ifdrv_sz);
11970b57cec5SDimitry Andric  _(SIOCIFCREATE, READ, struct_ifreq_sz);
11980b57cec5SDimitry Andric  _(SIOCIFDESTROY, READ, struct_ifreq_sz);
11990b57cec5SDimitry Andric  _(SIOCIFGCLONERS, READWRITE, struct_if_clonereq_sz);
12000b57cec5SDimitry Andric  _(SIOCGIFDLT, READWRITE, struct_ifreq_sz);
12010b57cec5SDimitry Andric  _(SIOCGIFCAP, READWRITE, struct_ifcapreq_sz);
12020b57cec5SDimitry Andric  _(SIOCSIFCAP, READ, struct_ifcapreq_sz);
12030b57cec5SDimitry Andric  _(SIOCSVH, READWRITE, struct_ifreq_sz);
12040b57cec5SDimitry Andric  _(SIOCGVH, READWRITE, struct_ifreq_sz);
12050b57cec5SDimitry Andric  _(SIOCINITIFADDR, READWRITE, struct_ifaddr_sz);
12060b57cec5SDimitry Andric  _(SIOCGIFDATA, READWRITE, struct_ifdatareq_sz);
12070b57cec5SDimitry Andric  _(SIOCZIFDATA, READWRITE, struct_ifdatareq_sz);
12080b57cec5SDimitry Andric  _(SIOCGLINKSTR, READWRITE, struct_ifdrv_sz);
12090b57cec5SDimitry Andric  _(SIOCSLINKSTR, READ, struct_ifdrv_sz);
12100b57cec5SDimitry Andric  _(SIOCGETHERCAP, READWRITE, struct_eccapreq_sz);
12110b57cec5SDimitry Andric  _(SIOCGIFINDEX, READWRITE, struct_ifreq_sz);
12120b57cec5SDimitry Andric  _(SIOCSETHERCAP, READ, struct_eccapreq_sz);
12130b57cec5SDimitry Andric  _(SIOCSIFDESCR, READ, struct_ifreq_sz);
12140b57cec5SDimitry Andric  _(SIOCGIFDESCR, READWRITE, struct_ifreq_sz);
12150b57cec5SDimitry Andric  _(SIOCGUMBINFO, READWRITE, struct_ifreq_sz);
12160b57cec5SDimitry Andric  _(SIOCSUMBPARAM, READ, struct_ifreq_sz);
12170b57cec5SDimitry Andric  _(SIOCGUMBPARAM, READWRITE, struct_ifreq_sz);
12180b57cec5SDimitry Andric  _(SIOCSETPFSYNC, READ, struct_ifreq_sz);
12190b57cec5SDimitry Andric  _(SIOCGETPFSYNC, READWRITE, struct_ifreq_sz);
12200b57cec5SDimitry Andric  /* Entries from file: sys/timepps.h */
12210b57cec5SDimitry Andric  _(PPS_IOC_CREATE, NONE, 0);
12220b57cec5SDimitry Andric  _(PPS_IOC_DESTROY, NONE, 0);
12230b57cec5SDimitry Andric  _(PPS_IOC_SETPARAMS, READ, struct_pps_params_sz);
12240b57cec5SDimitry Andric  _(PPS_IOC_GETPARAMS, WRITE, struct_pps_params_sz);
12250b57cec5SDimitry Andric  _(PPS_IOC_GETCAP, WRITE, sizeof(int));
12260b57cec5SDimitry Andric  _(PPS_IOC_FETCH, READWRITE, struct_pps_info_sz);
12270b57cec5SDimitry Andric  _(PPS_IOC_KCBIND, READ, sizeof(int));
12280b57cec5SDimitry Andric  /* Entries from file: sys/ttycom.h */
12290b57cec5SDimitry Andric  _(TIOCEXCL, NONE, 0);
12300b57cec5SDimitry Andric  _(TIOCNXCL, NONE, 0);
12310b57cec5SDimitry Andric  _(TIOCFLUSH, READ, sizeof(int));
12320b57cec5SDimitry Andric  _(TIOCGETA, WRITE, struct_termios_sz);
12330b57cec5SDimitry Andric  _(TIOCSETA, READ, struct_termios_sz);
12340b57cec5SDimitry Andric  _(TIOCSETAW, READ, 0);
12350b57cec5SDimitry Andric  _(TIOCSETAF, READ, 0);
12360b57cec5SDimitry Andric  _(TIOCGETD, WRITE, sizeof(int));
12370b57cec5SDimitry Andric  _(TIOCSETD, READ, sizeof(int));
12380b57cec5SDimitry Andric  _(TIOCGLINED, WRITE, (32 * sizeof(char)));
12390b57cec5SDimitry Andric  _(TIOCSLINED, READ, (32 * sizeof(char)));
12400b57cec5SDimitry Andric  _(TIOCSBRK, NONE, 0);
12410b57cec5SDimitry Andric  _(TIOCCBRK, NONE, 0);
12420b57cec5SDimitry Andric  _(TIOCSDTR, NONE, 0);
12430b57cec5SDimitry Andric  _(TIOCCDTR, NONE, 0);
12440b57cec5SDimitry Andric  _(TIOCGPGRP, WRITE, sizeof(int));
12450b57cec5SDimitry Andric  _(TIOCSPGRP, READ, sizeof(int));
12460b57cec5SDimitry Andric  _(TIOCOUTQ, WRITE, sizeof(int));
12470b57cec5SDimitry Andric  _(TIOCSTI, READ, sizeof(char));
12480b57cec5SDimitry Andric  _(TIOCNOTTY, NONE, 0);
12490b57cec5SDimitry Andric  _(TIOCPKT, READ, sizeof(int));
12500b57cec5SDimitry Andric  _(TIOCSTOP, NONE, 0);
12510b57cec5SDimitry Andric  _(TIOCSTART, NONE, 0);
12520b57cec5SDimitry Andric  _(TIOCMSET, READ, sizeof(int));
12530b57cec5SDimitry Andric  _(TIOCMBIS, READ, sizeof(int));
12540b57cec5SDimitry Andric  _(TIOCMBIC, READ, sizeof(int));
12550b57cec5SDimitry Andric  _(TIOCMGET, WRITE, sizeof(int));
12560b57cec5SDimitry Andric  _(TIOCREMOTE, READ, sizeof(int));
12570b57cec5SDimitry Andric  _(TIOCGWINSZ, WRITE, struct_winsize_sz);
12580b57cec5SDimitry Andric  _(TIOCSWINSZ, READ, struct_winsize_sz);
12590b57cec5SDimitry Andric  _(TIOCUCNTL, READ, sizeof(int));
12600b57cec5SDimitry Andric  _(TIOCSTAT, READ, sizeof(int));
12610b57cec5SDimitry Andric  _(TIOCGSID, WRITE, sizeof(int));
12620b57cec5SDimitry Andric  _(TIOCCONS, READ, sizeof(int));
12630b57cec5SDimitry Andric  _(TIOCSCTTY, NONE, 0);
12640b57cec5SDimitry Andric  _(TIOCEXT, READ, sizeof(int));
12650b57cec5SDimitry Andric  _(TIOCSIG, NONE, 0);
12660b57cec5SDimitry Andric  _(TIOCDRAIN, NONE, 0);
12670b57cec5SDimitry Andric  _(TIOCGFLAGS, WRITE, sizeof(int));
12680b57cec5SDimitry Andric  _(TIOCSFLAGS, READ, sizeof(int));
12690b57cec5SDimitry Andric  _(TIOCDCDTIMESTAMP, WRITE, struct_timeval_sz);
12700b57cec5SDimitry Andric  _(TIOCPTMGET, WRITE, struct_ptmget_sz);
12710b57cec5SDimitry Andric  _(TIOCGRANTPT, NONE, 0);
12720b57cec5SDimitry Andric  _(TIOCPTSNAME, WRITE, struct_ptmget_sz);
12730b57cec5SDimitry Andric  _(TIOCSQSIZE, READ, sizeof(int));
12740b57cec5SDimitry Andric  _(TIOCGQSIZE, WRITE, sizeof(int));
12750b57cec5SDimitry Andric  /* Entries from file: sys/verified_exec.h */
12760b57cec5SDimitry Andric  _(VERIEXEC_LOAD, READ, struct_plistref_sz);
12770b57cec5SDimitry Andric  _(VERIEXEC_TABLESIZE, READ, struct_plistref_sz);
12780b57cec5SDimitry Andric  _(VERIEXEC_DELETE, READ, struct_plistref_sz);
12790b57cec5SDimitry Andric  _(VERIEXEC_QUERY, READWRITE, struct_plistref_sz);
12800b57cec5SDimitry Andric  _(VERIEXEC_DUMP, WRITE, struct_plistref_sz);
12810b57cec5SDimitry Andric  _(VERIEXEC_FLUSH, NONE, 0);
12820b57cec5SDimitry Andric  /* Entries from file: sys/videoio.h */
12830b57cec5SDimitry Andric  _(VIDIOC_QUERYCAP, WRITE, struct_v4l2_capability_sz);
12840b57cec5SDimitry Andric  _(VIDIOC_RESERVED, NONE, 0);
12850b57cec5SDimitry Andric  _(VIDIOC_ENUM_FMT, READWRITE, struct_v4l2_fmtdesc_sz);
12860b57cec5SDimitry Andric  _(VIDIOC_G_FMT, READWRITE, struct_v4l2_format_sz);
12870b57cec5SDimitry Andric  _(VIDIOC_S_FMT, READWRITE, struct_v4l2_format_sz);
12880b57cec5SDimitry Andric  _(VIDIOC_REQBUFS, READWRITE, struct_v4l2_requestbuffers_sz);
12890b57cec5SDimitry Andric  _(VIDIOC_QUERYBUF, READWRITE, struct_v4l2_buffer_sz);
12900b57cec5SDimitry Andric  _(VIDIOC_G_FBUF, WRITE, struct_v4l2_framebuffer_sz);
12910b57cec5SDimitry Andric  _(VIDIOC_S_FBUF, READ, struct_v4l2_framebuffer_sz);
12920b57cec5SDimitry Andric  _(VIDIOC_OVERLAY, READ, sizeof(int));
12930b57cec5SDimitry Andric  _(VIDIOC_QBUF, READWRITE, struct_v4l2_buffer_sz);
12940b57cec5SDimitry Andric  _(VIDIOC_DQBUF, READWRITE, struct_v4l2_buffer_sz);
12950b57cec5SDimitry Andric  _(VIDIOC_STREAMON, READ, sizeof(int));
12960b57cec5SDimitry Andric  _(VIDIOC_STREAMOFF, READ, sizeof(int));
12970b57cec5SDimitry Andric  _(VIDIOC_G_PARM, READWRITE, struct_v4l2_streamparm_sz);
12980b57cec5SDimitry Andric  _(VIDIOC_S_PARM, READWRITE, struct_v4l2_streamparm_sz);
12990b57cec5SDimitry Andric  _(VIDIOC_G_STD, WRITE, sizeof(u64));
13000b57cec5SDimitry Andric  _(VIDIOC_S_STD, READ, sizeof(u64));
13010b57cec5SDimitry Andric  _(VIDIOC_ENUMSTD, READWRITE, struct_v4l2_standard_sz);
13020b57cec5SDimitry Andric  _(VIDIOC_ENUMINPUT, READWRITE, struct_v4l2_input_sz);
13030b57cec5SDimitry Andric  _(VIDIOC_G_CTRL, READWRITE, struct_v4l2_control_sz);
13040b57cec5SDimitry Andric  _(VIDIOC_S_CTRL, READWRITE, struct_v4l2_control_sz);
13050b57cec5SDimitry Andric  _(VIDIOC_G_TUNER, READWRITE, struct_v4l2_tuner_sz);
13060b57cec5SDimitry Andric  _(VIDIOC_S_TUNER, READ, struct_v4l2_tuner_sz);
13070b57cec5SDimitry Andric  _(VIDIOC_G_AUDIO, WRITE, struct_v4l2_audio_sz);
13080b57cec5SDimitry Andric  _(VIDIOC_S_AUDIO, READ, struct_v4l2_audio_sz);
13090b57cec5SDimitry Andric  _(VIDIOC_QUERYCTRL, READWRITE, struct_v4l2_queryctrl_sz);
13100b57cec5SDimitry Andric  _(VIDIOC_QUERYMENU, READWRITE, struct_v4l2_querymenu_sz);
13110b57cec5SDimitry Andric  _(VIDIOC_G_INPUT, WRITE, sizeof(int));
13120b57cec5SDimitry Andric  _(VIDIOC_S_INPUT, READWRITE, sizeof(int));
13130b57cec5SDimitry Andric  _(VIDIOC_G_OUTPUT, WRITE, sizeof(int));
13140b57cec5SDimitry Andric  _(VIDIOC_S_OUTPUT, READWRITE, sizeof(int));
13150b57cec5SDimitry Andric  _(VIDIOC_ENUMOUTPUT, READWRITE, struct_v4l2_output_sz);
13160b57cec5SDimitry Andric  _(VIDIOC_G_AUDOUT, WRITE, struct_v4l2_audioout_sz);
13170b57cec5SDimitry Andric  _(VIDIOC_S_AUDOUT, READ, struct_v4l2_audioout_sz);
13180b57cec5SDimitry Andric  _(VIDIOC_G_MODULATOR, READWRITE, struct_v4l2_modulator_sz);
13190b57cec5SDimitry Andric  _(VIDIOC_S_MODULATOR, READ, struct_v4l2_modulator_sz);
13200b57cec5SDimitry Andric  _(VIDIOC_G_FREQUENCY, READWRITE, struct_v4l2_frequency_sz);
13210b57cec5SDimitry Andric  _(VIDIOC_S_FREQUENCY, READ, struct_v4l2_frequency_sz);
13220b57cec5SDimitry Andric  _(VIDIOC_CROPCAP, READWRITE, struct_v4l2_cropcap_sz);
13230b57cec5SDimitry Andric  _(VIDIOC_G_CROP, READWRITE, struct_v4l2_crop_sz);
13240b57cec5SDimitry Andric  _(VIDIOC_S_CROP, READ, struct_v4l2_crop_sz);
13250b57cec5SDimitry Andric  _(VIDIOC_G_JPEGCOMP, WRITE, struct_v4l2_jpegcompression_sz);
13260b57cec5SDimitry Andric  _(VIDIOC_S_JPEGCOMP, READ, struct_v4l2_jpegcompression_sz);
13270b57cec5SDimitry Andric  _(VIDIOC_QUERYSTD, WRITE, sizeof(u64));
13280b57cec5SDimitry Andric  _(VIDIOC_TRY_FMT, READWRITE, struct_v4l2_format_sz);
13290b57cec5SDimitry Andric  _(VIDIOC_ENUMAUDIO, READWRITE, struct_v4l2_audio_sz);
13300b57cec5SDimitry Andric  _(VIDIOC_ENUMAUDOUT, READWRITE, struct_v4l2_audioout_sz);
13310b57cec5SDimitry Andric  _(VIDIOC_G_PRIORITY, WRITE, enum_v4l2_priority_sz);
13320b57cec5SDimitry Andric  _(VIDIOC_S_PRIORITY, READ, enum_v4l2_priority_sz);
13330b57cec5SDimitry Andric  _(VIDIOC_ENUM_FRAMESIZES, READWRITE, struct_v4l2_frmsizeenum_sz);
13340b57cec5SDimitry Andric  _(VIDIOC_ENUM_FRAMEINTERVALS, READWRITE, struct_v4l2_frmivalenum_sz);
13350b57cec5SDimitry Andric  /* Entries from file: sys/wdog.h */
13360b57cec5SDimitry Andric  _(WDOGIOC_GMODE, READWRITE, struct_wdog_mode_sz);
13370b57cec5SDimitry Andric  _(WDOGIOC_SMODE, READ, struct_wdog_mode_sz);
13380b57cec5SDimitry Andric  _(WDOGIOC_WHICH, WRITE, struct_wdog_mode_sz);
13390b57cec5SDimitry Andric  _(WDOGIOC_TICKLE, NONE, 0);
13400b57cec5SDimitry Andric  _(WDOGIOC_GTICKLER, WRITE, sizeof(int));
13410b57cec5SDimitry Andric  _(WDOGIOC_GWDOGS, READWRITE, struct_wdog_conf_sz);
13420b57cec5SDimitry Andric  /* Entries from file: sys/kcov.h */
13430b57cec5SDimitry Andric  _(KCOV_IOC_SETBUFSIZE, READ, sizeof(u64));
13440b57cec5SDimitry Andric  _(KCOV_IOC_ENABLE, READ, sizeof(int));
13450b57cec5SDimitry Andric  _(KCOV_IOC_DISABLE, NONE, 0);
13460b57cec5SDimitry Andric  /* Entries from file: sys/ipmi.h */
13470b57cec5SDimitry Andric  _(IPMICTL_RECEIVE_MSG_TRUNC, READWRITE, struct_ipmi_recv_sz);
13480b57cec5SDimitry Andric  _(IPMICTL_RECEIVE_MSG, READWRITE, struct_ipmi_recv_sz);
13490b57cec5SDimitry Andric  _(IPMICTL_SEND_COMMAND, READ, struct_ipmi_req_sz);
13500b57cec5SDimitry Andric  _(IPMICTL_REGISTER_FOR_CMD, READ, struct_ipmi_cmdspec_sz);
13510b57cec5SDimitry Andric  _(IPMICTL_UNREGISTER_FOR_CMD, READ, struct_ipmi_cmdspec_sz);
13520b57cec5SDimitry Andric  _(IPMICTL_SET_GETS_EVENTS_CMD, READ, sizeof(int));
13530b57cec5SDimitry Andric  _(IPMICTL_SET_MY_ADDRESS_CMD, READ, sizeof(unsigned int));
13540b57cec5SDimitry Andric  _(IPMICTL_GET_MY_ADDRESS_CMD, WRITE, sizeof(unsigned int));
13550b57cec5SDimitry Andric  _(IPMICTL_SET_MY_LUN_CMD, READ, sizeof(unsigned int));
13560b57cec5SDimitry Andric  _(IPMICTL_GET_MY_LUN_CMD, WRITE, sizeof(unsigned int));
13570b57cec5SDimitry Andric  /* Entries from file: soundcard.h */
13580b57cec5SDimitry Andric  _(SNDCTL_DSP_RESET, NONE, 0);
13590b57cec5SDimitry Andric  _(SNDCTL_DSP_SYNC, NONE, 0);
13600b57cec5SDimitry Andric  _(SNDCTL_DSP_SPEED, READWRITE, sizeof(int));
13610b57cec5SDimitry Andric  _(SOUND_PCM_READ_RATE, WRITE, sizeof(int));
13620b57cec5SDimitry Andric  _(SNDCTL_DSP_STEREO, READWRITE, sizeof(int));
13630b57cec5SDimitry Andric  _(SNDCTL_DSP_GETBLKSIZE, READWRITE, sizeof(int));
13640b57cec5SDimitry Andric  _(SNDCTL_DSP_SETFMT, READWRITE, sizeof(int));
13650b57cec5SDimitry Andric  _(SOUND_PCM_READ_BITS, WRITE, sizeof(int));
13660b57cec5SDimitry Andric  _(SNDCTL_DSP_CHANNELS, READWRITE, sizeof(int));
13670b57cec5SDimitry Andric  _(SOUND_PCM_READ_CHANNELS, WRITE, sizeof(int));
13680b57cec5SDimitry Andric  _(SOUND_PCM_WRITE_FILTER, READWRITE, sizeof(int));
13690b57cec5SDimitry Andric  _(SOUND_PCM_READ_FILTER, WRITE, sizeof(int));
13700b57cec5SDimitry Andric  _(SNDCTL_DSP_POST, NONE, 0);
13710b57cec5SDimitry Andric  _(SNDCTL_DSP_SUBDIVIDE, READWRITE, sizeof(int));
13720b57cec5SDimitry Andric  _(SNDCTL_DSP_SETFRAGMENT, READWRITE, sizeof(int));
13730b57cec5SDimitry Andric  _(SNDCTL_DSP_GETFMTS, WRITE, sizeof(int));
13740b57cec5SDimitry Andric  _(SNDCTL_DSP_GETOSPACE, WRITE, struct_audio_buf_info_sz);
13750b57cec5SDimitry Andric  _(SNDCTL_DSP_GETISPACE, WRITE, struct_audio_buf_info_sz);
13760b57cec5SDimitry Andric  _(SNDCTL_DSP_NONBLOCK, NONE, 0);
13770b57cec5SDimitry Andric  _(SNDCTL_DSP_GETCAPS, WRITE, sizeof(int));
13780b57cec5SDimitry Andric  _(SNDCTL_DSP_GETTRIGGER, WRITE, sizeof(int));
13790b57cec5SDimitry Andric  _(SNDCTL_DSP_SETTRIGGER, READ, sizeof(int));
13800b57cec5SDimitry Andric  _(SNDCTL_DSP_GETIPTR, WRITE, struct_count_info_sz);
13810b57cec5SDimitry Andric  _(SNDCTL_DSP_GETOPTR, WRITE, struct_count_info_sz);
13820b57cec5SDimitry Andric  _(SNDCTL_DSP_MAPINBUF, WRITE, struct_buffmem_desc_sz);
13830b57cec5SDimitry Andric  _(SNDCTL_DSP_MAPOUTBUF, WRITE, struct_buffmem_desc_sz);
13840b57cec5SDimitry Andric  _(SNDCTL_DSP_SETSYNCRO, NONE, 0);
13850b57cec5SDimitry Andric  _(SNDCTL_DSP_SETDUPLEX, NONE, 0);
13860b57cec5SDimitry Andric  _(SNDCTL_DSP_PROFILE, READ, sizeof(int));
13870b57cec5SDimitry Andric  _(SNDCTL_DSP_GETODELAY, WRITE, sizeof(int));
13880b57cec5SDimitry Andric  _(SOUND_MIXER_INFO, WRITE, struct_mixer_info_sz);
13890b57cec5SDimitry Andric  _(SOUND_OLD_MIXER_INFO, WRITE, struct__old_mixer_info_sz);
13900b57cec5SDimitry Andric  _(OSS_GETVERSION, WRITE, sizeof(int));
13910b57cec5SDimitry Andric  _(SNDCTL_SYSINFO, WRITE, struct_oss_sysinfo_sz);
13920b57cec5SDimitry Andric  _(SNDCTL_AUDIOINFO, READWRITE, struct_oss_audioinfo_sz);
13930b57cec5SDimitry Andric  _(SNDCTL_ENGINEINFO, READWRITE, struct_oss_audioinfo_sz);
13940b57cec5SDimitry Andric  _(SNDCTL_DSP_GETPLAYVOL, WRITE, sizeof(unsigned int));
13950b57cec5SDimitry Andric  _(SNDCTL_DSP_SETPLAYVOL, READ, sizeof(unsigned int));
13960b57cec5SDimitry Andric  _(SNDCTL_DSP_GETRECVOL, WRITE, sizeof(unsigned int));
13970b57cec5SDimitry Andric  _(SNDCTL_DSP_SETRECVOL, READ, sizeof(unsigned int));
13980b57cec5SDimitry Andric  _(SNDCTL_DSP_SKIP, NONE, 0);
13990b57cec5SDimitry Andric  _(SNDCTL_DSP_SILENCE, NONE, 0);
1400480093f4SDimitry Andric  /* Entries from file: dev/filemon/filemon.h (compat <= 9.99.26) */
1401480093f4SDimitry Andric  _(FILEMON_SET_FD, READWRITE, sizeof(int));
1402480093f4SDimitry Andric  _(FILEMON_SET_PID, READWRITE, sizeof(int));
14035ffd83dbSDimitry Andric  /* Entries from file: dev/usb/urio.h (compat <= 9.99.43) */
14045ffd83dbSDimitry Andric  _(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz);
14055ffd83dbSDimitry Andric  _(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz);
14060b57cec5SDimitry Andric#undef _
1407349cc55cSDimitry Andric}
14080b57cec5SDimitry Andric
14090b57cec5SDimitry Andricstatic bool ioctl_initialized = false;
14100b57cec5SDimitry Andric
14110b57cec5SDimitry Andricstruct ioctl_desc_compare {
14120b57cec5SDimitry Andric  bool operator()(const ioctl_desc &left, const ioctl_desc &right) const {
14130b57cec5SDimitry Andric    return left.req < right.req;
14140b57cec5SDimitry Andric  }
14150b57cec5SDimitry Andric};
14160b57cec5SDimitry Andric
14170b57cec5SDimitry Andricstatic void ioctl_init() {
14180b57cec5SDimitry Andric  ioctl_table_fill();
14190b57cec5SDimitry Andric  Sort(ioctl_table, ioctl_table_size, ioctl_desc_compare());
14200b57cec5SDimitry Andric
14210b57cec5SDimitry Andric  bool bad = false;
14220b57cec5SDimitry Andric  for (unsigned i = 0; i < ioctl_table_size - 1; ++i) {
14230b57cec5SDimitry Andric    if (ioctl_table[i].req >= ioctl_table[i + 1].req) {
14240b57cec5SDimitry Andric      Printf("Duplicate or unsorted ioctl request id %x >= %x (%s vs %s)\n",
14250b57cec5SDimitry Andric             ioctl_table[i].req, ioctl_table[i + 1].req, ioctl_table[i].name,
14260b57cec5SDimitry Andric             ioctl_table[i + 1].name);
14270b57cec5SDimitry Andric      bad = true;
14280b57cec5SDimitry Andric    }
14290b57cec5SDimitry Andric  }
14300b57cec5SDimitry Andric
14310b57cec5SDimitry Andric  if (bad)
14320b57cec5SDimitry Andric    Die();
14330b57cec5SDimitry Andric
14340b57cec5SDimitry Andric  ioctl_initialized = true;
14350b57cec5SDimitry Andric}
14360b57cec5SDimitry Andric
14370b57cec5SDimitry Andricstatic const ioctl_desc *ioctl_table_lookup(unsigned req) {
14380b57cec5SDimitry Andric  int left = 0;
14390b57cec5SDimitry Andric  int right = ioctl_table_size;
14400b57cec5SDimitry Andric  while (left < right) {
14410b57cec5SDimitry Andric    int mid = (left + right) / 2;
14420b57cec5SDimitry Andric    if (ioctl_table[mid].req < req)
14430b57cec5SDimitry Andric      left = mid + 1;
14440b57cec5SDimitry Andric    else
14450b57cec5SDimitry Andric      right = mid;
14460b57cec5SDimitry Andric  }
14470b57cec5SDimitry Andric  if (left == right && ioctl_table[left].req == req)
14480b57cec5SDimitry Andric    return ioctl_table + left;
14490b57cec5SDimitry Andric  else
14500b57cec5SDimitry Andric    return nullptr;
14510b57cec5SDimitry Andric}
14520b57cec5SDimitry Andric
14530b57cec5SDimitry Andricstatic bool ioctl_decode(unsigned req, ioctl_desc *desc) {
14540b57cec5SDimitry Andric  CHECK(desc);
14550b57cec5SDimitry Andric  desc->req = req;
14560b57cec5SDimitry Andric  desc->name = "<DECODED_IOCTL>";
14570b57cec5SDimitry Andric  desc->size = IOC_SIZE(req);
14580b57cec5SDimitry Andric  // Sanity check.
14590b57cec5SDimitry Andric  if (desc->size > 0xFFFF)
14600b57cec5SDimitry Andric    return false;
14610b57cec5SDimitry Andric  unsigned dir = IOC_DIR(req);
14620b57cec5SDimitry Andric  switch (dir) {
14630b57cec5SDimitry Andric  case IOC_NONE:
14640b57cec5SDimitry Andric    desc->type = ioctl_desc::NONE;
14650b57cec5SDimitry Andric    break;
14660b57cec5SDimitry Andric  case IOC_READ | IOC_WRITE:
14670b57cec5SDimitry Andric    desc->type = ioctl_desc::READWRITE;
14680b57cec5SDimitry Andric    break;
14690b57cec5SDimitry Andric  case IOC_READ:
14700b57cec5SDimitry Andric    desc->type = ioctl_desc::WRITE;
14710b57cec5SDimitry Andric    break;
14720b57cec5SDimitry Andric  case IOC_WRITE:
14730b57cec5SDimitry Andric    desc->type = ioctl_desc::READ;
14740b57cec5SDimitry Andric    break;
14750b57cec5SDimitry Andric  default:
14760b57cec5SDimitry Andric    return false;
14770b57cec5SDimitry Andric  }
14780b57cec5SDimitry Andric  // Size can be 0 iff type is NONE.
14790b57cec5SDimitry Andric  if ((desc->type == IOC_NONE) != (desc->size == 0))
14800b57cec5SDimitry Andric    return false;
14810b57cec5SDimitry Andric  // Sanity check.
14820b57cec5SDimitry Andric  if (IOC_TYPE(req) == 0)
14830b57cec5SDimitry Andric    return false;
14840b57cec5SDimitry Andric  return true;
14850b57cec5SDimitry Andric}
14860b57cec5SDimitry Andric
14870b57cec5SDimitry Andricstatic const ioctl_desc *ioctl_lookup(unsigned req) {
14880b57cec5SDimitry Andric  const ioctl_desc *desc = ioctl_table_lookup(req);
14890b57cec5SDimitry Andric  if (desc)
14900b57cec5SDimitry Andric    return desc;
14910b57cec5SDimitry Andric
14920b57cec5SDimitry Andric  // Try stripping access size from the request id.
14930b57cec5SDimitry Andric  desc = ioctl_table_lookup(req & ~(IOC_SIZEMASK << IOC_SIZESHIFT));
14940b57cec5SDimitry Andric  // Sanity check: requests that encode access size are either read or write and
14950b57cec5SDimitry Andric  // have size of 0 in the table.
14960b57cec5SDimitry Andric  if (desc && desc->size == 0 &&
14970b57cec5SDimitry Andric      (desc->type == ioctl_desc::READWRITE || desc->type == ioctl_desc::WRITE ||
14980b57cec5SDimitry Andric       desc->type == ioctl_desc::READ))
14990b57cec5SDimitry Andric    return desc;
15000b57cec5SDimitry Andric  return nullptr;
15010b57cec5SDimitry Andric}
15020b57cec5SDimitry Andric
15030b57cec5SDimitry Andricstatic void ioctl_common_pre(void *ctx, const ioctl_desc *desc, int d,
15040b57cec5SDimitry Andric                             unsigned request, void *arg) {
15050b57cec5SDimitry Andric  if (desc->type == ioctl_desc::READ || desc->type == ioctl_desc::READWRITE) {
15060b57cec5SDimitry Andric    unsigned size = desc->size ? desc->size : IOC_SIZE(request);
15070b57cec5SDimitry Andric    COMMON_INTERCEPTOR_READ_RANGE(ctx, arg, size);
15080b57cec5SDimitry Andric  }
15090b57cec5SDimitry Andric  if (desc->type != ioctl_desc::CUSTOM)
15100b57cec5SDimitry Andric    return;
15110b57cec5SDimitry Andric  if (request == IOCTL_SIOCGIFCONF) {
15120b57cec5SDimitry Andric    struct __sanitizer_ifconf *ifc = (__sanitizer_ifconf *)arg;
15130b57cec5SDimitry Andric    COMMON_INTERCEPTOR_READ_RANGE(ctx, (char *)&ifc->ifc_len,
15140b57cec5SDimitry Andric                                  sizeof(ifc->ifc_len));
15150b57cec5SDimitry Andric  }
15160b57cec5SDimitry Andric}
15170b57cec5SDimitry Andric
15180b57cec5SDimitry Andricstatic void ioctl_common_post(void *ctx, const ioctl_desc *desc, int res, int d,
15190b57cec5SDimitry Andric                              unsigned request, void *arg) {
15200b57cec5SDimitry Andric  if (desc->type == ioctl_desc::WRITE || desc->type == ioctl_desc::READWRITE) {
15210b57cec5SDimitry Andric    // FIXME: add verbose output
15220b57cec5SDimitry Andric    unsigned size = desc->size ? desc->size : IOC_SIZE(request);
15230b57cec5SDimitry Andric    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, arg, size);
15240b57cec5SDimitry Andric  }
15250b57cec5SDimitry Andric  if (desc->type != ioctl_desc::CUSTOM)
15260b57cec5SDimitry Andric    return;
15270b57cec5SDimitry Andric  if (request == IOCTL_SIOCGIFCONF) {
15280b57cec5SDimitry Andric    struct __sanitizer_ifconf *ifc = (__sanitizer_ifconf *)arg;
15290b57cec5SDimitry Andric    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ifc->ifc_ifcu.ifcu_req, ifc->ifc_len);
15300b57cec5SDimitry Andric  }
15310b57cec5SDimitry Andric}
15320b57cec5SDimitry Andric
15330b57cec5SDimitry Andric#endif // SANITIZER_NETBSD
1534