A.1 Porting Considerations

This section contains information that you should consider when writing Internet application programs for the DEC TCP/IP Services for OpenVMS. These considerations will help to make your programs more portable.

A.1.1 Calling an IPC Routine from an AST State

Calls to various Interprocess Communication (IPC) routines use a static area within which they return information. The OpenVMS environment allows an asynchronous system trap (AST) routine to interrupt an IPC routine during its execution. In addition, the ASTs of more privileged modes can interrupt ASTs of less privileged modes. Therefore, caution needs to be observed when calling an IPC routine from an AST state, while a similar IPC routine is being called from a non-AST state or a less privileged mode.

The IPC routines that use a static area are:

In VMS Version 5.2, sockets should not be created or destroyed within ASTs.

A.1.2 Calling from KERNEL or EXEC Modes

Several IPC routines access files in order to retrieve their information. These routines should not be called from either the KERNEL or EXEC modes when ASTs are disabled. These IPC routines are:

A.1.3 Event Flags

IPC routines may use event flags during their operation. The event flags are assigned by using the library routine LIB$GET_EF and are released when the routine no longer needs them.

A.1.4 Suppressing DEC C Compilation Warnings

Certain parameters to the IPC routines may require type casting to suppress DEC C compilation warnings. Type casting is required because of parameter prototyping, which the DEC C header (.h) files have in order to be ANSI compliant. These header files are unlike ULTRIX header files, whose IPC routines are not parameter prototyped.

A.1.5 Header Files

It is acceptable to include header files on an OpenVMS system without using angle brackets (< >) or double quotes (" "). For example, #include types. This form of the #include preprocessor directive is possible on OpenVMS systems because all header files are located in a text library in SYS$LIBRARY. On ULTRIX systems, however, header files must be specified with angle brackets (< >) or double quotes (" ") and any subdirectories that are needed to locate a header file. For example, to include the header file socket.h, use the following form of the #include directive:

#include <sys/socket.h>


Previous Page | Next Page | Table of Contents | Index