Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

socketpair(2) OSS System Calls Reference Manual
If the domain is AF_UNIX, the AF_UNIX transport-provider name determines if the socket is an
AF_UNIX Release 1 socket, an AF_UNIX Release 2 socket in compatibility mode, or an
AF_UNIX Release 2 socket in portability mode:
$ZPLS For systems running AF_UNIX Release 1, $ZPLS is the only supported
AF_UNIX transport-provider name and this name cannot be changed.
For systems running AF_UNIX Release 2 software, If the transport-provider
name is $ZPLS, the socket is created as an AF_UNIX Release 2 socket in com-
patibility mode. Sockets in compatibility mode can communicate with each other
but cannot communicate with sockets created in portability mode. The default
AF_UNIX transport-provider name is $ZPLS,
$ZAFN2 This transport-provider name is only valid for systems running AF_UNIX
Release 2 software. If the AF_UNIX transport-provider name is $ZAFN2, the
socket is created as an AF_UNIX Release 2 socket in portability mode. Sockets
created in portability mode can communicate with each other but cannot com-
municate with sockets created in compatibility mode.
For systems running AF_UNIX Release 2 software, the default AF_UNIX transport-provider
name is $ZPLS, which results in sockets created in compatibility mode. You can set the
transport-provider name using either the socket_transport_name_set() function or the Guardian
DEFINE =_AFUNIX_PROCESS_NAME. This Guardian define must be a MAP DEFINE with a
FILE attribute string of the desired AF_UNIX transport-provider name.
For more information about AF_UNIX Release 2 sockets, portability mode, and compatibility
mode, see the Open System Services Programmer’s Guide.
Use From the Guardian Environment
The socketpair() function is one of a set of functions that have these effects when the first of
them is called from the Guardian environment:
Two Guardian file system file numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These file numbers cannot
be closed by calling the Guardian FILE_CLOSE_ procedure.
The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
The use of static memory by the process increases slightly.
These effects occur only when the first of the set of functions is called. The effects are not cumu-
lative.
NOTES
This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified
when you compile the module.
Preventing Memory Conflicts
OSS socket applications use QIO shared memory to exchange data with the OSS transport agent.
QIO uses some areas of memory for internal message processing, and it is necessary to prevent
OSS socket applications from using overlapping memory ranges. Do either of the following
things to prevent memory conflicts between your socket application and QIO:
If possible, do not specify a flat segment address; instead allow the operating system to
allocate a starting region for you by specifying a null pointer as the second parameter in
the call to the shmat() function, as shown:
char *base_Ptr = shmat(shmid, (void*) 0, shmflag);
7120 Hewlett-Packard Company 527186-023