HOWTO: get familar with the Samba source code
gcarter at valinux.com
Thu Sep 28 04:51:35 GMT 2000
for anyone interested in getting up to speed with SMB/CIFS,
NetBIOS, MS-RPC, etc... Here's some links to help out.
I will add this to the FAQ.
* Which branch should I be looking at?
Look at TNG for specific RPC implementations. However,
enhancements should be coded for HEAD. For more
information on getting Samba source code via CVS,
* How can I learn more about CIFS, MS-RPC, Samba
o get a copy of MS network monitor (legally). Even the
one with the NT server is ok. We can convert
tcpdump format to CAP format). This is the best
network sniffer for decoding SMB/MS-RPC.
Ethereal (www.zing.org) has some code for
parsing SMB/NetBIOS and I think Andrew and Tim
are adding some MS-RPC support in it.
o See the docs at
o get a copy of Luke's book with New Riders Publishing
"DCE/RPC over SMB: Samba and Windows NT Domain
Internals" or something like that.
o get a symbolic debugger (gdb, ddd, ups, etc...) and
step through the smbd source code as it is running
in response to a SMB call (or RPC) that you are
o The MSDN site (msdn.microsoft.com) is pretty good
as well if you know what you are looking for
My personal preference is for a debugger alongside
the protocol specs and a netmon session. :-)
* Which editor should I use?
As far as what editor to use, it is your preference.
Obviously is needs to be one that doesn't much up
formatting automatically (just to help you out). :-)
I use RedHat's Source Navigator which does generate
**huge** cross reference databases but let's you get
around in the code fairly well. See
for a download link.
Of course, vi and grep will get you there too. :-)
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com VA Linux Systems gcarter at valinux.com
http://www.samba.org SAMBA Team jerry at samba.org
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
More information about the samba-ntdom