IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-62
socket_get_open_info
socket_get_open_info
The socket_get_open_info function is used by the primary process in a NonStop
IPX/SPX process pair to get parameters following a socket or socket_nw call.
error
is the return value. If the call is successful, a zero is returned. If the call is not
successful, -1 is returned. If the call failed, the external variable errno is set as
indicated below in “Errors.”
message
Refer to the FILE_OPEN_ procedure call in the Guardian Procedure Calls
Reference Manual for a description of this field.
Errors
File system errors as defined in <errno.h> are returned by this call. For a description
of the file system error returned, type (from the TACL prompt):
> ERROR error-num
where error-num is the error number returned in errno.
Usage Guidelines
Use socket_get_open_info after creating a socket using the socket or
socket_nw functions. Then, immediately checkpoint the data.
Use socket_get_open_info to checkpoint state information to a backup
process after a call to AWAITIOX and before subsequent AWAITIOX calls.
The user application must fill in the filenum, flags and sync variables in the
open_info_message structure before calling this function. Flags and sync must
have the same values that were used in the call to socket()/socket_nw() that
resulted in the opening of the socket identified by filenum. Immediately after the
call to socket_get_open_info(), the user application must use checkpoint on
the information by whatever means is being employed (passive or active) to its
backup process.
C Synopsis
#include <socket.h>
#include <if.h>
#include <netdb.h>
error = socket_get_open_info(*message);
int error;
struct open_info_message *message;