SMB as an RPC protocol.

Christopher R. Hertel crh at
Tue Jan 8 10:18:04 GMT 2002

> Simo Sorce wrote:
> > It has been created as a file and print sharing tool, where MS forced then
> > to add support of a little amount of dce/rpc (and lately ldap) to maintain
> compatibility, this is the only reason why rpc made it's way into samba 
> I think.
> Nope - SMB "is" an RPC protocol IFAIK the samba team
> originaly did not know this (*1) and implemented as a standard client
> server protocol.

Okay, this is splitting very fine hairs.  Yes, in some ways SMB does 
remote proceedure call.  Sort of.  The packets are things like READ and 
WRITE.  I'll grant that.  ...but remote proceedure call is also, by its 
very nature, a client/server protocol.

So what's your point?

> The fact that an RPC protocol 'is' also
> a standard protocol because it is only a layer of abstract
> build on a standard client server, is the only reason
> why samba as is works.

Huh?  That made *no* sense to me.

MSRPC, as used on top of SMB (or sometimes without it) is *not* a standard
protocol.  It is a fairly standardized mechanism, but the proceedure calls
are not documented, are changed on a whim, and are *a completely separate
layer*.  What Simo is talking about (I believe) is that Samba had to
implement additional layers on top of SMB in order to maintain
compatibility.  It is in everyone's benefit to limit the layers on top of
layers on top of layers we already have.  Keep in mind that SMB already
runs on top of NBT (yet another layer).  Samba must now support MS-RPC on
top of named pipes on top of SMB on top of NBT on top of IP. 

> To follow your logic
> to its extram "why use the kernels api for writing packets,
> we might as well right them direct to the card." :)

Some systems do this already.  High-speed (Gbit and 10Gbit cards) in
particular.  The model is similar to using OpenGL function calls to a
video card.  This type of distributed computing is *very* common and goes
back a long way.  The Amiga did it with custom chips, before that 
Mainframes used to have custom networking hardware that would handle 
protocol layers.  The early IBM/Sytec PC-Network LANA cards had NetBIOS 
*on the card* (though I believe that the NetBIOS code itself was still 
exectued by the main CPU).

So... "why use the kernels api for writing packets, we might as well right
them direct to the card."  Yes.  People do this.  It's not as unusual as 
you think.

> (*1) even thought I did point it out as well, I think
> before Luke was even on the team before the split.

...but it does not argue against Simo's point at all.

Chris -)-----

Christopher R. Hertel -)-----                   University of Minnesota
crh at              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz

More information about the samba-technical mailing list