zoukankan      html  css  js  c++  java
  • Processing an OS Descriptor request -- Remote Desktop Protocol

    Special processing on the client is needed when processing TS_URB_OS_FEATURE_DESCRIPTOR_REQUEST.

    The following describes how to get the OS-specific string descriptor.

    To retrieve a device's OS string descriptor, send a standard GET_DESCRIPTOR control request to the device.

    For details on how to construct GET_DESCRIPTOR control requests, see [USB-SPC2.0] section 9.4 "Standard Device Requests."

    The request must have the format shown in the following table.

    bmRequestType

    bRequest

    wValue

    wIndex

    wLength

    Data

    1000 0000B

    GET_DESCRIPTOR

    0x03EE

    0x0000

    0x12

    Returned string

    bmRequestType: IN. This 1-byte field is divided into three parts that indicate the data transfer direction, the descriptor type, and the recipient.

    To retrieve a USB string descriptor, bmRequestType MUST be set to 10000000B (0x80).

    bRequest: IN. This field specifies the request type. It should be set to the standard GET_DESCRIPTOR request code.

    wValue: IN. This field is split into two parts for GET_DESCRIPTOR requests.

    •  The high byte contains the descriptor type. To retrieve a string descriptor, set this byte to 0x03.

    •  The low byte contains the descriptor's string index, which indicates where the descriptor is stored in firmware.
      To retrieve an OS string descriptor, set this byte to 0xEE.

    wIndex: IN. This field specifies the descriptor's language ID. It must be set to 0 for OS string descriptors.

    wLength: IN. This field specifies the length of the buffer, in bytes, that is to receive the string descriptor.
    The device should respond to values ranging from 0x02-0xFF. wLength should be set to 0x12 for OS string descriptors.

    Data: OUT. This field is a pointer to the buffer that will receive the requested descriptor. The format of the descriptor is described in the following table.

    For more details on how to send control requests, see [USB-SPC2.0].

    If a device does not have a valid string descriptor at 0xEE, it responds with a Stall or Request Error.<4>

    If an OS string descriptor request is successful, the device returns the descriptor in the request's Data field.
    Version 1.00 of the OS string descriptor has a fixed length of 18 bytes, with a structure as shown in the following table.
    This format MUST be used by all OS string descriptors.

    Length

    Type

    Signature

    MS Vendor Code

    Pad

    0x14

    0x03

    MSFT100

    unsigned byte

    0x00

    Length: An unsigned byte and MUST be set to 0x14.

    Type: An unsigned byte and MUST be set to 0x03.

    Signature: A Unicode string and MUST be set to "MSFT100".

    MS Vendor Code: An unsigned byte, it will be used to retrieve associated feature descriptors.

    Pad: An unsigned byte and MUST be set to 0x00.

    When processing the Signature and MS VendorCode fields:

    •  The Signature field contains a Unicode character array that identifies the descriptor as an OS string descriptor
      and includes the version number.
      For version 1.00, this array must be set to "MSFT100" (0x4D00 0x5300 0x4600 0x5400 0x3100 0x3000 0x3000).

    •  The MS VendorCode field is used to retrieve the associated feature descriptors.
      This code is used as Requestfield in TS_URB_CONTROL_VENDOR_OR_CLASS_REQUEST section 2.2.9.12.

    Because independent hardware vendors can store string descriptors at any index,
    there is no guarantee that a string descriptor stored at 0xEE is an OS string descriptor.<5>

  • 相关阅读:
    homework2
    一件关于Bug的小事
    软件测试作业三:有关控制流图、覆盖内容
    用CSS改变select框的样式
    lab1--ideal + junit
    软件测试作业二
    记一次曾经项目中遇到的错误
    02组_现代软件工程_第04次作业——利用4象限原理分析自身CanTool项目的构成
    02组_现代软件工程_第03次作业——对于自身评价(原有水平以及长远目标分析总结)
    02组_现代软件工程_第02次作业——初谈GitHub使用详解以及设计
  • 原文地址:https://www.cnblogs.com/shangdawei/p/4747990.html
Copyright © 2011-2022 走看看