sanitizer_interceptors_ioctl_netbsd.inc 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535
  1. //===-- sanitizer_interceptors_ioctl_netbsd.inc -----------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // Ioctl handling in common sanitizer interceptors.
  10. //===----------------------------------------------------------------------===//
  11. #if SANITIZER_NETBSD
  12. #include "sanitizer_flags.h"
  13. struct ioctl_desc {
  14. unsigned req;
  15. // FIXME: support read+write arguments. Currently READWRITE and WRITE do the
  16. // same thing.
  17. // XXX: The declarations below may use WRITE instead of READWRITE, unless
  18. // explicitly noted.
  19. enum { NONE, READ, WRITE, READWRITE, CUSTOM } type : 3;
  20. unsigned size : 29;
  21. const char *name;
  22. };
  23. const unsigned ioctl_table_max = 1238;
  24. static ioctl_desc ioctl_table[ioctl_table_max];
  25. static unsigned ioctl_table_size = 0;
  26. // This can not be declared as a global, because references to struct_*_sz
  27. // require a global initializer. And this table must be available before global
  28. // initializers are run.
  29. static void ioctl_table_fill() {
  30. #define _(rq, tp, sz) \
  31. if (IOCTL_##rq != IOCTL_NOT_PRESENT) { \
  32. CHECK(ioctl_table_size < ioctl_table_max); \
  33. ioctl_table[ioctl_table_size].req = IOCTL_##rq; \
  34. ioctl_table[ioctl_table_size].type = ioctl_desc::tp; \
  35. ioctl_table[ioctl_table_size].size = sz; \
  36. ioctl_table[ioctl_table_size].name = #rq; \
  37. ++ioctl_table_size; \
  38. }
  39. /* Entries from file: altq/altq_afmap.h */
  40. _(AFM_ADDFMAP, READWRITE, struct_atm_flowmap_sz);
  41. _(AFM_DELFMAP, READWRITE, struct_atm_flowmap_sz);
  42. _(AFM_CLEANFMAP, READWRITE, struct_atm_flowmap_sz);
  43. _(AFM_GETFMAP, READWRITE, struct_atm_flowmap_sz);
  44. /* Entries from file: altq/altq.h */
  45. _(ALTQGTYPE, READWRITE, struct_altqreq_sz);
  46. _(ALTQTBRSET, READ, struct_tbrreq_sz);
  47. _(ALTQTBRGET, READWRITE, struct_tbrreq_sz);
  48. /* Entries from file: altq/altq_blue.h */
  49. _(BLUE_IF_ATTACH, READ, struct_blue_interface_sz);
  50. _(BLUE_DISABLE, READ, struct_blue_interface_sz);
  51. _(BLUE_CONFIG, READWRITE, struct_blue_conf_sz);
  52. _(BLUE_GETSTATS, READWRITE, struct_blue_stats_sz);
  53. /* Entries from file: altq/altq_cbq.h */
  54. _(CBQ_ENABLE, READ, struct_cbq_interface_sz);
  55. _(CBQ_ADD_CLASS, READWRITE, struct_cbq_add_class_sz);
  56. _(CBQ_DEL_CLASS, READ, struct_cbq_delete_class_sz);
  57. _(CBQ_MODIFY_CLASS, READWRITE, struct_cbq_modify_class_sz);
  58. _(CBQ_DEL_FILTER, READ, struct_cbq_delete_filter_sz);
  59. _(CBQ_GETSTATS, READWRITE, struct_cbq_getstats_sz);
  60. /* Entries from file: altq/altq_cdnr.h */
  61. _(CDNR_IF_DETACH, READ, struct_cdnr_interface_sz);
  62. _(CDNR_ADD_FILTER, READWRITE, struct_cdnr_add_filter_sz);
  63. _(CDNR_GETSTATS, READWRITE, struct_cdnr_get_stats_sz);
  64. _(CDNR_ADD_ELEM, READWRITE, struct_cdnr_add_element_sz);
  65. _(CDNR_DEL_ELEM, READ, struct_cdnr_delete_element_sz);
  66. _(CDNR_ADD_TBM, READWRITE, struct_cdnr_add_tbmeter_sz);
  67. _(CDNR_MOD_TBM, READ, struct_cdnr_modify_tbmeter_sz);
  68. _(CDNR_TBM_STATS, READWRITE, struct_cdnr_tbmeter_stats_sz);
  69. _(CDNR_ADD_TCM, READWRITE, struct_cdnr_add_trtcm_sz);
  70. _(CDNR_MOD_TCM, READWRITE, struct_cdnr_modify_trtcm_sz);
  71. _(CDNR_TCM_STATS, READWRITE, struct_cdnr_tcm_stats_sz);
  72. _(CDNR_ADD_TSW, READWRITE, struct_cdnr_add_tswtcm_sz);
  73. _(CDNR_MOD_TSW, READWRITE, struct_cdnr_modify_tswtcm_sz);
  74. /* Entries from file: altq/altq_fifoq.h */
  75. _(FIFOQ_CONFIG, READWRITE, struct_fifoq_conf_sz);
  76. _(FIFOQ_GETSTATS, READWRITE, struct_fifoq_getstats_sz);
  77. /* Entries from file: altq/altq_hfsc.h */
  78. _(HFSC_CLEAR_HIERARCHY, READ, struct_hfsc_interface_sz);
  79. _(HFSC_ADD_CLASS, READWRITE, struct_hfsc_add_class_sz);
  80. _(HFSC_GETSTATS, READWRITE, struct_hfsc_class_stats_sz);
  81. /* Entries from file: altq/altq_jobs.h */
  82. _(JOBS_IF_ATTACH, READ, struct_jobs_attach_sz);
  83. _(JOBS_IF_DETACH, READ, struct_jobs_interface_sz);
  84. _(JOBS_ENABLE, READ, struct_jobs_interface_sz);
  85. _(JOBS_DISABLE, READ, struct_jobs_interface_sz);
  86. _(JOBS_CLEAR, READ, struct_jobs_interface_sz);
  87. _(JOBS_ADD_CLASS, READWRITE, struct_jobs_add_class_sz);
  88. _(JOBS_MOD_CLASS, READ, struct_jobs_modify_class_sz);
  89. /* Entries from file: altq/altq_priq.h */
  90. _(PRIQ_IF_ATTACH, READ, struct_priq_interface_sz);
  91. _(PRIQ_CLEAR, READ, struct_priq_interface_sz);
  92. _(PRIQ_ADD_CLASS, READWRITE, struct_priq_add_class_sz);
  93. _(PRIQ_DEL_CLASS, READ, struct_priq_delete_class_sz);
  94. _(PRIQ_MOD_CLASS, READ, struct_priq_modify_class_sz);
  95. _(PRIQ_ADD_FILTER, READWRITE, struct_priq_add_filter_sz);
  96. _(PRIQ_DEL_FILTER, READ, struct_priq_delete_filter_sz);
  97. _(PRIQ_GETSTATS, READWRITE, struct_priq_class_stats_sz);
  98. /* Entries from file: altq/altq_red.h */
  99. _(RED_CONFIG, READWRITE, struct_red_conf_sz);
  100. _(RED_GETSTATS, READWRITE, struct_red_stats_sz);
  101. _(RED_SETDEFAULTS, READ, struct_redparams_sz);
  102. /* Entries from file: altq/altq_rio.h */
  103. _(RIO_CONFIG, READWRITE, struct_rio_conf_sz);
  104. _(RIO_GETSTATS, READWRITE, struct_rio_stats_sz);
  105. _(RIO_SETDEFAULTS, READ, struct_redparams_sz);
  106. /* Entries from file: altq/altq_wfq.h */
  107. _(WFQ_CONFIG, READWRITE, struct_wfq_conf_sz);
  108. _(WFQ_GET_QID, READWRITE, struct_wfq_getqid_sz);
  109. _(WFQ_SET_WEIGHT, READWRITE, struct_wfq_setweight_sz);
  110. /* Entries from file: crypto/cryptodev.h */
  111. _(CRIOGET, READWRITE, sizeof(u32));
  112. _(CIOCFSESSION, READ, sizeof(u32));
  113. _(CIOCKEY, READWRITE, struct_crypt_kop_sz);
  114. _(CIOCNFKEYM, READWRITE, struct_crypt_mkop_sz);
  115. _(CIOCNFSESSION, READ, struct_crypt_sfop_sz);
  116. _(CIOCNCRYPTRETM, READWRITE, struct_cryptret_sz);
  117. _(CIOCNCRYPTRET, READWRITE, struct_crypt_result_sz);
  118. _(CIOCGSESSION, READWRITE, struct_session_op_sz);
  119. _(CIOCNGSESSION, READWRITE, struct_crypt_sgop_sz);
  120. _(CIOCCRYPT, READWRITE, struct_crypt_op_sz);
  121. _(CIOCNCRYPTM, READWRITE, struct_crypt_mop_sz);
  122. _(CIOCASYMFEAT, WRITE, sizeof(u32));
  123. /* Entries from file: dev/apm/apmio.h */
  124. _(APM_IOC_REJECT, READ, struct_apm_event_info_sz);
  125. _(OAPM_IOC_GETPOWER, WRITE, struct_apm_power_info_sz);
  126. _(APM_IOC_GETPOWER, READWRITE, struct_apm_power_info_sz);
  127. _(APM_IOC_NEXTEVENT, WRITE, struct_apm_event_info_sz);
  128. _(APM_IOC_DEV_CTL, READ, struct_apm_ctl_sz);
  129. /* Entries from file: dev/dm/netbsd-dm.h */
  130. _(NETBSD_DM_IOCTL, READWRITE, struct_plistref_sz);
  131. /* Entries from file: dev/dmover/dmover_io.h */
  132. _(DMIO_SETFUNC, READ, struct_dmio_setfunc_sz);
  133. /* Entries from file: dev/dtv/dtvio_demux.h */
  134. _(DMX_START, NONE, 0);
  135. _(DMX_STOP, NONE, 0);
  136. _(DMX_SET_FILTER, READ, struct_dmx_sct_filter_params_sz);
  137. _(DMX_SET_PES_FILTER, READ, struct_dmx_pes_filter_params_sz);
  138. _(DMX_SET_BUFFER_SIZE, NONE, 0);
  139. _(DMX_GET_STC, READWRITE, struct_dmx_stc_sz);
  140. _(DMX_ADD_PID, READ, sizeof(u16));
  141. _(DMX_REMOVE_PID, READ, sizeof(u16));
  142. _(DMX_GET_CAPS, WRITE, struct_dmx_caps_sz);
  143. _(DMX_SET_SOURCE, READ, enum_dmx_source_sz);
  144. /* Entries from file: dev/dtv/dtvio_frontend.h */
  145. _(FE_READ_STATUS, WRITE, enum_fe_status_sz);
  146. _(FE_READ_BER, WRITE, sizeof(u32));
  147. _(FE_READ_SNR, WRITE, sizeof(u16));
  148. _(FE_READ_SIGNAL_STRENGTH, WRITE, sizeof(u16));
  149. _(FE_READ_UNCORRECTED_BLOCKS, WRITE, sizeof(u32));
  150. _(FE_SET_FRONTEND, READWRITE, struct_dvb_frontend_parameters_sz);
  151. _(FE_GET_FRONTEND, WRITE, struct_dvb_frontend_parameters_sz);
  152. _(FE_GET_EVENT, WRITE, struct_dvb_frontend_event_sz);
  153. _(FE_GET_INFO, WRITE, struct_dvb_frontend_info_sz);
  154. _(FE_DISEQC_RESET_OVERLOAD, NONE, 0);
  155. _(FE_DISEQC_SEND_MASTER_CMD, READ, struct_dvb_diseqc_master_cmd_sz);
  156. _(FE_DISEQC_RECV_SLAVE_REPLY, WRITE, struct_dvb_diseqc_slave_reply_sz);
  157. _(FE_DISEQC_SEND_BURST, READ, enum_fe_sec_mini_cmd_sz);
  158. _(FE_SET_TONE, READ, enum_fe_sec_tone_mode_sz);
  159. _(FE_SET_VOLTAGE, READ, enum_fe_sec_voltage_sz);
  160. _(FE_ENABLE_HIGH_LNB_VOLTAGE, READ, sizeof(int));
  161. _(FE_SET_FRONTEND_TUNE_MODE, READ, sizeof(unsigned int));
  162. _(FE_DISHNETWORK_SEND_LEGACY_CMD, READ, sizeof(unsigned long));
  163. /* Entries from file: dev/hdaudio/hdaudioio.h */
  164. _(HDAUDIO_FGRP_INFO, READWRITE, struct_plistref_sz);
  165. _(HDAUDIO_FGRP_GETCONFIG, READWRITE, struct_plistref_sz);
  166. _(HDAUDIO_FGRP_SETCONFIG, READWRITE, struct_plistref_sz);
  167. _(HDAUDIO_FGRP_WIDGET_INFO, READWRITE, struct_plistref_sz);
  168. _(HDAUDIO_FGRP_CODEC_INFO, READWRITE, struct_plistref_sz);
  169. _(HDAUDIO_AFG_WIDGET_INFO, READWRITE, struct_plistref_sz);
  170. _(HDAUDIO_AFG_CODEC_INFO, READWRITE, struct_plistref_sz);
  171. /* Entries from file: dev/hdmicec/hdmicecio.h */
  172. _(CEC_GET_PHYS_ADDR, WRITE, sizeof(u16));
  173. _(CEC_GET_LOG_ADDRS, WRITE, sizeof(u16));
  174. _(CEC_SET_LOG_ADDRS, READ, sizeof(u16));
  175. _(CEC_GET_VENDOR_ID, WRITE, sizeof(u32));
  176. /* Entries from file: dev/hpc/hpcfbio.h */
  177. _(HPCFBIO_GCONF, READWRITE, struct_hpcfb_fbconf_sz);
  178. _(HPCFBIO_SCONF, READ, struct_hpcfb_fbconf_sz);
  179. _(HPCFBIO_GDSPCONF, READWRITE, struct_hpcfb_dspconf_sz);
  180. _(HPCFBIO_SDSPCONF, READ, struct_hpcfb_dspconf_sz);
  181. _(HPCFBIO_GOP, WRITE, struct_hpcfb_dsp_op_sz);
  182. _(HPCFBIO_SOP, READWRITE, struct_hpcfb_dsp_op_sz);
  183. /* Entries from file: dev/i2o/iopio.h */
  184. _(IOPIOCPT, READWRITE, struct_ioppt_sz);
  185. _(IOPIOCGLCT, READWRITE, struct_iovec_sz);
  186. _(IOPIOCGSTATUS, READWRITE, struct_iovec_sz);
  187. _(IOPIOCRECONFIG, NONE, 0);
  188. _(IOPIOCGTIDMAP, READWRITE, struct_iovec_sz);
  189. /* Entries from file: dev/ic/athioctl.h */
  190. _(SIOCGATHSTATS, READWRITE, struct_ifreq_sz);
  191. _(SIOCGATHDIAG, READWRITE, struct_ath_diag_sz);
  192. /* Entries from file: dev/ic/bt8xx.h */
  193. _(METEORCAPTUR, READ, sizeof(int));
  194. _(METEORCAPFRM, READ, struct_meteor_capframe_sz);
  195. _(METEORSETGEO, READ, struct_meteor_geomet_sz);
  196. _(METEORGETGEO, WRITE, struct_meteor_geomet_sz);
  197. _(METEORSTATUS, WRITE, sizeof(unsigned short));
  198. _(METEORSHUE, READ, sizeof(signed char));
  199. _(METEORGHUE, WRITE, sizeof(signed char));
  200. _(METEORSFMT, READ, sizeof(unsigned int));
  201. _(METEORGFMT, WRITE, sizeof(unsigned int));
  202. _(METEORSINPUT, READ, sizeof(unsigned int));
  203. _(METEORGINPUT, WRITE, sizeof(unsigned int));
  204. _(METEORSCHCV, READ, sizeof(unsigned char));
  205. _(METEORGCHCV, WRITE, sizeof(unsigned char));
  206. _(METEORSCOUNT, READ, struct_meteor_counts_sz);
  207. _(METEORGCOUNT, WRITE, struct_meteor_counts_sz);
  208. _(METEORSFPS, READ, sizeof(unsigned short));
  209. _(METEORGFPS, WRITE, sizeof(unsigned short));
  210. _(METEORSSIGNAL, READ, sizeof(unsigned int));
  211. _(METEORGSIGNAL, WRITE, sizeof(unsigned int));
  212. _(METEORSVIDEO, READ, struct_meteor_video_sz);
  213. _(METEORGVIDEO, WRITE, struct_meteor_video_sz);
  214. _(METEORSBRIG, READ, sizeof(unsigned char));
  215. _(METEORGBRIG, WRITE, sizeof(unsigned char));
  216. _(METEORSCSAT, READ, sizeof(unsigned char));
  217. _(METEORGCSAT, WRITE, sizeof(unsigned char));
  218. _(METEORSCONT, READ, sizeof(unsigned char));
  219. _(METEORGCONT, WRITE, sizeof(unsigned char));
  220. _(METEORSHWS, READ, sizeof(unsigned char));
  221. _(METEORGHWS, WRITE, sizeof(unsigned char));
  222. _(METEORSVWS, READ, sizeof(unsigned char));
  223. _(METEORGVWS, WRITE, sizeof(unsigned char));
  224. _(METEORSTS, READ, sizeof(unsigned char));
  225. _(METEORGTS, WRITE, sizeof(unsigned char));
  226. _(TVTUNER_SETCHNL, READ, sizeof(unsigned int));
  227. _(TVTUNER_GETCHNL, WRITE, sizeof(unsigned int));
  228. _(TVTUNER_SETTYPE, READ, sizeof(unsigned int));
  229. _(TVTUNER_GETTYPE, WRITE, sizeof(unsigned int));
  230. _(TVTUNER_GETSTATUS, WRITE, sizeof(unsigned int));
  231. _(TVTUNER_SETFREQ, READ, sizeof(unsigned int));
  232. _(TVTUNER_GETFREQ, WRITE, sizeof(unsigned int));
  233. _(TVTUNER_SETAFC, READ, sizeof(int));
  234. _(TVTUNER_GETAFC, WRITE, sizeof(int));
  235. _(RADIO_SETMODE, READ, sizeof(unsigned int));
  236. _(RADIO_GETMODE, WRITE, sizeof(unsigned char));
  237. _(RADIO_SETFREQ, READ, sizeof(unsigned int));
  238. _(RADIO_GETFREQ, WRITE, sizeof(unsigned int));
  239. _(METEORSACTPIXFMT, READ, sizeof(int));
  240. _(METEORGACTPIXFMT, WRITE, sizeof(int));
  241. _(METEORGSUPPIXFMT, READWRITE, struct_meteor_pixfmt_sz);
  242. _(TVTUNER_GETCHNLSET, READWRITE, struct_bktr_chnlset_sz);
  243. _(REMOTE_GETKEY, WRITE, struct_bktr_remote_sz);
  244. /* Entries from file: dev/ic/icp_ioctl.h */
  245. _(GDT_IOCTL_GENERAL, READWRITE, struct_gdt_ucmd_sz);
  246. _(GDT_IOCTL_DRVERS, WRITE, sizeof(int));
  247. _(GDT_IOCTL_CTRTYPE, READWRITE, struct_gdt_ctrt_sz);
  248. _(GDT_IOCTL_OSVERS, WRITE, struct_gdt_osv_sz);
  249. _(GDT_IOCTL_CTRCNT, WRITE, sizeof(int));
  250. _(GDT_IOCTL_EVENT, READWRITE, struct_gdt_event_sz);
  251. _(GDT_IOCTL_STATIST, WRITE, struct_gdt_statist_sz);
  252. _(GDT_IOCTL_RESCAN, READWRITE, struct_gdt_rescan_sz);
  253. /* Entries from file: dev/ic/isp_ioctl.h */
  254. _(ISP_SDBLEV, READWRITE, sizeof(int));
  255. _(ISP_RESETHBA, NONE, 0);
  256. _(ISP_RESCAN, NONE, 0);
  257. _(ISP_SETROLE, READWRITE, sizeof(int));
  258. _(ISP_GETROLE, WRITE, sizeof(int));
  259. _(ISP_GET_STATS, WRITE, struct_isp_stats_sz);
  260. _(ISP_CLR_STATS, NONE, 0);
  261. _(ISP_FC_LIP, NONE, 0);
  262. _(ISP_FC_GETDINFO, READWRITE, struct_isp_fc_device_sz);
  263. _(ISP_GET_FW_CRASH_DUMP, NONE, 0);
  264. _(ISP_FORCE_CRASH_DUMP, NONE, 0);
  265. _(ISP_FC_GETHINFO, READWRITE, struct_isp_hba_device_sz);
  266. _(ISP_TSK_MGMT, READWRITE, struct_isp_fc_tsk_mgmt_sz);
  267. _(ISP_FC_GETDLIST, NONE, 0);
  268. /* Entries from file: dev/ic/mlxio.h */
  269. _(MLXD_STATUS, WRITE, sizeof(int));
  270. _(MLXD_CHECKASYNC, WRITE, sizeof(int));
  271. _(MLXD_DETACH, READ, sizeof(int));
  272. _(MLX_RESCAN_DRIVES, NONE, 0);
  273. _(MLX_PAUSE_CHANNEL, READ, struct_mlx_pause_sz);
  274. _(MLX_COMMAND, READWRITE, struct_mlx_usercommand_sz);
  275. _(MLX_REBUILDASYNC, READWRITE, struct_mlx_rebuild_request_sz);
  276. _(MLX_REBUILDSTAT, WRITE, struct_mlx_rebuild_status_sz);
  277. _(MLX_GET_SYSDRIVE, READWRITE, sizeof(int));
  278. _(MLX_GET_CINFO, WRITE, struct_mlx_cinfo_sz);
  279. /* Entries from file: dev/ic/nvmeio.h */
  280. _(NVME_PASSTHROUGH_CMD, READWRITE, struct_nvme_pt_command_sz);
  281. /* Entries from file: dev/ic/qemufwcfgio.h */
  282. _(FWCFGIO_SET_INDEX, READ, sizeof(u16));
  283. /* Entries from file: dev/ir/irdaio.h */
  284. _(IRDA_RESET_PARAMS, NONE, 0);
  285. _(IRDA_SET_PARAMS, READ, struct_irda_params_sz);
  286. _(IRDA_GET_SPEEDMASK, WRITE, sizeof(unsigned int));
  287. _(IRDA_GET_TURNAROUNDMASK, WRITE, sizeof(unsigned int));
  288. _(IRFRAMETTY_GET_DEVICE, WRITE, sizeof(unsigned int));
  289. _(IRFRAMETTY_GET_DONGLE, WRITE, sizeof(unsigned int));
  290. _(IRFRAMETTY_SET_DONGLE, READ, sizeof(unsigned int));
  291. /* Entries from file: dev/isa/isvio.h */
  292. _(ISV_CMD, READWRITE, struct_isv_cmd_sz);
  293. /* Entries from file: dev/isa/wtreg.h */
  294. _(WTQICMD, NONE, 0);
  295. /* Entries from file: dev/iscsi/iscsi_ioctl.h */
  296. _(ISCSI_GET_VERSION, READWRITE, struct_iscsi_get_version_parameters_sz);
  297. _(ISCSI_LOGIN, READWRITE, struct_iscsi_login_parameters_sz);
  298. _(ISCSI_LOGOUT, READWRITE, struct_iscsi_logout_parameters_sz);
  299. _(ISCSI_ADD_CONNECTION, READWRITE, struct_iscsi_login_parameters_sz);
  300. _(ISCSI_RESTORE_CONNECTION, READWRITE, struct_iscsi_login_parameters_sz);
  301. _(ISCSI_REMOVE_CONNECTION, READWRITE, struct_iscsi_remove_parameters_sz);
  302. _(ISCSI_CONNECTION_STATUS, READWRITE, struct_iscsi_conn_status_parameters_sz);
  303. _(ISCSI_SEND_TARGETS, READWRITE, struct_iscsi_send_targets_parameters_sz);
  304. _(ISCSI_SET_NODE_NAME, READWRITE, struct_iscsi_set_node_name_parameters_sz);
  305. _(ISCSI_IO_COMMAND, READWRITE, struct_iscsi_iocommand_parameters_sz);
  306. _(ISCSI_REGISTER_EVENT, READWRITE, struct_iscsi_register_event_parameters_sz);
  307. _(ISCSI_DEREGISTER_EVENT, READWRITE,
  308. struct_iscsi_register_event_parameters_sz);
  309. _(ISCSI_WAIT_EVENT, READWRITE, struct_iscsi_wait_event_parameters_sz);
  310. _(ISCSI_POLL_EVENT, READWRITE, struct_iscsi_wait_event_parameters_sz);
  311. /* Entries from file: dev/ofw/openfirmio.h */
  312. _(OFIOCGET, READWRITE, struct_ofiocdesc_sz);
  313. _(OFIOCSET, READ, struct_ofiocdesc_sz);
  314. _(OFIOCNEXTPROP, READWRITE, struct_ofiocdesc_sz);
  315. _(OFIOCGETOPTNODE, WRITE, sizeof(int));
  316. _(OFIOCGETNEXT, READWRITE, sizeof(int));
  317. _(OFIOCGETCHILD, READWRITE, sizeof(int));
  318. _(OFIOCFINDDEVICE, READWRITE, struct_ofiocdesc_sz);
  319. /* Entries from file: dev/pci/amrio.h */
  320. _(AMR_IO_VERSION, WRITE, sizeof(int));
  321. _(AMR_IO_COMMAND, READWRITE, struct_amr_user_ioctl_sz);
  322. /* Entries from file: dev/pci/mlyio.h */
  323. _(MLYIO_COMMAND, READWRITE, struct_mly_user_command_sz);
  324. _(MLYIO_HEALTH, READ, struct_mly_user_health_sz);
  325. /* Entries from file: dev/pci/pciio.h */
  326. _(PCI_IOC_CFGREAD, READWRITE, struct_pciio_cfgreg_sz);
  327. _(PCI_IOC_CFGWRITE, READ, struct_pciio_cfgreg_sz);
  328. _(PCI_IOC_BDF_CFGREAD, READWRITE, struct_pciio_bdf_cfgreg_sz);
  329. _(PCI_IOC_BDF_CFGWRITE, READ, struct_pciio_bdf_cfgreg_sz);
  330. _(PCI_IOC_BUSINFO, WRITE, struct_pciio_businfo_sz);
  331. _(PCI_IOC_DRVNAME, READWRITE, struct_pciio_drvname_sz);
  332. _(PCI_IOC_DRVNAMEONBUS, READWRITE, struct_pciio_drvnameonbus_sz);
  333. /* Entries from file: dev/pci/tweio.h */
  334. _(TWEIO_COMMAND, READWRITE, struct_twe_usercommand_sz);
  335. _(TWEIO_STATS, READWRITE, union_twe_statrequest_sz);
  336. _(TWEIO_AEN_POLL, WRITE, sizeof(int));
  337. _(TWEIO_AEN_WAIT, WRITE, sizeof(int));
  338. _(TWEIO_SET_PARAM, READ, struct_twe_paramcommand_sz);
  339. _(TWEIO_GET_PARAM, READ, struct_twe_paramcommand_sz);
  340. _(TWEIO_RESET, NONE, 0);
  341. _(TWEIO_ADD_UNIT, READ, struct_twe_drivecommand_sz);
  342. _(TWEIO_DEL_UNIT, READ, struct_twe_drivecommand_sz);
  343. /* Entries from file: dev/pcmcia/if_cnwioctl.h */
  344. _(SIOCSCNWDOMAIN, READ, struct_ifreq_sz);
  345. _(SIOCGCNWDOMAIN, READWRITE, struct_ifreq_sz);
  346. _(SIOCSCNWKEY, READWRITE, struct_ifreq_sz);
  347. _(SIOCGCNWSTATUS, READWRITE, struct_cnwstatus_sz);
  348. _(SIOCGCNWSTATS, READWRITE, struct_cnwistats_sz);
  349. _(SIOCGCNWTRAIL, READWRITE, struct_cnwitrail_sz);
  350. /* Entries from file: dev/pcmcia/if_rayreg.h */
  351. _(SIOCGRAYSIGLEV, READWRITE, struct_ifreq_sz);
  352. /* Entries from file: dev/raidframe/raidframeio.h */
  353. _(RAIDFRAME_SHUTDOWN, NONE, 0);
  354. _(RAIDFRAME_TUR, READ, sizeof(u64));
  355. _(RAIDFRAME_FAIL_DISK, READ, struct_rf_recon_req_sz);
  356. _(RAIDFRAME_CHECK_RECON_STATUS, READWRITE, sizeof(int));
  357. _(RAIDFRAME_REWRITEPARITY, NONE, 0);
  358. _(RAIDFRAME_COPYBACK, NONE, 0);
  359. _(RAIDFRAME_SPARET_WAIT, WRITE, struct_RF_SparetWait_sz);
  360. _(RAIDFRAME_SEND_SPARET, READ, sizeof(uptr));
  361. _(RAIDFRAME_ABORT_SPARET_WAIT, NONE, 0);
  362. _(RAIDFRAME_START_ATRACE, NONE, 0);
  363. _(RAIDFRAME_STOP_ATRACE, NONE, 0);
  364. _(RAIDFRAME_GET_SIZE, WRITE, sizeof(int));
  365. _(RAIDFRAME_RESET_ACCTOTALS, NONE, 0);
  366. _(RAIDFRAME_KEEP_ACCTOTALS, READ, sizeof(int));
  367. _(RAIDFRAME_GET_COMPONENT_LABEL, READWRITE, struct_RF_ComponentLabel_sz);
  368. _(RAIDFRAME_SET_COMPONENT_LABEL, READ, struct_RF_ComponentLabel_sz);
  369. _(RAIDFRAME_INIT_LABELS, READ, struct_RF_ComponentLabel_sz);
  370. _(RAIDFRAME_ADD_HOT_SPARE, READ, struct_RF_SingleComponent_sz);
  371. _(RAIDFRAME_REMOVE_HOT_SPARE, READ, struct_RF_SingleComponent_sz);
  372. _(RAIDFRAME_REBUILD_IN_PLACE, READ, struct_RF_SingleComponent_sz);
  373. _(RAIDFRAME_CHECK_PARITY, READWRITE, sizeof(int));
  374. _(RAIDFRAME_CHECK_PARITYREWRITE_STATUS, READWRITE, sizeof(int));
  375. _(RAIDFRAME_CHECK_COPYBACK_STATUS, READWRITE, sizeof(int));
  376. _(RAIDFRAME_SET_AUTOCONFIG, READWRITE, sizeof(int));
  377. _(RAIDFRAME_SET_ROOT, READWRITE, sizeof(int));
  378. _(RAIDFRAME_DELETE_COMPONENT, READ, struct_RF_SingleComponent_sz);
  379. _(RAIDFRAME_INCORPORATE_HOT_SPARE, READ, struct_RF_SingleComponent_sz);
  380. _(RAIDFRAME_CHECK_RECON_STATUS_EXT, READWRITE, struct_RF_ProgressInfo_sz);
  381. _(RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT, READWRITE,
  382. struct_RF_ProgressInfo_sz);
  383. _(RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, READWRITE, struct_RF_ProgressInfo_sz);
  384. _(RAIDFRAME_PARITYMAP_STATUS, WRITE, struct_rf_pmstat_sz);
  385. _(RAIDFRAME_PARITYMAP_GET_DISABLE, WRITE, sizeof(int));
  386. _(RAIDFRAME_PARITYMAP_SET_DISABLE, READ, sizeof(int));
  387. _(RAIDFRAME_PARITYMAP_SET_PARAMS, READ, struct_rf_pmparams_sz);
  388. _(RAIDFRAME_SET_LAST_UNIT, READ, sizeof(int));
  389. _(RAIDFRAME_GET_INFO, READWRITE, sizeof(uptr));
  390. _(RAIDFRAME_CONFIGURE, READ, sizeof(uptr));
  391. /* Entries from file: dev/sbus/mbppio.h */
  392. _(MBPPIOCSPARAM, READ, struct_mbpp_param_sz);
  393. _(MBPPIOCGPARAM, WRITE, struct_mbpp_param_sz);
  394. _(MBPPIOCGSTAT, WRITE, sizeof(int));
  395. /* Entries from file: dev/scsipi/ses.h */
  396. _(SESIOC_GETNOBJ, NONE, 0);
  397. _(SESIOC_GETOBJMAP, NONE, 0);
  398. _(SESIOC_GETENCSTAT, NONE, 0);
  399. _(SESIOC_SETENCSTAT, NONE, 0);
  400. _(SESIOC_GETOBJSTAT, NONE, 0);
  401. _(SESIOC_SETOBJSTAT, NONE, 0);
  402. _(SESIOC_GETTEXT, NONE, 0);
  403. _(SESIOC_INIT, NONE, 0);
  404. /* Entries from file: dev/sun/disklabel.h */
  405. _(SUN_DKIOCGGEOM, WRITE, struct_sun_dkgeom_sz);
  406. _(SUN_DKIOCINFO, WRITE, struct_sun_dkctlr_sz);
  407. _(SUN_DKIOCGPART, WRITE, struct_sun_dkpart_sz);
  408. /* Entries from file: dev/sun/fbio.h */
  409. _(FBIOGTYPE, WRITE, struct_fbtype_sz);
  410. _(FBIOPUTCMAP, READ, struct_fbcmap_sz);
  411. _(FBIOGETCMAP, READ, struct_fbcmap_sz);
  412. _(FBIOGATTR, WRITE, struct_fbgattr_sz);
  413. _(FBIOSVIDEO, READ, sizeof(int));
  414. _(FBIOGVIDEO, WRITE, sizeof(int));
  415. _(FBIOSCURSOR, READ, struct_fbcursor_sz);
  416. _(FBIOGCURSOR, READWRITE, struct_fbcursor_sz);
  417. _(FBIOSCURPOS, READ, struct_fbcurpos_sz);
  418. _(FBIOGCURPOS, READ, struct_fbcurpos_sz);
  419. _(FBIOGCURMAX, WRITE, struct_fbcurpos_sz);
  420. /* Entries from file: dev/sun/kbio.h */
  421. _(KIOCTRANS, READ, sizeof(int));
  422. _(KIOCSETKEY, READWRITE, struct_okiockey_sz);
  423. _(KIOCGETKEY, READWRITE, struct_okiockey_sz);
  424. _(KIOCGTRANS, WRITE, sizeof(int));
  425. _(KIOCCMD, READ, sizeof(int));
  426. _(KIOCTYPE, WRITE, sizeof(int));
  427. _(KIOCSDIRECT, READ, sizeof(int));
  428. _(KIOCSKEY, READ, struct_kiockeymap_sz);
  429. _(KIOCGKEY, READWRITE, struct_kiockeymap_sz);
  430. _(KIOCSLED, READ, sizeof(char));
  431. _(KIOCGLED, WRITE, sizeof(char));
  432. _(KIOCLAYOUT, WRITE, sizeof(int));
  433. /* Entries from file: dev/sun/vuid_event.h */
  434. _(VUIDSFORMAT, READ, sizeof(int));
  435. _(VUIDGFORMAT, WRITE, sizeof(int));
  436. /* Entries from file: dev/tc/sticio.h */
  437. _(STICIO_GXINFO, WRITE, struct_stic_xinfo_sz);
  438. _(STICIO_RESET, NONE, 0);
  439. _(STICIO_STARTQ, NONE, 0);
  440. _(STICIO_STOPQ, NONE, 0);
  441. /* Entries from file: dev/usb/ukyopon.h */
  442. _(UKYOPON_IDENTIFY, WRITE, struct_ukyopon_identify_sz);
  443. /* Entries from file: dev/usb/usb.h */
  444. _(USB_REQUEST, READWRITE, struct_usb_ctl_request_sz);
  445. _(USB_SETDEBUG, READ, sizeof(int));
  446. _(USB_DISCOVER, NONE, 0);
  447. _(USB_DEVICEINFO, READWRITE, struct_usb_device_info_sz);
  448. _(USB_DEVICEINFO_OLD, READWRITE, struct_usb_device_info_old_sz);
  449. _(USB_DEVICESTATS, WRITE, struct_usb_device_stats_sz);
  450. _(USB_GET_REPORT_DESC, WRITE, struct_usb_ctl_report_desc_sz);
  451. _(USB_SET_IMMED, READ, sizeof(int));
  452. _(USB_GET_REPORT, READWRITE, struct_usb_ctl_report_sz);
  453. _(USB_SET_REPORT, READ, struct_usb_ctl_report_sz);
  454. _(USB_GET_REPORT_ID, WRITE, sizeof(int));
  455. _(USB_GET_CONFIG, WRITE, sizeof(int));
  456. _(USB_SET_CONFIG, READ, sizeof(int));
  457. _(USB_GET_ALTINTERFACE, READWRITE, struct_usb_alt_interface_sz);
  458. _(USB_SET_ALTINTERFACE, READWRITE, struct_usb_alt_interface_sz);
  459. _(USB_GET_NO_ALT, READWRITE, struct_usb_alt_interface_sz);
  460. _(USB_GET_DEVICE_DESC, WRITE, struct_usb_device_descriptor_sz);
  461. _(USB_GET_CONFIG_DESC, READWRITE, struct_usb_config_desc_sz);
  462. _(USB_GET_INTERFACE_DESC, READWRITE, struct_usb_interface_desc_sz);
  463. _(USB_GET_ENDPOINT_DESC, READWRITE, struct_usb_endpoint_desc_sz);
  464. _(USB_GET_FULL_DESC, READWRITE, struct_usb_full_desc_sz);
  465. _(USB_GET_STRING_DESC, READWRITE, struct_usb_string_desc_sz);
  466. _(USB_DO_REQUEST, READWRITE, struct_usb_ctl_request_sz);
  467. _(USB_GET_DEVICEINFO, WRITE, struct_usb_device_info_sz);
  468. _(USB_GET_DEVICEINFO_OLD, WRITE, struct_usb_device_info_old_sz);
  469. _(USB_SET_SHORT_XFER, READ, sizeof(int));
  470. _(USB_SET_TIMEOUT, READ, sizeof(int));
  471. _(USB_SET_BULK_RA, READ, sizeof(int));
  472. _(USB_SET_BULK_WB, READ, sizeof(int));
  473. _(USB_SET_BULK_RA_OPT, READ, struct_usb_bulk_ra_wb_opt_sz);
  474. _(USB_SET_BULK_WB_OPT, READ, struct_usb_bulk_ra_wb_opt_sz);
  475. _(USB_GET_CM_OVER_DATA, WRITE, sizeof(int));
  476. _(USB_SET_CM_OVER_DATA, READ, sizeof(int));
  477. /* Entries from file: dev/usb/utoppy.h */
  478. _(UTOPPYIOTURBO, READ, sizeof(int));
  479. _(UTOPPYIOREBOOT, NONE, 0);
  480. _(UTOPPYIOSTATS, WRITE, struct_utoppy_stats_sz);
  481. _(UTOPPYIORENAME, READ, struct_utoppy_rename_sz);
  482. _(UTOPPYIOMKDIR, READ, sizeof(uptr));
  483. _(UTOPPYIODELETE, READ, sizeof(uptr));
  484. _(UTOPPYIOREADDIR, READ, sizeof(uptr));
  485. _(UTOPPYIOREADFILE, READ, struct_utoppy_readfile_sz);
  486. _(UTOPPYIOWRITEFILE, READ, struct_utoppy_writefile_sz);
  487. /* Entries from file: dev/vme/xio.h */
  488. _(DIOSXDCMD, READWRITE, struct_xd_iocmd_sz);
  489. /* Entries from file: dev/wscons/wsdisplay_usl_io.h */
  490. _(VT_OPENQRY, WRITE, sizeof(int));
  491. _(VT_SETMODE, READ, struct_vt_mode_sz);
  492. _(VT_GETMODE, WRITE, struct_vt_mode_sz);
  493. _(VT_RELDISP, NONE, 0);
  494. _(VT_ACTIVATE, NONE, 0);
  495. _(VT_WAITACTIVE, NONE, 0);
  496. _(VT_GETACTIVE, WRITE, sizeof(int));
  497. _(VT_GETSTATE, WRITE, struct_vt_stat_sz);
  498. _(KDGETKBENT, READWRITE, struct_kbentry_sz);
  499. _(KDGKBMODE, WRITE, sizeof(int));
  500. _(KDSKBMODE, NONE, 0);
  501. _(KDMKTONE, NONE, 0);
  502. _(KDSETMODE, NONE, 0);
  503. _(KDENABIO, NONE, 0);
  504. _(KDDISABIO, NONE, 0);
  505. _(KDGKBTYPE, WRITE, sizeof(char));
  506. _(KDGETLED, WRITE, sizeof(int));
  507. _(KDSETLED, NONE, 0);
  508. _(KDSETRAD, NONE, 0);
  509. _(VGAPCVTID, READWRITE, struct_pcvtid_sz);
  510. _(CONS_GETVERS, WRITE, sizeof(int));
  511. /* Entries from file: dev/wscons/wsconsio.h */
  512. _(WSKBDIO_GTYPE, WRITE, sizeof(unsigned int));
  513. _(WSKBDIO_BELL, NONE, 0);
  514. _(WSKBDIO_COMPLEXBELL, READ, struct_wskbd_bell_data_sz);
  515. _(WSKBDIO_SETBELL, READ, struct_wskbd_bell_data_sz);
  516. _(WSKBDIO_GETBELL, WRITE, struct_wskbd_bell_data_sz);
  517. _(WSKBDIO_SETDEFAULTBELL, READ, struct_wskbd_bell_data_sz);
  518. _(WSKBDIO_GETDEFAULTBELL, WRITE, struct_wskbd_bell_data_sz);
  519. _(WSKBDIO_SETKEYREPEAT, READ, struct_wskbd_keyrepeat_data_sz);
  520. _(WSKBDIO_GETKEYREPEAT, WRITE, struct_wskbd_keyrepeat_data_sz);
  521. _(WSKBDIO_SETDEFAULTKEYREPEAT, READ, struct_wskbd_keyrepeat_data_sz);
  522. _(WSKBDIO_GETDEFAULTKEYREPEAT, WRITE, struct_wskbd_keyrepeat_data_sz);
  523. _(WSKBDIO_SETLEDS, READ, sizeof(int));
  524. _(WSKBDIO_GETLEDS, WRITE, sizeof(int));
  525. _(WSKBDIO_GETMAP, READWRITE, struct_wskbd_map_data_sz);
  526. _(WSKBDIO_SETMAP, READ, struct_wskbd_map_data_sz);
  527. _(WSKBDIO_GETENCODING, WRITE, sizeof(int));
  528. _(WSKBDIO_SETENCODING, READ, sizeof(int));
  529. _(WSKBDIO_SETMODE, READ, sizeof(int));
  530. _(WSKBDIO_GETMODE, WRITE, sizeof(int));
  531. _(WSKBDIO_SETKEYCLICK, READ, sizeof(int));
  532. _(WSKBDIO_GETKEYCLICK, WRITE, sizeof(int));
  533. _(WSKBDIO_GETSCROLL, WRITE, struct_wskbd_scroll_data_sz);
  534. _(WSKBDIO_SETSCROLL, READ, struct_wskbd_scroll_data_sz);
  535. _(WSKBDIO_SETVERSION, READ, sizeof(int));
  536. _(WSMOUSEIO_GTYPE, WRITE, sizeof(unsigned int));
  537. _(WSMOUSEIO_SRES, READ, sizeof(unsigned int));
  538. _(WSMOUSEIO_SSCALE, READ, sizeof(unsigned int));
  539. _(WSMOUSEIO_SRATE, READ, sizeof(unsigned int));
  540. _(WSMOUSEIO_SCALIBCOORDS, READ, struct_wsmouse_calibcoords_sz);
  541. _(WSMOUSEIO_GCALIBCOORDS, WRITE, struct_wsmouse_calibcoords_sz);
  542. _(WSMOUSEIO_GETID, READWRITE, struct_wsmouse_id_sz);
  543. _(WSMOUSEIO_GETREPEAT, WRITE, struct_wsmouse_repeat_sz);
  544. _(WSMOUSEIO_SETREPEAT, READ, struct_wsmouse_repeat_sz);
  545. _(WSMOUSEIO_SETVERSION, READ, sizeof(int));
  546. _(WSDISPLAYIO_GTYPE, WRITE, sizeof(unsigned int));
  547. _(WSDISPLAYIO_GINFO, WRITE, struct_wsdisplay_fbinfo_sz);
  548. _(WSDISPLAYIO_GETCMAP, READ, struct_wsdisplay_cmap_sz);
  549. _(WSDISPLAYIO_PUTCMAP, READ, struct_wsdisplay_cmap_sz);
  550. _(WSDISPLAYIO_GVIDEO, WRITE, sizeof(unsigned int));
  551. _(WSDISPLAYIO_SVIDEO, READ, sizeof(unsigned int));
  552. _(WSDISPLAYIO_GCURPOS, WRITE, struct_wsdisplay_curpos_sz);
  553. _(WSDISPLAYIO_SCURPOS, READ, struct_wsdisplay_curpos_sz);
  554. _(WSDISPLAYIO_GCURMAX, WRITE, struct_wsdisplay_curpos_sz);
  555. _(WSDISPLAYIO_GCURSOR, READWRITE, struct_wsdisplay_cursor_sz);
  556. _(WSDISPLAYIO_SCURSOR, READ, struct_wsdisplay_cursor_sz);
  557. _(WSDISPLAYIO_GMODE, WRITE, sizeof(unsigned int));
  558. _(WSDISPLAYIO_SMODE, READ, sizeof(unsigned int));
  559. _(WSDISPLAYIO_LDFONT, READ, struct_wsdisplay_font_sz);
  560. _(WSDISPLAYIO_ADDSCREEN, READ, struct_wsdisplay_addscreendata_sz);
  561. _(WSDISPLAYIO_DELSCREEN, READ, struct_wsdisplay_delscreendata_sz);
  562. _(WSDISPLAYIO_SFONT, READ, struct_wsdisplay_usefontdata_sz);
  563. _(_O_WSDISPLAYIO_SETKEYBOARD, READWRITE, struct_wsdisplay_kbddata_sz);
  564. _(WSDISPLAYIO_GETPARAM, READWRITE, struct_wsdisplay_param_sz);
  565. _(WSDISPLAYIO_SETPARAM, READWRITE, struct_wsdisplay_param_sz);
  566. _(WSDISPLAYIO_GETACTIVESCREEN, WRITE, sizeof(int));
  567. _(WSDISPLAYIO_GETWSCHAR, READWRITE, struct_wsdisplay_char_sz);
  568. _(WSDISPLAYIO_PUTWSCHAR, READWRITE, struct_wsdisplay_char_sz);
  569. _(WSDISPLAYIO_DGSCROLL, WRITE, struct_wsdisplay_scroll_data_sz);
  570. _(WSDISPLAYIO_DSSCROLL, READ, struct_wsdisplay_scroll_data_sz);
  571. _(WSDISPLAYIO_GMSGATTRS, WRITE, struct_wsdisplay_msgattrs_sz);
  572. _(WSDISPLAYIO_SMSGATTRS, READ, struct_wsdisplay_msgattrs_sz);
  573. _(WSDISPLAYIO_GBORDER, WRITE, sizeof(int));
  574. _(WSDISPLAYIO_SBORDER, READ, sizeof(int));
  575. _(WSDISPLAYIO_SSPLASH, READ, sizeof(int));
  576. _(WSDISPLAYIO_SPROGRESS, READ, sizeof(int));
  577. _(WSDISPLAYIO_LINEBYTES, WRITE, sizeof(unsigned int));
  578. _(WSDISPLAYIO_SETVERSION, READ, sizeof(int));
  579. _(WSMUXIO_ADD_DEVICE, READ, struct_wsmux_device_sz);
  580. _(WSMUXIO_REMOVE_DEVICE, READ, struct_wsmux_device_sz);
  581. _(WSMUXIO_LIST_DEVICES, READWRITE, struct_wsmux_device_list_sz);
  582. _(WSMUXIO_INJECTEVENT, READ, struct_wscons_event_sz);
  583. _(WSDISPLAYIO_GET_BUSID, WRITE, struct_wsdisplayio_bus_id_sz);
  584. _(WSDISPLAYIO_GET_EDID, READWRITE, struct_wsdisplayio_edid_info_sz);
  585. _(WSDISPLAYIO_SET_POLLING, READ, sizeof(int));
  586. _(WSDISPLAYIO_GET_FBINFO, READWRITE, struct_wsdisplayio_fbinfo_sz);
  587. _(WSDISPLAYIO_DOBLIT, READWRITE, struct_wsdisplayio_blit_sz);
  588. _(WSDISPLAYIO_WAITBLIT, READWRITE, struct_wsdisplayio_blit_sz);
  589. /* Entries from file: dev/biovar.h */
  590. _(BIOCLOCATE, READWRITE, struct_bio_locate_sz);
  591. _(BIOCINQ, READWRITE, struct_bioc_inq_sz);
  592. _(BIOCDISK_NOVOL, READWRITE, struct_bioc_disk_sz);
  593. _(BIOCDISK, READWRITE, struct_bioc_disk_sz);
  594. _(BIOCVOL, READWRITE, struct_bioc_vol_sz);
  595. _(BIOCALARM, READWRITE, struct_bioc_alarm_sz);
  596. _(BIOCBLINK, READWRITE, struct_bioc_blink_sz);
  597. _(BIOCSETSTATE, READWRITE, struct_bioc_setstate_sz);
  598. _(BIOCVOLOPS, READWRITE, struct_bioc_volops_sz);
  599. /* Entries from file: dev/md.h */
  600. _(MD_GETCONF, WRITE, struct_md_conf_sz);
  601. _(MD_SETCONF, READ, struct_md_conf_sz);
  602. /* Entries from file: dev/ccdvar.h */
  603. _(CCDIOCSET, READWRITE, struct_ccd_ioctl_sz);
  604. _(CCDIOCCLR, READ, struct_ccd_ioctl_sz);
  605. /* Entries from file: dev/cgdvar.h */
  606. _(CGDIOCSET, READWRITE, struct_cgd_ioctl_sz);
  607. _(CGDIOCCLR, READ, struct_cgd_ioctl_sz);
  608. _(CGDIOCGET, READWRITE, struct_cgd_user_sz);
  609. /* Entries from file: dev/fssvar.h */
  610. _(FSSIOCSET, READ, struct_fss_set_sz);
  611. _(FSSIOCGET, WRITE, struct_fss_get_sz);
  612. _(FSSIOCCLR, NONE, 0);
  613. _(FSSIOFSET, READ, sizeof(int));
  614. _(FSSIOFGET, WRITE, sizeof(int));
  615. /* Entries from file: dev/bluetooth/btdev.h */
  616. _(BTDEV_ATTACH, READ, struct_plistref_sz);
  617. _(BTDEV_DETACH, READ, struct_plistref_sz);
  618. /* Entries from file: dev/bluetooth/btsco.h */
  619. _(BTSCO_GETINFO, WRITE, struct_btsco_info_sz);
  620. /* Entries from file: dev/kttcpio.h */
  621. _(KTTCP_IO_SEND, READWRITE, struct_kttcp_io_args_sz);
  622. _(KTTCP_IO_RECV, READWRITE, struct_kttcp_io_args_sz);
  623. /* Entries from file: dev/lockstat.h */
  624. _(IOC_LOCKSTAT_GVERSION, WRITE, sizeof(int));
  625. _(IOC_LOCKSTAT_ENABLE, READ, struct_lsenable_sz);
  626. _(IOC_LOCKSTAT_DISABLE, WRITE, struct_lsdisable_sz);
  627. /* Entries from file: dev/vndvar.h */
  628. _(VNDIOCSET, READWRITE, struct_vnd_ioctl_sz);
  629. _(VNDIOCCLR, READ, struct_vnd_ioctl_sz);
  630. _(VNDIOCGET, READWRITE, struct_vnd_user_sz);
  631. /* Entries from file: dev/spkrio.h */
  632. _(SPKRTONE, READ, struct_tone_sz);
  633. _(SPKRTUNE, NONE, 0);
  634. _(SPKRGETVOL, WRITE, sizeof(unsigned int));
  635. _(SPKRSETVOL, READ, sizeof(unsigned int));
  636. #if defined(__x86_64__)
  637. /* Entries from file: dev/nvmm/nvmm_ioctl.h */
  638. _(NVMM_IOC_CAPABILITY, WRITE, struct_nvmm_ioc_capability_sz);
  639. _(NVMM_IOC_MACHINE_CREATE, READWRITE, struct_nvmm_ioc_machine_create_sz);
  640. _(NVMM_IOC_MACHINE_DESTROY, READ, struct_nvmm_ioc_machine_destroy_sz);
  641. _(NVMM_IOC_MACHINE_CONFIGURE, READ, struct_nvmm_ioc_machine_configure_sz);
  642. _(NVMM_IOC_VCPU_CREATE, READ, struct_nvmm_ioc_vcpu_create_sz);
  643. _(NVMM_IOC_VCPU_DESTROY, READ, struct_nvmm_ioc_vcpu_destroy_sz);
  644. _(NVMM_IOC_VCPU_CONFIGURE, READ, struct_nvmm_ioc_vcpu_configure_sz);
  645. _(NVMM_IOC_VCPU_SETSTATE, READ, struct_nvmm_ioc_vcpu_setstate_sz);
  646. _(NVMM_IOC_VCPU_GETSTATE, READ, struct_nvmm_ioc_vcpu_getstate_sz);
  647. _(NVMM_IOC_VCPU_INJECT, READ, struct_nvmm_ioc_vcpu_inject_sz);
  648. _(NVMM_IOC_VCPU_RUN, READWRITE, struct_nvmm_ioc_vcpu_run_sz);
  649. _(NVMM_IOC_GPA_MAP, READ, struct_nvmm_ioc_gpa_map_sz);
  650. _(NVMM_IOC_GPA_UNMAP, READ, struct_nvmm_ioc_gpa_unmap_sz);
  651. _(NVMM_IOC_HVA_MAP, READ, struct_nvmm_ioc_hva_map_sz);
  652. _(NVMM_IOC_HVA_UNMAP, READ, struct_nvmm_ioc_hva_unmap_sz);
  653. _(NVMM_IOC_CTL, READ, struct_nvmm_ioc_ctl_sz);
  654. #endif
  655. /* Entries from file: dev/spi/spi_io.h */
  656. _(SPI_IOCTL_CONFIGURE, READ, struct_spi_ioctl_configure_sz);
  657. _(SPI_IOCTL_TRANSFER, READ, struct_spi_ioctl_transfer_sz);
  658. /* Entries from file: fs/autofs/autofs_ioctl.h */
  659. _(AUTOFSREQUEST, WRITE, struct_autofs_daemon_request_sz);
  660. _(AUTOFSDONE, READ, struct_autofs_daemon_done_sz);
  661. /* Entries from file: net/bpf.h */
  662. _(BIOCGBLEN, WRITE, sizeof(unsigned int));
  663. _(BIOCSBLEN, READWRITE, sizeof(unsigned int));
  664. _(BIOCSETF, READ, struct_bpf_program_sz);
  665. _(BIOCFLUSH, NONE, 0);
  666. _(BIOCPROMISC, NONE, 0);
  667. _(BIOCGDLT, WRITE, sizeof(unsigned int));
  668. _(BIOCGETIF, WRITE, struct_ifreq_sz);
  669. _(BIOCSETIF, READ, struct_ifreq_sz);
  670. _(BIOCGSTATS, WRITE, struct_bpf_stat_sz);
  671. _(BIOCGSTATSOLD, WRITE, struct_bpf_stat_old_sz);
  672. _(BIOCIMMEDIATE, READ, sizeof(unsigned int));
  673. _(BIOCVERSION, WRITE, struct_bpf_version_sz);
  674. _(BIOCSTCPF, READ, struct_bpf_program_sz);
  675. _(BIOCSUDPF, READ, struct_bpf_program_sz);
  676. _(BIOCGHDRCMPLT, WRITE, sizeof(unsigned int));
  677. _(BIOCSHDRCMPLT, READ, sizeof(unsigned int));
  678. _(BIOCSDLT, READ, sizeof(unsigned int));
  679. _(BIOCGDLTLIST, READWRITE, struct_bpf_dltlist_sz);
  680. _(BIOCGDIRECTION, WRITE, sizeof(unsigned int));
  681. _(BIOCSDIRECTION, READ, sizeof(unsigned int));
  682. _(BIOCSRTIMEOUT, READ, struct_timeval_sz);
  683. _(BIOCGRTIMEOUT, WRITE, struct_timeval_sz);
  684. _(BIOCGFEEDBACK, WRITE, sizeof(unsigned int));
  685. _(BIOCSFEEDBACK, READ, sizeof(unsigned int));
  686. /* Entries from file: net/if_gre.h */
  687. _(GRESADDRS, READ, struct_ifreq_sz);
  688. _(GRESADDRD, READ, struct_ifreq_sz);
  689. _(GREGADDRS, READWRITE, struct_ifreq_sz);
  690. _(GREGADDRD, READWRITE, struct_ifreq_sz);
  691. _(GRESPROTO, READ, struct_ifreq_sz);
  692. _(GREGPROTO, READWRITE, struct_ifreq_sz);
  693. _(GRESSOCK, READ, struct_ifreq_sz);
  694. _(GREDSOCK, READ, struct_ifreq_sz);
  695. /* Entries from file: net/if_ppp.h */
  696. _(PPPIOCGRAWIN, WRITE, struct_ppp_rawin_sz);
  697. _(PPPIOCGFLAGS, WRITE, sizeof(int));
  698. _(PPPIOCSFLAGS, READ, sizeof(int));
  699. _(PPPIOCGASYNCMAP, WRITE, sizeof(int));
  700. _(PPPIOCSASYNCMAP, READ, sizeof(int));
  701. _(PPPIOCGUNIT, WRITE, sizeof(int));
  702. _(PPPIOCGRASYNCMAP, WRITE, sizeof(int));
  703. _(PPPIOCSRASYNCMAP, READ, sizeof(int));
  704. _(PPPIOCGMRU, WRITE, sizeof(int));
  705. _(PPPIOCSMRU, READ, sizeof(int));
  706. _(PPPIOCSMAXCID, READ, sizeof(int));
  707. _(PPPIOCGXASYNCMAP, WRITE, (8 * sizeof(u32)));
  708. _(PPPIOCSXASYNCMAP, READ, (8 * sizeof(u32)));
  709. _(PPPIOCXFERUNIT, NONE, 0);
  710. _(PPPIOCSCOMPRESS, READ, struct_ppp_option_data_sz);
  711. _(PPPIOCGNPMODE, READWRITE, struct_npioctl_sz);
  712. _(PPPIOCSNPMODE, READ, struct_npioctl_sz);
  713. _(PPPIOCGIDLE, WRITE, struct_ppp_idle_sz);
  714. _(PPPIOCGMTU, WRITE, sizeof(int));
  715. _(PPPIOCSMTU, READ, sizeof(int));
  716. _(SIOCGPPPSTATS, READWRITE, struct_ifpppstatsreq_sz);
  717. _(SIOCGPPPCSTATS, READWRITE, struct_ifpppcstatsreq_sz);
  718. /* Entries from file: net/npf.h */
  719. _(IOC_NPF_VERSION, WRITE, sizeof(int));
  720. _(IOC_NPF_SWITCH, READ, sizeof(int));
  721. _(IOC_NPF_LOAD, READWRITE, struct_nvlist_ref_sz);
  722. _(IOC_NPF_TABLE, READ, struct_npf_ioctl_table_sz);
  723. _(IOC_NPF_STATS, READ, sizeof(uptr));
  724. _(IOC_NPF_SAVE, WRITE, struct_nvlist_ref_sz);
  725. _(IOC_NPF_RULE, READWRITE, struct_nvlist_ref_sz);
  726. _(IOC_NPF_CONN_LOOKUP, READWRITE, struct_nvlist_ref_sz);
  727. _(IOC_NPF_TABLE_REPLACE, READWRITE, struct_nvlist_ref_sz);
  728. /* Entries from file: net/if_pppoe.h */
  729. _(PPPOESETPARMS, READ, struct_pppoediscparms_sz);
  730. _(PPPOEGETPARMS, READWRITE, struct_pppoediscparms_sz);
  731. _(PPPOEGETSESSION, READWRITE, struct_pppoeconnectionstate_sz);
  732. /* Entries from file: net/if_sppp.h */
  733. _(SPPPGETAUTHCFG, READWRITE, struct_spppauthcfg_sz);
  734. _(SPPPSETAUTHCFG, READ, struct_spppauthcfg_sz);
  735. _(SPPPGETLCPCFG, READWRITE, struct_sppplcpcfg_sz);
  736. _(SPPPSETLCPCFG, READ, struct_sppplcpcfg_sz);
  737. _(SPPPGETSTATUS, READWRITE, struct_spppstatus_sz);
  738. _(SPPPGETSTATUSNCP, READWRITE, struct_spppstatusncp_sz);
  739. _(SPPPGETIDLETO, READWRITE, struct_spppidletimeout_sz);
  740. _(SPPPSETIDLETO, READ, struct_spppidletimeout_sz);
  741. _(SPPPGETAUTHFAILURES, READWRITE, struct_spppauthfailurestats_sz);
  742. _(SPPPSETAUTHFAILURE, READ, struct_spppauthfailuresettings_sz);
  743. _(SPPPSETDNSOPTS, READ, struct_spppdnssettings_sz);
  744. _(SPPPGETDNSOPTS, READWRITE, struct_spppdnssettings_sz);
  745. _(SPPPGETDNSADDRS, READWRITE, struct_spppdnsaddrs_sz);
  746. _(SPPPSETKEEPALIVE, READ, struct_spppkeepalivesettings_sz);
  747. _(SPPPGETKEEPALIVE, READWRITE, struct_spppkeepalivesettings_sz);
  748. /* Entries from file: net/if_srt.h */
  749. _(SRT_GETNRT, WRITE, sizeof(unsigned int));
  750. _(SRT_GETRT, READWRITE, struct_srt_rt_sz);
  751. _(SRT_SETRT, READ, struct_srt_rt_sz);
  752. _(SRT_DELRT, READ, sizeof(unsigned int));
  753. _(SRT_SFLAGS, READ, sizeof(unsigned int));
  754. _(SRT_GFLAGS, WRITE, sizeof(unsigned int));
  755. _(SRT_SGFLAGS, READWRITE, sizeof(unsigned int));
  756. _(SRT_DEBUG, READ, sizeof(uptr));
  757. /* Entries from file: net/if_tap.h */
  758. _(TAPGIFNAME, WRITE, struct_ifreq_sz);
  759. /* Entries from file: net/if_tun.h */
  760. _(TUNSDEBUG, READ, sizeof(int));
  761. _(TUNGDEBUG, WRITE, sizeof(int));
  762. _(TUNSIFMODE, READ, sizeof(int));
  763. _(TUNSIFHEAD, READ, sizeof(int));
  764. _(TUNGIFHEAD, WRITE, sizeof(int));
  765. /* Entries from file: net/pfvar.h */
  766. _(DIOCSTART, NONE, 0);
  767. _(DIOCSTOP, NONE, 0);
  768. _(DIOCADDRULE, READWRITE, struct_pfioc_rule_sz);
  769. _(DIOCGETRULES, READWRITE, struct_pfioc_rule_sz);
  770. _(DIOCGETRULE, READWRITE, struct_pfioc_rule_sz);
  771. _(DIOCSETLCK, READWRITE, sizeof(u32));
  772. _(DIOCCLRSTATES, READWRITE, struct_pfioc_state_kill_sz);
  773. _(DIOCGETSTATE, READWRITE, struct_pfioc_state_sz);
  774. _(DIOCSETSTATUSIF, READWRITE, struct_pfioc_if_sz);
  775. _(DIOCGETSTATUS, READWRITE, struct_pf_status_sz);
  776. _(DIOCCLRSTATUS, NONE, 0);
  777. _(DIOCNATLOOK, READWRITE, struct_pfioc_natlook_sz);
  778. _(DIOCSETDEBUG, READWRITE, sizeof(u32));
  779. _(DIOCGETSTATES, READWRITE, struct_pfioc_states_sz);
  780. _(DIOCCHANGERULE, READWRITE, struct_pfioc_rule_sz);
  781. _(DIOCSETTIMEOUT, READWRITE, struct_pfioc_tm_sz);
  782. _(DIOCGETTIMEOUT, READWRITE, struct_pfioc_tm_sz);
  783. _(DIOCADDSTATE, READWRITE, struct_pfioc_state_sz);
  784. _(DIOCCLRRULECTRS, NONE, 0);
  785. _(DIOCGETLIMIT, READWRITE, struct_pfioc_limit_sz);
  786. _(DIOCSETLIMIT, READWRITE, struct_pfioc_limit_sz);
  787. _(DIOCKILLSTATES, READWRITE, struct_pfioc_state_kill_sz);
  788. _(DIOCSTARTALTQ, NONE, 0);
  789. _(DIOCSTOPALTQ, NONE, 0);
  790. _(DIOCADDALTQ, READWRITE, struct_pfioc_altq_sz);
  791. _(DIOCGETALTQS, READWRITE, struct_pfioc_altq_sz);
  792. _(DIOCGETALTQ, READWRITE, struct_pfioc_altq_sz);
  793. _(DIOCCHANGEALTQ, READWRITE, struct_pfioc_altq_sz);
  794. _(DIOCGETQSTATS, READWRITE, struct_pfioc_qstats_sz);
  795. _(DIOCBEGINADDRS, READWRITE, struct_pfioc_pooladdr_sz);
  796. _(DIOCADDADDR, READWRITE, struct_pfioc_pooladdr_sz);
  797. _(DIOCGETADDRS, READWRITE, struct_pfioc_pooladdr_sz);
  798. _(DIOCGETADDR, READWRITE, struct_pfioc_pooladdr_sz);
  799. _(DIOCCHANGEADDR, READWRITE, struct_pfioc_pooladdr_sz);
  800. _(DIOCADDSTATES, READWRITE, struct_pfioc_states_sz);
  801. _(DIOCGETRULESETS, READWRITE, struct_pfioc_ruleset_sz);
  802. _(DIOCGETRULESET, READWRITE, struct_pfioc_ruleset_sz);
  803. _(DIOCRCLRTABLES, READWRITE, struct_pfioc_table_sz);
  804. _(DIOCRADDTABLES, READWRITE, struct_pfioc_table_sz);
  805. _(DIOCRDELTABLES, READWRITE, struct_pfioc_table_sz);
  806. _(DIOCRGETTABLES, READWRITE, struct_pfioc_table_sz);
  807. _(DIOCRGETTSTATS, READWRITE, struct_pfioc_table_sz);
  808. _(DIOCRCLRTSTATS, READWRITE, struct_pfioc_table_sz);
  809. _(DIOCRCLRADDRS, READWRITE, struct_pfioc_table_sz);
  810. _(DIOCRADDADDRS, READWRITE, struct_pfioc_table_sz);
  811. _(DIOCRDELADDRS, READWRITE, struct_pfioc_table_sz);
  812. _(DIOCRSETADDRS, READWRITE, struct_pfioc_table_sz);
  813. _(DIOCRGETADDRS, READWRITE, struct_pfioc_table_sz);
  814. _(DIOCRGETASTATS, READWRITE, struct_pfioc_table_sz);
  815. _(DIOCRCLRASTATS, READWRITE, struct_pfioc_table_sz);
  816. _(DIOCRTSTADDRS, READWRITE, struct_pfioc_table_sz);
  817. _(DIOCRSETTFLAGS, READWRITE, struct_pfioc_table_sz);
  818. _(DIOCRINADEFINE, READWRITE, struct_pfioc_table_sz);
  819. _(DIOCOSFPFLUSH, NONE, 0);
  820. _(DIOCOSFPADD, READWRITE, struct_pf_osfp_ioctl_sz);
  821. _(DIOCOSFPGET, READWRITE, struct_pf_osfp_ioctl_sz);
  822. _(DIOCXBEGIN, READWRITE, struct_pfioc_trans_sz);
  823. _(DIOCXCOMMIT, READWRITE, struct_pfioc_trans_sz);
  824. _(DIOCXROLLBACK, READWRITE, struct_pfioc_trans_sz);
  825. _(DIOCGETSRCNODES, READWRITE, struct_pfioc_src_nodes_sz);
  826. _(DIOCCLRSRCNODES, NONE, 0);
  827. _(DIOCSETHOSTID, READWRITE, sizeof(u32));
  828. _(DIOCIGETIFACES, READWRITE, struct_pfioc_iface_sz);
  829. _(DIOCSETIFFLAG, READWRITE, struct_pfioc_iface_sz);
  830. _(DIOCCLRIFFLAG, READWRITE, struct_pfioc_iface_sz);
  831. _(DIOCKILLSRCNODES, READWRITE, struct_pfioc_src_node_kill_sz);
  832. /* Entries from file: netbt/hci.h */
  833. _(SIOCGBTINFO, READWRITE, struct_btreq_sz);
  834. _(SIOCGBTINFOA, READWRITE, struct_btreq_sz);
  835. _(SIOCNBTINFO, READWRITE, struct_btreq_sz);
  836. _(SIOCSBTFLAGS, READWRITE, struct_btreq_sz);
  837. _(SIOCSBTPOLICY, READWRITE, struct_btreq_sz);
  838. _(SIOCSBTPTYPE, READWRITE, struct_btreq_sz);
  839. _(SIOCGBTSTATS, READWRITE, struct_btreq_sz);
  840. _(SIOCZBTSTATS, READWRITE, struct_btreq_sz);
  841. _(SIOCBTDUMP, READ, struct_btreq_sz);
  842. _(SIOCSBTSCOMTU, READWRITE, struct_btreq_sz);
  843. _(SIOCGBTFEAT, READWRITE, struct_btreq_sz);
  844. /* Entries from file: netinet/ip_nat.h */
  845. _(SIOCADNAT, READ, struct_ipfobj_sz);
  846. _(SIOCRMNAT, READ, struct_ipfobj_sz);
  847. _(SIOCGNATS, READWRITE, struct_ipfobj_sz);
  848. _(SIOCGNATL, READWRITE, struct_ipfobj_sz);
  849. _(SIOCPURGENAT, READWRITE, struct_ipfobj_sz);
  850. /* Entries from file: netinet/sctp_uio.h */
  851. _(SIOCCONNECTX, READWRITE, struct_sctp_connectx_addrs_sz);
  852. _(SIOCCONNECTXDEL, READWRITE, struct_sctp_connectx_addrs_sz);
  853. /* Entries from file: netinet6/in6_var.h */
  854. _(SIOCSIFINFO_FLAGS, READWRITE, struct_in6_ndireq_sz);
  855. _(SIOCAADDRCTL_POLICY, READ, struct_in6_addrpolicy_sz);
  856. _(SIOCDADDRCTL_POLICY, READ, struct_in6_addrpolicy_sz);
  857. /* Entries from file: netsmb/smb_dev.h */
  858. _(SMBIOC_OPENSESSION, READ, struct_smbioc_ossn_sz);
  859. _(SMBIOC_OPENSHARE, READ, struct_smbioc_oshare_sz);
  860. _(SMBIOC_REQUEST, READWRITE, struct_smbioc_rq_sz);
  861. _(SMBIOC_SETFLAGS, READ, struct_smbioc_flags_sz);
  862. _(SMBIOC_LOOKUP, READ, struct_smbioc_lookup_sz);
  863. _(SMBIOC_READ, READWRITE, struct_smbioc_rw_sz);
  864. _(SMBIOC_WRITE, READWRITE, struct_smbioc_rw_sz);
  865. /* Entries from file: sys/agpio.h */
  866. _(AGPIOC_INFO, WRITE, struct__agp_info_sz);
  867. _(AGPIOC_ACQUIRE, NONE, 0);
  868. _(AGPIOC_RELEASE, NONE, 0);
  869. _(AGPIOC_SETUP, READ, struct__agp_setup_sz);
  870. _(AGPIOC_ALLOCATE, READWRITE, struct__agp_allocate_sz);
  871. _(AGPIOC_DEALLOCATE, READ, sizeof(int));
  872. _(AGPIOC_BIND, READ, struct__agp_bind_sz);
  873. _(AGPIOC_UNBIND, READ, struct__agp_unbind_sz);
  874. /* Entries from file: sys/audioio.h */
  875. _(AUDIO_GETINFO, WRITE, struct_audio_info_sz);
  876. _(AUDIO_SETINFO, READWRITE, struct_audio_info_sz);
  877. _(AUDIO_DRAIN, NONE, 0);
  878. _(AUDIO_FLUSH, NONE, 0);
  879. _(AUDIO_WSEEK, WRITE, sizeof(unsigned long));
  880. _(AUDIO_RERROR, WRITE, sizeof(int));
  881. _(AUDIO_GETDEV, WRITE, struct_audio_device_sz);
  882. _(AUDIO_GETENC, READWRITE, struct_audio_encoding_sz);
  883. _(AUDIO_GETFD, WRITE, sizeof(int));
  884. _(AUDIO_SETFD, READWRITE, sizeof(int));
  885. _(AUDIO_PERROR, WRITE, sizeof(int));
  886. _(AUDIO_GETIOFFS, WRITE, struct_audio_offset_sz);
  887. _(AUDIO_GETOOFFS, WRITE, struct_audio_offset_sz);
  888. _(AUDIO_GETPROPS, WRITE, sizeof(int));
  889. _(AUDIO_GETBUFINFO, WRITE, struct_audio_info_sz);
  890. _(AUDIO_SETCHAN, READ, sizeof(int));
  891. _(AUDIO_GETCHAN, WRITE, sizeof(int));
  892. _(AUDIO_QUERYFORMAT, READWRITE, struct_audio_format_query_sz);
  893. _(AUDIO_GETFORMAT, WRITE, struct_audio_info_sz);
  894. _(AUDIO_SETFORMAT, READ, struct_audio_info_sz);
  895. _(AUDIO_MIXER_READ, READWRITE, struct_mixer_ctrl_sz);
  896. _(AUDIO_MIXER_WRITE, READWRITE, struct_mixer_ctrl_sz);
  897. _(AUDIO_MIXER_DEVINFO, READWRITE, struct_mixer_devinfo_sz);
  898. /* Entries from file: sys/ataio.h */
  899. _(ATAIOCCOMMAND, READWRITE, struct_atareq_sz);
  900. _(ATABUSIOSCAN, READ, struct_atabusioscan_args_sz);
  901. _(ATABUSIORESET, NONE, 0);
  902. _(ATABUSIODETACH, READ, struct_atabusiodetach_args_sz);
  903. /* Entries from file: sys/cdio.h */
  904. _(CDIOCPLAYTRACKS, READ, struct_ioc_play_track_sz);
  905. _(CDIOCPLAYBLOCKS, READ, struct_ioc_play_blocks_sz);
  906. _(CDIOCREADSUBCHANNEL, READWRITE, struct_ioc_read_subchannel_sz);
  907. _(CDIOREADTOCHEADER, WRITE, struct_ioc_toc_header_sz);
  908. _(CDIOREADTOCENTRIES, READWRITE, struct_ioc_read_toc_entry_sz);
  909. _(CDIOREADMSADDR, READWRITE, sizeof(int));
  910. _(CDIOCSETPATCH, READ, struct_ioc_patch_sz);
  911. _(CDIOCGETVOL, WRITE, struct_ioc_vol_sz);
  912. _(CDIOCSETVOL, READ, struct_ioc_vol_sz);
  913. _(CDIOCSETMONO, NONE, 0);
  914. _(CDIOCSETSTEREO, NONE, 0);
  915. _(CDIOCSETMUTE, NONE, 0);
  916. _(CDIOCSETLEFT, NONE, 0);
  917. _(CDIOCSETRIGHT, NONE, 0);
  918. _(CDIOCSETDEBUG, NONE, 0);
  919. _(CDIOCCLRDEBUG, NONE, 0);
  920. _(CDIOCPAUSE, NONE, 0);
  921. _(CDIOCRESUME, NONE, 0);
  922. _(CDIOCRESET, NONE, 0);
  923. _(CDIOCSTART, NONE, 0);
  924. _(CDIOCSTOP, NONE, 0);
  925. _(CDIOCEJECT, NONE, 0);
  926. _(CDIOCALLOW, NONE, 0);
  927. _(CDIOCPREVENT, NONE, 0);
  928. _(CDIOCCLOSE, NONE, 0);
  929. _(CDIOCPLAYMSF, READ, struct_ioc_play_msf_sz);
  930. _(CDIOCLOADUNLOAD, READ, struct_ioc_load_unload_sz);
  931. /* Entries from file: sys/chio.h */
  932. _(CHIOMOVE, READ, struct_changer_move_request_sz);
  933. _(CHIOEXCHANGE, READ, struct_changer_exchange_request_sz);
  934. _(CHIOPOSITION, READ, struct_changer_position_request_sz);
  935. _(CHIOSPICKER, READ, sizeof(int));
  936. _(CHIOGPARAMS, WRITE, struct_changer_params_sz);
  937. _(CHIOIELEM, NONE, 0);
  938. _(OCHIOGSTATUS, READ, struct_ochanger_element_status_request_sz);
  939. _(CHIOGSTATUS, READ, struct_changer_element_status_request_sz);
  940. _(CHIOSVOLTAG, READ, struct_changer_set_voltag_request_sz);
  941. /* Entries from file: sys/clockctl.h */
  942. _(CLOCKCTL_SETTIMEOFDAY, READ, struct_clockctl_settimeofday_sz);
  943. _(CLOCKCTL_ADJTIME, READWRITE, struct_clockctl_adjtime_sz);
  944. _(CLOCKCTL_CLOCK_SETTIME, READ, struct_clockctl_clock_settime_sz);
  945. _(CLOCKCTL_NTP_ADJTIME, READWRITE, struct_clockctl_ntp_adjtime_sz);
  946. /* Entries from file: sys/cpuio.h */
  947. _(IOC_CPU_SETSTATE, READ, struct_cpustate_sz);
  948. _(IOC_CPU_GETSTATE, READWRITE, struct_cpustate_sz);
  949. _(IOC_CPU_GETCOUNT, WRITE, sizeof(int));
  950. _(IOC_CPU_MAPID, READWRITE, sizeof(int));
  951. _(IOC_CPU_UCODE_GET_VERSION, READWRITE, struct_cpu_ucode_version_sz);
  952. _(IOC_CPU_UCODE_APPLY, READ, struct_cpu_ucode_sz);
  953. /* Entries from file: sys/dkio.h */
  954. _(DIOCGDINFO, WRITE, struct_disklabel_sz);
  955. _(DIOCSDINFO, READ, struct_disklabel_sz);
  956. _(DIOCWDINFO, READ, 0);
  957. _(DIOCRFORMAT, READWRITE, struct_format_op_sz);
  958. _(DIOCWFORMAT, READWRITE, struct_format_op_sz);
  959. _(DIOCSSTEP, READ, sizeof(int));
  960. _(DIOCSRETRIES, READ, sizeof(int));
  961. _(DIOCKLABEL, READ, sizeof(int));
  962. _(DIOCWLABEL, READ, sizeof(int));
  963. _(DIOCSBAD, READ, struct_dkbad_sz);
  964. _(DIOCEJECT, READ, sizeof(int));
  965. _(ODIOCEJECT, NONE, 0);
  966. _(DIOCLOCK, READ, sizeof(int));
  967. _(DIOCGDEFLABEL, WRITE, struct_disklabel_sz);
  968. _(DIOCCLRLABEL, NONE, 0);
  969. _(DIOCGCACHE, WRITE, sizeof(int));
  970. _(DIOCSCACHE, READ, sizeof(int));
  971. _(DIOCCACHESYNC, READ, sizeof(int));
  972. _(DIOCBSLIST, READWRITE, struct_disk_badsecinfo_sz);
  973. _(DIOCBSFLUSH, NONE, 0);
  974. _(DIOCAWEDGE, READWRITE, struct_dkwedge_info_sz);
  975. _(DIOCGWEDGEINFO, WRITE, struct_dkwedge_info_sz);
  976. _(DIOCDWEDGE, READ, struct_dkwedge_info_sz);
  977. _(DIOCLWEDGES, READWRITE, struct_dkwedge_list_sz);
  978. _(DIOCGSTRATEGY, WRITE, struct_disk_strategy_sz);
  979. _(DIOCSSTRATEGY, READ, struct_disk_strategy_sz);
  980. _(DIOCGDISKINFO, WRITE, struct_plistref_sz);
  981. _(DIOCTUR, WRITE, sizeof(int));
  982. _(DIOCMWEDGES, WRITE, sizeof(int));
  983. _(DIOCGSECTORSIZE, WRITE, sizeof(unsigned int));
  984. _(DIOCGMEDIASIZE, WRITE, sizeof(uptr));
  985. _(DIOCRMWEDGES, WRITE, sizeof(int));
  986. /* Entries from file: sys/drvctlio.h */
  987. _(DRVDETACHDEV, READ, struct_devdetachargs_sz);
  988. _(DRVRESCANBUS, READ, struct_devrescanargs_sz);
  989. _(DRVCTLCOMMAND, READWRITE, struct_plistref_sz);
  990. _(DRVRESUMEDEV, READ, struct_devpmargs_sz);
  991. _(DRVLISTDEV, READWRITE, struct_devlistargs_sz);
  992. _(DRVGETEVENT, WRITE, struct_plistref_sz);
  993. _(DRVSUSPENDDEV, READ, struct_devpmargs_sz);
  994. /* Entries from file: sys/dvdio.h */
  995. _(DVD_READ_STRUCT, READWRITE, union_dvd_struct_sz);
  996. _(DVD_WRITE_STRUCT, READWRITE, union_dvd_struct_sz);
  997. _(DVD_AUTH, READWRITE, union_dvd_authinfo_sz);
  998. /* Entries from file: sys/envsys.h */
  999. _(ENVSYS_GETDICTIONARY, READWRITE, struct_plistref_sz);
  1000. _(ENVSYS_SETDICTIONARY, READWRITE, struct_plistref_sz);
  1001. _(ENVSYS_REMOVEPROPS, READWRITE, struct_plistref_sz);
  1002. _(ENVSYS_GTREDATA, READWRITE, struct_envsys_tre_data_sz);
  1003. _(ENVSYS_GTREINFO, READWRITE, struct_envsys_basic_info_sz);
  1004. /* Entries from file: sys/event.h */
  1005. _(KFILTER_BYFILTER, READWRITE, struct_kfilter_mapping_sz);
  1006. _(KFILTER_BYNAME, READWRITE, struct_kfilter_mapping_sz);
  1007. /* Entries from file: sys/fdio.h */
  1008. _(FDIOCGETOPTS, WRITE, 0);
  1009. _(FDIOCSETOPTS, READ, sizeof(int));
  1010. _(FDIOCSETFORMAT, READ, struct_fdformat_parms_sz);
  1011. _(FDIOCGETFORMAT, WRITE, struct_fdformat_parms_sz);
  1012. _(FDIOCFORMAT_TRACK, READ, struct_fdformat_cmd_sz);
  1013. /* Entries from file: sys/filio.h */
  1014. _(FIOCLEX, NONE, 0);
  1015. _(FIONCLEX, NONE, 0);
  1016. _(FIOSEEKDATA, READWRITE, sizeof(uptr));
  1017. _(FIOSEEKHOLE, READWRITE, sizeof(uptr));
  1018. _(FIONREAD, WRITE, sizeof(int));
  1019. _(FIONBIO, READ, sizeof(int));
  1020. _(FIOASYNC, READ, sizeof(int));
  1021. _(FIOSETOWN, READ, sizeof(int));
  1022. _(FIOGETOWN, WRITE, sizeof(int));
  1023. _(OFIOGETBMAP, READWRITE, sizeof(u32));
  1024. _(FIOGETBMAP, READWRITE, sizeof(u64));
  1025. _(FIONWRITE, WRITE, sizeof(int));
  1026. _(FIONSPACE, WRITE, sizeof(int));
  1027. /* Entries from file: sys/gpio.h */
  1028. _(GPIOINFO, WRITE, struct_gpio_info_sz);
  1029. _(GPIOSET, READWRITE, struct_gpio_set_sz);
  1030. _(GPIOUNSET, READWRITE, struct_gpio_set_sz);
  1031. _(GPIOREAD, READWRITE, struct_gpio_req_sz);
  1032. _(GPIOWRITE, READWRITE, struct_gpio_req_sz);
  1033. _(GPIOTOGGLE, READWRITE, struct_gpio_req_sz);
  1034. _(GPIOATTACH, READWRITE, struct_gpio_attach_sz);
  1035. /* Entries from file: sys/ioctl.h */
  1036. _(PTIOCNETBSD, READ, struct_ioctl_pt_sz);
  1037. _(PTIOCSUNOS, READ, struct_ioctl_pt_sz);
  1038. _(PTIOCLINUX, READ, struct_ioctl_pt_sz);
  1039. _(PTIOCFREEBSD, READ, struct_ioctl_pt_sz);
  1040. _(PTIOCULTRIX, READ, struct_ioctl_pt_sz);
  1041. /* Entries from file: sys/ioctl_compat.h */
  1042. _(TIOCHPCL, NONE, 0);
  1043. _(TIOCGETP, WRITE, struct_sgttyb_sz);
  1044. _(TIOCSETP, READ, struct_sgttyb_sz);
  1045. _(TIOCSETN, READ, 0);
  1046. _(TIOCSETC, READ, struct_tchars_sz);
  1047. _(TIOCGETC, WRITE, struct_tchars_sz);
  1048. _(TIOCLBIS, READ, sizeof(int));
  1049. _(TIOCLBIC, READ, sizeof(int));
  1050. _(TIOCLSET, READ, sizeof(int));
  1051. _(TIOCLGET, WRITE, sizeof(int));
  1052. _(TIOCSLTC, READ, struct_ltchars_sz);
  1053. _(TIOCGLTC, WRITE, struct_ltchars_sz);
  1054. _(OTIOCCONS, NONE, 0);
  1055. /* Entries from file: sys/joystick.h */
  1056. _(JOY_SETTIMEOUT, READ, sizeof(int));
  1057. _(JOY_GETTIMEOUT, WRITE, sizeof(int));
  1058. _(JOY_SET_X_OFFSET, READ, sizeof(int));
  1059. _(JOY_SET_Y_OFFSET, READ, sizeof(int));
  1060. _(JOY_GET_Y_OFFSET, WRITE, sizeof(int));
  1061. /* Entries from file: sys/ksyms.h */
  1062. _(OKIOCGSYMBOL, READ, struct_ksyms_ogsymbol_sz);
  1063. _(OKIOCGVALUE, READ, struct_ksyms_ogsymbol_sz);
  1064. _(KIOCGSIZE, WRITE, sizeof(int));
  1065. _(KIOCGVALUE, READWRITE, struct_ksyms_gvalue_sz);
  1066. _(KIOCGSYMBOL, READWRITE, struct_ksyms_gsymbol_sz);
  1067. /* Entries from file: sys/lua.h */
  1068. _(LUAINFO, READWRITE, struct_lua_info_sz);
  1069. _(LUACREATE, READWRITE, struct_lua_create_sz);
  1070. _(LUADESTROY, READWRITE, struct_lua_create_sz);
  1071. _(LUAREQUIRE, READWRITE, struct_lua_require_sz);
  1072. _(LUALOAD, READWRITE, struct_lua_load_sz);
  1073. /* Entries from file: sys/midiio.h */
  1074. _(MIDI_PRETIME, READWRITE, sizeof(int));
  1075. _(MIDI_MPUMODE, READWRITE, sizeof(int));
  1076. _(MIDI_MPUCMD, READWRITE, struct_mpu_command_rec_sz);
  1077. _(SEQUENCER_RESET, NONE, 0);
  1078. _(SEQUENCER_SYNC, NONE, 0);
  1079. _(SEQUENCER_INFO, READWRITE, struct_synth_info_sz);
  1080. _(SEQUENCER_CTRLRATE, READWRITE, sizeof(int));
  1081. _(SEQUENCER_GETOUTCOUNT, WRITE, sizeof(int));
  1082. _(SEQUENCER_GETINCOUNT, WRITE, sizeof(int));
  1083. _(SEQUENCER_RESETSAMPLES, READ, sizeof(int));
  1084. _(SEQUENCER_NRSYNTHS, WRITE, sizeof(int));
  1085. _(SEQUENCER_NRMIDIS, WRITE, sizeof(int));
  1086. _(SEQUENCER_THRESHOLD, READ, sizeof(int));
  1087. _(SEQUENCER_MEMAVL, READWRITE, sizeof(int));
  1088. _(SEQUENCER_PANIC, NONE, 0);
  1089. _(SEQUENCER_OUTOFBAND, READ, struct_seq_event_rec_sz);
  1090. _(SEQUENCER_GETTIME, WRITE, sizeof(int));
  1091. _(SEQUENCER_TMR_TIMEBASE, READWRITE, sizeof(int));
  1092. _(SEQUENCER_TMR_START, NONE, 0);
  1093. _(SEQUENCER_TMR_STOP, NONE, 0);
  1094. _(SEQUENCER_TMR_CONTINUE, NONE, 0);
  1095. _(SEQUENCER_TMR_TEMPO, READWRITE, sizeof(int));
  1096. _(SEQUENCER_TMR_SOURCE, READWRITE, sizeof(int));
  1097. _(SEQUENCER_TMR_METRONOME, READ, sizeof(int));
  1098. _(SEQUENCER_TMR_SELECT, READ, sizeof(int));
  1099. /* Entries from file: sys/mtio.h */
  1100. _(MTIOCTOP, READ, struct_mtop_sz);
  1101. _(MTIOCGET, WRITE, struct_mtget_sz);
  1102. _(MTIOCIEOT, NONE, 0);
  1103. _(MTIOCEEOT, NONE, 0);
  1104. _(MTIOCRDSPOS, WRITE, sizeof(u32));
  1105. _(MTIOCRDHPOS, WRITE, sizeof(u32));
  1106. _(MTIOCSLOCATE, READ, sizeof(u32));
  1107. _(MTIOCHLOCATE, READ, sizeof(u32));
  1108. /* Entries from file: sys/power.h */
  1109. _(POWER_EVENT_RECVDICT, READWRITE, struct_plistref_sz);
  1110. _(POWER_IOC_GET_TYPE, WRITE, struct_power_type_sz);
  1111. /* Entries from file: sys/radioio.h */
  1112. _(RIOCGINFO, WRITE, struct_radio_info_sz);
  1113. _(RIOCSINFO, READWRITE, struct_radio_info_sz);
  1114. _(RIOCSSRCH, READ, sizeof(int));
  1115. /* Entries from file: sys/rndio.h */
  1116. _(RNDGETENTCNT, WRITE, sizeof(u32));
  1117. _(RNDGETSRCNUM, READWRITE, struct_rndstat_sz);
  1118. _(RNDGETSRCNAME, READWRITE, struct_rndstat_name_sz);
  1119. _(RNDCTL, READ, struct_rndctl_sz);
  1120. _(RNDADDDATA, READ, struct_rnddata_sz);
  1121. _(RNDGETPOOLSTAT, WRITE, struct_rndpoolstat_sz);
  1122. _(RNDGETESTNUM, READWRITE, struct_rndstat_est_sz);
  1123. _(RNDGETESTNAME, READWRITE, struct_rndstat_est_name_sz);
  1124. /* Entries from file: sys/scanio.h */
  1125. _(SCIOCGET, WRITE, struct_scan_io_sz);
  1126. _(SCIOCSET, READ, struct_scan_io_sz);
  1127. _(SCIOCRESTART, NONE, 0);
  1128. /* Entries from file: sys/scsiio.h */
  1129. _(SCIOCCOMMAND, READWRITE, struct_scsireq_sz);
  1130. _(SCIOCDEBUG, READ, sizeof(int));
  1131. _(SCIOCIDENTIFY, WRITE, struct_scsi_addr_sz);
  1132. _(OSCIOCIDENTIFY, WRITE, struct_oscsi_addr_sz);
  1133. _(SCIOCDECONFIG, NONE, 0);
  1134. _(SCIOCRECONFIG, NONE, 0);
  1135. _(SCIOCRESET, NONE, 0);
  1136. _(SCBUSIOSCAN, READ, struct_scbusioscan_args_sz);
  1137. _(SCBUSIORESET, NONE, 0);
  1138. _(SCBUSIODETACH, READ, struct_scbusiodetach_args_sz);
  1139. _(SCBUSACCEL, READ, struct_scbusaccel_args_sz);
  1140. /* Entries from file: sys/sockio.h */
  1141. _(SIOCSHIWAT, READ, sizeof(int));
  1142. _(SIOCGHIWAT, WRITE, sizeof(int));
  1143. _(SIOCSLOWAT, READ, sizeof(int));
  1144. _(SIOCGLOWAT, WRITE, sizeof(int));
  1145. _(SIOCATMARK, WRITE, sizeof(int));
  1146. _(SIOCSPGRP, READ, sizeof(int));
  1147. _(SIOCGPGRP, WRITE, sizeof(int));
  1148. _(SIOCPEELOFF, READWRITE, sizeof(int));
  1149. _(SIOCADDRT, READ, struct_ortentry_sz);
  1150. _(SIOCDELRT, READ, struct_ortentry_sz);
  1151. _(SIOCSIFADDR, READ, struct_ifreq_sz);
  1152. _(SIOCGIFADDR, READWRITE, struct_ifreq_sz);
  1153. _(SIOCSIFDSTADDR, READ, struct_ifreq_sz);
  1154. _(SIOCGIFDSTADDR, READWRITE, struct_ifreq_sz);
  1155. _(SIOCSIFFLAGS, READ, struct_ifreq_sz);
  1156. _(SIOCGIFFLAGS, READWRITE, struct_ifreq_sz);
  1157. _(SIOCGIFBRDADDR, READWRITE, struct_ifreq_sz);
  1158. _(SIOCSIFBRDADDR, READ, struct_ifreq_sz);
  1159. _(SIOCGIFCONF, READWRITE, struct_ifconf_sz);
  1160. _(SIOCGIFNETMASK, READWRITE, struct_ifreq_sz);
  1161. _(SIOCSIFNETMASK, READ, struct_ifreq_sz);
  1162. _(SIOCGIFMETRIC, READWRITE, struct_ifreq_sz);
  1163. _(SIOCSIFMETRIC, READ, struct_ifreq_sz);
  1164. _(SIOCDIFADDR, READ, struct_ifreq_sz);
  1165. _(SIOCAIFADDR, READ, struct_ifaliasreq_sz);
  1166. _(SIOCGIFALIAS, READWRITE, struct_ifaliasreq_sz);
  1167. _(SIOCGIFAFLAG_IN, READWRITE, struct_ifreq_sz);
  1168. _(SIOCALIFADDR, READ, struct_if_laddrreq_sz);
  1169. _(SIOCGLIFADDR, READWRITE, struct_if_laddrreq_sz);
  1170. _(SIOCDLIFADDR, READ, struct_if_laddrreq_sz);
  1171. _(SIOCSIFADDRPREF, READ, struct_if_addrprefreq_sz);
  1172. _(SIOCGIFADDRPREF, READWRITE, struct_if_addrprefreq_sz);
  1173. _(SIOCADDMULTI, READ, struct_ifreq_sz);
  1174. _(SIOCDELMULTI, READ, struct_ifreq_sz);
  1175. _(SIOCGETVIFCNT, READWRITE, struct_sioc_vif_req_sz);
  1176. _(SIOCGETSGCNT, READWRITE, struct_sioc_sg_req_sz);
  1177. _(SIOCSIFMEDIA, READWRITE, struct_ifreq_sz);
  1178. _(SIOCGIFMEDIA, READWRITE, struct_ifmediareq_sz);
  1179. _(SIOCSIFGENERIC, READ, struct_ifreq_sz);
  1180. _(SIOCGIFGENERIC, READWRITE, struct_ifreq_sz);
  1181. _(SIOCSIFPHYADDR, READ, struct_ifaliasreq_sz);
  1182. _(SIOCGIFPSRCADDR, READWRITE, struct_ifreq_sz);
  1183. _(SIOCGIFPDSTADDR, READWRITE, struct_ifreq_sz);
  1184. _(SIOCDIFPHYADDR, READ, struct_ifreq_sz);
  1185. _(SIOCSLIFPHYADDR, READ, struct_if_laddrreq_sz);
  1186. _(SIOCGLIFPHYADDR, READWRITE, struct_if_laddrreq_sz);
  1187. _(SIOCSIFMTU, READ, struct_ifreq_sz);
  1188. _(SIOCGIFMTU, READWRITE, struct_ifreq_sz);
  1189. _(SIOCSDRVSPEC, READ, struct_ifdrv_sz);
  1190. _(SIOCGDRVSPEC, READWRITE, struct_ifdrv_sz);
  1191. _(SIOCIFCREATE, READ, struct_ifreq_sz);
  1192. _(SIOCIFDESTROY, READ, struct_ifreq_sz);
  1193. _(SIOCIFGCLONERS, READWRITE, struct_if_clonereq_sz);
  1194. _(SIOCGIFDLT, READWRITE, struct_ifreq_sz);
  1195. _(SIOCGIFCAP, READWRITE, struct_ifcapreq_sz);
  1196. _(SIOCSIFCAP, READ, struct_ifcapreq_sz);
  1197. _(SIOCSVH, READWRITE, struct_ifreq_sz);
  1198. _(SIOCGVH, READWRITE, struct_ifreq_sz);
  1199. _(SIOCINITIFADDR, READWRITE, struct_ifaddr_sz);
  1200. _(SIOCGIFDATA, READWRITE, struct_ifdatareq_sz);
  1201. _(SIOCZIFDATA, READWRITE, struct_ifdatareq_sz);
  1202. _(SIOCGLINKSTR, READWRITE, struct_ifdrv_sz);
  1203. _(SIOCSLINKSTR, READ, struct_ifdrv_sz);
  1204. _(SIOCGETHERCAP, READWRITE, struct_eccapreq_sz);
  1205. _(SIOCGIFINDEX, READWRITE, struct_ifreq_sz);
  1206. _(SIOCSETHERCAP, READ, struct_eccapreq_sz);
  1207. _(SIOCSIFDESCR, READ, struct_ifreq_sz);
  1208. _(SIOCGIFDESCR, READWRITE, struct_ifreq_sz);
  1209. _(SIOCGUMBINFO, READWRITE, struct_ifreq_sz);
  1210. _(SIOCSUMBPARAM, READ, struct_ifreq_sz);
  1211. _(SIOCGUMBPARAM, READWRITE, struct_ifreq_sz);
  1212. _(SIOCSETPFSYNC, READ, struct_ifreq_sz);
  1213. _(SIOCGETPFSYNC, READWRITE, struct_ifreq_sz);
  1214. /* Entries from file: sys/timepps.h */
  1215. _(PPS_IOC_CREATE, NONE, 0);
  1216. _(PPS_IOC_DESTROY, NONE, 0);
  1217. _(PPS_IOC_SETPARAMS, READ, struct_pps_params_sz);
  1218. _(PPS_IOC_GETPARAMS, WRITE, struct_pps_params_sz);
  1219. _(PPS_IOC_GETCAP, WRITE, sizeof(int));
  1220. _(PPS_IOC_FETCH, READWRITE, struct_pps_info_sz);
  1221. _(PPS_IOC_KCBIND, READ, sizeof(int));
  1222. /* Entries from file: sys/ttycom.h */
  1223. _(TIOCEXCL, NONE, 0);
  1224. _(TIOCNXCL, NONE, 0);
  1225. _(TIOCFLUSH, READ, sizeof(int));
  1226. _(TIOCGETA, WRITE, struct_termios_sz);
  1227. _(TIOCSETA, READ, struct_termios_sz);
  1228. _(TIOCSETAW, READ, 0);
  1229. _(TIOCSETAF, READ, 0);
  1230. _(TIOCGETD, WRITE, sizeof(int));
  1231. _(TIOCSETD, READ, sizeof(int));
  1232. _(TIOCGLINED, WRITE, (32 * sizeof(char)));
  1233. _(TIOCSLINED, READ, (32 * sizeof(char)));
  1234. _(TIOCSBRK, NONE, 0);
  1235. _(TIOCCBRK, NONE, 0);
  1236. _(TIOCSDTR, NONE, 0);
  1237. _(TIOCCDTR, NONE, 0);
  1238. _(TIOCGPGRP, WRITE, sizeof(int));
  1239. _(TIOCSPGRP, READ, sizeof(int));
  1240. _(TIOCOUTQ, WRITE, sizeof(int));
  1241. _(TIOCSTI, READ, sizeof(char));
  1242. _(TIOCNOTTY, NONE, 0);
  1243. _(TIOCPKT, READ, sizeof(int));
  1244. _(TIOCSTOP, NONE, 0);
  1245. _(TIOCSTART, NONE, 0);
  1246. _(TIOCMSET, READ, sizeof(int));
  1247. _(TIOCMBIS, READ, sizeof(int));
  1248. _(TIOCMBIC, READ, sizeof(int));
  1249. _(TIOCMGET, WRITE, sizeof(int));
  1250. _(TIOCREMOTE, READ, sizeof(int));
  1251. _(TIOCGWINSZ, WRITE, struct_winsize_sz);
  1252. _(TIOCSWINSZ, READ, struct_winsize_sz);
  1253. _(TIOCUCNTL, READ, sizeof(int));
  1254. _(TIOCSTAT, READ, sizeof(int));
  1255. _(TIOCGSID, WRITE, sizeof(int));
  1256. _(TIOCCONS, READ, sizeof(int));
  1257. _(TIOCSCTTY, NONE, 0);
  1258. _(TIOCEXT, READ, sizeof(int));
  1259. _(TIOCSIG, NONE, 0);
  1260. _(TIOCDRAIN, NONE, 0);
  1261. _(TIOCGFLAGS, WRITE, sizeof(int));
  1262. _(TIOCSFLAGS, READ, sizeof(int));
  1263. _(TIOCDCDTIMESTAMP, WRITE, struct_timeval_sz);
  1264. _(TIOCRCVFRAME, READ, sizeof(uptr));
  1265. _(TIOCXMTFRAME, READ, sizeof(uptr));
  1266. _(TIOCPTMGET, WRITE, struct_ptmget_sz);
  1267. _(TIOCGRANTPT, NONE, 0);
  1268. _(TIOCPTSNAME, WRITE, struct_ptmget_sz);
  1269. _(TIOCSQSIZE, READ, sizeof(int));
  1270. _(TIOCGQSIZE, WRITE, sizeof(int));
  1271. /* Entries from file: sys/verified_exec.h */
  1272. _(VERIEXEC_LOAD, READ, struct_plistref_sz);
  1273. _(VERIEXEC_TABLESIZE, READ, struct_plistref_sz);
  1274. _(VERIEXEC_DELETE, READ, struct_plistref_sz);
  1275. _(VERIEXEC_QUERY, READWRITE, struct_plistref_sz);
  1276. _(VERIEXEC_DUMP, WRITE, struct_plistref_sz);
  1277. _(VERIEXEC_FLUSH, NONE, 0);
  1278. /* Entries from file: sys/videoio.h */
  1279. _(VIDIOC_QUERYCAP, WRITE, struct_v4l2_capability_sz);
  1280. _(VIDIOC_RESERVED, NONE, 0);
  1281. _(VIDIOC_ENUM_FMT, READWRITE, struct_v4l2_fmtdesc_sz);
  1282. _(VIDIOC_G_FMT, READWRITE, struct_v4l2_format_sz);
  1283. _(VIDIOC_S_FMT, READWRITE, struct_v4l2_format_sz);
  1284. _(VIDIOC_REQBUFS, READWRITE, struct_v4l2_requestbuffers_sz);
  1285. _(VIDIOC_QUERYBUF, READWRITE, struct_v4l2_buffer_sz);
  1286. _(VIDIOC_G_FBUF, WRITE, struct_v4l2_framebuffer_sz);
  1287. _(VIDIOC_S_FBUF, READ, struct_v4l2_framebuffer_sz);
  1288. _(VIDIOC_OVERLAY, READ, sizeof(int));
  1289. _(VIDIOC_QBUF, READWRITE, struct_v4l2_buffer_sz);
  1290. _(VIDIOC_DQBUF, READWRITE, struct_v4l2_buffer_sz);
  1291. _(VIDIOC_STREAMON, READ, sizeof(int));
  1292. _(VIDIOC_STREAMOFF, READ, sizeof(int));
  1293. _(VIDIOC_G_PARM, READWRITE, struct_v4l2_streamparm_sz);
  1294. _(VIDIOC_S_PARM, READWRITE, struct_v4l2_streamparm_sz);
  1295. _(VIDIOC_G_STD, WRITE, sizeof(u64));
  1296. _(VIDIOC_S_STD, READ, sizeof(u64));
  1297. _(VIDIOC_ENUMSTD, READWRITE, struct_v4l2_standard_sz);
  1298. _(VIDIOC_ENUMINPUT, READWRITE, struct_v4l2_input_sz);
  1299. _(VIDIOC_G_CTRL, READWRITE, struct_v4l2_control_sz);
  1300. _(VIDIOC_S_CTRL, READWRITE, struct_v4l2_control_sz);
  1301. _(VIDIOC_G_TUNER, READWRITE, struct_v4l2_tuner_sz);
  1302. _(VIDIOC_S_TUNER, READ, struct_v4l2_tuner_sz);
  1303. _(VIDIOC_G_AUDIO, WRITE, struct_v4l2_audio_sz);
  1304. _(VIDIOC_S_AUDIO, READ, struct_v4l2_audio_sz);
  1305. _(VIDIOC_QUERYCTRL, READWRITE, struct_v4l2_queryctrl_sz);
  1306. _(VIDIOC_QUERYMENU, READWRITE, struct_v4l2_querymenu_sz);
  1307. _(VIDIOC_G_INPUT, WRITE, sizeof(int));
  1308. _(VIDIOC_S_INPUT, READWRITE, sizeof(int));
  1309. _(VIDIOC_G_OUTPUT, WRITE, sizeof(int));
  1310. _(VIDIOC_S_OUTPUT, READWRITE, sizeof(int));
  1311. _(VIDIOC_ENUMOUTPUT, READWRITE, struct_v4l2_output_sz);
  1312. _(VIDIOC_G_AUDOUT, WRITE, struct_v4l2_audioout_sz);
  1313. _(VIDIOC_S_AUDOUT, READ, struct_v4l2_audioout_sz);
  1314. _(VIDIOC_G_MODULATOR, READWRITE, struct_v4l2_modulator_sz);
  1315. _(VIDIOC_S_MODULATOR, READ, struct_v4l2_modulator_sz);
  1316. _(VIDIOC_G_FREQUENCY, READWRITE, struct_v4l2_frequency_sz);
  1317. _(VIDIOC_S_FREQUENCY, READ, struct_v4l2_frequency_sz);
  1318. _(VIDIOC_CROPCAP, READWRITE, struct_v4l2_cropcap_sz);
  1319. _(VIDIOC_G_CROP, READWRITE, struct_v4l2_crop_sz);
  1320. _(VIDIOC_S_CROP, READ, struct_v4l2_crop_sz);
  1321. _(VIDIOC_G_JPEGCOMP, WRITE, struct_v4l2_jpegcompression_sz);
  1322. _(VIDIOC_S_JPEGCOMP, READ, struct_v4l2_jpegcompression_sz);
  1323. _(VIDIOC_QUERYSTD, WRITE, sizeof(u64));
  1324. _(VIDIOC_TRY_FMT, READWRITE, struct_v4l2_format_sz);
  1325. _(VIDIOC_ENUMAUDIO, READWRITE, struct_v4l2_audio_sz);
  1326. _(VIDIOC_ENUMAUDOUT, READWRITE, struct_v4l2_audioout_sz);
  1327. _(VIDIOC_G_PRIORITY, WRITE, enum_v4l2_priority_sz);
  1328. _(VIDIOC_S_PRIORITY, READ, enum_v4l2_priority_sz);
  1329. _(VIDIOC_ENUM_FRAMESIZES, READWRITE, struct_v4l2_frmsizeenum_sz);
  1330. _(VIDIOC_ENUM_FRAMEINTERVALS, READWRITE, struct_v4l2_frmivalenum_sz);
  1331. /* Entries from file: sys/wdog.h */
  1332. _(WDOGIOC_GMODE, READWRITE, struct_wdog_mode_sz);
  1333. _(WDOGIOC_SMODE, READ, struct_wdog_mode_sz);
  1334. _(WDOGIOC_WHICH, WRITE, struct_wdog_mode_sz);
  1335. _(WDOGIOC_TICKLE, NONE, 0);
  1336. _(WDOGIOC_GTICKLER, WRITE, sizeof(int));
  1337. _(WDOGIOC_GWDOGS, READWRITE, struct_wdog_conf_sz);
  1338. /* Entries from file: sys/kcov.h */
  1339. _(KCOV_IOC_SETBUFSIZE, READ, sizeof(u64));
  1340. _(KCOV_IOC_ENABLE, READ, sizeof(int));
  1341. _(KCOV_IOC_DISABLE, NONE, 0);
  1342. /* Entries from file: sys/ipmi.h */
  1343. _(IPMICTL_RECEIVE_MSG_TRUNC, READWRITE, struct_ipmi_recv_sz);
  1344. _(IPMICTL_RECEIVE_MSG, READWRITE, struct_ipmi_recv_sz);
  1345. _(IPMICTL_SEND_COMMAND, READ, struct_ipmi_req_sz);
  1346. _(IPMICTL_REGISTER_FOR_CMD, READ, struct_ipmi_cmdspec_sz);
  1347. _(IPMICTL_UNREGISTER_FOR_CMD, READ, struct_ipmi_cmdspec_sz);
  1348. _(IPMICTL_SET_GETS_EVENTS_CMD, READ, sizeof(int));
  1349. _(IPMICTL_SET_MY_ADDRESS_CMD, READ, sizeof(unsigned int));
  1350. _(IPMICTL_GET_MY_ADDRESS_CMD, WRITE, sizeof(unsigned int));
  1351. _(IPMICTL_SET_MY_LUN_CMD, READ, sizeof(unsigned int));
  1352. _(IPMICTL_GET_MY_LUN_CMD, WRITE, sizeof(unsigned int));
  1353. /* Entries from file: soundcard.h */
  1354. _(SNDCTL_DSP_RESET, NONE, 0);
  1355. _(SNDCTL_DSP_SYNC, NONE, 0);
  1356. _(SNDCTL_DSP_SPEED, READWRITE, sizeof(int));
  1357. _(SOUND_PCM_READ_RATE, WRITE, sizeof(int));
  1358. _(SNDCTL_DSP_STEREO, READWRITE, sizeof(int));
  1359. _(SNDCTL_DSP_GETBLKSIZE, READWRITE, sizeof(int));
  1360. _(SNDCTL_DSP_SETFMT, READWRITE, sizeof(int));
  1361. _(SOUND_PCM_READ_BITS, WRITE, sizeof(int));
  1362. _(SNDCTL_DSP_CHANNELS, READWRITE, sizeof(int));
  1363. _(SOUND_PCM_READ_CHANNELS, WRITE, sizeof(int));
  1364. _(SOUND_PCM_WRITE_FILTER, READWRITE, sizeof(int));
  1365. _(SOUND_PCM_READ_FILTER, WRITE, sizeof(int));
  1366. _(SNDCTL_DSP_POST, NONE, 0);
  1367. _(SNDCTL_DSP_SUBDIVIDE, READWRITE, sizeof(int));
  1368. _(SNDCTL_DSP_SETFRAGMENT, READWRITE, sizeof(int));
  1369. _(SNDCTL_DSP_GETFMTS, WRITE, sizeof(int));
  1370. _(SNDCTL_DSP_GETOSPACE, WRITE, struct_audio_buf_info_sz);
  1371. _(SNDCTL_DSP_GETISPACE, WRITE, struct_audio_buf_info_sz);
  1372. _(SNDCTL_DSP_NONBLOCK, NONE, 0);
  1373. _(SNDCTL_DSP_GETCAPS, WRITE, sizeof(int));
  1374. _(SNDCTL_DSP_GETTRIGGER, WRITE, sizeof(int));
  1375. _(SNDCTL_DSP_SETTRIGGER, READ, sizeof(int));
  1376. _(SNDCTL_DSP_GETIPTR, WRITE, struct_count_info_sz);
  1377. _(SNDCTL_DSP_GETOPTR, WRITE, struct_count_info_sz);
  1378. _(SNDCTL_DSP_MAPINBUF, WRITE, struct_buffmem_desc_sz);
  1379. _(SNDCTL_DSP_MAPOUTBUF, WRITE, struct_buffmem_desc_sz);
  1380. _(SNDCTL_DSP_SETSYNCRO, NONE, 0);
  1381. _(SNDCTL_DSP_SETDUPLEX, NONE, 0);
  1382. _(SNDCTL_DSP_PROFILE, READ, sizeof(int));
  1383. _(SNDCTL_DSP_GETODELAY, WRITE, sizeof(int));
  1384. _(SOUND_MIXER_INFO, WRITE, struct_mixer_info_sz);
  1385. _(SOUND_OLD_MIXER_INFO, WRITE, struct__old_mixer_info_sz);
  1386. _(OSS_GETVERSION, WRITE, sizeof(int));
  1387. _(SNDCTL_SYSINFO, WRITE, struct_oss_sysinfo_sz);
  1388. _(SNDCTL_AUDIOINFO, READWRITE, struct_oss_audioinfo_sz);
  1389. _(SNDCTL_ENGINEINFO, READWRITE, struct_oss_audioinfo_sz);
  1390. _(SNDCTL_DSP_GETPLAYVOL, WRITE, sizeof(unsigned int));
  1391. _(SNDCTL_DSP_SETPLAYVOL, READ, sizeof(unsigned int));
  1392. _(SNDCTL_DSP_GETRECVOL, WRITE, sizeof(unsigned int));
  1393. _(SNDCTL_DSP_SETRECVOL, READ, sizeof(unsigned int));
  1394. _(SNDCTL_DSP_SKIP, NONE, 0);
  1395. _(SNDCTL_DSP_SILENCE, NONE, 0);
  1396. /* Entries from file: dev/filemon/filemon.h (compat <= 9.99.26) */
  1397. _(FILEMON_SET_FD, READWRITE, sizeof(int));
  1398. _(FILEMON_SET_PID, READWRITE, sizeof(int));
  1399. /* Entries from file: dev/usb/urio.h (compat <= 9.99.43) */
  1400. _(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz);
  1401. _(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz);
  1402. #undef _
  1403. }
  1404. static bool ioctl_initialized = false;
  1405. struct ioctl_desc_compare {
  1406. bool operator()(const ioctl_desc &left, const ioctl_desc &right) const {
  1407. return left.req < right.req;
  1408. }
  1409. };
  1410. static void ioctl_init() {
  1411. ioctl_table_fill();
  1412. Sort(ioctl_table, ioctl_table_size, ioctl_desc_compare());
  1413. bool bad = false;
  1414. for (unsigned i = 0; i < ioctl_table_size - 1; ++i) {
  1415. if (ioctl_table[i].req >= ioctl_table[i + 1].req) {
  1416. Printf("Duplicate or unsorted ioctl request id %x >= %x (%s vs %s)\n",
  1417. ioctl_table[i].req, ioctl_table[i + 1].req, ioctl_table[i].name,
  1418. ioctl_table[i + 1].name);
  1419. bad = true;
  1420. }
  1421. }
  1422. if (bad)
  1423. Die();
  1424. ioctl_initialized = true;
  1425. }
  1426. static const ioctl_desc *ioctl_table_lookup(unsigned req) {
  1427. int left = 0;
  1428. int right = ioctl_table_size;
  1429. while (left < right) {
  1430. int mid = (left + right) / 2;
  1431. if (ioctl_table[mid].req < req)
  1432. left = mid + 1;
  1433. else
  1434. right = mid;
  1435. }
  1436. if (left == right && ioctl_table[left].req == req)
  1437. return ioctl_table + left;
  1438. else
  1439. return nullptr;
  1440. }
  1441. static bool ioctl_decode(unsigned req, ioctl_desc *desc) {
  1442. CHECK(desc);
  1443. desc->req = req;
  1444. desc->name = "<DECODED_IOCTL>";
  1445. desc->size = IOC_SIZE(req);
  1446. // Sanity check.
  1447. if (desc->size > 0xFFFF)
  1448. return false;
  1449. unsigned dir = IOC_DIR(req);
  1450. switch (dir) {
  1451. case IOC_NONE:
  1452. desc->type = ioctl_desc::NONE;
  1453. break;
  1454. case IOC_READ | IOC_WRITE:
  1455. desc->type = ioctl_desc::READWRITE;
  1456. break;
  1457. case IOC_READ:
  1458. desc->type = ioctl_desc::WRITE;
  1459. break;
  1460. case IOC_WRITE:
  1461. desc->type = ioctl_desc::READ;
  1462. break;
  1463. default:
  1464. return false;
  1465. }
  1466. // Size can be 0 iff type is NONE.
  1467. if ((desc->type == IOC_NONE) != (desc->size == 0))
  1468. return false;
  1469. // Sanity check.
  1470. if (IOC_TYPE(req) == 0)
  1471. return false;
  1472. return true;
  1473. }
  1474. static const ioctl_desc *ioctl_lookup(unsigned req) {
  1475. const ioctl_desc *desc = ioctl_table_lookup(req);
  1476. if (desc)
  1477. return desc;
  1478. // Try stripping access size from the request id.
  1479. desc = ioctl_table_lookup(req & ~(IOC_SIZEMASK << IOC_SIZESHIFT));
  1480. // Sanity check: requests that encode access size are either read or write and
  1481. // have size of 0 in the table.
  1482. if (desc && desc->size == 0 &&
  1483. (desc->type == ioctl_desc::READWRITE || desc->type == ioctl_desc::WRITE ||
  1484. desc->type == ioctl_desc::READ))
  1485. return desc;
  1486. return nullptr;
  1487. }
  1488. static void ioctl_common_pre(void *ctx, const ioctl_desc *desc, int d,
  1489. unsigned request, void *arg) {
  1490. if (desc->type == ioctl_desc::READ || desc->type == ioctl_desc::READWRITE) {
  1491. unsigned size = desc->size ? desc->size : IOC_SIZE(request);
  1492. COMMON_INTERCEPTOR_READ_RANGE(ctx, arg, size);
  1493. }
  1494. if (desc->type != ioctl_desc::CUSTOM)
  1495. return;
  1496. if (request == IOCTL_SIOCGIFCONF) {
  1497. struct __sanitizer_ifconf *ifc = (__sanitizer_ifconf *)arg;
  1498. COMMON_INTERCEPTOR_READ_RANGE(ctx, (char *)&ifc->ifc_len,
  1499. sizeof(ifc->ifc_len));
  1500. }
  1501. }
  1502. static void ioctl_common_post(void *ctx, const ioctl_desc *desc, int res, int d,
  1503. unsigned request, void *arg) {
  1504. if (desc->type == ioctl_desc::WRITE || desc->type == ioctl_desc::READWRITE) {
  1505. // FIXME: add verbose output
  1506. unsigned size = desc->size ? desc->size : IOC_SIZE(request);
  1507. COMMON_INTERCEPTOR_WRITE_RANGE(ctx, arg, size);
  1508. }
  1509. if (desc->type != ioctl_desc::CUSTOM)
  1510. return;
  1511. if (request == IOCTL_SIOCGIFCONF) {
  1512. struct __sanitizer_ifconf *ifc = (__sanitizer_ifconf *)arg;
  1513. COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ifc->ifc_ifcu.ifcu_req, ifc->ifc_len);
  1514. }
  1515. }
  1516. #endif // SANITIZER_NETBSD