introduction - microsoft web viewcharacter set that map specified characters and symbols to the...

831
[MS-CIFS]: Common Internet File System (CIFS) Protocol Intellectual Property Rights Notice for Open Specifications Documentation § Technical Documentation. Microsoft publishes Open Specifications documentation (“this documentation”) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter- protocol relationships and interactions. § Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation. § No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. § Patents. Microsoft has patents that might cover your implementations of the technologies described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise . If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected] . § Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks . § Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise. 1 / 831 [MS-CIFS] - v20160714 Common Internet File System (CIFS) Protocol Copyright © 2016 Microsoft Corporation Release: July 14, 2016

Upload: dangdien

Post on 24-Mar-2018

217 views

Category:

Documents


3 download

TRANSCRIPT

[MS-CIFS]:

Common Internet File System (CIFS) Protocol

Intellectual Property Rights Notice for Open Specifications Documentation

Technical Documentation. Microsoft publishes Open Specifications documentation (this documentation) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter-protocol relationships and interactions.

Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

Patents. Microsoft has patents that might cover your implementations of the technologies described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise. If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected].

Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks.

Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred.

Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise.

Tools. The Open Specifications documentation does not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments, you are free to take advantage of them. Certain Open Specifications documents are intended for use in conjunction with publicly available standards specifications and network programming art and, as such, assume that the reader either is familiar with the aforementioned material or has immediate access to it.

Revision Summary

Date

Revision History

Revision Class

Comments

9/25/2009

1.0

Major

First Release.

11/6/2009

2.0

Major

Updated and revised the technical content.

12/18/2009

3.0

Major

Updated and revised the technical content.

1/29/2010

4.0

Major

Updated and revised the technical content.

3/12/2010

5.0

Major

Updated and revised the technical content.

4/23/2010

6.0

Major

Updated and revised the technical content.

6/4/2010

7.0

Major

Updated and revised the technical content.

7/16/2010

8.0

Major

Updated and revised the technical content.

8/27/2010

9.0

Major

Updated and revised the technical content.

10/8/2010

10.0

Major

Updated and revised the technical content.

11/19/2010

11.0

Major

Updated and revised the technical content.

1/7/2011

12.0

Major

Updated and revised the technical content.

2/11/2011

13.0

Major

Updated and revised the technical content.

3/25/2011

14.0

Major

Updated and revised the technical content.

5/6/2011

15.0

Major

Updated and revised the technical content.

6/17/2011

15.1

Minor

Clarified the meaning of the technical content.

9/23/2011

16.0

Major

Updated and revised the technical content.

12/16/2011

17.0

Major

Updated and revised the technical content.

3/30/2012

18.0

Major

Updated and revised the technical content.

7/12/2012

19.0

Major

Updated and revised the technical content.

10/25/2012

20.0

Major

Updated and revised the technical content.

1/31/2013

21.0

Major

Updated and revised the technical content.

8/8/2013

22.0

Major

Updated and revised the technical content.

11/14/2013

22.0

None

No changes to the meaning, language, or formatting of the technical content.

2/13/2014

23.0

Major

Updated and revised the technical content.

5/15/2014

24.0

Major

Updated and revised the technical content.

6/30/2015

25.0

Major

Significantly changed the technical content.

10/16/2015

25.0

None

No changes to the meaning, language, or formatting of the technical content.

7/14/2016

26.0

Major

Significantly changed the technical content.

Table of Contents

1Introduction16

1.1Glossary16

1.2References22

1.2.1Normative References22

1.2.2Informative References23

1.3Overview26

1.4Relationship to Other Protocols28

1.5Prerequisites/Preconditions29

1.6Applicability Statement29

1.7Versioning and Capability Negotiation30

1.8Vendor-Extensible Fields31

1.9Standards Assignments32

2Messages33

2.1Transport33

2.1.1NetBIOS-Based Transports33

2.1.1.1NetBIOS Frames (NBF) Protocol Transport33

2.1.1.2NetBIOS over TCP/UDP (NBT) Transport34

