The first developer's guide to Microsoft®'s Internet/Intranet file sharing
standard
For years, developers and administrators have struggled to understand CIFS,
Microsoft's poorly documented standard for Internet file sharing. Finally, there
is an authoritative, cross-platform guide to CIFS capabilities and behavior.
Implementing CIFS not only delivers the priceless knowledge of a Samba Team
member dedicated to investigating the inner workings of CIFS, it also identifies
and describes crucial specifications and supporting documents.
Table of Contents
Foreword.
Introduction.
NBT: NetBIOS over TCP/IP.
I. A SHORT BIO OF NETBIOS.
1. NetBIOS and DOS: The Early Years.
OpLock Breaks.
2. Emulating “NetBIOS LANs”.
The NetBIOS Name Service. Thus Endeth the Overview.
The Basics of NBT Implementation.
3. You Got the Name, Look Up the Number.
Encoding NetBIOS Names. The Name Service in Detail.
4. NBT Names: Once More with Feeling.
Valid NetBIOS Name Characters. Name Service Headers.
Name Registration. The Datagram Service in Detail.
5. Datagram Distribution over Routed IP Internetworks.
The NBDD and the Damage Done. Implementing a
Workable Datagram Service. Fragmenting Datagrams.
6. Session Service Header.
Creating an NBT Session. Maintaining an NBT Session.
Closing an NBT Session. Where It All Went Wrong.
7. The 0x1Dirty Little Secret.
Twenty-five IPs or Less. Special Handling Required
for 0x1B Names. Alternate Name Resolution. The Awful Truth. SMB: The Server
Message Block Protocol.
II. A LITTLE BACKGROUND ON SMB.
8. Getting Started.
NBT or Not NBT. An Introductory Tour of SMB.
9. The Server Identifier.
The Directory Path. The File. The SMB URL. Was
That Trip Really Necessary? First Contact: Reaching the Server.
10. Interpreting the Server Identifier.
The Destination Port. Transport Discovery. Run
Naked. SMB in Its Natural Habitat.
11. Our Very First Live SMBs.
SMB Message Structure. SMB Message Header. The
AndX Mutation. The Flow of Conversation. A Little More Code. Take a Break. The
SMB Header in Detail.
12. The SMB_HEADER.STATUS Field Exposed.
The FLAGS and FLAGS2 Fields Tell All. EXTRA!
EXTRA! Read All About It! TID and UID: Separated at Birth? PID and MID Revealed.
EXTRA.PidHigh Dark Secrets Uncovered. Protocol Negotiation.
13. A Smattering of SMB Dialects.
Greetings: The NEGOTIATE PROTOCOL REQUEST. Gesundheit:
The NEGOTIATE PROTOCOL RESPONSE. NegProt Response Parameters. Session Setup.
14. SESSION SETUP ANDX REQUEST Parameters.
Virtual Circuits. The SESSION SETUP ANDX RESPONSE
SMB. Authentication.
15. Anonymous and Guest Login.
Plaintext Passwords. User Level Security with
Plaintext Passwords. DES. NTLM Version 2. The NTLMv2 Toolbox. The Extended Security
Authentication Toolkit. Random Notes on W2K and NT Domain Authentication. A
Quick Look at W2K Domains. Generating the Session Key. Further Study. Building
Your SMB Vocabulary.
16. That TREE CONNECT Thingy.
SMB Echo. Readin', Writin', and 'Rithmatic. Transaction
SMBs. Mailslots and Named Pipes.
17. Opportunistic Locks (OpLocks).
OpLock Breaks. DOS Attributes, Extended File
Attributes, Long Filenames, and Suchlike. That Just about Wraps Things Up for
SMB.
18. The Browse Service.
III. A BEAUTIFUL DAY IN THE NETWORK NEIGHBORHOOD.
19. History: From Frontier Town to Bustling
Metropolis.
Sociology. Politics. When Is a Workgroup not
a Workgroup?
20. Browse Service Clientele.
Providers. Becoming a Backup Browser. Crossing
the Street with the DMB. Elections. Infrastructure: The Mailslot and Named Pipe
Abstractions.
21. Meet the Plumbing: Named Pipes.
The Mailslot Metaphor. The Talk on the Street.
22. Making Sense of SMBtrans.
Browse Service Mailslot Messages. Announcement
Request. NetServerEnum2 Request.
23. Running an Election.
Voting. Samba Browse Service Enhancements.
24. Automatic LANMAN.
UnBrowsable. NBNS Wildcard DMB Queries and Enhanced
Browsing. Remote Announce. Remote Browse Sync. DMB != PDC. It Can't Happen Here.
25. Misconfigured Hosts.
Misconfigured Networks. Implementation Bugs.
Troublemakers. Design Flaws. At Home in the Network Neighborhood.
26. Appendices.
IV. MAKING A GOOD CUP OF TEA.
Appendix A. Basics of Making Tea.
About Tea. Nasty Habits. Decaffeinating Tea.
Known NetBIOS Suffix Values.
Appendix B. NetBIOS Name Suffix Bytes.
Special Handling of NetBIOS Names in WINS. The
SMB URL.
Appendix C. The Origins of the SMB URL.
Of Round Pegs, Square Holes, and Big Mallets.
Form Versus Function. Additional Parts. A Simple SMB URL Parser. CIFS Technical
Reference.
Appendix D.
Glossary.
References.
Index.
About the Authors
CHRISTOPHER R. HERTEL is a member of the Samba Team and a founding member of
the jCIFS Team. He has worked with SMB/CIFS networks since the 1980s, when he
designed and installed a large-scale network based on DEC Pathworks, using Microsoft
and IBM® networking protocols. Hertel is Network Design Engineer at the
University of Minnesota.
Series Editor BRUCE PERENS is an Open Source evangelist and developer whose
software is a major component of most commercial Linux® offerings. He founded
or co-founded Linux Standard Base, Open Source Initiative, and Software in the
Public Interest. As Debian GNU/Linux Project Leader, he was instrumental in
getting Linux on two U.S. Space Shuttle flights, bringing respect to Linux when
few people were taking it seriously. He now consults with companies on Open
Source policies and processes.