github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/freebsd/evdev.txt (about)

     1  # Copyright 2021 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  # Autogenerated by sys2syz
     4  
     5  include <fcntl.h>
     6  include <dev/evdev/uinput.h>
     7  include <dev/evdev/input.h>
     8  
     9  resource fd_evdev[fd]
    10  
    11  openat$evdev(fd const[AT_FDCWD], file ptr[in, string["/dev/input/eventN"]], flags flags[open_flags], mode const[0]) fd_evdev
    12  
    13  define EVIOCGABS_MIN	EVIOCGABS(0)
    14  define EVIOCGABS_MAX	EVIOCGABS(ABS_MAX)
    15  define EVIOCSABS_MIN	EVIOCGABS(0)
    16  define EVIOCSABS_MAX	EVIOCGABS(ABS_MAX)
    17  define EVIOCGNAME_CONST	EVIOCGNAME(0)
    18  define EVIOCGPHYS_CONST	EVIOCGPHYS(0)
    19  define EVIOCGUNIQ_CONST	EVIOCGUNIQ(0)
    20  define EVIOCGPROP_CONST	EVIOCGPROP(0)
    21  define EVIOCGMTSLOTS_CONST	EVIOCGMTSLOTS(0)
    22  define EVIOCGLED_CONST	EVIOCGLED(0)
    23  define EVIOCGKEY_CONST	EVIOCGKEY(0)
    24  define EVIOCGSND_CONST	EVIOCGSND(0)
    25  define EVIOCGSW_CONST	EVIOCGSW(0)
    26  define EVIOCGBIT_MIN	EVIOCGBIT(0, 0)
    27  define EVIOCGBIT_MAX	EVIOCGBIT(EV_MAX, 0)
    28  
    29  ioctl$EVIOCGVERSION(fd fd_evdev, cmd const[EVIOCGVERSION], arg int32)
    30  ioctl$EVIOCGID(fd fd_evdev, cmd const[EVIOCGID], arg ptr[out, input_id])
    31  ioctl$EVIOCGREP(fd fd_evdev, cmd const[EVIOCGREP], arg int32)
    32  ioctl$EVIOCSREP(fd fd_evdev, cmd const[EVIOCSREP], arg int32)
    33  ioctl$EVIOCGKEYCODE(fd fd_evdev, cmd const[EVIOCGKEYCODE], arg int32)
    34  ioctl$EVIOCGKEYCODE_V2(fd fd_evdev, cmd const[EVIOCGKEYCODE_V2], arg ptr[inout, input_keymap_entry])
    35  ioctl$EVIOCSKEYCODE(fd fd_evdev, cmd const[EVIOCSKEYCODE], arg int32)
    36  ioctl$EVIOCSKEYCODE_V2(fd fd_evdev, cmd const[EVIOCSKEYCODE_V2], arg ptr[in, input_keymap_entry])
    37  ioctl$EVIOCGABS(fd fd_evdev, cmd intptr[EVIOCGABS_MIN:EVIOCGABS_MAX], arg ptr[out, input_absinfo])
    38  ioctl$EVIOCSABS(fd fd_evdev, cmd intptr[EVIOCSABS_MIN:EVIOCSABS_MAX], arg ptr[in, input_absinfo])
    39  ioctl$EVIOCSFF(fd fd_evdev, cmd const[EVIOCSFF], arg ptr[in, ff_effect])
    40  ioctl$EVIOCRMFF(fd fd_evdev, cmd const[EVIOCRMFF])
    41  ioctl$EVIOCGEFFECTS(fd fd_evdev, cmd const[EVIOCGEFFECTS], arg int32)
    42  ioctl$EVIOCGRAB(fd fd_evdev, cmd const[EVIOCGRAB])
    43  ioctl$EVIOCREVOKE(fd fd_evdev, cmd const[EVIOCREVOKE])
    44  ioctl$EVIOCSCLOCKID(fd fd_evdev, cmd const[EVIOCSCLOCKID], arg int32)
    45  ioctl$UI_DEV_CREATE(fd fd_evdev, cmd const[UI_DEV_CREATE])
    46  ioctl$UI_DEV_DESTROY(fd fd_evdev, cmd const[UI_DEV_DESTROY])
    47  ioctl$UI_DEV_SETUP(fd fd_evdev, cmd const[UI_DEV_SETUP], arg ptr[in, uinput_setup])
    48  ioctl$UI_ABS_SETUP(fd fd_evdev, cmd const[UI_ABS_SETUP], arg ptr[in, uinput_abs_setup])
    49  ioctl$UI_GET_VERSION(fd fd_evdev, cmd const[UI_GET_VERSION], arg int32)
    50  ioctl$UI_SET_EVBIT(fd fd_evdev, cmd const[UI_SET_EVBIT])
    51  ioctl$UI_SET_KEYBIT(fd fd_evdev, cmd const[UI_SET_KEYBIT])
    52  ioctl$UI_SET_RELBIT(fd fd_evdev, cmd const[UI_SET_RELBIT])
    53  ioctl$UI_SET_ABSBIT(fd fd_evdev, cmd const[UI_SET_ABSBIT])
    54  ioctl$UI_SET_MSCBIT(fd fd_evdev, cmd const[UI_SET_MSCBIT])
    55  ioctl$UI_SET_LEDBIT(fd fd_evdev, cmd const[UI_SET_LEDBIT])
    56  ioctl$UI_SET_SNDBIT(fd fd_evdev, cmd const[UI_SET_SNDBIT])
    57  ioctl$UI_SET_FFBIT(fd fd_evdev, cmd const[UI_SET_FFBIT])
    58  ioctl$UI_SET_PHYS(fd fd_evdev, cmd const[UI_SET_PHYS])
    59  ioctl$UI_SET_SWBIT(fd fd_evdev, cmd const[UI_SET_SWBIT])
    60  ioctl$UI_SET_PROPBIT(fd fd_evdev, cmd const[UI_SET_PROPBIT])
    61  ioctl$UI_BEGIN_FF_UPLOAD(fd fd_evdev, cmd const[UI_BEGIN_FF_UPLOAD], arg ptr[inout, uinput_ff_upload])
    62  ioctl$UI_END_FF_UPLOAD(fd fd_evdev, cmd const[UI_END_FF_UPLOAD], arg ptr[in, uinput_ff_upload])
    63  ioctl$UI_BEGIN_FF_ERASE(fd fd_evdev, cmd const[UI_BEGIN_FF_ERASE], arg ptr[inout, uinput_ff_erase])
    64  ioctl$UI_END_FF_ERASE(fd fd_evdev, cmd const[UI_END_FF_ERASE], arg ptr[in, uinput_ff_erase])
    65  ioctl$UI_SET_BSDUNIQ(fd fd_evdev, cmd const[UI_SET_BSDUNIQ])
    66  ioctl$EVIOCGNAME(fd fd_evdev, cmd const[EVIOCGNAME_CONST])
    67  ioctl$EVIOCGPHYS(fd fd_evdev, cmd const[EVIOCGPHYS_CONST])
    68  ioctl$EVIOCGUNIQ(fd fd_evdev, cmd const[EVIOCGUNIQ_CONST])
    69  ioctl$EVIOCGPROP(fd fd_evdev, cmd const[EVIOCGPROP_CONST])
    70  ioctl$EVIOCGMTSLOTS(fd fd_evdev, cmd const[EVIOCGMTSLOTS_CONST])
    71  ioctl$EVIOCGLED(fd fd_evdev, cmd const[EVIOCGLED_CONST])
    72  ioctl$EVIOCGKEY(fd fd_evdev, cmd const[EVIOCGKEY_CONST])
    73  ioctl$EVIOCGSND(fd fd_evdev, cmd const[EVIOCGSND_CONST])
    74  ioctl$EVIOCGSW(fd fd_evdev, cmd const[EVIOCGSW_CONST])
    75  ioctl$EVIOCGBIT(fd fd_evdev, cmd intptr[EVIOCGBIT_MIN:EVIOCGBIT_MAX])
    76  
    77  input_id {
    78  	bustype	int16
    79  	vendor	int16
    80  	product	int16
    81  	version	int16
    82  }
    83  
    84  input_keymap_entry {
    85  	flags		int8
    86  	len		int8
    87  	index		int16
    88  	keycode		int32
    89  	scancode	array[int8, 32]
    90  }
    91  
    92  input_absinfo {
    93  	value		int32
    94  	minimum		int32
    95  	maximum		int32
    96  	fuzz		int32
    97  	flat		int32
    98  	resolution	int32
    99  }
   100  
   101  ff_effect {
   102  	type		int16[FF_EFFECT_MIN:FF_EFFECT_MAX]
   103  	id		int16
   104  	direction	int16
   105  	trigger		ff_trigger
   106  	replay		ff_replay
   107  	u		u
   108  }
   109  
   110  ff_trigger {
   111  	button		int16
   112  	interval	int16
   113  }
   114  
   115  ff_replay {
   116  	length	int16
   117  	delay	int16
   118  }
   119  
   120  ff_constant_effect {
   121  	level		int16
   122  	envelope	ff_envelope
   123  }
   124  
   125  ff_envelope {
   126  	attack_length	len[attack_level, int16]
   127  	attack_level	int16
   128  	fade_length	len[fade_level, int16]
   129  	fade_level	int16
   130  }
   131  
   132  ff_ramp_effect {
   133  	start_level	int16
   134  	end_level	int16
   135  	envelope	ff_envelope
   136  }
   137  
   138  ff_periodic_effect {
   139  	waveform	int16[FF_WAVEFORM_MIN:FF_WAVEFORM_MAX]
   140  	period		int16
   141  	magnitude	int16
   142  	offset		int16
   143  	phase		int16
   144  	envelope	ff_envelope
   145  	custom_len	len[custom_data, int32]
   146  	custom_data	ptr[in, int16]
   147  }
   148  
   149  ff_condition_effect {
   150  	right_saturation	int16
   151  	left_saturation		int16
   152  	right_coeff		int16
   153  	left_coeff		int16
   154  	deadband		int16
   155  	center			int16
   156  }
   157  
   158  ff_rumble_effect {
   159  	strong_magnitude	int16
   160  	weak_magnitude		int16
   161  }
   162  
   163  uinput_setup {
   164  	id		input_id
   165  	name		array[int8, 80]
   166  	ff_effects_max	int32
   167  }
   168  
   169  uinput_abs_setup {
   170  	code	int16
   171  	absinfo	input_absinfo
   172  }
   173  
   174  uinput_ff_upload {
   175  	request_id	int32
   176  	retval		int32
   177  	effect		ff_effect
   178  	old		ff_effect
   179  }
   180  
   181  uinput_ff_erase {
   182  	request_id	int32
   183  	retval		int32
   184  	effect_id	int32
   185  }
   186  
   187  u [
   188  	constant	ff_constant_effect
   189  	ramp		ff_ramp_effect
   190  	periodic	ff_periodic_effect
   191  	condition	array[ff_condition_effect, 2]
   192  	rumble		ff_rumble_effect
   193  ]