3.1.5.2 Processing Packet Errors

When an unrecognized or malformed packet is received by the server or the client, the implementation SHOULD terminate the virtual channel connection. This action SHOULD be taken for any unrecognized message or field values.

If a packet is received with a length shorter than the expected length, the implementation SHOULD terminate the virtual channel connection.

Out-of-sequence packets, or the receipt of multiples of packets that are supposed to be received only once, MAY terminate the virtual channel connection.

There are no timeouts for receiving a reply for any request. A request is considered incomplete until a matching reply is received or the underlying virtual channel connection is terminated.

Error checking for a Shared Header (RDPDR_HEADER):

  • If the Component field has a value that is not specified by this protocol, the implementation SHOULD terminate the virtual channel connection.

  • If the PacketId field has a value that is not specified by this protocol, the implementation SHOULD terminate the virtual channel connection.

Error checking for a Capability Header (CAPABILITY_HEADER):

  • If the CapabilityType field has a value that is not specified by this protocol, the implementation SHOULD terminate the virtual channel connection.

Error checking for a Device Announce Header (DEVICE_ANNOUNCE):

Error checking for a Device I/O Request (DR_DEVICE_REQUEST):

  • If a request is received that contains a DeviceId field that was not announced by the client or has been removed, the request SHOULD be ignored by the implementation.

  • If the request contains MajorFunction or MinorFunction fields that are not described by this protocol, the request SHOULD be completed with a Device I/O Response message that has the IoStatus field set to STATUS_UNSUCCESSFUL.

  • If the request does not have the MajorFunction field set to IRP_MJ_CREATE, and the FileId field does not contain a valid value returned in response to a Device Create Request message, or the device has been closed by a Device Close Request message, the implementation SHOULD return a response with the IoStatus field set to STATUS_UNSUCCESSFUL.

Error checking for a Device I/O Response (DR_DEVICE_IOCOMPLETION):

  • If a response contains a CompletionId value that has not been sent or has been already completed, the implementation SHOULD terminate the virtual channel.

  • If a response contains a DeviceId field that has never been announced or has been removed, the implementation SHOULD terminate the virtual channel.

Error checking for a DR_CORE_CLIENT_ANNOUNCE_RSP packet:

  • There is no error checking for the VersionMinor and VersionMajor fields specified by the client in the DR_CORE_CLIENT_ANNOUNCE_RSP packet. However, the behavior is different depending on the version information, as follows.

    • If the value of VersionMajor on the server is less than the value of VersionMajor specified by the client, then the server does not initiate capability exchange via the DR_CORE_CAPABILITY_REQ packet. Otherwise, it does.

    • If the value of VersionMajor on the server is identical to the value of VersionMajor specified by the client and if the value of VersionMinor is less than 5, then the server does not initiate capability exchange via the DR_CORE_CAPABILITY_REQ packet. If the value of VersionMinor is greater than or equal to 5, then the server initiates capability exchange via the DR_CORE_CAPABILITY_REQ packet.

Note The details for client versions are specified in DR_CORE_SERVER_ANNOUNCE_REQ.The details for server versions are specified in DR_CORE_CLIENT_ANNOUNCE_RSP.