<?xml version='1.0'?>
<chapter>
<title>NetBIOS, NetBEUI, NetBIOS Frames Protocol</title>
<section>
<title>Overview</title>
<para>The use of NetBIOS, (otherwise known as NetBEUI, NetBIOS Frames Protocol, NBF) is not a popular choice.  Many networks use some form of encapsulation with the most popular being TCP/IP.  It is important to understand that the various encapsulation implementations are designed to emulate the use of NetBIOS "on the wire"; the goal is to allow higher level protocols (such as SMB or CIFS) or applications to make use of the NetBIOS protocol irrespective of whether it is running "on the wire" or encapsulated.  Thus in order to fully understand implementations that use encapsulation, it is necessary to understand "NetBIOS on the wire".
</para>
<para>It is not clear whether there is only one protocol or several protocols 
involved in NetBIOS networking. The original implementation for the PC Network 
certainly seemed to have the following protocols: Name Management protocol (NMP), Diagnostic and Monitoring Protocol (DMP), User Datagram Protocol (UDP) and Session Management Protocol (SMP). 
The distinction is less clear with NetBIOS on Token-Ring and other 
Implementations; the official IBM documentation
<citation>IBM LAN Technical Reference
IEEE 802.2 and NetBIOS Application Program Interfaces
</citation>
simply describes a collection of 22 frame formats,
see <xref linkend='NBF-NBFFrames'/>
. Given that at least network layer and session layer functions 
are involved, the various packets used will be discussed in terms of the 
original protocols for convenience, even if the distinctions are somewhat 
arbitrary.
</para>
<table frame='all' id='NBF-NBFFrames'>
<title>NBF Frames</title>
<tgroup cols='2'>
<thead>
<row>
<entry>Frame name</entry>
<entry>Command code</entry>
</row>
</thead>
<tbody>
<row>
<entry>ADD_NAME_QUERY</entry>
<entry>0x01</entry>
</row>
<row>
<entry>ADD_GROUP_NAME</entry>
<entry>0x00</entry>
</row>
<row>
<entry>ADD_NAME_RESPONSE</entry>
<entry>0x0D</entry>
</row>
<row>
<entry>NAME_IN_CONFLICT</entry>
<entry>0x02</entry>
</row>
<row>
<entry>NAME_QUERY</entry>
<entry>0x0A</entry>
</row>
<row>
<entry>NAME_RECOGNISED</entry>
<entry>0x0E</entry>
</row>
<row>
<entry>DATAGRAM</entry>
<entry>0x08</entry>
</row>
<row>
<entry>DATAGRAM_BROADCAST</entry>
<entry>0x09</entry>
</row>
<row>
<entry>STATUS_QUERY</entry>
<entry>0x03</entry>
</row>
<row>
<entry>STATUS_RESPONSE</entry>
<entry>0x0F</entry>
</row>
<row>
<entry>TERMINATE_TRACE</entry>
<entry>0x07</entry>
</row>
<row>
<entry>TERMINATE_TRACE local and remote</entry>
<entry>0x13</entry>
</row>
<row>
<entry>SESSION_ALIVE</entry>
<entry>0x1F</entry>
</row>
<row>
<entry>SESSION_CONFIRM</entry>
<entry>0x17</entry>
</row>
<row>
<entry>SESSION_END</entry>
<entry>0x18</entry>
</row>
<row>
<entry>SESSION_INITIALIZE</entry>
<entry>0x19</entry>
</row>
<row>
<entry>DATA_ACK</entry>
<entry>0x14</entry>
</row>
<row>
<entry>DATA_FIRST_MIDDLE</entry>
<entry>0x15</entry>
</row>
<row>
<entry>DATA_ONLY_LAST</entry>
<entry>0x16</entry>
</row>
<row>
<entry>NO_RECEIVE</entry>
<entry>0x1A</entry>
</row>
<row>
<entry>RECEIVE_OUTSTANDING</entry>
<entry>0x1B</entry>
</row>
<row>
<entry>RECEIVE_CONTINUE</entry>
<entry>0x1C</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
NetBIOS systems communicate in one of two manners; the protocols are often described as Session layer 
protocols because most of the communications occur over sessions established between two nodes on the 
network.  The other form of communication does not involve sessions and uses a simple datagram 
transmission mechanism for simple communications between systems on a network.  
Non-session frames are used for functions such as name management or other
functions that simply require a datagram delivery service.
In general when one system needs to communicate with another it will contact that 
system and a session will be established between the two nodes; the session will 
be maintained as long as either node needs to communicate until one of the nodes 
closes the session.
</para>
<para>
Sessions are established using an exchange of packets.  The station wishing to 
establish the session sends an Open request that should be responded to with an Open 
acknowledgment.  The station initiating the session will then send a Session request 
which will elicit either a Session accept or Session reject.
</para>
<para>
Data is transmitted using an established session through the sending system sending data packets 
which are responded to with either acknowledgment packets (ACK) or negative 
acknowledgment packets (NACK) prompting re-transmission.
</para>
<para>
Sessions are closed by the system that received data sending a close request that should be 
responded to by the system that initiated the session sending a close response. 
This is followed by the system that received data sending a packet indicating that the 
session is closed.
</para>
<para>
Obviously in order to communicate, systems need an address scheme and this is described 
in <xref linkend='nbf-addressing'/>.
</para>
</section>
<section id='nbf-addressing'>
<title>Addressing - NetBIOS names</title>
<para>To communicate, each node (computer, printer, router etc) needs to be uniquely
identified on a network. Within the TCP/IP suite of protocols, under the
IPv4 address scheme, a 32 bit address identifies each node and the network
it is connected to. In IPX/SPX networks, a 48 bit address identifies a
node on a network and a 32 bit address identifies each network.  In NetBIOS
networks names are used by each node.
</para>
<para>NetBIOS names are 16 bytes (128 bits) long (padded if necessary) and there are
very few restraints on the byte values that can be used. Non-alphanumeric
characters can be used in NetBIOS names, although some implementations
may not support this and applications using NetBIOS may impose other
constraints.
</para>
<para>Often an implementation will make use of the 16th byte, for example
to indicate a particular service; thus the 16th byte may be used in a way
which is broadly analogous to port numbers in TCP/IP.
</para>
<para>It is worth noting that SMB / CIFS names map directly on to NetBIOS names and in
this case the 16th byte is particularly important for identifying various
services.
</para>
<para>Microsoft has produced a Knowledge Base Article that lists the NetBIOS
suffixes (i.e. the sixteenth byte) that Microsoft uses or supports.</para>
<para>The Knowledge Base Article is Q163409 and can be found at
<ulink url='http://support.microsoft.com/default.aspx?scid=kb;en-us;Q163409'>http://support.microsoft.com/default.aspx?scid=kb;en-us;Q163409</ulink></para>
<para>Some examples of the 16th byte in Unique names are given below:
</para>
<table>
<title>Example Unique names</title>
<tgroup cols='2'>
<thead>
<row>
<entry>16th byte (in hex)</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>00</entry>
<entry>Workstation service</entry>
</row>
<row>
<entry>01</entry>
<entry>Messenger service</entry>
</row>
<row>
<entry>20</entry>
<entry>File server service</entry>
</row>
<row>
<entry>2B</entry>
<entry>Lotus Notes Server Service</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
NetBIOS names represent a flat name space; names are non-hierarchical
with no provision for subdivision. Because there is no provision for identifying
networks with the NetBIOS name scheme, protocols using this name scheme
can not be routed.
</para>
<para>
A NetBIOS name is often associated with one end of a session between
two nodes.
</para>
<para>
A station on the network can be known by several names (aliases) originally
up to 12 (See
BYTE Magazine November 1989 "Two tin cans and some string" Part 2
<xref linkend='refs-References'/>
)
or 17
names
(See BYTE Magazine January 1989 "Understanding NetBIOS"
<xref linkend='refs-References'/>)
.  Modern implementations allow very many
names to be used.
Names can be unique names reserved for
the station's exclusive use or group names shared with other stations.
</para>
<section>
<title>Group Names</title>
<para>
Group Names are NetBIOS names that several stations can use.  Each Group
Name must be unique and in many situations must be distinct from any unique
(node) names.  These names allow stations to be grouped together to facilitate
management and browsing of the network.  Stations can send broadcast messages
to all stations that share a particular group name.
</para>
<para>
Within SMB / CIFS environments, collections of systems such as workgroups or
domains map on to NetBIOS Group names.
</para>
</section>
<section>
<title>Name Resolution</title>
<para>
One name is the permanent node name, which is the physical adapter card's
name; this is usually derived from the Media Access Control (MAC) address
of the card i.e. the hardware address and consists of 10 bytes of zeros followed
by the 6 bytes of the MAC address. This special permanent node name is
often called "NETBIOS_NAME_1". It is because one of the names incorporates
the physical MAC address (and because there is only one network) that there
is often no name resolution protocol (analogous to the Address Resolution
Protocol ARP in TCP/IP networks).
</para>
<para>
When NetBIOS is encapsulated within other protocols such as IPX/SPX or TCP/IP
there is a mechanism for mapping NetBIOS names to the address schemes of the
encapsulating protocol.  See
<xref linkend='encap-encap'/>
Encapsulation.
</para>
</section>
</section>
<section id='nmp-NMP'>
<title>Name Management Protocol</title>
<para>
The Name Management Protocol (NMP) allows systems to create unique symbolic
names that are visible on the network. NMP has some similarities with
the AppleTalk Name Binding Protocol: The Name Management Protocol broadcasts
a system's intention to use a new name and if no other system objects,
the name is registered. NetBIOS broadcasts a name claim packet several
times and if no other station contests the name claim the name is added
to the local name table. Typically the packets are sent at half second
intervals six times, although in principal these parameters can be tuned.
Often a node will require three seconds to check each name it is using.
</para>
<para>
The original Name Management Protocol is described in
<xref linkend='nbibmpc-NetBIOS-IBM-PC-Network'/> 
<!--	Appendix: NetBIOS protocols in IBM PC Network -->
in the section
<xref linkend='nbibmpc-NMPIBMPC'/>
<!--	Name Management Frames in IBM PC Networks -->
.
</para>
<para>
In the NetBIOS Frames Protocol on 802.2 networks there are four non-session
level Name Management Frames. As described in 
<xref linkend='nbf-addressing'/>
 there are two kinds of names: unique names and group
