Implementing CIFS: The Common Internet File System
Chapter 13: Protocol negotiation
This book excerpt is from Chapter 13 of Implementing CIFS: The Common Internet File System by Chris Hertel, ISBN 0-13-047116-X, copyright 2004. All rights reserved. This chapter, titled "Protocol negotiation," is posted with permission from
Prentice Hall PTR. This book is part of the Prentice Hall PTR Bruce Perens' Open Source Series line of books which are published under the Open Publication License.
CIFS is a very rich and varied protocol suite, a fact that is evident in the number of SMB dialects that exist. Five are listed in the X/Open SMB protocol specification, and the SNIA doc — published ten years later — lists eleven. That's a big bunch, and they probably missed a few. Each new dialect may add new SMBs, deprecate old ones, or extend existing ones. As if that were not enough, implementations introduce subtle variations within dialects.
All that in mind, our goal in this section will be to provide an overview of the available dialects, cover the workings of the NEGOTIATE PROTOCOL SMB exchange, and take a preliminary peek at some of the concepts that we have yet to consider (things like virtual circuits and authentication). For the most part, the examples and discussion will be based on the "NT LM 0.12" dialect. The majority of the servers currently available support some variation of NT LM 0.12, and at least one client implementation (jCIFS) has managed to get by without supporting any others. Server writers should be warned, however, that there really are a lot of clients still around that use older calls. Even new clients will use older calls, simply because of the difficulty of acquiring reliable documentation on the newer stuff.
This chapter is posted in full as a pdf file. To continue reading, click here.