2.2.1.4 Device I/O Request (DR_DEVICE_IOREQUEST)

This header is embedded in all server requests on a specific device.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Header

DeviceId

FileId

CompletionId

MajorFunction

MinorFunction

Header (4 bytes): An RDPDR_HEADER header. The Component field MUST be set to RDPDR_CTYP_CORE, and the PacketId field MUST be set to PAKID_CORE_DEVICE_IOREQUEST.

DeviceId (4 bytes): A 32-bit unsigned integer that is a unique ID. The value MUST match the DeviceId value in the Client Device List Announce Request (section 2.2.2.9).

FileId (4 bytes): A 32-bit unsigned integer that specifies a unique ID retrieved from the Device Create Response (section 2.2.1.5.1).

CompletionId (4 bytes): A 32-bit unsigned integer that specifies a unique ID for each request. The ID is considered valid until a Device I/O Response (section 2.2.1.5) is received. Subsequently, the ID MUST be reused.

MajorFunction (4 bytes): A 32-bit unsigned integer that identifies the request function. This field MUST have one of the following values.

Value

Meaning

IRP_MJ_CREATE

0x00000000

Create request

IRP_MJ_CLOSE

0x00000002

Close request

IRP_MJ_READ

0x00000003

Read request

IRP_MJ_WRITE

0x00000004

Write request

IRP_MJ_DEVICE_CONTROL

0x0000000E

Device control request

IRP_MJ_QUERY_VOLUME_INFORMATION

0x0000000A

Query volume information request

IRP_MJ_SET_VOLUME_INFORMATION

0x0000000B

Set volume information request

IRP_MJ_QUERY_INFORMATION

0x00000005

Query information request

IRP_MJ_SET_INFORMATION

0x00000006

Set information request

IRP_MJ_DIRECTORY_CONTROL

0x0000000C

Directory control request

IRP_MJ_LOCK_CONTROL

0x00000011

File lock control request

MinorFunction (4 bytes):  A 32-bit unsigned integer. This field is valid only when the MajorFunction field is set to IRP_MJ_DIRECTORY_CONTROL. If the MajorFunction field is set to another value, the MinorFunction field value SHOULD be 0x00000000;<5> otherwise, the MinorFunction field MUST have one of the following values.

Value

Meaning

IRP_MN_QUERY_DIRECTORY

0x00000001

Query directory request

IRP_MN_NOTIFY_CHANGE_DIRECTORY

0x00000002

Notify change directory request