Commit 7bf40330 authored by Christopher R. Hertel's avatar Christopher R. Hertel 🤺
Browse files

Initializing the repository.

parents
*.py kwsub=true
*.dox kwsub=true
*.[ch] kwsub=true
0.README kwsub=true
*.o
*.a
*.pyc
*.pyo
html/
templates/
Zambezi
-------
A low-level SMB2/3 message handling library.
This project encapsulates the marshalling and unmarshalling of SMB2/3
messages.
The goal is to create a basic library, with a sensible API, that can
provide the foundation layer of an SMB2/3 client or server implementation.
Licenses
--------
TBD
Licensing Philosophy
--------------------
TBD
Words
-----
CIFS:: Common Internet File System. +
CIFS is the "marketing upgrade" name that was bestowed upon the SMB
protocol in the mid-1990's. For a while, there was speculation that
a new dialect of SMB would be released with Windows 2000, but that
never actually happened. Instead of being forward-looking, CIFS
became an intermim name for what we now call SMB1 (see below). The
term CIFS is now considered dead. Microsoft doesn't use it any
more, except in older documentation or references to legacy
implementations. The term is still popular among sales engineers.
NBT:: NetBIOS over TCP transport protocol. +
NBT is the virtual LAN protocol specified by IETF Standard #19,
which consists of RFC1001 and RFC1002. NBT provides a mechanism for
supporting the semantics of the NetBIOS API over TCP/UDP/IP
internetworks. (See [NBGUIDE], [IMPCIFS], [RFC1001], and [RFC1002].)
SMB:: Server Message Block protocol. +
SMB was originally created by IBM in the early 1980's for use with
PC-DOS. It was later updated and extended for use with OS/2, and
marketed under the name LAN Manager. OS/2 LAN Manager was
eventually ported to Windows NT, where it was called NT LAN Manager
(NTLM). The ported dialect was identified as "NT LM 0.12".
SMB1:: Server Message Block protocol, Version 1. +
Also known as SMBv1, CIFS, or "NT LM 0.12"; SMB1 is the designation
given to the "NT LM 0.12" dialect of the original SMB protocol as
implemented in all versions of Windows since Windows NT 3.51. The
SMB1 name may be thought of as excluding older OS/2 LAN Manger and
DOS versions of SMB, except that the Windows NT LAN Manager
implementation is (mostly) backward compatible with those older
versions. (See [MS-CIFS]. Changes to SMB1 between Windows NT4 and
all subsequent Windows versions are documented in [MS-SMB].)
SMB2:: Server Message Block protocol, Version 2. +
SMB2 is not a dialect of SMB1, it is a different protocol. It does,
however, share many characteristics with SMB1. SMB2 was introduced
in Windows Vista. This original release was not particularly
ambitious, and its existence was hardly noticed at the time.
SMBv2.1 was released with Windows 7. SMB2.2 was scheduled for
release with Windows 8, but see the description of SMB3. (See
[MS-SMB2].)
SMB3:: Server Message Block protocol, Version 3. +
SMB3 is, in fact, a set of newer dialects of SMB2. SMB3 was
originally intended to be released as SMB version 2.2 but it
contained a number of significant new features and so was re-dubbed
SMB3 (another "marketing upgrade"). SMB3 supports I/O over RDMA as
well as scale-out and failover clustering. SMB3 is documented in
[MS-SMB2].
References
----------
All of the references listed below are available online.
[IMPCIFS]:: Hertel, Christopher R., "Implementing CIFS - The Common Internet
File System", Prentice Hall, August 2003, ISBN:013047116X,
http://www.ubiqx.org/cifs/
[MS-CIFS]:: Microsoft Corporation, "Common Internet File System (CIFS)
Protocol Specification",
http://msdn.microsoft.com/en-us/library/ee442092.aspx
[MS-DFSC]:: Microsoft Corporation, "Distributed File System (DFS): Referral
Protocol Specification",
http://msdn.microsoft.com/en-us/library/cc226982.aspx
[MS-SMB]:: Microsoft Corporation, "Server Message Block (SMB) Protocol
Specification",
http://msdn.microsoft.com/en-us/library/cc246231.aspx
[MS-SMB2]:: Microsoft Corporation, "Server Message Block (SMB) Protocol
Versions 2 and 3",
http://msdn.microsoft.com/en-us/library/cc246482.aspx
[NBGUIDE]:: Winston, Gavin, "NetBIOS Specification", 1998-2012,
https://web.archive.org/web/20170912115941/http://netbiosguide.com/
(Archived)
[RFC1001]:: Network Working Group, "Protocol Standard for a NetBIOS Service
on a TCP/UDP Transport: Concepts and Methods", STD 19, RFC 1001,
March 1987, http://www.ietf.org/rfc/rfc1001.txt
[RFC1002]:: Network Working Group, "Protocol Standard for a NetBIOS Service
on a TCP/UDP Transport: Detailed Specifications", STD 19, RFC
1002, March 1987, http://www.ietf.org/rfc/rfc1002.txt
Naming
------
Zambezi is the name of a river in Africa, and possibly the name of a
forgotten twelfth century poet^1^. Neither of these facts are relevant.
The project just needed a name. (Ep39s7.)
*"What's in a name? A rose by any other name would wither and die."*
-- Alan Swann (Peter O'Toole),
[My Favorite Year](https://en.wikipedia.org/wiki/My_Favorite_Year), 1982
--
^1^Probably not.
Epitath
-------
You have been eaten by a grue.
Timestamp
---------
$Id$
This diff is collapsed.
This diff is collapsed.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
0.README
\ No newline at end of file
# Zambezi.dox
#
# This file provides the text of the main page of the Doxygen documentation
# for the Zambezi project.
#
/**
@mainpage Zambezi - A Base-Level SMB2/3 Toolkit
This Zambezi is a thing, with stuff.
\n\b Thing: A base-layer SMB2 and SMB3 protocol stack toolkit.
\n\b Stuff: Code and documentation. Lots of documentation.
Introduction
============
\b SMB stands for <b>S</b>erver <b>M</b>essage <b>B</b>lock. SMB is a
<em>network file protocol</em>; it provides client computers with shared
access to files and directorys across a network.
SMB was created in the early 1980's by Dr. Barry Feigenbaum at IBM.\n
It was originally written to work with PC-DOS. Over the years, it was enhanced
to support OS/2 and Windows/NT. By the early 2000's, however, the original
SMB had become bloated, overweight, and petulant.
So SMB2 was created. SMB2 was both a do-over. It did not include all of the
excess DOS and OS/2 cruft that had accumulated in SMB1. SMB2 focused instead
on MS-Windows. SMB2 has only ¼th as many commands as SMB1.
Then SMB3 came along. As you might expect, SMB3 was an entirely new, more
streamlined, and elegant protocol. You'd expect wrong, however. SMB3 was just
SMB2 with additional features. Those features, however, were impressive. SMB3
provides improved speed and reliability, and support for SMB clusters.
Implementing all of this can be a lot of work, though there are several
third-parties that have given it a whirl. This project attempts to make the
process easier by providing a low-level toolkit that encapsulates the
marshalling and unmarshalling of SMB2/3 messages. The goal is to create a
basic library, with a sensible API, that can provide the foundation layer of an
SMB2/3 client or server implementation.
Licenses
--------
The source code is provided under two licenses.
-# Except for unit tests, code that compiles into a runable program will
typically be licensed under the GNU Affero General Public License.
-# Code that is intended to be part of the Zambezi library, and the
Doxygen documentation generated by that code, will typically be licensed
under the GNU Lesser General Public License.
These are general guidelines. The individual files will contain license
statements as shown below.
\b Programs
This program is part of Zambezi.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
<b>Library and Associated Documentation</b>
This file is part of Zambezi.
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3.0 of the License, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library. If not, see <http://www.gnu.org/licenses/>.
Licensing Philosophy
--------------------
The plan is to submit the API developed by this project to a standardization
process, which will likely result in a modified (hopefully, improved) API.
This code would then be updated to match the new API, and would become a
reference implementation. The reference implementation, in turn, would be
released under an additional license that would make it suitable for widespread
adoption across a wide spectrum of implementations.
In other words, if all of the pieces fall into place, this code will be
released under two licenses. Don't send in any patches unless you're okay with
that.
Words
=====
<dl>
<dt>CIFS</dt><dd><b>C</b>ommon <b>I</b>nternet <b>F</b>ile <b>S</b>ystem.\n
CIFS is the "marketing upgrade" name that was bestowed upon the SMB
protocol in the mid-1990's. For a while, there was speculation that a
new dialect of SMB would be released with Windows 2000, but that never
actually happened. Instead of being forward-looking, CIFS became an
intermim name for what we now call SMB1 (see below). The term CIFS is
now considered dead. Microsoft doesn't use it any more, except in older
documentation or references to legacy implementations. The term is still
popular among sales engineers.
</dd>
<dt>NBT</dt><dd><b>N</b>et<b>B</b>IOS over <b>T</b>CP transport protocol.\n
NBT is the virtual LAN protocol specified by IETF Standard #19, which
consists of RFC1001 and RFC1002. NBT provides a mechanism for
supporting the semantics of the NetBIOS API over TCP/UDP/IP
internetworks. (See [NBGUIDE], [IMPCIFS], [RFC1001], and [RFC1002].)
</dd>
<dt>SMB</dt><dd><b>S</b>erver <b>M</b>essage <b>B</b>lock protocol.\n
SMB was originally created by IBM in the early 1980's for use with
PC-DOS. It was later updated and extended for use with OS/2, and
marketed under the name LAN Manager. OS/2 LAN Manager was eventually
ported to Windows NT, where it was called NT LAN Manager (NTLM). The
ported dialect was identified as "NT LM 0.12".
</dd>
<dt>SMB1</dt><dd>Server Message Block protocol, Version <b>1</b>.\n
Also known as SMBv1, CIFS, or "NT LM 0.12"; SMB1 is the designation
given to the "NT LM 0.12" dialect of the original SMB protocol as
implemented in all versions of Windows since Windows NT 3.51. The SMB1
name may be thought of as excluding older OS/2 LAN Manger and DOS
versions of SMB, except that the Windows NT LAN Manager implementation
is (mostly) backward compatible with those older versions. (See
[MS-CIFS]. Changes to SMB1 between Windows NT4 and all subsequent
Windows versions are documented in [MS-SMB].)
</dd>
<dt>SMB2</dt><dd>Server Message Block protocol, Version <b>2</b>.\n
SMB2 is not a dialect of SMB1, it is a different protocol. It does,
however, share many characteristics with SMB1. SMB2 was introduced in
Windows Vista. This original release was not particularly ambitious,
and its existence was hardly noticed at the time. SMBv2.1 was released
with Windows 7. SMB2.2 was scheduled for release with Windows 8, but
see the description of SMB3. (See [MS-SMB2].)
</dd>
<dt>SMB3</dt><dd>Server Message Block protocol, Version <b>3</b>.\n
SMB3 is just a set of newer dialects of SMB2. SMB3 was originally
intended to be released as SMB version 2.2 but it contained a number of
significant new features and so was re-dubbed SMB3 (another "marketing
upgrade"). SMB3 supports I/O over RDMA as well as scale-out and
failover clustering. SMB3 is documented in [MS-SMB2].
</dd>
</dl>
References
==========
<dl>
<dt>[[IMPCIFS]](http://www.ubiqx.org/cifs/)</dt>
<dd>Hertel, Christopher R., "Implementing CIFS - The Common Internet File
System", Prentice Hall, August 2003, ISBN:013047116X,
http://www.ubiqx.org/cifs/
</dd>
<dt>[[MS-CIFS]](@msdocs/ms-cifs/d416ff7c-c536-406e-a951-4f04b2fd1d2b)</dt>
<dd>Microsoft Corporation, "Common Internet File System (CIFS) Protocol
Specification", http://msdn.microsoft.com/en-us/library/ee442092.aspx
</dd>
<dt>[[MS-DFSC]](@msdocs/ms-dfsc/3109f4be-2dbb-42c9-9b8e-0b34f7a2135e)</dt>
<dd>Microsoft Corporation, "Distributed File System (DFS): Referral
Protocol Specification",
http://msdn.microsoft.com/en-us/library/cc226982.aspx
</dd>
<dt>[[MS-SMB]](@msdocs/ms-smb/f210069c-7086-4dc2-885e-861d837df688)</dt>
<dd>Microsoft Corporation, "Server Message Block (SMB) Protocol
Specification", http://msdn.microsoft.com/en-us/library/cc246231.aspx
</dd>
<dt>[[MS-SMB2]](@msdocs/ms-smb2/5606ad47-5ee0-437a-817e-70c366052962)</dt>
<dd>Microsoft Corporation, "Server Message Block (SMB) Protocol Versions 2
and 3", http://msdn.microsoft.com/en-us/library/cc246482.aspx
</dd>
<dt>[[NBGUIDE]](
https://web.archive.org/web/20170912115941/http://netbiosguide.com/)</dt>
<dd>Winston, Gavin, "NetBIOS Specification", 1998-2012,
https://web.archive.org/web/20170912115941/http://netbiosguide.com/
</dd>
<dt>[[RFC1001]](http://www.ietf.org/rfc/rfc1001.txt)</dt>
<dd>Network Working Group, "Protocol Standard for a NetBIOS Service on a
TCP/UDP Transport: Concepts and Methods", RFC 1001, STD 19, March
1987, http://www.ietf.org/rfc/rfc1001.txt
</dd>
<dt>[[RFC1002]](http://www.ietf.org/rfc/rfc1002.txt)</dt>
<dd>Network Working Group, "Protocol Standard for a NetBIOS Service on a
TCP/UDP Transport: Detailed Specifications", RFC 1002, STD 19, March
1987, http://www.ietf.org/rfc/rfc1002.txt
</dd>
</dl>
Naming
======
Zambezi is the name of a river in Africa, and possibly the name of a forgotten
twelfth century antarctic poet. Neither of these facts are relevant. The
project just needed a name. (Ep39s7.)
<em>"What's in a name? A rose by any other name would wither and die."</em>\n
-- Alan Swann (Peter O'Toole),
[My Favorite Year](https://en.wikipedia.org/wiki/My_Favorite_Year), 1982
Epitath
-------
You have been eaten by a grue.
----
$Id$
*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment