Adding new commiter to ODU-High repo
[o-du/l2.git] / src / cm / gen.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18 \f
19 /********************************************************************20**
20   
21      Name:     general layer
22   
23      Type:     C include file
24   
25      Desc:     Structures, variables and typedefs required by two
26                or more layer service user interfaces.
27    
28      File:     gen.x
29   
30 *********************************************************************21*/
31
32 #ifndef __GENX__
33 #define __GENX__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 #ifdef RGL_SPECIFIC_CHANGES
40 #include  "cm_debug.h"
41 #endif   
42
43 \f
44 /* typedefs */
45
46 typedef S8 Txt;                   /* text */
47
48 typedef uint8_t Ent;                   /* entity */
49
50 typedef uint8_t Inst;                  /* instance */
51
52 typedef struct entityId           /* entity id */
53 {
54    Ent ent;                       /* entity */
55    Inst inst;                     /* instance */
56 } EntityId;
57
58 /* element id */
59  
60 typedef S16 Elmnt;                /* element */
61  
62 typedef S16 ElmntInst1;           /* element instance 1 */
63  
64 typedef S16 ElmntInst2;           /* element instance 2 */
65  
66 typedef S16 ElmntInst3;           /* element instance 3 */
67   
68 typedef struct elmntId            /* element id */
69 {
70    Elmnt elmnt;                   /* element */
71    ElmntInst1 elmntInst1;         /* element instance 1 */
72    ElmntInst2 elmntInst2;         /* element instance 2 */
73    ElmntInst3 elmntInst3;         /* element instance 3 */
74 } ElmntId;
75
76 typedef uint8_t Region;                /* region */
77
78 typedef uint8_t Pool;                  /* pool */
79
80 typedef uint8_t Prior;                 /* priority */
81
82 typedef Prior Priority;           /* priority */
83
84 typedef uint8_t Route;                 /* route */
85
86 typedef uint8_t Data;                  /* data */
87
88 typedef uint8_t Selector;              /* selector */
89
90 typedef S16 Reason;               /* reason */
91
92 typedef uint16_t ProcId;               /* processor id */
93
94 typedef uint8_t Event;                 /* event */
95
96 typedef uint32_t TranId;               /* transaction Id */
97
98 typedef S16 IntNum;               /* Interface Number */
99
100 typedef uint16_t TranNum;              /* Transaction Number */
101
102 typedef uint16_t     CmIntfId;         /* Interface identifier       */
103 typedef uint16_t     CmIntfVer;        /* Interface version          */
104
105 #ifdef TDS_ROLL_UPGRADE_SUPPORT
106 typedef struct  cmIntf            /* Attributes of an interface */
107 {
108    CmIntfId     intfId;           /* Interface identifier       */
109    CmIntfVer    intfVer;          /* Interface version          */
110 } CmIntf;
111 #endif
112
113 /* post structure *** ALIGNED & ORDERED *** */
114 typedef struct pst                /* parameters for SPstTsk */
115 {
116    ProcId dstProcId;              /* destination processor id (uint16_t) */
117    ProcId srcProcId;              /* source processor id      (uint16_t) */
118
119    Ent dstEnt;                    /* destination entity       (uint8_t)  */
120    Inst dstInst;                  /* destination instance     (uint8_t)  */
121    Ent srcEnt;                    /* source entity            (uint8_t)  */
122    Inst srcInst;                  /* source instance          (uint8_t)  */
123
124    Prior prior;                   /* priority                 (uint8_t)  */   
125    Route route;                   /* route                    (uint8_t)  */
126    Event event;                   /* event                    (uint8_t)  */
127    Region region;                 /* region                   (uint8_t)  */
128
129    Pool pool;                     /* pool                     (uint8_t)  */
130    Selector selector;             /* selector                 (uint8_t)  */
131    CmIntfVer intfVer;             /* interface version        (uint16_t) */
132 } Pst;
133
134 /* systemId structure */
135   
136 typedef struct systemId           /* system id */
137 {
138    S16 mVer;                      /* main version */
139    S16 mRev;                      /* main revision */
140    S16 bVer;                      /* branch version */
141    S16 bRev;                      /* branch revision */
142    Txt *ptNmb;                    /* part number */
143 } SystemId;
144
145 /* Protocol Address Structure */
146 /* Note: The Order of variables should not be changed as it breaks MPC/MPS
147  *       code in PLOA
148  */
149 typedef struct protAddr
150 {
151    uint16_t      protType;                  /* Protocol Type */
152    uint8_t       len;                       /* Protocol Address Length in bytes */
153    uint8_t       preLen;                    /* prefix length in bits */
154    uint8_t       address[MAX_PROTADDR_LEN]; /* Protocol Address */ 
155 #ifdef CM_ARI2
156    Bool     autoSysIdPres;         /* Is Autonomous System Id Present */
157    uint32_t      autoSysId;                 /* Autonomous System Id */
158 #endif /* CM_ARI2 */
159
160 }ProtAddr;
161
162 typedef struct protAddrTbl
163 {
164    uint8_t         count;                 /* Number of addresses */
165    ProtAddr   addr[MAX_PROT_ADDRS];  /* Protocol Address List */
166 }ProtAddrTbl;
167
168 /* addrs structure */
169
170 typedef struct addrs              /* address */
171 {
172    uint8_t length;                     /* length (bytes or nibbles) */
173    uint8_t strg[ADRLEN];               /* address */
174 } Addrs;
175
176 typedef struct shrtAddr           /* short address */
177 {
178    uint8_t length;                     /* length bytes */
179    uint8_t strg[SHRTADRLEN];           /* address */
180 } ShrtAddrs;
181
182 typedef struct lngAddr            /* long address */
183 {
184    uint8_t length;                     /* length bytes */
185    uint8_t strg[LNGADRLEN];            /* address */
186 } LngAddrs;
187
188 /* bndCfg structure */
189
190 typedef struct bndCfg             /* bind configuration */
191 {
192    Txt *usrId;                    /* user id */
193    uint8_t bufOwnshp;                  /* buffer ownership */
194    uint8_t flcTyp;                     /* flow control type */
195    uint8_t wdw;                        /* window */
196    Ent ent;                       /* entity */
197    Inst inst;                     /* instance */
198    Region region;                 /* region */
199    Pool pool;                     /* pool */
200    Prior prior;                   /* priority */
201    Route route;                   /* route */
202    Addrs sapAdr;                  /* SAP Address */
203    Selector selector;             /* selector */
204 } BndCfg;
205
206 /* gen_x_001.main_91 : Added Definition of Circular Buffer Structure */
207 /* Circular Buffer Structure */
208 #ifdef CBUF_ENABLE
209 typedef struct cb {
210    uint32_t cBufIdx;
211    uint32_t cBufSize;
212    uint8_t *cBufPtr;
213    S8 tmpBuf[CBUFPRNTSZE];
214 }cBuffer;
215 #endif /* CBUF_ENABLE */
216
217 /* tskInit structure */
218
219 typedef struct tskInit            /* task initialization */
220 {
221 #ifdef SS_MULTIPLE_PROCS
222    ProcId proc;                   /* processor */
223 #endif /* SS_MULTIPLE_PROCS */
224    Ent ent;                       /* entity */
225    Inst inst;                     /* instance */
226    Region region;                 /* static region */
227    Pool pool;                     /* static pool */
228    Reason reason;                 /* reason */
229    Bool cfgDone;                  /* configuration done */
230    Bool acnt;                     /* accounting */ 
231    Bool usta;                     /* unsolicited status */
232    Bool trc;                      /* trace */
233 #ifdef DEBUGP
234    uint32_t dbgMask;                   /* debug mask */
235    Txt prntBuf[255];          /* print buffer */
236 #endif
237    Txt *prntCirBuf; /* print buffer for each system task */
238 #ifdef SS_DIAG
239    /* gen_x_001.main_96 :Added logmask */
240    uint32_t logMask;                   /* Logging mask */
241 #endif
242    BndCfg lmBnd;                  /* layer management bind */
243    ProcId procId;                 /* processor id */
244    Pst lmPst;                     /* layer management post */
245    /* gen_x_001.main_91 : Added cBuffer in task initialisation strucutre */
246 #ifdef CBUF_ENABLE
247    cBuffer cBuf;                  /* Circular Buffer */
248 #endif /* CBUF_ENABLE */
249    /* gen_x_001.main_92 : Added timestamp related parameter */
250    /* gen_x_001.main_93 : Guarding the Timestamp related changes in the compile time flag*/
251 #ifdef DBG_TIMESTAMP
252    SLockId dbgLock;               /* write lock for the log files */
253    Bool lyrMtFlag;                /* Layer is Multithreaded or not flag */
254 #endif
255    
256 } TskInit;
257
258 \f
259 typedef S32 Cntr;                 /* counter */
260  
261 typedef uint32_t StsCntr;              /* Statistics counter */
262
263 typedef S16 LnkNmb;               /* link number */
264
265 typedef S8 VBit;                      /*V Bit */
266
267 typedef S16 SuId;                 /* service user sap id */
268
269 typedef S16 SpId;                 /* service provider sap id */
270
271 typedef S16 SuInstId;             /* service user instance id */
272
273 typedef S16 SpInstId;             /* service provider instance id */
274
275 typedef uint16_t PortId;               /* port id */
276
277 typedef uint8_t Sapi;                  /* service access point id */
278  
279 typedef uint8_t Tei;                   /* terminal endpoint id */
280
281 typedef uint8_t Ces;                   /* connection endpoint suffix */
282
283 typedef uint32_t Dlci;                 /* data link control identifier */ 
284
285 typedef uint16_t CalRef;               /* call Reference */
286
287 typedef S16 Origin;               /* origin */
288
289 typedef uint16_t NwId;                 /* Network Identifier */
290
291 typedef S16 Swtch;                /* switch */
292
293 typedef uint8_t Cause;                 /* cause code */
294
295 typedef uint8_t Dgn;                   /* diagnostic code */
296
297 typedef S16 Action;               /* action */
298
299 typedef S16 SeqS16;               /* signed 16 bit sequence number */
300  
301 typedef uint16_t SeqUInt16;               /* unsigned 16 bit sequence number */
302  
303 typedef S32 SeqS24;               /* signed 24 bit sequence number */
304  
305 typedef uint32_t SeqUInt24;               /* unsigned 24 bit sequence number */
306  
307 typedef uint8_t SetUpArb;              /* set up arbitration (PASSIVE/ACTIVE) */
308  
309 typedef uint8_t EvntType;              /* event type */
310
311 typedef uint8_t State;                 /* state */
312
313 typedef uint8_t Mode;                  /* mode */
314
315 typedef S32 ConnId;               /* connection id */
316
317 typedef uint32_t UConnId;              /* unsigned connection id */
318
319 typedef uint16_t ProtId;               /* protocol id */
320
321 typedef uint16_t ChannelId;            /* channel id */
322
323 typedef uint8_t  Arr64UInt8[64];            /* Array of 64 of type uint8_t*/
324
325 typedef uint16_t Efa;                  /* Envelope Address Function */
326
327 typedef uint32_t BitState;             /* Sa Bit ID and Value */
328
329 typedef uint8_t  CChanId;               /* V5UA Channel ID */
330
331 typedef uint16_t MibOpCode;            /* Op code for Mib Request MIB_REQUEST_GET,
332                                      MIB_REQUEST_GET_FIRST, MIB_REQUEST */
333
334 typedef uint16_t MibStatus;            /* Status returned in Mib Cfm */
335
336 typedef uint16_t MibTblType;           /* table type */
337
338 typedef S32 MibReqId;             /* request identifier */
339
340 typedef uint8_t  UstaType;             /* unsolicited status type */
341 typedef S8  ChannelNo;            /* Channel Number */
342
343 /* ATM typedefs */
344
345 #ifndef CMFILE_REORG_1
346
347 typedef uint16_t AtmVpci;              /* ATM virtual path connection id */
348 typedef uint16_t AtmVpi;               /* ATM virtual path id */
349
350
351 typedef uint16_t AtmVci;               /* ATM virtual channel id */
352
353 typedef uint8_t AtmLp;                 /* ATM loss priority */
354
355 typedef uint8_t AtmCi;                 /* ATM congestion indication */
356
357 typedef uint8_t AtmRs;                 /* ATM reception status */
358
359 typedef uint8_t AtmUu;                 /* ATM user-to-user field in CPCS PDUs */
360
361 typedef uint32_t AtmUui;               /* ATM user-to-user indication field in SSCOP PDUs */
362
363 typedef uint8_t AtmPt;                 /* ATM cell payload type */
364
365 typedef struct atmQos             /* ATM quality of service */
366 {
367    uint8_t qosFwd;                     /* qos in forward  direction */
368    uint8_t qosBwd;                     /* qos in backward direction */
369 } AtmQos;
370
371 /* Vitual channel structure */
372  
373 typedef struct amVccId             /* virtual channel connection identifier */
374 {
375    AtmVpci  vpci;                  /* virtual path connection identifier */
376    AtmVci   vci;                   /* virtual channel identifier */
377 } AmVccId;
378
379 /* VCC id */
380 typedef struct atmVccId         /* VCC id */
381 {
382    AtmVpi   vpi;                /* VPI */
383    AtmVci   vci;                /* VCI */
384 } AtmVccId;
385
386 /* VCC table */
387 typedef struct atmVccTbl                  /* VCC table */
388 {
389    uint16_t        count;                      /* number of VCCs */
390    AtmVccId   tbl[MAX_ATMVCCTBL_SZ];      /* VCC list */
391 } AtmVccTbl;
392
393 /* Generic ATM address */
394 typedef struct atmAddr
395 {
396    uint8_t    type;                  /* type of Address (AESA or E.164) */
397    uint8_t    len;                   /* length (bytes) */
398    uint8_t    strg[ADRLEN];          /* address string */
399 } AtmAddr;
400
401 /* ATM address table */
402 typedef struct atmAddrTbl            /* ATM address table */
403 {
404    uint16_t      count;                   /* number of ATM addresses */
405    AtmAddr  tbl[MAX_ATMADDRTBL_SZ];  /* ATM address list */
406 } AtmAddrTbl;
407
408 typedef struct atmTfcDesc         /* ATM traffic descriptor */
409 {
410    uint32_t  fwdPeakCellRate0;         /* forward  peak  cell rate, CLP = 0   */
411    uint32_t  bwdPeakCellRate0;         /* backward peak  cell rate, CLP = 0   */
412    uint32_t  fwdPeakCellRate1;         /* forward  peak  cell rate, CLP = 0+1 */
413    uint32_t  bwdPeakCellRate1;         /* backward peak  cell rate, CLP = 0+1 */
414    uint32_t  fwdSustCellRate0;         /* forward  sust. cell rate, CLP = 0   */
415    uint32_t  bwdSustCellRate0;         /* backward sust. cell rate, CLP = 0   */
416    uint32_t  fwdSustCellRate1;         /* forward  sust. cell rate, CLP = 0+1 */
417    uint32_t  bwdSustCellRate1;         /* backward sust. cell rate, CLP = 0+1 */
418    uint32_t  fwdMeanBurstSize0;        /* forward  mean burst size, CLP = 0   */
419    uint32_t  bwdMeanBurstSize0;        /* backward mean burst size, CLP = 0   */
420    uint32_t  fwdMeanBurstSize1;        /* forward  mean burst size, CLP = 0+1 */
421    uint32_t  bwdMeanBurstSize1;        /* backward mean burst size, CLP = 0+1 */
422    Bool bstEffortReq;             /* best effort requested */
423    Bool fwdTagReq;                /* tagging requested in forward  direction */
424    Bool bwdTagReq;                /* tagging requested in backward direction */
425 } AtmTfcDesc;
426
427 #endif /* CMFILE_REORG_1 */
428
429
430 /* scc typedefs */
431
432 typedef S16 Baud;                 /* baud */
433
434 typedef S16 PhysIntType;          /* physical interface type */
435
436 typedef S16 PathConnType;         /* path connection type */
437
438 typedef S16 Parity;               /* parity */
439
440 typedef S16 CharLength;           /* character length */
441
442 typedef S16 StopBits;             /* stop bits */
443
444 /* tcp/ip typedefs */
445
446 typedef uint32_t IpAddr;               /* IP address */
447
448 typedef uint16_t Port;                 /* TCP/UDP port */
449
450 typedef uint8_t Cmd;                   /* command */
451
452 typedef uint8_t Flags;                 /* TCP/UDP flags */
453
454 typedef uint8_t Ttl;                   /* time to live */
455
456 typedef uint8_t Prec;                  /* TCP/UDP precedence */
457
458 typedef uint32_t Window;               /* TCP/UDP window */
459
460 typedef uint8_t MtpStatus;             /* MTP status */
461
462 typedef uint8_t Credit;                /* credit */
463
464 /* ISUP typedefs */
465
466 typedef uint32_t CirId;                /* circuit Id */
467
468 typedef uint16_t Cic;                  /* cic */
469
470 typedef uint32_t SiInstId;             /* instance id */
471
472 /* B-ISUP typedefs */
473
474 typedef uint32_t BiInstId;             /* instance id */
475
476 /* TUP typedefs */
477
478 typedef uint32_t TpInstId;             /* instance id */
479
480 /* LLC/SNAP definitions */
481
482 typedef uint32_t Oui;                 /* 3-octet OUI in SNAP header */
483 typedef uint16_t Pid;                 /* 2-octet protocol id in SNAP header */
484 typedef uint32_t LlcId;               /* LLC id */
485
486
487 #ifndef CMFILE_REORG_1
488
489 /* q.93b typedefs */
490  
491 typedef S32 AmInstId;             /* service user/provider instance id */
492 typedef uint16_t AmEndptRefType;       /* endpoint reference */
493 typedef uint32_t AmSeqNmb;             /* sequence number */
494  
495 /* q.saal typedefs */
496  
497 typedef uint16_t AsErrorCode;          /* q.saal error code (Q.SAAL1 Appendix 1) */
498
499 /* ume typedefs */
500
501 typedef uint32_t UmInteger;            /* ume integer */
502  
503 typedef struct umObjId            /* ume object identifier */
504 {
505    Data length;                   /* length of string */
506    UmInteger strg[UM_MAXLEN_OBJ_ID]; /* string of sub-identifiers */
507 } UmObjId;
508
509 typedef struct umMib UmMib;       /* ume mib */
510
511 \f
512 /* 
513  * LAN Emulation typedefs 
514  */
515
516 /* general typedefs */
517
518 typedef uint16_t LecId;               /* LEC Id */
519 typedef uint8_t  Protocol;            /* protocol */
520 typedef uint8_t  Version;             /* version */
521 typedef uint16_t OpCode;              /* op code in control frames */
522 typedef uint16_t LaneStatus;          /* status in control frames */
523 typedef uint32_t TransId;             /* transaction id */
524 typedef uint16_t LaneFlags;           /* flags in control frames */
525 typedef uint8_t  LanType;             /* LAN type */
526 typedef uint8_t  MtuIdx;              /* max frame size - index */
527 typedef uint16_t MtuVal;              /* max frame size - value */
528 typedef uint16_t Tag;                 /* tag indicating LAN destination type */
529 typedef uint8_t  VccNature;           /* VCC nature - SVC, PVC, etc. */
530 typedef uint8_t  VccType;             /* VCC type - control, data, etc */
531 typedef uint8_t  ProfileId;           /* HCC profile id */
532
533
534 typedef struct lanName          /* LAN name */
535 {
536    uint8_t length;                   /* length of string */
537    uint8_t strg[MAX_LANNAME];        /* name string */
538 } LanName;
539
540 /* LAN destination typedefs */
541
542 typedef struct macAddr          /* MAC address */
543 {
544    uint8_t strg[MACADDRLEN];         /* address string */
545 } MacAddr;
546
547 typedef struct macAddrTblEntry  /* entry in table of MAC addresses */
548 {
549    uint8_t proxyClass;               /* proxy class - local, learned */
550    MacAddr macAddr;             /* MAC address */
551 } MacAddrTblEntry;
552
553 typedef struct macAddrTbl       /* table of MAC addresses */
554 {
555    uint8_t count;                    /* number of entries */
556    MacAddrTblEntry tbl[MAX_MACADDRTBL]; /* table of MAC addresses */
557 } MacAddrTbl;
558
559 typedef struct rd               /* route designator */
560 {
561    uint16_t lanId;                   /* LAN id, segment id - 12 bits */
562    uint8_t  bridgeId;                /* bridge id - 4 bits */
563 } Rd;
564
565 typedef struct rdTblEntry       /* entry in table of route designators */
566 {
567    Rd rd;                       /* route designator */
568 } RdTblEntry;
569
570 typedef struct rdTbl            /* table of route designators */
571 {
572    uint8_t count;                    /* number of entries */
573    RdTblEntry tbl[MAX_RDTBL];/* table of route designator */
574 } RdTbl;
575
576 typedef struct lanDst           /* LAN destination - MAC addr, route desg */
577 {
578    Tag tag;                     /* LAN destination type */
579    union
580    {
581       MacAddr macAddr;          /* MAC address */
582       Rd rd;                    /* route designator */
583    } ld;
584 } LanDst;
585
586 \f
587 /* control frame typedefs */
588
589 typedef struct laneCtrlHdr      /* control frame header */
590 {
591    LecId      marker;           /* control frame marker */
592    Protocol   protocol;         /* LANE protocol */
593    Version    version;          /* LANE version */
594    OpCode     opCode;           /* operation code */
595    LaneStatus status;           /* request status */
596    TransId    transId;          /* transaction id */
597    LecId      reqLecId;         /* requestor LEC id */
598    LaneFlags  flags;            /* bit flags */
599    LanDst     srcLanDst;        /* source LAN destination */
600    LanDst     dstLanDst;        /* target LAN destination */
601    Addrs      srcAtmAddr;       /* source ATM address */
602    Addrs      dstAtmAddr;       /* target ATM address */
603    LanType    lanType;          /* LAN type */
604    MtuIdx     mtuIdx;           /* MTU */
605    uint8_t         nmbTLV;           /* number of TLV entries in list */
606    LanName    lanName;          /* LAN name */
607 } LaneCtrlHdr;
608
609 typedef struct laneTLVEnt       /* type-length-value entry */
610 {
611    uint32_t type;                    /* type of value */
612    uint8_t  length;                  /* length of value */
613    uint8_t  value[MAX_TLV_LEN];      /* value */
614 } LaneTLVEnt;
615
616 typedef struct laneCfg          /* configuration frame */
617 {
618    LaneTLVEnt  tlvTbl[MAX_TLV_TBL]; /* list of TLV entries */
619 } LaneCfg;
620
621 typedef struct laneCtrlFrame    /* all control frames */
622 {
623    LaneCtrlHdr  hdr;            /* frame header */
624    union                        /* remainder of frame */
625    {
626       LaneCfg   cfg;            /* configuration frame */
627    } m;
628 } LaneCtrlFrame;
629
630 /* PNNI typedefs */
631
632 /* pnni port id */
633 typedef uint32_t PnPortId;
634
635 /* pnni node Id */
636 typedef struct pnNodeId
637 {
638    uint8_t id[PN_NODEID_LEN];
639 } PnNodeId;
640
641 #endif /* CMFILE_REORG_1 */
642
643
644 \f
645 /* header typedefs */
646
647 typedef struct octStrg            /* octet string */
648 {
649    S32 length;                    /* length */
650    uint8_t val[MF_SIZE_TKNSTR];        /* value */
651 } OctStrg;
652
653 typedef struct tknHdr             /* token header */
654 {
655    uint8_t   pres;                     /* present */
656    uint8_t   spare1;                   /* for 16 bit alignment */
657    uint16_t  spare2;                   /* for 32 bit alignment */
658 #ifdef ALIGN_64BIT
659    uint32_t  spare3;                   /* for 64 bit alignment */
660 #endif
661 } TknHdr;
662
663 typedef struct elmtHdr            /* element header */
664 {
665    uint8_t   pres;                     /* present */
666    uint8_t   actnInd;                  /* action indicator */
667    uint16_t  compInd;                  /* for alignment */
668 #ifdef ALIGN_64BIT
669    uint32_t  spare;                    /* for 64 bit alignment */
670 #endif
671 } ElmtHdr;
672
673 /* token typedefs */
674
675 typedef struct tknUInt8              /* token uint8_t */
676 {
677    uint8_t   pres;                     /* present flag */
678    uint8_t   val;                      /* value */
679    uint16_t  spare1;                   /* for alignment */
680 #ifdef ALIGN_64BIT
681    uint32_t  spare2;                   /* for 64 bit alignment */
682 #endif
683 } TknUInt8;
684
685 typedef struct tknS8              /* token S8 */
686 {
687    uint8_t   pres;                     /* present flag */
688    S8   val;                      /* value */
689    uint16_t  spare1;                   /* for alignment */
690 #ifdef ALIGN_64BIT
691    uint32_t  spare2;                   /* for 64 bit alignment */
692 #endif
693 } TknS8;
694
695 typedef struct tknUInt16             /* token uint16_t */
696 {
697    uint8_t   pres;                     /* present flag */
698    uint8_t   spare1;                   /* for alignment */
699    uint16_t  val;                      /* value */
700 #ifdef ALIGN_64BIT
701    uint32_t  spare2;                   /* for 64 bit alignment */
702 #endif
703 } TknUInt16;
704
705 typedef struct tknUInt32             /* token uint32_t */
706 {
707    uint8_t   pres;                     /* present flag */
708    uint8_t   spare1;                   /* for alignment */
709    uint16_t  spare2;                   /* for alignment */
710    uint32_t  val;                      /* value */
711 } TknUInt32;
712
713 typedef struct tknS32             /* token S32 */
714 {
715    uint8_t   pres;                     /* present flag */
716    uint8_t   spare1;                   /* for alignment */
717    uint16_t  spare2;                   /* for alignment */
718    S32  val;                      /* value */
719 } TknS32;
720
721 typedef struct tknStrS            /* token string */
722 {
723    uint8_t   pres;                     /* present flag */
724    uint8_t   len;                      /* length */
725    uint16_t  spare1;                   /* for alignment */
726 #ifdef ALIGN_64BIT
727    uint32_t  spare2;                   /* for 64 bit alignment */
728    uint8_t   val[(MF_SIZE_TKNSTRS + 7) & 0xff8]; /* string value */
729 #else
730    uint8_t   val[(MF_SIZE_TKNSTRS + 3) & 0xffc]; /* string value */
731 #endif
732 } TknStrS;
733
734 typedef struct tknStrM            /* token string */
735 {
736    uint8_t   pres;                     /* present flag */
737    uint8_t   len;                      /* length */
738    uint16_t  spare1;                   /* for alignment */
739 #ifdef ALIGN_64BIT
740    uint32_t  spare2;                   /* for 64 bit alignment */
741    uint8_t   val[(MF_SIZE_TKNSTRM + 7) & 0xff8]; /* string value */
742 #else
743    uint8_t   val[(MF_SIZE_TKNSTRM + 3) & 0xffc]; /* string value */
744 #endif
745 } TknStrM;
746
747 typedef struct tknStr             /* token string */
748 {
749    uint8_t   pres;                     /* present flag */
750    uint8_t   len;                      /* length */
751    uint16_t  spare1;                   /* for alignment */
752 #ifdef ALIGN_64BIT
753    uint32_t  spare2;                   /* for 64 bit alignment */
754    uint8_t   val[(MF_SIZE_TKNSTR + 7) & 0xff8]; /* string value */
755 #else
756    uint8_t   val[(MF_SIZE_TKNSTR + 3) & 0xffc]; /* string value */
757 #endif
758 } TknStr;
759
760 typedef struct tknStrE            /* token string extended */
761 {
762    uint8_t   pres;                     /* present flag */
763    uint8_t   len;                      /* length */
764    uint16_t  spare1;                   /* for alignment */
765 #ifdef ALIGN_64BIT
766    uint32_t  spare2;                   /* for 64 bit alignment */
767    uint8_t   val[(MF_SIZE_TKNSTRE + 7) & 0xff8]; /* string value */
768 #else
769    uint8_t   val[(MF_SIZE_TKNSTRE + 3) & 0xffc]; /* string value */
770 #endif
771 } TknStrE;
772
773 typedef struct tknStrXL           /* token string extra long */
774 {
775    uint16_t  len;                      /* length */
776    uint8_t   pres;                     /* present flag */
777    uint8_t   spare1;                   /* for alignment */
778 #ifdef ALIGN_64BIT
779    uint32_t  spare2;                   /* for 64 bit alignment */
780 #endif
781    uint8_t   *val;                     /* string value (use allocated memory) */
782 } TknStrXL;
783  
784 typedef struct tknStr4            /* token string */
785 {
786    uint8_t   pres;                     /* present flag */
787    uint8_t   len;                      /* length */
788    uint16_t  spare1;                   /* for alignment */
789 #ifdef ALIGN_64BIT
790    uint32_t  spare2;                   /* for 64 bit alignment */
791    uint8_t   val[8];                   /* string value - 8 byte alligned */
792 #else
793    uint8_t   val[4];                   /* string value - 4 byte alligned */
794 #endif /* ALIGN_64BIT */
795 } TknStr4;
796
797 typedef struct tknStr12           /* token string */
798 {
799    uint8_t   pres;                     /* present flag */
800    uint8_t   len;                      /* length */
801    uint16_t  spare1;                   /* for alignment */
802 #ifdef ALIGN_64BIT
803    uint32_t  spare2;                   /* for 64 bit alignment */
804    uint8_t   val[16];                  /* string value - 8 byte alligned */
805 #else
806    uint8_t   val[12];                  /* string value - 4 byte alligned */
807 #endif /* ALIGN_64BIT */
808 } TknStr12;
809
810 typedef struct tknStr32           /* token string */
811 {
812    uint8_t   pres;                     /* present flag */
813    uint8_t   len;                      /* length */
814    uint16_t  spare1;                   /* for alignment */
815 #ifdef ALIGN_64BIT
816    uint32_t  spare2;                   /* for 64 bit alignment */
817 #endif
818    uint8_t   val[32];                  /* string value - 4 byte alligned */
819 } TknStr32;
820
821 typedef struct tknStr64           /* token string */
822 {
823    uint8_t   pres;                     /* present flag */
824    uint8_t   len;                      /* length */
825    uint16_t  spare1;                   /* for alignment */
826 #ifdef ALIGN_64BIT
827    uint32_t  spare2;                   /* for 64 bit alignment */
828 #endif
829    uint8_t   val[64];                  /* string value - 4 byte alligned */
830 } TknStr64;
831
832 typedef struct tknStr132          /* token string */
833 {
834    uint8_t   pres;                     /* present flag */
835    uint8_t   len;                      /* length */
836    uint16_t  spare1;                   /* for alignment */
837 #ifdef ALIGN_64BIT
838    uint32_t  spare2;                   /* for 64 bit alignment */
839    uint8_t   val[136];                 /* string value - 8 byte alligned */
840 #else
841    uint8_t   val[132];                 /* string value - 4 byte alligned */
842 #endif /* ALIGN_64BIT */
843 } TknStr132;
844
845 typedef struct tknStr256          /* token string */
846 {
847    uint8_t   pres;                     /* present flag */
848    uint8_t   len;                      /* length */
849    uint16_t  spare1;                   /* for alignment */
850 #ifdef ALIGN_64BIT
851    uint32_t  spare2;                   /* for 64 bit alignment */
852 #endif
853    uint8_t   val[256];                 /* string value - 4 byte alligned */
854 } TknStr256;
855
856 typedef struct tknOid             /* Object Identifier */
857 {
858    uint8_t   pres;                     /* present flag */
859    uint8_t   len;                      /* length */
860    uint16_t  spare1;                   /* for alignment */
861 #ifdef ALIGN_64BIT
862    uint32_t  spare2;                   /* for 64 bit alignment */
863 #endif
864    /* gen_x_001.main_81 : changed val from uint32_t to uint16_t with comilation flag
865     * TKNOID_UINT16 */
866 #ifndef TKNOID_UINT16
867    uint32_t  val[32];                  /* max 32 integers of less than 64k value */
868 #else
869    uint16_t  val[32];                  /* max 32 integers of less than 64k value */
870 #endif
871 } TknOid;
872
873 typedef struct tknBits            /* token bits */
874 {
875    uint8_t   pres;                     /* present flag */
876    uint8_t   len;                      /* for alignment */
877    uint16_t  spare1;                   /* for alignment */
878 #ifdef ALIGN_64BIT
879    uint32_t  spare2;                   /* for 64 bit alignment */
880    uint8_t   val[(MF_SIZE_TKNBITS + 7) & 0xff8]; /* string value */
881 #else
882    uint8_t   val[(MF_SIZE_TKNBITS + 3) & 0xffc]; /* string value */
883 #endif
884 } TknBits;
885
886 typedef struct elmtStr            /* element string */
887 {
888    ElmtHdr eh;                    /* element header */
889    TknStr str;                    /* network specific information */
890 } ElmtStr;
891
892 typedef struct cdPtyNmb           /* called party number tokens */
893 {
894    ElmtHdr eh;                    /* element header */
895    TknUInt8 nmbPlanId;               /* numbering plan identification */
896    TknUInt8 typeNmb0;                /* type of number */
897 #ifdef CDPTYNMB_32DIGIT
898    TknStrM nmbDigits;             /* number digits */
899 #else
900    TknStrS nmbDigits;             /* number digits */
901 #endif /* CDPTYNMB_32DIGIT */
902 } CdPtyNmb;
903
904 typedef struct redirNmb           /* redirecting number tokens */
905 {
906    ElmtHdr eh;                    /* element header */
907    TknUInt8 nmbPlanId;               /* numbering plan identification */
908    TknUInt8 typeNmb;                 /* type of number */
909    TknUInt8 screenInd;               /* screening indicator */
910    TknUInt8 presInd;                 /* presentation indicator */
911    TknUInt8 rsnRedirect;             /* reason for redirection */
912    TknStrS nmbDigits;             /* number digits */
913 } RedirNmb;
914
915 typedef struct srvClass           /* service class */          
916 {                                                       
917    uint8_t type;                       /* type */                 
918    union                                                
919    {                                                    
920       struct                      /* frame relay */                                
921       {                                                 
922          Bool cr;                 /* command response bit */
923          Bool de;                 /* discard eligibility bit */ 
924       } fr;                                             
925       struct                      /* mac */
926       {                                                 
927          Prior prior;             /* priority */            
928       } ma;                                             
929    } s;                                                 
930 } SrvClass;                                              
931
932 /* ip header, without options */
933
934 typedef struct _ip           /* ip header */
935 {
936    uint8_t     ip_hl;            /* header length */
937    Prec   ip_tos;           /* type of service */
938    uint16_t    ip_len;           /* total length */
939    uint16_t    ip_id;            /* identification */
940    uint16_t    ip_off;           /* fragment offset field */
941    Ttl    ip_ttl;           /* time to live */
942    uint8_t     ip_p;             /* protocol */
943    uint16_t    ip_sum;           /* checksum */
944    IpAddr ip_src;           /* source address */
945    IpAddr ip_dst;           /* dest address */
946 } Ip;
947  
948
949 /* ATM structures */
950  
951 #ifndef CMFILE_REORG_1
952
953 /* info elements that can be used for routing calls */
954  
955 typedef struct amCdPtySad       /* Called Party Sub Address Tokens */
956 {
957    ElmtHdr eh;                  /* element header */
958    TknUInt8   oddEvenInd;          /* odd/even indicator */
959    TknUInt8   typeSad;             /* type of sub address */
960    TknStrS  sadInfo;            /* address/number information */
961 } AmCdPtySad;
962  
963 typedef struct amBHiLyrInfo     /* Broadband High Layer Information Tokens */
964 {
965    ElmtHdr eh;                  /* element header */
966    TknUInt8   hiLyrInfoType;       /* high layer information type */
967    TknStrS  hiLyrInfo;          /* high layer information */
968 } AmBHiLyrInfo;
969  
970 typedef struct amBBearCap       /* Broadband Bearer Capability Tokens */
971 {
972    ElmtHdr eh;                  /* element header */
973    TknUInt8   bearClass;           /* bearer class */
974    TknUInt8   timingReq;           /* timing requirement */
975    TknUInt8   tfcType;             /* traffic type */
976    TknUInt8   atmTfrCap;           /* ATM transfer capability */
977    TknUInt8   usrPlaneConCfg;      /* user plane connection configuration */
978    TknUInt8   suscClip;            /* susceptability to clipping */
979 } AmBBearCap;
980
981 typedef struct amQosParam       /* Quality of Service Parameter Tokens */
982 {
983    ElmtHdr eh;                  /* element header */
984    TknUInt8   qosClassFwd;         /* quality of service class forward */
985    TknUInt8   qosClassBwd;         /* quality of service class backward */
986 } AmQosParam;
987
988 typedef struct amEtoeDly        /* End To End Transit Delay Tokens */
989 {
990    ElmtHdr eh;                  /* element header */
991    TknUInt8   cumTransDlyId;       /* cumulative transit delay id */
992    TknUInt16  cumTransDly;         /* cumulative transit delay value */
993    TknUInt8   reqTransDlyId;       /* requested max end to end transit delay id */
994    TknUInt16  reqTransDly;         /* maximum end to end transit delay value */
995    TknUInt8   pnniAccFMCTDId;      /* PNNI acceptable forward max. CTD ID */
996    TknUInt32  pnniAccFMCTD;        /* PNNI acceptable forward max. CTD */
997    TknUInt8   pnniCumFMCTDId;      /* PNNI acceptable forward max. CTD ID */
998    TknUInt32  pnniCumFMCTD;        /* PNNI acceptable forward max. CTD */
999    TknUInt8   netGenInd;           /* network generated indicator */
1000 } AmEtoeDly;
1001
1002 typedef struct amOamTfcDesc     /* OAM Traffic Descriptor Tokens */
1003 {
1004    ElmtHdr eh;                  /* element header */
1005    TknUInt8   usrNetFaultMgmt;     /* user network fault management indicator */
1006    TknUInt8   compInd;             /* compliance indicator */
1007    TknUInt8   shapingInd;          /* shaping indicator */
1008    TknUInt8   bwdEtoeOamF5FlInd;   /* backward e-to-e OAM F5 flow indicator */
1009    TknUInt8   fwdEtoeOamF5FlInd;   /* forward e-to-e OAM F5 flow indicator */
1010 } AmOamTfcDesc;
1011
1012 typedef struct amEndptRef       /* Endpoint Reference Tokens */
1013 {
1014    ElmtHdr eh;                  /* element header */
1015    TknUInt8   endptRefType;        /* endpoint reference type */
1016    TknUInt16  endptRefVal;         /* endpoint reference value */
1017 } AmEndptRef;
1018
1019 typedef struct amAalParam       /* AAL Parameters Tokens */
1020 {
1021    ElmtHdr eh;                  /* element header */
1022    TknUInt8   aalType;             /* AAL type */
1023
1024    /* Token definition for AAL-1 */
1025    TknUInt8   subTypeId;           /* Subtype Identifier */
1026    TknUInt8   subType;             /* Subtype */
1027    TknUInt8   cbrRateId;           /* CBR Rate Identifier */
1028    TknUInt8   cbrRate;             /* CBR Rate */
1029    TknUInt8   multId;              /* Multiplier Identifier */
1030    TknUInt16  multVal;             /* Multiplier value */
1031    TknUInt8   srcClkFreqMetId;     /* Source clock Frequency method identifier */
1032    TknUInt8   srcClkFreqMet;       /* Source Clock frequency method */
1033    TknUInt8   errCrMetId;          /* Error correction method identifier */
1034    TknUInt8   errCrMet;            /* Error correction method */
1035    TknUInt8   strDatTxBlkszId;     /* Structured data transfer blocksize Id. */
1036    TknUInt8   strDatTxBlksz0;      /* Structured data transfer blocksize - oct 1*/
1037
1038    /* Token definition for AAL-1, except in UNI 3.0 */
1039    TknUInt8   strDatTxBlksz1;      /* Structured data transfer blocksize - oct 2*/
1040
1041    /* Token definition for AAL-1 */
1042    TknUInt8   prtFillCellId;       /* Partially filled cells Identifier */
1043    TknUInt8   prtFillCellMet;      /* Partially filled cells method */
1044
1045    /* Token definition for AAL-3/4 and AAL-5 */
1046    TknUInt8   fwdMaxCpcsSduSzId;   /* Forward maximum CPCS-SDU size identifier */
1047    TknUInt16  fwdMaxCpcsSduSz;     /* Forward maximum CPCS-SDU size */
1048    TknUInt8   bwdMaxCpcsSduSzId;   /* Forward maximum CPCS-SDU size identifier */
1049    TknUInt16  bwdMaxCpcsSduSz;     /* Forward maximum CPCS-SDU size */
1050
1051    /* Token definition for AAL-3/4 only */
1052    TknUInt8   midRangeId;          /* MID Range identifier */
1053    TknUInt16  loMidRange;          /* MID Range value */
1054
1055    /* Token definition for AAL-3/4 only, except in UNI 3.0 */
1056    TknUInt16  hiMidRange;          /* MID Range value */
1057
1058    /* Token definition for AAL-3/4 and AAL-5 and only for UNI 3.0 */
1059    TknUInt8   modeId;              /* Mode identifier */
1060    TknUInt8   mode;                /* Mode - Streaming/Message */
1061
1062    /* Token definition for AAL-3/4 and AAL-5 */
1063    TknUInt8   sscsTypeId;          /* SSCS Type Identifier */
1064    TknUInt8   sscsType;            /* SSCS Type */
1065
1066    /* Token definition for User defined AAL */
1067    TknUInt32  usrDefAalInfo;       /* User defined AAL information */
1068 } AmAalParam;
1069
1070 typedef struct amBLoLyrInfo     /* Broadband Low Layer Information Tokens */
1071 {
1072    ElmtHdr eh;                  /* element header */
1073    TknUInt8   usrInfoLyr1Prot;     /* user information layer 1 protocol */
1074    TknUInt8   lyr1Id;              /* Layer 1 id */
1075    TknUInt8   usrInfoLyr2Prot;     /* user information layer 2 protocol */
1076    TknUInt8   lyr2Id;              /* Layer 2 id */
1077    TknUInt8   q933Use;             /* Q.933 use */
1078    TknUInt8   lyr2OprMode;         /* Mode of operation */
1079    TknUInt8   winSize;             /* Window size */
1080    TknUInt8   usrSpecLyr2ProtInfo; /* User specified layer 2 protocol info */
1081    TknUInt8   usrInfoLyr3Prot;     /* user information layer 3 protocol */
1082    TknUInt8   lyr3Id;              /* Layer 3 id */
1083    TknUInt8   lyr3OprMode;         /* Mode of operation */
1084    TknUInt8   defPktSize;          /* Default packet size */
1085    TknUInt8   pktWinSize;          /* Default packet size */
1086    TknUInt8   usrSpecLyr3ProtInfo; /* User specified layer 3 protocol info */
1087    TknUInt8   initProtId;          /* Initial protocol Identifier bits 8-2 */
1088    TknUInt8   snapId;              /* SNAP identifier */
1089    TknUInt32  oui;                 /* Organisation unique identifier */
1090    TknUInt16  protId;              /* Protocol identifier */
1091 } AmBLoLyrInfo;
1092
1093 typedef struct amAtmTfcDesc     /* ATM Traffic Descriptor Tokens */
1094 {
1095    ElmtHdr eh;                  /* element header */
1096    TknUInt8   fwdPeakCellRateId0;  /* forward  peak  cell rate id, CLP = 0 */
1097    TknUInt32  fwdPeakCellRate0;    /* forward  peak  cell rate,    CLP = 0   */
1098    TknUInt8   bwdPeakCellRateId0;  /* backward peak  cell rate id, CLP = 0 */
1099    TknUInt32  bwdPeakCellRate0;    /* backward peak  cell rate,    CLP = 0   */
1100    TknUInt8   fwdPeakCellRateId1;  /* forward  peak  cell rate id, CLP = 0+1 */
1101    TknUInt32  fwdPeakCellRate1;    /* forward  peak  cell rate,    CLP = 0+1 */
1102    TknUInt8   bwdPeakCellRateId1;  /* backward peak  cell rate id, CLP = 0+1 */
1103    TknUInt32  bwdPeakCellRate1;    /* backward peak  cell rate,    CLP = 0+1 */
1104    TknUInt8   fwdSustCellRateId0;  /* forward  sust. cell rate id, CLP = 0 */
1105    TknUInt32  fwdSustCellRate0;    /* forward  sust. cell rate,    CLP = 0   */
1106    TknUInt8   bwdSustCellRateId0;  /* backward sust. cell rate id, CLP = 0 */
1107    TknUInt32  bwdSustCellRate0;    /* backward sust. cell rate,    CLP = 0   */
1108    TknUInt8   fwdSustCellRateId1;  /* forward  sust. cell rate id, CLP = 0+1 */
1109    TknUInt32  fwdSustCellRate1;    /* forward  sust. cell rate,    CLP = 0+1 */
1110    TknUInt8   bwdSustCellRateId1;  /* backward sust. cell rate id, CLP = 0+1 */
1111    TknUInt32  bwdSustCellRate1;    /* backward sust. cell rate,    CLP = 0+1 */
1112    TknUInt8   fwdMeanBurstSizeId0; /* forward  mean burst size id, CLP = 0 */
1113    TknUInt32  fwdMeanBurstSize0;   /* forward  mean burst size,    CLP = 0   */
1114    TknUInt8   bwdMeanBurstSizeId0; /* backward mean burst size id, CLP = 0 */
1115    TknUInt32  bwdMeanBurstSize0;   /* backward mean burst size,    CLP = 0   */
1116    TknUInt8   fwdMeanBurstSizeId1; /* forward  mean burst size id, CLP = 0+1 */
1117    TknUInt32  fwdMeanBurstSize1;   /* forward  mean burst size,    CLP = 0+1 */
1118    TknUInt8   bwdMeanBurstSizeId1; /* backward mean burst size id, CLP = 0+1 */
1119    TknUInt32  bwdMeanBurstSize1;   /* backward mean burst size,    CLP = 0+1 */
1120    TknUInt8   bstEffortReq;        /* best effort requested */
1121    TknUInt8   tfcMgmtOptId;        /* traffic management options identifier */
1122    TknUInt8   fwdTagReq;           /* tagging requested in forward  direction */
1123    TknUInt8   bwdTagReq;           /* tagging requested in backward direction */
1124    TknUInt8   bwdFrmDisc;          /* frame discard in backward direction */
1125    TknUInt8   fwdFrmDisc;          /* frame discard in forward  direction */
1126    TknUInt8   fwdAbrMinCellRateId; /* forward  ABR min. cell rate id, CLP = 0+1 */
1127    TknUInt32  fwdAbrMinCellRate;   /* forward  ABR min. cell rate,    CLP = 0+1 */
1128    TknUInt8   bwdAbrMinCellRateId; /* backward ABR min. cell rate id, CLP = 0+1 */
1129    TknUInt32  bwdAbrMinCellRate;   /* backward ABR min. cell rate,    CLP = 0+1 */
1130 } AmAtmTfcDesc;
1131
1132 typedef struct amCauseDgn       /* Cause and Diagnostics Tokens */
1133 {
1134    ElmtHdr eh;                  /* element header */
1135    TknUInt8   location;            /* location */
1136    TknUInt8   causeVal;            /* cause value */
1137    TknStrM  dgnVal;              /* Diagnostics value */
1138 } AmCauseDgn;
1139
1140 typedef struct amCgPtyNmb       /* Calling Party Number Tokens */
1141 {
1142    ElmtHdr eh;                  /* element header */
1143    TknUInt8   nmbPlanId;           /* address/numbering plan identification */
1144    TknUInt8   typeNmb;             /* type of number */
1145    TknUInt8   screenInd;           /* screening indicator */
1146    TknUInt8   presInd;             /* presentation indicator */
1147    TknStrS nmbDigits;           /* address/number information */
1148 } AmCgPtyNmb;
1149
1150 typedef struct amCgPtySad       /* Calling Party Sub Address Tokens */
1151 {
1152    ElmtHdr eh;                  /* element header */
1153    TknUInt8   oddEvenInd;          /* odd/even indicator */
1154    TknUInt8   typeSad;             /* type of sub address */
1155    TknStrS sadInfo;             /* address/number information */
1156 } AmCgPtySad;
1157
1158 typedef struct amNBearCap       /* Narrowband Bearer Capability Tokens */
1159 {
1160    ElmtHdr eh;                  /* element header */
1161    TknUInt8 infoTranCap;           /* information transfer capability */
1162    TknUInt8 codingStd;             /* coding standard */
1163    TknUInt8 infoTranRate0;         /* information transfer rate */
1164    TknUInt8 tranMode;              /* transfer mode */
1165    TknUInt8 establish;             /* establishment */
1166    TknUInt8 cfg;                   /* configuration */
1167    TknUInt8 chanStruct;            /* structure */
1168    TknUInt8 infoTranRate1;         /* information transfer rate */
1169    TknUInt8 symmetry;              /* symmetry */
1170    TknUInt8 usrInfoLyr1Prot;       /* usr information layer 1 protocol */
1171    TknUInt8 lyr1Ident;             /* layer 1 identity */
1172    TknUInt8 usrRate;               /* user rate */
1173    TknUInt8 negot;                 /* negotiation */
1174    TknUInt8 syncAsync;             /* synchronous/asynchronous */
1175 /*------------------------------------------------------------------------*/
1176 /* The following six tokens represent a uinon of octets 5b.1 and 5b.2 of  */
1177 /* the Narrow Band Bearer Capability.                                     */
1178 /*------------------------------------------------------------------------*/
1179    TknUInt8 FlcRx_BandNeg;         /* flow control on reception or 
1180                                    inband/outband negotiation */
1181    TknUInt8 FlcTx_Assgn;           /* flow control on transmission or 
1182                                    assignor/assignee*/
1183    TknUInt8 NicRx_LLINeg;          /* network independent clock on reception or 
1184                                    logical link identifier negotiation */
1185    TknUInt8 NicTx_Mode;            /* network independent clock on transmission or
1186                                    mode of operation */
1187    TknUInt8 Rate_MFrm;             /* intermediate rate (low bit) or Multi 
1188                                    frame support */
1189    TknUInt8 Rate_Hdr;              /* intermediate rate (high bit) or rate 
1190                                    adaptation Hdr/ no Headr */
1191    TknUInt8 parity;                /* parity information */
1192    TknUInt8 nmbDatBits;            /* number of data bits excluding parity bit */
1193    TknUInt8 nmbStopBits;           /* number of stop bits */
1194    TknUInt8 modemType;             /* modem type */
1195    TknUInt8 duplexMode;            /* duplex mode */
1196    TknUInt8 usrInfoLyr2Prot;       /* user information layer 2 protocol */
1197    TknUInt8 lyr2Ident;             /* layer 2 identity */
1198    TknUInt8 usrInfoLyr3Prot;       /* user information layer 3 protocol */
1199    TknUInt8 lyr3Ident0;            /* layer 3 identity */
1200 } AmNBearCap;
1201
1202 typedef struct amNLoLyrComp     /* Narrowband Low Layer Compatibility Tokens */
1203 {
1204    ElmtHdr eh;                  /* element header */
1205    TknUInt8 infoTranCap;           /* information transfer capability */
1206    TknUInt8 codingStd;             /* coding standard */
1207    TknUInt8 negInd;                /* negotiation indicator */
1208    TknUInt8 infoTranRate0;         /* information transfer rate */
1209    TknUInt8 tranMode;              /* transfer mode */
1210    TknUInt8 establish;             /* establishment */
1211    TknUInt8 cfg;                   /* configuration */
1212    TknUInt8 chanStruct;            /* structure */
1213    TknUInt8 infoTranRate1;         /* information transfer rate */
1214    TknUInt8 symmetry;              /* symmetry */
1215    TknUInt8 usrInfoLyr1Prot;       /* usr information layer 1 protocol */
1216    TknUInt8 lyr1Ident;             /* layer 1 identity */
1217    TknUInt8 usrRate;               /* user rate */
1218    TknUInt8 negot;                 /* negotiation */
1219    TknUInt8 syncAsync;             /* synchronous/asynchronous */
1220 /*------------------------------------------------------------------------*/
1221 /* The following six tokens represent a uinon of octets 5b.1 and 5b.2 of  */
1222 /* the Narrow Band Lower Layer Compatibility                              */
1223 /*------------------------------------------------------------------------*/
1224    TknUInt8 FlcRx_BandNeg;         /* flow control on reception or 
1225                                    inband/outband negotiation */
1226    TknUInt8 FlcTx_Assgn;           /* flow control on transmission or 
1227                                    assignor/assignee*/
1228    TknUInt8 NicRx_LLINeg;          /* network independent clock on reception or 
1229                                    logical link identifier negotiation */
1230    TknUInt8 NicTx_Mode;            /* network independent clock on transmission or
1231                                    mode of operation */
1232    TknUInt8 Rate_MFrm;             /* intermediate rate (low bit) or Multi 
1233                                    frame support */
1234    TknUInt8 Rate_Hdr;              /* intermediate rate (high bit) or rate 
1235                                    adaptation Hdr/ no Headr */
1236    TknUInt8 parity;                /* parity information */
1237    TknUInt8 nmbDatBits;            /* number of data bits excluding parity bit */
1238    TknUInt8 nmbStopBits;           /* number of stop bits */
1239    TknUInt8 modemType;             /* modem type */
1240    TknUInt8 duplexMode;            /* duplex mode */
1241    TknUInt8 usrInfoLyr2Prot;       /* user information layer 2 protocol */
1242    TknUInt8 lyr2Ident;             /* layer 2 identity */
1243    TknUInt8 optLyr2ProtInfo;       /* optional layer 2 protocol information */
1244    TknUInt8 usrInfoLyr3Prot;       /* user information layer 3 protocol */
1245    TknUInt8 lyr3Ident1;            /* layer 3 identity */
1246    TknUInt8 optLyr3ProtInfo;       /* optional layer 3 protocol information */
1247 } AmNLoLyrComp;
1248
1249 typedef struct amNHiLyrComp     /* Narrowband High Layer Compatibility Tokens */
1250 {
1251    ElmtHdr eh;                  /* element header */
1252    TknUInt8 presMethod;            /* presentation method */
1253    TknUInt8 interpretation;        /* interpretation */
1254    TknUInt8 codingStd;             /* coding standard */
1255    TknUInt8 highLyrCharId;         /* high layer characteristics identification */
1256    TknUInt8 extHighLyrCharId;      /* extended high layer characteristics id */
1257 } AmNHiLyrComp;
1258
1259 typedef struct amProgInd        /* Progress Indicator Tokens */
1260 {
1261    ElmtHdr eh;                  /* element header */
1262    TknUInt8 progLocation;          /* location */
1263    TknUInt8 codingStd;             /* coding standard */
1264    TknUInt8 progDesc;              /* progress description */
1265 } AmProgInd;
1266
1267 #if (DEF_SIG_PNNI | DEF_SIG_AINI)
1268 typedef struct amCrankback      /* Crankback Tokens */
1269 {
1270    ElmtHdr eh;                  /* element header */
1271    TknUInt8   cbLevel;             /* crankback level */
1272    TknUInt8   blkTransType;        /* blocked transit type */
1273 #ifdef SIG_PNNI
1274    TknStrS blkNodeId;           /* blocked node id */
1275    TknStrS blkLinkPreNodeId;    /* blocked link's preceeding node id */
1276    TknUInt32  blkLinkPortId;       /* blocked link port id */
1277    TknStrS blkLinkSuccNodeId;   /* blocked link's succeding node id */
1278 #endif /* SIG_PNNI */
1279    TknUInt8   cbCause;             /* crankback cause */
1280 #ifdef SIG_PNNI
1281    TknStrM cbDgn;               /* crankback cause diagnostics */
1282 #endif /* SIG_PNNI */
1283 } AmCrankback;
1284
1285 typedef struct amCdPtySoftPvc   /* Called Party Soft PVPC/PVCC Tokens */
1286 {
1287    ElmtHdr eh;                  /* element header */
1288    TknUInt8   selType;             /* VPI/VCI selection Type */
1289    TknUInt8   vpiId;               /* VPI id */
1290    TknUInt16  vpi;                 /* VPI */
1291    TknUInt8   vciId;               /* VCI id */
1292    TknUInt16  vci;                 /* VCI */
1293 #ifdef SPVC_FR
1294    TknUInt8   dlciId;              /* DLCI Identifer */
1295    TknUInt32  dlci;                /* Dlci Value */
1296 #endif /* SPVC_FR */
1297 } AmCdPtySoftPvc;
1298
1299 typedef struct amCgPtySoftPvc   /* Calling Party Soft PVPC/PVCC Tokens */
1300 {
1301    ElmtHdr eh;                  /* element header */
1302    TknUInt8   vpiId;               /* VPI id */
1303    TknUInt16  vpi;                 /* VPI */
1304    TknUInt8   vciId;               /* VCI id */
1305    TknUInt16  vci;                 /* VCI */
1306 #ifdef SPVC_FR
1307    TknUInt8   dlciId;              /* DLCI Identifer */
1308    TknUInt32  dlci;                /* Dlci Value */
1309 #endif /* SPVC_FR */
1310 } AmCgPtySoftPvc;
1311 #endif /* DEF_SIG_PNNI | DEF_SIG_AINI */
1312
1313 typedef struct amConnNmb        /* Connected Number Tokens */
1314 {
1315    ElmtHdr eh;                  /* element header */
1316    TknUInt8   nmbPlanId;           /* address/numbering plan identification */
1317    TknUInt8   typeNmb;             /* type of number */
1318    TknUInt8   screenInd;           /* screening indicator */
1319    TknUInt8   presInd;             /* presentation indicator */
1320    TknStrS nmbDigits;           /* address/number information */
1321 } AmConnNmb;
1322
1323 #if (DEF_SIG_PNNI | DEF_SIG_AINI | DEF_UNI40)
1324 typedef struct amConnSad        /* Calling Party Sub Address Tokens */
1325 {
1326    ElmtHdr eh;                  /* element header */
1327    TknUInt8   oddEvenInd;          /* odd/even indicator */
1328    TknUInt8   typeSad;             /* type of sub address */
1329    TknStrS sadInfo;             /* address/number information */
1330 } AmConnSad;
1331
1332 typedef struct amGenIdTrans     /* Generic Identifier Transport Tokens */
1333 {
1334    ElmtHdr eh;                  /* element header */
1335    TknStrM genId;               /* generic identifier */
1336 } AmGenIdTrans;
1337
1338 typedef AmAtmTfcDesc   AmAltAtmTfcDesc;  /* Alternative ATM Traffic Desc. */
1339
1340 typedef struct amMinAccAtmTfcDesc  /* Minimum acceptable ATM Traffic Desc. */
1341 {
1342    ElmtHdr eh;                     /* element header */
1343    TknUInt8   fwdPeakCellRateId0;     /* forward  peak  cell rate id, CLP = 0 */
1344    TknUInt32  fwdPeakCellRate0;       /* forward  peak  cell rate,    CLP = 0   */
1345    TknUInt8   bwdPeakCellRateId0;     /* backward peak  cell rate id, CLP = 0 */
1346    TknUInt32  bwdPeakCellRate0;       /* backward peak  cell rate,    CLP = 0   */
1347    TknUInt8   fwdPeakCellRateId1;     /* forward  peak  cell rate id, CLP = 0+1 */
1348    TknUInt32  fwdPeakCellRate1;       /* forward  peak  cell rate,    CLP = 0+1 */
1349    TknUInt8   bwdPeakCellRateId1;     /* backward peak  cell rate id, CLP = 0+1 */
1350    TknUInt32  bwdPeakCellRate1;       /* backward peak  cell rate,    CLP = 0+1 */
1351 } AmMinAccAtmTfcDesc;
1352
1353 typedef struct amExtQosParam       /* Extended QOS parameter */
1354 {
1355    ElmtHdr eh;                     /* element header */
1356    TknUInt8   origin;                 /* origin of this IE */
1357    TknUInt8   accFwdPpCDVId;          /* acceptable forward  peak-to-peak cell 
1358                                     * delay variation identifier */
1359    TknUInt32  accFwdPpCDV;            /* acceptable forward  peak-to-peak cell
1360                                     * delay variation */
1361    TknUInt8   accBwdPpCDVId;          /* acceptable backward peak-to-peak cell
1362                                     * delay variation identifier */
1363    TknUInt32  accBwdPpCDV;            /* acceptable backward peak-to-peak cell
1364                                     * delay variation */
1365    TknUInt8   cumFwdPpCDVId;          /* cumulative forward  peak-to-peak cell
1366                                     * delay variation identifier */
1367    TknUInt32  cumFwdPpCDV;            /* cumulative forward  peak-to-peak cell
1368                                     * delay variation */
1369    TknUInt8   cumBwdPpCDVId;          /* cumulative backward peak-to-peak cell
1370                                     * delay variation identifier */
1371    TknUInt32  cumBwdPpCDV;            /* cumulative backward peak-to-peak cell
1372                                     * delay variation */
1373    TknUInt8   accFwdCLRId;            /* acceptable forward  cell loss ratio
1374                                     * identifier */
1375    TknUInt8   accFwdCLR;              /* acceptable forward  cell loss ratio */
1376    TknUInt8   accBwdCLRId;            /* acceptable backward cell loss ratio 
1377                                     * identifier */
1378    TknUInt8   accBwdCLR;              /* acceptable backward cell loss ratio */
1379 } AmExtQosParam;
1380
1381 typedef struct amAbrAddParam       /* ABR additional parameters */
1382 {
1383    ElmtHdr eh;                     /* element header */
1384    TknUInt8   fwdAddParamRecId;       /* forward  additional parameters record identifier */
1385    TknUInt32  fwdAddParamRec;         /* forward  additional parameters record */
1386    TknUInt8   bwdAddParamRecId;       /* backward additional parameters record identifier */
1387    TknUInt32  bwdAddParamRec;         /* backward additional parameters record */
1388 } AmAbrAddParam;
1389
1390 typedef struct amAbrSetupParam     /* ABR Setup parameters */
1391 {
1392    ElmtHdr eh;                     /* element header */
1393    TknUInt8   fwdAbrICRId;            /* forward  ABR initial cell rate identifier */
1394    TknUInt32  fwdAbrICR;              /* forward  ABR initial cell rate */
1395    TknUInt8   bwdAbrICRId;            /* backward ABR initial cell rate identifier */
1396    TknUInt32  bwdAbrICR;              /* backward ABR initial cell rate */
1397    TknUInt8   fwdAbrTBEId;            /* forward  ABR transient buffer exposure identifier */
1398    TknUInt32  fwdAbrTBE;              /* forward  ABR transient buffer exposure */
1399    TknUInt8   bwdAbrTBEId;            /* backward ABR transient buffer exposure identifier */
1400    TknUInt32  bwdAbrTBE;              /* backward ABR transient buffer exposure */
1401    TknUInt8   cumRmFRTTId;            /* cumulative RM fixed round trip time identifier */
1402    TknUInt32  cumRmFRTT;              /* cumulative RM fixed round trip time */
1403    TknUInt8   fwdRIFId;               /* forward  rate increment factor identifier */
1404    TknUInt8   fwdRIF;                 /* forward  rate increment factor */
1405    TknUInt8   bwdRIFId;               /* backward rate increment factor identifier */
1406    TknUInt8   bwdRIF;                 /* backward rate increment factor */
1407    TknUInt8   fwdRDFId;               /* forward  rate decrement factor identifier */
1408    TknUInt8   fwdRDF;                 /* forward  rate decrement factor */
1409    TknUInt8   bwdRDFId;               /* backward rate decrement factor identifier */
1410    TknUInt8   bwdRDF;                 /* backward rate decrement factor */
1411 } AmAbrSetupParam;
1412 #endif /* DEF_SIG_PNNI | DEF_SIG_AINI | DEF_UNI40 */
1413
1414 #if (DEF_Q2931 | DEF_SIG_PNNI | DEF_SIG_AINI | DEF_UNI40)
1415 typedef struct amNotInd         /* Notification Indicator Tokens */
1416 {
1417    ElmtHdr eh;                  /* element header */
1418    TknStrE notDesc;             /* notification description */
1419 } AmNotInd;
1420 #endif /* DEF_Q2931 | DEF_SIG_PNNI | DEF_SIG_AINI | DEF_UNI40 */
1421
1422 \f
1423 /* AAL structure */
1424
1425 typedef struct aalConParam        /* connection parameters for AAL */
1426 {
1427    AmAalParam     aalParam;       /* AAL Parameters */
1428    AmAtmTfcDesc   atmTfcDesc;     /* ATM Traffic Descriptor */
1429    AmBBearCap     bBearCap;       /* Broadband Bearer Capability */
1430    AmQosParam     qosParam;       /* Qos parameters */
1431    AmEtoeDly      etoeDly;        /* End to End Transit Delay */
1432    AmOamTfcDesc   oamTfcDesc;     /* OAM Traffic Descriptor */
1433 } AalConParam;
1434
1435 typedef struct amCdPtyNmb       /* Called Party Number Tokens */
1436 {
1437    ElmtHdr eh;                  /* element header */
1438    TknUInt8   nmbPlanId;           /* address/numbering plan identification */
1439    TknUInt8   typeNmb;             /* type of number */
1440    TknStrS  nmbDigits;           /* address/number information */
1441 } AmCdPtyNmb;
1442
1443 #endif /* CMFILE_REORG_1 */
1444
1445  
1446 \f
1447 /* management structures */
1448
1449 typedef struct smCfg            /* stack manager */
1450 {
1451    Ent ent;                     /* entity */
1452    Inst inst;                   /* instance */
1453    Region region;               /* region */
1454    Pool pool;                   /* pool */
1455    Priority prior;              /* priority */
1456    Route route;                 /* route */
1457    Selector selector;           /* selector */
1458 } SmCfg;
1459
1460 typedef struct mem                /* memory */
1461 {
1462    Region region;                 /* region */
1463    Pool pool;                     /* pool */
1464    uint16_t spare;                     /* spare for alignment */
1465 } Mem;  
1466    
1467 typedef Mem MemoryId;             /* memory id */
1468
1469
1470 typedef struct resp
1471 {
1472    Selector selector;           /* selector */
1473    Priority prior;              /* priority */
1474    Route route;                 /* route */
1475    MemoryId mem;                /* memory */
1476 }Resp;
1477
1478 typedef struct tds_header       /* header */
1479 {
1480    uint16_t msgLen;                  /* message length   - optional */
1481    uint8_t msgType;                  /* message type     - mandatory */
1482    uint8_t version;                  /* version          - optional */
1483    uint16_t seqNmb;                  /* sequence number  - optional */
1484    EntityId entId;              /* entity id        - mandatory */
1485    ElmntId elmId;               /* element id       - mandatory */
1486 #ifdef LMINT3
1487    TranId transId;              /* transaction Id - mandatory */
1488    Resp response;               /* response parameters - mandatory */
1489 #endif /* LMINT3 */
1490 } Header;
1491
1492 typedef struct tmrCfg           /* timer configuration structure */
1493 {
1494    Bool enb;                    /* enable */
1495    uint16_t val;                     /* value */
1496 } TmrCfg;
1497
1498 typedef struct asyncCfg         /* asynchronous configuration */
1499 {
1500    StopBits stopBits;           /* stop bits */
1501    CharLength charLength;       /* character length */
1502    Parity rxParity;             /* receive parity */
1503    Parity txParity;             /* transmit parity */
1504 } AsyncCfg;
1505
1506
1507 /* dateTime structure */
1508   
1509 typedef struct dateTime           /* date and time */
1510 {
1511    uint8_t month;                      /* month */
1512    uint8_t day;                        /* day */
1513    uint8_t year;                       /* year */
1514    uint8_t hour;                       /* hour - 24 hour clock */
1515    uint8_t min;                        /* minute */
1516    uint8_t sec;                        /* second */
1517    uint8_t tenths;                     /* tenths of second */
1518    /*-- gen_x_001.main_90 - Added variable for microseconds in DateTime--*/
1519 #ifdef SS_DATETIME_USEC
1520    uint32_t usec;                      /* micro seconds */
1521 #endif /*-- SS_DATETIME_USEC --*/
1522 } DateTime;
1523 /* gen_x_001.main_94: Additions */
1524 /* gen_x_001.main_95: Modifications */
1525 typedef uint64_t EpcTime;
1526
1527 /* common status */
1528 typedef struct cmStatus
1529 {
1530    uint16_t status;       /* status of request */
1531    uint16_t reason;       /* failure reason */
1532 }CmStatus;    
1533
1534 /* common alarm */
1535 typedef struct cmAlarm
1536 {
1537    DateTime dt;      /* data and time */
1538    uint16_t category;     /* alarm category*/
1539    uint16_t event;        /* alarm event */
1540    uint16_t cause;        /* alarm cause */
1541 }CmAlarm;    
1542   
1543 /* duration structure */
1544   
1545 typedef struct duration           /* duration */
1546 {
1547    uint8_t days;                       /* days */
1548    uint8_t hours;                      /* hours */
1549    uint8_t mins;                       /* minutes */
1550    uint8_t secs;                       /* seconds */
1551    uint8_t tenths;                     /* tenths of seconds */
1552 } Duration;
1553
1554
1555
1556 \f
1557
1558 #ifdef CMFILE_REORG_1
1559
1560 #ifdef SS
1561 typedef struct ssmsgb Buffer;
1562
1563 #ifdef FLAT_BUFFER_OPT
1564 typedef struct _flatBuffer
1565 {
1566    uint8_t* startAddr;
1567    uint8_t* ptr;
1568    uint32_t len;
1569 }FlatBuffer;
1570 #endif
1571
1572 #else /* SS */
1573
1574 #ifdef WINNT_IATM                 /* Windows NT Integrated ATM */
1575 #ifndef CFG_APP                   /* Don't include ndis.h for config app. */ 
1576 #include "ndis.h"                 /* to support NDIS calls (listed above) */
1577 #endif /* CFG_APP */
1578
1579 typedef struct _NDIS_PACKET Buffer; /* forward definition - buffer */
1580 #else
1581 typedef struct ss_buffer Buffer;  /* forward definition - buffer */
1582
1583 #endif /* WINNT_IATM */
1584 #endif /* SS */
1585
1586 typedef struct tknBuf
1587 {
1588    uint8_t      pres;                  /* Present Flag */
1589    uint8_t      spare1;                /* for alignment */
1590    uint16_t     spare2;                /* for 32 bit alignment */
1591 #ifdef ALIGN_64BIT
1592    uint32_t     spare3;                /* for 64 bit alignment */
1593 #endif
1594    Buffer  *val;                  /* Buffer type (use allocated memory) */
1595 } TknBuf;
1596
1597 /* defining the CmIpAddr and CmIpAddr6 */
1598 /* socket typedefs and structs */
1599 typedef uint32_t CmIpAddr;        /* 4 byte IP address */
1600 #ifdef IPV6_SUPPORTED
1601 typedef uint8_t  CmIpAddr6[16];   /* 16 byte IPV6 address */
1602 #endif /* IPV6_SUPPORTED */
1603
1604 /* common packing functions */
1605
1606 /* system services structures */
1607 S16 cmPkDateTime ARGS((DateTime *dateTime, Buffer *mBuf));
1608 S16 cmPkDuration ARGS((Duration *duration, Buffer *mBuf));
1609 S16 oduPackPointer ARGS((PTR ptr, Buffer *mBuf));
1610 S16 cmPkEntityId ARGS((EntityId *entityId, Buffer *mBuf));
1611 S16 cmPkElmntId  ARGS((ElmntId  *elmntId,  Buffer *mBuf));
1612 S16 cmPkMemoryId ARGS((MemoryId *memoryId, Buffer *mBuf));
1613
1614 /* general structures */
1615 S16 cmPkSystemId ARGS((SystemId *systemId, Buffer *mBuf));
1616 S16 cmPkAddrs    ARGS((Addrs    *addrs,    Buffer *mBuf));
1617 S16 cmPkProtAddr ARGS((ProtAddr *protAddr, Buffer *mBuf));
1618 S16 cmPkProtAddrTbl ARGS((ProtAddrTbl *protAddr, Buffer *mBuf));
1619 S16 cmPkShrtAddrs ARGS((ShrtAddrs    *addrs,    Buffer *mBuf));
1620 S16 cmPkAddrMask ARGS((uint8_t    *mask,    Buffer *mBuf));
1621 S16 cmPkBndCfg   ARGS((BndCfg   *bndCfg,   Buffer *mBuf));
1622 S16 cmPkPst      ARGS((Pst      *pst,      Buffer *mBuf));
1623 S16 cmPkElmtHdr  ARGS((ElmtHdr  *m,        Buffer *mBuf));
1624 S16 cmPkTknUInt8    ARGS((TknUInt8    *tknUInt8,    Buffer *mBuf));
1625 S16 cmPkTknS8    ARGS((TknS8    *tknS8,    Buffer *mBuf));
1626 S16 cmPkTknUInt16   ARGS((TknUInt16   *tknU16,   Buffer *mBuf));
1627 S16 cmPkTknUInt32   ARGS((TknUInt32   *tknU32,   Buffer *mBuf));
1628 S16 cmPkTknStr   ARGS((TknStr   *tknStr,   Buffer *mBuf));                              
1629 S16 cmPkTknStrM  ARGS((TknStrM  *tknStr,   Buffer *mBuf));
1630 S16 cmPkTknStrS  ARGS((TknStrS  *tknStr,   Buffer *mBuf));
1631 S16 cmPkTknStrE  ARGS((TknStrE  *tknStr,   Buffer *mBuf));
1632
1633 S16 cmPkTknStr4   ARGS((TknStr4   *tknStr,   Buffer *mBuf));
1634 S16 cmPkTknStr12  ARGS((TknStr12  *tknStr,   Buffer *mBuf));
1635 S16 cmPkTknStr32  ARGS((TknStr32  *tknStr,   Buffer *mBuf));
1636 S16 cmPkTknStr64  ARGS((TknStr64  *tknStr,   Buffer *mBuf));
1637 S16 cmPkTknStr132 ARGS((TknStr132 *tknStr,   Buffer *mBuf));
1638 S16 cmPkTknStr256 ARGS((TknStr256 *tknStr,   Buffer *mBuf));
1639
1640  S16  cmPkTknS32    ARGS((TknS32 *tknS32, Buffer *mBuf));
1641  S16  cmPkTknOid    ARGS((TknOid *tknOid, Buffer *mBuf));
1642  S16  cmPkTknBuf    ARGS((TknBuf *tknBuf, Buffer *mBuf));
1643
1644 #ifdef TDS_ROLL_UPGRADE_SUPPORT
1645  S16  cmPkIntf      ARGS((CmIntf *intf, Buffer *mBuf));
1646 #endif
1647
1648 /* layer management structures */
1649 S16 cmPkHeader   ARGS((Header   *header,   Buffer *mBuf));
1650 S16 cmPkSmCfg    ARGS((SmCfg    *smCfg,    Buffer *mBuf));
1651 S16 cmPkTmrCfg   ARGS((TmrCfg   *tmrCfg,   Buffer *mBuf));
1652 S16 cmPkCmStatus ARGS((CmStatus *status,   Buffer *mBuf));
1653 S16 cmPkCmAlarm  ARGS((CmAlarm  *alrm,     Buffer *mBuf));
1654
1655 \f
1656 /* common unpacking functions */
1657
1658 /* system services structures */
1659 S16 cmUnpkDateTime ARGS((DateTime *dateTime, Buffer *mBuf));
1660 S16 cmUnpkDuration ARGS((Duration *duration, Buffer *mBuf));
1661 S16 oduUnpackPointer ARGS((PTR *ptr, Buffer *mBuf));
1662 S16 cmUnpkEntityId ARGS((EntityId *entityId, Buffer *mBuf));
1663 S16 cmUnpkElmntId  ARGS((ElmntId  *elmntId,  Buffer *mBuf));
1664 S16 cmUnpkMemoryId ARGS((MemoryId *memoryId, Buffer *mBuf));
1665
1666 /* general structures */
1667 S16 cmUnpkSystemId ARGS((SystemId *systemId, Buffer *mBuf));
1668 S16 cmUnpkAddrs    ARGS((Addrs    *addrs,    Buffer *mBuf));
1669 S16 cmUnpkProtAddr ARGS((ProtAddr *protAddr, Buffer *mBuf));
1670 S16 cmUnpkProtAddrTbl ARGS((ProtAddrTbl *protAddr, Buffer *mBuf));
1671 S16 cmUnpkShrtAddrs ARGS((ShrtAddrs    *addrs,    Buffer *mBuf));
1672 S16 cmUnpkAddrMask ARGS((uint8_t    *mask,    Buffer *mBuf));
1673 S16 cmUnpkBndCfg   ARGS((BndCfg   *bndCfg,   Buffer *mBuf));
1674 S16 cmUnpkPst      ARGS((Pst      *pst,      Buffer *mBuf));
1675 S16 cmUnpkElmtHdr  ARGS((ElmtHdr  *m,        Buffer *mBuf));
1676 S16 cmUnpkTknUInt8    ARGS((TknUInt8    *tknUInt8,    Buffer *mBuf));
1677 S16 cmUnpkTknS8    ARGS((TknS8    *tknS8,    Buffer *mBuf));
1678 S16 cmUnpkTknUInt16   ARGS((TknUInt16   *tknU16,   Buffer *mBuf));
1679 S16 cmUnpkTknUInt32   ARGS((TknUInt32   *tknU32,   Buffer *mBuf));
1680 S16 cmUnpkTknStr   ARGS((TknStr   *tknStr,   Buffer *mBuf));                              
1681 S16 cmUnpkTknStrM  ARGS((TknStrM  *tknStr,   Buffer *mBuf));
1682 S16 cmUnpkTknStrS  ARGS((TknStrS  *tknStr,   Buffer *mBuf));
1683 S16 cmUnpkTknStrE  ARGS((TknStrE  *tknStr,   Buffer *mBuf));
1684
1685 S16 cmUnpkTknStr4   ARGS((TknStr4   *tknStr,   Buffer *mBuf));
1686 S16 cmUnpkTknStr12  ARGS((TknStr12  *tknStr,   Buffer *mBuf));
1687 S16 cmUnpkTknStr32  ARGS((TknStr32  *tknStr,   Buffer *mBuf));
1688 S16 cmUnpkTknStr64  ARGS((TknStr64  *tknStr,   Buffer *mBuf));
1689 S16 cmUnpkTknStr132 ARGS((TknStr132 *tknStr,   Buffer *mBuf));
1690 S16 cmUnpkTknStr256 ARGS((TknStr256 *tknStr,   Buffer *mBuf));
1691
1692  S16  cmUnpkTknS32  ARGS((TknS32 *tknS32, Buffer *mBuf));
1693  S16  cmUnpkTknOid  ARGS((TknOid *tknOid, Buffer *mBuf));
1694  S16  cmUnpkTknBuf  ARGS((TknBuf *tknBuf, Buffer **mBuf));
1695
1696 #ifdef TDS_ROLL_UPGRADE_SUPPORT
1697  S16  cmUnpkIntf    ARGS((CmIntf *intf, Buffer *mBuf));
1698 #endif
1699
1700 /* layer management structures */
1701 S16 cmUnpkHeader   ARGS((Header   *header,   Buffer *mBuf));
1702 S16 cmUnpkSmCfg    ARGS((SmCfg    *smCfg,    Buffer *mBuf));
1703 S16 cmUnpkTmrCfg   ARGS((TmrCfg   *tmrCfg,   Buffer *mBuf));
1704 S16 cmUnpkCmStatus ARGS((CmStatus *status,   Buffer *mBuf));
1705 S16 cmUnpkCmAlarm  ARGS((CmAlarm  *alrm,     Buffer *mBuf));
1706
1707 #endif /* CMFILE_REORG_1 */
1708 #if defined(XEON_SPECIFIC_CHANGES) || defined(INTEL_WLS) || defined(SS_USE_WLS_MEM)
1709 void mtGetWlsHdl(void **hdlr);
1710 #endif
1711
1712 #ifdef __cplusplus
1713 }
1714 #endif /* __cplusplus */
1715 #endif /* __GENX__ */
1716
1717 \f  
1718 /********************************************************************30**
1719   
1720          End of file
1721 **********************************************************************/