From acb51638141ff960f547431757130749bc176bc0 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Fri, 9 Aug 2019 19:46:27 +0200 Subject: sys/linux: add basic USB CDC Ethernet descriptions (#1328) --- sys/linux/gen/386.go | 202 ++++++++++++++++--- sys/linux/gen/amd64.go | 202 ++++++++++++++++--- sys/linux/gen/arm.go | 202 ++++++++++++++++--- sys/linux/gen/arm64.go | 202 ++++++++++++++++--- sys/linux/gen/ppc64le.go | 202 ++++++++++++++++--- sys/linux/vusb.txt | 447 ++++++++++++++++++++++++++----------------- sys/linux/vusb_386.const | 8 + sys/linux/vusb_amd64.const | 8 + sys/linux/vusb_arm.const | 8 + sys/linux/vusb_arm64.const | 8 + sys/linux/vusb_ppc64le.const | 8 + 11 files changed, 1163 insertions(+), 334 deletions(-) (limited to 'sys/linux') diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index 79d474cbc..665a0caff 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -113,6 +113,7 @@ var resources_386 = []*ResourceDesc{ {Name: "fd_uhid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uhid"}, Values: []uint64{18446744073709551615}}, {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_cdc_ethernet", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_cdc_ethernet"}, 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}}, @@ -25344,11 +25345,12 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 2}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_acm_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2, 4, 8}, BitMask: true}, }}}, - {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 4}, Fields: []Type{ + {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 5}, 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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 1}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bDataInterface", TypeSize: 1}}}, }}}, {Key: StructKey{Name: "usb_cdc_country_functional_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_country_functional_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25369,20 +25371,15 @@ var structDescs_386 = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 15}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iMACAddress", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "iMACAddress", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "bmEthernetStatistics", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wMaxSegmentSize", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wNumberMCFilters", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bNumberPowerFilters", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "usb_cdc_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_generic", IsVarlen: true}, 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: 36}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_types", FldName: "bDescriptorSubType", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 6, 7, 10, 15, 17, 18, 19, 20, 21, 26, 27, 28}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, - }}}, - {Key: StructKey{Name: "usb_cdc_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header", IsVarlen: true}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_item"}}, Kind: 1, RangeEnd: 16}, + {Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_ethernet_mbm_guid", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id0", TypeSize: 8}}, Val: 94397490813999011}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id1", TypeSize: 8}}, Val: 3042602437899716518}, }}}, {Key: StructKey{Name: "usb_cdc_header_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_desc", TypeSize: 5}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25390,18 +25387,23 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdCDC", TypeSize: 2}}}, }}}, - {Key: StructKey{Name: "usb_cdc_header_item"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_item", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_cdc_generic"}, FldName: "generic"}, + {Key: StructKey{Name: "usb_cdc_header_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_header_desc"}, FldName: "header"}, + &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}}, Kind: 1, RangeEnd: 1}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm_detail", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, FldName: "other"}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet_others", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_other"}}, Kind: 1, RangeEnd: 6}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_other"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_other", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, FldName: "call_mgmt"}, &StructType{Key: StructKey{Name: "usb_cdc_acm_descriptor"}, FldName: "acm"}, - &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_country_functional_desc"}, FldName: "country_functional"}, &StructType{Key: StructKey{Name: "usb_cdc_network_terminal_desc"}, FldName: "network_terminal"}, - &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, &StructType{Key: StructKey{Name: "usb_cdc_dmm_desc"}, FldName: "dmm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}, FldName: "mdlm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, FldName: "mdlm_detail"}, &StructType{Key: StructKey{Name: "usb_cdc_obex_desc"}, FldName: "obex"}, &StructType{Key: StructKey{Name: "usb_cdc_ncm_desc"}, FldName: "ncm"}, &StructType{Key: StructKey{Name: "usb_cdc_mbim_desc"}, FldName: "mbim"}, @@ -25431,7 +25433,7 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 18}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdVersion", TypeSize: 2}}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "bGUID", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + &StructType{Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, FldName: "bGUID"}, }}}, {Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_mdlm_detail_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25480,19 +25482,33 @@ var structDescs_386 = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 6}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMasterInterface0", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSlaveInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bMasterInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bSlaveInterface0", TypeSize: 1}}}, &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[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_config_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, {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_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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_cdc_ethernet"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {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}, @@ -25538,11 +25554,14 @@ var structDescs_386 = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}, @@ -25578,7 +25597,7 @@ 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{ + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}}, @@ -25586,8 +25605,8 @@ var structDescs_386 = []*KeyedStruct{ &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: "idVendor", TypeSize: 2}}, Val: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42152}, &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}}}, @@ -25595,9 +25614,35 @@ 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_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 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}}, Val: 2}, + &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: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42145}, + &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_cdc_ethernet"}}, 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"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_notify", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_in", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, @@ -25610,6 +25655,39 @@ var structDescs_386 = []*KeyedStruct{ {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_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_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: 129}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 3}, + &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_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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: 3}, + &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_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}, @@ -25665,6 +25743,11 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_endpoint_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "notify", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, FldName: "in"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, FldName: "out"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_hid", IsVarlen: true}, Fields: []Type{ &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}, @@ -25736,11 +25819,14 @@ var structDescs_386 = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{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]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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}, @@ -25755,10 +25841,23 @@ var structDescs_386 = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16}, }}}, - {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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "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]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", 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}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 6}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"}, + }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, 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]", 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 3}, @@ -25768,10 +25867,10 @@ 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{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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[const[0, 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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}, @@ -25784,7 +25883,7 @@ var structDescs_386 = []*KeyedStruct{ {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"}, - &StructType{Key: StructKey{Name: "usb_cdc_header"}, FldName: "usb_cdc"}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "usb_cdc"}, }}}, {Key: StructKey{Name: "usb_port_status"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_port_status", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_status_flags", FldName: "wPortStatus", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 256, 512, 1024, 2048, 4096, 480, 512, 7168, 0, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352}}, @@ -25845,6 +25944,11 @@ var structDescs_386 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_lang_ids", FldName: "lang_id", TypeSize: 2}}, Vals: []uint64{1078, 1052, 1025, 2049, 3073, 4097, 5121, 6145, 7169, 8193, 9217, 10241, 11265, 12289, 13313, 14337, 15361, 16385, 1067, 1101, 1068, 2092, 1069, 1059, 1093, 1026, 1109, 1027, 1028, 2052, 3076, 4100, 5124, 1050, 1029, 1030, 1043, 2067, 1033, 2057, 3081, 4105, 5129, 6153, 7177, 8201, 9225, 10249, 11273, 12297, 13321, 1061, 1080, 1065, 1035, 1036, 2060, 3084, 4108, 5132, 6156, 1079, 1031, 2055, 3079, 4103, 5127, 1032, 1095, 1037, 1081, 1038, 1039, 1057, 1040, 2064, 1041, 1099, 2144, 1087, 1111, 1042, 2066, 1062, 1063, 2087, 1071, 1086, 2110, 1100, 1112, 1102, 2145, 1044, 2068, 1096, 1045, 1046, 2070, 1094, 1048, 1049, 1103, 3098, 2074, 1113, 1051, 1060, 1034, 2058, 3082, 4106, 5130, 6154, 7178, 8202, 9226, 10250, 11274, 12298, 13322, 14346, 15370, 16394, 17418, 18442, 19466, 20490, 1072, 1089, 1053, 2077, 1097, 1092, 1098, 1054, 1055, 1058, 1056, 2080, 1091, 2115, 1066, 1279, 61695, 62719, 63743, 64767}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_string_descriptor_cdc_ethernet_mac", TypeSize: 50}, 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: 3}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "data", TypeSize: 48}, Kind: 2, Values: []string{"340032003400320034003200340032003400320034003200"}, NoZ: true}, + }}}, {Key: StructKey{Name: "usb_wireless_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_wireless_cap_descriptor", TypeSize: 11}, 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}, @@ -26982,6 +27086,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_string_descriptor"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]", TypeSize: 56}, 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: 3}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, FldName: "data"}, + }}}, {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"}}}, @@ -26990,6 +27100,11 @@ var structDescs_386 = []*KeyedStruct{ &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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_cdc_ethernet", 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_cdc_ethernet_mac]"}}}, + }}}, {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"}}}, @@ -27189,6 +27304,12 @@ 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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_cdc_ethernet", TypeSize: 16}, 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]"}}}, + }}}, {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"}}}, @@ -43308,6 +43429,12 @@ var syscalls_386 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor"}}}, &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", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$cdc_ethernet", 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_cdc_ethernet"}}}, + &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_cdc_ethernet", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_connect$hid", 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"}}, @@ -43325,6 +43452,11 @@ var syscalls_386 = []*Syscall{ &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"}}}, }}, + {Name: "syz_usb_control_io$cdc_ethernet", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_cdc_ethernet", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_cdc_ethernet"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses_cdc_ethernet"}}}, + }}, {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_hid"}}}, @@ -50341,8 +50473,11 @@ var consts_386 = []ConstValue{ {Name: "USB_CDC_NCM_TYPE", Value: 26}, {Name: "USB_CDC_NETWORK_TERMINAL_TYPE", Value: 10}, {Name: "USB_CDC_OBEX_TYPE", Value: 21}, + {Name: "USB_CDC_PROTO_NONE"}, + {Name: "USB_CDC_SUBCLASS_ETHERNET", Value: 6}, {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, + {Name: "USB_CLASS_COMM", Value: 2}, {Name: "USB_CLASS_HID", Value: 3}, {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, @@ -50382,6 +50517,11 @@ var consts_386 = []ConstValue{ {Name: "USB_DT_STRING", Value: 3}, {Name: "USB_DT_WIRELESS_ENDPOINT_COMP", Value: 17}, {Name: "USB_DT_WIRE_ADAPTER", Value: 33}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS", Value: 129}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES", Value: 3}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS", Value: 3}, {Name: "USB_ENDPOINT_HID_ATTRIBUTES", Value: 3}, {Name: "USB_ENDPOINT_HID_IN_ADDRESS", Value: 129}, {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, @@ -52240,4 +52380,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "38f83eeb8eb860a70e47d58558925a433b2db80c" +const revision_386 = "371e0b3358d1acc1064d68a603dd9747c7155064" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 22d03a381..156031b4c 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -113,6 +113,7 @@ var resources_amd64 = []*ResourceDesc{ {Name: "fd_uhid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uhid"}, Values: []uint64{18446744073709551615}}, {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_cdc_ethernet", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_cdc_ethernet"}, 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}}, @@ -25715,11 +25716,12 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 2}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_acm_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2, 4, 8}, BitMask: true}, }}}, - {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 4}, Fields: []Type{ + {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 5}, 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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 1}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bDataInterface", TypeSize: 1}}}, }}}, {Key: StructKey{Name: "usb_cdc_country_functional_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_country_functional_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25740,20 +25742,15 @@ var structDescs_amd64 = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 15}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iMACAddress", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "iMACAddress", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "bmEthernetStatistics", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wMaxSegmentSize", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wNumberMCFilters", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bNumberPowerFilters", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "usb_cdc_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_generic", IsVarlen: true}, 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: 36}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_types", FldName: "bDescriptorSubType", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 6, 7, 10, 15, 17, 18, 19, 20, 21, 26, 27, 28}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, - }}}, - {Key: StructKey{Name: "usb_cdc_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header", IsVarlen: true}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_item"}}, Kind: 1, RangeEnd: 16}, + {Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_ethernet_mbm_guid", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id0", TypeSize: 8}}, Val: 94397490813999011}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id1", TypeSize: 8}}, Val: 3042602437899716518}, }}}, {Key: StructKey{Name: "usb_cdc_header_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_desc", TypeSize: 5}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25761,18 +25758,23 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdCDC", TypeSize: 2}}}, }}}, - {Key: StructKey{Name: "usb_cdc_header_item"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_item", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_cdc_generic"}, FldName: "generic"}, + {Key: StructKey{Name: "usb_cdc_header_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_header_desc"}, FldName: "header"}, + &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}}, Kind: 1, RangeEnd: 1}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm_detail", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, FldName: "other"}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet_others", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_other"}}, Kind: 1, RangeEnd: 6}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_other"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_other", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, FldName: "call_mgmt"}, &StructType{Key: StructKey{Name: "usb_cdc_acm_descriptor"}, FldName: "acm"}, - &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_country_functional_desc"}, FldName: "country_functional"}, &StructType{Key: StructKey{Name: "usb_cdc_network_terminal_desc"}, FldName: "network_terminal"}, - &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, &StructType{Key: StructKey{Name: "usb_cdc_dmm_desc"}, FldName: "dmm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}, FldName: "mdlm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, FldName: "mdlm_detail"}, &StructType{Key: StructKey{Name: "usb_cdc_obex_desc"}, FldName: "obex"}, &StructType{Key: StructKey{Name: "usb_cdc_ncm_desc"}, FldName: "ncm"}, &StructType{Key: StructKey{Name: "usb_cdc_mbim_desc"}, FldName: "mbim"}, @@ -25802,7 +25804,7 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 18}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdVersion", TypeSize: 2}}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "bGUID", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + &StructType{Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, FldName: "bGUID"}, }}}, {Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_mdlm_detail_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25851,19 +25853,33 @@ var structDescs_amd64 = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 6}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMasterInterface0", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSlaveInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bMasterInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bSlaveInterface0", TypeSize: 1}}}, &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[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_config_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, {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_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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_cdc_ethernet"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {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}, @@ -25909,11 +25925,14 @@ var structDescs_amd64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}, @@ -25949,7 +25968,7 @@ 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{ + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}}, @@ -25957,8 +25976,8 @@ var structDescs_amd64 = []*KeyedStruct{ &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: "idVendor", TypeSize: 2}}, Val: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42152}, &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}}}, @@ -25966,9 +25985,35 @@ 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_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 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}}, Val: 2}, + &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: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42145}, + &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_cdc_ethernet"}}, 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"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_notify", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_in", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, @@ -25981,6 +26026,39 @@ var structDescs_amd64 = []*KeyedStruct{ {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_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_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: 129}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 3}, + &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_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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: 3}, + &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_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}, @@ -26036,6 +26114,11 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_endpoint_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "notify", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, FldName: "in"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, FldName: "out"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_hid", IsVarlen: true}, Fields: []Type{ &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}, @@ -26107,11 +26190,14 @@ var structDescs_amd64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{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]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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}, @@ -26126,10 +26212,23 @@ var structDescs_amd64 = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16}, }}}, - {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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "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]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", 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}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 6}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"}, + }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, 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]", 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 3}, @@ -26139,10 +26238,10 @@ 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{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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[const[0, 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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}, @@ -26155,7 +26254,7 @@ var structDescs_amd64 = []*KeyedStruct{ {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"}, - &StructType{Key: StructKey{Name: "usb_cdc_header"}, FldName: "usb_cdc"}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "usb_cdc"}, }}}, {Key: StructKey{Name: "usb_port_status"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_port_status", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_status_flags", FldName: "wPortStatus", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 256, 512, 1024, 2048, 4096, 480, 512, 7168, 0, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352}}, @@ -26216,6 +26315,11 @@ var structDescs_amd64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_lang_ids", FldName: "lang_id", TypeSize: 2}}, Vals: []uint64{1078, 1052, 1025, 2049, 3073, 4097, 5121, 6145, 7169, 8193, 9217, 10241, 11265, 12289, 13313, 14337, 15361, 16385, 1067, 1101, 1068, 2092, 1069, 1059, 1093, 1026, 1109, 1027, 1028, 2052, 3076, 4100, 5124, 1050, 1029, 1030, 1043, 2067, 1033, 2057, 3081, 4105, 5129, 6153, 7177, 8201, 9225, 10249, 11273, 12297, 13321, 1061, 1080, 1065, 1035, 1036, 2060, 3084, 4108, 5132, 6156, 1079, 1031, 2055, 3079, 4103, 5127, 1032, 1095, 1037, 1081, 1038, 1039, 1057, 1040, 2064, 1041, 1099, 2144, 1087, 1111, 1042, 2066, 1062, 1063, 2087, 1071, 1086, 2110, 1100, 1112, 1102, 2145, 1044, 2068, 1096, 1045, 1046, 2070, 1094, 1048, 1049, 1103, 3098, 2074, 1113, 1051, 1060, 1034, 2058, 3082, 4106, 5130, 6154, 7178, 8202, 9226, 10250, 11274, 12298, 13322, 14346, 15370, 16394, 17418, 18442, 19466, 20490, 1072, 1089, 1053, 2077, 1097, 1092, 1098, 1054, 1055, 1058, 1056, 2080, 1091, 2115, 1066, 1279, 61695, 62719, 63743, 64767}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_string_descriptor_cdc_ethernet_mac", TypeSize: 50}, 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: 3}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "data", TypeSize: 48}, Kind: 2, Values: []string{"340032003400320034003200340032003400320034003200"}, NoZ: true}, + }}}, {Key: StructKey{Name: "usb_wireless_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_wireless_cap_descriptor", TypeSize: 11}, 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}, @@ -27360,6 +27464,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_string_descriptor"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]", TypeSize: 56}, 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: 3}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, FldName: "data"}, + }}}, {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"}}}, @@ -27368,6 +27478,11 @@ var structDescs_amd64 = []*KeyedStruct{ &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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_cdc_ethernet", 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_cdc_ethernet_mac]"}}}, + }}}, {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"}}}, @@ -27567,6 +27682,12 @@ 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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_cdc_ethernet", 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: 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]"}}}, + }}}, {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"}}}, @@ -43830,6 +43951,12 @@ var syscalls_amd64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor"}}}, &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", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$cdc_ethernet", 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_cdc_ethernet"}}}, + &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_cdc_ethernet", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_connect$hid", 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"}}, @@ -43847,6 +43974,11 @@ var syscalls_amd64 = []*Syscall{ &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"}}}, }}, + {Name: "syz_usb_control_io$cdc_ethernet", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_cdc_ethernet", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_cdc_ethernet"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_cdc_ethernet"}}}, + }}, {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_hid"}}}, @@ -50877,8 +51009,11 @@ var consts_amd64 = []ConstValue{ {Name: "USB_CDC_NCM_TYPE", Value: 26}, {Name: "USB_CDC_NETWORK_TERMINAL_TYPE", Value: 10}, {Name: "USB_CDC_OBEX_TYPE", Value: 21}, + {Name: "USB_CDC_PROTO_NONE"}, + {Name: "USB_CDC_SUBCLASS_ETHERNET", Value: 6}, {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, + {Name: "USB_CLASS_COMM", Value: 2}, {Name: "USB_CLASS_HID", Value: 3}, {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, @@ -50918,6 +51053,11 @@ var consts_amd64 = []ConstValue{ {Name: "USB_DT_STRING", Value: 3}, {Name: "USB_DT_WIRELESS_ENDPOINT_COMP", Value: 17}, {Name: "USB_DT_WIRE_ADAPTER", Value: 33}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS", Value: 129}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES", Value: 3}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS", Value: 3}, {Name: "USB_ENDPOINT_HID_ATTRIBUTES", Value: 3}, {Name: "USB_ENDPOINT_HID_IN_ADDRESS", Value: 129}, {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, @@ -52777,4 +52917,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "35a61e3d9f82704660ae851088b5cab4dd788688" +const revision_amd64 = "25d45e1288f842c312bf4558bd60fc371f4c4afe" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index 2caa90b01..6282d84ce 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -113,6 +113,7 @@ var resources_arm = []*ResourceDesc{ {Name: "fd_uhid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uhid"}, Values: []uint64{18446744073709551615}}, {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_cdc_ethernet", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_cdc_ethernet"}, 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}}, @@ -25166,11 +25167,12 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 2}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_acm_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2, 4, 8}, BitMask: true}, }}}, - {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 4}, Fields: []Type{ + {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 5}, 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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 1}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bDataInterface", TypeSize: 1}}}, }}}, {Key: StructKey{Name: "usb_cdc_country_functional_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_country_functional_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25191,20 +25193,15 @@ var structDescs_arm = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 15}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iMACAddress", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "iMACAddress", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "bmEthernetStatistics", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wMaxSegmentSize", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wNumberMCFilters", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bNumberPowerFilters", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "usb_cdc_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_generic", IsVarlen: true}, 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: 36}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_types", FldName: "bDescriptorSubType", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 6, 7, 10, 15, 17, 18, 19, 20, 21, 26, 27, 28}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, - }}}, - {Key: StructKey{Name: "usb_cdc_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header", IsVarlen: true}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_item"}}, Kind: 1, RangeEnd: 16}, + {Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_ethernet_mbm_guid", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id0", TypeSize: 8}}, Val: 94397490813999011}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id1", TypeSize: 8}}, Val: 3042602437899716518}, }}}, {Key: StructKey{Name: "usb_cdc_header_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_desc", TypeSize: 5}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25212,18 +25209,23 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdCDC", TypeSize: 2}}}, }}}, - {Key: StructKey{Name: "usb_cdc_header_item"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_item", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_cdc_generic"}, FldName: "generic"}, + {Key: StructKey{Name: "usb_cdc_header_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_header_desc"}, FldName: "header"}, + &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}}, Kind: 1, RangeEnd: 1}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm_detail", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, FldName: "other"}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet_others", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_other"}}, Kind: 1, RangeEnd: 6}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_other"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_other", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, FldName: "call_mgmt"}, &StructType{Key: StructKey{Name: "usb_cdc_acm_descriptor"}, FldName: "acm"}, - &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_country_functional_desc"}, FldName: "country_functional"}, &StructType{Key: StructKey{Name: "usb_cdc_network_terminal_desc"}, FldName: "network_terminal"}, - &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, &StructType{Key: StructKey{Name: "usb_cdc_dmm_desc"}, FldName: "dmm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}, FldName: "mdlm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, FldName: "mdlm_detail"}, &StructType{Key: StructKey{Name: "usb_cdc_obex_desc"}, FldName: "obex"}, &StructType{Key: StructKey{Name: "usb_cdc_ncm_desc"}, FldName: "ncm"}, &StructType{Key: StructKey{Name: "usb_cdc_mbim_desc"}, FldName: "mbim"}, @@ -25253,7 +25255,7 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 18}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdVersion", TypeSize: 2}}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "bGUID", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + &StructType{Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, FldName: "bGUID"}, }}}, {Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_mdlm_detail_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25302,19 +25304,33 @@ var structDescs_arm = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 6}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMasterInterface0", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSlaveInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bMasterInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bSlaveInterface0", TypeSize: 1}}}, &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[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_config_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, {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_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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_cdc_ethernet"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {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}, @@ -25360,11 +25376,14 @@ var structDescs_arm = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}, @@ -25400,7 +25419,7 @@ 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{ + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}}, @@ -25408,8 +25427,8 @@ var structDescs_arm = []*KeyedStruct{ &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: "idVendor", TypeSize: 2}}, Val: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42152}, &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}}}, @@ -25417,9 +25436,35 @@ 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_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 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}}, Val: 2}, + &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: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42145}, + &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_cdc_ethernet"}}, 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"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_notify", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_in", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, @@ -25432,6 +25477,39 @@ var structDescs_arm = []*KeyedStruct{ {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_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_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: 129}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 3}, + &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_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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: 3}, + &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_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}, @@ -25487,6 +25565,11 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_endpoint_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "notify", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, FldName: "in"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, FldName: "out"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_hid", IsVarlen: true}, Fields: []Type{ &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}, @@ -25558,11 +25641,14 @@ var structDescs_arm = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{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]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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}, @@ -25577,10 +25663,23 @@ var structDescs_arm = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16}, }}}, - {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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "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]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", 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}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 6}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"}, + }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, 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]", 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 3}, @@ -25590,10 +25689,10 @@ 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{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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[const[0, 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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}, @@ -25606,7 +25705,7 @@ var structDescs_arm = []*KeyedStruct{ {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"}, - &StructType{Key: StructKey{Name: "usb_cdc_header"}, FldName: "usb_cdc"}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "usb_cdc"}, }}}, {Key: StructKey{Name: "usb_port_status"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_port_status", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_status_flags", FldName: "wPortStatus", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 256, 512, 1024, 2048, 4096, 480, 512, 7168, 0, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352}}, @@ -25667,6 +25766,11 @@ var structDescs_arm = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_lang_ids", FldName: "lang_id", TypeSize: 2}}, Vals: []uint64{1078, 1052, 1025, 2049, 3073, 4097, 5121, 6145, 7169, 8193, 9217, 10241, 11265, 12289, 13313, 14337, 15361, 16385, 1067, 1101, 1068, 2092, 1069, 1059, 1093, 1026, 1109, 1027, 1028, 2052, 3076, 4100, 5124, 1050, 1029, 1030, 1043, 2067, 1033, 2057, 3081, 4105, 5129, 6153, 7177, 8201, 9225, 10249, 11273, 12297, 13321, 1061, 1080, 1065, 1035, 1036, 2060, 3084, 4108, 5132, 6156, 1079, 1031, 2055, 3079, 4103, 5127, 1032, 1095, 1037, 1081, 1038, 1039, 1057, 1040, 2064, 1041, 1099, 2144, 1087, 1111, 1042, 2066, 1062, 1063, 2087, 1071, 1086, 2110, 1100, 1112, 1102, 2145, 1044, 2068, 1096, 1045, 1046, 2070, 1094, 1048, 1049, 1103, 3098, 2074, 1113, 1051, 1060, 1034, 2058, 3082, 4106, 5130, 6154, 7178, 8202, 9226, 10250, 11274, 12298, 13322, 14346, 15370, 16394, 17418, 18442, 19466, 20490, 1072, 1089, 1053, 2077, 1097, 1092, 1098, 1054, 1055, 1058, 1056, 2080, 1091, 2115, 1066, 1279, 61695, 62719, 63743, 64767}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_string_descriptor_cdc_ethernet_mac", TypeSize: 50}, 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: 3}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "data", TypeSize: 48}, Kind: 2, Values: []string{"340032003400320034003200340032003400320034003200"}, NoZ: true}, + }}}, {Key: StructKey{Name: "usb_wireless_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_wireless_cap_descriptor", TypeSize: 11}, 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}, @@ -26788,6 +26892,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_string_descriptor"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]", TypeSize: 56}, 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: 3}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, FldName: "data"}, + }}}, {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"}}}, @@ -26796,6 +26906,11 @@ var structDescs_arm = []*KeyedStruct{ &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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_cdc_ethernet", 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_cdc_ethernet_mac]"}}}, + }}}, {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"}}}, @@ -26995,6 +27110,12 @@ 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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_cdc_ethernet", TypeSize: 16}, 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]"}}}, + }}}, {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"}}}, @@ -42964,6 +43085,12 @@ var syscalls_arm = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor"}}}, &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", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$cdc_ethernet", 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_cdc_ethernet"}}}, + &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_cdc_ethernet", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_connect$hid", 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"}}, @@ -42981,6 +43108,11 @@ var syscalls_arm = []*Syscall{ &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"}}}, }}, + {Name: "syz_usb_control_io$cdc_ethernet", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_cdc_ethernet", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_cdc_ethernet"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "vusb_responses_cdc_ethernet"}}}, + }}, {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_hid"}}}, @@ -49928,8 +50060,11 @@ var consts_arm = []ConstValue{ {Name: "USB_CDC_NCM_TYPE", Value: 26}, {Name: "USB_CDC_NETWORK_TERMINAL_TYPE", Value: 10}, {Name: "USB_CDC_OBEX_TYPE", Value: 21}, + {Name: "USB_CDC_PROTO_NONE"}, + {Name: "USB_CDC_SUBCLASS_ETHERNET", Value: 6}, {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, + {Name: "USB_CLASS_COMM", Value: 2}, {Name: "USB_CLASS_HID", Value: 3}, {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, @@ -49969,6 +50104,11 @@ var consts_arm = []ConstValue{ {Name: "USB_DT_STRING", Value: 3}, {Name: "USB_DT_WIRELESS_ENDPOINT_COMP", Value: 17}, {Name: "USB_DT_WIRE_ADAPTER", Value: 33}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS", Value: 129}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES", Value: 3}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS", Value: 3}, {Name: "USB_ENDPOINT_HID_ATTRIBUTES", Value: 3}, {Name: "USB_ENDPOINT_HID_IN_ADDRESS", Value: 129}, {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, @@ -51817,4 +51957,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "aa728964114f9bdcdb61227af7a3592558e9a3ab" +const revision_arm = "2de7a10048cbceeed1380db7c05fa9e2a32392dc" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 66a717719..9c98e39da 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -113,6 +113,7 @@ var resources_arm64 = []*ResourceDesc{ {Name: "fd_uhid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uhid"}, Values: []uint64{18446744073709551615}}, {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_cdc_ethernet", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_cdc_ethernet"}, 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}}, @@ -25532,11 +25533,12 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 2}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_acm_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2, 4, 8}, BitMask: true}, }}}, - {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 4}, Fields: []Type{ + {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 5}, 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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 1}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bDataInterface", TypeSize: 1}}}, }}}, {Key: StructKey{Name: "usb_cdc_country_functional_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_country_functional_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25557,20 +25559,15 @@ var structDescs_arm64 = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 15}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iMACAddress", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "iMACAddress", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "bmEthernetStatistics", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wMaxSegmentSize", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wNumberMCFilters", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bNumberPowerFilters", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "usb_cdc_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_generic", IsVarlen: true}, 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: 36}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_types", FldName: "bDescriptorSubType", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 6, 7, 10, 15, 17, 18, 19, 20, 21, 26, 27, 28}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, - }}}, - {Key: StructKey{Name: "usb_cdc_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header", IsVarlen: true}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_item"}}, Kind: 1, RangeEnd: 16}, + {Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_ethernet_mbm_guid", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id0", TypeSize: 8}}, Val: 94397490813999011}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id1", TypeSize: 8}}, Val: 3042602437899716518}, }}}, {Key: StructKey{Name: "usb_cdc_header_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_desc", TypeSize: 5}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25578,18 +25575,23 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdCDC", TypeSize: 2}}}, }}}, - {Key: StructKey{Name: "usb_cdc_header_item"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_item", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_cdc_generic"}, FldName: "generic"}, + {Key: StructKey{Name: "usb_cdc_header_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_header_desc"}, FldName: "header"}, + &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}}, Kind: 1, RangeEnd: 1}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm_detail", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, FldName: "other"}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet_others", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_other"}}, Kind: 1, RangeEnd: 6}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_other"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_other", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, FldName: "call_mgmt"}, &StructType{Key: StructKey{Name: "usb_cdc_acm_descriptor"}, FldName: "acm"}, - &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_country_functional_desc"}, FldName: "country_functional"}, &StructType{Key: StructKey{Name: "usb_cdc_network_terminal_desc"}, FldName: "network_terminal"}, - &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, &StructType{Key: StructKey{Name: "usb_cdc_dmm_desc"}, FldName: "dmm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}, FldName: "mdlm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, FldName: "mdlm_detail"}, &StructType{Key: StructKey{Name: "usb_cdc_obex_desc"}, FldName: "obex"}, &StructType{Key: StructKey{Name: "usb_cdc_ncm_desc"}, FldName: "ncm"}, &StructType{Key: StructKey{Name: "usb_cdc_mbim_desc"}, FldName: "mbim"}, @@ -25619,7 +25621,7 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 18}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdVersion", TypeSize: 2}}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "bGUID", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + &StructType{Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, FldName: "bGUID"}, }}}, {Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_mdlm_detail_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25668,19 +25670,33 @@ var structDescs_arm64 = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 6}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMasterInterface0", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSlaveInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bMasterInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bSlaveInterface0", TypeSize: 1}}}, &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[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_config_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, {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_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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_cdc_ethernet"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {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}, @@ -25726,11 +25742,14 @@ var structDescs_arm64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}, @@ -25766,7 +25785,7 @@ 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{ + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}}, @@ -25774,8 +25793,8 @@ var structDescs_arm64 = []*KeyedStruct{ &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: "idVendor", TypeSize: 2}}, Val: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42152}, &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}}}, @@ -25783,9 +25802,35 @@ 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_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 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}}, Val: 2}, + &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: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42145}, + &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_cdc_ethernet"}}, 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"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_notify", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_in", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, @@ -25798,6 +25843,39 @@ var structDescs_arm64 = []*KeyedStruct{ {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_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_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: 129}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 3}, + &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_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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: 3}, + &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_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}, @@ -25853,6 +25931,11 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_endpoint_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "notify", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, FldName: "in"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, FldName: "out"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_hid", IsVarlen: true}, Fields: []Type{ &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}, @@ -25924,11 +26007,14 @@ var structDescs_arm64 = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{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]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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}, @@ -25943,10 +26029,23 @@ var structDescs_arm64 = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16}, }}}, - {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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "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]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", 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}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 6}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"}, + }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, 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]", 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 3}, @@ -25956,10 +26055,10 @@ 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{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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[const[0, 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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}, @@ -25972,7 +26071,7 @@ var structDescs_arm64 = []*KeyedStruct{ {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"}, - &StructType{Key: StructKey{Name: "usb_cdc_header"}, FldName: "usb_cdc"}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "usb_cdc"}, }}}, {Key: StructKey{Name: "usb_port_status"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_port_status", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_status_flags", FldName: "wPortStatus", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 256, 512, 1024, 2048, 4096, 480, 512, 7168, 0, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352}}, @@ -26033,6 +26132,11 @@ var structDescs_arm64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_lang_ids", FldName: "lang_id", TypeSize: 2}}, Vals: []uint64{1078, 1052, 1025, 2049, 3073, 4097, 5121, 6145, 7169, 8193, 9217, 10241, 11265, 12289, 13313, 14337, 15361, 16385, 1067, 1101, 1068, 2092, 1069, 1059, 1093, 1026, 1109, 1027, 1028, 2052, 3076, 4100, 5124, 1050, 1029, 1030, 1043, 2067, 1033, 2057, 3081, 4105, 5129, 6153, 7177, 8201, 9225, 10249, 11273, 12297, 13321, 1061, 1080, 1065, 1035, 1036, 2060, 3084, 4108, 5132, 6156, 1079, 1031, 2055, 3079, 4103, 5127, 1032, 1095, 1037, 1081, 1038, 1039, 1057, 1040, 2064, 1041, 1099, 2144, 1087, 1111, 1042, 2066, 1062, 1063, 2087, 1071, 1086, 2110, 1100, 1112, 1102, 2145, 1044, 2068, 1096, 1045, 1046, 2070, 1094, 1048, 1049, 1103, 3098, 2074, 1113, 1051, 1060, 1034, 2058, 3082, 4106, 5130, 6154, 7178, 8202, 9226, 10250, 11274, 12298, 13322, 14346, 15370, 16394, 17418, 18442, 19466, 20490, 1072, 1089, 1053, 2077, 1097, 1092, 1098, 1054, 1055, 1058, 1056, 2080, 1091, 2115, 1066, 1279, 61695, 62719, 63743, 64767}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_string_descriptor_cdc_ethernet_mac", TypeSize: 50}, 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: 3}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "data", TypeSize: 48}, Kind: 2, Values: []string{"340032003400320034003200340032003400320034003200"}, NoZ: true}, + }}}, {Key: StructKey{Name: "usb_wireless_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_wireless_cap_descriptor", TypeSize: 11}, 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}, @@ -27152,6 +27256,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_string_descriptor"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]", TypeSize: 56}, 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: 3}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, FldName: "data"}, + }}}, {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"}}}, @@ -27160,6 +27270,11 @@ var structDescs_arm64 = []*KeyedStruct{ &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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_cdc_ethernet", 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_cdc_ethernet_mac]"}}}, + }}}, {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"}}}, @@ -27359,6 +27474,12 @@ 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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_cdc_ethernet", 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: 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]"}}}, + }}}, {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"}}}, @@ -43306,6 +43427,12 @@ var syscalls_arm64 = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor"}}}, &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", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$cdc_ethernet", 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_cdc_ethernet"}}}, + &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_cdc_ethernet", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_connect$hid", 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"}}, @@ -43323,6 +43450,11 @@ var syscalls_arm64 = []*Syscall{ &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"}}}, }}, + {Name: "syz_usb_control_io$cdc_ethernet", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_cdc_ethernet", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_cdc_ethernet"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_cdc_ethernet"}}}, + }}, {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_hid"}}}, @@ -50270,8 +50402,11 @@ var consts_arm64 = []ConstValue{ {Name: "USB_CDC_NCM_TYPE", Value: 26}, {Name: "USB_CDC_NETWORK_TERMINAL_TYPE", Value: 10}, {Name: "USB_CDC_OBEX_TYPE", Value: 21}, + {Name: "USB_CDC_PROTO_NONE"}, + {Name: "USB_CDC_SUBCLASS_ETHERNET", Value: 6}, {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, + {Name: "USB_CLASS_COMM", Value: 2}, {Name: "USB_CLASS_HID", Value: 3}, {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, @@ -50311,6 +50446,11 @@ var consts_arm64 = []ConstValue{ {Name: "USB_DT_STRING", Value: 3}, {Name: "USB_DT_WIRELESS_ENDPOINT_COMP", Value: 17}, {Name: "USB_DT_WIRE_ADAPTER", Value: 33}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS", Value: 129}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES", Value: 3}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS", Value: 3}, {Name: "USB_ENDPOINT_HID_ATTRIBUTES", Value: 3}, {Name: "USB_ENDPOINT_HID_IN_ADDRESS", Value: 129}, {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, @@ -52129,4 +52269,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "2436d280e9b215f342b807b6e7d340e8de10d2d0" +const revision_arm64 = "20122f122a095519fe4a2fea16b5b3cdb02283e8" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index be0386cdd..ca17dc604 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -113,6 +113,7 @@ var resources_ppc64le = []*ResourceDesc{ {Name: "fd_uhid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uhid"}, Values: []uint64{18446744073709551615}}, {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_cdc_ethernet", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd_usb", "fd_usb_cdc_ethernet"}, 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}}, @@ -25402,11 +25403,12 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 2}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_acm_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2, 4, 8}, BitMask: true}, }}}, - {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 4}, Fields: []Type{ + {Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_descriptor", TypeSize: 5}, 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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 1}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_call_mgmt_caps", FldName: "bmCapabilities", TypeSize: 1}}, Vals: []uint64{1, 2}, BitMask: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bDataInterface", TypeSize: 1}}}, }}}, {Key: StructKey{Name: "usb_cdc_country_functional_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_country_functional_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25427,20 +25429,15 @@ var structDescs_ppc64le = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 15}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iMACAddress", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "iMACAddress", TypeSize: 1}}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "bmEthernetStatistics", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wMaxSegmentSize", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "wNumberMCFilters", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bNumberPowerFilters", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "usb_cdc_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_generic", IsVarlen: true}, 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: 36}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_cdc_types", FldName: "bDescriptorSubType", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 6, 7, 10, 15, 17, 18, 19, 20, 21, 26, 27, 28}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, - }}}, - {Key: StructKey{Name: "usb_cdc_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header", IsVarlen: true}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_item"}}, Kind: 1, RangeEnd: 16}, + {Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_ethernet_mbm_guid", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id0", TypeSize: 8}}, Val: 94397490813999011}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "id1", TypeSize: 8}}, Val: 3042602437899716518}, }}}, {Key: StructKey{Name: "usb_cdc_header_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_desc", TypeSize: 5}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25448,18 +25445,23 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdCDC", TypeSize: 2}}}, }}}, - {Key: StructKey{Name: "usb_cdc_header_item"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_item", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "usb_cdc_generic"}, FldName: "generic"}, + {Key: StructKey{Name: "usb_cdc_header_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_header_desc"}, FldName: "header"}, + &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}}, Kind: 1, RangeEnd: 1}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mdlm_detail", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, FldName: "other"}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_ethernet_others"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_ethernet_others", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "items", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_cdc_header_other"}}, Kind: 1, RangeEnd: 6}, + }}}, + {Key: StructKey{Name: "usb_cdc_header_other"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_header_other", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_cdc_call_mgmt_descriptor"}, FldName: "call_mgmt"}, &StructType{Key: StructKey{Name: "usb_cdc_acm_descriptor"}, FldName: "acm"}, - &StructType{Key: StructKey{Name: "usb_cdc_union_desc"}, FldName: "union"}, &StructType{Key: StructKey{Name: "usb_cdc_country_functional_desc"}, FldName: "country_functional"}, &StructType{Key: StructKey{Name: "usb_cdc_network_terminal_desc"}, FldName: "network_terminal"}, - &StructType{Key: StructKey{Name: "usb_cdc_ether_desc"}, FldName: "ether"}, &StructType{Key: StructKey{Name: "usb_cdc_dmm_desc"}, FldName: "dmm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_desc"}, FldName: "mdlm"}, - &StructType{Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, FldName: "mdlm_detail"}, &StructType{Key: StructKey{Name: "usb_cdc_obex_desc"}, FldName: "obex"}, &StructType{Key: StructKey{Name: "usb_cdc_ncm_desc"}, FldName: "ncm"}, &StructType{Key: StructKey{Name: "usb_cdc_mbim_desc"}, FldName: "mbim"}, @@ -25489,7 +25491,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 18}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "bcdVersion", TypeSize: 2}}}, - &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "bGUID", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, + &StructType{Key: StructKey{Name: "usb_cdc_ethernet_mbm_guid"}, FldName: "bGUID"}, }}}, {Key: StructKey{Name: "usb_cdc_mdlm_detail_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_cdc_mdlm_detail_desc", IsVarlen: true}, Fields: []Type{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bLength", TypeSize: 1}}, Path: []string{"parent"}}, @@ -25538,19 +25540,33 @@ var structDescs_ppc64le = []*KeyedStruct{ &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: 36}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorSubType", TypeSize: 1}}, Val: 6}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bMasterInterface0", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSlaveInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bMasterInterface0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bSlaveInterface0", TypeSize: 1}}}, &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[int8, flags[usb_config_attributes, int8], array[usb_interface_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_config_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_hid, 1]]"}, FldName: "inner"}, }}}, {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_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 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_cdc_ethernet"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, + }}}, {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}, @@ -25596,11 +25612,14 @@ var structDescs_ppc64le = []*KeyedStruct{ {Key: StructKey{Name: "usb_device_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0, 0, 0, array[usb_config_descriptor, 1]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}, @@ -25636,7 +25655,7 @@ 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{ + {Key: StructKey{Name: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 64, array[usb_config_descriptor_printer, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 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}}, @@ -25644,8 +25663,8 @@ var structDescs_ppc64le = []*KeyedStruct{ &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: "idVendor", TypeSize: 2}}, Val: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42152}, &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}}}, @@ -25653,9 +25672,35 @@ 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_printer"}}, Kind: 1, RangeBegin: 1, RangeEnd: 1}, }}}, + {Key: StructKey{Name: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 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}}, Val: 2}, + &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: 1317}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "idProduct", TypeSize: 2}}, Val: 42145}, + &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_cdc_ethernet"}}, 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"}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_in", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_notify", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, + {Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_cdc_ethernet_out", TypeSize: 9}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, FldName: "inner"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptor_hid_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_hid_in", TypeSize: 9}, Fields: []Type{ &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_HID_IN_ADDRESS, int8], const[USB_ENDPOINT_HID_ATTRIBUTES, int8], void]"}, FldName: "inner"}, }}}, @@ -25668,6 +25713,39 @@ var structDescs_ppc64le = []*KeyedStruct{ {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_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_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: 129}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bmAttributes", TypeSize: 1}}, Val: 3}, + &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_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_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: 3}, + &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_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}, @@ -25723,6 +25801,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bSynchAddress", TypeSize: 1}}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_endpoint_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, }}}, + {Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "notify", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_notify"}}, Kind: 1, RangeEnd: 1}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_in"}, FldName: "in"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptor_cdc_ethernet_out"}, FldName: "out"}, + }}}, {Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_endpoint_descriptors_hid", IsVarlen: true}, Fields: []Type{ &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}, @@ -25794,11 +25877,14 @@ var structDescs_ppc64le = []*KeyedStruct{ {Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{ &StructType{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]]"}, FldName: "inner"}, }}}, + {Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"}, + }}}, {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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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"}, + &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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}, @@ -25813,10 +25899,23 @@ var structDescs_ppc64le = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16}, }}}, - {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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "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]", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", 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}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 2}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}, Val: 6}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"}, + &StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"}, + }}}, + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, 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]", 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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: 3}, @@ -25826,10 +25925,10 @@ 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{ + {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, 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[const[0, 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}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", 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}, @@ -25842,7 +25941,7 @@ var structDescs_ppc64le = []*KeyedStruct{ {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"}, - &StructType{Key: StructKey{Name: "usb_cdc_header"}, FldName: "usb_cdc"}, + &StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "usb_cdc"}, }}}, {Key: StructKey{Name: "usb_port_status"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_port_status", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_port_status_flags", FldName: "wPortStatus", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 256, 512, 1024, 2048, 4096, 480, 512, 7168, 0, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352}}, @@ -25903,6 +26002,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_lang_ids", FldName: "lang_id", TypeSize: 2}}, Vals: []uint64{1078, 1052, 1025, 2049, 3073, 4097, 5121, 6145, 7169, 8193, 9217, 10241, 11265, 12289, 13313, 14337, 15361, 16385, 1067, 1101, 1068, 2092, 1069, 1059, 1093, 1026, 1109, 1027, 1028, 2052, 3076, 4100, 5124, 1050, 1029, 1030, 1043, 2067, 1033, 2057, 3081, 4105, 5129, 6153, 7177, 8201, 9225, 10249, 11273, 12297, 13321, 1061, 1080, 1065, 1035, 1036, 2060, 3084, 4108, 5132, 6156, 1079, 1031, 2055, 3079, 4103, 5127, 1032, 1095, 1037, 1081, 1038, 1039, 1057, 1040, 2064, 1041, 1099, 2144, 1087, 1111, 1042, 2066, 1062, 1063, 2087, 1071, 1086, 2110, 1100, 1112, 1102, 2145, 1044, 2068, 1096, 1045, 1046, 2070, 1094, 1048, 1049, 1103, 3098, 2074, 1113, 1051, 1060, 1034, 2058, 3082, 4106, 5130, 6154, 7178, 8202, 9226, 10250, 11274, 12298, 13322, 14346, 15370, 16394, 17418, 18442, 19466, 20490, 1072, 1089, 1053, 2077, 1097, 1092, 1098, 1054, 1055, 1058, 1056, 2080, 1091, 2115, 1066, 1279, 61695, 62719, 63743, 64767}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}}, }}}, + {Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_string_descriptor_cdc_ethernet_mac", TypeSize: 50}, 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: 3}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "data", TypeSize: 48}, Kind: 2, Values: []string{"340032003400320034003200340032003400320034003200"}, NoZ: true}, + }}}, {Key: StructKey{Name: "usb_wireless_cap_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_wireless_cap_descriptor", TypeSize: 11}, 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}, @@ -27047,6 +27151,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_string_descriptor"}, FldName: "data"}, }}}, + {Key: StructKey{Name: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]", TypeSize: 56}, 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: 3}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 4}}, BitSize: 8, Path: []string{"data"}}, + &StructType{Key: StructKey{Name: "usb_string_descriptor_cdc_ethernet_mac"}, FldName: "data"}, + }}}, {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"}}}, @@ -27055,6 +27165,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_descriptors_cdc_ethernet", 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_cdc_ethernet_mac]"}}}, + }}}, {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"}}}, @@ -27254,6 +27369,12 @@ 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_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vusb_responses_cdc_ethernet", 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: 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]"}}}, + }}}, {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"}}}, @@ -43279,6 +43400,12 @@ var syscalls_ppc64le = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dev", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "usb_device_descriptor"}}}, &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", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, + {Name: "syz_usb_connect$cdc_ethernet", 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_cdc_ethernet"}}}, + &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_cdc_ethernet", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {Name: "syz_usb_connect$hid", 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"}}, @@ -43296,6 +43423,11 @@ var syscalls_ppc64le = []*Syscall{ &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"}}}, }}, + {Name: "syz_usb_control_io$cdc_ethernet", CallName: "syz_usb_control_io", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_usb_cdc_ethernet", FldName: "fd", TypeSize: 4}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "descs", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_descriptors_cdc_ethernet"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "resps", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vusb_responses_cdc_ethernet"}}}, + }}, {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_hid"}}}, @@ -50243,8 +50375,11 @@ var consts_ppc64le = []ConstValue{ {Name: "USB_CDC_NCM_TYPE", Value: 26}, {Name: "USB_CDC_NETWORK_TERMINAL_TYPE", Value: 10}, {Name: "USB_CDC_OBEX_TYPE", Value: 21}, + {Name: "USB_CDC_PROTO_NONE"}, + {Name: "USB_CDC_SUBCLASS_ETHERNET", Value: 6}, {Name: "USB_CDC_UNION_TYPE", Value: 6}, {Name: "USB_CDC_WHCM_TYPE", Value: 17}, + {Name: "USB_CLASS_COMM", Value: 2}, {Name: "USB_CLASS_HID", Value: 3}, {Name: "USB_CLASS_PRINTER", Value: 7}, {Name: "USB_CONFIG_ATT_BATTERY", Value: 16}, @@ -50284,6 +50419,11 @@ var consts_ppc64le = []ConstValue{ {Name: "USB_DT_STRING", Value: 3}, {Name: "USB_DT_WIRELESS_ENDPOINT_COMP", Value: 17}, {Name: "USB_DT_WIRE_ADAPTER", Value: 33}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES", Value: 2}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS", Value: 130}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS", Value: 129}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES", Value: 3}, + {Name: "USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS", Value: 3}, {Name: "USB_ENDPOINT_HID_ATTRIBUTES", Value: 3}, {Name: "USB_ENDPOINT_HID_IN_ADDRESS", Value: 129}, {Name: "USB_ENDPOINT_HID_OUT_ADDRESS", Value: 2}, @@ -52094,4 +52234,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "c87d0e37e231bd4df8bbd35f06200017b89567a1" +const revision_ppc64le = "709d6d93e25953d290a5790e96e0633e06621aba" diff --git a/sys/linux/vusb.txt b/sys/linux/vusb.txt index 413b372fc..adac2e5cb 100644 --- a/sys/linux/vusb.txt +++ b/sys/linux/vusb.txt @@ -19,6 +19,7 @@ include resource fd_usb[int32]: -1 resource fd_usb_hid[fd_usb] resource fd_usb_printer[fd_usb] +resource fd_usb_cdc_ethernet[fd_usb] # These are generic syzcalls for emulating arbitrary USB devices. # They are mostly targeted to cover the enumeration process. @@ -28,14 +29,18 @@ syz_usb_ep_write(fd fd_usb, ep int16[0:31], len len[data], data buffer[in]) syz_usb_ep_read(fd fd_usb, ep int16[0:31], len len[data], data buffer[out]) syz_usb_disconnect(fd fd_usb) -# These are syzcalls that specifically target the HID device class. +# These syzcalls 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_hid], resps ptr[in, vusb_responses_hid]) -# These are syzcalls that specifically target the PRINTER device class. +# These syzcalls 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]) +# These syzcalls specifically target the CDC Ethernet device class. +syz_usb_connect$cdc_ethernet(speed flags[usb_device_speed], dev_len len[dev], dev ptr[in, usb_device_descriptor_cdc_ethernet], conn_descs ptr[in, vusb_connect_descriptors]) fd_usb_cdc_ethernet +syz_usb_control_io$cdc_ethernet(fd fd_usb_cdc_ethernet, descs ptr[in, vusb_descriptors_cdc_ethernet], resps ptr[in, vusb_responses_cdc_ethernet]) + 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 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -246,6 +251,7 @@ type vusb_response_t[CLASS, REQ, DATA] { # USB descriptors requested by the kernel before the SET_CONFIGURATION request. +# TODO: string should either contain lang ids or data. usb_string_descriptor { bLength len[parent, int8] bDescriptorType const[USB_DT_STRING, int8] @@ -384,8 +390,6 @@ usb_ptm_cap_descriptor { # Extra USB descriptors that come after an interface or an endpoint descriptor. -# CHECK: cdc_parse_cdc_header (iface) - # TODO: uas_find_endpoints (endpoint) # TODO: rpipe_epc_find (endpoint) # TODO: uvc_parse_streaming (iface) @@ -402,7 +406,7 @@ usb_ptm_cap_descriptor { usb_interface_extra_descriptor [ generic usb_generic_descriptor hid_hid usb_hid_descriptor_hid - usb_cdc usb_cdc_header + usb_cdc usb_cdc_header_ethernet ] [varlen] usb_endpoint_extra_descriptor [ @@ -418,176 +422,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_cdc_header { - items array[usb_cdc_header_item, 0:16] -} [packed] - -usb_cdc_header_item [ - generic usb_cdc_generic - header usb_cdc_header_desc - call_mgmt usb_cdc_call_mgmt_descriptor - acm usb_cdc_acm_descriptor - union usb_cdc_union_desc - country_functional usb_cdc_country_functional_desc - network_terminal usb_cdc_network_terminal_desc - ether usb_cdc_ether_desc - dmm usb_cdc_dmm_desc - mdlm usb_cdc_mdlm_desc - mdlm_detail usb_cdc_mdlm_detail_desc - obex usb_cdc_obex_desc - ncm usb_cdc_ncm_desc - mbim usb_cdc_mbim_desc - mbim_extended usb_cdc_mbim_extended_desc -] [varlen] - -usb_cdc_generic { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType flags[usb_cdc_types, int8] - - data array[int8] -} [packed] - -usb_cdc_types = USB_CDC_HEADER_TYPE, USB_CDC_CALL_MANAGEMENT_TYPE, USB_CDC_ACM_TYPE, USB_CDC_UNION_TYPE, USB_CDC_COUNTRY_TYPE, USB_CDC_NETWORK_TERMINAL_TYPE, USB_CDC_ETHERNET_TYPE, USB_CDC_WHCM_TYPE, USB_CDC_MDLM_TYPE, USB_CDC_MDLM_DETAIL_TYPE, USB_CDC_DMM_TYPE, USB_CDC_OBEX_TYPE, USB_CDC_NCM_TYPE, USB_CDC_MBIM_TYPE, USB_CDC_MBIM_EXTENDED_TYPE - -usb_cdc_header_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_HEADER_TYPE, int8] - - bcdCDC int16 -} [packed] - -usb_cdc_call_mgmt_descriptor { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_CALL_MANAGEMENT_TYPE, int8] - - bmCapabilities flags[usb_cdc_call_mgmt_caps, int8] -} [packed] - -usb_cdc_call_mgmt_caps = USB_CDC_CALL_MGMT_CAP_CALL_MGMT, USB_CDC_CALL_MGMT_CAP_DATA_INTF - -usb_cdc_acm_descriptor { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_ACM_TYPE, int8] - - bmCapabilities flags[usb_cdc_acm_caps, int8] -} [packed] - -usb_cdc_acm_caps = USB_CDC_COMM_FEATURE, USB_CDC_CAP_LINE, USB_CDC_CAP_BRK, USB_CDC_CAP_NOTIFY - -usb_cdc_union_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_UNION_TYPE, int8] - - bMasterInterface0 int8 - bSlaveInterface0 int8 - slave_interfaces array[int8, 0:6] -} [packed] - -usb_cdc_country_functional_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_COUNTRY_TYPE, int8] - - iCountryCodeRelDate int8 - wCountyCode0 int16 - country_codes array[int16, 0:6] -} [packed] - -usb_cdc_network_terminal_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_NETWORK_TERMINAL_TYPE, int8] - - bEntityId int8 - iName int8 - bChannelIndex int8 - bPhysicalInterface int8 -} [packed] - -usb_cdc_ether_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_ETHERNET_TYPE, int8] - - iMACAddress int8 - bmEthernetStatistics int32 - wMaxSegmentSize int16 - wNumberMCFilters int16 - bNumberPowerFilters int8 -} [packed] - -usb_cdc_dmm_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_DMM_TYPE, int8] - - bcdVersion int16 - wMaxCommand int16 -} [packed] - -usb_cdc_mdlm_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_MDLM_TYPE, int8] - - bcdVersion int16 - bGUID array[int8, 16] -} [packed] - -usb_cdc_mdlm_detail_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_MDLM_DETAIL_TYPE, int8] - - bGuidDescriptorType int8 - bDetailData array[int8] -} [packed] - -usb_cdc_obex_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_OBEX_TYPE, int8] - - bcdVersion int16 -} [packed] - -usb_cdc_ncm_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_NCM_TYPE, int8] - - bcdNcmVersion int16 - bmNetworkCapabilities int8 -} [packed] - -usb_cdc_mbim_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_MBIM_TYPE, int8] - - bcdMBIMVersion int16 - wMaxControlMessage int16 - bNumberFilters int8 - bMaxFilterSize int8 - wMaxSegmentSize int16 - bmNetworkCapabilities int8 -} [packed] - -usb_cdc_mbim_extended_desc { - bLength len[parent, int8] - bDescriptorType const[USB_DT_CS_INTERFACE, int8] - bDescriptorSubType const[USB_CDC_MBIM_EXTENDED_TYPE, int8] - - bcdMBIMExtendedVersion int16 - bMaxOutstandingCommandMessages int8 - wMTU int16 -} [packed] - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -691,7 +525,7 @@ usb_config_descriptor_hid { } [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] + inner usb_interface_descriptor_t[const[0, 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 @@ -817,7 +651,7 @@ 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]] + inner usb_device_descriptor_t[0, 0, 0, 0x525, 0xa4a8, 64, array[usb_config_descriptor_printer, 1]] } [packed] usb_config_descriptor_printer { @@ -825,7 +659,7 @@ usb_config_descriptor_printer { } [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] + inner usb_interface_descriptor_t[const[0, 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 { @@ -841,7 +675,7 @@ 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_ATTRIBUTES (USB_ENDPOINT_XFER_BULK) define USB_ENDPOINT_PRINTER_OUT_ADDRESS (1) define USB_ENDPOINT_PRINTER_IN_ADDRESS (2 | USB_DIR_IN) @@ -872,3 +706,258 @@ usb_printer_get_id_response { # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +# CDC Ethernet device class specific descriptions. +# https://www.usb.org/document-library/class-definitions-communication-devices-12 +# https://elixir.bootlin.com/linux/latest/source/drivers/net/usb/usbnet.c +# https://elixir.bootlin.com/linux/latest/source/drivers/net/usb/cdc_ether.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/legacy/ether.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/function/f_ecm.c +# https://elixir.bootlin.com/linux/latest/source/drivers/usb/gadget/function/u_ether.c + +# TODO: currently the only endpoint which is being successfully enabled is the notification endpoint #1. + +# TODO: consider patching idVendor and idProduct in Go code. +usb_device_descriptor_cdc_ethernet { + inner usb_device_descriptor_t[USB_CLASS_COMM, 0, 0, 0x525, 0xa4a1, 64, array[usb_config_descriptor_cdc_ethernet, 1]] +} [packed] + +usb_config_descriptor_cdc_ethernet { + inner usb_config_descriptor_t[const[1, int8], flags[usb_config_attributes, int8], array[usb_interface_descriptor_cdc_ethernet, 1]] +} [packed] + +# Per specification CDC Ethernet devices have two interfaces (control and data), but we're merging +# them into one, as Linux supports this, and syzkaller doesn't support multiple interfaces yet. +usb_interface_descriptor_cdc_ethernet { + inner usb_interface_descriptor_t[const[0, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet] +} [packed] + +usb_endpoint_descriptors_cdc_ethernet { + notify array[usb_endpoint_descriptor_cdc_ethernet_notify, 0:1] + in usb_endpoint_descriptor_cdc_ethernet_in + out usb_endpoint_descriptor_cdc_ethernet_out +} [packed] + +usb_endpoint_descriptor_cdc_ethernet_notify { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES, int8], void] +} [packed] + +usb_endpoint_descriptor_cdc_ethernet_in { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void] +} [packed] + +usb_endpoint_descriptor_cdc_ethernet_out { + inner usb_endpoint_descriptor_t[const[USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS, int8], const[USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES, int8], void] +} [packed] + +define USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES (USB_ENDPOINT_XFER_INT) +define USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES (USB_ENDPOINT_XFER_BULK) +define USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS (1 | USB_DIR_IN) +define USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS (2 | USB_DIR_IN) +define USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS (3) + +# https://elixir.bootlin.com/linux/v5.2.7/source/drivers/usb/core/message.c#L2137 +usb_cdc_header_ethernet { +# This is a mandatory descriptor (for non RNDIS devices): + union usb_cdc_union_desc + +# These are mandatory descriptors (for non RNDIS devices) that must not repeat: + header usb_cdc_header_desc + ether usb_cdc_ether_desc + +# These descriptors must not repeat: + mdlm array[usb_cdc_mdlm_desc, 0:1] + mdlm_detail array[usb_cdc_mdlm_detail_desc, 0:1] + + other usb_cdc_header_ethernet_others +} [packed] + +usb_cdc_header_ethernet_others { + items array[usb_cdc_header_other, 0:6] +} [packed] + +usb_cdc_header_other [ + call_mgmt usb_cdc_call_mgmt_descriptor + acm usb_cdc_acm_descriptor + country_functional usb_cdc_country_functional_desc + network_terminal usb_cdc_network_terminal_desc + dmm usb_cdc_dmm_desc + obex usb_cdc_obex_desc + ncm usb_cdc_ncm_desc + mbim usb_cdc_mbim_desc + mbim_extended usb_cdc_mbim_extended_desc +] [varlen] + +usb_cdc_header_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_HEADER_TYPE, int8] + + bcdCDC int16 +} [packed] + +usb_cdc_call_mgmt_descriptor { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_CALL_MANAGEMENT_TYPE, int8] + + bmCapabilities flags[usb_cdc_call_mgmt_caps, int8] + bDataInterface int8 +} [packed] + +usb_cdc_call_mgmt_caps = USB_CDC_CALL_MGMT_CAP_CALL_MGMT, USB_CDC_CALL_MGMT_CAP_DATA_INTF + +usb_cdc_acm_descriptor { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_ACM_TYPE, int8] + + bmCapabilities flags[usb_cdc_acm_caps, int8] +} [packed] + +usb_cdc_acm_caps = USB_CDC_COMM_FEATURE, USB_CDC_CAP_LINE, USB_CDC_CAP_BRK, USB_CDC_CAP_NOTIFY + +usb_cdc_union_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_UNION_TYPE, int8] + +# These must match bInterfaceNumber. + bMasterInterface0 const[0, int8] + bSlaveInterface0 const[0, int8] + slave_interfaces array[int8, 0:6] +} [packed] + +usb_cdc_country_functional_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_COUNTRY_TYPE, int8] + + iCountryCodeRelDate int8 + wCountyCode0 int16 + country_codes array[int16, 0:6] +} [packed] + +usb_cdc_network_terminal_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_NETWORK_TERMINAL_TYPE, int8] + + bEntityId int8 + iName int8 + bChannelIndex int8 + bPhysicalInterface int8 +} [packed] + +usb_cdc_ether_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_ETHERNET_TYPE, int8] + + iMACAddress const[1, int8] + bmEthernetStatistics int32 + wMaxSegmentSize int16 + wNumberMCFilters int16 + bNumberPowerFilters int8 +} [packed] + +usb_cdc_dmm_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_DMM_TYPE, int8] + + bcdVersion int16 + wMaxCommand int16 +} [packed] + +usb_cdc_mdlm_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_MDLM_TYPE, int8] + + bcdVersion int16 + bGUID usb_cdc_ethernet_mbm_guid +} [packed] + +# https://elixir.bootlin.com/linux/v5.2.7/source/drivers/net/usb/cdc_ether.c#L61 +usb_cdc_ethernet_mbm_guid { + id0 const[0x14f5e048ba817a3, int64] + id1 const[0x2a397ecbffc007a6, int64] +} [packed] + +usb_cdc_mdlm_detail_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_MDLM_DETAIL_TYPE, int8] + + bGuidDescriptorType int8 + bDetailData array[int8] +} [packed] + +usb_cdc_obex_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_OBEX_TYPE, int8] + + bcdVersion int16 +} [packed] + +usb_cdc_ncm_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_NCM_TYPE, int8] + + bcdNcmVersion int16 + bmNetworkCapabilities int8 +} [packed] + +usb_cdc_mbim_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_MBIM_TYPE, int8] + + bcdMBIMVersion int16 + wMaxControlMessage int16 + bNumberFilters int8 + bMaxFilterSize int8 + wMaxSegmentSize int16 + bmNetworkCapabilities int8 +} [packed] + +usb_cdc_mbim_extended_desc { + bLength len[parent, int8] + bDescriptorType const[USB_DT_CS_INTERFACE, int8] + bDescriptorSubType const[USB_CDC_MBIM_EXTENDED_TYPE, int8] + + bcdMBIMExtendedVersion int16 + bMaxOutstandingCommandMessages int8 + wMTU int16 +} [packed] + +vusb_descriptors_cdc_ethernet { + len len[parent, int32] + generic ptr[in, vusb_descriptor_generic] + +# https://elixir.bootlin.com/linux/v5.2.7/source/drivers/net/usb/usbnet.c#L147 + USB_DT_STRING ptr[in, vusb_descriptor_t[USB_TYPE_STANDARD, USB_DT_STRING, usb_string_descriptor_cdc_ethernet_mac]] +} [packed] + +usb_string_descriptor_cdc_ethernet_mac { + bLength len[parent, int8] + bDescriptorType const[USB_DT_STRING, int8] + +# This is a UTF16 encoded string '424242424242'. + data stringnoz["340032003400320034003200340032003400320034003200"] +} [packed] + +vusb_responses_cdc_ethernet { + 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]] +} [packed] + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # diff --git a/sys/linux/vusb_386.const b/sys/linux/vusb_386.const index 7d607df7a..270233a57 100644 --- a/sys/linux/vusb_386.const +++ b/sys/linux/vusb_386.const @@ -98,8 +98,11 @@ USB_CDC_MDLM_TYPE = 18 USB_CDC_NCM_TYPE = 26 USB_CDC_NETWORK_TERMINAL_TYPE = 10 USB_CDC_OBEX_TYPE = 21 +USB_CDC_PROTO_NONE = 0 +USB_CDC_SUBCLASS_ETHERNET = 6 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 +USB_CLASS_COMM = 2 USB_CLASS_HID = 3 USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 @@ -139,6 +142,11 @@ USB_DT_SS_HUB = 42 USB_DT_STRING = 3 USB_DT_WIRELESS_ENDPOINT_COMP = 17 USB_DT_WIRE_ADAPTER = 33 +USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES = 2 +USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS = 130 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS = 129 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES = 3 +USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS = 3 USB_ENDPOINT_HID_ATTRIBUTES = 3 USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 diff --git a/sys/linux/vusb_amd64.const b/sys/linux/vusb_amd64.const index 7d607df7a..270233a57 100644 --- a/sys/linux/vusb_amd64.const +++ b/sys/linux/vusb_amd64.const @@ -98,8 +98,11 @@ USB_CDC_MDLM_TYPE = 18 USB_CDC_NCM_TYPE = 26 USB_CDC_NETWORK_TERMINAL_TYPE = 10 USB_CDC_OBEX_TYPE = 21 +USB_CDC_PROTO_NONE = 0 +USB_CDC_SUBCLASS_ETHERNET = 6 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 +USB_CLASS_COMM = 2 USB_CLASS_HID = 3 USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 @@ -139,6 +142,11 @@ USB_DT_SS_HUB = 42 USB_DT_STRING = 3 USB_DT_WIRELESS_ENDPOINT_COMP = 17 USB_DT_WIRE_ADAPTER = 33 +USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES = 2 +USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS = 130 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS = 129 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES = 3 +USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS = 3 USB_ENDPOINT_HID_ATTRIBUTES = 3 USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 diff --git a/sys/linux/vusb_arm.const b/sys/linux/vusb_arm.const index 7d607df7a..270233a57 100644 --- a/sys/linux/vusb_arm.const +++ b/sys/linux/vusb_arm.const @@ -98,8 +98,11 @@ USB_CDC_MDLM_TYPE = 18 USB_CDC_NCM_TYPE = 26 USB_CDC_NETWORK_TERMINAL_TYPE = 10 USB_CDC_OBEX_TYPE = 21 +USB_CDC_PROTO_NONE = 0 +USB_CDC_SUBCLASS_ETHERNET = 6 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 +USB_CLASS_COMM = 2 USB_CLASS_HID = 3 USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 @@ -139,6 +142,11 @@ USB_DT_SS_HUB = 42 USB_DT_STRING = 3 USB_DT_WIRELESS_ENDPOINT_COMP = 17 USB_DT_WIRE_ADAPTER = 33 +USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES = 2 +USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS = 130 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS = 129 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES = 3 +USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS = 3 USB_ENDPOINT_HID_ATTRIBUTES = 3 USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 diff --git a/sys/linux/vusb_arm64.const b/sys/linux/vusb_arm64.const index 7d607df7a..270233a57 100644 --- a/sys/linux/vusb_arm64.const +++ b/sys/linux/vusb_arm64.const @@ -98,8 +98,11 @@ USB_CDC_MDLM_TYPE = 18 USB_CDC_NCM_TYPE = 26 USB_CDC_NETWORK_TERMINAL_TYPE = 10 USB_CDC_OBEX_TYPE = 21 +USB_CDC_PROTO_NONE = 0 +USB_CDC_SUBCLASS_ETHERNET = 6 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 +USB_CLASS_COMM = 2 USB_CLASS_HID = 3 USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 @@ -139,6 +142,11 @@ USB_DT_SS_HUB = 42 USB_DT_STRING = 3 USB_DT_WIRELESS_ENDPOINT_COMP = 17 USB_DT_WIRE_ADAPTER = 33 +USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES = 2 +USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS = 130 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS = 129 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES = 3 +USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS = 3 USB_ENDPOINT_HID_ATTRIBUTES = 3 USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 diff --git a/sys/linux/vusb_ppc64le.const b/sys/linux/vusb_ppc64le.const index 7d607df7a..270233a57 100644 --- a/sys/linux/vusb_ppc64le.const +++ b/sys/linux/vusb_ppc64le.const @@ -98,8 +98,11 @@ USB_CDC_MDLM_TYPE = 18 USB_CDC_NCM_TYPE = 26 USB_CDC_NETWORK_TERMINAL_TYPE = 10 USB_CDC_OBEX_TYPE = 21 +USB_CDC_PROTO_NONE = 0 +USB_CDC_SUBCLASS_ETHERNET = 6 USB_CDC_UNION_TYPE = 6 USB_CDC_WHCM_TYPE = 17 +USB_CLASS_COMM = 2 USB_CLASS_HID = 3 USB_CLASS_PRINTER = 7 USB_CONFIG_ATT_BATTERY = 16 @@ -139,6 +142,11 @@ USB_DT_SS_HUB = 42 USB_DT_STRING = 3 USB_DT_WIRELESS_ENDPOINT_COMP = 17 USB_DT_WIRE_ADAPTER = 33 +USB_ENDPOINT_CDC_ETHERNET_DATA_ATTRIBUTES = 2 +USB_ENDPOINT_CDC_ETHERNET_IN_ADDRESS = 130 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ADDRESS = 129 +USB_ENDPOINT_CDC_ETHERNET_NOTIFY_ATTRIBUTES = 3 +USB_ENDPOINT_CDC_ETHERNET_OUT_ADDRESS = 3 USB_ENDPOINT_HID_ATTRIBUTES = 3 USB_ENDPOINT_HID_IN_ADDRESS = 129 USB_ENDPOINT_HID_OUT_ADDRESS = 2 -- cgit mrf-deployment