IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-51
setsockopt, setsockopt_nw
Errors
If an error occurs, the external variable errno is set to one the following values:
Usage Guidelines
•
Use setsockopt on a socket created for waited operations, or setsockopt_nw
on a socket created for nowait operations. The operation initiated by
setsockopt_nw must be completed with a call to the AWAITIOX procedure.
•
When a packet is sent from an application to a broadcast address, the packet is
received by the local host unless a duplicate packet is also sent to the loopback
address.
•
setsockopt and setsockopt_nw calls, at the SPXII level, must be done only
after a successful bind call; otherwise, they fail.
•
If option negotiation (SPX_OPTIONNEG) is OFF, checksum (SPX_IPXCHKSUM) also
must be OFF because both sides must agree on performing the IPX checksum.
•
The 802.3 frame type does not support IPX checksum.
For information on error checking, see Nowait Call Errors on page 5-5.
Example
For an example that calls the setsockopt routine, see IPX Client Program on page 6-9.
Table 5-2. Types and Lengths of Socket Option Values
Socket Option Type
SO_LINGER Struct linger {
short int l_onoff; /*boolean*/
short int l_linger;/*time*/
} ;
SO_KEEPALIVE Integer (Boolean)
SPX_IPXCHKSUM Integer (Boolean)
SPX_OPTIONNEG Integer (Boolean)
SPX_RCVWINSIZE Integer
ENOPROTOOPT The specified option is unknown to the protocol.
EINVAL An invalid argument was specified.