Reference Guide

ZCOM C I/F Library Routines
ZPORT (3X)
Chapter 4286
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)