TCP/IP Programming Manual
4 Library Routines
This section contains the syntax and semantics for the socket-library routines provided by the
NonStop TCP/IP, NonStop TCP/IP, and NonStop TCP/IP products. These routines are compatible
with the socket routines in the 4.3 BSD UNIX operating system, except as noted here or in the
Porting Considerations (page 32).
In addition to the sockets library, which is implemented in the C language, NonStop TCP/IPv6,
NonStop TCP/IP, and NonStop TCP/IP provide a TAL binding to the sockets library to support
applications written in TAL.
Where this section documents library routines that are only available for the NonStop TCP/IP
subsystem, it is indicated in the description of the routine.
Socket Library Routines
The socket library routines are provided in two sets of three files each. One set is Common Run-Time
Environment (CRE) dependent (CRE-dependent) and the other set has no dependence on CRE
(CRE-independent). See CRE Considerations (page 88) for more information about CRE.
For enabling 64–bit features, call 64–bit APIs in the application and recompile with 'lp64' complier
option.
CRE-Dependent Socket Library
The CRE-dependent socket library is neutral with respect to the Common Runtime Environment
(CRE), in that it uses no routines that depend on CRE; however, this library does depend on CRE
for the global errno data variable which permits applications to use the perror function. The
CRE-dependent, non-native, socket library routines are provided in two versions for data storage:
one for the large-memory model and one for the wide-data model.
The large-memory-model routines are in the file $SYSTEM.ZTCPIP.LIBINETL. The wide-data-model
routines are in $SYSTEM.ZTCPIP.LIBINETW. TAL routines are provided by the prototype
procedures contained in SOCKPROC.
Native C users should use the SRL version of the socket library, ZINETSRL.
Current users of the wide-data-model routines, LIBINETW, require no changes to their application
code to utilize the D40-native socket library. These applications must, however, be recompiled
using the D40 header files.
Applications using the large-memory-model routines, LIBINETL, need to verify that the correct data
types are used in function calls to the socket library. If the correct data types are specified, the
only requirement is a recompilation using the D40 header files. Otherwise, the data types must be
changed to reflect the function descriptions in this manual.
Refer to the C/C++ Programmer’s Guide for more details on memory models.
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.
Refer to the C/C++ Programmer’s Guide for more details on memory models.
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.
Socket Library Routines 81