names.
</para>
<itemizedlist>
<listitem>
<para>
The "ADD NAME QUERY" frame (0x01) is used by a node to verify that the
name it wishes to add is unique within the network.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x01 identifying it
as an "ADD NAME QUERY" frame.
</para>
<para>
Five reserved octets are followed by a two byte response correlator, transmitted
byte reversed, created by the sender and used to correlate any responses to the
query.  The next sixteen octets, used for the destination name in other frames,
are reserved in this case. The following sixteen octets for the source name are
used to identify the name to be added.
</para>
</listitem>
<listitem>
<para>
The "ADD GROUP NAME" frame (0x00) is used by a node to verify that the
group name does not exist as a unique name within the network.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x00 identifying it
as an "ADD GROUP NAME QUERY" frame.
</para>
<para>
Five reserved octets are followed by a two byte response correlator, transmitted
byte reversed, created by the sender and used to correlate any responses to the
query.  The next sixteen octets, used for the destination name in other frames,
are reserved in this case. The following sixteen octets for the source name are
used to identify the group name to be added.
</para>
<para>
The "ADD NAME RESPONSE" frame (0x0D) is used in response to one of the
above query frames to inform the node wishing to add the name that the
name is already in use.  The "ADD NAME RESPONSE" frame (0x0D) is used in response to one of the
above query frames to inform the node wishing to add the name that the
name is already in use.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x0D identifying it
as an "ADD NAME RESPONSE" frame.
</para>
<para>
The next octet, the "DATA1" octet is set
to 1 or 0; 0 = "add name not in process", 1 = "add name in process". The
next two bytes, known as "DATA2", constitutes a define word set to 0 or
1; 0 = "unique name, 1 = "group name"; this is transmitted byte reversed.
The next two bytes constitute a
correlator, transmitted byte reversed, used to correlate the response with 
the original query. Two
reserved octets are followed by sixteen octets holding the name to be added
and a further sixteen octets which again hold the name to be added.
</para>
</listitem>
<listitem>
<para>
The "NAME IN CONFLICT" frame (0x02) is used to indicate a problem with
names on the network; it is sent if more than one adapter has the same
unique name registered or a name is registered as both a unique name and
a group name.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x02 identifying it
as an "NAME IN CONFLICT" frame.
</para>
<para>
Seven reserved octets are followed by sixteen
octets representing the name in conflict. The final sixteen octets represent
the special "NAME NUMBER 1" of the node sending the frame.
</para>
<para>
The "ADD NAME QUERY" frame (0x01) is used by a node to verify that the name it
wishes to add is unique within the network.
</para>
</listitem>
</itemizedlist>
<table frame='all'>
<title>
Name Management Frames (Octets in order transmitted.)
</title>
<tgroup cols='6'>
<colspec colname='c1'/>
<colspec colname='c2'/>
<spanspec spanname='hspan1' namest='c1' nameend='c2'/>
<thead>
<row>
<entry spanname='hspan1'></entry>
<entry>Management frame</entry>
<entry>Management frame</entry>
<entry>Management frame</entry>
<entry>Management frame</entry>
</row>
<row>
<entry>Field Name</entry>
<entry>Length</entry>
<entry>ADD GROUP NAME QUERY</entry>
<entry>ADD NAME QUERY</entry>
<entry>ADD NAME RESPONSE</entry>
<entry>NAME IN CONFLICT</entry>
</row>
</thead>
<tbody>
<row>
<entry morerows='1'>Length</entry>
<entry morerows='1'>2</entry>
<entry>0x2C</entry>
<entry>0x2C</entry>
<entry>0x2C</entry>
<entry>0x2C</entry>
</row>
<row>
<entry>0x00</entry>
<entry>0x00</entry>
<entry>0x00</entry>
<entry>0x00</entry>
</row>
<row>
<entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF</entry>
<entry>0xFF</entry>
<entry>0xFF</entry>
<entry>0xFF</entry>
</row>
<row>
<entry>0xEF</entry>
<entry>0xEF</entry>
<entry>0xEF</entry>
<entry>0xEF</entry>
</row>
<row>
<entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x00</emphasis></entry>
<entry><emphasis>0x01</emphasis></entry>
<entry><emphasis>0x0D</emphasis></entry>
<entry><emphasis>0x02</emphasis></entry>
</row>
<row>
<entry>Data 1</entry>
<entry>1</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>0 or 1</entry>
<entry>Reserved</entry>
</row>
<row>
<entry morerows='1'>Data 2</entry>
<entry morerows='1'>2</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>0 or 1</entry>
<entry>Reserved</entry>
</row>
<row>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>0</entry>
<entry>Reserved</entry>
</row>
<row>
<entry morerows='1'>XMIT Cor</entry>
<entry morerows='1'>2</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>nn</entry>
<entry>Reserved</entry>
</row>
<row>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>nn</entry>
<entry>Reserved</entry>
</row>
<row>
<entry morerows='1'>RSP Cor</entry>
<entry morerows='1'>2</entry>
<entry>nn</entry>
<entry>nn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
</row>
<row>
<entry>nn</entry>
<entry>nn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
</row>
<row>
<entry>Destination Name</entry>
<entry>16</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>Name to be added</entry>
<entry>Name in conflict</entry>
</row>
<row>
<entry>Source Name</entry>
<entry>16</entry>
<entry>Group name to add</entry>
<entry>Name to add</entry>
<entry>Name to be added</entry>
<entry>NAME NUMBER 1</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
In the NetBIOS Frames Protocol on 802.2 networks there are two frames used
for managing names in session establishment.  Although not part of name
management, these frames are included here for convenience.
</para>
<itemizedlist>
<listitem>
<para>
The "NAME QUERY" frame (0x0A) is used to find a name on the network or
to request a remote node to establish a session.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x0A identifying it
as an "NAME QUERY" frame.
</para>
<para>
Following the "DATA1" field which is reserved,
the two octets of the "DATA2" field are set to "ttss" where "tt" indicates
the type of name being called, 00 for a unique name and 01 for a group
name; "ss" is used to indicate the session number.    
The "DATA2" field is transmitted byte reversed. 
Two reserved octets
are followed by a two byte response correlator, transmitted byte reversed.
Sixteen octets identify
the name being called. The final sixteen octets identify the name of the
node making the call.
</para>
</listitem>
<listitem>
<para>
The "NAME RECOGNISED" frame (0x0E) is used in response to a NAME QUERY frame to
indicate that a session can be established with the name or to provide the
location of the name.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x0E identifying it
as an "NAME RECOGNISED" frame.
</para>
<para>
Following the "DATA1" field which is reserved, the two bytes of the "DATA2"
field are set to "ttss" where "tt" is set to 0x00 to indicate a unique recognized
name or 0x01 to indicate a unique recognized group name.  the type of name being
called, 00 for a unique name and 01 for a group "ss" is used to indicate the
"state" of the name: 0x00 is used when the station is not listening for this
name, 0xFF is used when the station is listening for this name, but can not
establish a session, 0x01 to 0xFE are used as a number which will identify this
session.  The "DATA2" field is transmitted byte reversed.
</para>
<para>
A two byte transmit correlator is used to correlate the response with the
NAME QUERY frame.  This is followed by a two byte response correlator used with
SESSION INITIALIZE frames; these fields are transmitted byte reversed.
Sixteen octets identify the name of the node making the NAME QUERY call. The
final sixteen octets identify the name being queried. 
</para>
</listitem>
</itemizedlist>
<table frame='all'>
<title>
Frames for managing names in session establishment (Octets in order transmitted).
</title>
<tgroup cols='4'>
<colspec colname='c1'/>
<colspec colname='c2'/>
<spanspec spanname='hspan1' namest='c1' nameend='c2'/>
<thead>
<row>
<entry spanname='hspan1'></entry>
<entry>Management frame</entry>
<entry>Management frame</entry>
</row>
<row>
<entry>Field Name</entry>
<entry>Length</entry>
<entry>NAME QUERY</entry>
<entry>NAME RECOGNISED</entry>
</row>
</thead>
<tbody>
<row>
<entry morerows='1'>Length</entry>
<entry morerows='1'>2</entry>
<entry>0x2C</entry>
<entry>0x2C</entry>
</row>
<row>
<entry>0x00</entry>
<entry>0x00</entry>
</row>
<row>
<entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF</entry>
<entry>0xFF</entry>
</row>
<row>
<entry>0xEF</entry>
<entry>0xEF</entry>
</row>
<row>
<entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x0A</emphasis></entry>
<entry><emphasis>0x0E</emphasis></entry>
</row>
<row>
<entry>Data 1</entry>
<entry>1</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
</row>
<row>
<entry morerows='1'>Data 2</entry>
<entry morerows='1'>2</entry>
<entry>X ss</entry>
<entry>X ss</entry>
</row>
<row>
<entry>X tt</entry>
<entry>X tt</entry>
</row>
<row>
<entry morerows='1'>XMIT Cor</entry>
<entry morerows='1'>2</entry>
<entry>Reserved</entry>
<entry>nn</entry>
</row>
<row>
<entry>Reserved</entry>
<entry>nn</entry>
</row>
<row>
<entry morerows='1'>RSP Cor</entry>
<entry morerows='1'>2</entry>
<entry>nn</entry>
<entry>nn</entry>
</row>
<row>
<entry>nn</entry>
<entry>nn</entry>
</row>
<row>
<entry>Destination Name</entry>
<entry>16</entry>
<entry>Name of receiver</entry>
<entry>Name of receiver</entry>
</row>
<row>
<entry>Source Name</entry>
<entry>16</entry>
<entry>Name of sender</entry>
<entry>Name of sender</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
<section>
<title>User Datagram Protocol</title>
<para>
The NetBIOS User Datagram Protocol (UDP) provides packet transmission from
source to destination. UDP is an unreliable datagram delivery protocol.
</para>
<para>
NetBIOS User Datagram Protocol is comparable with the Datagram Delivery
Protocol (DDP) in AppleTalk, or IP in the TCP/IP suite of protocols, or
IPX in Novell's IPX/SPX protocol suite. It is important to note that the
NetBIOS User Datagram Protocol differs from datagram protocols in other
protocol suites; the NetBIOS User Datagram Protocol is designed specifically
to provide a datagram delivery service and not necessarily to provide a
foundation for higher level protocols. Where as in other protocol suites
the datagram protocol supports transport and session layer protocols running
over the datagram protocol, here there is a separate Session Management
Protocol which does not make use of the NetBIOS User Datagram Protocol.
The relationship is illustrated in the
<xref linkend='osi-OSI'/>
.
</para>
<para>
UDP packets are sent between Named systems 
(see <xref linkend='nbf-addressing'/> above)
or are broadcast from one Named system to all Names on the network.
</para>
<para>
The original User Datagram Protocol is described in
<xref linkend='nbibmpc-NetBIOS-IBM-PC-Network'/>
in the section
<xref linkend='nbibmpc-UDPIBMPC'/>
.
</para>
<section>
<title>
NetBIOS Non-Session Frames on 802.2 networks
</title>
<itemizedlist>
<listitem>
<para>
The "DATAGRAM" frame (0x08) is used to send a datagram to a name.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x08 identifying it
as an "DATAGRAM" frame.
</para>
<para>
Seven reserved octets are followed by sixteen octets
used to identify the destination name of the datagram. The following sixteen
octets identify the
source name sending the datagram.  A variable number of octets contain the 
data or payload of the datagram.
</para>
</listitem>
<listitem>
<para>
The "DATAGRAM BROADCAST" frame (0x09) is used to broadcast a datagram to all
names on the network.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x09 identifying it
as an "DATAGRAM" frame.
</para>
<para>
Seven reserved octets are followed by a further sixteen octets which
are also reserved rather than identifying the destination
name as in the case of "DATAGRAM" frames. The following sixteen
 octets identify the
