IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-2
CRE-Independent Socket Library
CRE-Independent Socket Library
The CRE-Independent socket library routines are provided in three versions for data
storage. Two are non-native versions, one for the large-memory model and one for the
wide-data model. The large-memory model routines are in the file
$SYSTEM.ZTCPIP.LNETINDL. The wide-data model routines are in
$SYSTEM.ZTCPIP.LNETINDW. The native-linkable version is in the file LNETINDN.
For more details on memory models, refer to the C/C++ Programmer’s Guide.
Summary of Routines
Both sets of the socket library contain two main types of routines: socket routines and
support routines.
Socket routines deal directly with connections and data transfer for NonStop IPX/SPX.
Table 5-1 lists and briefly describes each socket routine and provides the page number
where the routine is described.
Table 5-1. Socket Routines (page1of2)
Name and
Description Page Function Page
accept
Listens for connections on an existing socket,
creates a new socket for data transfer, and
accepts a connection on the new socket (waited)
5-10
accept_nw Listens for connections on an existing socket
(nowait)
5-12
accept_nw2 Creates a new socket for data transfer and
accepts a connection on the new socket (nowait)
5-15
bind, bind_nw Binds a socket to an address and port number
(waited or nowait)
5-17
connect, connect_nw Connects a socket to a remote socket (waited or
nowait)
5-20
getpeername,
getpeername_nw
Gets the address and port number of a remote
host (waited or nowaited)
5-23
getsockname,
getsockname_nw
Gets the address and port number to which a
socket is bound (waited or nowait)
5-25
getsockopt,
getsockopt_nw
Gets socket options (waited or nowait) 5-27
ipx_addr converts an IPX address format from
hexadecimal format to binary format.
5-29
*“Checkpoint” here refers to sending state-change information from the
primary to the backup process.