1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /********************************************************************20**
25 Desc: Defines required by two or more layer service user
30 *********************************************************************21*/
37 #define RTLIN_DUMP_DEBUG printf
39 /* Protocol Address Structure related defines ..*/
40 #define MAX_PROTADDR_LEN 16 /* Right now defined for IP, IPX
43 #define MAX_PROT_ADDRS 4 /* Number of Protocols supported */
45 /* addrs structure for xxConReq, xxDiscReq, xxCfgReq */
47 #define ADRLEN 20 /* Address Length */
48 #define SHRTADRLEN 32 /* Short Addres Length */
49 #define LNGADRLEN 64 /* Long Address Length */
51 /* token or element header values */
53 #define NOTPRSNT 0 /* not present */
54 #define PRSNT_NODEF 1 /* present - no default */
55 #define PRSNT_DEF 2 /* present - default */
57 #define MF_SIZE_TKNSTRS 22 /* token string size - small */
58 #define MF_SIZE_TKNSTRM 32 /* token string size - medium */
59 #define MF_SIZE_TKNSTR 132 /* token string size - regular */
60 #define MF_SIZE_TKNSTRE 255 /* token string size - extra large */
61 #define MF_SIZE_TKNBITS 7 /* token bits size */
63 #define NOTUSED 0 /* not used */
67 #ifndef CMFILE_REORG_1
69 /* MAC address length */
71 #define MACADDRLEN 6 /* 48 bit MAC address length */
73 /* maximum sizes for typedef arrays */
75 #define MAX_LANNAME 32 /* size of LAN name string */
76 #define MAX_MACADDRTBL 16 /* size of MAC address table */
77 #define MAX_RDTBL 16 /* size of route descriptor table */
78 #define MAX_TLV_LEN 4 /* max length of value in TLV entry */
79 #define MAX_TLV_TBL 16 /* size of TLV table */
82 #endif /* CMFILE_REORG_1 */
85 /* defines for SPstTsk */
87 #define SEL_LC_NEW 0 /* loosely coupled interface - new */
88 #define SEL_LC_OLD 1 /* loosely coupled interface - old */
93 /* Mngmt.hdr.msgType */
95 #define TCFG 1 /* configuration */
96 #define TCNTRL 2 /* control */
97 #define TSTS 3 /* statistics */
98 #define TSSTA 4 /* solicited status */
100 #define TUSTA 5 /* unsolicited status */
101 #define TTRC 6 /* trace */
102 #define TACNT 7 /* billing */
103 #define TUDAT 8 /* unit data */
104 #define TWRMSTRT 9 /* warm start */
105 #define TSWP 10 /* swapping */
106 #define TSNAP 11 /* register snapshot */
107 #define TUCFG 12 /* unconfig */
108 #define TSNMP 13 /* snmp req */
109 #define TOBJ 14 /* obj req */
110 #define TMIB 15 /* mib req */
111 /* gen_h_001.main_124 RRC 2.0 Release*/
112 #define TAUDT 16 /* Audit req */
115 /* Mngmt.hdr.elmId.elmnt */
117 #define STGEN 1 /* general */
118 #define STSID 8 /* system id */
120 #define STTSAP 2 /* transport SAP */
121 #define STNSAP 3 /* network SAP */
122 #define STLLSAP 4 /* logical link SAP */
123 #define STDLSAP 5 /* data link SAP */
124 #define STMSAP 6 /* MAC SAP */
125 #define STPSAP 7 /* physical SAP */
126 #define STHG 9 /* hunt Group */
127 #define STROUT 10 /* route */
128 #define STDLC 11 /* data link connection */
129 #define STINTCUG 12 /* international cugs */
130 #define STBCHNPROF 13 /* B channel profile */
131 #define STPVC 14 /* PVC configuration */
132 #define STMCGRP 15 /* multicast group */
133 #define STFRROUT 16 /* frame relay route */
134 #define STDCHAN 17 /* X.31 D channel */
135 #define STADRMAP 18 /* address mapping */
136 #define STDELADRMAP 19 /* delete X.31 address mapping */
138 #define STLOOP 20 /* loop */
139 #define STREG 21 /* region */
140 #define STDPOOL 22 /* dynamic pool */
141 #define STSPOOL 23 /* static pool */
142 #define STDQ 24 /* demand queue */
143 #define STENT 25 /* entity */
144 #define STTSK 26 /* task */
146 #define STDELROUT 30 /* delete route */
147 #define STDELPVC 31 /* delete PVC */
148 #define STIFDSTADR 32 /* interface destination address */
150 #define STLNKSET 33 /* link set */
151 #define STISAP 34 /* isup SAP */
152 #define STICIR 35 /* isup circuit */
153 #define STSPSAP 36 /* tcap lower sccp sap */
154 #define STTCUSAP 37 /* tcap upper user sap */
155 #define STTPSAP 38 /* tup SAP */
156 #define STTPCIR 39 /* tup circuit */
157 #define STVCC 40 /* virtual channel connection */
158 #define STCGPTYNMB 41 /* calling party number */
159 #define STWPSAP 42 /* wrapper SAP */
160 #define STAALSAP 43 /* AAL SAP */
161 #define STLANDST 44 /* LAN destination */
162 #define STLES 45 /* LAN Emulation Server */
163 #define STBUS 46 /* LAN Emulation Broadcast Server */
165 /* used by mtp level 3 */
167 #define STDLSAPACT 47 /* data link SAP - initial state = ACTIVE */
168 #define STDLSAPDIS STDLSAP /* data link SAP - initial state = DISABLED */
169 #define STTFCMTRC 49 /* traffic metrics */
170 #define STPNNBR 50 /* PNNI Neighbor */
171 #define STPNPTSE 51 /* PNNI PTSE */
172 #define STLECS 52 /* LECS */
173 #define STLECSLES 53 /* LECS LES */
174 #define STLECSROUT 54 /* LECS ROUT */
175 #define STERR 55 /* Software Error */
177 #define STMAP 56 /* map */
178 #define STMAPNODE 57 /* node map */
179 #define STRCC 58 /* Routing Control Channel */
180 #define STRTEADDR 59 /* route to address */
181 #define STRTENODE 60 /* route to node */
182 #define STRTETNS 61 /* route to transit network */
183 #define STRTETBL 62 /* routing table */
184 #define STPNPG 63 /* PNNI PEER GROUP */
185 #define STLINK 64 /* ATM Physical Link */
186 #define STINFOGRP 65 /* information group */
187 #define STNISAP 66 /* FR-ATM network interworking sap */
188 #define STSISAP 67 /* FR-ATM service interworking sap */
189 #define STPROF 68 /* FR-ATM aal connection's profile */
190 #define STNETPFX 69 /* network prefix */
191 #define STUSRPART 70 /* user part */
192 #define STADDR 71 /* address */
193 #define STSRVC 72 /* service registry */
194 #define STCIPSAP 73 /* PLOA's CIPSAP */
195 /* define for Envelope Function EFadr mapping */
196 #define STEVEFADR 74 /* EV EFadr to SAP mapping */
198 /* Used by PNNI for horizontal link hello protocol and summary addresses */
199 #define STHLHP 75 /* Horizontal link hello protocol */
200 #define STSUMMADDR 76 /* Summary addresses */
202 /* used by LEC for static ARP entry */
203 #define STSTAARP 77 /* static ARP entry */
205 /* used by PQ for TDM Configuration */
206 #define STTDM 78 /* TDM Configuration */
209 #define STLECSMPOATLV 79 /* LECS MPOA TLV entry */
211 #define STMPCCP 80 /* PLOA's MPC Control Point */
212 #define STMPSAP 81 /* PLOA's MPC/MPS SAP */
213 #define STMPSCP 82 /* PLOA's MPS Control Point */
215 /* used for group saps */
216 #define STGRTSAP 85 /* transport sap group */
217 #define STGRNSAP 86 /* netwrok sap group */
218 #define STGRDLSAP 87 /* data link sap group */
219 #define STALLSAP 88 /* all upper/lower SAPs */
220 #define STPEERSAP 89 /* configure peer sap */
222 #define STVINTERFACE 83 /* V5 Interface */
223 #define STVPORT 84 /* V5 port */
224 #define STVLINK 85 /* V5 Link */
226 /* Used by PLOA-CIP */
227 #define STCIPPVC 86 /* PLOA Cfg. request to configure some
228 more PVC on the fly */
229 #define STCIPARP 87 /* PLOA Cfg. request to configure some
230 extra IP-ATM binding on the fly */
231 /* used by Q.93B for AalConParam of signaling channels */
232 #define STSIGCONPARAM 90 /* config Signaling connection parameters */
233 #define STDELSIGPARAM 91 /* Delete Signaling connection parameters */
235 /* used by System Manager */
236 #define STVPROC 92 /* Configure virtual node */
237 #define STPPROC 93 /* Configure physical node */
238 #define STASSOC 94 /* Configire association between vnodes */
240 /* used by TCAP over TCP/IP */
241 #define STSERVER 95 /* configure TCP/UDP server */
243 /* Used by Lan Emulation Services */
244 #define STLECSTLV 96 /* PLOA LECS TLVs */
245 #define STLESLEC 97 /* PLOA LEC in LES database */
246 #define STLESSMS 98 /* PLOA Multicast Server Known to LES */
247 #define STLESLECSMS 99 /* PLOA LEC assoc. with SMS */
248 #define STBUSLEC 100 /* PLOA LEC in BUS Database */
249 #define STSMS 101 /* PLOA LANE Selective M-cast Server */
250 #define STSMSGRP 102 /* PLOA SMS Multicast Group */
251 #define STSMSLEC 103 /* PLOA LEC Associated with SMS */
252 /* used by PLOA - PPPoA */
253 #define STMASAP 104 /* POOA MASAP - PPPoA upper SAP */
256 #define STTFCMTRCNODE 105 /* configure metrics of the lowest level
258 #define STNHSSAP 106 /* PLOA NHS SAP */
259 #define STMPSDISCTBL 107 /* PLOA MPS */
260 #define STMPSINGRTBL 108 /* PLOA MPS */
261 #define STMPSEGRTBL 109 /* PLOA MPS */
262 #define STARISAP 110 /* PLOA ARI Sap */
264 #define STNHSCP 111 /* PLOA NHS */
265 #define STNHSNXTHOP 112 /* PLOA NHS */
266 #define STNHSTRCACHE 113 /* PLOA NHS */
267 #define STNHSEXTNS 114 /* PLOA NHS */
268 #define STNHSEGRCACHE 115 /* PLOA NHS */
269 #define STNHSVENDATA 116 /* PLOA NHS */
270 /* used by H.323 Control */
271 #define STSSAP 117 /* H.323 Session SAP element */
272 #define ST323ENT 118 /* H323 entity element */
273 #define STCALL 119 /* H.323 call element */
274 #define STGRSSAP 120 /* H.323 group SSAP */
276 /* used by Q.93B for SVPC status */
277 #define STVPC 121 /* Switched virtual path */
279 #define STCIPSRVR 122 /* PLOA CIP Server */
281 /* used by RTP/RTCP */
282 #define STSESSION 123 /* RTP session */
285 #define STCTLDPCB 124 /* Configure controlled interface */
287 #define STGCPENT 125 /* MGCP peer entity */
290 #define STNW 126 /* Network */
291 #define STASSO 127 /* SCCP GTT Association */
292 #define STDELASSO 128 /* SCCP Delete GTT Association */
294 /* Used by IME auto configuration of PVCs */
295 #define STSRVCTYPE 129 /* service type */
296 #define STSRVCCONNINFO 130 /* service connection info */
297 #define STAALPROFILE 131 /* AAL[x] profiles; x = 1, 2, 34, 5 */
298 /* used by MPLS-LDP (+CR) */
299 #define STPEER 132 /* LDP Peer */
300 #define STFEC 133 /* MPLS FEC */
301 #define STEXPRTE 134 /* CR-LDP Explicit Route */
302 #define STRMSAP 135 /* LDP RM SAP */
303 #define STINT 136 /* LDP Interface */
304 #define STROUTSAP 137 /* LDP ARI SAP */
305 #define STFWDSAP 138 /* LDP Forwarder SAP */
306 #define STSESS 139 /* LDP Session */
307 #define STADDRESS 140 /* LDP Address */
309 /* used by AAL2 Signaling */
310 #define STALTSAP 141 /* AAL2 Service user */
311 #define STSNTSAP 142 /* MTP3B SAP */
312 #define STGRALTSAP 143 /* ALT Group */
313 #define STGRSNTSAP 144 /* SNT Group */
314 #define STPATH 145 /* AAL2 path */
315 #define STDPC 146 /* DPC - MTP3B */
316 /* used by Annex G */
318 #define STGRBESAP 148
321 /* used by PLOA-PXY */
322 #define STPXYSAP 151 /* PLOA PXY SAP configuration */
323 #define STCIPARPENT 152 /* PLOA StaReq & CntrlReq for single arpEnt */
324 #define STMACONLST 153 /* PLOA StaReq for list of conns */
325 #define STMACON 154 /* PLOA StaReq for single conn */
329 #define STSIPENT 155 /* SIP Entity */
331 /* Used by GCP 1.2 and above */
332 #define STGCPMGC 156 /* MGC Entity */
333 #define STGCPMG 157 /* MG Entity */
335 /* Used bu HU - H.323 Service User */
338 /* new elements added in sccp3.2 */
339 #define STNIDPC 159 /* NID to DPC mapping */
340 #define STNWSS7 160 /* NW specific NID to SS7-NID mapping */
341 #define STTRFLIM 161 /* Traffic limitation data config */
342 #define STMSGIMP 162 /* Message importance data config */
344 /* new elements for SCCP */
345 #define STDELNW 163 /* delete network */
346 #define STDELTSAP 164 /* delete transport sap */
347 #define STDELNSAP 165 /* delete network sap */
348 /* new elements for 3GPP-RLC */
349 #define STCRSAP 166 /* RLC Control SAP */
350 #define STRLSAP 167 /* RLC Data SAP */
351 #define STMKSAP 168 /* RLC MAC SAP */
353 /* new elements for 3GPP-NBAP */
354 #define STNBUSAP 169 /* Upper SAP to NBAP */
355 #define STIBPROT 170 /* NBAP Protocol */
357 /* new elements for MPLS-RSVP (+TE) */
358 #define STLASAP 171 /* MPLS-Appl. Sap */
359 #define STNBR 172 /* RSVP Neighbor */
360 #define STRVINT 173 /* RSVP Interface */
361 #define STLTSAP 174 /* MPLS Resource Manager SAP */
363 /* new elements for FP */
364 #define STCSAP 175 /* FP Control User */
365 #define STUSAP 176 /* FP Data User */
366 #define STTPTENDP 177 /* SCTP endpoint */
368 /* new elements for LAPDm */
372 /*gen_h_001.main_127 - incremented values*/
373 /* gen_h_001.main_123 - Add new elements for 3GPP-PDCP */
374 #define STCTSAP 180 /* PDCP Control SAP */
375 #ifndef QC /* gen_h_001.main_136: Fixing compilation warnings */
377 #define STTCSAP 181 /* PDCP Data SAP */
380 #define STPDCPENT 182 /* PDCP Entity */
381 /*-- gen_h_001.main_130 --*/
382 #define STINST 183 /* IuUP Instance */
384 /* gen_h_001.main_134 - lte rlc 2.1 */
385 /* elements for NR RLC SAPs */
386 #define STCKWSAP 184 /*!< RLC Control SAP element. */
387 #define STKWUSAP 185 /*!< RLC Data SAP element. */
388 #define STRGUSAP 186 /*!< RLC MAC SAP element. */
389 /* elements for LTE-PDCP SAPs */
391 #define STRMUSAP 189 /*!< LTE RRM control SAP element. */
395 /* Mngmt.t.cntrl.action, Mngmt.hdr.elmId.elmntInst1 */
397 #define AENA 1 /* enable */
398 #define ADISIMM 2 /* disable - immediately */
399 #define ADISGRC 3 /* disable - gracefully */
400 #define ARST 4 /* reset */
401 #define ADEL 7 /* delete */
402 #define ABND 30 /* bind */
403 #define AUBND 31 /* disable + unbind */
404 #define AUBND_DIS AUBND /* unbound disable */
406 /* actions for mtp3 */
408 #define ADELROUT 32 /* delete rout control block */
409 #define ADELLNKSET 33 /* delete all linkset control blocks, link control blocks
410 for a given linkset id */
411 #define ADELCMBLNKSET 34 /* delete linkset control block for a given combined linkset id */
412 #define ADELLNK 35 /* delete link control block */
414 #define ASHUTDOWN 36 /* shutdown the layer */
416 #define ATRAP 37 /* trap */
417 #define AGEN_STA 38 /* generate status indications -MSOC */
418 /* actions for fault tolerance */
419 #define AGO_ACT 38 /* go active */
420 #define AGO_SBY 39 /* go standby */
421 #define AWARMSTART 40 /* start warm start */
422 #define AABORT 41 /* abort warm start or controlled sw */
423 #define ASYNCHRONIZE 42 /* start controlled switchover */
424 #define ANOACT 43 /* null action (nop) */
425 #define AHOLDQUEUE 44 /* hold queue, for the message router */
426 #define ARLSQUEUE 45 /* hold queue, for the message router */
427 #define APEER_PING 46 /* peer ping, for peer system agent */
428 #define ADIS_PEER_SAP 47 /* enable/disable peer sap */
429 #define AGEN_FAULT 48 /* fault injection action */
430 #define AAUDIT 49 /* Perform Audits on the layer */
431 #define ADISIMM_L2 50 /* Disable Layer 2 only */
432 #define ADEACTLNKSET_L2 51 /* deactivate link set: all links should be deactivated
434 #define AGEN_MSG 52 /* message generation control action */
436 #define ASNDTRIGG 53 /* Generate Flow detection trigger */
438 #define AXIDINI 54 /* GPRS: start XID initialization */
439 #define APMLEN 55 /* GPRS: change the N202 value of
441 /* For Q.930/Q.931 */
442 #define AADD_BCHAN 56 /* Provision B Channel */
443 #define ADEL_BCHAN 57 /* De-Provision B Channel */
444 #define AMOOS 58 /* Put the D-Channel MOOS State */
445 #define ASRVMSG_ON 59 /* Turn on service message capability */
446 #define ASRVMSG_OFF 60 /* Turn off service message capability */
447 #define ARESTART 61 /* Restart Interface/Channel */
448 /* For TCR 0004.01 */
449 #define AMODIFY 62 /* Modify trace length */
451 /* For AAL2 Signaling */
452 #define ASTOPRST 63 /* Stop Reset procedure */
453 #define ABLK 64 /* Block Procedure - AAL2 */
454 #define AUBLK 65 /* unblock procedure */
457 #define AHANDOFF 66 /* Handoff procedure */
458 #define AMATEDCFG_ADD 67 /* Configure MG as mated pair */
459 #define AMATEDCFG_RMV 68 /* Disassociate two MGs which were in a mated
461 #define AFAILOVER 69 /* Failover Procedure */
463 #define AADD_ASSOC_TPTSRV 70 /* Add transport server association */
464 #define ADEL_ASSOC_TPTSRV 71 /* Delete transport server association */
465 /* for SCCP congestion control (sccp3.2) */
466 #define ACONG 72 /* congestion cntrl - start sending SSC */
468 #define ASTRTOAMLL 72 /* OAM Start Loopback */
469 #define AENDOAMLL 73 /* OAM End Loopback */
470 #define ASTRTPMG 74 /* OAM Start Performance Monitoring and Generation */
471 #define AENDPMG 75 /* OAM End Performance Monitoring and Generation */
472 #define ASTRTPM 76 /* OAM Start Performance Monitoring */
473 #define ASTRTPG 77 /* OAM Start Performance Generation */
474 #define ASTRTPMLL 78 /* OAM Start PM Loopback of FMC's */
475 #define AENDPMLL 79 /* OAM End Performance Generation */
476 #define ARSTPM 80 /* OAM Reset counters of PM block */
477 #define AMODABORT 81 /* Abort Modification Request */
478 #define AADD_ASSOC_ENDP 82
479 #define ADEL_ASSOC_ENDP 83
480 /* for support of adding/deleting PC (sccp3.2) */
481 /* gen_h_001.main_121 - Support for adding/deleting PC */
484 /* gen_h_001.main_126 - Addition - New hash defines start/stop of MTP3 Audit */
485 /* gen_h_001.main_127 - changed macro values */
486 #define ASTRT_AUDIT 90
487 #define ASTOP_AUDIT 91
488 #define ASTRT_LNK_AUDIT 92
489 #define ASTRT_LNKSET_AUDIT 93
490 #define ASTRT_RTE_AUDIT 94
491 #define ASTOP_LNK_AUDIT 95
492 #define ASTOP_LNKSET_AUDIT 96
493 #define ASTOP_RTE_AUDIT 97
494 /* gen_h_001.main_125 - Addition - SUA support*/
498 #define ADEL_ASPSSN 88
499 #define ADEL_ASPCPC 89
501 /* Added for NBAP to support SCT(SCTP) as lower interface */
504 #define AESTABLISH 102
505 #define ATERMINATE 103
506 #define AHBEAT_ENB_ASSOC 104
507 #define AHBEAT_DIS_ASSOC 105
508 #define AHBEAT_ENB_DSTADDR 106
509 #define AHBEAT_DIS_DSTADDR 107
511 /* Mngmt.t.cntrl.subAction */
513 #define SAELMNT 1 /* specified element */
514 #define SAACNT 2 /* accounting generation */
515 #define SAUSTA 3 /* unsolicited status generation */
516 #define SATRC 4 /* trace generation */
517 #define SADBG 5 /* debugging */
518 /* defines for MxxStsReq */
520 #define ZEROSTS 0 /* zero statistics counters */
521 #define NOZEROSTS 1 /* dont zero statistics counters */
523 /* defines for MxxCfgReq */
525 #define THRSHA 0 /* 00% resources available */
526 /* scc drops frames */
527 #define THRSHB 1 /* 10% resources available */
528 /* lapb and lapd send rnr frames */
529 #define THRSHC 2 /* 20% resources available */
530 /* lapb and lapd send rr frames */
531 #define THRSHD 3 /* 30% resources available */
532 /* x.25 es and x.25 is send reset packets */
533 #define THRSHE 4 /* 40% resources available */
534 /* x.25 es and x.25 is send clear packets */
535 /* to call packets */
536 #define LSAP 1 /* Link Level SAP Type */
537 #define XTSAP 2 /* Transport SAP Type */
542 #define IGNORE 0 /* Ignore SAP Type */
544 #define IGNORE 0 /* Ignore SAP Type */
549 #ifndef CMFILE_REORG_1
551 /* defines for Q.93B */
553 /* parameter values that are at management and at upper interface */
554 /* addressing related defines */
556 /* maximum size of VCC table */
557 #define MAX_ATMVCCTBL_SZ 16
559 /* maximum number of ATM addresses in the ATM address table */
560 #define MAX_ATMADDRTBL_SZ 4
562 /* authority and format identifiers for OSI NSAP addresses */
564 /* low layer information - layer 2 id */
566 #define AM_LLI_L2ID 2 /* layer 2 id */
568 /* low layer information - layer 2 protocol */
570 #define AM_LLI_L2PROT_ISO1745 0x01 /* basic mode ISO 1745 */
571 #define AM_LLI_L2PROT_Q921 0x02 /* CCITT Rec. Q.921 */
572 #define AM_LLI_L2PROT_X25LNK 0x06 /* CCITT Rec. X.25, link layer */
573 #define AM_LLI_L2PROT_X25MLNK 0x07 /* CCITT Rec. X.25, multilink */
574 #define AM_LLI_L2PROT_LAPB 0x08 /* extended LAPB (half duplex) */
575 #define AM_LLI_L2PROT_HDLC_ARM 0x09 /* HDLC ARM (ISO 4335) */
576 #define AM_LLI_L2PROT_HDLC_NRM 0x0a /* HDLC NRM (ISO 4335) */
577 #define AM_LLI_L2PROT_HDLC_ABM 0x0b /* HDLC ABM (ISO 4335) */
578 #define AM_LLI_L2PROT_LLC 0x0c /* LAN LLC (ISO 8802/2) */
579 #define AM_LLI_L2PROT_X75SLP 0x0d /* CCITT Rec. X.75 SLP */
580 #define AM_LLI_L2PROT_Q922 0x0e /* CCITT Rec. Q.922 */
581 #define AM_LLI_L2PROT_USER 0x10 /* user specified */
582 #define AM_LLI_L2PROT_ISO7776 0x11 /* ISO 7776 DTE-DTE operation */
584 /* low layer information - layer 2 mode of operation */
586 #define AM_LLI_L2MODE_NORMAL 1 /* normal mode of operation */
587 #define AM_LLI_L2MODE_EXT 2 /* extended mode of operation */
589 /* low layer information - layer 2 Q.933 use */
591 #define AM_LLI_L2Q933_USE 0 /* when Rec. Q.933 coding not used */
593 /* low layer information - layer 3 id */
595 #define AM_LLI_L3ID 3 /* layer 3 id */
597 /* low layer information - layer 3 protocol */
599 #define AM_LLI_L3PROT_X25PKT 0x06 /* CCITT Rec. X.25, packet layer */
600 #define AM_LLI_L3PROT_ISO8208 0x07 /* ISO/IEC 8208 */
601 #define AM_LLI_L3PROT_ISO8878 0x08 /* X.223/ISO 8878 */
602 #define AM_LLI_L3PROT_ISO8473 0x09 /* ISO/IEC 8473 */
603 #define AM_LLI_L3PROT_T70 0x0a /* CCITT Rec. T.70 */
604 #define AM_LLI_L3PROT_ISO9577 0x0b /* ISO/IEC TR 9577 */
605 #define AM_LLI_L3PROT_USER 0x80 /* user specified */
607 /* low layer information - layer 3 mode of operation */
609 #define AM_LLI_L3MODE_NORMAL 1 /* normal packet sequence numbering */
610 #define AM_LLI_L3MODE_EXT 2 /* extended packet sequence numbering */
612 /* low layer information - layer 3 default packet size */
614 #define AM_LLI_L3PKTSIZE_16 0x04 /* default packet size 16 octets */
615 #define AM_LLI_L3PKTSIZE_32 0x05 /* default packet size 32 octets */
616 #define AM_LLI_L3PKTSIZE_64 0x06 /* default packet size 64 octets */
617 #define AM_LLI_L3PKTSIZE_128 0x07 /* default packet size 128 octets */
618 #define AM_LLI_L3PKTSIZE_256 0x08 /* default packet size 256 octets */
619 #define AM_LLI_L3PKTSIZE_512 0x09 /* default packet size 512 octets */
620 #define AM_LLI_L3PKTSIZE_1024 0x0a /* default packet size 1024 octets */
621 #define AM_LLI_L3PKTSIZE_2048 0x0b /* default packet size 2048 octets */
622 #define AM_LLI_L3PKTSIZE_4096 0x0c /* default packet size 4096 octets */
624 /* low layer information - layer 3 ISO/IEC TR 9577 Initial Protocol Id */
626 /* ec005.12: corrected value */
627 #define AM_LLI_ISO9577_IPI_SNAP 0x80 /* IPI - SNAP */
628 #define AM_LLI_ISO9577_IPI_IP 0xCC /* IPI - Internet Protocol */
630 /* low layer information - layer 3 SNAP Id */
632 #define AM_LLI_SNAP_ID 0x00 /* SNAP id */
634 /* high layer information type */
636 #define AM_HLITYP_ISO 0x00 /* ISO */
637 #define AM_HLITYP_USR 0x01 /* user specific */
638 #define AM_HLITYP_HLPROF 0x02 /* high layer profile */
639 #define AM_HLITYP_APPID 0x03 /* vendor-specific application id */
640 #define AM_HLITYP_BISDN 0x04 /* reference to ITU-T SG1 B-ISDN teleservice recommendation */
642 /* ABR Additional parameter identifiers */
644 #define AM_AAP_FAPR_ID 0xC2 /* forward additional parameter record identifier */
645 #define AM_AAP_BAPR_ID 0xC3 /* forward additional parameter record identifier */
647 /* Extended QOS parameter identifiers */
649 #define AM_EQP_AFPCDV_ID 0x94 /* acceptable forward peak-to-peak cell delay variation identifier */
650 #define AM_EQP_ABPCDV_ID 0x95 /* acceptable backward peak-to-peak cell delay variation identifier */
651 #define AM_EQP_CFPCDV_ID 0x96 /* cumulative forward peak-to-peak cell delay variation identifier */
652 #define AM_EQP_CBPCDV_ID 0x97 /* cumulative backward peak-to-peak cell delay variation identifier */
653 #define AM_EQP_AFCLR_ID 0xA2 /* acceptable forward cell loss ratio identifier */
654 #define AM_EQP_ABCLR_ID 0xA3 /* acceptable backward cell loss ratio identifier */
656 /* Extended QOS parameter origin token values */
658 #define AM_EQP_ORG_USR 0x00 /* originating user */
659 #define AM_EQP_ORG_INTNET 0x01 /* intermediate network */
660 /* ABR Setup parameter identifiers */
662 #define AM_ASP_FAICR_ID 0xC2 /* forward ABR initial cell rate identifier */
663 #define AM_ASP_BAICR_ID 0xC3 /* backward ABR initial cell rate identifier */
664 #define AM_ASP_FATBE_ID 0xC4 /* forward ABR transient buffer exposure identifier */
665 #define AM_ASP_BATBE_ID 0xC5 /* backward ABR transient buffer exposure identifier */
666 #define AM_ASP_CRMFRTT_ID 0xC6 /* cumulative RM fixed round trip time identifier */
667 #define AM_ASP_FRIF_ID 0xC8 /* forward rate increment factor identifier */
668 #define AM_ASP_BRIF_ID 0xC9 /* backward rate increment factor identifier */
669 #define AM_ASP_FRDF_ID 0xCA /* forward rate decrement factor identifier */
670 #define AM_ASP_BRDF_ID 0xCB /* backward rate decrement factor identifier */
672 /* ATM Transfer capability */
674 #define AM_ATC_NRTVBR1 0x00 /* Non-real time VBR */
675 #define AM_ATC_RTVBR1 0x01 /* Real time VBR */
676 #define AM_ATC_NRTVBR2 0x02 /* Non-real time VBR */
677 #define AM_ATC_CBR1 0x04 /* CBR */
678 #define AM_ATC_CBR2 0x05 /* CBR */
679 #define AM_ATC_CBR3 0x06 /* CBR */
680 #define AM_ATC_CBRCLR 0x07 /* CBR with CLR commitment on CLP=0+1 */
681 #define AM_ATC_NRTVBR3 0x08 /* Non-real time VBR */
682 #define AM_ATC_RTVBR2 0x09 /* Real time VBR */
683 #define AM_ATC_NRTVBR4 0x0A /* Non-real time VBR */
684 #define AM_ATC_NRTVBRCLR 0x0B /* Non-real time VBR with CLR commitment on CLP=0+1 */
685 #define AM_ATC_ABR 0x0C /* ABR */
686 #define AM_ATC_RTVBRCLR 0x13 /* Real time VBR with CLR commitment on CLP=0+1 */
690 /* defines for UME */
692 #define UM_MAXLEN_OBJ_ID 34 /* max length of an object-id */
694 /* PNNI qos class definitions
696 #define PN_QOS_CLASS_UBR 0 /* unspecified */
697 #define PN_QOS_CLASS_CBR 1 /* constant bit rate */
698 #define PN_QOS_CLASS_VBR_RT 2 /* variable bit rate - real time */
699 #define PN_QOS_CLASS_VBR_NRT 3 /* variable bit rate - non real time */
700 #define PN_QOS_CLASS_ABR 4 /* available bit rate */
702 /* maximum number of ports per neighbor -- change if you expect more
704 #define PN_MAX_PORTS_NBR 5
707 /* Peer group and node identifier length */
708 #define PN_PGID_LEN 14
709 #define PN_NODEID_LEN 22
712 /* maximum number of qos classes */
713 #define PN_NUM_QOS_CLASSES 5
715 /* defines for PNNI */
717 #define SW_ATMF_RTE_PNNI1 0 /* PNNI Phase 1 */
719 /* OAM Traffic Descriptor */
721 #define AM_OTD_NUSRORGFMI 0x00 /* No user originated fault mgmt ind. */
722 #define AM_OTD_USRORGFMI 0x01 /* user originated fault mgmt ind. */
724 #define AM_OTD_OAMF5OPT 0x00 /* The use of end-to-end OAM F5 Flow is optional
726 #define AM_OTD_OAMF5MAND 0x01 /* The use of end-to-end OAM F5 Flow is mandatory
729 #define AM_OTD_NUSRSHAPEREQ 0X00 /* No user req. on shaping by network */
731 #define AM_OTD_NAGGUSRSHAPE 0X01 /* Aggregate shaping not allowed */
733 #define AM_OTD_ETOEF5_0 0X00 /* 0% of FPCR/BPCR (CLP=0+1) */
734 #define AM_OTD_ETOEF5_01 0x01 /* 0.1% of FPCR/BPCR (CLP=0+1) */
735 #define AM_OTD_ETOEF5_1 0x04 /* 1% of FPCR/BPCR (CLP=0+1) */
737 #endif /* CMFILE_REORG_1 */
739 /* degines for management confirms */
742 #define LCM_PRIM_OK 0 /* OK , activity completed */
743 #define LCM_PRIM_NOK 1 /* NOK, activity completed */
744 #define LCM_PRIM_OK_NDONE 2 /* OK, activity not completed */
747 #define LCM_REASON_NOT_APPL 0 /* not applicable */
748 #define LCM_REASON_INVALID_ENTITY 1 /* invalid entity */
749 #define LCM_REASON_INVALID_INSTANCE 2 /* invalid instance */
750 #define LCM_REASON_INVALID_MSGTYPE 3 /* invalid message type */
751 #define LCM_REASON_MEM_NOAVAIL 4 /* memory not avail */
752 #define LCM_REASON_INVALID_ELMNT 5 /* invalid hdr.elmnt */
753 #define LCM_REASON_RECONFIG_FAIL 6 /* reconfiguration */
754 #define LCM_REASON_REGTMR_FAIL 7 /* timer registration failed */
755 #define LCM_REASON_GENCFG_NOT_DONE 8 /* gene config not done */
756 #define LCM_REASON_INVALID_ACTION 9 /* invalid control action */
757 #define LCM_REASON_INVALID_SUBACTION 10 /* invalid control subaction */
758 #define LCM_REASON_INVALID_STATE 11 /* invalid state */
759 #define LCM_REASON_INVALID_SAP 12 /* invalid sap identifier */
760 #define LCM_REASON_INVALID_PAR_VAL 13 /* invalid parameter value */
761 #define LCM_REASON_QINIT_FAIL 15 /* queue initialization failed */
762 #define LCM_REASON_NEG_CFM 16 /* negative confirmation */
763 #define LCM_REASON_HASHING_FAILED 20 /* Hashing failed */
765 #define LCM_REASON_UPDTMR_EXPIRED 17 /* update timer expired */
766 #define LCM_REASON_MISC_FAILURE 18 /* miscellaneous failures */
767 #define LCM_REASON_EXCEED_CONF_VAL 19 /* Exceeds configured value */
768 #define LCM_REASON_PEERCFG_NOT_DONE 21 /* swft -peer sap not configured */
769 #define LCM_REASON_PRTLYRCFG_NOT_DONE 22 /* swft -portable lyr not configured */
770 /* common Distributed FT/HA related failure reasons */
771 #define LCM_REASON_INV_RSET 23 /* Inv. rset */
772 #define LCM_REASON_INV_RSET_RANGE 24 /* Inv. rset range */
773 #define LCM_REASON_INV_RSET_TYPE 25 /* Inv. type of rset type */
774 #define LCM_REASON_INV_RSET_QUAL 26 /* Inv. qual. of rset type*/
775 #define LCM_REASON_INV_INTERFACE 27 /* Inv. Dist. Fn interface */
776 #define LCM_REASON_INV_DIST_TYPE 28 /* Inv. type of dist type*/
777 #define LCM_REASON_INV_DIST_QUAL 29 /* Inv. qual. of dist type*/
778 #define LCM_REASON_NAK_RCVD 30 /* Got a nak failure */
779 #define LCM_REASON_TIMEOUT 31 /* Got a timeout failure */
780 #define LCM_REASON_PURE_FTHA 32 /* A req for Dist FTHA is recv by a Pure FTHA mod */
781 #define LCM_REASON_DIST_FTHA 33 /* A req for Pure FTHA is recv
782 * by a Dist FTHA mod */
783 #define LCM_REASON_INV_KEY 34 /* Invalid key */
784 #define LCM_REASON_SW_INCOMP 35 /* enable node fail reason because
785 * of software interface version
787 #define LCM_REASON_VERSION_MISMATCH 36 /* interface version mismatch */
788 #define LCM_REASON_SWVER_NAVAIL 37 /* interface version not found */
789 #define LCM_REASON_INVALID_RTENT 38 /* invalid routing entery */
790 /* gen_h_001.main_121 - Added LCM_REASONS for reconfiguration of PC at SCCP */
791 #define LCM_REASON_MAXSPC_EXCEEDING 39 /* maximum configured SPC's exceeding */
792 #define LCM_REASON_WRONG_DEFAULT_SPC 40 /* wrong default spc rcvd in cntrl req */
793 #define LCM_REASON_SPC_EXISTS 41 /* spc already exists in the network */
794 #define LCM_REASON_MINSPC_REACHED 42 /* network is already reached MINSPC */
795 #define LCM_REASON_MORE_SPC_THAN_CONFIGURED 43 /* control request has got more spcs that configured in the network */
796 #define LCM_REASON_DFL_SPC_DEL_NOT_ALLOWED 44 /* control request has got default spcs that configured in the network */
797 #define LCM_REASON_NOTHING_TO_DELETE 45 /* control request has got zero spcs to delete */
798 #define LCM_REASON_SPC_ALREADY_DELETED 46 /* spc's are already deleted */
799 #define LCM_REASON_LYR_SPECIFIC 256 /* protocol specific reasons */
801 /* gen_h_001.main_125- Addition - SUA support*/
802 #define LCM_REASON_ASP_CONFIG 47 /* ASP Configuration Error */
803 /* gen_h_001.main_142:Added new error type*/
804 #define LCM_REASON_ULLOCK_INIT_FAILED 48 /* UL Lock creation Error */
808 #define LCM_CATEGORY_PROTOCOL 1 /* protocol related */
809 #define LCM_CATEGORY_INTERFACE 2 /* interface related */
810 #define LCM_CATEGORY_INTERNAL 3 /* internal errors */
811 #define LCM_CATEGORY_RESOURCE 4 /* system resources */
812 #define LCM_CATEGORY_PSF_FTHA 5 /* PSF-Fault tolernace High Av.*/
813 #define LCM_CATEGORY_PERF_MONIT 6 /* SCCP Error performance */
814 /*gen_h_001.main_137:moved category of states of DNS records to lso.h*/
816 #define LCM_CATEGORY_LYR_SPECIFIC 256 /* protocol specific category */
819 #define LCM_EVENT_UI_INV_EVT 1 /* upper interface invalid event */
820 #define LCM_EVENT_BND_FAIL 8 /* Bind failure */
821 #define LCM_EVENT_BND_OK 11 /* bind ok */
822 #define LCM_EVENT_SMEM_ALLOC_FAIL 12 /* static memory alloc fail */
823 #define LCM_EVENT_DMEM_ALLOC_FAIL 13 /* Dynamic mmemory alloc fail */
826 #define LCM_EVENT_LI_INV_EVT 2 /* lower interface invalid event */
827 #define LCM_EVENT_PI_INV_EVT 3 /* peer interface invalid event */
828 #define LCM_EVENT_INV_EVT 4 /* general invalid event */
829 #define LCM_EVENT_INV_STATE 5 /* invalid internal state */
830 #define LCM_EVENT_INV_TMR_EVT 6 /* invalid timer event */
831 #define LCM_EVENT_MI_INV_EVT 7 /* mngmnt interface invalid event */
832 #define LCM_EVENT_NAK 9 /* destination naked a request */
833 #define LCM_EVENT_TIMEOUT 10 /* timeout when waiting for reply */
834 /*Alarms for distributed FTHA environment*/
835 #define LCM_EVENT_SEQERR 14 /* seq error (standby) */
836 #define LCM_EVENT_OOM 15 /* board mem threshold exceeded */
837 #define LCM_EVENT_UPDMSG_ERR 16 /* update message decode error */
838 #define LCM_EVENT_HTBT_EXP 17 /* Heartbeat timer expiry */
839 #define LCM_EVENT_TRANSLATION_FAILURE 18 /* primitive translation failure */
841 /*gen_h_001.main_137:Moved Events for alarm indication at various Dns Events to lso.h*/
843 #define LCM_EVENT_LYR_SPECIFIC 256 /* protocol specific events */
846 #define LCM_CAUSE_UNKNOWN 0 /* unknown cause - not filled */
847 #define LCM_CAUSE_OUT_OF_RANGE 1 /* out of range */
848 #define LCM_CAUSE_INV_SAP 2 /* NULL/unknown sap */
849 #define LCM_CAUSE_INV_SPID 3 /* invalid service provider */
850 #define LCM_CAUSE_INV_SUID 4 /* invalid service user */
851 #define LCM_CAUSE_INV_NETWORK_MSG 5 /* invalid network message */
852 #define LCM_CAUSE_DECODE_ERR 6 /* message decoding problem */
853 #define LCM_CAUSE_USER_INITIATED 7 /* user initiated */
854 #define LCM_CAUSE_MGMT_INITIATED 8 /* mgmt initiated */
855 #define LCM_CAUSE_INV_STATE 9 /* Invalid state */
856 #define LCM_CAUSE_TMR_EXPIRED 10 /* Invalid state */
857 #define LCM_CAUSE_PROT_NOT_ACTIVE 12 /* protocol layer not active */
858 #define LCM_CAUSE_INV_PAR_VAL 13 /* invalid parameter value */
859 #define LCM_CAUSE_NEG_CFM 14 /* negative confirmation */
860 #define LCM_CAUSE_MEM_ALLOC_FAIL 15 /* memory allocation failure */
862 #define LCM_CAUSE_INV_MSG_LENGTH 11 /* Invalid state */
863 #define LCM_CAUSE_HASH_FAIL 16 /* hashing failure */
864 #define LCM_CAUSE_VERSION_MISMATCH 17 /* interface version mismatch */
865 #define LCM_CAUSE_SWVER_NAVAIL 18 /* intf ver not found */
866 #define LCM_CAUSE_DLGFAIL_DUETO_RECOVERY 19 /* dialogue has failed dur to recovery */
867 #define LCM_CAUSE_INV_ACTION 20 /* Invalid Control Action */
868 /* gen_h_001.main_129 - defined new cause */
869 #define LCM_CAUSE_NETWK_INITIATED 21 /* user initiated */
871 #define LCM_CAUSE_LYR_SPECIFIC 256 /* protocol specific causes */
874 /* Interface identifier names for rolling upgrade. Each of the product *
875 * interface is given a unique number */
876 /* Layer management interface identifiers */
877 #define LMSIF 1 /* MOS stack manager interface ID */
878 #define LNSIF 2 /* NTSS stack manager interface ID */
879 #define LRYIF 3 /* relay stack manager interface ID */
880 #define LAMIF 4 /* Q.93B stack manager interface ID */
881 #define LASIF 5 /* Q.SAAL stack manager interface ID */
882 #define LPNIF 6 /* PNNI stack manager interface ID */
883 #define LACIF 7 /* AC stack manager interface ID */
884 #define LECIF 8 /* LEC stack manager interface ID */
885 #define LESIF 9 /* LE Services stack manager interface ID */
886 #define LUMIF 10 /* UME stack manager interface ID */
887 #define LIMIF 11 /* IME stack manager interface ID */
888 #define LSAIF 12 /* Q.2140 stack manager interface ID */
889 #define LSEIF 13 /* SE stack manager interface ID */
890 #define LISIF 14 /* IS stack manager interface ID */
891 #define LQIIF 15 /* QI stack manager interface ID */
892 #define LPQIF 16 /* PQ stack manager interface ID */
893 #define LSDIF 17 /* MTP-2 stack manager interface ID */
894 #define LSNIF 18 /* MTP-3 stack manager interface ID */
895 #define LSPIF 19 /* SCCP stack manager interface ID */
896 #define LSTIF 20 /* TCAP stack manager interface ID */
897 #define LIEIF 21 /* INAP stack manager interface ID */
898 #define LQCIF 22 /* CAP stack manager interface ID */
899 #define LTTIF 23 /* TCAP over TCP/IP stack manager interface ID */
900 #define LMAIF 24 /* MAP stack manager interface ID */
901 #define LSIIF 25 /* ISUP stack manager interface ID */
902 #define LTPIF 26 /* TUP stack manager interface ID */
903 #define LSRIF 27 /* MTP-3 Simple Router stack manager interface ID */
904 #define LINIF 28 /* Q.930/Q.931 stack manager interface ID */
905 #define LXNIF 29 /* network layer - XG, EI, XI, XE stack manager interface ID */
906 #define LBDIF 30 /* data link layer- ER, BR, BD, LD, LB stack manager interface ID */
907 #define LAPIF 31 /* APAD stack manager interface ID */
908 #define LFRIF 32 /* Frame Relay stack manager interface ID */
909 #define LMEIF 33 /* data link layer - message exchange stack manager interface ID */
910 #define LWDIF 34 /* MTP-2 Wrapper stack manager interface ID */
911 #define LWNIF 35 /* MTP-3 Wrapper stack manager interface ID */
912 #define LWIIF 36 /* ISUP Wrapper stack manager interface ID */
913 #define LWUIF 37 /* TUP Wrapper stack manager interface ID */
914 #define LWSIF 38 /* SCCP Wrapper stack manager interface ID */
915 #define LWCIF 39 /* TCAP Wrapper stack manager interface ID */
916 #define LBIIF 40 /* B-ISUP stack manager interface ID */
917 #define LFMIF 41 /* fault manager stack manager interface ID */
918 #define LFNIF 42 /* Q933 stack manager interface ID */
919 #define LEVIF 43 /* V5 Envelope Function stack manager interface ID */
920 #define LLVIF 44 /* LAPV stack manager interface ID */
921 #define LNVIF 45 /* V5.1 PSTN stack manager interface ID */
922 #define LVFIF 46 /* VF Layer stack manager interface ID */
923 #define LIXIF 47 /* X.31 stack manager interface ID */
924 #define LFAIF 48 /* Fujitsu ALC/NTC/ATC driver stack manager interface ID */
925 #define LPLIF 49 /* PMC Sierra LASAR driver stack manager interface ID */
926 #define LAFIF 50 /* FR-ATM interworking stack manager interface ID */
927 #define LCVIF 51 /* V5.X Control Protocol stack manager interface ID */
928 #define LMVIF 52 /* V5.X System Manager stack manager interface ID */
929 #define LBVIF 53 /* V5.X BCC Protocol stack manager interface ID */
930 #define LLKIF 54 /* V5.2 Link stack manager interface ID */
931 #define LPVIF 55 /* V5.X Protection Protocol stack manager interface ID */
932 #define LCCIF 56 /* CC stack manager interface ID */
933 #define LZCIF 57 /* ZC stack manager interface ID */
934 #define LRMIF 58 /* RM stack manager interface ID */
935 #define LZRIF 59 /* ZR stack manager interface ID */
936 #define LRTIF 60 /* RT stack manager interface ID */
937 #define LZSIF 61 /* ZS stack manager interface ID */
938 #define LSFIF 62 /* SF stack manager interface ID */
939 #define LXMIF 63 /* XM stack manager interface ID */
940 #define LBWIF 64 /* PSIF - B-ISUP stack manager interface ID */
941 #define LIWIF 65 /* PSIF - ISUP stack manager interface ID */
942 #define LQWIF 66 /* PSIF - ISDN stack manager interface ID */
943 #define LAWIF 67 /* PSIF - Q.93B stack manager interface ID */
944 #define LZTIF 68 /* PSF - TCAP stack manager interface ID */
945 #define LDTIF 69 /* PSF - TCAP stack manager interface ID */
946 #define LZPIF 70 /* PSF - SCCP stack manager interface ID */
947 #define LZNIF 71 /* PSF-MTP3 (FT/HA) stack manager interface ID */
948 #define LZIIF 72 /* PSF-ISUP (FT/HA) stack manager interface ID */
949 #define LZQIF 73 /* PSF-ISDN (FT/HA) stack manager interface ID */
950 #define LZMIF 74 /* PSF-Q.93B (FT/HA) stack manager interface ID */
951 #define LSGIF 75 /* System Manager stack manager interface ID */
952 #define LSHIF 76 /* System Agent stack manager interface ID */
953 #define LMRIF 77 /* Message Router stack manager interface ID */
954 #define LPRIF 78 /* MPC860SAR driver stack manager interface ID */
955 #define LGNIF 79 /* network service stack manager interface ID */
956 #define LGTIF 80 /* GTP stack manager interface ID */
957 #define LGLIF 81 /* GPRS LLC stack manager interface ID */
958 #define LGGIF 82 /* GPRS-BSSGP stack manager interface ID */
959 #define LGSIF 83 /* SNDCP stack manager interface ID */
960 #define LHCIF 84 /* H.323 Control stack manager interface ID */
961 #define LHIIF 85 /* TUCL stack manager interface ID */
962 #define LHRIF 86 /* RTP/RTCP stack manager interface ID */
963 #define LIQIF 87 /* ISDN-Q.SAAL Convergence Layer stack manager interface ID */
964 #define LMGIF 88 /* MGCP stack manager interface ID */
965 #define LDNIF 89 /* MTP-3 LDF stack manager interface ID */
966 #define LDPIF 90 /* LDF-SCCP stack manager interface ID */
967 #define LLNIF 91 /* MPLS-LDP(+CR) stack manager interface ID */
968 #define LPAIF 92 /* PLOA stack manager interface ID */
969 #define LALIF 93 /* AAL2 Signaling stack manager interface ID */
970 #define LSBIF 94 /* SCTP stack manager interface ID */
971 #define LSOIF 95 /* SIP stack manager interface ID */
972 #define LITIF 96 /* M3UA stack manager interface ID */
973 #define LNFIF 97 /* M3UA-NIF stack manager interface ID */
974 #define LIDIF 98 /* IUA stack manager interface ID */
975 #define LNDIF 99 /* IUA-NIF stack manager interface ID */
976 #define LSUIF 100 /* SUA stack manager interface ID */
977 #define LNPIF 101 /* SUA-NIF stack manager interface ID */
978 #define LRAIF 102 /* RANAP stack manager interface ID */
979 #define LZGIF 103 /* PSF-GCP (FT/HA) stack manager interface ID */
980 #define LDGIF 104 /* LDF-GCP stack manager interface ID */
981 #define LRNIF 105 /* RNSAP stack manager interface ID */
982 #define LZJIF 106 /* PSF - MAP-GSM stack manager interface ID */
983 #define LZFIF 107 /* PSF - CAP stack manager interface ID */
984 #define LGMIF 108 /* GMM/SM stack manager interface ID */
985 #define LZKIF 109 /* PSF - GMM/SM stack manager interface ID */
986 /* gen_h_001.main_122 Additions */
987 #define LAEIF 110 /* PSF - SUA stack manager interface ID */
988 /* gen_h_001.main_138: Added the interface version for PSF S1AP */
989 #define LYTIF 111 /* PSF - S1AP stack manager interface ID */
990 /* gen_h_001.main_141: Added the interface version for PSF DIAMETER */
991 #define LJCIF 112 /* PSF - DIAMETER stack manager interface ID */
993 /* Upper and Lower interface identifiers */
994 #define AALIF 150 /* AAL interface ID */
995 #define ALTIF 151 /* ALT interface ID */
996 #define AMTIF 152 /* AMT interface ID */
997 #define APLIF 153 /* APL interface ID */
998 #define ARIIF 154 /* ARI interface ID */
999 #define ASDIF 155 /* ASD interface ID */
1000 #define ASIIF 156 /* ASI interface ID */
1001 #define BITIF 157 /* BIT interface ID */
1002 #define CCTIF 158 /* CCT interface ID */
1003 #define CIPIF 159 /* CIP interface ID */
1004 #define DATIF 160 /* DAT interface ID */
1005 #define ECMIF 161 /* ECM interface ID */
1006 #define EVTIF 162 /* EVT interface ID */
1007 #define FNTIF 163 /* FNT interface ID */
1008 #define FRDIF 164 /* FRD interface ID */
1009 #define GBRIF 165 /* GBR interface ID */
1010 #define GGUIF 166 /* GGU interface ID */
1011 #define GLSIF 167 /* GLS interface ID */
1012 #define GNSIF 168 /* GNS interface ID */
1013 #define GSPIF 169 /* GSP interface ID */
1014 #define HCTIF 170 /* HCT interface ID */
1015 #define HGTIF 171 /* HGT interface ID */
1016 #define HITIF 172 /* HIT interface ID */
1017 #define HRTIF 173 /* HRT interface ID */
1018 #define IATIF 174 /* IAT interface ID */
1019 #define IETIF 175 /* IET interface ID */
1020 #define IFPIF 176 /* IFP interface ID */
1021 #define INTIF 177 /* INT interface ID */
1022 #define MACIF 178 /* MAC interface ID */
1023 #define MATIF 179 /* MAT interface ID */
1024 #define MDPIF 180 /* MDP interface ID */
1025 #define MGTIF 181 /* MGT interface ID */
1026 #define MPAIF 182 /* MPA interface ID */
1027 #define MVTIF 183 /* MVT interface ID */
1028 #define NUIIF 184 /* NUI interface ID */
1029 #define NVTIF 185 /* NVT interface ID */
1030 #define PCIIF 186 /* PCI interface ID */
1031 #define PXYIF 187 /* PXY interface ID */
1032 #define RLSIF 188 /* RLS interface ID */
1033 #define RMTIF 189 /* RMT interface ID */
1034 #define RTTIF 190 /* RTT interface ID */
1035 #define RYTIF 191 /* RYT interface ID */
1036 #define SCTIF 192 /* SCT interface ID */
1037 #define SDTIF 193 /* SDT interface ID */
1038 #define SFTIF 194 /* SFT interface ID */
1039 #define SITIF 195 /* SIT interface ID */
1040 #define SNTIF 196 /* SNT interface ID */
1041 #define SPTIF 197 /* SPT interface ID */
1042 #define STUIF 198 /* STU interface ID */
1043 #define TCTIF 199 /* TCT interface ID */
1044 #define TPTIF 200 /* TPT interface ID */
1045 #define TUTIF 201 /* TUT interface ID */
1046 #define UMEIF 202 /* UME interface ID */
1047 #define VFTIF 203 /* VFT interface ID */
1048 #define WITIF 204 /* WIT interface ID */
1049 #define WNTIF 205 /* WNT interface ID */
1050 #define WUTIF 206 /* WUT interface ID */
1051 #define XMTIF 207 /* XMT interface ID */
1052 #define XNTIF 208 /* XNT interface ID */
1053 #define RPTIF 209 /* RPT interface ID */
1054 #define RNTIF 210 /* RNT interface ID */
1055 #define CAPIF 211 /* CAP interface ID */
1056 #define LFPIF 212 /* LFP interface ID */
1057 #define FPUIF 213 /* FPU interface ID */
1058 #define CMKIF 214 /* CMK interface ID */
1059 #define MKUIF 215 /* MKU interface ID */
1060 #define PHUIF 216 /* PHU interface ID */
1061 #define GMUIF 212 /* GMU interface ID */
1062 /* gen_h_001.main_138: Added the interface version for SZT */
1063 #define SZTIF 213 /* SZT interface ID */
1064 /* gen_h_001.main_140: Added the interface version for AQU */
1065 #define AQUIF 214 /* AQU interface ID */
1067 /* peer interface identifiers */
1068 #define SGPIF 250 /* System manager peer interface ID */
1069 #define SHPIF 251 /* System agent peer interface ID */
1070 #define MRPIF 252 /* Message router peer interface ID */
1071 #define ZNPIF 253 /* MTP-3 peer interface ID */
1072 #define ZPPIF 254 /* SCCP peer interface ID */
1073 #define ZTPIF 255 /* TCAP peer interface ID */
1074 #define ZIPIF 256 /* ISUP peer interface ID */
1075 #define ZQPIF 257 /* Q.931 peer interface ID */
1076 #define ZMPIF 258 /* Q.93B peer interface ID */
1077 #define ZCPIF 259 /* ICC peer interface ID */
1078 #define ZRPIF 260 /* ICC peer interface ID */
1079 #define ZSPIF 261 /* RT peer interface ID */
1080 #define ZAPIF 262 /* RANAP peer interface ID */
1081 #define ZGPIF 263 /* MGCP peer interface ID */
1082 #define ZBPIF 264 /* GTP peer interface ID */
1083 #define ZVPIF 265 /* PSF-M3UA peer interface ID */
1084 #define ZJPIF 266 /* MAP-GSM peer interface ID */
1085 #define ZFPIF 267 /* CAP peer interface ID */
1086 #define ZLPIF 268 /* ALCAP peer interface ID */
1087 #define ZKPIF 269 /* PSF GMMSM peer interface ID */
1088 /* gen_h_001.main_122 Additions */
1089 #define AEPIF 270 /* PSF SUA peer interface ID */
1090 /* gen_h_001.main_138: Added the interface version for PSF S1AP */
1091 #define YTPIF 271 /* PSF S1AP peer interface ID */
1092 /* gen_h_001.main_139: Added the interface version for eGTP-C PSF */
1093 #define HWPIF 272 /* eGTP-C PSF peer interface ID */
1094 /* gen_h_001.main_141: Added the interface version for PSF DIAMETER */
1095 #define JCPIF 273 /* PSF DIAMETER peer interface ID */
1100 #define CM_BND_OK 1 /* bind request OK */
1101 #define CM_BND_NOK 2 /* bind request not OK */
1103 /* New definition */
1104 #define CM_IPV4ADDR_TYPE 4
1105 #define CM_IPV6ADDR_TYPE 6
1108 /* debug masks and macros */
1112 #define DBGMASK_SI 0x00000001 /* system service interface */
1113 #define DBGMASK_MI 0x00000002 /* layer management interface */
1114 #define DBGMASK_UI 0x00000004 /* upper interface */
1115 #define DBGMASK_LI 0x00000008 /* lower interface */
1116 #define DBGMASK_PI 0x00000010 /* peer interface */
1117 #define DBGMASK_PLI 0x00000020 /* PSF's protocol layer interface */
1119 #define DBGMASK_LYR 0x00000100 /* layer specific */
1121 /* gen_h_001.main_132 : Guarding the Timestamp related changes in the compile time flag*/
1122 #ifdef DBG_TIMESTAMP
1123 /* gen_h_001.main_131 : Added lock related macros */
1124 #define _DBG_INIT_WRITELCK(x) SInitLock(x, SS_LOCK_MUTEX)
1125 #define _DBG_GET_WRITELCK(x) SLock(x)
1126 #define _DBG_REL_WRITELCK(x) SUnlock(x)
1127 #define _DBG_DEL_WRITELCK(x) SDestroyLock(x)
1129 #define DBGPRNTBUFSIZE 80
1131 /* gen_h_001.main_131 : Modified the DBGP for the timestamp*/
1132 /* gen_h_001.main_133-modified macro */
1133 /* gen_h_001.main_140 : modified macro for printing the ProcId as well
1134 * and changed sprintf to snprintf */
1135 #define DBGP(_tskInit, _layerName, _msgClass, _arg) \
1137 S8 _buf[DBGPRNTBUFSIZE]; \
1138 if ((_tskInit)->dbgMask & (_msgClass)) \
1140 if((_tskInit)->lyrMtFlag) \
1142 _DBG_GET_WRITELCK(&((_tskInit)->dbgLock)); \
1144 (Void) SGetTimeStamp(_buf); \
1145 snprintf((_tskInit)->prntBuf, PRNTSZE, \
1146 "[%s] [%s %d:0x%x:%x] %s:%d ", _buf, _layerName, \
1147 (_tskInit)->procId, (_tskInit)->ent, (_tskInit)->inst, \
1148 __FILE__, __LINE__); \
1149 SPrint((_tskInit)->prntBuf); \
1151 SPrint((_tskInit)->prntBuf); \
1152 if((_tskInit)->lyrMtFlag) \
1154 _DBG_REL_WRITELCK(&((_tskInit)->dbgLock)); \
1158 #define DBGPN(_tskInit, _layerName, _msgClass, _arg) \
1160 S8 _buf[DBGPRNTBUFSIZE]; \
1161 if ((_tskInit)->dbgMask & (_msgClass)) \
1163 if((_tskInit)->lyrMtFlag) \
1165 _DBG_GET_WRITELCK(&((_tskInit)->dbgLock)); \
1167 (Void) SGetTimeStamp(_buf); \
1168 snprintf((_tskInit)->prntBuf, PRNTSZE, \
1169 "[%s] [%s %d:0x%x:%x] %s:%d ", _buf, _layerName, \
1170 (_tskInit)->procId, (_tskInit)->ent, (_tskInit)->inst, \
1171 __FILE__, __LINE__); \
1172 SPrint((_tskInit)->prntBuf); \
1174 SPrint((_tskInit)->prntBuf); \
1175 if((_tskInit)->lyrMtFlag) \
1177 _DBG_REL_WRITELCK(&((_tskInit)->dbgLock)); \
1183 #define DBGP(_tskInit, _layerName, _msgClass, _arg) \
1185 if ((_tskInit)->dbgMask & (_msgClass)) \
1187 snprintf((_tskInit)->prntBuf, PRNTSZE, "[%s %d:0x%x:%x] %s:%d ", \
1188 _layerName, (_tskInit)->procId, (_tskInit)->ent, \
1189 (_tskInit)->inst, __FILE__, __LINE__); \
1190 SPrint((_tskInit)->prntBuf); \
1192 SPrint((_tskInit)->prntBuf); \
1195 #define DBGPN(_tskInit, _layerName, _msgClass, _arg) \
1197 if ((_tskInit)->dbgMask & (_msgClass)) \
1199 snprintf((_tskInit)->prntBuf, PRNTSZE, "[%s %d:0x%x:%x] %s:%d ", \
1200 _layerName, (_tskInit)->procId, (_tskInit)->ent, \
1201 (_tskInit)->inst, __FILE__, __LINE__); \
1202 SPrint((_tskInit)->prntBuf); \
1204 SPrint((_tskInit)->prntBuf); \
1211 #define DBGP(_tskInit, _layerName, _msgClass, _arg)
1212 #define DBGPN(_tskInit, _layerName, _msgClass, _arg)
1217 /* gen_h_001.main_126 : Added Circular Buffer */
1219 /************************* CIRCULAR BUFFER ************************/
1221 * Circular Buffer implementation provides two macro's
1223 * 1. CBUF_INIT --> To initialize the Circular Bufffer
1224 * 2. CBUF_WRITE --> To log data into the circular Buffer
1227 * 1. CBUF_INIT must be called from the product's initialization
1228 * function, prior to using the maro CBUF_WRITE.
1230 * 2. CBUF_WRITE takes variable number of arguments
1232 * 3. Enable the flag "CBUF_ENABLE"
1235 * 1. structure "cBuffer" is defined in gen.x
1236 * 2. The structure cBuffer is added in "TskInit" under the flag
1241 * 1. CBUF_WRITE can take a maximum of 255 characters, which is the
1242 * value of the define PRNTSZE (defined in ssi.h)
1245 * This macro, allocates the memory to the circular Buffer and
1246 * initializes the memory region with zeroes.
1248 * E.g. CBUF_INIT(xxInit,100);
1249 * where xxCb is the task initialisation structure,
1250 * 100 - is the size of the circular buffer (bytes)
1253 * This Macro, writes the data into circular buffer. Once the
1254 * end of the buffer is reached, it starts again from the beggining
1255 * of the circular Buffer.
1257 * E.g. CBUF_WRITE(xxInit.cBuf,(xxInit.cBuf.tmpBuf,"%d |",10));
1258 * where xxInit is the task initialisation structure
1259 * cBuf is the circular buffer's control structure
1260 * tmpBuf is the temporary buffer declared inside "cBuffer"
1262 * It is suggested to use a delimiter with every CBUF_WRITE. In this
1263 * example "|" is the delimiter, which will be helpful in analyzing
1264 * the circular buffer contents.
1267 * This macro is used internally by the macro CBUF_WRITE. If the flag
1268 * CBUF_DISPLAY is defined, then this macro is defined to SPrint. Else
1275 #define CBUFPRNTSZE 255
1277 #define CBUF_PRINT(cBufPtr) SPrint(cBufPtr)
1279 #define CBUF_PRINT(cBufPtr)
1282 #define CBUF_INIT(_class,size) \
1284 SGetSBuf((_class).region,(_class).pool, \
1285 &(_class).cBuf.cBufPtr,size); \
1286 (_class).cBuf.cBufSize = size; \
1287 (_class).cBuf.cBufIdx = 0; \
1288 memset((_class).cBuf.cBufPtr,'|',size); \
1291 #define CBUF_WRITE(_class,_argList) \
1295 tmpLen = sprintf _argList; \
1296 if(CBUFPRNTSZE >= tmpLen) \
1298 for(idx = 0; idx < tmpLen; idx++) \
1300 (_class).cBufIdx = (_class).cBufIdx % (_class).cBufSize; \
1301 (_class).cBufPtr[(_class).cBufIdx++] = (_class).tmpBuf[idx]; \
1304 CBUF_PRINT((_class).tmpBuf); \
1307 #define CBUF_DATA_PRINT(_class) \
1309 S8 *tmpBuf = NULLP ;\
1311 uint32_t tmpIdx=0; \
1312 SGetSBuf((_class).region,(_class).pool, \
1313 (uint8_t **)&tmpBuf,(_class).cBuf.cBufSize); \
1314 memset(tmpBuf,0,(_class).cBuf.cBufSize); \
1315 for(cBufIdx = (_class).cBuf.cBufIdx; cBufIdx < (_class).cBuf.cBufSize; cBufIdx++) \
1317 tmpBuf[tmpIdx++] = (_class).cBuf.cBufPtr[cBufIdx]; \
1318 tmpIdx = tmpIdx % ((_class).cBuf.cBufSize); \
1320 for(cBufIdx=0;cBufIdx < (_class).cBuf.cBufIdx;cBufIdx++) \
1322 tmpBuf[tmpIdx++] = (_class).cBuf.cBufPtr[cBufIdx]; \
1323 tmpIdx = tmpIdx % ((_class).cBuf.cBufSize); \
1326 SPutSBuf((_class).region,(_class).pool, \
1327 (uint8_t *)tmpBuf,(_class).cBuf.cBufSize); \
1331 #define CBUF_INIT(_class,size)
1332 #define CBUF_WRITE(_class,_argList)
1333 #define CBUF_DATA_PRINT(_class)
1334 #endif /* CBUF_ENABLE */
1338 #ifdef CMFILE_REORG_1
1342 /* packing macros */
1344 /* system services typedefs */
1346 #define oduPackBool(x, mBuf) oduPackUInt8(x, mBuf) /* pack Bool */
1347 #define cmPkStatus(x, mBuf) SPkS16(x, mBuf) /* pack Status */
1348 #define cmPkTicks(x, mBuf) oduPackUInt32(x, mBuf) /* pack Ticks */
1349 #define cmPkQLen(x, mBuf) SPkS16(x, mBuf) /* pack QLen */
1350 #define cmPkOrder(x, mBuf) SPkS16(x, mBuf) /* pack Order */
1351 #define cmPkData(x, mBuf) oduPackUInt8(x, mBuf) /* pack Data */
1352 #define cmPkRandom(x, mBuf) oduPackUInt16(x, mBuf) /* pack Random */
1353 #define cmPkSeq(x, mBuf) SPkS16(x, mBuf) /* pack Seq */
1354 #define cmPkReason(x, mBuf) SPkS16(x, mBuf) /* pack Reason */
1355 #define cmPkProcId(x, mBuf) oduPackUInt16(x, mBuf) /* pack ProcId */
1356 #define cmPkVectNmb(x, mBuf) SPkS16(x, mBuf) /* pack VectNmb */
1357 #define cmPkPrior(x, mBuf) oduPackUInt8(x, mBuf) /* pack Prior*/
1358 #define cmPkPriority(x, mBuf) cmPkPrior(x, mBuf) /* pack Priority */
1359 #define cmPkRoute(x, mBuf) oduPackUInt8(x, mBuf) /* pack Route */
1360 #define cmPkTtype(x, mBuf) SPkS16(x, mBuf) /* pack Ttype */
1361 #define cmPkSema(x, mBuf) SPkS8(x, mBuf) /* pack Sema */
1362 #define cmPkTxt(x, mBuf) SPkS8(x, mBuf) /* pack Txt */
1363 #define cmPkEnt(x, mBuf) oduPackUInt8(x, mBuf) /* pack Ent */
1364 #define cmPkInst(x, mBuf) oduPackUInt8(x, mBuf) /* pack Inst */
1365 #define cmPkElmnt(x, mBuf) SPkS16(x, mBuf) /* pack Elmnt */
1366 #define cmPkElmntInst1(x, mBuf) SPkS16(x, mBuf) /* pack ElmntInst1 */
1367 #define cmPkElmntInst2(x, mBuf) SPkS16(x, mBuf) /* pack ElmntInst2 */
1368 #define cmPkElmntInst3(x, mBuf) SPkS16(x, mBuf) /* pack ElmntInst3 */
1369 #define cmPkRegion(x, mBuf) oduPackUInt8(x, mBuf) /* pack Region */
1370 #define cmPkPool(x, mBuf) oduPackUInt8(x, mBuf) /* pack Pool */
1372 #define cmPkMsgLen(x, mBuf) SPkS32(x, mBuf) /* pack MsgLen */
1374 #define cmPkMsgLen(x, mBuf) SPkS16(x, mBuf) /* pack MsgLen */
1377 #define cmPkSize(x, mBuf) oduPackUInt16(x, mBuf) /* pack Size */
1379 #define cmPkSize(x, mBuf) oduPackUInt32(x, mBuf) /* pack Size */
1382 /* general typedefs */
1384 #define cmPkSelector(x, mBuf) oduPackUInt8(x, mBuf) /* pack Selector */
1385 #define cmPkEvent(x, mBuf) oduPackUInt8(x, mBuf) /* pack Event */
1386 #define cmPkCntr(x, mBuf) SPkS32(x, mBuf) /* pack Cntr */
1387 #define cmPkStsCntr(x, mBuf) oduPackUInt32(x, mBuf) /* pack StsCntr */
1388 #define cmPkLnkNmb(x, mBuf) SPkS16(x, mBuf) /* pack LnkNmb */
1389 #define cmPkSuId(x, mBuf) SPkS16(x, mBuf) /* pack SuId */
1390 #define cmPkSpId(x, mBuf) SPkS16(x, mBuf) /* pack SpId */
1391 #define cmPkSuInstId(x, mBuf) SPkS16(x, mBuf) /* pack SuInstId */
1392 #define cmPkSpInstId(x, mBuf) SPkS16(x, mBuf) /* pack SpInstId */
1393 #define cmPkSapi(x, mBuf) oduPackUInt8(x, mBuf) /* pack Sapi */
1394 #define cmPkTei(x, mBuf) oduPackUInt8(x, mBuf) /* pack Tei */
1395 #define cmPkchNo(x, mBuf) oduPackUInt8(x, mBuf) /* pack Channel Number */
1396 #define cmPkCes(x, mBuf) oduPackUInt8(x, mBuf) /* pack Ces */
1397 #define cmPkDlci(x, mBuf) oduPackUInt32(x, mBuf) /* pack Dlci */
1398 #define cmPkCalRef(x, mBuf) oduPackUInt16(x, mBuf) /* pack CalRef */
1399 #define cmPkOrigin(x, mBuf) SPkS16(x, mBuf) /* pack Origin */
1400 #define cmPkNwId(x, mBuf) oduPackUInt16(x, mBuf) /* pack NwId */
1401 #define cmPkSwtch(x, mBuf) SPkS16(x, mBuf) /* pack Swtch */
1402 #define cmPkCause(x, mBuf) oduPackUInt8(x, mBuf) /* pack Cause */
1403 #define cmPkDgn(x, mBuf) oduPackUInt8(x, mBuf) /* pack Dgn */
1404 #define cmPkAction(x, mBuf) SPkS16(x, mBuf) /* pack Action */
1405 #define cmPkSeqS16(x, mBuf) SPkS16(x, mBuf) /* pack SeqS16 */
1406 #define cmPkSeqUInt16(x, mBuf) oduPackUInt16(x, mBuf) /* pack SeqUInt16 */
1407 #define cmPkSeqS24(x, mBuf) SPkS32(x, mBuf) /* pack SeqS24 */
1408 #define cmPkSeqUInt24(x, mBuf) oduPackUInt32(x, mBuf) /* pack SeqUInt24 */
1409 #define cmPkSetUpArb(x, mBuf) oduPackUInt8(x, mBuf) /* pack SetUpArb */
1410 #define cmPkEvntType(x, mBuf) oduPackUInt8(x, mBuf) /* pack EvntType */
1411 #define cmPkState(x, mBuf) oduPackUInt8(x, mBuf) /* pack State */
1412 #define cmPkMode(x, mBuf) oduPackUInt8(x, mBuf) /* pack Mode */
1413 #define cmPkConnId(x, mBuf) SPkS32(x, mBuf) /* pack ConnId */
1414 #define cmPkUConnId(x, mBuf) oduPackUInt32(x, mBuf) /* pack unsigned ConnId */
1415 #define cmPkMibOpCode(x, mBuf) oduPackUInt16(x, mBuf) /* pack mib opCode*/
1416 #define cmPkMibStatus(x, mBuf) oduPackUInt16(x, mBuf) /* Pack mib cfm status*/
1417 #define cmPkMibTblType(x, mBuf) oduPackUInt16(x, mBuf) /* Pack mib table type */
1418 #define cmPkMibReqId(x, mBuf) SPkS32(x, mBuf) /* Pack mib request Id */
1419 #define cmPkProfileId(x, mBuf) oduPackUInt8(x, mBuf) /* Pack HCC Profile Id */
1420 #define cmPkIntfId(x, mBuf) oduPackUInt16(x, mBuf) /* Pack intf id */
1421 #define cmPkIntfVer(x, mBuf) oduPackUInt16(x, mBuf) /* Pack intf ver */
1422 #define cmPkuaType(x, mBuf) oduPackUInt8(x, mBuf) /* Pack uaType */
1423 /* scc specific typedefs */
1425 #define cmPkBaud(x, mBuf) SPkS16(x, mBuf) /* pack Baud */
1426 #define cmPkPhysIntType(x, mBuf) SPkS16(x, mBuf) /* pack PhysIntType */
1427 #define cmPkPathConnType(x, mBuf) SPkS16(x, mBuf) /* pack PathConnType */
1428 #define cmPkParity(x, mBuf) SPkS16(x, mBuf) /* pack Parity */
1429 #define cmPkCharLength(x, mBuf) SPkS16(x, mBuf) /* pack CharLength */
1430 #define cmPkStopBits(x, mBuf) SPkS16(x, mBuf) /* pack StopBits */
1432 /* tcp/ip specific typedefs */
1434 #define cmPkIpAddr(x, mBuf) oduPackUInt32(x, mBuf) /* pack IpAddr */
1435 #define cmPkPort(x, mBuf) oduPackUInt16(x, mBuf) /* pack Port */
1436 #define cmPkCmd(x, mBuf) oduPackUInt8(x, mBuf) /* pack Cmd */
1437 #define cmPkFlags(x, mBuf) oduPackUInt8(x, mBuf) /* pack Flags */
1438 #define cmPkTtl(x, mBuf) oduPackUInt8(x, mBuf) /* pack Ttl */
1439 #define cmPkPrec(x, mBuf) oduPackUInt8(x, mBuf) /* pack Prec */
1440 #define cmPkWindow(x, mBuf) oduPackUInt32(x, mBuf) /* pack Window */
1442 /* LLC/SNAP specific defines */
1444 #define cmPkOui(x, mBuf) oduPackUInt32(x, mBuf) /* pack Oui */
1445 #define cmPkPid(x, mBuf) oduPackUInt16(x, mBuf) /* pack Pid */
1446 #define cmPkLlcId(x, mBuf) oduPackUInt32(x, mBuf) /* pack LLcId */
1449 /* unpacking macros */
1451 /* system services typedefs */
1453 #define oduUnpackBool(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Bool */
1454 #define cmUnpkStatus(x, mBuf) SUnpkS16(x, mBuf) /* unpack Status */
1455 #define cmUnpkTicks(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack Ticks */
1456 #define cmUnpkQLen(x, mBuf) SUnpkS16(x, mBuf) /* unpack QLen */
1457 #define cmUnpkOrder(x, mBuf) SUnpkS16(x, mBuf) /* unpack Order */
1458 #define cmUnpkData(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Data */
1459 #define cmUnpkRandom(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack Random */
1460 #define cmUnpkSeq(x, mBuf) SUnpkS16(x, mBuf) /* unpack Seq */
1461 #define cmUnpkReason(x, mBuf) SUnpkS16(x, mBuf) /* unpack Reason */
1462 #define cmUnpkProcId(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack ProcId */
1463 #define cmUnpkVectNmb(x, mBuf) SUnpkS16(x, mBuf) /* unpack VectNmb */
1464 #define cmUnpkPrior(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Prior */
1465 #define cmUnpkPriority(x, mBuf) cmUnpkPrior(x, mBuf) /* unpack Priority */
1466 #define cmUnpkRoute(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Route */
1467 #define cmUnpkTtype(x, mBuf) SUnpkS16(x, mBuf) /* unpack Ttype */
1468 #define cmUnpkSema(x, mBuf) SUnpkS8(x, mBuf) /* unpack Sema */
1469 #define cmUnpkTxt(x, mBuf) SUnpkS8(x, mBuf) /* unpack Txt */
1470 #define cmUnpkEnt(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Ent */
1471 #define cmUnpkInst(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Inst */
1472 #define cmUnpkElmnt(x, mBuf) SUnpkS16(x, mBuf) /* unpack Elmnt */
1473 #define cmUnpkElmntInst1(x, mBuf) SUnpkS16(x, mBuf) /* unpack ElmntInst1 */
1474 #define cmUnpkElmntInst2(x, mBuf) SUnpkS16(x, mBuf) /* unpack ElmntInst2 */
1475 #define cmUnpkElmntInst3(x, mBuf) SUnpkS16(x, mBuf) /* unpack ElmntInst3 */
1476 #define cmUnpkRegion(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Region */
1477 #define cmUnpkPool(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Pool */
1479 #define cmUnpkMsgLen(x, mBuf) SUnpkS32(x, mBuf) /* unpack MsgLen */
1481 #define cmUnpkMsgLen(x, mBuf) SUnpkS16(x, mBuf) /* unpack MsgLen */
1484 #define cmUnpkSize(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack Size */
1486 #define cmUnpkSize(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack Size */
1489 /* general typedefs */
1491 #define cmUnpkSelector(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Selector */
1492 #define cmUnpkEvent(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Event */
1493 #define cmUnpkCntr(x, mBuf) SUnpkS32(x, mBuf) /* unpack Cntr */
1494 #define cmUnpkStsCntr(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack StsCntr */
1495 #define cmUnpkLnkNmb(x, mBuf) SUnpkS16(x, mBuf) /* unpack LnkNmb */
1496 #define cmUnpkSuId(x, mBuf) SUnpkS16(x, mBuf) /* unpack SuId */
1497 #define cmUnpkSpId(x, mBuf) SUnpkS16(x, mBuf) /* unpack SpId */
1498 #define cmUnpkSuInstId(x, mBuf) SUnpkS16(x, mBuf) /* unpack SuInstId */
1499 #define cmUnpkSpInstId(x, mBuf) SUnpkS16(x, mBuf) /* unpack SpInstId */
1500 #define cmUnpkSapi(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Sapi */
1501 #define cmUnpkTei(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Tei */
1502 #define cmUnpkchNo(x, mBuf) SUnpkS8(x, mBuf) /* unpack Channel Number */
1503 #define cmUnpkCes(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Ces */
1504 #define cmUnpkDlci(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack Dlci */
1505 #define cmUnpkCalRef(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack CalRef */
1506 #define cmUnpkOrigin(x, mBuf) SUnpkS16(x, mBuf) /* unpack Origin */
1507 #define cmUnpkNwId(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack NwId */
1508 #define cmUnpkSwtch(x, mBuf) SUnpkS16(x, mBuf) /* unpack Swtch */
1509 #define cmUnpkCause(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Cause */
1510 #define cmUnpkDgn(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Dgn */
1511 #define cmUnpkAction(x, mBuf) SUnpkS16(x, mBuf) /* unpack Action */
1512 #define cmUnpkSeqS16(x, mBuf) SUnpkS16(x, mBuf) /* unpack SeqS16 */
1513 #define cmUnpkSeqUInt16(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack SeqUInt16 */
1514 #define cmUnpkSeqS24(x, mBuf) SUnpkS32(x, mBuf) /* unpack SeqS24 */
1515 #define cmUnpkSeqUInt24(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack SeqUInt24 */
1516 #define cmUnpkSetUpArb(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack SetUpArb */
1517 #define cmUnpkEvntType(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack EvntType */
1518 #define cmUnpkState(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack State */
1519 #define cmUnpkMode(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Mode */
1520 #define cmUnpkConnId(x, mBuf) SUnpkS32(x, mBuf) /* unpack ConnId */
1521 #define cmUnpkUConnId(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack uns ConnId */
1522 #define cmUnpkMibOpCode(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack mib opCode*/
1523 #define cmUnpkMibStatus(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack mib cfm status*/
1524 #define cmUnpkMibTblType(x, mBuf) oduUnpackUInt16(x, mBuf) /* Pack mib table type */
1525 #define cmUnpkMibReqId(x, mBuf) SUnpkS32(x, mBuf) /* Pack mib request Id */
1526 #define cmUnpkProfileId(x, mBuf) oduUnpackUInt8(x, mBuf) /* Pack HCC Profile Id */
1527 #define cmUnpkIntfId(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack intf id */
1528 #define cmUnpkIntfVer(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack intf ver */
1529 #define cmUnpkuaType(x, mBuf) oduUnpackUInt8(x, mBuf) /* Unpack uaType */
1530 /* scc specific typedefs */
1532 #define cmUnpkBaud(x, mBuf) SUnpkS16(x, mBuf) /* unpack Baud */
1533 #define cmUnpkPhysIntType(x, mBuf) SUnpkS16(x, mBuf) /* unpack PhysIntType */
1534 #define cmUnpkPathConnType(x, mBuf) SUnpkS16(x, mBuf) /* unpack PathConnType */
1535 #define cmUnpkParity(x, mBuf) SUnpkS16(x, mBuf) /* unpack Parity */
1536 #define cmUnpkCharLength(x, mBuf) SUnpkS16(x, mBuf) /* unpack CharLength */
1537 #define cmUnpkStopBits(x, mBuf) SUnpkS16(x, mBuf) /* unpack StopBits */
1539 /* tcp/ip specific typedefs */
1541 #define cmUnpkIpAddr(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack IpAddr */
1542 #define cmUnpkPort(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack Port */
1543 #define cmUnpkCmd(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Cmd */
1544 #define cmUnpkFlags(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Flags */
1545 #define cmUnpkTtl(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Ttl */
1546 #define cmUnpkPrec(x, mBuf) oduUnpackUInt8(x, mBuf) /* unpack Prec */
1547 #define cmUnpkWindow(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack Window */
1549 /* LLC/SNAP specific defines */
1551 #define cmUnpkOui(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack Oui */
1552 #define cmUnpkPid(x, mBuf) oduUnpackUInt16(x, mBuf) /* unpack Pid */
1553 #define cmUnpkLlcId(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack LLcId */
1555 /* packing and unpacking for token strings */
1557 #define CMPKTKNSTR(tknStr, mBuf) \
1564 for (i = 0; i < (S16) tknStr->len; i++) \
1566 CMCHKPK(oduPackUInt8, tknStr->val[i], mBuf); \
1570 CMCHKPK(oduPackUInt8, tknStr->len, mBuf); \
1573 /* Token Header */ \
1574 CMCHKPK(oduPackUInt8, tknStr->pres, mBuf); \
1577 #define CMUNPKTKNSTR(tknStr, mBuf) \
1581 /* Token Header */ \
1582 CMCHKUNPK(oduUnpackUInt8, &tknStr->pres, mBuf); \
1587 CMCHKUNPK(oduUnpackUInt8, &tknStr->len, mBuf); \
1590 for (i = 1; i <= (S16) tknStr->len; i++) \
1592 CMCHKUNPK(oduUnpackUInt8, &tknStr->val[tknStr->len - i], mBuf); \
1598 #endif /* CMFILE_REORG_1 */
1600 #define cmPkTranId(x, mBuf) oduPackUInt32(x, mBuf) /* Pack transaction Id */
1601 #define cmUnpkTranId(x, mBuf) oduUnpackUInt32(x, mBuf) /* unpack transaction Id */
1604 typedef struct _debugInfo
1611 DebugInfo debugInfo;
1614 #endif /* __GENH__ */
1617 /********************************************************************30**
1620 **********************************************************************/