source name sending the datagram.  A variable number of octets contain the 
data or payload of the datagram.
</para>
</listitem>
</itemizedlist>
<table frame='all'>
<title>Datagram frames (Octets in order transmitted.)</title>
<tgroup cols='4'>
<thead>
<row><entry></entry>
<entry></entry>
<entry>Data frame</entry>
<entry>Data frame</entry>
</row>
<row><entry>Field Name</entry>
<entry>Length</entry>
<entry>DATAGRAM</entry>
<entry>DATAGRAM BROADCAST</entry>
</row>
</thead>
<tbody>
<row>
<entry morerows='1'>Length</entry>
<entry morerows='1'>2</entry>
<entry>0x2C  </entry>
<entry>0x2C  </entry>
</row>
<row>
<entry>0x00  </entry>
<entry>0x00  </entry>
</row>
<row>
<entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
</row>
<row>
<entry>0xEF </entry>
<entry>0xEF </entry>
</row>
<row>
<entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x08</emphasis></entry>
<entry><emphasis>0x09</emphasis></entry>
</row>
<row>
<entry>Data 1 </entry>
<entry>1</entry>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry morerows='1'>Data 2 </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry morerows='1'>XMIT Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry morerows='1'>RSP Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry>Reserved </entry>
<entry>Reserved </entry>
</row>
<row>
<entry>Destination  Name </entry>
<entry>16</entry>
<entry>Name of receiver</entry>
<entry>Reserved </entry>
</row>
<row>
<entry>Source  Name</entry>
<entry>16</entry>
<entry>Name of sender</entry>
<entry>Name of sender</entry>
</row>
<row>
<entry>Optional </entry>
<entry></entry>
<entry>Datagram </entry>
<entry>Datagram </entry>
</row>
</tbody>
</tgroup>
</table>
</section>
</section>
<section>
<title>NetBIOS Diagnostic and Monitoring Protocol</title>
<para>
The NetBIOS Diagnostic and Monitoring Protocol (DMP)
provides the facilities
to obtain status information about local and remote nodes on the network.
This protocol is broadly comparable with the basic functionality provided
by the Simple Network Monitoring Protocol (SNMP) within the TCP/IP suite
of protocols.
</para>
<para>
The NetBIOS Diagnostic and Monitoring Protocol (DMP) provides the facilities
to obtain information including:
</para>
<itemizedlist>
<listitem>
<para>
Number of "Frame Reject" (FRMR) frames received.
</para>
</listitem>
<listitem>
<para>
Number of "Frame Reject" (FRMR) frames transmitted.
</para>
</listitem>
<listitem>
<para>
Number of I-format "Logical link control Protocol Data Units" (LPDUs)
 received in error.
