HP Advanced Communications Controllers (ACC) manual Zclos, Cancellation point

Page 168

ZCOM C I/F Library Routines

ZCLOS (3X)

 

ZCLOS (3X)

NAME

zclos - Delete program input ZLU

SYNOPSIS

#include

<zcom/zcomsys.h>

#include

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

int32

zclos (zap)

zaddr_type *zap;

DESCRIPTION

Routine zclos closes the program ZLU set up by the zopen call and

 

returns the ZLU back to the system for reuse. This call should normally

 

always occur before a program terminates. If the program ZLU is not

 

closed, then the ZCOM subsystem will continue to hold all of the

 

resources associated with the ZLU and may add messages to the input

 

queue. This feature allows a program to open a ZLU on another

 

program’s behalf, or to be killed and rerun without losing any queued

 

messages. It is the programmer’s responsibility to ensure that all

 

unnecessary program ZLUs are closed before the program terminates.

 

If zclos is called to close a program’s primary ZLU, the program will no

 

longer have a primary ZLU. Usually, a program should open another

 

ZLU as the primary ZLU because some APIs may return an error if the

 

primary ZLU does not exist (e.g. zsend(3X)).

 

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

This routine may be called from multi-threaded application using the

Considerations

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.

168

Chapter 4

Image 168
Contents ACC Programmer’s Reference Guide Page Legal Notices Page Printing History First Edition February 2004 ReleaseRelated Documentation Software ManualsContents Zcom C I/F Library Routines Contents Contents Zcom Subsystem Introduction Zcom Software Overview Overview of Zcom Software Structure Zcom Subsystem Components Zcom Software Overview Zcom Concepts Definition and Features of ZLUs Program ZLUs Zcom Concepts User Interface References Zcom Message Handling Overview ZLU Definition Mapped ZLUs Message Queuing Program Message QueueingPhysical Terminal Table Priorities Multiplexing Outbound Multiplexing Inbound Multiplexing Inbound Multiplexing PTZRVR=PZLUTerminal State Terminal StateError Handling Error Handling Chapter Zcom Tables and Data Zcom Tables and Data Structures Memory Organization Memory OrganizationDifferences in 32-bit and 64-bit Data Structures ACC Zcom product to implement its functionality. These data Zcom Header Structure Zcom Header StructureField Name Field Description Field Type Size Bytes Hncard HnrespHnltql HnltslHndpid HndsigHnidle HnhighZcom Header Structure Zcom Header Structure Zcom Header Structure Zcom Header Structure Zcom Header Structure Ttgen Zcom Header Structure Queue Label Table QlbgrpQlbnam QlbqnbStorage Label Table Zcom Header Structure Node Entries Table Node Entries TableStats Data Structure FLAGS.eventFLAGS.valid FLAGS.statusHost Link Information Structure Node Entries Table ZLU Tables Individual ZLU Data Structure zlutypeZLU Type Values Type DescriptionZLU Tables Logical Terminal Tables Logical Terminal Table Reserved AreaField Name Field Description Size Type Bytes Logical Terminal Table User Maintainable Area 10 Logical Terminal Table User Maintainable Area SPARE2System Status flags Logical Terminal Tables LTCWCT, LTTXCT, LTRXCT, Lterct Message and error counters Logical Status Format LtstatLTINST, LTBRCH, LTWORK, Ltarea Terminal logical ID Physical Terminal Tables Physical Terminal Tables System AreaPhysical Terminal Tables User Maintainable Area Ptuser Physical Terminal Tables Physical Terminal Tables Physical Terminal Tables Terminal Status Field Ptdrst Physical Terminal Tables Physical Terminal Tables Interface Table Interface TableImaxterms Iportn Interface HPA Value Format Inhpa 63-32 31-2 27-18 17-1 13-12 10-6Symbol Value hex Meaning Interface Card Status IfstatScheduler Event Flags Ischdl Interface Table Interface Table CARD.MMP Structure CARD.BSP Structure Interface Table Itxlstx Express Transmit List Headers TmtailInterface Table Zcomipstattxbx Port Configuration Buffer Iportn 20 4-Channel E1/T1 ACC Card Format 31-30 29-26 26-22 21-20 19-16 15-11 10-0Fmode Port Subchannel Configuration Structure Timeslot Array Element Structure23 Subchannel Specification Array Element Structure 31-30 29-24 23-8Itbs INVInterface Table Optional E1/T1 Tunable Parameters Bquota Response Records Response Record FormatSymbol Value Meaning Response Type FieldZcomrptypebuffer Zcomrptyperemote100 Queue Header Free Queue Header Structure zfqhtypeQueue Header Structure zqhdtype QlimitQfdata QfuncChapter 103 Symbol Value Meaning Hex Queue Flag FormatChapter 105 Data Buffer Pool Organization of Buffer PoolChapter 107 Buffer Pool Layout when first initialized Linkage to the next buffer. zbhdtype. See -30 and Table System flags length & status Uns.intReserved, not used Int Pointer to next buffer on queue32 Buffer flags Bfflag Field Format FlagChapter 111 Message Header Message Header zmhdtypeMID MRQMessage ID Header zmidtype Message Type Mstype Response code for message type 2 and 10 Format 37 Response code for all other message typesLPR XPS PGW BFR DEF ERR LPRMessage Request Header zmrqtype Mrqcode Terminal request codes Request Value Description118 System Event Message zeventtype Structure Node Status Change Event Fields Zcomsetypenode NodenumNstat SpareDynamic Reconfiguration Event CfgclassCFGINFO1 Change in Card Status Event Zcomsetypecard Chapter 123 Zcom Kernel Data HPA Table EntriesHPA value of this interface Long Reserved for future use IntChapter 125 HPA value of I/F card Hpano Chapter 127 SYS structure Zcom system global information Current Zcom system status Current Zcom system status Higher Order BitsName Value hex State Debug Level Field Format Debug Level Field ValuesBit Name Value Meaning Hex Chapter 131 132 Linfo Structure Fields ZcglockZcmlock ZcrlockSuper IFT spinlock Zcslock Data Structure LockpRefcount Zcom C I/F Library Routines 136 Zinit Zcom library access initialization Initialization callInterface configuration calls ZLU information calls Zsend Send data buffer to ZLUZLU Definition Man Pages Cancellation point GetdeviceFork unsafe Chapter 143 Allocated memory when it is no longer needed Pointer to a data structure containing the fullDevice table. The device table is an array Zdevtype elementsDevice file, /opt/acc/cfg/zcomdevice Multiprotocol ACC Utilities ReferenceOpt/acc/cfg/zcomdevice.txt Zdgen1, malloc3CLtfind Zap LaddrLlen Ibuf Return ParamChapter 149 150 Ltqdget 152 Ltqdget 154 Ltqdput 156 Zcom error codes and their meanings Ltqdput158 Makezluname Returned Comment NameMYZLU01 Parameter and from the same TTY, the same ZLU name will be Be returnedChapter 161 Ptfind Chapter 163 Async-cancel unsafe Async-signal unsafePointer to a buffer into which the Zcom Physical terminal table data will be placedIerr != 0, then no data is moved into zptt Len Length in bytes of zptt buffer166 Chapter 167 Zclos Zclos Zcntl Zmodenowait ZmoderpterrsZmodedefstatus ZmoderpterrswbufMhp Multi-protocol ACC Programmers’ Reference GuideRstat ReturnParam Rtyp174 Chapter 175 176 Chapter 177 Zcomerror Not a cancellationPoint Err Error number Found, it uses the default message file default.msgFile zerrmsg.msg in /opt/acc/msg ZCOMMESSAGEPATH. If not 180 Async-cancel safe ZcomlnameZcomlog3x Zcomlog 184 Zcomatzerror ZcomatcharZcomatuchar Zcomatsint186 Chapter 187 Zcomstatus ACC Programmers Reference Guide under ‘ZCOM Status MessageChapter 189 Zconfig Node Destination node Cdata RdataReturn Param Response data Chapter 193 Zcomzconfigcntl ZcomzconfigsysZcomzconfigcard ZcomzconfigportZcomsetypereconfig DSC ControlConfiguration Data header.config Header.tag1 Header.tag2 Any valuesNo specific response data or error Header.configData.setctl.cfgclass Data.sysret.error Header.tag1 Header.tag2Data.setsys.sysname Data.setsys.qlimitChapter 199 Link an interface to different hardware Header.tag1 Header.tag2 Any values Data.setcard.iftnoData.setcard.itype Data.setcard.fnameData.cardret.error Data.cardret.iftnoData.setport.portno Data.setport.rcodeData.setport.spare Value Sync mode select Value Operating modeData.setport.cnfg Value Encoding modesParity select No ParityOdd parity Even parityValue Port mode 0001 300Value Rate 0000 150Frame mode parameter FmodValue Port mode 0000 Reserved Value Other port for clock synchronization PortValue T1 Transmit Attenuation Z7330B only 15 dB 22.5 dB Otherwise by default there is a delay to avoid Fast link-down optionMakes the line go down whenever loss of T1/E1 Frame synchronization is detected by the FalcLong-haul mode Z7330B only JT G.706 mode Z7330B onlyT1/ESF performance report messages suppressed Reduced corner frequency Z7330B onlyData.portret.iftno Data.portret.portno Data.portret.statusChapter 211 212 Configuration Data Header.actionData.setportsc.iftno Data.setportsc.portnoTransmit subch number Transmit fill mask Set to Receive subch number Receive fill maskChapter 215 Set to Mode Data.setportsc.ptcfg-ptinfo.subchb.specData.setportsc.len Data.setportsc.qlimitData.portscret.status 218 Chapter 219 220 Data.setterm.zaddr Data.setterm.daddrData.setterm.iftno Data.setterm.portnoData.setterm.ptt Response Data data.termret.zaddr 224 Chapter 225 Zeventrcvr Chapter 227 228 Chapter 229 ‘C’ structure for a Zcom Event Message is shown below ZcomsetypenodeChapter 231 232 Zgetshrcvrlist Zgetshrcvrlist Get list of current shared receiversType of data specified by the mode parameter. The list Is terminated by an entry with a zlu value of 0.Maximum number of receivers in each type of shared Receiver list is set to ZcMAXSHAREDRCVRS currentlyChapter 235 Zinfo Zinfo 238 Chapter 239 Zinit Default program ZLU queue limit Calling zinit. See zrntimer3X for more informationInitialization phase, before any threads are generated Following fields242 Zltmg Error codes and their meanings Zltmx 246 Chapter 247 Zltqueue Appln Queue Progra Returned Nmb Label UsageGloba Ccccc250 Chapter 251 Zltstore Zltstore Logical terminal table, for the storage Extension areaChapter 255 256 Zltup 258 Chapter 259 Zluopen Async-cancel Async-signalUnsafe Unsafe Fork unsafe262 Chapter 263 Zmapr Zmapr Zname Zname Zcom address Chapter 269 Zopen Chapter 271 Pflag NameLimit 273 Zpeek Chapter 275 Zport Chapter 277 For Z7200A, Z7340A and Z7400A ACC Interface cards StatCnfg Configuration data 32 bits Ecode Sync Mode Parity Clk Baud Pmode Pmode2 = Not UsedFM1 transition = FM0 transition = Value Parity select No Parity Odd parity Even parity PmodeValue Port mode Value Rate 0000 Use Baud2 1000 19,200T1 ESF Chapter 283 284 Chapter 285 286 Zptup 288 Zqmve 290 Chapter 291 Zqsze Zqhdp Return param 294 Chapter 295 Zread Chapter 297 Not require the returned message header. It is described Subsection on ‘Message Header’ in the Multiprotocol ACCProgrammers’ Reference Guide. See the data structure Zmhdtype in zcomsys.h for more detailNo error Ve Zcom error codeRstat Return status 300 Chapter 301 302 Chapter 303 Zrntimer Not a cancellation pointMeans setting the timeout values for ALL remote nodes Ttgen configuration file. If an unknown node number isSpecified, it is rejected with error -6 Zenode Timeout processing is activated on 1-second intervals306 Zsend Mhp-mid.ztagw2308 Null may be used if the return status is not required 310 Chapter 311 Mode=0 Mode=1 Mode=2 Mode=5 Mode=8 314 Chapter 315 Zsetql Chapter 317 318 Chapter 319 320 Zsetrcvr 322 Chapter 323 Rzap Chapter 325 Ztimr Chapter 327 328
Related manuals
Manual 54 pages 2.24 Kb