HP UX 11i v1 I/O Cards manual

Models: UX 11i v1 I/O Cards

1 298
Download 298 pages 31.75 Kb
Page 261
Image 261

ZCOM C I/F Library Routines

zport (3X)

RETURN VALUE Routine zport returns 0 if successful. Otherwise, a non-zeroerror code is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM error codes and their meanings.

When zport returns a zero error code, the return status stat indicates the completion status: zero means successful, while non-zero values indicate the reason for the problem. Note that status code 4, 5, 6, and 7 implies the associated port will now be inoperative. Another zport configuration request must be done to recover it.

EXAMPLE

This example puts an E1/T1 port into “loopback” (tristate) mode.

#include

<zcom/zcomsys.h>

#include

<zcom/zcomcall.h>

int32

 

ierr;

uint32

iftno;

uint32

portno;

uint32

rcode;

uint32

action;

zpconf_type

cnfg;

int32

 

stat;

iftno

= 1;

/* ACC MUX number 1 in TTGEN configuration file. */

portno = 2;

/* Port #2 */

rcode

= 2;

/* We are providing the configuration in “cnfg”. */

action = ZCOM_ZMUXPORT_PORT; /* Set only the port mode (Pmode, Pmode2) */ cnfg.e1t1_bits.pmode = 0x8;

if (ierr = \fBzport\fR (iftno, portno, rcode, action, cnfg, &stat)) { /* error return code */ } else if (stat)

{

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

SEE ALSO

zconfig(3X)

 

Chapter 4

261

Page 261
Image 261
HP UX 11i v1 I/O Cards manual