diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-08-06 18:26:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-06 18:26:57 +0200 |
| commit | cdde748628a830b9236db9890a9fea0764bde4fb (patch) | |
| tree | 83b315f841bc5c2116f8724bd549db4cffe62773 | |
| parent | c6f01e54b02ef07dc498dd3e87174f1612e281a8 (diff) | |
sys/linux: add basic USB PRINTER descriptions (#1316)
Also put USB HID descriptions together.
| -rw-r--r-- | executor/defs.h | 10 | ||||
| -rw-r--r-- | executor/syscalls.h | 10 | ||||
| -rw-r--r-- | sys/linux/gen/386.go | 183 | ||||
| -rw-r--r-- | sys/linux/gen/amd64.go | 183 | ||||
| -rw-r--r-- | sys/linux/gen/arm.go | 183 | ||||
| -rw-r--r-- | sys/linux/gen/arm64.go | 183 | ||||
| -rw-r--r-- | sys/linux/gen/ppc64le.go | 183 | ||||
| -rw-r--r-- | sys/linux/vusb.txt | 398 | ||||
| -rw-r--r-- | sys/linux/vusb_386.const | 8 | ||||
| -rw-r--r-- | sys/linux/vusb_amd64.const | 8 | ||||
| -rw-r--r-- | sys/linux/vusb_arm.const | 8 | ||||
| -rw-r--r-- | sys/linux/vusb_arm64.const | 8 | ||||
| -rw-r--r-- | sys/linux/vusb_ppc64le.const | 8 |
13 files changed, 1126 insertions, 247 deletions
diff --git a/executor/defs.h b/executor/defs.h index 5e583d263..9cedad6cb 100644 --- a/executor/defs.h +++ b/executor/defs.h @@ -70,7 +70,7 @@ #if GOARCH_386 #define GOARCH "386" -#define SYZ_REVISION "0b0d84e9322a324e5d1713852f21cc9d00e5505a" +#define SYZ_REVISION "eb22b8a389910e3ec878475738f280bd61b00a09" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -80,7 +80,7 @@ #if GOARCH_amd64 #define GOARCH "amd64" -#define SYZ_REVISION "292a4184c5acef4ffb5b6e767057652187899a00" +#define SYZ_REVISION "b025d70b7713cc48e9ab783fc35e2410b69a5736" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -90,7 +90,7 @@ #if GOARCH_arm #define GOARCH "arm" -#define SYZ_REVISION "aa364331e7ce0b6e1d44e153e157093ec9ac8f00" +#define SYZ_REVISION "fdb9cb5b71481f79ff86d824721def50b72fafa5" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -100,7 +100,7 @@ #if GOARCH_arm64 #define GOARCH "arm64" -#define SYZ_REVISION "8b31bd17e4d7e7fdf86173d43f420f10000c6864" +#define SYZ_REVISION "26a51558327902a8e8951bd6afdcdae046006802" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -110,7 +110,7 @@ #if GOARCH_ppc64le #define GOARCH "ppc64le" -#define SYZ_REVISION "922a4e3ae970503d59073976dffb8f9edb1e7bb7" +#define SYZ_REVISION "d118414cc10f2c07b6a9e1fae0e14db998375343" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 diff --git a/executor/syscalls.h b/executor/syscalls.h index 45497d524..a4cfbe18d 100644 --- a/executor/syscalls.h +++ b/executor/syscalls.h @@ -4604,8 +4604,10 @@ const call_t syscalls[] = { {"syz_read_part_table", 0, (syscall_t)syz_read_part_table}, {"syz_usb_connect", 0, (syscall_t)syz_usb_connect}, {"syz_usb_connect$hid", 0, (syscall_t)syz_usb_connect}, + {"syz_usb_connect$printer", 0, (syscall_t)syz_usb_connect}, {"syz_usb_control_io", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_control_io$hid", 0, (syscall_t)syz_usb_control_io}, + {"syz_usb_control_io$printer", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_disconnect", 0, (syscall_t)syz_usb_disconnect}, {"syz_usb_ep_read", 0, (syscall_t)syz_usb_ep_read}, {"syz_usb_ep_write", 0, (syscall_t)syz_usb_ep_write}, @@ -7362,8 +7364,10 @@ const call_t syscalls[] = { {"syz_read_part_table", 0, (syscall_t)syz_read_part_table}, {"syz_usb_connect", 0, (syscall_t)syz_usb_connect}, {"syz_usb_connect$hid", 0, (syscall_t)syz_usb_connect}, + {"syz_usb_connect$printer", 0, (syscall_t)syz_usb_connect}, {"syz_usb_control_io", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_control_io$hid", 0, (syscall_t)syz_usb_control_io}, + {"syz_usb_control_io$printer", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_disconnect", 0, (syscall_t)syz_usb_disconnect}, {"syz_usb_ep_read", 0, (syscall_t)syz_usb_ep_read}, {"syz_usb_ep_write", 0, (syscall_t)syz_usb_ep_write}, @@ -10072,8 +10076,10 @@ const call_t syscalls[] = { {"syz_read_part_table", 0, (syscall_t)syz_read_part_table}, {"syz_usb_connect", 0, (syscall_t)syz_usb_connect}, {"syz_usb_connect$hid", 0, (syscall_t)syz_usb_connect}, + {"syz_usb_connect$printer", 0, (syscall_t)syz_usb_connect}, {"syz_usb_control_io", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_control_io$hid", 0, (syscall_t)syz_usb_control_io}, + {"syz_usb_control_io$printer", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_disconnect", 0, (syscall_t)syz_usb_disconnect}, {"syz_usb_ep_read", 0, (syscall_t)syz_usb_ep_read}, {"syz_usb_ep_write", 0, (syscall_t)syz_usb_ep_write}, @@ -12756,8 +12762,10 @@ const call_t syscalls[] = { {"syz_read_part_table", 0, (syscall_t)syz_read_part_table}, {"syz_usb_connect", 0, (syscall_t)syz_usb_connect}, {"syz_usb_connect$hid", 0, (syscall_t)syz_usb_connect}, + {"syz_usb_connect$printer", 0, (syscall_t)syz_usb_connect}, {"syz_usb_control_io", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_control_io$hid", 0, (syscall_t)syz_usb_control_io}, + {"syz_usb_control_io$printer", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_disconnect", 0, (syscall_t)syz_usb_disconnect}, {"syz_usb_ep_read", 0, (syscall_t)syz_usb_ep_read}, {"syz_usb_ep_write", 0, (syscall_t)syz_usb_ep_write}, @@ -15458,8 +15466,10 @@ const call_t syscalls[] = { {"syz_read_part_table", 0, (syscall_t)syz_read_part_table}, {"syz_usb_connect", 0, (syscall_t)syz_usb_connect}, {"syz_usb_connect$hid", 0, (syscall_t)syz_usb_connect}, + {"syz_usb_connect$printer", 0, (syscall_t)syz_usb_connect}, {"syz_usb_control_io", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_control_io$hid", 0, (syscall_t)syz_usb_control_io}, + {"syz_usb_control_io$printer", 0, (syscall_t)syz_usb_control_io}, {"syz_usb_disconnect", 0, (syscall_t)syz_usb_disconnect}, {"syz_usb_ep_read", 0, (syscall_t)syz_usb_ep_read}, {"syz_usb_ep_write", 0, (syscall_t)syz_usb_ep_write}, diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index 5ea6b0afc..8ed776167 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -113,6 +113,7 @@ var resources_386 = []*ResourceDesc{ {Name: "fd_uinput", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uinput"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb_hid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_hid"}, Values: []uint64{18446744073709551615}}, + {Name: "fd_usb_printer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_printer"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usbmon", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_usbmon"}, Values: []uint64{18446744073709551615}}, {Name: "fd_userio", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_userio"}, Values: []uint64{18446744073709551615}}, {Name: "fd_v4l2_buffer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_v4l2_buffer"}, Values: []uint64{18446744073709551615}}, @@ -25483,23 +25484,37 @@ var structDescs_386 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "slave_interfaces", IsVarlen: true}, Kind: 1, RangeEnd: 6}, }}}, {Key: StructKey{Name: "usb_config_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, {Key: StructKey{Name: "usb_config_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_hid", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bConfigurationValue", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 160}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, @@ -25525,6 +25540,9 @@ var structDescs_386 = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, @@ -25559,6 +25577,23 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_versions", FldName: "bcdUSB", TypeSize: 2}}, Vals: []uint64{272, 512, 513, 592, 768, 784}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceSubClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceProtocol", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "bMaxPacketSize0", TypeSize: 1}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idVendor", TypeSize: 2}}, Val: 1008}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 27671}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bcdDevice", TypeSize: 2}}, Val: 64}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iManufacturer", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iProduct", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iSerialNumber", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, FldName: "inner"}, }}}, @@ -25568,6 +25603,12 @@ var structDescs_386 = []*KeyedStruct{ {Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_out", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25590,6 +25631,28 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 130}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25605,6 +25668,10 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, FldName: "in"}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, FldName: "in"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}}, Kind: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, }}}, @@ -25671,6 +25738,9 @@ var structDescs_386 = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, @@ -25697,6 +25767,19 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"}, &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceNumber", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}, Val: 7}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceProtocol", TypeSize: 1}}, Kind: 2, RangeBegin: 1, RangeEnd: 3}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"}, + }}}, {Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"}, @@ -25707,6 +25790,10 @@ var structDescs_386 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_change_flags", FldName: "wPortChange", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 32, 64, 128}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "dwExtPortStatus", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_ext_port_status_flags", TypeSize: 4}}, Vals: []uint64{15, 240, 3840, 61440}, BitMask: true}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_printer_get_id_response"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_printer_get_id_response", IsVarlen: true}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, ArgFormat: 1}, Path: []string{"id"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "id", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "usb_ptm_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_ptm_cap_descriptor", TypeSize: 3}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 16}, @@ -26870,6 +26957,12 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_hub_descriptor_ss"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]", TypeSize: 15}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 33}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "data"}, + }}}, {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 34}, @@ -26888,21 +26981,44 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_string_descriptor"}, FldName: "data"}, }}}, - {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 28}, Fields: []Type{ + {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 24}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "string", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "bos", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hid_report", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_hs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_ss", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]"}}}, }}}, + {Key: StructKey{Name: "vusb_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_hid", TypeSize: 20}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_REPORT", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_HID", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}}}, + }}}, + {Key: StructKey{Name: "vusb_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_printer", TypeSize: 12}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + }}}, {Key: StructKey{Name: "vusb_response_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_generic", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_request_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{0, 32, 64}, BitMask: true}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_requests", FldName: "req", TypeSize: 1}}, Vals: []uint64{0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 48, 49, 13, 14, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 20, 21, 22, 23, 24}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, + }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]", TypeSize: 7}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, + }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 129}, @@ -26933,11 +27049,11 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 4}, }}}, - {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeEnd: 1023}, + &StructType{Key: StructKey{Name: "usb_printer_get_id_response"}, FldName: "data"}, }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]", TypeSize: 7}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, @@ -27047,7 +27163,7 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 104}, Fields: []Type{ + {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 92}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "get_interface", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, @@ -27057,9 +27173,6 @@ var structDescs_386 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MAX", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_RES", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MEM", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_ID", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_STATUS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_hub", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_port", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cdc_USB_CDC_GET_NTB_PARAMETERS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]"}}}, @@ -27075,6 +27188,23 @@ var structDescs_386 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_READ_GPIOS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_SW_PHY_STATUS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]"}}}, }}}, + {Key: StructKey{Name: "vusb_responses_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_hid", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_REPORT", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_PROTOCOL", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}}}, + }}}, + {Key: StructKey{Name: "vusb_responses_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_printer", TypeSize: 28}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_ID", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_STATUS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, + }}}, {Key: StructKey{Name: "winsize"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2}}}, @@ -43173,6 +43303,12 @@ var syscalls_386 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_hid"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$printer", CallName: "syz_usb_connect", Args: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_device_speed", FldName: "speed", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "dev_len", TypeSize: 4}}, Path: []string{"dev"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_control_io", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, @@ -43180,8 +43316,13 @@ var syscalls_386 = []*Syscall{ }}, {Name: "syz_usb_control_io$hid", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "fd", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_hid"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses_hid"}}}, + }}, + {Name: "syz_usb_control_io$printer", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses_printer"}}}, }}, {Name: "syz_usb_disconnect", CallName: "syz_usb_disconnect", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, @@ -45869,6 +46010,7 @@ var consts_386 = []ConstValue{ {Name: "HID_REPORT_ID_UNKNOWN", Value: 4294967295}, {Name: "HID_REPORT_TYPE_MAX", Value: 3}, {Name: "HID_REPORT_TYPE_MIN", Value: 1}, + {Name: "HID_REQ_GET_REPORT", Value: 1}, {Name: "HUB_CHANGE_LOCAL_POWER", Value: 1}, {Name: "HUB_CHANGE_OVERCURRENT", Value: 2}, {Name: "HUB_CHAR_COMMON_LPSM"}, @@ -50151,6 +50293,8 @@ var consts_386 = []ConstValue{ {Name: "UI_SET_SWBIT", Value: 1074025837}, {Name: "UMOUNT_NOFOLLOW", Value: 8}, {Name: "UNIX_PATH_MAX", Value: 108}, + {Name: "USBLP_FIRST_PROTOCOL", Value: 1}, + {Name: "USBLP_LAST_PROTOCOL", Value: 3}, {Name: "USBLP_REQ_GET_ID"}, {Name: "USBLP_REQ_GET_STATUS", Value: 1}, {Name: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST"}, @@ -50184,11 +50328,11 @@ var consts_386 = []ConstValue{ {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, {Name: "USB_CLASS_HID", Value: 3}, + {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, {Name: "USB_CONFIG_ATT_ONE", Value: 128}, {Name: "USB_CONFIG_ATT_SELFPOWER", Value: 64}, {Name: "USB_CONFIG_ATT_WAKEUP", Value: 32}, - {Name: "USB_CONFIG_HID_ATTRIBUTES", Value: 160}, {Name: "USB_DIR_IN", Value: 128}, {Name: "USB_DIR_OUT"}, {Name: "USB_DT_BOS", Value: 15}, @@ -50227,6 +50371,9 @@ var consts_386 = []ConstValue{ {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, {Name: "USB_ENDPOINT_INTR_NOTIFICATION", Value: 16}, {Name: "USB_ENDPOINT_INTR_PERIODIC"}, + {Name: "USB_ENDPOINT_PRINTER_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_PRINTER_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_PRINTER_OUT_ADDRESS", Value: 1}, {Name: "USB_ENDPOINT_SYNC_ADAPTIVE", Value: 8}, {Name: "USB_ENDPOINT_SYNC_ASYNC", Value: 4}, {Name: "USB_ENDPOINT_SYNC_NONE"}, @@ -52076,4 +52223,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "0b0d84e9322a324e5d1713852f21cc9d00e5505a" +const revision_386 = "eb22b8a389910e3ec878475738f280bd61b00a09" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 7ec41fd63..8db199c8e 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -113,6 +113,7 @@ var resources_amd64 = []*ResourceDesc{ {Name: "fd_uinput", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uinput"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb_hid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_hid"}, Values: []uint64{18446744073709551615}}, + {Name: "fd_usb_printer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_printer"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usbmon", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_usbmon"}, Values: []uint64{18446744073709551615}}, {Name: "fd_userio", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_userio"}, Values: []uint64{18446744073709551615}}, {Name: "fd_v4l2_buffer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_v4l2_buffer"}, Values: []uint64{18446744073709551615}}, @@ -25854,23 +25855,37 @@ var structDescs_amd64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "slave_interfaces", IsVarlen: true}, Kind: 1, RangeEnd: 6}, }}}, {Key: StructKey{Name: "usb_config_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, {Key: StructKey{Name: "usb_config_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_hid", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bConfigurationValue", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 160}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, @@ -25896,6 +25911,9 @@ var structDescs_amd64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, @@ -25930,6 +25948,23 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_versions", FldName: "bcdUSB", TypeSize: 2}}, Vals: []uint64{272, 512, 513, 592, 768, 784}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceSubClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceProtocol", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "bMaxPacketSize0", TypeSize: 1}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idVendor", TypeSize: 2}}, Val: 1008}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 27671}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bcdDevice", TypeSize: 2}}, Val: 64}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iManufacturer", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iProduct", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iSerialNumber", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, FldName: "inner"}, }}}, @@ -25939,6 +25974,12 @@ var structDescs_amd64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_out", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25961,6 +26002,28 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 130}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25976,6 +26039,10 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, FldName: "in"}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, FldName: "in"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}}, Kind: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, }}}, @@ -26042,6 +26109,9 @@ var structDescs_amd64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, @@ -26068,6 +26138,19 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"}, &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceNumber", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}, Val: 7}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceProtocol", TypeSize: 1}}, Kind: 2, RangeBegin: 1, RangeEnd: 3}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"}, + }}}, {Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"}, @@ -26078,6 +26161,10 @@ var structDescs_amd64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_change_flags", FldName: "wPortChange", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 32, 64, 128}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "dwExtPortStatus", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_ext_port_status_flags", TypeSize: 4}}, Vals: []uint64{15, 240, 3840, 61440}, BitMask: true}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_printer_get_id_response"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_printer_get_id_response", IsVarlen: true}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, ArgFormat: 1}, Path: []string{"id"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "id", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "usb_ptm_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_ptm_cap_descriptor", TypeSize: 3}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 16}, @@ -27248,6 +27335,12 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_hub_descriptor_ss"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]", TypeSize: 15}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 33}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "data"}, + }}}, {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 34}, @@ -27266,21 +27359,44 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_string_descriptor"}, FldName: "data"}, }}}, - {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 52}, Fields: []Type{ + {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 44}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "string", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "bos", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hid_report", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_hs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_ss", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]"}}}, }}}, + {Key: StructKey{Name: "vusb_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_hid", TypeSize: 36}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_REPORT", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_HID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}}}, + }}}, + {Key: StructKey{Name: "vusb_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_printer", TypeSize: 20}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + }}}, {Key: StructKey{Name: "vusb_response_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_generic", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_request_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{0, 32, 64}, BitMask: true}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_requests", FldName: "req", TypeSize: 1}}, Vals: []uint64{0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 48, 49, 13, 14, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 20, 21, 22, 23, 24}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, + }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]", TypeSize: 7}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, + }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 129}, @@ -27311,11 +27427,11 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 4}, }}}, - {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeEnd: 1023}, + &StructType{Key: StructKey{Name: "usb_printer_get_id_response"}, FldName: "data"}, }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]", TypeSize: 7}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, @@ -27425,7 +27541,7 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 204}, Fields: []Type{ + {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 180}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "get_interface", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, @@ -27435,9 +27551,6 @@ var structDescs_amd64 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MAX", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_RES", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MEM", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_ID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_hub", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_port", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cdc_USB_CDC_GET_NTB_PARAMETERS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]"}}}, @@ -27453,6 +27566,23 @@ var structDescs_amd64 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_READ_GPIOS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_SW_PHY_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]"}}}, }}}, + {Key: StructKey{Name: "vusb_responses_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_hid", TypeSize: 44}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_REPORT", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_PROTOCOL", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}}}, + }}}, + {Key: StructKey{Name: "vusb_responses_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_printer", TypeSize: 52}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_ID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, + }}}, {Key: StructKey{Name: "winsize"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2}}}, @@ -43695,6 +43825,12 @@ var syscalls_amd64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_hid"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$printer", CallName: "syz_usb_connect", Args: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_device_speed", FldName: "speed", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "dev_len", TypeSize: 8}}, Path: []string{"dev"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_control_io", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, @@ -43702,8 +43838,13 @@ var syscalls_amd64 = []*Syscall{ }}, {Name: "syz_usb_control_io$hid", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "fd", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_hid"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_hid"}}}, + }}, + {Name: "syz_usb_control_io$printer", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_printer"}}}, }}, {Name: "syz_usb_disconnect", CallName: "syz_usb_disconnect", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, @@ -46391,6 +46532,7 @@ var consts_amd64 = []ConstValue{ {Name: "HID_REPORT_ID_UNKNOWN", Value: 4294967295}, {Name: "HID_REPORT_TYPE_MAX", Value: 3}, {Name: "HID_REPORT_TYPE_MIN", Value: 1}, + {Name: "HID_REQ_GET_REPORT", Value: 1}, {Name: "HUB_CHANGE_LOCAL_POWER", Value: 1}, {Name: "HUB_CHANGE_OVERCURRENT", Value: 2}, {Name: "HUB_CHAR_COMMON_LPSM"}, @@ -50687,6 +50829,8 @@ var consts_amd64 = []ConstValue{ {Name: "UI_SET_SWBIT", Value: 1074025837}, {Name: "UMOUNT_NOFOLLOW", Value: 8}, {Name: "UNIX_PATH_MAX", Value: 108}, + {Name: "USBLP_FIRST_PROTOCOL", Value: 1}, + {Name: "USBLP_LAST_PROTOCOL", Value: 3}, {Name: "USBLP_REQ_GET_ID"}, {Name: "USBLP_REQ_GET_STATUS", Value: 1}, {Name: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST"}, @@ -50720,11 +50864,11 @@ var consts_amd64 = []ConstValue{ {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, {Name: "USB_CLASS_HID", Value: 3}, + {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, {Name: "USB_CONFIG_ATT_ONE", Value: 128}, {Name: "USB_CONFIG_ATT_SELFPOWER", Value: 64}, {Name: "USB_CONFIG_ATT_WAKEUP", Value: 32}, - {Name: "USB_CONFIG_HID_ATTRIBUTES", Value: 160}, {Name: "USB_DIR_IN", Value: 128}, {Name: "USB_DIR_OUT"}, {Name: "USB_DT_BOS", Value: 15}, @@ -50763,6 +50907,9 @@ var consts_amd64 = []ConstValue{ {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, {Name: "USB_ENDPOINT_INTR_NOTIFICATION", Value: 16}, {Name: "USB_ENDPOINT_INTR_PERIODIC"}, + {Name: "USB_ENDPOINT_PRINTER_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_PRINTER_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_PRINTER_OUT_ADDRESS", Value: 1}, {Name: "USB_ENDPOINT_SYNC_ADAPTIVE", Value: 8}, {Name: "USB_ENDPOINT_SYNC_ASYNC", Value: 4}, {Name: "USB_ENDPOINT_SYNC_NONE"}, @@ -52613,4 +52760,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "292a4184c5acef4ffb5b6e767057652187899a00" +const revision_amd64 = "b025d70b7713cc48e9ab783fc35e2410b69a5736" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index b26aaa011..929a5af9d 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -113,6 +113,7 @@ var resources_arm = []*ResourceDesc{ {Name: "fd_uinput", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uinput"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb_hid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_hid"}, Values: []uint64{18446744073709551615}}, + {Name: "fd_usb_printer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_printer"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usbmon", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_usbmon"}, Values: []uint64{18446744073709551615}}, {Name: "fd_userio", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_userio"}, Values: []uint64{18446744073709551615}}, {Name: "fd_v4l2_buffer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_v4l2_buffer"}, Values: []uint64{18446744073709551615}}, @@ -25305,23 +25306,37 @@ var structDescs_arm = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "slave_interfaces", IsVarlen: true}, Kind: 1, RangeEnd: 6}, }}}, {Key: StructKey{Name: "usb_config_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, {Key: StructKey{Name: "usb_config_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_hid", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bConfigurationValue", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 160}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, @@ -25347,6 +25362,9 @@ var structDescs_arm = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, @@ -25381,6 +25399,23 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_versions", FldName: "bcdUSB", TypeSize: 2}}, Vals: []uint64{272, 512, 513, 592, 768, 784}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceSubClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceProtocol", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "bMaxPacketSize0", TypeSize: 1}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idVendor", TypeSize: 2}}, Val: 1008}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 27671}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bcdDevice", TypeSize: 2}}, Val: 64}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iManufacturer", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iProduct", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iSerialNumber", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, FldName: "inner"}, }}}, @@ -25390,6 +25425,12 @@ var structDescs_arm = []*KeyedStruct{ {Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_out", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25412,6 +25453,28 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 130}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25427,6 +25490,10 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, FldName: "in"}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, FldName: "in"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}}, Kind: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, }}}, @@ -25493,6 +25560,9 @@ var structDescs_arm = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, @@ -25519,6 +25589,19 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"}, &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceNumber", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}, Val: 7}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceProtocol", TypeSize: 1}}, Kind: 2, RangeBegin: 1, RangeEnd: 3}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"}, + }}}, {Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"}, @@ -25529,6 +25612,10 @@ var structDescs_arm = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_change_flags", FldName: "wPortChange", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 32, 64, 128}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "dwExtPortStatus", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_ext_port_status_flags", TypeSize: 4}}, Vals: []uint64{15, 240, 3840, 61440}, BitMask: true}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_printer_get_id_response"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_printer_get_id_response", IsVarlen: true}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, ArgFormat: 1}, Path: []string{"id"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "id", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "usb_ptm_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_ptm_cap_descriptor", TypeSize: 3}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 16}, @@ -26676,6 +26763,12 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_hub_descriptor_ss"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]", TypeSize: 15}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 33}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "data"}, + }}}, {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 34}, @@ -26694,21 +26787,44 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_string_descriptor"}, FldName: "data"}, }}}, - {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 28}, Fields: []Type{ + {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 24}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "string", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "bos", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hid_report", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_hs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_ss", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]"}}}, }}}, + {Key: StructKey{Name: "vusb_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_hid", TypeSize: 20}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_REPORT", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_HID", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}}}, + }}}, + {Key: StructKey{Name: "vusb_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_printer", TypeSize: 12}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + }}}, {Key: StructKey{Name: "vusb_response_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_generic", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_request_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{0, 32, 64}, BitMask: true}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_requests", FldName: "req", TypeSize: 1}}, Vals: []uint64{0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 48, 49, 13, 14, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 20, 21, 22, 23, 24}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, + }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]", TypeSize: 7}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, + }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 129}, @@ -26739,11 +26855,11 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 4}, }}}, - {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeEnd: 1023}, + &StructType{Key: StructKey{Name: "usb_printer_get_id_response"}, FldName: "data"}, }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]", TypeSize: 7}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, @@ -26853,7 +26969,7 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 104}, Fields: []Type{ + {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 92}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "get_interface", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, @@ -26863,9 +26979,6 @@ var structDescs_arm = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MAX", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_RES", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MEM", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_ID", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_STATUS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_hub", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_port", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cdc_USB_CDC_GET_NTB_PARAMETERS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]"}}}, @@ -26881,6 +26994,23 @@ var structDescs_arm = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_READ_GPIOS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_SW_PHY_STATUS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]"}}}, }}}, + {Key: StructKey{Name: "vusb_responses_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_hid", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_REPORT", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_PROTOCOL", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}}}, + }}}, + {Key: StructKey{Name: "vusb_responses_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_printer", TypeSize: 28}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_ID", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_STATUS", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, + }}}, {Key: StructKey{Name: "winsize"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2}}}, @@ -42829,6 +42959,12 @@ var syscalls_arm = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_hid"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$printer", CallName: "syz_usb_connect", Args: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_device_speed", FldName: "speed", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "dev_len", TypeSize: 4}}, Path: []string{"dev"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_control_io", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, @@ -42836,8 +42972,13 @@ var syscalls_arm = []*Syscall{ }}, {Name: "syz_usb_control_io$hid", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "fd", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_hid"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses_hid"}}}, + }}, + {Name: "syz_usb_control_io$printer", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses_printer"}}}, }}, {Name: "syz_usb_disconnect", CallName: "syz_usb_disconnect", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, @@ -45509,6 +45650,7 @@ var consts_arm = []ConstValue{ {Name: "HID_REPORT_ID_UNKNOWN", Value: 4294967295}, {Name: "HID_REPORT_TYPE_MAX", Value: 3}, {Name: "HID_REPORT_TYPE_MIN", Value: 1}, + {Name: "HID_REQ_GET_REPORT", Value: 1}, {Name: "HUB_CHANGE_LOCAL_POWER", Value: 1}, {Name: "HUB_CHANGE_OVERCURRENT", Value: 2}, {Name: "HUB_CHAR_COMMON_LPSM"}, @@ -49738,6 +49880,8 @@ var consts_arm = []ConstValue{ {Name: "UI_SET_SWBIT", Value: 1074025837}, {Name: "UMOUNT_NOFOLLOW", Value: 8}, {Name: "UNIX_PATH_MAX", Value: 108}, + {Name: "USBLP_FIRST_PROTOCOL", Value: 1}, + {Name: "USBLP_LAST_PROTOCOL", Value: 3}, {Name: "USBLP_REQ_GET_ID"}, {Name: "USBLP_REQ_GET_STATUS", Value: 1}, {Name: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST"}, @@ -49771,11 +49915,11 @@ var consts_arm = []ConstValue{ {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, {Name: "USB_CLASS_HID", Value: 3}, + {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, {Name: "USB_CONFIG_ATT_ONE", Value: 128}, {Name: "USB_CONFIG_ATT_SELFPOWER", Value: 64}, {Name: "USB_CONFIG_ATT_WAKEUP", Value: 32}, - {Name: "USB_CONFIG_HID_ATTRIBUTES", Value: 160}, {Name: "USB_DIR_IN", Value: 128}, {Name: "USB_DIR_OUT"}, {Name: "USB_DT_BOS", Value: 15}, @@ -49814,6 +49958,9 @@ var consts_arm = []ConstValue{ {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, {Name: "USB_ENDPOINT_INTR_NOTIFICATION", Value: 16}, {Name: "USB_ENDPOINT_INTR_PERIODIC"}, + {Name: "USB_ENDPOINT_PRINTER_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_PRINTER_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_PRINTER_OUT_ADDRESS", Value: 1}, {Name: "USB_ENDPOINT_SYNC_ADAPTIVE", Value: 8}, {Name: "USB_ENDPOINT_SYNC_ASYNC", Value: 4}, {Name: "USB_ENDPOINT_SYNC_NONE"}, @@ -51653,4 +51800,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "aa364331e7ce0b6e1d44e153e157093ec9ac8f00" +const revision_arm = "fdb9cb5b71481f79ff86d824721def50b72fafa5" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index ac1735326..9796420cb 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -113,6 +113,7 @@ var resources_arm64 = []*ResourceDesc{ {Name: "fd_uinput", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uinput"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb_hid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_hid"}, Values: []uint64{18446744073709551615}}, + {Name: "fd_usb_printer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_printer"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usbmon", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_usbmon"}, Values: []uint64{18446744073709551615}}, {Name: "fd_userio", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_userio"}, Values: []uint64{18446744073709551615}}, {Name: "fd_v4l2_buffer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_v4l2_buffer"}, Values: []uint64{18446744073709551615}}, @@ -25671,23 +25672,37 @@ var structDescs_arm64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "slave_interfaces", IsVarlen: true}, Kind: 1, RangeEnd: 6}, }}}, {Key: StructKey{Name: "usb_config_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, {Key: StructKey{Name: "usb_config_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_hid", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bConfigurationValue", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 160}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, @@ -25713,6 +25728,9 @@ var structDescs_arm64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, @@ -25747,6 +25765,23 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_versions", FldName: "bcdUSB", TypeSize: 2}}, Vals: []uint64{272, 512, 513, 592, 768, 784}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceSubClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceProtocol", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "bMaxPacketSize0", TypeSize: 1}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idVendor", TypeSize: 2}}, Val: 1008}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 27671}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bcdDevice", TypeSize: 2}}, Val: 64}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iManufacturer", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iProduct", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iSerialNumber", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, FldName: "inner"}, }}}, @@ -25756,6 +25791,12 @@ var structDescs_arm64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_out", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25778,6 +25819,28 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 130}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25793,6 +25856,10 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, FldName: "in"}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, FldName: "in"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}}, Kind: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, }}}, @@ -25859,6 +25926,9 @@ var structDescs_arm64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, @@ -25885,6 +25955,19 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"}, &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceNumber", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}, Val: 7}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceProtocol", TypeSize: 1}}, Kind: 2, RangeBegin: 1, RangeEnd: 3}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"}, + }}}, {Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"}, @@ -25895,6 +25978,10 @@ var structDescs_arm64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_change_flags", FldName: "wPortChange", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 32, 64, 128}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "dwExtPortStatus", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_ext_port_status_flags", TypeSize: 4}}, Vals: []uint64{15, 240, 3840, 61440}, BitMask: true}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_printer_get_id_response"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_printer_get_id_response", IsVarlen: true}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, ArgFormat: 1}, Path: []string{"id"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "id", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "usb_ptm_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_ptm_cap_descriptor", TypeSize: 3}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 16}, @@ -27040,6 +27127,12 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_hub_descriptor_ss"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]", TypeSize: 15}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 33}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "data"}, + }}}, {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 34}, @@ -27058,21 +27151,44 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_string_descriptor"}, FldName: "data"}, }}}, - {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 52}, Fields: []Type{ + {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 44}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "string", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "bos", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hid_report", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_hs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_ss", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]"}}}, }}}, + {Key: StructKey{Name: "vusb_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_hid", TypeSize: 36}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_REPORT", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_HID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}}}, + }}}, + {Key: StructKey{Name: "vusb_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_printer", TypeSize: 20}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + }}}, {Key: StructKey{Name: "vusb_response_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_generic", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_request_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{0, 32, 64}, BitMask: true}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_requests", FldName: "req", TypeSize: 1}}, Vals: []uint64{0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 48, 49, 13, 14, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 20, 21, 22, 23, 24}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, + }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]", TypeSize: 7}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, + }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 129}, @@ -27103,11 +27219,11 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 4}, }}}, - {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeEnd: 1023}, + &StructType{Key: StructKey{Name: "usb_printer_get_id_response"}, FldName: "data"}, }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]", TypeSize: 7}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, @@ -27217,7 +27333,7 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 204}, Fields: []Type{ + {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 180}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "get_interface", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, @@ -27227,9 +27343,6 @@ var structDescs_arm64 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MAX", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_RES", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MEM", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_ID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_hub", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_port", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cdc_USB_CDC_GET_NTB_PARAMETERS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]"}}}, @@ -27245,6 +27358,23 @@ var structDescs_arm64 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_READ_GPIOS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_SW_PHY_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]"}}}, }}}, + {Key: StructKey{Name: "vusb_responses_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_hid", TypeSize: 44}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_REPORT", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_PROTOCOL", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}}}, + }}}, + {Key: StructKey{Name: "vusb_responses_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_printer", TypeSize: 52}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_ID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, + }}}, {Key: StructKey{Name: "winsize"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2}}}, @@ -43171,6 +43301,12 @@ var syscalls_arm64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_hid"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$printer", CallName: "syz_usb_connect", Args: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_device_speed", FldName: "speed", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "dev_len", TypeSize: 8}}, Path: []string{"dev"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_control_io", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, @@ -43178,8 +43314,13 @@ var syscalls_arm64 = []*Syscall{ }}, {Name: "syz_usb_control_io$hid", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "fd", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_hid"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_hid"}}}, + }}, + {Name: "syz_usb_control_io$printer", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_printer"}}}, }}, {Name: "syz_usb_disconnect", CallName: "syz_usb_disconnect", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, @@ -45837,6 +45978,7 @@ var consts_arm64 = []ConstValue{ {Name: "HID_REPORT_ID_UNKNOWN", Value: 4294967295}, {Name: "HID_REPORT_TYPE_MAX", Value: 3}, {Name: "HID_REPORT_TYPE_MIN", Value: 1}, + {Name: "HID_REQ_GET_REPORT", Value: 1}, {Name: "HUB_CHANGE_LOCAL_POWER", Value: 1}, {Name: "HUB_CHANGE_OVERCURRENT", Value: 2}, {Name: "HUB_CHAR_COMMON_LPSM"}, @@ -50080,6 +50222,8 @@ var consts_arm64 = []ConstValue{ {Name: "UI_SET_SWBIT", Value: 1074025837}, {Name: "UMOUNT_NOFOLLOW", Value: 8}, {Name: "UNIX_PATH_MAX", Value: 108}, + {Name: "USBLP_FIRST_PROTOCOL", Value: 1}, + {Name: "USBLP_LAST_PROTOCOL", Value: 3}, {Name: "USBLP_REQ_GET_ID"}, {Name: "USBLP_REQ_GET_STATUS", Value: 1}, {Name: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST"}, @@ -50113,11 +50257,11 @@ var consts_arm64 = []ConstValue{ {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, {Name: "USB_CLASS_HID", Value: 3}, + {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, {Name: "USB_CONFIG_ATT_ONE", Value: 128}, {Name: "USB_CONFIG_ATT_SELFPOWER", Value: 64}, {Name: "USB_CONFIG_ATT_WAKEUP", Value: 32}, - {Name: "USB_CONFIG_HID_ATTRIBUTES", Value: 160}, {Name: "USB_DIR_IN", Value: 128}, {Name: "USB_DIR_OUT"}, {Name: "USB_DT_BOS", Value: 15}, @@ -50156,6 +50300,9 @@ var consts_arm64 = []ConstValue{ {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, {Name: "USB_ENDPOINT_INTR_NOTIFICATION", Value: 16}, {Name: "USB_ENDPOINT_INTR_PERIODIC"}, + {Name: "USB_ENDPOINT_PRINTER_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_PRINTER_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_PRINTER_OUT_ADDRESS", Value: 1}, {Name: "USB_ENDPOINT_SYNC_ADAPTIVE", Value: 8}, {Name: "USB_ENDPOINT_SYNC_ASYNC", Value: 4}, {Name: "USB_ENDPOINT_SYNC_NONE"}, @@ -51965,4 +52112,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "8b31bd17e4d7e7fdf86173d43f420f10000c6864" +const revision_arm64 = "26a51558327902a8e8951bd6afdcdae046006802" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 0fb66418b..7788c1eee 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -113,6 +113,7 @@ var resources_ppc64le = []*ResourceDesc{ {Name: "fd_uinput", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uinput"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usb_hid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_hid"}, Values: []uint64{18446744073709551615}}, + {Name: "fd_usb_printer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_printer"}, Values: []uint64{18446744073709551615}}, {Name: "fd_usbmon", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_usbmon"}, Values: []uint64{18446744073709551615}}, {Name: "fd_userio", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_userio"}, Values: []uint64{18446744073709551615}}, {Name: "fd_v4l2_buffer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_v4l2_buffer"}, Values: []uint64{18446744073709551615}}, @@ -25541,23 +25542,37 @@ var structDescs_ppc64le = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "slave_interfaces", IsVarlen: true}, Kind: 1, RangeEnd: 6}, }}}, {Key: StructKey{Name: "usb_config_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, {Key: StructKey{Name: "usb_config_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_hid", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bConfigurationValue", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 160}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, - {Key: StructKey{Name: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumInterfaces", TypeSize: 1}}, Path: []string{"interfaces"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bConfigurationValue", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iConfiguration", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_config_attributes", FldName: "bmAttributes", TypeSize: 1}}, Vals: []uint64{128, 64, 32, 16}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMaxPower", TypeSize: 1}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "interfaces", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_interface_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, + {Key: StructKey{Name: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 2}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "wTotalLength", TypeSize: 2}}, Path: []string{"parent"}}, @@ -25583,6 +25598,9 @@ var structDescs_ppc64le = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, @@ -25617,6 +25635,23 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_hid"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 18}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 1}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_versions", FldName: "bcdUSB", TypeSize: 2}}, Vals: []uint64{272, 512, 513, 592, 768, 784}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceSubClass", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDeviceProtocol", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "bMaxPacketSize0", TypeSize: 1}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idVendor", TypeSize: 2}}, Val: 1008}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 27671}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bcdDevice", TypeSize: 2}}, Val: 64}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iManufacturer", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iProduct", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iSerialNumber", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumConfigurations", TypeSize: 1}}, Path: []string{"configs"}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "configs", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_config_descriptor_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, FldName: "inner"}, }}}, @@ -25626,6 +25661,12 @@ var structDescs_ppc64le = []*KeyedStruct{ {Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_out", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_printer_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25648,6 +25689,28 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 130}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void]", TypeSize: 9}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bEndpointAddress", TypeSize: 1}}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 2}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_max_packet_sizes", FldName: "wMaxPacketSize", TypeSize: 2}}, Vals: []uint64{8, 16, 32, 64}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterval", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bRefresh", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[flags[usb_endpoint_addresses, int8], flags[usb_endpoint_attributes, int8], array[usb_endpoint_extra_descriptor, 0:2]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 5}, @@ -25663,6 +25726,10 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, FldName: "in"}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_hid_out"}}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_out"}, FldName: "in"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "out", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_printer_in"}}, Kind: 1, RangeEnd: 1}, + }}}, {Key: StructKey{Name: "usb_endpoint_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, }}}, @@ -25729,6 +25796,9 @@ var structDescs_ppc64le = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, @@ -25755,6 +25825,19 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"}, &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceNumber", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}, Val: 7}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bInterfaceProtocol", TypeSize: 1}}, Kind: 2, RangeBegin: 1, RangeEnd: 3}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"}, + }}}, {Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"}, &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"}, @@ -25765,6 +25848,10 @@ var structDescs_ppc64le = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_change_flags", FldName: "wPortChange", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 32, 64, 128}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "dwExtPortStatus", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_ext_port_status_flags", TypeSize: 4}}, Vals: []uint64{15, 240, 3840, 61440}, BitMask: true}, Kind: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_printer_get_id_response"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_printer_get_id_response", IsVarlen: true}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, ArgFormat: 1}, Path: []string{"id"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "id", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "usb_ptm_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_ptm_cap_descriptor", TypeSize: 3}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 16}, @@ -26935,6 +27022,12 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_hub_descriptor_ss"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]", TypeSize: 15}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 33}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "data"}, + }}}, {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 34}, @@ -26953,21 +27046,44 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &StructType{Key: StructKey{Name: "usb_string_descriptor"}, FldName: "data"}, }}}, - {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 52}, Fields: []Type{ + {Key: StructKey{Name: "vusb_descriptors"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors", TypeSize: 44}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "string", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "bos", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hid_report", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_hs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_ss", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]"}}}, }}}, + {Key: StructKey{Name: "vusb_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_hid", TypeSize: 36}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_REPORT", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_DT_HID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]"}}}, + }}}, + {Key: StructKey{Name: "vusb_descriptors_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_printer", TypeSize: 20}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_DT_STRING", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]"}}}, + }}}, {Key: StructKey{Name: "vusb_response_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_generic", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_request_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{0, 32, 64}, BitMask: true}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_requests", FldName: "req", TypeSize: 1}}, Vals: []uint64{0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 48, 49, 13, 14, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 20, 21, 22, 23, 24}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, + }}}, + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]", TypeSize: 7}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 1}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, + }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}, Val: 129}, @@ -26998,11 +27114,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 4}, }}}, - {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "req", TypeSize: 1}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeEnd: 1023}, + &StructType{Key: StructKey{Name: "usb_printer_get_id_response"}, FldName: "data"}, }}}, {Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]", TypeSize: 7}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 32}, @@ -27112,7 +27228,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 204}, Fields: []Type{ + {Key: StructKey{Name: "vusb_responses"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses", TypeSize: 180}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "get_interface", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, @@ -27122,9 +27238,6 @@ var structDescs_ppc64le = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MAX", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_RES", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "audio_UAC_GET_MEM", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_ID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_GET_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "printer_USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_hub", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "hub_USB_REQ_GET_STATUS_port", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cdc_USB_CDC_GET_NTB_PARAMETERS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]"}}}, @@ -27140,6 +27253,23 @@ var structDescs_ppc64le = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_READ_GPIOS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "asix_AX_CMD_SW_PHY_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]"}}}, }}}, + {Key: StructKey{Name: "vusb_responses_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_hid", TypeSize: 44}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_REPORT", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "HID_REQ_GET_PROTOCOL", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]"}}}, + }}}, + {Key: StructKey{Name: "vusb_responses_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_printer", TypeSize: 52}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"parent"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "generic", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_generic"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_INTERFACE", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USB_REQ_GET_CONFIGURATION", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_ID", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_GET_STATUS", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]"}}}, + }}}, {Key: StructKey{Name: "winsize"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2}}}, @@ -43144,6 +43274,12 @@ var syscalls_ppc64le = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_hid"}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$printer", CallName: "syz_usb_connect", Args: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_device_speed", FldName: "speed", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "dev_len", TypeSize: 8}}, Path: []string{"dev"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "conn_descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_connect_descriptors"}}}, + }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_control_io", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, @@ -43151,8 +43287,13 @@ var syscalls_ppc64le = []*Syscall{ }}, {Name: "syz_usb_control_io$hid", CallName: "syz_usb_control_io", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_hid", FldName: "fd", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_hid"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_hid"}}}, + }}, + {Name: "syz_usb_control_io$printer", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_printer", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_printer"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_printer"}}}, }}, {Name: "syz_usb_disconnect", CallName: "syz_usb_disconnect", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb", FldName: "fd", TypeSize: 4}}, @@ -45831,6 +45972,7 @@ var consts_ppc64le = []ConstValue{ {Name: "HID_REPORT_ID_UNKNOWN", Value: 4294967295}, {Name: "HID_REPORT_TYPE_MAX", Value: 3}, {Name: "HID_REPORT_TYPE_MIN", Value: 1}, + {Name: "HID_REQ_GET_REPORT", Value: 1}, {Name: "HUB_CHANGE_LOCAL_POWER", Value: 1}, {Name: "HUB_CHANGE_OVERCURRENT", Value: 2}, {Name: "HUB_CHAR_COMMON_LPSM"}, @@ -50053,6 +50195,8 @@ var consts_ppc64le = []ConstValue{ {Name: "UI_SET_SWBIT", Value: 2147767661}, {Name: "UMOUNT_NOFOLLOW", Value: 8}, {Name: "UNIX_PATH_MAX", Value: 108}, + {Name: "USBLP_FIRST_PROTOCOL", Value: 1}, + {Name: "USBLP_LAST_PROTOCOL", Value: 3}, {Name: "USBLP_REQ_GET_ID"}, {Name: "USBLP_REQ_GET_STATUS", Value: 1}, {Name: "USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST"}, @@ -50086,11 +50230,11 @@ var consts_ppc64le = []ConstValue{ {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, {Name: "USB_CLASS_HID", Value: 3}, + {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, {Name: "USB_CONFIG_ATT_ONE", Value: 128}, {Name: "USB_CONFIG_ATT_SELFPOWER", Value: 64}, {Name: "USB_CONFIG_ATT_WAKEUP", Value: 32}, - {Name: "USB_CONFIG_HID_ATTRIBUTES", Value: 160}, {Name: "USB_DIR_IN", Value: 128}, {Name: "USB_DIR_OUT"}, {Name: "USB_DT_BOS", Value: 15}, @@ -50129,6 +50273,9 @@ var consts_ppc64le = []ConstValue{ {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, {Name: "USB_ENDPOINT_INTR_NOTIFICATION", Value: 16}, {Name: "USB_ENDPOINT_INTR_PERIODIC"}, + {Name: "USB_ENDPOINT_PRINTER_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_PRINTER_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_PRINTER_OUT_ADDRESS", Value: 1}, {Name: "USB_ENDPOINT_SYNC_ADAPTIVE", Value: 8}, {Name: "USB_ENDPOINT_SYNC_ASYNC", Value: 4}, {Name: "USB_ENDPOINT_SYNC_NONE"}, @@ -51930,4 +52077,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "922a4e3ae970503d59073976dffb8f9edb1e7bb7" +const revision_ppc64le = "d118414cc10f2c07b6a9e1fae0e14db998375343" diff --git a/sys/linux/vusb.txt b/sys/linux/vusb.txt index ccfbe8dab..413b372fc 100644 --- a/sys/linux/vusb.txt +++ b/sys/linux/vusb.txt @@ -14,16 +14,11 @@ include <uapi/linux/usb/cdc.h> include <uapi/linux/if_ether.h> include <drivers/net/usb/asix.h> -# drivers/usb/class/usblp.c -define USBLP_REQ_GET_ID 0x00 -define USBLP_REQ_GET_STATUS 0x01 -define USBLP_REQ_RESET 0x02 -define USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST 0x00 - # This is a special fd for USB fuzzing and should only be used with syz_usb_* syzcalls. # We don't inherit it from the fd resource, to discourage syzkaller calling raw ioctls on it. resource fd_usb[int32]: -1 resource fd_usb_hid[fd_usb] +resource fd_usb_printer[fd_usb] # These are generic syzcalls for emulating arbitrary USB devices. # They are mostly targeted to cover the enumeration process. @@ -35,7 +30,11 @@ syz_usb_disconnect(fd fd_usb) # These are syzcalls that specifically target the HID device class. syz_usb_connect$hid(speed flags[usb_device_speed], dev_len len[dev], dev ptr[in, usb_device_descriptor_hid], conn_descs ptr[in, vusb_connect_descriptors]) fd_usb_hid -syz_usb_control_io$hid(fd fd_usb_hid, descs ptr[in, vusb_descriptors], resps ptr[in, vusb_responses]) +syz_usb_control_io$hid(fd fd_usb_hid, descs ptr[in, vusb_descriptors_hid], resps ptr[in, vusb_responses_hid]) + +# These are syzcalls that specifically target the PRINTER device class. +syz_usb_connect$printer(speed flags[usb_device_speed], dev_len len[dev], dev ptr[in, usb_device_descriptor_printer], conn_descs ptr[in, vusb_connect_descriptors]) fd_usb_printer +syz_usb_control_io$printer(fd fd_usb_printer, descs ptr[in, vusb_descriptors_printer], resps ptr[in, vusb_responses_printer]) usb_device_speed = USB_SPEED_UNKNOWN, USB_SPEED_LOW, USB_SPEED_FULL, USB_SPEED_HIGH, USB_SPEED_WIRELESS, USB_SPEED_SUPER, USB_SPEED_SUPER_PLUS @@ -68,13 +67,13 @@ usb_versions = 0x110, 0x200, 0x201, 0x250, 0x300, 0x310 # https://elixir.bootlin.com/linux/v5.1.7/source/drivers/usb/core/hub.c#L4661 usb_max_packet_sizes = 8, 16, 32, 64 -type usb_config_descriptor_t[ATTRS, IFS] { +type usb_config_descriptor_t[NUM, ATTRS, IFS] { bLength const[USB_DT_CONFIG_SIZE, int8] bDescriptorType const[USB_DT_CONFIG, int8] wTotalLength len[parent, int16] bNumInterfaces len[interfaces, int8] - bConfigurationValue int8 + bConfigurationValue NUM iConfiguration int8 bmAttributes ATTRS bMaxPower int8 @@ -129,7 +128,7 @@ usb_device_descriptor { # TODO: support more than one interface. usb_config_descriptor { - inner usb_config_descriptor_t[flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]] + inner usb_config_descriptor_t[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]] } [packed] usb_config_attributes = USB_CONFIG_ATT_ONE, USB_CONFIG_ATT_SELFPOWER, USB_CONFIG_ATT_WAKEUP, USB_CONFIG_ATT_BATTERY @@ -148,7 +147,7 @@ usb_endpoint_addresses = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, USB_ usb_endpoint_attributes = USB_ENDPOINT_XFER_CONTROL, USB_ENDPOINT_XFER_ISOC, USB_ENDPOINT_XFER_BULK, USB_ENDPOINT_XFER_INT, USB_ENDPOINT_INTR_PERIODIC, USB_ENDPOINT_INTR_NOTIFICATION, USB_ENDPOINT_SYNC_NONE, USB_ENDPOINT_SYNC_ASYNC, USB_ENDPOINT_SYNC_ADAPTIVE, USB_ENDPOINT_SYNC_SYNC, USB_ENDPOINT_USAGE_DATA, USB_ENDPOINT_USAGE_FEEDBACK, USB_ENDPOINT_USAGE_FEEDBACK -# TODO: consider unifying with vusb_descriptors in case this struct significantly grows. +# TODO: define this struct for each class. vusb_connect_descriptors { qual_len len[qual, int32] qual ptr[in, usb_qualifier_descriptor] @@ -164,17 +163,14 @@ vusb_connect_string_descriptor { } [packed] vusb_descriptors { - len len[parent, int32] - generic ptr[in, vusb_descriptor_generic] - - string ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]] - bos ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]] + len len[parent, int32] + generic ptr[in, vusb_descriptor_generic] -# For unknown reasons HID_DT_REPORT is requested as USB_TYPE_STANDARD and not as USB_TYPE_CLASS. - hid_report ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]] + string ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]] + bos ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_BOS, usb_bos_descriptor]] - hub_hs ptr[in, vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]] - hub_ss ptr[in, vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]] + hub_hs ptr[in, vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_HUB, usb_hub_descriptor_hs]] + hub_ss ptr[in, vusb_descriptor_t[USB_TYPE_CLASS, USB_DT_SS_HUB, usb_hub_descriptor_ss]] } [packed] vusb_descriptor_generic { @@ -193,39 +189,39 @@ type vusb_descriptor_t[CLASS, REQ, DATA] { data DATA } [packed] +# TODO: consider doing lookups based on USB_RECIP values. +# TODO: split out class and driver specific responses into separate structs. vusb_responses { - len len[parent, int32] - generic ptr[in, vusb_response_generic] - - get_interface ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]] - get_configuration ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]] - - audio_UAC_GET_CUR ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]] - audio_UAC_GET_MIN ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_MIN, array[int8, 1:3]]] - audio_UAC_GET_MAX ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]] - audio_UAC_GET_RES ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]] - audio_UAC_GET_MEM ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]] - - printer_USBLP_REQ_GET_ID ptr[in, vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, array[int8, 0:1023]]] - printer_USBLP_REQ_GET_STATUS ptr[in, vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]] - printer_USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST ptr[in, vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]] - - hub_USB_REQ_GET_STATUS_hub ptr[in, vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]] - hub_USB_REQ_GET_STATUS_port ptr[in, vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]] - - cdc_USB_CDC_GET_NTB_PARAMETERS ptr[in, vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]] - - asix_AX_CMD_READ_MII_REG ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_MII_REG, int16]] - asix_AX_CMD_STATMNGSTS_REG ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_STATMNGSTS_REG, int8]] - asix_AX_CMD_READ_EEPROM ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_EEPROM, array[int8, 2]]] - asix_AX_CMD_READ_RX_CTL ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_RX_CTL, int16]] - asix_AX_CMD_READ_NODE_ID ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_NODE_ID, mac_addr]] - asix_AX88172_CMD_READ_NODE_ID ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX88172_CMD_READ_NODE_ID, mac_addr]] - asix_AX_CMD_READ_PHY_ID ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_PHY_ID, array[int8, 2]]] - asix_AX_CMD_READ_MEDIUM_STATUS ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_MEDIUM_STATUS, int16]] - asix_AX_CMD_READ_MONITOR_MODE ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_MONITOR_MODE, int8]] - asix_AX_CMD_READ_GPIOS ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]] - asix_AX_CMD_SW_PHY_STATUS ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]] + len len[parent, int32] + generic ptr[in, vusb_response_generic] + + get_interface ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]] + get_configuration ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]] + +# TODO: https://elixir.bootlin.com/linux/v5.2.6/source/include/linux/usb/audio-v2.h#L256 + audio_UAC_GET_CUR ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_CUR, array[int8, 1:3]]] + audio_UAC_GET_MIN ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_MIN, array[int8, 1:3]]] + audio_UAC_GET_MAX ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_MAX, array[int8, 1:3]]] + audio_UAC_GET_RES ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_RES, array[int8, 1:4]]] + audio_UAC_GET_MEM ptr[in, vusb_response_t[USB_TYPE_CLASS, UAC_GET_MEM, array[int8, 3]]] + + hub_USB_REQ_GET_STATUS_hub ptr[in, vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_hub_status]] + hub_USB_REQ_GET_STATUS_port ptr[in, vusb_response_t[USB_TYPE_CLASS, USB_REQ_GET_STATUS, usb_port_status]] + +# TODO: https://elixir.bootlin.com/linux/v5.2.6/source/include/uapi/linux/usb/cdc.h#L233 + cdc_USB_CDC_GET_NTB_PARAMETERS ptr[in, vusb_response_t[USB_TYPE_CLASS, USB_CDC_GET_NTB_PARAMETERS, usb_cdc_ncm_ntb_parameters]] + + asix_AX_CMD_READ_MII_REG ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_MII_REG, int16]] + asix_AX_CMD_STATMNGSTS_REG ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_STATMNGSTS_REG, int8]] + asix_AX_CMD_READ_EEPROM ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_EEPROM, array[int8, 2]]] + asix_AX_CMD_READ_RX_CTL ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_RX_CTL, int16]] + asix_AX_CMD_READ_NODE_ID ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_NODE_ID, mac_addr]] + asix_AX88172_CMD_READ_NODE_ID ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX88172_CMD_READ_NODE_ID, mac_addr]] + asix_AX_CMD_READ_PHY_ID ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_PHY_ID, array[int8, 2]]] + asix_AX_CMD_READ_MEDIUM_STATUS ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_MEDIUM_STATUS, int16]] + asix_AX_CMD_READ_MONITOR_MODE ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_MONITOR_MODE, int8]] + asix_AX_CMD_READ_GPIOS ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_READ_GPIOS, int8]] + asix_AX_CMD_SW_PHY_STATUS ptr[in, vusb_response_t[USB_TYPE_VENDOR, AX_CMD_SW_PHY_STATUS, int8]] } [packed] vusb_response_generic { @@ -248,45 +244,6 @@ type vusb_response_t[CLASS, REQ, DATA] { # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# USB device, configuration, interface and endpoint descriptors for the HID device class. - -# idVendor and idProduct are patched by Go code, see sys/linux/init_vusb.go. -usb_device_descriptor_hid { - inner usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]] -} [packed] - -usb_config_descriptor_hid { - inner usb_config_descriptor_t[const[USB_CONFIG_HID_ATTRIBUTES, int8], array[usb_interface_descriptor_hid, 1]] -} [packed] - -usb_interface_descriptor_hid { - inner usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid] -} [packed] - -usb_hid_protocols = 0, USB_INTERFACE_PROTOCOL_KEYBOARD, USB_INTERFACE_PROTOCOL_MOUSE - -usb_endpoint_descriptors_hid { - in usb_endpoint_descriptor_hid_in - out array[usb_endpoint_descriptor_hid_out, 0:1] -} [packed] - -usb_endpoint_descriptor_hid_in { - inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void] -} [packed] - -usb_endpoint_descriptor_hid_out { - inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void] -} [packed] - -define USB_CONFIG_HID_ATTRIBUTES (USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_WAKEUP) -define USB_ENDPOINT_HID_ATTRIBUTES (USB_ENDPOINT_XFER_INT) -define USB_ENDPOINT_HID_IN_ADDRESS (1 | USB_DIR_IN) -define USB_ENDPOINT_HID_OUT_ADDRESS (2) - -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - # USB descriptors requested by the kernel before the SET_CONFIGURATION request. usb_string_descriptor { @@ -312,6 +269,7 @@ usb_qualifier_descriptor { bRESERVED const[0, int8] } [packed] +# TODO: investigate which devices are required to have this descriptor. usb_bos_descriptor { bLength const[USB_DT_BOS_SIZE, int8] bDescriptorType const[USB_DT_BOS, int8] @@ -460,25 +418,6 @@ usb_generic_descriptor { usb_descriptor_types = USB_DT_DEVICE, USB_DT_CONFIG, USB_DT_STRING, USB_DT_INTERFACE, USB_DT_ENDPOINT, USB_DT_DEVICE_QUALIFIER, USB_DT_OTHER_SPEED_CONFIG, USB_DT_INTERFACE_POWER, USB_DT_OTG, USB_DT_DEBUG, USB_DT_INTERFACE_ASSOCIATION, USB_DT_SECURITY, USB_DT_KEY, USB_DT_ENCRYPTION_TYPE, USB_DT_BOS, USB_DT_DEVICE_CAPABILITY, USB_DT_WIRELESS_ENDPOINT_COMP, USB_DT_WIRE_ADAPTER, USB_DT_RPIPE, USB_DT_CS_RADIO_CONTROL, USB_DT_PIPE_USAGE, USB_DT_SS_ENDPOINT_COMP, USB_DT_SSP_ISOC_ENDPOINT_COMP, HID_DT_HID, HID_DT_REPORT, HID_DT_PHYSICAL -# USB HID specifications allows for multiple report and physical descriptors -# to be present, but I don't see any support for them in the Linux kernel, -# except for a single report descriptor. -usb_hid_descriptor_hid { - bLength len[parent, int8] - bDescriptorType const[HID_DT_HID, int8] - - bcdHID int16 - bCountryCode int8 - bNumDescriptors const[1, int8] - - report_desc usb_hid_class_descriptor_report -} [packed] - -usb_hid_class_descriptor_report { - bDescriptorType const[HID_DT_REPORT, int8] - wDescriptorLength int16[0:HID_MAX_DESCRIPTOR_SIZE] -} [packed] - usb_cdc_header { items array[usb_cdc_header_item, 0:16] } [packed] @@ -655,43 +594,6 @@ usb_cdc_mbim_extended_desc { # USB descriptors requested after the SET_CONFIGURATION request. -# TODO: define recusively to generate proper structures. -# Linux HID stack doesn't support long items. -hid_descriptor_report { - items array[hid_report_item_short] -} [packed] - -type hid_report_item_short_012_t[TYPE, TAGS] { - bSize len[data, int8:2] - bType const[TYPE, int8:2] - bTag flags[TAGS, int8:4] - data array[int8, 0:2] -} [packed] - -type hid_report_item_short_4_t[TYPE, TAGS] { - bSize const[3, int8:2] - bType const[TYPE, int8:2] - bTag flags[TAGS, int8:4] - data array[int8, 4] -} [packed] - -type hid_report_item_short_t[TYPE, TAGS] [ - item_012 hid_report_item_short_012_t[TYPE, TAGS] - item_4 hid_report_item_short_4_t[TYPE, TAGS] -] [varlen] - -hid_report_item_short [ - main hid_report_item_short_t[HID_ITEM_TYPE_MAIN, hid_report_item_main_tags] - global hid_report_item_short_t[HID_ITEM_TYPE_GLOBAL, hid_report_item_global_tags] - local hid_report_item_short_t[HID_ITEM_TYPE_LOCAL, hid_report_item_local_tags] -] [varlen] - -hid_report_item_main_tags = HID_MAIN_ITEM_TAG_INPUT, HID_MAIN_ITEM_TAG_OUTPUT, HID_MAIN_ITEM_TAG_FEATURE, HID_MAIN_ITEM_TAG_BEGIN_COLLECTION, HID_MAIN_ITEM_TAG_END_COLLECTION -hid_report_item_global_tags = HID_GLOBAL_ITEM_TAG_USAGE_PAGE, HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM, HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM, HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM, HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM, HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT, HID_GLOBAL_ITEM_TAG_UNIT, HID_GLOBAL_ITEM_TAG_REPORT_SIZE, HID_GLOBAL_ITEM_TAG_REPORT_ID, HID_GLOBAL_ITEM_TAG_REPORT_COUNT, HID_GLOBAL_ITEM_TAG_PUSH, HID_GLOBAL_ITEM_TAG_POP -hid_report_item_local_tags = HID_LOCAL_ITEM_TAG_USAGE, HID_LOCAL_ITEM_TAG_USAGE_MINIMUM, HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM, HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX, HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM, HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM, HID_LOCAL_ITEM_TAG_STRING_INDEX, HID_LOCAL_ITEM_TAG_STRING_MINIMUM, HID_LOCAL_ITEM_TAG_STRING_MAXIMUM, HID_LOCAL_ITEM_TAG_DELIMITER - -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - usb_hub_descriptor_hs { bDescLength len[parent, int8] bDescriptorType const[USB_DT_HUB, int8] @@ -768,3 +670,205 @@ usb_cdc_ncm_ntb_parameters { # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +# HID device class specific descriptions. +# https://www.usb.org/sites/default/files/documents/hid1_11.pdf +# https://elixir.bootlin.com/linux/latest/source/drivers/hid/usbhid/hid-core.c +# https://elixir.bootlin.com/linux/latest/source/drivers/hid/hid-core.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/legacy/hid.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/function/f_hid.c + +# Connected HID devices are known to create the following /dev/ files: +# /dev/hidraw#, /dev/usb/hiddev# and /dev/input/event#. + +# idVendor and idProduct are patched by Go code, see sys/linux/init_vusb.go. +usb_device_descriptor_hid { + inner usb_device_descriptor_t[0, 0, 0, 0, 0, 64, array[usb_config_descriptor_hid, 1]] +} [packed] + +usb_config_descriptor_hid { + inner usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]] +} [packed] + +usb_interface_descriptor_hid { + inner usb_interface_descriptor_t[int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid] +} [packed] + +usb_hid_protocols = 0, USB_INTERFACE_PROTOCOL_KEYBOARD, USB_INTERFACE_PROTOCOL_MOUSE + +usb_endpoint_descriptors_hid { + in usb_endpoint_descriptor_hid_in + out array[usb_endpoint_descriptor_hid_out, 0:1] +} [packed] + +usb_endpoint_descriptor_hid_in { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void] +} [packed] + +usb_endpoint_descriptor_hid_out { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_OUT_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void] +} [packed] + +define USB_ENDPOINT_HID_ATTRIBUTES (USB_ENDPOINT_XFER_INT) +define USB_ENDPOINT_HID_IN_ADDRESS (1 | USB_DIR_IN) +define USB_ENDPOINT_HID_OUT_ADDRESS (2) + +vusb_descriptors_hid { + len len[parent, int32] + generic ptr[in, vusb_descriptor_generic] + + USB_DT_STRING ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]] + +# For unknown reasons these are requested as USB_TYPE_STANDARD and not as USB_TYPE_CLASS. +# Linux doesn't request HID_DT_HID, but some hosts might do that. + HID_DT_REPORT ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_REPORT, hid_descriptor_report]] + HID_DT_HID ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, HID_DT_HID, usb_hid_descriptor_hid]] +} [packed] + +vusb_responses_hid { + len len[parent, int32] + generic ptr[in, vusb_response_generic] + + USB_REQ_GET_INTERFACE ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]] + USB_REQ_GET_CONFIGURATION ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]] + + HID_REQ_GET_REPORT ptr[in, vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, array[int8]]] + HID_REQ_GET_PROTOCOL ptr[in, vusb_response_t[USB_TYPE_CLASS, HID_REQ_GET_REPORT, int8]] +} [packed] + +# USB HID specifications allows for multiple report and physical descriptors +# to be present, but I don't see any support for them in the Linux kernel, +# except for a single report descriptor. +usb_hid_descriptor_hid { + bLength len[parent, int8] + bDescriptorType const[HID_DT_HID, int8] + + bcdHID int16 + bCountryCode int8 + bNumDescriptors const[1, int8] + + report_desc usb_hid_class_descriptor_report +} [packed] + +usb_hid_class_descriptor_report { + bDescriptorType const[HID_DT_REPORT, int8] + wDescriptorLength int16[0:HID_MAX_DESCRIPTOR_SIZE] +} [packed] + +# TODO: it's hard to describe the REPORT descriptor structure via syzkaller +# descriptions, so consider generating it in Go code. +# TODO: the length of REPORT descriptor must match the value in HID descriptor. +# Linux HID stack doesn't support long items. +# TODO: there are vendor specific REPORT descriptor formats (Logitech HID++). +hid_descriptor_report { + items array[hid_report_item_short] +} [packed] + +type hid_report_item_short_012_t[TYPE, TAGS] { + bSize len[data, int8:2] + bType const[TYPE, int8:2] + bTag flags[TAGS, int8:4] + data array[int8, 0:2] +} [packed] + +type hid_report_item_short_4_t[TYPE, TAGS] { + bSize const[3, int8:2] + bType const[TYPE, int8:2] + bTag flags[TAGS, int8:4] + data array[int8, 4] +} [packed] + +type hid_report_item_short_t[TYPE, TAGS] [ + item_012 hid_report_item_short_012_t[TYPE, TAGS] + item_4 hid_report_item_short_4_t[TYPE, TAGS] +] [varlen] + +hid_report_item_short [ + main hid_report_item_short_t[HID_ITEM_TYPE_MAIN, hid_report_item_main_tags] + global hid_report_item_short_t[HID_ITEM_TYPE_GLOBAL, hid_report_item_global_tags] + local hid_report_item_short_t[HID_ITEM_TYPE_LOCAL, hid_report_item_local_tags] +] [varlen] + +hid_report_item_main_tags = HID_MAIN_ITEM_TAG_INPUT, HID_MAIN_ITEM_TAG_OUTPUT, HID_MAIN_ITEM_TAG_FEATURE, HID_MAIN_ITEM_TAG_BEGIN_COLLECTION, HID_MAIN_ITEM_TAG_END_COLLECTION +hid_report_item_global_tags = HID_GLOBAL_ITEM_TAG_USAGE_PAGE, HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM, HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM, HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM, HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM, HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT, HID_GLOBAL_ITEM_TAG_UNIT, HID_GLOBAL_ITEM_TAG_REPORT_SIZE, HID_GLOBAL_ITEM_TAG_REPORT_ID, HID_GLOBAL_ITEM_TAG_REPORT_COUNT, HID_GLOBAL_ITEM_TAG_PUSH, HID_GLOBAL_ITEM_TAG_POP +hid_report_item_local_tags = HID_LOCAL_ITEM_TAG_USAGE, HID_LOCAL_ITEM_TAG_USAGE_MINIMUM, HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM, HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX, HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM, HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM, HID_LOCAL_ITEM_TAG_STRING_INDEX, HID_LOCAL_ITEM_TAG_STRING_MINIMUM, HID_LOCAL_ITEM_TAG_STRING_MAXIMUM, HID_LOCAL_ITEM_TAG_DELIMITER + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +# PRINTER device class specific descriptions. +# https://www.usb.org/sites/default/files/usbprint11a021811.pdf +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/class/usblp.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/legacy/printer.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/function/f_printer.c + +# Connected PRINTER devices are known to create the following /dev/ files: +# /dev/usb/lp#. +# TODO: write descriptions for it. + +# drivers/usb/class/usblp.c +define USBLP_REQ_GET_ID 0x00 +define USBLP_REQ_GET_STATUS 0x01 +define USBLP_REQ_RESET 0x02 +define USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST 0x00 +define USBLP_FIRST_PROTOCOL 1 +define USBLP_LAST_PROTOCOL 3 + +# TODO: consider patching idVendor and idProduct in Go code. +usb_device_descriptor_printer { + inner usb_device_descriptor_t[0, 0, 0, 0x3f0, 0x6c17, 64, array[usb_config_descriptor_printer, 1]] +} [packed] + +usb_config_descriptor_printer { + inner usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_printer, 1]] +} [packed] + +usb_interface_descriptor_printer { + inner usb_interface_descriptor_t[int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer] +} [packed] + +usb_endpoint_descriptors_printer { + in usb_endpoint_descriptor_printer_out + out array[usb_endpoint_descriptor_printer_in, 0:1] +} [packed] + +usb_endpoint_descriptor_printer_out { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_OUT_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void] +} [packed] + +usb_endpoint_descriptor_printer_in { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_PRINTER_IN_ADDRESS, int8], const[USB_ENDPOINT_PRINTER_ATTRIBUTES, int8], void] +} [packed] + +define USB_ENDPOINT_PRINTER_ATTRIBUTES (USB_ENDPOINT_XFER_BULK | USB_ENDPOINT_SYNC_NONE | USB_ENDPOINT_USAGE_DATA) +define USB_ENDPOINT_PRINTER_OUT_ADDRESS (1) +define USB_ENDPOINT_PRINTER_IN_ADDRESS (2 | USB_DIR_IN) + +vusb_descriptors_printer { + len len[parent, int32] + generic ptr[in, vusb_descriptor_generic] + + USB_DT_STRING ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor]] +} [packed] + +vusb_responses_printer { + len len[parent, int32] + generic ptr[in, vusb_response_generic] + + USB_REQ_GET_INTERFACE ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_INTERFACE, int8]] + USB_REQ_GET_CONFIGURATION ptr[in, vusb_response_t[USB_TYPE_STANDARD, USB_REQ_GET_CONFIGURATION, int8]] + + USBLP_REQ_GET_ID ptr[in, vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_ID, usb_printer_get_id_response]] + USBLP_REQ_GET_STATUS ptr[in, vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_GET_STATUS, int8]] + USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST ptr[in, vusb_response_t[USB_TYPE_CLASS, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, int8]] +} [packed] + +usb_printer_get_id_response { + length len[id, int16be] + id array[int8] +} [packed] + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # diff --git a/sys/linux/vusb_386.const b/sys/linux/vusb_386.const index 2e5e6a44c..7d607df7a 100644 --- a/sys/linux/vusb_386.const +++ b/sys/linux/vusb_386.const @@ -45,6 +45,7 @@ HID_MAIN_ITEM_TAG_FEATURE = 11 HID_MAIN_ITEM_TAG_INPUT = 8 HID_MAIN_ITEM_TAG_OUTPUT = 9 HID_MAX_DESCRIPTOR_SIZE = 4096 +HID_REQ_GET_REPORT = 1 HUB_CHANGE_LOCAL_POWER = 1 HUB_CHANGE_OVERCURRENT = 2 HUB_CHAR_COMMON_LPSM = 0 @@ -65,6 +66,8 @@ UAC_GET_MAX = 131 UAC_GET_MEM = 133 UAC_GET_MIN = 130 UAC_GET_RES = 132 +USBLP_FIRST_PROTOCOL = 1 +USBLP_LAST_PROTOCOL = 3 USBLP_REQ_GET_ID = 0 USBLP_REQ_GET_STATUS = 1 USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST = 0 @@ -98,11 +101,11 @@ USB_CDC_OBEX_TYPE = 21 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 USB_CLASS_HID = 3 +USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 USB_CONFIG_ATT_ONE = 128 USB_CONFIG_ATT_SELFPOWER = 64 USB_CONFIG_ATT_WAKEUP = 32 -USB_CONFIG_HID_ATTRIBUTES = 160 USB_DIR_IN = 128 USB_DIR_OUT = 0 USB_DT_BOS = 15 @@ -141,6 +144,9 @@ USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 USB_ENDPOINT_INTR_NOTIFICATION = 16 USB_ENDPOINT_INTR_PERIODIC = 0 +USB_ENDPOINT_PRINTER_ATTRIBUTES = 2 +USB_ENDPOINT_PRINTER_IN_ADDRESS = 130 +USB_ENDPOINT_PRINTER_OUT_ADDRESS = 1 USB_ENDPOINT_SYNC_ADAPTIVE = 8 USB_ENDPOINT_SYNC_ASYNC = 4 USB_ENDPOINT_SYNC_NONE = 0 diff --git a/sys/linux/vusb_amd64.const b/sys/linux/vusb_amd64.const index 2e5e6a44c..7d607df7a 100644 --- a/sys/linux/vusb_amd64.const +++ b/sys/linux/vusb_amd64.const @@ -45,6 +45,7 @@ HID_MAIN_ITEM_TAG_FEATURE = 11 HID_MAIN_ITEM_TAG_INPUT = 8 HID_MAIN_ITEM_TAG_OUTPUT = 9 HID_MAX_DESCRIPTOR_SIZE = 4096 +HID_REQ_GET_REPORT = 1 HUB_CHANGE_LOCAL_POWER = 1 HUB_CHANGE_OVERCURRENT = 2 HUB_CHAR_COMMON_LPSM = 0 @@ -65,6 +66,8 @@ UAC_GET_MAX = 131 UAC_GET_MEM = 133 UAC_GET_MIN = 130 UAC_GET_RES = 132 +USBLP_FIRST_PROTOCOL = 1 +USBLP_LAST_PROTOCOL = 3 USBLP_REQ_GET_ID = 0 USBLP_REQ_GET_STATUS = 1 USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST = 0 @@ -98,11 +101,11 @@ USB_CDC_OBEX_TYPE = 21 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 USB_CLASS_HID = 3 +USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 USB_CONFIG_ATT_ONE = 128 USB_CONFIG_ATT_SELFPOWER = 64 USB_CONFIG_ATT_WAKEUP = 32 -USB_CONFIG_HID_ATTRIBUTES = 160 USB_DIR_IN = 128 USB_DIR_OUT = 0 USB_DT_BOS = 15 @@ -141,6 +144,9 @@ USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 USB_ENDPOINT_INTR_NOTIFICATION = 16 USB_ENDPOINT_INTR_PERIODIC = 0 +USB_ENDPOINT_PRINTER_ATTRIBUTES = 2 +USB_ENDPOINT_PRINTER_IN_ADDRESS = 130 +USB_ENDPOINT_PRINTER_OUT_ADDRESS = 1 USB_ENDPOINT_SYNC_ADAPTIVE = 8 USB_ENDPOINT_SYNC_ASYNC = 4 USB_ENDPOINT_SYNC_NONE = 0 diff --git a/sys/linux/vusb_arm.const b/sys/linux/vusb_arm.const index 2e5e6a44c..7d607df7a 100644 --- a/sys/linux/vusb_arm.const +++ b/sys/linux/vusb_arm.const @@ -45,6 +45,7 @@ HID_MAIN_ITEM_TAG_FEATURE = 11 HID_MAIN_ITEM_TAG_INPUT = 8 HID_MAIN_ITEM_TAG_OUTPUT = 9 HID_MAX_DESCRIPTOR_SIZE = 4096 +HID_REQ_GET_REPORT = 1 HUB_CHANGE_LOCAL_POWER = 1 HUB_CHANGE_OVERCURRENT = 2 HUB_CHAR_COMMON_LPSM = 0 @@ -65,6 +66,8 @@ UAC_GET_MAX = 131 UAC_GET_MEM = 133 UAC_GET_MIN = 130 UAC_GET_RES = 132 +USBLP_FIRST_PROTOCOL = 1 +USBLP_LAST_PROTOCOL = 3 USBLP_REQ_GET_ID = 0 USBLP_REQ_GET_STATUS = 1 USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST = 0 @@ -98,11 +101,11 @@ USB_CDC_OBEX_TYPE = 21 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 USB_CLASS_HID = 3 +USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 USB_CONFIG_ATT_ONE = 128 USB_CONFIG_ATT_SELFPOWER = 64 USB_CONFIG_ATT_WAKEUP = 32 -USB_CONFIG_HID_ATTRIBUTES = 160 USB_DIR_IN = 128 USB_DIR_OUT = 0 USB_DT_BOS = 15 @@ -141,6 +144,9 @@ USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 USB_ENDPOINT_INTR_NOTIFICATION = 16 USB_ENDPOINT_INTR_PERIODIC = 0 +USB_ENDPOINT_PRINTER_ATTRIBUTES = 2 +USB_ENDPOINT_PRINTER_IN_ADDRESS = 130 +USB_ENDPOINT_PRINTER_OUT_ADDRESS = 1 USB_ENDPOINT_SYNC_ADAPTIVE = 8 USB_ENDPOINT_SYNC_ASYNC = 4 USB_ENDPOINT_SYNC_NONE = 0 diff --git a/sys/linux/vusb_arm64.const b/sys/linux/vusb_arm64.const index 2e5e6a44c..7d607df7a 100644 --- a/sys/linux/vusb_arm64.const +++ b/sys/linux/vusb_arm64.const @@ -45,6 +45,7 @@ HID_MAIN_ITEM_TAG_FEATURE = 11 HID_MAIN_ITEM_TAG_INPUT = 8 HID_MAIN_ITEM_TAG_OUTPUT = 9 HID_MAX_DESCRIPTOR_SIZE = 4096 +HID_REQ_GET_REPORT = 1 HUB_CHANGE_LOCAL_POWER = 1 HUB_CHANGE_OVERCURRENT = 2 HUB_CHAR_COMMON_LPSM = 0 @@ -65,6 +66,8 @@ UAC_GET_MAX = 131 UAC_GET_MEM = 133 UAC_GET_MIN = 130 UAC_GET_RES = 132 +USBLP_FIRST_PROTOCOL = 1 +USBLP_LAST_PROTOCOL = 3 USBLP_REQ_GET_ID = 0 USBLP_REQ_GET_STATUS = 1 USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST = 0 @@ -98,11 +101,11 @@ USB_CDC_OBEX_TYPE = 21 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 USB_CLASS_HID = 3 +USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 USB_CONFIG_ATT_ONE = 128 USB_CONFIG_ATT_SELFPOWER = 64 USB_CONFIG_ATT_WAKEUP = 32 -USB_CONFIG_HID_ATTRIBUTES = 160 USB_DIR_IN = 128 USB_DIR_OUT = 0 USB_DT_BOS = 15 @@ -141,6 +144,9 @@ USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 USB_ENDPOINT_INTR_NOTIFICATION = 16 USB_ENDPOINT_INTR_PERIODIC = 0 +USB_ENDPOINT_PRINTER_ATTRIBUTES = 2 +USB_ENDPOINT_PRINTER_IN_ADDRESS = 130 +USB_ENDPOINT_PRINTER_OUT_ADDRESS = 1 USB_ENDPOINT_SYNC_ADAPTIVE = 8 USB_ENDPOINT_SYNC_ASYNC = 4 USB_ENDPOINT_SYNC_NONE = 0 diff --git a/sys/linux/vusb_ppc64le.const b/sys/linux/vusb_ppc64le.const index 2e5e6a44c..7d607df7a 100644 --- a/sys/linux/vusb_ppc64le.const +++ b/sys/linux/vusb_ppc64le.const @@ -45,6 +45,7 @@ HID_MAIN_ITEM_TAG_FEATURE = 11 HID_MAIN_ITEM_TAG_INPUT = 8 HID_MAIN_ITEM_TAG_OUTPUT = 9 HID_MAX_DESCRIPTOR_SIZE = 4096 +HID_REQ_GET_REPORT = 1 HUB_CHANGE_LOCAL_POWER = 1 HUB_CHANGE_OVERCURRENT = 2 HUB_CHAR_COMMON_LPSM = 0 @@ -65,6 +66,8 @@ UAC_GET_MAX = 131 UAC_GET_MEM = 133 UAC_GET_MIN = 130 UAC_GET_RES = 132 +USBLP_FIRST_PROTOCOL = 1 +USBLP_LAST_PROTOCOL = 3 USBLP_REQ_GET_ID = 0 USBLP_REQ_GET_STATUS = 1 USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST = 0 @@ -98,11 +101,11 @@ USB_CDC_OBEX_TYPE = 21 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 USB_CLASS_HID = 3 +USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 USB_CONFIG_ATT_ONE = 128 USB_CONFIG_ATT_SELFPOWER = 64 USB_CONFIG_ATT_WAKEUP = 32 -USB_CONFIG_HID_ATTRIBUTES = 160 USB_DIR_IN = 128 USB_DIR_OUT = 0 USB_DT_BOS = 15 @@ -141,6 +144,9 @@ USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 USB_ENDPOINT_INTR_NOTIFICATION = 16 USB_ENDPOINT_INTR_PERIODIC = 0 +USB_ENDPOINT_PRINTER_ATTRIBUTES = 2 +USB_ENDPOINT_PRINTER_IN_ADDRESS = 130 +USB_ENDPOINT_PRINTER_OUT_ADDRESS = 1 USB_ENDPOINT_SYNC_ADAPTIVE = 8 USB_ENDPOINT_SYNC_ASYNC = 4 USB_ENDPOINT_SYNC_NONE = 0 |
