How Packet Size Affects Protocols
Media packet size issues discussed above 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 and each datagram must reside within the maximum packet size. Windows Sockets 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. Windows Sockets 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, Windows Sockets 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 via 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 above are in effect.
Protocol |
Media |
Type |
Data Pkt Size |
NSPROTO_IPX |
Ethernet |
Ethernet II |
|
|
|
802.3 |
|
|
|
802.2 |
1466 |
|
|
SNAP |
|
|
Token Ring |
4 megabit |
|
|
|
16 megabit |
|
Protocol |
Media |
Type |
Data Pkt Size |
NSPROTO_SPX |
Ethernet |
Ethernet II |
|
|
|
802.3 |
|
|
|
802.2 |
1454 |
|
|
SNAP |
|
|
Token Ring |
4 megabit |
|
|
|
16 megabit |
|