Slashdot Mirror


Implementing CIFS

Bombcar writes "Anyone who has used Microsoft products in the last ten years has used the SMB protocol (now known as CIFS). Some have become experts in the usage of Windows file sharing, Samba, and more. We know that there can be a 15 minute delay before new machines appear in 'Network Neighborhood'. We've read the Official Samba 3 book, and follow the Samba mailing list once in a while, perhaps even answering questions. But there is a limit to the knowledge given by these sources." Read on for Bombcar's review of Implementing CIFS from Prentice Hall. Implementing CIFS author Christopher R. Hertel pages 642 publisher Prentice Hall rating 8 of 10 reviewer Tom Dickson ISBN 013047116X summary In-depth (but not too deep) coverage of the CIFS/SMB protocol

It is one thing to be able to use Samba, Windows, and the Common Internet File System (CIFS) protocol. It is another thing entirely to understand CIFS with sufficient depth to begin coding using it. This is where Christopher Hertel's Implementing CIFS begins.

This thick book (over 600 pages) begins with a history of NetBIOS in the DOS era. It quickly progresses to NetBIOS over TCP/IP (which evolved into the current CIFS protocol). Hertel documents the beginnings of quirks that will last throughout the life of the protocol. There is an RFC that was proposed in 1987, but many vendors have added extensions to this. (It might surprise you to learn that Samba has added extensions, which are covered in Chapter 24).

After the basic overview, he quickly dives into real coding of an actual (though simple) implementation. This will be his style for the rest of the book (except for humorous asides now and then). An aspect of the protocol, such as Name Resolution, will be explained in some detail, and then expounded in actual code (and in a few cases pseudocode).

The detail is good but not overwhelming. Some people (with names like Jerry Carter or Andrew Tridgell) will want more depth than this book provides, but for with a protocol as varied as CIFS, choices have to be made. As the Samba website mentions, this book is written in "Geekish." The book covers aspects of older and newer SMB/CIFS implementations, including a description of the NTLM2 challenge/auth system.

One thing that should be noted is that the code examples work, but as the author points out, they usually have little or no error handling. This is common to many books, but it is something to remember.

Now, should you get this book? If you're just a user, you probably don't need it. But if you've ever wished you could understand the Samba technical mailing list, or wanted to know why it takes up to 15 minutes to see a new machine, then you'll enjoy this book. If you want to utilize CIFS in any manner (even if just implementing Samba for clients), I'd highly recommend reading this. It will help you to understand what is going on on your network, even if you're not writing the code yourself. And if you want to be a Samba coder, it is required reading.

What didn't I like? I first read the book in an airport, and found that it relies heavily on having access to a computer. I would have preferred more explanations of code fragments than was given. However, this is a minor issue; most people who are implementing CIFS will be using a computer! I was also left with a desire for more information, but the large Appendix D along with many sources recommended provide for further study.

As a bonus, Appendix A tells you how to make a good cup of Earl Grey tea! That alone to some would be worth the price of admission.

You can purchase Implementing CIFS from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

11 of 199 comments (clear)

  1. Re:But who likes CIFS? by smharr4 · · Score: 3, Insightful

    It's all very well saying 'let it die', but just what would you replace it with?

  2. Most implementations will be in written in C... by tcopeland · · Score: 2, Insightful

    ...but is there any reason why a CIFS client (or server) couldn't be written in a higher level language like Ruby?

    Obviously there'd be a speed hit, but it seems like it'd be a lot faster to develop in, and time-critical bits could be written in C and accessed via Ruby/DL or whatever.

    Ditto for Python, of course... same sort of advantages/issues.

    1. Re:Most implementations will be in written in C... by 110010001000 · · Score: 4, Insightful

      For what purpose? Ruby is an esoteric language that hardly anyone uses and less people will use as the years goes on. This means that the code base will be unmaintainable.

      Now Java or C# is a real option. Microsofts next implementation will be written in C# as a matter of fact.

    2. Re:Most implementations will be in written in C... by 110010001000 · · Score: 2, Insightful

      Well my assertions are based in fact. Do a poll of every software developer or programmer you know and ask them if they have ever written or seen a program written in Ruby. Then ask them if they have seen or written one five years (or three years) ago.

      The same principles apply to Eiffel, et al.

    3. Re:Most implementations will be in written in C... by Malc · · Score: 2, Insightful

      It seems to me that the bottleneck will be the network, not the application code. What's an extra fraction of a ms making a call in a high level language instead of C when the round trip time on the wire could one or two orders of magnitude longer?

  3. Re:But who likes CIFS? by El · · Score: 4, Insightful

    Can't we just let CIFS to die, already? As long as people are still running Windows and Windows is still using CIFS, it will be necessary to support CIFS for Windows interoperability. No argument from me that it is a horrible protocol for file sharing; but then NFS isn't much better.

    --

    "Freedom means freedom for everybody" -- Dick Cheney

  4. Re:But who likes CIFS? by smharr4 · · Score: 4, Insightful

    Exactly the point I was trying to make above.

    As much as the slashdot crowd would probably hate to admit that Microsoft got something right, SMB/CIFS is the 'killer app' for sharing files and printers over a LAN.

    If there's another application that does the same job as SMB/CIFS and is:

    • Free
    • easy to use client
    • easy to configure server
    • multiplatform - Windows, OS X, varying strains of Unix, and linux
    then bring it on. Until then, we're stuck with CIFS.
  5. Re:This book is under an Open Source license by 110010001000 · · Score: 2, Insightful

    Now here is a guy I can respect. One who believes in the Open Source spirit enough to actually make the content of a book available for free. Kudos to Bruce for not being a hypocrite like so many of the Open Source "community".

    It would be interesting to hear about how well the books sell after being made freely available on the net. My guess is not very well, but I am a fervent anti-open source guy. Please let us know.

    Thanks

  6. Re:This book is under an Open Source license by Bruce+Perens · · Score: 4, Insightful
    Yes, I will put it up on the web. I think I can show you that Open Source isn't damaging to individual software developers and is of benefit to business and the economy in general. But it is damaging to a Microsoft-style business. Home refrigerators were very damaging to the huge industry that harvested, stored, and transported ice.

    Thanks

    Bruce

  7. Re:But who likes CIFS? by cscx · · Score: 2, Insightful

    NFS is the caveman of network file systems. Sorry, we've moved a bit beyond that, it's not 1994 anymore.

    Linus Torvalds himself said "Linux's NFS 'sucks rocks.'"

    It's not as if it's better than smb or anything

    Wow, you're right on the money!

  8. What about patching? by emil · · Score: 3, Insightful

    There will be bugs in the M$ nfs server code. Will Windows Update patch them?

    The patch against SQL Slammer had been out for six months before Slammer took down South Korea and invaded a nuclear power plant. I don't want to install anything that requires special patching procedures.