</para>
</listitem>
<listitem>
<para>
Number of aborted transmissions.
</para>
</listitem>
<listitem>
<para>
Etc.
</para>
</listitem>
</itemizedlist>
<para>It is worth noting that this facility is part of the protocol
and not an advantage of a given Operating System that happens to be using the protocol.</para>
<section id='nbf-DMP802'>
<title>NetBIOS Diagnostic and Monitoring frames on 802.2 networks</title>
<itemizedlist>
<listitem>
<para>
The "STATUS QUERY" frame (0x03) is used to request remote adapter status
information.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x03 identifying it
as an "STATUS QUERY" frame.
</para>
<para>
The "DATA1" octet is used to indicate the status
of the request, 0x0 indicates a 1.x or 2.0 type request, 0x01 indicates a
NetBIOS 2.1 request and values greater than 1 indicate a NetBIOS 2.1 request.
The two bytes of the "DATA2" field are used to indicate the length of the
user's status buffer.  The "DATA2" field is transmitted byte reversed.
Two reserved octets are followed by a two octet response
correlator, transmitted byte reversed.  Sixteen octets identifying the name of
the receiver are followed by
a further sixteen octets indicating the sending node's NAME NUMBER 1.
</para>
</listitem>
<listitem>
<para>
The "STATUS RESPONSE" frame (0x0F) is used in response to request a status
request frame.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x0F identifying it
as an "STATUS RESPONSE" frame.
</para>
<para>
The "DATA1" octet is used to indicate the status
of the response, 0x0 indicates a 1.x or 2.0 type response,  and values greater
 than 0x0 indicate a
