Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ACC Programmer's Reference Guide > Chapter 4 ZCOM C I/F Library Routines

ZPTUP (3X)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

zptup - Update physical terminal table user area

SYNOPSIS

#include  <zcom/zcomsys.h>
#include <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */

int32 zptup (zap, ibuf, len, offset)

zaddr_type *zap;
char *ibuf;
int32 len;
int32 offset;

DESCRIPTION

Routine zptup is used to update information in the user area of the physical terminal table. This user area contains transmit and receive message counters as well as error counters and special configuration information specific to the protocol being used. For example, if the terminal is using X.25 packet switching, it would hold X.25 related details. See under the section on the physical terminal tables.

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).

Threads Considerations

This routine may be called from a multi-threaded application using the POSIX (1003.1c) kernel threads API package. This routine has the following characteristics when called by a multi-threaded application:

cancellation point

Thread cancellation can occur when a thread calls this routine.

async-cancel unsafe

The calling thread's cancelability type must be PTHREAD_CANCEL_DEFERRED if cancellation is enabled.

async-signal unsafe

It cannot be called from a signal handler.

fork unsafe

It cannot be called by a child process after fork(2) but before exec(2).

PARAMETERS

zap

ZCOM address of the physical terminal table to update.

ibuf

Data buffer holding the information to place into the PTT.

len

Number of bytes of data to copy from ibuf into the PTT.

offset

Byte offset within the physical terminal table from where the update should begin.

RETURN VALUE

Routine zptup 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.

EXAMPLE

#include     <zcom/zcomsys.h>
#include <zcom/zcomcall.h>

int32 ierr;
zaddr_type zaddr;
char ibuf[size]; /* where size is user-determined; must be >= len */
int32 len;
int32 offset;

if (ierr = zptup (&zaddr, ibuf, len, offset)) {
/* error return code */
}
else {
/* good return code */
}

FILES

/opt/acc/include/zcom/zcomsys.h

ZCOM subsystem 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).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.