Reference Guide
ZCOM C I/F Library Routines
ZSEND (3X)
Chapter 4 315
RETURN VALUE Routine zsend returns 0 if successful. Otherwise, a non-zero error code
is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM
error codes and their meanings.
If mode ZcMODE_WAIT is used and zsend returns with zero, rstat
contains the return status: 0 means successful, non-zero means there
was a problem with the send. zcomstatus(3X) may be used to retrieve a
status message, using request code ZCOM_MRQCODE_WRITE and
rstat.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
zaddr_type zaddr;
uint32 mode;
zmhd_type zmhd;
char ibuf[size]; /* where size is user-determined; must be >= len */
int32 len;
int32 waitstat;
if (ierr = zsend (&zaddr, mode, &zmhd, ibuf, len, &waitstat)) {
/* error return code */
}
else {
/* good return code */
}
FILES
SEE ALSO zcomstatus(3X), zcntl(3X), zread(3X), zopen(3X).
/opt/acc/include/zcom/zcomsys.h ZCOM system general include file,
containing data types, data
structures, constants, error codes,
masks, etc. Note that this must be the
first include file before any other
ZCOM include files.
/opt/acc/include/zcom/zcomcall.h ZCOM routine function prototypes
(requires ANSI C compilation).