Reference Guide

ZCOM C I/F Library Routines
LTFIND (3X)
Chapter 4 147
LTFIND (3X)
NAME ltfind – Find specific logical terminal in a group
SYNOPSIS
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h> /* if compiled with ANSI C
(recommended) */
int32 ltfind (zap, laddr, llen, ibuf, len)
zaddr_type *zap;
char *laddr;
int32 llen;
char *ibuf;
int32 len;
DESCRIPTION Routine ltfind searches through the group linkage in the logical terminal
table, for the logical terminal with the specified logical address.
Group linkages are set up by TTGEN to form a circular list of logical
terminals that are associated with the same physical terminal table. The
linkages and logical addresses are defined using the PTERM and
LTERM statements in the TTGEN configuration file.
Typically, these linkages are used in a multiplexing environment: a lower
level protocol receives multiplexed messages, which contain ID codes for
a higher level protocol to further differentiate the data messages. In such
cases, the logical terminals may have unique ID codes as their logical
addresses, and ltfind is used to locate a logical terminal ZLU with a
specified ID code.
Normally, the logical addresses (maximum of 10-bytes) of a group of
logical terminals should be unique within that group.
The libraries libzcom_c.a and libpthread.a must be linked into the calling
program by giving the options “-lzcom_c -lpthread” options to cc(1) or
ld(1).