+-----------+--------+---------+---------- | Dst | Src | Type | Data... | | |(0x8137)|(checksum 0xFFFF, IPX-header ...) +-----------+--------+---------+---------- <- 6 -><- 6 -><-- 2 -->
+-----------+--------+---------+---------- | Dst | Src | Length | Data... | | | | (checksum 0xFFFF, IPX-header ...) +-----------+--------+---------+---------- <- 6 -><- 6 -><-- 2 -->
+-----------+--------+-------------+-------+---------+----- | Dst | Src | Length | DSAP | SSAP |Control| Data... | | | |(0xE0)|(0xE0)|(0x03) |(checksum 0xFFFF, IPX-header ...) +-----------+--------+-------------+-------+---------+----- <- 6 -><- 6 -><- 2 ->
+-----------+--------+-------------+-------+-- | Dst | Src | Length | DSAP | SSAP |Control| | | | |(0xAA)|(0xAA)|(0x03) | +-----------+--------+-------------+-------+---... <-----LLC2 (802.2)---> <-- 3 --> <-- 2 --> ...-+----------+--------+----------- | Org Code | Type | Data... | OUI |(0x8137)| (checksum 0xFFFF, IPX-header ...) ...-+----------+--------+-----------
Ethernet uses the type field to determine the packet protocol. 802.3/802.2 use the DSAP and SSAP fields.
Because there are only 256 possible SAP values, they are fairly hard to get. The special SAP number of AA was assigned to indicate that there are further headers after the 802.2 header that must be parsed to determine the network-level protocol. This is the SNAP header that uses the same type field used by V2 Ethernet.
AppleTalk can be indicated by either Ethernet V2 type 0x809B (Phase I), or a SAP code of 0xAA followed by a SNAP type code of 0x809B (Phase II). AppleTalk is currently never sent as an 802.3/802.2 packet with a unique SAP code.
Novell can be found as either Ethernet type 0x8137, or a raw 802.3 packet. It is not sent as an 802.3/802.2 packet with a unique SAP code.
There are only a few SAP values that you are likely to run across. They are:
On FDDI you have only three encapsulation formats:
+-----------+--------+---------+---------- | Dst | Src | Length | Data... | | | | (checksum 0xFFFF, IPX-header ...) +-----------+--------+---------+---------- <- 6 -><- 6 -><-- 2 -->
+-----------+--------+-------------+-------+---------+----- | Dst | Src | Length | DSAP | SSAP |Control| Data... | | | |(0xE0)|(0xE0)|(0x03) |(checksum 0xFFFF, IPX-header ...) +-----------+--------+-------------+-------+---------+----- <- 6 -><- 6 -><- 2 ->
+-----------+--------+-------------+-------+-- | Dst | Src | Length | DSAP | SSAP |Control| | | | |(0xAA)|(0xAA)|(0x03) | +-----------+--------+-------------+-------+---... <-----LLC2 (802.2)---> <-- 3 --> <-- 2 --> ...-+----------+--------+----------- | Org Code | Type | Data... | OUI |(0x8137)| (checksum 0xFFFF, IPX-header ...) ...-+----------+--------+-----------