NetBIOS 2.1 response.
The two octets of the "DATA2" field are regarded as a 16 bit string; the first bit
x is set to 1 if the length of the status data exceeds the frame size; the second
bit y is set to 1 if the length exceeds the size of the user's buffer; the remaining
14 bits indicate the length of the status data sent.  
The "DATA2" field is transmitted byte reversed.
A two octet transmit correlator,  transmitted byte reversed, is followed
by two reserved octets.
Sixteen octets indicate the receiving node's NAME NUMBER 1 and are followed by
a further sixteen octets indicating the sending node's name.
</para>
</listitem>
<listitem>
<para>
The "TERMINATE TRACE" frame (0x07) is used to end a trace at a remote node.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x07 identifying it
as an "TERMINATE TRACE" frame.
</para>
<para>
All the remaining 39 octets are reserved.
</para>
</listitem>
<listitem>
<para>
The "TERMINATE TRACE" frame (0x13) is used to end a local trace and a trace
at a remote node.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x13 identifying it
as an "TERMINATE TRACE" frame.
</para>
<para>
All the remaining 39 octets are reserved.
</para>
</listitem>
</itemizedlist>
<table frame='all'>
<title>Diagnostic and Monitoring frames  (Octets in order transmitted.)</title>
<tgroup cols='6'>
<thead>
<row><entry></entry>
<entry></entry>
<entry>Special frame</entry>
<entry>Special frame</entry>
<entry>Special frame</entry>
<entry>Special frame</entry></row>
<row>
<entry>Field Name</entry>
<entry>Length</entry>
<entry>STATUS QUERY</entry>
<entry>STATUS RESPONSE</entry>
<entry>TERMINATE TRACE</entry>
<entry>Terminate local &amp; remote trace</entry></row>
</thead>
<tbody>
<row>
<entry morerows='1'>Length</entry>
<entry morerows='1'>2</entry>
<entry>0x2C </entry>
<entry>0x2C </entry>
<entry>0x2C </entry>
<entry>0x2C</entry></row>
<row><!--<entry>Length</entry>
<entry>2</entry>-->
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00</entry></row>
<row><entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry></row>
<row>
<!--<entry> Deliminator</entry>
<entry >2</entry>-->
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry></row>
<row><entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x03</emphasis></entry>
<entry><emphasis>0x0F</emphasis></entry>
<entry><emphasis>0x07</emphasis></entry>
<entry><emphasis>0x13</emphasis></entry></row>
<row><entry>Data 1 </entry>
<entry>1</entry>
<entry>nn</entry>
<entry>nn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry morerows='1'>Data 2 </entry>
<entry morerows='1'>2</entry>
<entry>Length of status buf</entry>
<entry>bbbbbbbb</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><!--<entry>Data 2 </entry>
<entry>2</entry>-->
<entry>Length of status buf</entry>
<entry>xybbbbbb</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry morerows='1'>XMIT Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><!--<entry>XMIT Cor </entry>
<entry>2</entry>-->
<entry>Reserved </entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry morerows='1'>RSP Cor </entry>
<entry morerows='1'>2</entry>
<entry>nnnn </entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><!--<entry>RSP Cor </entry>
<entry>2</entry>-->
<entry>nnnn </entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry>Destination  Name </entry>
<entry>16</entry>
<entry>Name of receiver</entry>
<entry>Receiver's NAME NUMBER 1</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry>Source  Name</entry>
<entry>16</entry>
<entry>Sending node NAME NUMBER 1</entry>
<entry>Name of sender</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
</tbody>
</tgroup>
</table>
</section>
</section>
<section>
<title>NetBIOS Session Management Protocol</title>
<para>
The NetBIOS Session Management Protocol (SMP) manages sessions between Named
processes on the network.  NetBIOS Sessions support full duplex operation.
One Named process calls another Name on the network which answers.  The Session
continues until one or both systems hang up.
</para>
<para>
The original NetBIOS Session Management Protocol is described in
<xref linkend='nbibmpc-NetBIOS-IBM-PC-Network'/>
Appendix: NetBIOS protocols in IBM PC Network 
in 
<xref linkend='nbibmpc-SMPIBMPC'/>
NetBIOS Session Management Protocol  in IBM PC Networks.
</para>
<section id='nbf-SMP802Query'>
<title>NetBIOS Session Frames - Name Query - on 802.2 networks</title>
<para>
In the NetBIOS Frames Protocol on 802.2 networks there are two frames used for
managing names in session establishment.  Details of these frames are given in
<xref linkend='nmp-NMP'/>
"Name Management Frames in NetBIOS on 802.2 networks"
</para>
<table frame='all'>
<title>Frames for managing names in session establishment   (Octets in order transmitted.)</title>
<tgroup cols='4'>
<thead>
<row>
<entry></entry>
<entry></entry>
<entry>Management frame</entry>
<entry>Management frame</entry></row>
<row><entry>Field Name</entry>
<entry>Length</entry>
<entry>NAME QUERY</entry>
<entry>NAME RECOGNISED</entry></row>
</thead>
<tbody>
<row><entry morerows='1'>Length</entry>
<entry morerows='1'>2</entry>
<entry>0x2C</entry>
<entry>0x2C</entry></row>
<row><!--<entry>Length</entry>
<entry>2</entry>-->
<entry>0x00</entry>
<entry>0x00</entry></row>
<row><entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF </entry>
<entry>0xFF </entry></row>
<row><!--<entry>Deliminator</entry>
<entry>2</entry>-->
<entry>0xEF </entry>
<entry>0xEF </entry></row>
<row><entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x0A</emphasis></entry>
<entry><emphasis>0x0E</emphasis></entry></row>
<row><entry>Data 1 </entry>
<entry>1</entry>
<entry>Reserved </entry>
<entry>Reserved </entry></row>
<row><entry morerows='1'>Data 2 </entry>
<entry morerows='1'>2</entry>
<entry>X ss </entry>
<entry>X ss </entry></row>
<row><!--<entry>Data 2 </entry>
<entry>2</entry>-->
<entry>X tt </entry>
<entry>X tt </entry></row>
<row><entry morerows='1'>XMIT Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>nn </entry></row>
<row><!--<entry>XMIT Cor </entry>
<entry>2</entry>-->
<entry>Reserved </entry>
<entry>nn </entry></row>
<row><entry morerows='1'>RSP Cor </entry>
<entry morerows='1'>2</entry>
<entry>nn </entry>
<entry>nn </entry></row>
<row><!--<entry>RSP Cor </entry>
<entry>2</entry>-->
<entry>nn </entry>
<entry>nn </entry></row>
<row><entry>Destination Name </entry>
<entry>16</entry>
<entry>Name of receiver </entry>
<entry>Name of receiver </entry></row>
<row><entry>Source  Name</entry>
<entry>16</entry>
<entry>Name of sender</entry>
<entry>Name of sender</entry></row>
</tbody>
</tgroup>
</table>
</section>
<section id='nbf-SMP802ET'>
<title>NetBIOS Session Frames - Establishment and Termination -
on 802.2 networks</title>
<itemizedlist>
<listitem>
<para>
The "SESSION ALIVE" frame (0x1F) is send as the result of an inactivity timer
expiring.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x1F identifying it
as an "SESSION ALIVE" frame.
</para>
<para>
All the remaining 39 octets are reserved.
</para>
</listitem>
<listitem>
<para>
The "SESSION CONFIRM" frame (0x17) is used to request remote adapter status
information.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
these fields are followed
by the one octet command frame which has a value of 0x17 identifying it
as an "SESSION CONFIRM" frame.
</para>
<para>
The "DATA1" octet is an 8 bit binary string;
the first bit "y" is set to 0 for versions of NetBIOS prior to version 2.20 and
to 1 for higher versions.  After 6 bits always set to 0, the last bit "x" is set
to 0 for NetBIOS version 1.xx and set to 1 for version 2.00 or above
(In practice this will now always be set to 1).
The two bytes of the "DATA2" field are used to indicate the length of the
user's receive buffer.  The "DATA2" field is transmitted byte reversed. 
</para>
<para>
Two octets used for a transmission correlator are followed by a two 
octet response correlator;  these fields are
transmitted byte reversed.
 A single octet is used for the remote session number and is followed by