2.1.1.3NetBIOS over IPX/SPX (NBIPX) Transport34

2.1.1.4Other NetBIOS-Based Transports34

2.1.2Direct Hosting34

2.1.2.1Direct IPX Transport34

2.1.3Virtual Circuits38

2.2Message Syntax38

2.2.1Common Data Types40

2.2.1.1Character Sequences41

2.2.1.1.1File and Directory names41

2.2.1.1.2Pathnames42

2.2.1.1.3Wildcards42

2.2.1.2File Attributes42

2.2.1.2.1SMB_GEA43

2.2.1.2.1.1SMB_GEA_LIST43

2.2.1.2.2SMB_FEA44

2.2.1.2.2.1SMB_FEA_LIST45

2.2.1.2.3SMB_EXT_FILE_ATTR45

2.2.1.2.4SMB_FILE_ATTRIBUTES46

2.2.1.3Named Pipe Status (SMB_NMPIPE_STATUS)47

2.2.1.4Time48

2.2.1.4.1SMB_DATE49

2.2.1.4.2SMB_TIME49

2.2.1.4.3UTIME49

2.2.1.5Status Codes (SMB_ERROR)50

2.2.1.6Unique Identifiers50

2.2.1.6.1FID Generation51

2.2.1.6.2MID Generation51

2.2.1.6.3PID Generation52

2.2.1.6.4Connection ID (CID) Generation52

2.2.1.6.5Search ID (SID) Generation52

2.2.1.6.6SessionKey Generation53

2.2.1.6.7TID Generation53

2.2.1.6.8UID Generation53

2.2.2Defined Constants54

2.2.2.1SMB_COM Command Codes54

2.2.2.2Transaction Subcommand Codes60

2.2.2.3Information Level Codes63

2.2.2.3.1FIND Information Level Codes64

2.2.2.3.2QUERY_FS Information Level Codes64

2.2.2.3.3QUERY Information Level Codes65

2.2.2.3.4SET Information Level Codes65

2.2.2.4SMB Error Classes and Codes66

2.2.2.5Data Buffer Format Codes76

2.2.3SMB Message Structure77

2.2.3.1The SMB Header77

2.2.3.2Parameter Block83

2.2.3.3Data Block83

2.2.3.4Batched Messages ("AndX" Messages)84

2.2.3.4.1Follow-on Commands84

2.2.4SMB Commands85

2.2.4.1SMB_COM_CREATE_DIRECTORY (0x00)85

2.2.4.1.1Request85

2.2.4.1.2Response86

2.2.4.2SMB_COM_DELETE_DIRECTORY (0x01)87

2.2.4.2.1Request87

2.2.4.2.2Response88

2.2.4.3SMB_COM_OPEN (0x02)90

2.2.4.3.1Request90

2.2.4.3.2Response93

2.2.4.4SMB_COM_CREATE (0x03)97

2.2.4.4.1Request97

2.2.4.4.2Response98

2.2.4.5SMB_COM_CLOSE (0x04)101

2.2.4.5.1Request101

2.2.4.5.2Response102

2.2.4.6SMB_COM_FLUSH (0x05)103

2.2.4.6.1Request103

2.2.4.6.2Response104

2.2.4.7SMB_COM_DELETE (0x06)106

2.2.4.7.1Request106

2.2.4.7.2Response108

2.2.4.8SMB_COM_RENAME (0x07)109

2.2.4.8.1Request109

2.2.4.8.2Response111

2.2.4.9SMB_COM_QUERY_INFORMATION (0x08)113

2.2.4.9.1Request113

2.2.4.9.2Response114

2.2.4.10SMB_COM_SET_INFORMATION (0x09)116

2.2.4.10.1Request116

2.2.4.10.2Response118

2.2.4.11SMB_COM_READ (0x0A)120

2.2.4.11.1Request120

2.2.4.11.2Response121

2.2.4.12SMB_COM_WRITE (0x0B)124

2.2.4.12.1Request125

2.2.4.12.2Response127