Reference Guide

ZCOM C I/F Library Routines
ZLUOPEN (3X)
Chapter 4260
ZLUOPEN (3X)
NAME zluopen – Open a ZLU file
SYNOPSIS
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */
int zluopen (zap, mode, fd)
zaddr_type *zap;
int mode;
int *fd;
DESCRIPTION Routine zluopen opens the device file associated with a program ZLU for
use with the standard HP-UX file access routines. The zap parameter
points to the program ZLU to be accessed. If successful, a file descriptor
for the opened program ZLU device file is returned through the fd
pointer. The mode parameter is intended for a future enhancement and
is not used at this time. For future compatibility, mode should be set to
zero.
The zluopen routine only allows opening the device files for the range of
program ZLUs in the local system. If zap specifies a terminal ZLU, or a
ZLU on remote node, the request will also be rejected with an error.
In the current implementation of ZCOM, only the select and close
functions are allowed on the returned file descriptor. Other operations
(such as read and write) will result in error ENOSYS (Function is not
available). A select for read on the returned file descriptor is to check
whether input data is available on a program ZLU. A select on write on
the returned file descriptor will always return TRUE, while a select on
exception always returns FALSE.
The libraries libzcom_c.a and libpthread.a must be linked into the calling
program by giving the options “-lzcom_c -lpthread” to cc(1) or ld(1).