Platform SDK: Windows Sockets

How Packet Size Affects Protocols

Media packet size issues discussed in the topic, About Media Packet Size, affect the various PF_IPX protocols differently. A common strategy for handling various router and media size constraints is to use the full media size when the remote station's network number matches the local station, and fall back to the minimum packet size otherwise.

NSPROTO_IPX
Provides a datagram service; each datagram must reside within the maximum packet size. Winsock sets the maximum datagram packet size to the local media packet size minus the IPX header. Keep in mind, however, that if the packet is routed, it may hit router restrictions en route. Make sure your application can fall back to 546-byte datagrams.
NSPROTO_SPX
Provides stream and sequenced-packet services. Winsock IPX/SPX lets data streams and messages span multiple packets, so packet size does not limit the amount of data handled by send and recv. However, the underlying media size must be set correctly or the first large packet will be undeliverable and the connection will reset. If the target station is on the local network, Winsock sets its packet size to the media packet size. Otherwise, it defaults to 512 bytes. This size can be changed immediately after connect or accept through setsockopt.
NSPROTO_SPXII
SPXII features large Internet packet negotiation to maintain a best-fit size for packets and does not require programmer intervention. However, if the remote station does not support SPXII and negotiates down to standard SPX, the NSPROTO_SPX rules are in effect.
Protocol Media Type Data packet size
NSPROTO_IPX Ethernet Ethernet II
802.3
802.2 1466
SNAP
Token Ring four megabit
16 megabit
NSPROTO_SPX Ethernet Ethernet II
802.3
802.2 1454
SNAP
Token Ring four megabit
16 megabit