Sequenced Packet Exchange (SPX) is a protocol in the IPX/SPX protocol stack that corresponds to a connection-oriented transport layer protocol in the OSI model. Being reliable and connection-oriented, it is analogous to the Transmission Control Protocol (TCP) of TCP/IP, but it is a datagram protocol, rather than a stream protocol.

SPX packet structure

Each SPX packet begins with a header with the following structure:

{|class=wikitable style="text-align:left;"

|-

! Octets !! Field

|-

| 1 || Connection Control

|-

| 1 || Datastream Type

|-

| 2 || Source Connection Id

|-

| 2 || Destination Connection Id (0xFFFF = unknown)

|-

| 2 || Sequence Number

|-

| 2 || Acknowledgement Number

|-

| 2 || Allocation Number (The number of outstanding receive buffers available)

|-

| 0–534 || data

|}

The Connection Control fields contains 4 single-bit flags:

{|class=wikitable style="text-align:left;"

|-

! Weight !! Meaning

|-

| 0x10 || End-of-message

|-

| 0x20 || Attention

|-

| 0x40 || Acknowledgement Required

|-

| 0x80 || System Packet

|}

The Datastream Type serves to close the SPX connection. For this purpose two values are used:

{|class=wikitable style="text-align:left;"

|-

! Value !! Meaning

|-

| 0x00–0xFD || Available for client use

|-

| 0xFE || End-of-Connection

|-

| 0xFF || End-of-Connection Acknowledgement

|}

  • SPX, Sequenced Packet Exchange
  • IPX / SPX Packet Structures