Partager via


2.2.6.3.1 Request

The TRANS2_FIND_NEXT2 request and response formats are special cases of SMB_COM_TRANSACTION2 (section 2.2.4.46) SMB. Only the TRANS2_FIND_NEXT2 specifics are described here.

SMB_Parameters

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

Words (30 bytes):

TotalDataCount (2 bytes): If no Trans2_Data is supplied, this field MUST be 0x0000. If Trans2_Parameters.InformationLevel is SMB_INFO_QUERY_EAS_FROM_LIST (see TRANS2_FIND_FIRST2), this field MUST be the total size of the extended attribute list.

SetupCount (1 byte): This field MUST be 0x01.

Setup (2 bytes): This field MUST be TRANS2_FIND_NEXT2 (0x0002).


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

Trans2_Parameters (variable)

...

Trans2_Data (variable)

...

Trans2_Parameters (variable):

 Trans2_Parameters
   {
   USHORT     SID;
   USHORT     SearchCount;
   USHORT     InformationLevel;
   ULONG      ResumeKey;
   USHORT     Flags;
   SMB_STRING FileName;
   }


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

SID

SearchCount

InformationLevel

ResumeKey

...

Flags

FileName (variable)

...

SID (2 bytes): This field MUST be the search identifier (SID) returned in TRANS2_FIND_FIRST2 response.

SearchCount (2 bytes): This field MUST be the maximum number of entries to return in the response.

InformationLevel (2 bytes): This field contains an information level code, which determines the information contained in the response. The list of valid information level codes is specified in section 2.2.2.3.1. A client that has not negotiated long names support MUST request only SMB_INFO_STANDARD. If a client that has not negotiated long names support requests an InformationLevel other than SMB_INFO_STANDARD, the server MUST return a status of STATUS_INVALID_PARAMETER (ERRDOS/ERRinvalidparam).

ResumeKey (4 bytes): This field MUST be the value of a ResumeKey field returned in the response from a TRANS2_FIND_FIRST2 or TRANS2_FIND_NEXT2 that is part of the same search (same SID).

Flags (2 bytes): This bit mask field is used to request that the server manage the state of the transaction based on how the client attempts to traverse the results.

Name and bitmask

Description

SMB_FIND_CLOSE_AFTER_REQUEST

0x0001

Close the search after this request.

SMB_FIND_CLOSE_AT_EOS

0x0002

Close search when end of search is reached.

SMB_FIND_RETURN_RESUME_KEYS

0x0004

Return resume keys for each entry found.

SMB_FIND_CONTINUE_FROM_LAST

0x0008

Continue search from previous ending place.

SMB_FIND_WITH_BACKUP_INTENT

0x0010

Find with backup intent.

FileName (variable): A filename pattern. The server re-runs the search based on the search criteria defined by the FileName field in the TRANS2_FIND_FIRST2 Request (section 2.2.6.2.1), and the file names are returned starting after the first file that matches the filename pattern. This field can contain wildcard characters.<146>

Trans2_Data (variable): The Trans2_Data MUST be included if the  Trans2_Parameters.InformationLevel field is set to SMB_INFO_QUERY_EAS_FROM_LIST; else, it MUST NOT be included.

            
 Trans2_Data
 {
            
            
   SMB_GEA_LIST GetExtendedAttributeList;
 }


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

GetExtendedAttributeList (variable)

...

GetExtendedAttributeList (variable): A list of extended attribute (EA) names. The value of the AttributeName field MUST be used by the server to further constrain the find query to files having the set of extended attributes that match the set of AttributeName values provided in this list.