HP UX 11i v1 I/O Cards manual 142

Models: UX 11i v1 I/O Cards

1 298
Download 298 pages 31.75 Kb
Page 142
Image 142

 

ZCOM C I/F Library Routines

 

LTFIND (3X)

 

NOTES

The returned logical terminal table consists of the basic table and the

 

logical terminal table extension (the extension size is configurable in the

 

TTGEN configuration file). The size of this buffer should be large enough

 

to hold the information required from the LTT. An example of defining a

 

buffer of sufficient size would be:

 

struct {

 

 

zltt_type

sys;

 

char

ext[ZCOM_MAXLSIZE]; /* Max allowable extension */

 

ltt;

 

 

For example, to access the fields:

 

ltt.sys.ltname

gives the terminal name

 

ltt.ext[0]

gives the 1st byte in table extension

 

This allows <t to be used instead of ibuf in the ltfind call.

EXAMPLE

 

 

#include

<zcom/zcomsys.h>

 

#include

<zcom/zcomcall.h>

 

int32

ierr;

 

zaddr_type zaddr;

 

char

laddr[10];

 

int32

llen;

 

char

ibuf[size]; /* where size is user-determined; must be >= len */

int32

len;

 

if (ierr = ltfind (&zaddr, laddr, llen, ibuf, len)) { /* error return code */

}

else {

/* good return code */

}

142

Chapter 4

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