an octet for the local session number.
</para>
</listitem>
<listitem>
<para>
The "SESSION END" frame (0x18) is used to request remote adapter status
information.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x18 identifying it
as an "SESSION END" frame.
</para>
<para>
The "DATA1" octet is reserved. 
The two bytes of the "DATA2" field are used to indicate the reason for termination.
0x00 indicates a normal session end, 0x01 indicates an abnormal end.
 The "DATA2" field is transmitted byte reversed.
Four reserved octets are followed by a single octet used for the remote session
 number.  The final octet is for the local session number.
</para>
</listitem>
<listitem>
<para>
The "SESSION INITIALIZE" frame (0x19) is used to request remote adapter status
information.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x19 identifying it
as an "SESSION INITIALIZE" frame.
</para>
<para>
The "DATA1" octet is an 8 bit binary string;
the first bit "z" is set to 0 for versions of NetBIOS prior to version 2.20 and
to 1 for higher versions
(In practice this will now always be set to 1).
Three reserved bits "rrr", always set to 0 are followed by
3 bits "xxx" used to indicate the largest frame value as seen by the MAC layer;
the last bit "z" is set
to 0 for NetBIOS version 1.xx and set to 1 for version 2.00 or above.
The two octets of the "DATA2" field are used to indicate the length of the
user's receive buffer.
 The "DATA2" field is transmitted byte reversed.
