Developing applications over IPX/SPX using TLI

IPX packet structure

The structure of an IPX packet is identical to the structure of a Xerox Network Standard (XNS) packet. The packet consists of a 30-byte header followed by 0 to 546 bytes of data. The minimum packet size is 30 bytes (the header only); the maximum packet size is 576 bytes (the header and 546 bytes of data). The content and structure of the data portion are entirely the responsibility of the application using IPX and can take any format.

Some of the fields in the header are byte-order sensitive; the data must be sent in high-to-low order. See ``Network byte ordering'' for more information. ``Fields in an IPX packet header'' summarizes the contents of an IPX header.

Fields in an IPX packet header

Offset Field Type* Byte order
0 Checksum uint8 [2] high-to-low
2 Length uint8 [2] high-to-low
4 Transport control uint8 N/A
5 Packet type uint8 N/A
6 Destination address ipxAddr_t structure N/A
18 Source address ipxAddr_t structure N/A

A uint8 is an unsigned char.
The fields contain the following values:

The IPX driver sets this field to 0xFFFF. A value of 0xFFFF specifies that no checksumming is performed.

The IPX driver sets this field to the length of the complete IPX packet (the header plus the data). The packet can range from 30 bytes (the header only) to 576 bytes (the header plus 546 bytes of data).

Transport control
The IPX driver sets this field to 0 before sending the packet. Each router increments the field before sending the packet on. If the packet passes through 16 routers, the 16th router discards the packet.

Packet type
The user application sets this field. Applications that use IPX should pass a packet type of 0 to indicate a regular IPX packet type. If the application is using a protocol that has been built on top of IPX, the application should pass the packet type of the protocol.

Destination address
The user application sets this field. The destination address is a 12-byte ipxAddr_t structure.

Source address
The IPX driver sets this field to the source address of the sender. The source address is a 12-byte ipxAddr_t structure.

The application must set the ``Packet type'' and the ``Destination address'' fields to send a packet; the IPX driver sets the remaining fields. ``IPX addresses'' describes the fields in an ipxAddr_t structure and methods of obtaining destination network addresses. ``IPX packet types'' lists IPX packet types and gives brief descriptions of each.

IPX packet types

Packet type Description
0 Regular IPX packet type
1 Routing Information Packet (RIP)
2 Echo packet
3 Error packet
4 Packet Exchange Packet (PEP)
5 Sequence Packet Exchange (SPX)
17 NetWare Core Protocols (NCP)
20 NetBIOS name packet

Next topic: Accessing IPX
Previous topic: General characteristics of IPX

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003