Book description
"The book that Microsoft should have written, but didn't."
—Jeremy Allison, Samba Team
"Your detailed explanations are clear and backed-up with source
code—and the numerous bits of humor make a dry subject very
enjoyable to read."
—J.D. Lindemann, network engineer, Adaptec, Inc.
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.
Provides essential information for designing and debugging large Windows® and/or Samba networks
Offers clear, in-depth introductions to Server Message Block (SMB), NetBIOS over TCP/IP (NBT), browser services, and authentication
Drills down into the internals of CIFS, exposing its behavior on the wire and at the desktop—and its strange quirks
Presents illustrative code examples throughout
Reflects years of work reviewing obscure documentation, packet traces, and sourcecode
Includes the SNIA CIFS Technical Reference
Implementing CIFS will be indispensable to every developer who wants to provide CIFS compatibility—and every administrator or security specialist who needs an in-depth understanding of how it really works.
Table of contents
- Copyright
- Praise for Implementing CIFS
- Bruce Perens’ Open Source Series
- About Prentice Hall Professional Technical Reference
- About the Cover Art
- Foreword
- Introduction: CIFS from Eight Miles High
-
I. NBT: NetBIOS over TCP/IP
- 1. A Short Bio of NetBIOS
- 2. Speaking NetBIOS
- 3. The Basics of NBT Implementation
- 4. The Name Service in Detail
- 5. The Datagram Service in Detail
- 6. The Session Service in Detail
- 7. Where It All Went Wrong
-
II. SMB: The Server Message Block Protocol
- 8. A Little Background on SMB
- 9. An Introductory Tour of SMB
- 10. First Contact: Reaching the Server
- 11. SMB in Its Natural Habitat
- 12. The SMB Header in Detail
- 13. Protocol Negotiation
- 14. Session Setup
-
15. Authentication
- 15.1. Anonymous and Guest Login
- 15.2. Plaintext Passwords
- 15.3. LM Challenge/Response
- 15.4. NTLM Challenge/Response
- 15.5. NTLM Version 2
- 15.6. Extended Security: That Light at the End of the Tunnel
- 15.7. Kerberos
- 15.8. Random Notes on W2K and NT Domain Authentication
- 15.9. Random Notes on Message Authentication Codes
- 15.10. Non Sequitur Time
- 15.11. Further Study
- 16. Building Your SMB Vocabulary
- 17. The Remaining Oddities
- 18. That Just about Wraps Things Up for SMB
-
III. The Browse Service
- 19. A Beautiful Day in the Network Neighborhood
- 20. Meet the Neighbors
- 21. Infrastructure: The Mailslot and Named Pipe Abstractions
-
22. The Talk on the Street
- 22.1. Making Sense of SMBtrans
-
22.2. Browse Service Mailslot Messages
- 22.2.1. Announcement Request
- 22.2.2. Host Announcement
- 22.2.3. Election Request
- 22.2.4. Get Backup List Request
- 22.2.5. Get Backup List Response
- 22.2.6. Local Master Announcement
- 22.2.7. Master Announcement
- 22.2.8. Domain Announcement
- 22.2.9. Become Backup Request
- 22.2.10. The Undocumented Reset
- 22.2.11. It’s All in the Delivery
- 22.3. RAPture
- 23. The Better Browser Bureau
- 24. Samba Browse Service Enhancements
- 25. It Can’t Happen Here
- 26. At Home in the Network Neighborhood
-
IV. Appendices
- A. Making a Good Cup of Tea
- B. Known NetBIOS Suffix Values
- C. The SMB URL
-
D. CIFS Technical Reference
- Abstract
- Intended Usage
- Acknowledgements
- Table of Contents
-
1. Introduction
-
1.1. Summary of features
- 1.1.1. File access
- 1.1.2. File and record locking
- 1.1.3. Safe caching, read-ahead, and write-behind
- 1.1.4. File change notification
- 1.1.5. Protocol version negotiation
- 1.1.6. Extended attributes
- 1.1.7. Distributed replicated virtual volumes
- 1.1.8. Server name resolution independence
- 1.1.9. Batched requests
- 1.1.10. Obsolescence
-
1.1. Summary of features
-
2. Protocol Operation Overview
- 2.1. Server Name Determination
- 2.2. Server Name Resolution
- 2.3. Sample Message Flow
- 2.4. CIFS Protocol Dialect Negotiation
- 2.5. Message Transport
- 2.6. Opportunistic Locks
- 2.7. Security Model
- 2.8. Authentication
- 2.9. Distributed File System (DFS) Support
-
3. SMB Message Formats and Data Types
- 3.1. Notation
- 3.2. SMB header
- 3.3. Name Restrictions
- 3.4. File Names
- 3.5. Wildcards
- 3.6. DFS Pathnames
- 3.7. Time And Date Encoding
- 3.8. Access Mode Encoding
- 3.9. Access Mask Encoding
- 3.10. Open Function Encoding
- 3.11. Open Action Encoding
- 3.12. File Attribute Encoding
- 3.13. Extended File Attribute Encoding
- 3.14. Batching Requests (“AndX” Messages)
-
3.15. “Transaction” Style Subprotocols
- 3.15.1. SMB_COM_TRANSACTION2 Format
- 3.15.2. SMB_COM_NT_TRANSACTION Formats
- 3.15.3. Functional Description
-
3.15.4. SMB_COM_TRANSACTION Operations
- 3.15.4.1. Mail Slot Transaction Protocol
- 3.15.4.2. Server Announcement Mailslot Transaction
- 3.15.4.3. Named Pipe Transaction Protocol
- 3.15.4.4. CallNamedPipe
- 3.15.4.5. WaitNamedPipe
- 3.15.4.6. PeekNamedPipe
- 3.15.4.7. GetNamedPipeHandleState
- 3.15.4.8. SetNamedPipeHandleState
- 3.15.4.9. GetNamedPipeInfo
- 3.15.4.10. TransactNamedPipe
- 3.15.4.11. RawReadNamedPipe
- 3.15.4.12. RawWriteNamedPipe
- 3.16. Valid SMB Requests by Negotiated Dialect
-
4. SMB Requests
-
4.1. Session Requests
- 4.1.1. NEGOTIATE: Negotiate Protocol
- 4.1.2. SESSION_SETUP_ANDX: Session Setup
- 4.1.3. LOGOFF_ANDX: User Logoff
- 4.1.4. TREE_CONNECT_ANDX: Tree Connect
- 4.1.5. TREE_DISCONNECT: Tree Disconnect
- 4.1.6. TRANS2_QUERY_FS_INFORMATION: Get File System Information
- 4.1.7. ECHO: Ping the Server
- 4.1.8. NT_CANCEL: Cancel request
-
4.2. File Requests
- 4.2.1. NT_CREATE_ANDX: Create or Open File
- 4.2.2. NT_TRANSACT_CREATE: Create or Open File with EAs or SD
- 4.2.3. CREATE_TEMPORARY: Create Temporary File
- 4.2.4. READ_ANDX: Read Bytes
- 4.2.5. WRITE_ANDX: Write Bytes to file or resource
- 4.2.6. LOCKING_ANDX: Lock or Unlock Byte Ranges
- 4.2.7. SEEK: Seek in File
- 4.2.8. FLUSH: Flush File
- 4.2.9. CLOSE: Close File
- 4.2.10. CLOSE_AND_TREE_DISCONNECT
- 4.2.11. DELETE: Delete File
- 4.2.12. RENAME: Rename File
- 4.2.13. NT_RENAME:
- 4.2.14. MOVE: Rename File
- 4.2.15. COPY: Copy File
-
4.2.16. TRANS2_QUERY_PATH_INFORMATION: Get File Attributes Given Path
- 4.2.16.1. SMB_INFO_STANDARD & SMB_INFO_QUERY_EA_SIZE
- 4.2.16.2. SMB_INFO_QUERY_EAS_FROM_LIST & SMB_INFO_QUERY_ALL_EAS
- 4.2.16.3. SMB_INFO_IS_NAME_VALID
- 4.2.16.4. SMB_QUERY_FILE_BASIC_INFO
- 4.2.16.5. SMB_QUERY_FILE_STANDARD_INFO
- 4.2.16.6. SMB_QUERY_FILE_EA_INFO
- 4.2.16.7. SMB_QUERY_FILE_NAME_INFO
- 4.2.16.8. SMB_QUERY_FILE_ALL_INFO
- 4.2.16.9. SMB_QUERY_FILE_ALT_NAME_INFO
- 4.2.16.10. SMB_QUERY_FILE_STREAM_INFO
- 4.2.16.11. SMB_QUERY_FILE_COMPRESSION_INFO
- 4.2.16.12. SMB_QUERY_FILE_UNIX_BASIC
- 4.2.16.13. SMB_QUERY_FILE_UNIX_LINK
- 4.2.16.14. SMB_MAC_DT_GET_APPL
- 4.2.16.15. SMB_MAC_DT_GET_ICON
- 4.2.16.16. SMB_MAC_DT_GET_ICON_INFO
- 4.2.16.17. Errors
- 4.2.17. TRANS2_QUERY_FILE_INFORMATION: Get File Attributes Given FID
-
4.2.18. TRANS2_SET_PATH_INFORMATION: Set File Attributes given Path
- 4.2.18.1. SMB_INFO_STANDARD & SMB_INFO_QUERY_EA_SIZE
- 4.2.18.2. SMB_INFO_QUERY_ALL_EAS
- 4.2.18.3. SMB_SET_FILE_UNIX_BASIC
- 4.2.18.4. SMB_SET_FILE_UNIX_LINK
- 4.2.18.5. SMB_SET_FILE_UNIX_HLINK
- 4.2.18.6. SMB_MAC_SET_FINDER_INFO
- 4.2.18.7. SMB_MAC_DT_ADD_APPL
- 4.2.18.8. SMB_MAC_DT_REMOVE_APPL
- 4.2.18.9. SMB_MAC_DT_ADD_ICON
- 4.2.18.10. Errors
- 4.2.19. TRANS2_SET_FILE_INFORMATION: Set File Attributes Given FID
-
4.3. Directory Requests
- 4.3.1. TRANS2_CREATE_DIRECTORY: Create Directory (with optional EAs)
- 4.3.2. DELETE_DIRECTORY: Delete Directory
- 4.3.3. CHECK_DIRECTORY: Check Directory
-
4.3.4. TRANS2_FIND_FIRST2: Search Directory using Wildcards
- 4.3.4.1. SMB_INFO_STANDARD
- 4.3.4.2. SMB_INFO_QUERY_EA_SIZE
- 4.3.4.3. SMB_INFO_QUERY_EAS_FROM_LIST
- 4.3.4.4. SMB_FIND_FILE_DIRECTORY_INFO
- 4.3.4.5. SMB_FIND_FILE_FULL_DIRECTORY_INFO
- 4.3.4.6. SMB_FIND_FILE_BOTH_DIRECTORY_INFO
- 4.3.4.7. SMB_FIND_FILE_NAMES_INFO
- 4.3.4.8. SMB_FIND_FILE_UNIX
- 4.3.4.9. SMB_FINDBOTH_MAC_HFS_INFO
- 4.3.4.10. Errors
- 4.3.5. TRANS2_FIND_NEXT2: Resume Directory Search Using Wildcards
- 4.3.6. FIND_CLOSE2: Close Directory Search
- 4.3.7. NT_TRANSACT_NOTIFY_CHANGE: Request Change Notification
- 4.4. DFS Operations
- 4.5. Miscellaneous Operations
-
4.1. Session Requests
- 5. SMB Symbolic Constants
- 6. Error Codes and Classes
- 7. Security Considerations
- 8. References
- 9. Appendix A -- NETBIOS transport over TCP
- 10. Appendix B -- TCP transport
- 11. Appendix C – Share Level Server Security
- 12. Appendix D – CIFS UNIX Extension
- 13. Appendix E – CIFS Macintosh Extension
- 14. Appendix F – API Numbers for Transact based RAP calls
- Glossary
- References
Product information
- Title: Implementing CIFS: The Common Internet File System
- Author(s):
- Release date: August 2003
- Publisher(s): Pearson
- ISBN: 013047116X
You might also like
book
Windows File System Troubleshooting
The Windows file system is large and complex, featuring not only a huge number of essential …
book
Windows Server 2008 File Services
This guide provides the basic building blocks upon which many other infrastructure services are based. Enjoy …
book
Windows 2012 Server Network Security
Windows 2012 Server Network Security provides the most in-depth guide to deploying and maintaining a secure …
book
Storage Area Networks For Dummies®
If you’ve been charged with setting up storage area networks for your company, learning how SANs …