IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-8
CRE Considerations
executable, a CRE-independent native mode socket library, LNETINDN is provided.
LNETINDN is a linkable object.
The TAL-callable functions, paramcapture() and allparamcapture(), have been
removed from the D40 socket library. These functions provided a mechanism to save
run-time parameters used by the socket library (=TCPIP^PROCESS^NAME,
=TCPIP^HOSTS^FILE, and so forth). Because the DEFINE mechanism is now used
instead of PARAM, this functionality is no longer required.
The prototypes specified in SOCKPROC and the structure templates in SOCKDEFT
have changed to conform to the native version of the socket library. Function
parameter and return value data types that were specified as INT have been changed
to INT(32). Applications converting from TAL to pTAL must ensure that these data
types are reflected accordingly in their code. Variables of type INT in existing code
need to be cast to INT(32), or declared as INT(32), for native socket library function
calls.
Defines in SOCKPROC and SOCKDEFT can be used as is with the following
exception. AF_INET, defined in SOCKDEFT, will be declared as an INT(32) for a
pTAL compiled application. When using AF_INET within the sockaddr or
sockaddr_in structure, you must cast AF_INET to an INT when assigning it to
sa_family or sin_family respectively.
CRE Considerations
C applications using the Socket Library are compiled by the D-series C compiler. The
C compiler generates code that runs in the CRE (Common Run-Time Environment).
The CRE makes assumptions about the use of primary global memory, memory
management, and trap handling that is incompatible with certain applications, such as
the HP ODBC server. The CRE-Independent Socket Library (LNETINDL for the
large-memory model, LNETINDW for the wide-data model, and LNETINDN for native
mode) has no dependence on the CRE.
For TAL application programs that use the Socket Library, application programs must
specify the ENV compiler directive COMMON for the D-series TAL compiler to generate
code that runs in the CRE.
TAL application programs can specify the directive either in a compilation command or
in the program source code before any declarations. For example, the following
compilation command produces a TAL object file compiled for the CRE:
TAL / IN source, OUT listing /; ENV COMMON
Note. HP recommends that you use the Common Run-Time Environment (CRE) when
developing TAL socket applications. CRE is described in the CRE Programming Manual.
If your application is incompatible with CRE, use the CRE-Independent socket library described
in “Socket Libraries” at the beginning of this section.