共用方式為


2.2.4.66.1 Request

 SMB_Parameters
   {
   UCHAR WordCount;
   Words
     {
     SMB_FILE_ATTRIBUTES SearchAttributes;
     USHORT              InformationLevel;
     ULONG               Reserved;
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   Bytes
     {
     UCHAR      BufferFormat1;
     SMB_STRING OldFileName; 
     UCHAR      BufferFormat2;
     SMB_STRING NewFileName;
     }
   }
            

SMB_Header:

TID (2 bytes): USHORT This field MUST contain a valid TID.

UID (2 bytes): USHORT This field MUST contain a valid UID.


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

WordCount

SearchAttributes

InformationLevel

...

Reserved

...

ByteCount

BufferFormat1

OldFileName (variable)

...

BufferFormat2

NewFileName (variable)

...

WordCount (1 byte): This field MUST be 0x04.

SearchAttributes (2 bytes): This field indicates the attributes that the target file(s) MUST have. If the attribute is 0x0000, then only normal files are renamed or linked. If the system file or hidden attributes are specified, then the rename is inclusive of both special types.

InformationLevel (2 bytes): This field MUST be one of the three values shown in the following table.

Value

Meaning

SMB_NT_RENAME_SET_LINK_INFO

0x0103

Create a hard link to the original file.

SMB_NT_RENAME_RENAME_FILE

0x0104

An in-place rename of the file.<123>

SMB_NT_RENAME_MOVE_FILE

0x0105

Move the file within the path hierarchy. This information level is obsolete. Clients MUST NOT use this value in a request.<124>

Reserved (4 bytes): This field SHOULD be set to 0x00000000 by the client and MUST be ignored by the server.<125>

ByteCount (2 bytes): This field MUST be greater than or equal to 0x0004.

BufferFormat1 (1 byte): This field MUST be 0x04.

OldFileName (variable): A null-terminated string containing the full path name of the file to be manipulated. Wildcards are not supported.

BufferFormat2 (1 byte): This field MUST be 0x04.

NewFileName (variable): A null-terminated string containing the new full path name to be assigned to the file provided in OldFileName or the full path into which the file is to be moved.