[comp.unix.i386] STREAMS implementation of TCP/IP and /etc/netd.cf questions

tim@delluk.uucp (Tim Wright) (06/28/90)

In <9353@bunny.GTE.COM> jdg0@GTE.COM (Jose Diaz-Gonzalez) writes:

>I am curious about the significance of the following contents of the 
>/etc/netd.cf file for the Western Digital Ethernet board:

>>	arp    = "/dev/arp" lsap 0x800
>>	
>>	# open link level devices
>>	wd_arp = "/dev/wd" lsap 0x806   # stream for ARP messages
>>	wd_ip  = "/dev/wd" lsap 0x800   # stream for IP messages
>>	loop   = "/dev/lo" lsap 0x800   # stream for loopback driver
>>	
.....
>>	link wd_arp under arp type 0x101
>>	link wd_ip under arp type 0x1

>Where do the 0x800 and 0x806 come from?  what about the 0x1 and 0x101?.
>What is the actual effect in terms of STREAMS connections semantics of 
>these instructions?.  If I were going to have a SLIP module below the
>IP module, what would its lsap number be? What is a "module type"? I've
>read the STREAMS manual completely and I have not found any definition
>for such a thing.  I've also read the netd(1m) page in the TCP/IP manual, 
>but it's really not much help.  Where can I find a GOOD description of 
>netd functionality?.  Inquiring minds want to know...  (well, at least
>one mind anyway!)

>	-- Jose

Well here goes my shot at it. The 0x800 and 0x806 are the lsap values
to be placed in the type field of the ethernet packet and are "IP" and
"ARP" respectively (no big surprise :-). The 0x1 and 0x101 are
(quoting from the 1.1.2 manual) "module specific" and are used to
inform the upper stream of the type of the lower stream. Currently
these are the only values where 1 = IP stream on Ethernet, and 101 =
ARP on Ethernet, i.e. they simply are simply ids for use by the arp
module. As to SLIP, the only lsap I have seen is 0x888 (with
Interactive TCP/IP 1.2.0). This is apparently Xyplex (that's what the
document I have says). I'm not clear how this fits in with ARP since a
serial line is inherently not Multiple Access! Someone more familiar
with SLIP will have to explain this - we don't have the internet here
so SLIP is uncommon to say the least.

Regards,

Tim
--
Tim Wright, Unix Support               | Email: ...!ukc!delluk!tim
Dell Computer Corp. (UK), Bracknell    | (pending domain registration).

dougm@ico.isc.com (Doug McCallum) (07/02/90)

In article <tim.646580403@holly> tim@delluk.uucp (Tim Wright) writes:
>In <9353@bunny.GTE.COM> jdg0@GTE.COM (Jose Diaz-Gonzalez) writes:
...
>Well here goes my shot at it. The 0x800 and 0x806 are the lsap values
>to be placed in the type field of the ethernet packet and are "IP" and

Right.  You covered things pretty well.  The LSAP field is either the
Ethernet type value or an IEEE 802.2 LSAP value.  This is meaningful
only for devices that support the concept.

>"ARP" respectively (no big surprise :-). The 0x1 and 0x101 are
>(quoting from the 1.1.2 manual) "module specific" and are used to
>inform the upper stream of the type of the lower stream. Currently
>these are the only values where 1 = IP stream on Ethernet, and 101 =
>ARP on Ethernet, i.e. they simply are simply ids for use by the arp

More specifically, the value is a two part value that fits in two bytes.
The most significant byte indicates the type of the STREAM below ARP.
A 0 is an IP STREAM and a 1 is an ARP STREAM.  The least significant
byte is a 1 for Ethernet.  The value used here is the value of the hardware
type field for ARP.  If you weren't using Ethernet you would have a differnet
value "N" to identify the hardware so would have types of "0xN and 0x10N"

>module. As to SLIP, the only lsap I have seen is 0x888 (with
>Interactive TCP/IP 1.2.0). This is apparently Xyplex (that's what the
>document I have says). I'm not clear how this fits in with ARP since a
>serial line is inherently not Multiple Access! Someone more familiar
>with SLIP will have to explain this - we don't have the internet here
>so SLIP is uncommon to say the least.

The SLIP driver uses the "llc" driver to do the underlying STREAMS Link Level
Interface protocol.  It requires an lsap to be specified.  The person that
implemented SLIP picked 0x888 at random.  It probably should have been a number
outside the range of Ethernet types, but it isn't.  It doesn't get used
other than to indicate that it is a SLIP STREAM.