A single octet is used for the remote session number and is followed by
an octet for the local session number.
</para>
</listitem>
</itemizedlist>
<table frame='all'>
<title>Session Establishment and Termination frames   (Octets in order transmitted.)</title>
<tgroup cols='6'>
<thead>
<row>
<entry></entry>
<entry></entry>
<entry>Session frame</entry>
<entry>Session frame</entry>
<entry>Session frame</entry>
<entry>Session frame</entry>
</row>
<row>
<entry>Field Name</entry>
<entry>Length</entry>
<entry>SESSION ALIVE</entry>
<entry>SESSION CONFIRM</entry>
<entry>Session End</entry>
<entry>SESSION INITIALIZE</entry>
</row>
</thead>
<tbody>
<row>
<entry morerows='1'>Length</entry>
<entry morerows='1'>2</entry>
<entry>0x0E </entry>
<entry>0x0E </entry>
<entry>0x0E </entry>
<entry>0x0E </entry> </row>          
<row><!--<entry>Length</entry>
<entry>2</entry>-->
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry> </row>
<row><entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry> </row>
<row><!--<entry>Deliminator</entry>
<entry>2</entry>-->
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry> </row>
<row><entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x1F</emphasis></entry>
<entry><emphasis>0x17</emphasis></entry>
<entry><emphasis>0x18</emphasis></entry>
<entry><emphasis>0x19</emphasis></entry></row>
<row><entry>Data1</entry>
<entry>1</entry>
<entry>Reserved </entry>
<entry>B yrrrrrrx</entry>
<entry>Reserved</entry>
<entry>zrrrxxxy</entry> </row>
<row><entry morerows='1'>Data2</entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>Max data rec size</entry>
<entry>Termination indicator</entry>
<entry>Max data receive size</entry> </row>
<row><!--<entry>Data2</entry>
<entry>2</entry>-->
<entry>Reserved </entry>
<entry>Max data rec size</entry>
<entry>Termination indicator</entry>
<entry>Max data receive size</entry> </row>
<row><entry morerows='1'>XMIT Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>nnnn</entry> </row>
<row><!--<entry>XMIT Cor </entry>
<entry>2</entry>-->
<entry>Reserved </entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>nnnn</entry> </row>
<row><entry morerows='1'>RSP Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved </entry>
<entry>nnnn Sess init xmit</entry>
<entry>Reserved</entry>
<entry>nnnn</entry> </row>
<row><!--<entry>RSP Cor </entry>
<entry>2</entry>
<entry>Reserved </entry>
<entry>nnnn Sess init xmit</entry>
<entry>Reserved</entry>
<entry>nnnn</entry> </row>
<row><entry>Destination  Num </entry>
<entry>1</entry>-->
<entry>Reserved </entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry> </row>
<row><entry>Destination  Num</entry>
<entry>1</entry>
<entry>Reserved </entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry> </row>
<row><entry>Source Num</entry>
<entry>1</entry>
<entry>Reserved </entry>
<entry>Local session num</entry>
<entry>Local session num</entry>
<entry>Local session num</entry> </row>
</tbody>
</tgroup>
</table>
</section>
<section id='nbf-SMP802DT'>
<title>
NetBIOS Session Frames - Data Transfer - on 802.2 networks
</title>
<itemizedlist>
<listitem>
<para>
The "DATA ACK" frame (0x14) is sent in response to a  DATA ONLY LAST frame
(see below).
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x14 identifying it
as an "DATA ACK" frame.
</para>
<para>
Three reserved octets are followed by a two octet
transmit correlator then a two octet receive correlator;  these fields are
transmitted byte reversed.
A single octet is used for the remote session number and is followed by
an octet for the local session number.
</para>
</listitem>
<listitem>
<para>
The "DATA FIRST MIDDLE" frame (0x15) is used to transmit user messages 
across a session.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x15 identifying it
as an "DATA FIRST MIDDLE" frame.
</para>
<para>
The "DATA1" octet is an 8 bit binary string; the first four bits are reserved;
the fifth bit "x" is set to 1 if an acknowledgment is included; this is followed
by a reserved bit; the seventh bit "y" is set to 0 for versions of NetBIOS
prior to version 2.20 and set to 1 for later versions
(In practice this will now always be set to 1); the last bit "z" is set
to 0 if a RECEIVE CONTINUE was not requested, otherwise it is set to 1. 
The next two octets are for DATA2 and is a re-synchronization indicator set
to 0001 if it is the first DATA FIRST MIDDLE frame. 
The "DATA2" field is transmitted byte reversed.
</para>
<para>
This is followed by a
transmit correlator then a two octet receive correlator.
A single octet is used for the remote session number and is followed by
an octet for the local session number.  Finally the user data follows.
</para>
</listitem>
<listitem>
<para>
The "DATA ONLY LAST" frame (0x16) is used to transmit user messages 
across a session and is either the only frame or the last.
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x16 identifying it
as an "DATA ONLY LAST" frame.
</para>
<para>
The "DATA1" octet is an 8 bit binary string; the first four bits are reserved;
the fifth bit "x" is set to 1 if an acknowledgment is included; this is followed
by the sixth "y" bit which indicates that an "acknowledge with data allowed" is
permitted; the seventh bit "z" is a "no.ack" indicator and the final bit is 
reserved. 
The next two octets are for DATA2 and is a re-synchronization indicator set
to 0001 if this frame is send following receipt of a RECEIVE OUTSTANDING.
The "DATA2" field is transmitted byte reversed. 
 This is followed by a
transmit correlator then a two octet receive correlator; these fields are
transmitted byte reversed.
A single octet is used for the remote session number and is followed by
an octet for the local session number.  Finally the user data follows.
</para>
</listitem>
<listitem>
<para>
The "NO RECEIVE" frame (0x1A) is transmitted in response to a "DATA ONLY LAST"
frame or a "DATA FIRST MIDDLE" frame. 
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x1A identifying it
as an "NO RECEIVE" frame.
</para>
<para>
The "DATA1" octet is an 8 bit binary string; the first six bits are reserved;
the seventh bit "x" is set to 0 for versions of NetBIOS prior to  2.20, otherwise
it is set to 1
(In practice this will now always be set to 1); the eighth bit is reserved. 
The next two bytes are for DATA2 and gives the number of data bytes accepted.
The "DATA2" field is transmitted byte reversed. 
Four reserved octets are followed by a single octet used for the remote
 session number; this is followed by
an octet for the local session number.
</para>
</listitem>
<listitem>
<para>
The "RECEIVE OUTSTANDING" frame (0x1B) is transmitted in response to a
"NO RECEIVE" frame. 
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x1C identifying it
as an "RECEIVE OUTSTANDING" frame.
</para>
<para>
The "DATA1" octet is reserved.
The next two octets are for DATA2 and gives the number of data bytes accepted.
The "DATA2" field is transmitted byte reversed. 
Four reserved octets are followed by a single octet used for the remote
 session number; this is followed by
an octet for the local session number.
</para>
</listitem>
<listitem>
<para>
The "RECEIVE CONTINUE" frame (0x1C) is transmitted in response to a "DATA ONLY LAST"
frame which had the RECEIVE CONTINUE bit set. 
</para>
<para>
The frame begins with a two byte length field with a value of 0x002C
followed by the two byte frame deliminator field 0xEFFF; these fields are
transmitted byte reversed.
These fields are followed
by the one octet command frame which has a value of 0x1C identifying it
as an "RECEIVE CONTINUE" frame.
</para>
<para>
Three reserved octets are followed by a two octet transmit correlator,
transmitted byte reversed,  which
is followed by two more reserved octets.
A single octet is used for the remote session number and is followed by
an octet for the local session number.
</para>
</listitem>
</itemizedlist>
<table frame='all'>
<title>Session Data Transfer frames   (Octets in order transmitted.)</title>
<tgroup cols='8'>
<thead>
<row>
<entry></entry>
<entry></entry>
<entry>Data frame</entry>
<entry>Data frame</entry>
<entry>Data frame</entry>
<entry>Data frame</entry>
<entry>Data frame</entry>
<entry>Data frame</entry>
</row>
<row>
<entry>Field Name</entry>
<entry>Length</entry>
<entry>DATA ACK</entry>
<entry>DATA FIRST MIDDLE</entry>
<entry>DATA ONLY LAST</entry>
<entry>NO RECEIVE</entry>
<entry>RECEIVE OUT-STANDING</entry>
<entry>RECEIVE CONTINUE</entry>
</row>
</thead>
<tbody>
<row><entry morerows='1'>Length</entry>
<entry morerows='1'>2 </entry>
<entry>0x0E </entry>
<entry>0x0E </entry>
<entry>0x0E </entry>
<entry>0x0E </entry>
<entry>0x0E </entry>
<entry>0x0E </entry></row>
<row><!--<entry>Length</entry>
<entry>2</entry>-->
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry>
<entry>0x00 </entry></row>
<row><entry morerows='1'>Deliminator</entry>
<entry morerows='1'>2</entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry>
<entry>0xFF </entry></row>
<row><!--<entry>Deliminator</entry>
<entry>2</entry>-->
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry>
<entry>0xEF </entry></row>
<row><entry><emphasis>Command</emphasis></entry>
<entry>1</entry>
<entry><emphasis>0x14</emphasis></entry>
<entry><emphasis>0x15</emphasis></entry>
<entry><emphasis>0x16</emphasis></entry>
<entry><emphasis>0x1A</emphasis></entry>
<entry><emphasis>0x1B</emphasis></entry>
<entry><emphasis>0x1C</emphasis></entry></row>
<row><entry>Data1</entry>
<entry>1</entry>
<entry>Reserved</entry>
<entry>Brrrxryz</entry>
<entry>Brrrxryz</entry>
<entry>Brrrrrrxr</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry morerows='1'>Data2</entry>
<entry morerows='1'>2</entry>
<entry>Reserved</entry>
<entry>Re-synch indicator</entry>
<entry>Re-synch indicator</entry>
<entry>Number of data bytes accepted</entry>
<entry>Number of data bytes accepted</entry>
<entry>Reserved</entry></row>
<row><!--<entry>Data2</entry>
<entry>2</entry>-->
<entry>Reserved</entry>
<entry>Re-synch indicator</entry>
<entry>Re-synch indicator</entry>
<entry>Number of data bytes accepted</entry>
<entry>Number of data bytes accepted</entry>
<entry>Reserved</entry></row>
<row><entry morerows='1'>XMIT Cor </entry>
<entry morerows='1'>2</entry>
<entry>nnnn</entry>
<entry>nnnn</entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>nnnn</entry></row>
<row><!--<entry>XMIT Cor </entry>
<entry>2</entry>-->
<entry>nnnn</entry>
<entry>nnnn</entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>nnnn</entry></row>
<row><entry morerows='1'>RSP Cor </entry>
<entry morerows='1'>2</entry>
<entry>Reserved</entry>
<entry>nnnn</entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><!--<entry>RSP Cor </entry>
<entry>2</entry>-->
<entry>Reserved</entry>
<entry>nnnn</entry>
<entry>nnnn</entry>
<entry>Reserved</entry>
<entry>Reserved</entry>
<entry>Reserved</entry></row>
<row><entry>Dest Num </entry>
<entry>1</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry>
<entry>Remote session num</entry></row>
<row><entry>Source Num</entry>
<entry>1</entry>
<entry>Local session num</entry>
<entry>Local session num</entry>
<entry>Local session num</entry>
<entry>Local session num</entry>
<entry>Local session num</entry>
<entry>Local session num</entry></row>
<row><entry>Optional data</entry>
<entry></entry>
<entry></entry>
<entry>USER DATA Message from send</entry>
<entry>USER DATA Message from send</entry>
<entry></entry>
<entry></entry>
<entry></entry></row>       
</tbody>
</tgroup>
</table>
</section>
</section>
</chapter>
