[ Jira id - ODUHIGH-593 ] Pack and unpack function nomenclature correction
[o-du/l2.git] / src / cm / ssi.h
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:     system services interface
22   
23      Type:     C include file
24   
25      Desc:     Defines required by the system services service user.
26   
27      File:     ssi.h
28   
29 *********************************************************************21*/
30   
31 #ifndef __SSIH__
32 #define __SSIH__
33
34 \f
35 /* defines */
36   
37 /* order for SCatQueue */
38   
39 #define Q1Q2        0                 /* Q1 in front of Q2 into Q1 */
40 #define Q2Q1        1                 /* Q2 in front of Q1 into Q1 */
41   
42 /* order for SCatMsg */
43   
44 #define M1M2        0                 /* M1 in front of M2 into M1 */
45 #define M2M1        1                 /* M2 in front of M1 into M1 */
46   
47 /* period for SRegTmr */
48   
49 #ifdef WINNT_IATM
50 #define PONE        1000              /* number of ticks to a second */
51 #else
52 #define PTENTH      1                 /* tenth of second */
53 #define PONE       10                 /* one second */
54 #define PTEN      100                 /* ten seconds */
55 #define PHUND    1000                 /* one hundred seconds */
56 #endif /* WINNT_IATM */  
57
58 /* reason for SActvInit and logRstHlt function */
59   
60 #define NRM_TERM    0                 /* normal termination */
61 #define PWR_UP      1                 /* power up */
62 #define SWITCH      2                 /* switch depressed */
63 #define SW_ERROR    3                 /* software error */
64 #define DMT_FIRED   4                 /* deadman timer fired */
65 #define EXTERNAL    5                 /* external, another board */
66 #define SHUTDOWN    6                 /* shutdown interrupt */
67   
68 /* To indicate how the data is to be attached */
69 #define PREBUF         0    /* pre buffer */
70 #define PSTBUF         1    /* post buffer */
71
72 /* return codes for all functions */
73   
74 #define ROK         0                 /* ok */
75 #define RFAILED     1                 /* failed, general */
76 #define ROKDNA      2                 /* ok, data not available */
77 #define RNA         3                 /* failed, not available */
78 #define ROUTRES     4                 /* failed, out of resources */
79 #define ROKIGNORE   5                 /* ok, ignore */
80 #define RIGNORE     6                 /* failed, ignore */
81 #define ROKCRSIG    7                 /* ok, connect request (signal) */
82 #define ROKCRPRM    8                 /* ok, connect request (primitive) */
83 #define ROKDRSIG    9                 /* ok, disconnect request (signal) */
84 #define ROKDRPRM    10                /* ok, disconnect request (primitive) */
85 #define ROKDCPRM    11                /* ok, disconnect confirm (primitive) */
86 #define ROKDUP      12                /* ok, duplicate entry found */
87 #define RSKIP       13                /* ok, skip the token */
88 #define ROKDRPRMSP  14                /* ok, disconnect request (primitive)
89                                        * with service provider conn. id.
90                                        */
91 #define ROKDRPRMSU  15                /* ok, disconnect request (primitive)
92                                        * with service user conn. id.
93                                        */
94 #define ROKPENDING  16                /* OK - operation still pending */
95 #define RLONG       17                /* long */
96
97 #define RINPROGRESS 18                /* connection in progress: cm_inet */
98 #define RWOULDBLOCK 19                /* would block:   cm_inet */
99 #define RCLOSED     20                /* socket closed: cm_inet */
100 #define RTIMEOUT    21                /* timeout:       cm_inet */
101 #define RISCONN     22                /* connected :    cm_inet */
102 /* new return code added for rolling upgrade */
103 #define RINVIFVER   23                /* invalid interface version */
104 /* ssi_h_001.main_121 - addition of new return types for double free and trampling detection */
105 #if (defined( SSI_DEBUG_LEVEL1) || defined(BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1))
106 #define RDBLFREE      24              /* double deallocation : cm_mem */
107 #define RTRAMPLINGOK  25              /* memory trample - not serious : cm_mem */
108 #define RTRAMPLINGNOK 26              /* memory trample -serious : cm_mem */
109 #endif /* SSI_DEBUG_LEVEL1 */
110
111 /* print buffer size */
112
113 #define PRNTSZE     255               /* print buffer size */
114
115 /* end of file */
116
117 #ifndef EOF
118 #define EOF         (-1)              /* end of file */
119 #endif
120
121 /* static buffer size calculations */
122
123 #ifdef MOSVER                         /* mos version */
124 #define MINBUFSIZE      (PTRALIGN(sizeof(Chain))+PTRALIGN(sizeof(MemoryId))+PTRALIGN(sizeof(S8))+PTRALIGN(sizeof(Size)))
125 #define SBUFSIZE(size)  (size < (Size) MINBUFSIZE ? (Size) MINBUFSIZE : PTRALIGN(size))
126 #else
127 #ifdef MSVER2                         /* mos version 2 */
128 #define MINBUFSIZE      (PTRALIGN(sizeof(SBuf)))
129 #define SBUFSIZE(size)  (size < (Size) MINBUFSIZE ? (Size) MINBUFSIZE : (Size)PTRALIGN(size))
130 #define SLockId           uint8_t     /* lock type */
131 #define SInitLock(l, t)   ((*l) = ROK)
132 #define SLock(l)          ((*l) = ROK)
133 #define SUnlock(l)        ((*l) = ROK)
134 #define SDestroyLock(l)   ((*l) = ROK)
135 #else                                 /* default version */
136 #ifdef PS 
137 #define UNIT_HEAP_SIZE 32
138 #define SBUFSIZE(size)  (((size/UNIT_HEAP_SIZE) + 1) * UNIT_HEAP_SIZE)
139 #else
140 #ifdef MT                         /* multi-threaded */
141 #define MINBUFSIZE      sizeof(SBuf)
142 #define SBUFSIZE(size)  (size < (Size) MINBUFSIZE ? (Size) MINBUFSIZE : (Size)size)
143 #else
144 #define SBUFSIZE(size)  (size)
145 #endif /* MT */
146 #endif /* PS */
147 #endif /* MSVER2 */
148 #endif /* MOSVER */
149
150 /* maximum value for system timer used for wrap around counter */
151
152 /* note:  this value must agree with the current typedef for Ticks
153    or timer wraparound and statistics based on duration may not work */
154
155 #define MAXTICKS   0xffffffff        /* maximum value for Tick */
156
157 \f
158 /* error codes */
159
160 /* base plus offset is passed as first parameter to sError function */
161 /* ERRZERO is passed as second parameter to sError function if no */
162 /* additional information is available */  
163   
164 #define ERRZERO        0            /* no additional information */
165
166 \f
167 /* base error codes */
168
169 #define  ERRSS          0           /* system services */
170 #define  ERRLM        500           /* layer management */
171 #define  ERRAP       1000           /* async pad */
172 #define  ERRXN       2000           /* x.25/x.75 */
173 #define  ERRFM       3000           /* SS7 - Fault Manager*/
174 #define  ERRVX       3200           /* vrtxsa */
175 #define  ERRPS       3300           /* psos */
176 #define  ERRVW       3400           /* vxworks */
177 #define  ERRHE       3600           /* hello world */
178 #define  ERRWN       3600           /* MTP 3 Wrapper */
179 #define  ERRQI       3700           /* QUICC driver */
180 #define  ERRWI       3800           /* ISUP Wrapper */
181 #define  ERRWU       3900           /* TUP Wrapper */
182 #define  ERRLB       4000           /* lapb */
183 #define  ERRBD       4000           /* lapb, lapd, lapb/lapd */
184 #define  ERRSC       5000           /* scc */
185 #define  ERRMS       5500           /* mos */
186 #define  ERRSM       6500           /* stack manager - see below */
187 #define  ERRLL       8500           /* logical link control (obsolete) */
188 #define  ERRBI       8500           /* b-isup */
189 #define  ERRTC       8500           /* TCP/IP (obsolete) */
190 #define  ERRIX       9000           /* x.31 */
191 #define  ERRMF       9500           /* message functions */
192 #define  ERRAR       9600           /* arp (obsolete) */
193 #define  ERRMA       9600           /* ss7 - map */
194 #define  ERROD      10600           /* ODI mac */
195 #define  ERRSE      10700           /* sec */
196 #define  ERRSI      11000           /* ss7 - isup */
197 #define  ERRSN      12000           /* ss7 - mtp, level 3 */
198 #define  ERRSD      13000           /* ss7 - mtp, level 2 */
199 #define  ERRSA      13500           /* q.2140 */
200 #define  ERRIN      14000           /* q.930/q.931 */
201 #define  ERRIS      15000           /* siemens isac-s */
202 #define  ERRLC      15500           /* llc */
203 #define  ERRTP      16000           /* ss7 - tup */
204 #define  ERRCM      17000           /* common files */
205 #define  ERRST      18000           /* ss7 - tcap */
206 #define  ERRFN      18500           /* FN - Q.933 Frame Relay Network Layer */
207 #define  ERRSP      19000           /* ss7 - sccp */
208 #define  ERRME      20000           /* message exchange*/
209 #define  ERREV      20100           /* V5.1 Envelope Function */
210 #define  ERRNV      20500           /* V5.1 PSTN */
211 #define  ERRLV      20300           /* LAPV5-DL */
212 #define  ERRAC      21000           /* atm - cpcs */
213 #define  ERRAS      22000           /* atm - q.saal */
214 #define  ERRAM      23000           /* atm - q.93b */
215 #define  ERRM6      24000           /* dummy mac (MACINT6) */
216 #define  ERRPN      24500           /* PNNI */
217 #define  ERRUM      25000           /* atm - ume */
218 #define  ERRMU      26000           /* atm - management user */
219 #define  ERRFR      26100           /* Q.922 - frame data link */
220 #define  ERRMPOFR   26500           /* MPOFR - library error defines */
221 #define  ERRLR      27000           /* loader */
222 #define  ERRLU      28000           /* loader service user */
223 #define  ERRRY      29000           /* relay */
224 #define  ERROS      30000           /* OS library */
225 #define  ERREC      31000           /* ATM - LANE Client (LEC) */
226 #define  ERRES      31500           /* ATM - LANE Services (LEServices) */
227 #define  ERRTU      32000           /* TCAP - User */
228 #define  ERRFA      32200           /* ATM - Fujitsu ALC driver */
229 #define  ERRSR      32500           /* MTP Level 3 Simple Router */
230 #define  ERRPL      32700           /* ATM - PMC Sierra LASAR driver */
231 #define  ERRAF      33000           /* FR-ATM Interworking Layer */
232 #define  ERRCV      34000           /* Control Protocol */
233 #define  ERRMV      34200           /* V5.X System Manager layer */
234 #define  ERRCMDRV   34400           /* Common Driver */
235 #define  ERRPQ      34500           /* Power Quicc */
236 #define  ERRGL      34600           /* GPRS Logical Link Control */
237 #define  ERRVO      34700           /* Power Quicc II MPC8260 */
238 #define  ERRZP      34800           /* PSF - SCCP */
239 #define  ERRP1      34900           /* PLOA PXY dummy */
240 #define  ERRIB      35000           /* 3GPP NBAP  */
241 #define  ERRRN      35100           /* RNSAP  */
242 #define  ERRVU      35300           /* End Driver  */
243 #define  ERRFP      35500           /* Fraiming Protocol  */
244
245 /* Nuera PS Entries for M1UA */
246 #define  ERRTX      35700           /* Threadx SSI */
247 #define  ERRMZ      35900           /* M1UA */
248 #define  ERRNEXT    ERRMZ + 200     /* Modify it to indicate how much 
249                                        you'll be using */
250 #define ERRD2        4000           /*DPNSS/DASS2*/
251
252
253 /* note: release 1.6 and earlier of q.930/q.931 used base code 1500 */
254
255 /* 
256  * management interface error code bases
257  *
258  * ERRSM = 6500
259  *
260  * Each layer that uses this file need to reserve a range of errnos.
261  * These errnos are used in stack management packing/unpaking routines, 
262  * and also in primitives terminated by the stack manager.  
263  *
264  * The next base of error codes is ERRLL = 8500, so we have a range
265  * of 2000 error numbers. By allocating 50 error codes to each layer,
266  * we are restricting the stack manager to have no more than 39 layer
267  * interfaces.
268  *
269  */
270
271 #define  ERRSMST   (ERRSM + 50)    /* TCAP:   6550 - 6599 */
272 #define  ERRSMSP   (ERRSM + 100)   /* SCCP:   6600 - 6649 */
273 #define  ERRSMSN   (ERRSM + 150)   /* MTP3:   6650 - 6699 */
274 #define  ERRSMSD   (ERRSM + 200)   /* MTP2:   6700 - 6724 */
275 #define  ERRSMSA   (ERRSM + 225)   /* Q.2140: 6725 - 6749 */
276 #define  ERRSMAM   (ERRSM + 250)   /* Q.93B:  6750 - 6799 */
277 #define  ERRSMAS   (ERRSM + 300)   /* Q.SAAL: 6800 - 6849 */
278 #define  ERRSMUM   (ERRSM + 350)   /* UME:    6850 - 6899 */
279 #define  ERRSMM6   (ERRSM + 400)   /* M6:     6900 - 6949 */
280 #define  ERRSMMS   (ERRSM + 450)   /* MOS:    6950 - 6999 */
281 #define  ERRSMEC   (ERRSM + 500)   /* LEC:    7000 - 7049 */
282 #define  ERRSMSI   (ERRSM + 550)   /* ISUP:   7050 - 7074 */
283 #define  ERRSMBI   (ERRSM + 575)   /* BI:     7075 - 7099 */
284 #define  ERRSMTU   (ERRSM + 600)   /* TC-User:7100 - 7149 */
285 #define  ERRSMFA   (ERRSM + 650)   /* Fuj.ALC:7150 - 7199 */
286 #define  ERRSMSE   (ERRSM + 700)   /* SE:     7200 - 7249 */
287 #define  ERRSMSR   (ERRSM + 750)   /* SR:     7250 - 7299 */
288 #define  ERRSMRY   (ERRSM + 800)   /* RY:     7300 - 7349 */
289 #define  ERRSMTP   (ERRSM + 850)   /* TP:     7350 - 7399 */
290 #define  ERRSMES   (ERRSM + 900)   /* LEServices:7400 - 7449 */
291 #define  ERRSMIN   (ERRSM + 950)   /* IN:     7450 - 7499 */
292 #define  ERRSMLB   (ERRSM + 1000)  /* LB:     7500 - 7549 */
293 #define  ERRSMLD   (ERRSM + 1050)  /* LD:     7550 - 7599 */
294 #define  ERRSMBD   (ERRSM + 1100)  /* BD:     7600 - 7649 */
295 #define  ERRSMBR   (ERRSM + 1150)  /* BR:     7650 - 7699 */
296 #define  ERRSMER   (ERRSM + 1200)  /* ER:     7700 - 7749 */
297 #define  ERRSMPN   (ERRSM + 1250)  /* PN:     7750 - 7799 */
298 #define  ERRSMME   (ERRSM + 1300)  /* ME:     7800 - 7849 */
299 #define  ERRSMXN   (ERRSM + 1350)  /* x25/x75:7850 - 7899 */
300 #define  ERRSMQI   (ERRSM + 1400)  /* QI:     7900 - 7949 */
301 #define  ERRSMWN   (ERRSM + 1450)  /* WN:     7950 - 7999 */
302 #define  ERRSMMA   (ERRSM + 1500)  /* MA:     8000 - 8049 */
303 #define  ERRSMNV   (ERRSM + 1550)  /* NV:     8050 - 8074 */
304 #define  ERRSMLV   (ERRSM + 1575)  /* LV:     8075 - 8099 */
305 #define  ERRSMEV   (ERRSM + 1600)  /* EV:     8100 - 8124 */
306 #define  ERRSMAF   (ERRSM + 1625)  /* AF:     8125 - 8224 */
307 #define  ERRSMFR   (ERRSM + 1725)  /* FR:     8225 - 8324 */
308 #define  ERRSMAC   (ERRSM + 1825)  /* AC:     8325 - 8324 */
309 #define  ERRSMIA   (ERRSM + 1925)  /* IA:     8425 - 8524 */
310 #define  ERRSMPU   (ERRSM + 2625)  /* PU:     9125 - 9200 */
311 #define  ERRSMSG   (ERRSM + 2700)  /* SG:     9200 - 9300 */
312 #define  ERRSMPQ   (ERRSM + 2800)  /* PQ:     9300 - 9349 */
313 #define  ERRSMVO   (ERRSM + 2900)  /* VO:     9400 - 9499 */
314 #define  ERRSMZP   (ERRSM + 3000)  /* ZP:     9400 - 9499 */
315 #define  ERRSMZL   (ERRSM + 3100)  /* ZL:     9400 - 9499 */
316 /* Nuera PS Changes - M1UA Entries */
317 #define  ERRSMMZ   (ERRSM + 4000)  /* MZ:     9400 - 9499 */
318 #define  ERRSMD2   (ERRSM + 4100)  /* D2: */
319
320
321 /* assign error numbers less than ERRLL = 8500 only */
322
323 \f
324 /* management interface - general error codes */
325
326 #define  ESMBASE     (ERRSM + 0)       /* reserved */
327 #define  ESMXXX      (ESMBASE + 0)     /* reserved */
328 #define  ESM001      (ESMBASE + 1)     /* smActvTsk: invalid source entity */
329
330 \f
331 /* management interface - UME error codes  - should move to smum_err.h */
332
333 #define  ESMUMBASE   (ERRSMUM   + 0)   /* reserved */
334 #define  ESMUMXXX    (ESMUMBASE + 0)   /* reserved */
335
336 \f
337 /* management interface - TCAP error codes  - should move to smst_err.h */
338
339 #define  ESMSTBASE   (ERRSMST   + 0)   /* reserved */
340 #define  ESMSTXXX    (ESMSTBASE + 0)   /* reserved */
341 #define  ESMSTX      ESMSTXXX          /* reserved - should be deleted */
342
343 \f
344 /* management interface - SCCP error codes - should move to smsp_err.h */
345
346 #define  ESMSPBASE   (ERRSMSP   + 0)   /* reserved */
347 #define  ESMSPXXX    (ESMSPBASE + 0)   /* reserved */
348 #define  ESMSPX      ESMSPXXX          /* reserved - should be deleted */
349
350 \f
351 /* management interface - MTP3 error codes - should move to smsn_err.h */
352
353 #define  ESMSNBASE   (ERRSMSN   + 0)   /* reserved */
354 #define  ESMSNXXX    (ESMSNBASE + 0)   /* reserved */
355 #define  ESMSNX      ESMSNXXX          /* reserved - should be deleted */
356
357 \f
358 /* management interface - MTP2 error codes - should move to smsd_err.h */
359
360 #define  ESMSDBASE   (ERRSMSD   + 0)   /* reserved */
361 #define  ESMSDXXX    (ESMSDBASE + 0)   /* reserved */
362 #define  ESMSDX      ESMSDXXX          /* reserved - should be deleted */
363
364 \f
365 /* layer management */
366   
367 #define  ELMBASE     (ERRLM + 0)    /* reserved */
368 #define  ELMXXX      (ELMBASE)      /* reserved */
369   
370 #define  ELM001      (ERRLM + 1)    /*  */
371 #define  ELM002      (ERRLM + 2)    /*  */
372 #define  ELM003      (ERRLM + 3)    /*  */
373 #define  ELM004      (ERRLM + 4)    /*  */
374 #define  ELM005      (ERRLM + 5)    /*  */
375 #define  ELM006      (ERRLM + 6)    /*  */
376 #define  ELM007      (ERRLM + 7)    /*  */
377 #define  ELM008      (ERRLM + 8)    /*  */
378 #define  ELM009      (ERRLM + 9)    /*  */
379 #define  ELM010      (ERRLM + 10)   /*  */
380 #define  ELM011      (ERRLM + 11)   /*  */
381 #define  ELM012      (ERRLM + 12)   /*  */
382 #define  ELM013      (ERRLM + 13)   /*  */
383 #define  ELM014      (ERRLM + 14)   /*  */
384 #define  ELM015      (ERRLM + 15)   /*  */
385 #define  ELM016      (ERRLM + 16)   /*  */
386 #define  ELM017      (ERRLM + 17)   /*  */
387 #define  ELM018      (ERRLM + 18)   /*  */
388 #define  ELM019      (ERRLM + 19)   /*  */
389 #define  ELM020      (ERRLM + 20)   /*  */
390 #define  ELM021      (ERRLM + 21)   /*  */
391 #define  ELM022      (ERRLM + 22)   /*  */
392 #define  ELM023      (ERRLM + 23)   /*  */
393 #define  ELM024      (ERRLM + 24)   /*  */
394 #define  ELM025      (ERRLM + 25)   /*  */
395 #define  ELM026      (ERRLM + 26)   /*  */
396 #define  ELM027      (ERRLM + 27)   /* pkMAMCfgReq: illegal elmt id type */
397 #define  ELM028      (ERRLM + 28)   /* pkMAMStaReq: illegal elmt id type */
398 #define  ELM029      (ERRLM + 29)   /* pkMAMStaCfm: illegal elmt id type */
399 #define  ELM030      (ERRLM + 30)   /* unpkMAMStaCfm */
400 #define  ELM031      (ERRLM + 31)   /* unpkMUMStaCfm */
401 #define  ELM032      (ERRLM + 32)   /* unpkMUMStaCfm */
402 #define  ELM033      (ERRLM + 33)   /* unpkMUMStsCfm */
403 #define  ELM034      (ERRLM + 34)   /* unpkMUMStaInd */
404 #define  ELM035      (ERRLM + 35)   /* unpkMASStaCfm */
405 #define  ELM036      (ERRLM + 36)   /* unpkMASStaCfm */
406 #define  ELM037      (ERRLM + 37)   /* unpkMASStsCfm */
407 #define  ELM038      (ERRLM + 38)   /* unpkMASStaInd */
408 #define  ELM039      (ERRLM + 39)   /* unpkMASUDatInd */
409 #define  ELM040      (ERRLM + 40)   /* lmActvTsk: illegal event code */
410 #define  ELM041      (ERRLM + 41)   /* lmActvTsk: illegal event code */
411 #define  ELM042      (ERRLM + 42)   /* lmActvTsk: illegal event code */
412 #define  ELM043      (ERRLM + 43)   /* lmActvTsk: illegal event code */
413 #define  ELM044      (ERRLM + 44)   /* lmActvTsk: illegal event code */
414 #define  ELM045      (ERRLM + 45)   /* lmActvTsk: illegal event code */
415 #define  ELM046      (ERRLM + 46)   /* lmActvTsk: illegal event code */
416 #define  ELM047      (ERRLM + 47)   /* lmActvTsk: illegal event code */
417 #define  ELM048      (ERRLM + 48)   /* lmActvTsk: illegal event code */
418 #define  ELM049      (ERRLM + 49)   /* lmActvTsk: illegal event code */
419 #define  ELM050      (ERRLM + 50)   /* lmActvTsk: illegal event code */
420 #define  ELM051      (ERRLM + 51)   /* lmActvTsk: illegal event code */
421 #define  ELM052      (ERRLM + 52)   /* lmActvTsk: illegal event code */
422 #define  ELM053      (ERRLM + 53)   /* lmActvTsk: illegal event code */
423 #define  ELM054      (ERRLM + 54)   /* lmActvTsk: illegal event code */
424 #define  ELM055      (ERRLM + 55)   /* lmActvTsk: illegal event code */
425 #define  ELM056      (ERRLM + 56)   /* lmActvTsk: illegal event code */
426 #define  ELM057      (ERRLM + 57)   /* lmActvTsk: illegal event code */
427 #define  ELM058      (ERRLM + 58)   /* pkMUMStaCfm */
428 #define  ELM059      (ERRLM + 59)   /* pkMM6StaCfm */
429 #define  ELM060      (ERRLM + 60)   /* pkMM6CfgReq */
430 #define  ELM061      (ERRLM + 61)   /* pkMM6StaReq */
431 #define  ELM062      (ERRLM + 62)   /* pkMUMCfgReq */
432 #define  ELM063      (ERRLM + 63)   /* pkMUMStaReq */
433 #define  ELM064      (ERRLM + 64)   /* pkMTPCfgReq */
434 #define  ELM065      (ERRLM + 65)   /* pkMSTCfgReq */
435 #define  ELM066      (ERRLM + 66)   /* lmActvTsk: illegal event code */
436 #define  ELM067      (ERRLM + 67)   /* lmActvTsk: illegal event code */
437 #define  ELM068      (ERRLM + 68)   /* lmActvTsk: illegal event code */
438 #define  ELM069      (ERRLM + 69)   /* lmActvTsk: illegal event code */
439 #define  ELM070      (ERRLM + 70)   /* lmActvTsk: illegal event code */
440 #define  ELM071      (ERRLM + 71)   /* lmActvTsk: illegal event code */
441 #define  ELM072      (ERRLM + 72)   /* lmActvTsk: illegal event code */
442 #define  ELM073      (ERRLM + 73)   /* lmActvTsk: illegal event code */
443 #define  ELM074      (ERRLM + 74)   /* lmActvTsk: illegal event code */
444 #define  ELM075      (ERRLM + 75)   /* lmActvTsk */
445
446 \f
447 /* lapb */
448
449 #ifdef LB            /* lapb */
450
451 /* following error codes are for version 1.x of lapb */
452
453 #define  ELBBASE     (ERRLB + 0)    /* reserved */
454 #define  ELBXXX      (ELBBASE)      /* reserved */
455
456 #define  ELB001      (ERRLB + 1)    /*  */
457 #define  ELB002      (ERRLB + 2)    /*  */
458 #define  ELB003      (ERRLB + 3)    /*  */
459 #define  ELB004      (ERRLB + 4)    /*  */
460 #define  ELB005      (ERRLB + 5)    /*  */
461 #define  ELB006      (ERRLB + 6)    /*  */
462 #define  ELB007      (ERRLB + 7)    /*  */
463 #define  ELB008      (ERRLB + 8)    /*  */
464 #define  ELB009      (ERRLB + 9)    /*  */
465 #define  ELB010      (ERRLB + 10)   /*  */
466 #define  ELB011      (ERRLB + 11)   /*  */
467 #define  ELB012      (ERRLB + 12)   /*  */
468 #define  ELB013      (ERRLB + 13)   /*  */
469 #define  ELB014      (ERRLB + 14)   /*  */
470 #define  ELB015      (ERRLB + 15)   /*  */
471 #define  ELB016      (ERRLB + 16)   /*  */
472 #define  ELB017      (ERRLB + 17)   /*  */
473 #define  ELB018      (ERRLB + 18)   /*  */
474 #define  ELB019      (ERRLB + 19)   /*  */
475 #define  ELB020      (ERRLB + 20)   /*  */
476 #define  ELB021      (ERRLB + 21)   /*  */
477 #define  ELB022      (ERRLB + 22)   /*  */
478 #define  ELB023      (ERRLB + 23)   /*  */
479 #define  ELB024      (ERRLB + 24)   /*  */
480 #define  ELB025      (ERRLB + 25)   /*  */
481 #define  ELB026      (ERRLB + 26)   /*  */
482 #define  ELB027      (ERRLB + 27)   /*  */
483 #define  ELB028      (ERRLB + 28)   /*  */
484 #define  ELB029      (ERRLB + 29)   /*  */
485 #define  ELB030      (ERRLB + 30)   /*  */
486 #define  ELB031      (ERRLB + 31)   /*  */
487 #define  ELB032      (ERRLB + 32)   /*  */
488 #define  ELB033      (ERRLB + 33)   /*  */
489 #define  ELB034      (ERRLB + 34)   /*  */
490 #define  ELB035      (ERRLB + 35)   /*  */
491 #define  ELB036      (ERRLB + 36)   /*  */
492 #define  ELB037      (ERRLB + 37)   /*  */
493 #define  ELB038      (ERRLB + 38)   /*  */
494 #define  ELB039      (ERRLB + 39)   /*  */
495 #define  ELB040      (ERRLB + 40)   /*  */
496 #define  ELB041      (ERRLB + 41)   /*  */
497 #define  ELB042      (ERRLB + 42)   /*  */
498 #define  ELB043      (ERRLB + 43)   /*  */
499 #define  ELB044      (ERRLB + 44)   /*  */
500 #define  ELB045      (ERRLB + 45)   /*  */
501 #define  ELB046      (ERRLB + 46)   /*  */
502 #define  ELB047      (ERRLB + 47)   /*  */
503 #define  ELB048      (ERRLB + 48)   /*  */
504 #define  ELB049      (ERRLB + 49)   /*  */
505 #define  ELB050      (ERRLB + 50)   /*  */
506 #define  ELB051      (ERRLB + 51)   /*  */
507 #define  ELB052      (ERRLB + 52)   /*  */
508 #define  ELB053      (ERRLB + 53)   /*  */
509 #define  ELB054      (ERRLB + 54)   /*  */
510 #define  ELB055      (ERRLB + 55)   /*  */
511 #define  ELB056      (ERRLB + 56)   /*  */
512 #define  ELB057      (ERRLB + 57)   /*  */
513 #define  ELB058      (ERRLB + 58)   /*  */
514 #define  ELB059      (ERRLB + 59)   /*  */
515 #define  ELB060      (ERRLB + 60)   /*  */
516 #define  ELB061      (ERRLB + 61)   /*  */
517 #define  ELB062      (ERRLB + 62)   /*  */
518 #define  ELB063      (ERRLB + 63)   /*  */
519 #define  ELB064      (ERRLB + 64)   /*  */
520 #define  ELB065      (ERRLB + 65)   /*  */
521 #define  ELB066      (ERRLB + 66)   /*  */
522 #define  ELB067      (ERRLB + 67)   /*  */
523 #define  ELB068      (ERRLB + 68)   /*  */
524 #define  ELB069      (ERRLB + 69)   /*  */
525 #define  ELB070      (ERRLB + 70)   /*  */
526 #define  ELB071      (ERRLB + 71)   /*  */
527 #define  ELB072      (ERRLB + 72)   /*  */
528 #define  ELB073      (ERRLB + 73)   /*  */
529 #define  ELB074      (ERRLB + 74)   /*  */
530 #define  ELB075      (ERRLB + 75)   /*  */
531 #define  ELB076      (ERRLB + 76)   /*  */
532 #define  ELB077      (ERRLB + 77)   /*  */
533 #define  ELB078      (ERRLB + 78)   /*  */
534 #define  ELB079      (ERRLB + 79)   /*  */
535 #define  ELB080      (ERRLB + 80)   /*  */
536 #define  ELB081      (ERRLB + 81)   /*  */
537 #define  ELB082      (ERRLB + 82)   /*  */
538 #define  ELB083      (ERRLB + 83)   /*  */
539 #define  ELB084      (ERRLB + 84)   /*  */
540 #define  ELB085      (ERRLB + 85)   /*  */
541 #define  ELB086      (ERRLB + 86)   /*  */
542 #define  ELB087      (ERRLB + 87)   /*  */
543 #define  ELB088      (ERRLB + 88)   /*  */
544 #define  ELB089      (ERRLB + 89)   /*  */
545 #define  ELB090      (ERRLB + 90)   /*  */
546 #define  ELB091      (ERRLB + 91)   /*  */
547 #define  ELB092      (ERRLB + 92)   /*  */
548 #define  ELB093      (ERRLB + 93)   /*  */
549 #define  ELB094      (ERRLB + 94)   /*  */
550 #define  ELB095      (ERRLB + 95)   /*  */
551 #define  ELB096      (ERRLB + 96)   /*  */
552 #define  ELB097      (ERRLB + 97)   /*  */
553 #define  ELB098      (ERRLB + 98)   /*  */
554 #define  ELB099      (ERRLB + 99)   /*  */
555 #define  ELB100      (ERRLB + 100)  /*  */
556 #define  ELB101      (ERRLB + 101)  /*  */
557 #define  ELB102      (ERRLB + 102)  /*  */
558 #define  ELB103      (ERRLB + 103)  /*  */
559 #define  ELB104      (ERRLB + 104)  /*  */
560 #define  ELB105      (ERRLB + 105)  /*  */
561 #define  ELB106      (ERRLB + 106)  /*  */
562 #define  ELB107      (ERRLB + 107)  /*  */
563 #define  ELB108      (ERRLB + 108)  /*  */
564 #define  ELB109      (ERRLB + 109)  /*  */
565 #define  ELB110      (ERRLB + 110)  /*  */
566 #define  ELB111      (ERRLB + 111)  /*  */
567 #define  ELB112      (ERRLB + 112)  /*  */
568 #define  ELB113      (ERRLB + 113)  /*  */
569 #define  ELB114      (ERRLB + 114)  /*  */
570 #define  ELB115      (ERRLB + 115)  /*  */
571 #define  ELB116      (ERRLB + 116)  /*  */
572 #define  ELB117      (ERRLB + 117)  /*  */
573 #define  ELB118      (ERRLB + 118)  /*  */
574 #define  ELB119      (ERRLB + 119)  /*  */
575 #define  ELB120      (ERRLB + 120)  /*  */
576 #define  ELB121      (ERRLB + 121)  /*  */
577 #define  ELB122      (ERRLB + 122)  /*  */
578 #define  ELB123      (ERRLB + 123)  /*  */
579 #define  ELB124      (ERRLB + 124)  /*  */
580 #define  ELB125      (ERRLB + 125)  /*  */
581 #define  ELB126      (ERRLB + 126)  /*  */
582 #define  ELB127      (ERRLB + 127)  /*  */
583 #define  ELB128      (ERRLB + 128)  /*  */
584 #define  ELB129      (ERRLB + 129)  /*  */
585 #define  ELB130      (ERRLB + 130)  /*  */
586 #define  ELB131      (ERRLB + 131)  /*  */
587 #define  ELB132      (ERRLB + 132)  /*  */
588 #define  ELB133      (ERRLB + 133)  /*  */
589 #define  ELB134      (ERRLB + 134)  /*  */
590 #define  ELB135      (ERRLB + 135)  /*  */
591 #define  ELB136      (ERRLB + 136)  /*  */
592 #define  ELB137      (ERRLB + 137)  /*  */
593 #define  ELB138      (ERRLB + 138)  /*  */
594 #define  ELB139      (ERRLB + 139)  /*  */
595 #define  ELB140      (ERRLB + 140)  /*  */
596 #define  ELB141      (ERRLB + 141)  /*  */
597 #define  ELB142      (ERRLB + 142)  /*  */
598 #define  ELB143      (ERRLB + 143)  /*  */
599 #define  ELB144      (ERRLB + 144)  /*  */
600 #define  ELB145      (ERRLB + 145)  /*  */
601 #define  ELB146      (ERRLB + 146)  /*  */
602 #define  ELB147      (ERRLB + 147)  /*  */
603 #define  ELB148      (ERRLB + 148)  /*  */
604 #define  ELB149      (ERRLB + 149)  /*  */
605 #define  ELB150      (ERRLB + 150)  /*  */
606 #define  ELB151      (ERRLB + 151)  /*  */
607 #define  ELB152      (ERRLB + 152)  /*  */
608 #define  ELB153      (ERRLB + 153)  /*  */
609 #define  ELB154      (ERRLB + 154)  /*  */
610 #define  ELB155      (ERRLB + 155)  /*  */
611 #define  ELB156      (ERRLB + 156)  /*  */
612 #define  ELB157      (ERRLB + 157)  /*  */
613 #define  ELB158      (ERRLB + 158)  /*  */
614 #define  ELB159      (ERRLB + 159)  /*  */
615 #define  ELB160      (ERRLB + 160)  /*  */
616 #define  ELB161      (ERRLB + 161)  /*  */
617 #define  ELB162      (ERRLB + 162)  /*  */
618 #define  ELB163      (ERRLB + 163)  /*  */
619 #define  ELB164      (ERRLB + 164)  /*  */
620 #define  ELB165      (ERRLB + 165)  /*  */
621 #define  ELB166      (ERRLB + 166)  /*  */
622 #define  ELB167      (ERRLB + 167)  /*  */
623 #define  ELB168      (ERRLB + 168)  /*  */
624 #define  ELB169      (ERRLB + 169)  /*  */
625 #define  ELB170      (ERRLB + 170)  /*  */
626 #define  ELB171      (ERRLB + 171)  /*  */
627 #define  ELB172      (ERRLB + 172)  /*  */
628 #define  ELB173      (ERRLB + 173)  /*  */
629 #define  ELB174      (ERRLB + 174)  /*  */
630 #define  ELB175      (ERRLB + 175)  /*  */
631 #define  ELB176      (ERRLB + 176)  /*  */
632 #define  ELB177      (ERRLB + 177)  /*  */
633 #define  ELB178      (ERRLB + 178)  /*  */
634 #define  ELB179      (ERRLB + 179)  /*  */
635 #define  ELB180      (ERRLB + 180)  /*  */
636 #define  ELB181      (ERRLB + 181)  /*  */
637 #define  ELB182      (ERRLB + 182)  /*  */
638 #define  ELB183      (ERRLB + 183)  /*  */
639 #define  ELB184      (ERRLB + 184)  /*  */
640 #define  ELB185      (ERRLB + 185)  /*  */
641 #define  ELB186      (ERRLB + 186)  /*  */
642 #define  ELB187      (ERRLB + 187)  /*  */
643 #define  ELB188      (ERRLB + 188)  /*  */
644 #define  ELB189      (ERRLB + 189)  /*  */
645 #define  ELB190      (ERRLB + 190)  /*  */
646 #define  ELB191      (ERRLB + 191)  /*  */
647 #define  ELB192      (ERRLB + 192)  /*  */
648 #define  ELB193      (ERRLB + 193)  /*  */
649 #define  ELB194      (ERRLB + 194)  /*  */
650 #define  ELB195      (ERRLB + 195)  /*  */
651 #define  ELB196      (ERRLB + 196)  /*  */
652 #define  ELB197      (ERRLB + 197)  /*  */
653 #define  ELB198      (ERRLB + 198)  /*  */
654 #define  ELB199      (ERRLB + 199)  /*  */
655 #define  ELB200      (ERRLB + 200)  /*  */
656 #define  ELB201      (ERRLB + 201)  /*  */
657 #define  ELB202      (ERRLB + 202)  /*  */
658 #define  ELB203      (ERRLB + 203)  /*  */
659 #define  ELB204      (ERRLB + 204)  /*  */
660 #define  ELB205      (ERRLB + 205)  /*  */
661 #define  ELB206      (ERRLB + 206)  /*  */
662 #define  ELB207      (ERRLB + 207)  /*  */
663 #define  ELB208      (ERRLB + 208)  /*  */
664 #define  ELB209      (ERRLB + 209)  /*  */
665 #define  ELB210      (ERRLB + 210)  /*  */
666 #define  ELB211      (ERRLB + 211)  /*  */
667 #define  ELB212      (ERRLB + 212)  /*  */
668 #define  ELB213      (ERRLB + 213)  /*  */
669 #define  ELB214      (ERRLB + 214)  /*  */
670 #define  ELB215      (ERRLB + 215)  /*  */
671 #define  ELB216      (ERRLB + 216)  /*  */
672 #define  ELB217      (ERRLB + 217)  /*  */
673 #define  ELB218      (ERRLB + 218)  /*  */
674 #define  ELB219      (ERRLB + 219)  /*  */
675 #define  ELB220      (ERRLB + 220)  /*  */
676 #define  ELB221      (ERRLB + 221)  /*  */
677 #define  ELB222      (ERRLB + 222)  /*  */
678 #define  ELB223      (ERRLB + 223)  /*  */
679 #define  ELB224      (ERRLB + 224)  /*  */
680 #define  ELB225      (ERRLB + 225)  /*  */
681 #define  ELB226      (ERRLB + 226)  /*  */
682 #define  ELB227      (ERRLB + 227)  /*  */
683 #define  ELB228      (ERRLB + 228)  /*  */
684 #define  ELB229      (ERRLB + 229)  /*  */
685 #define  ELB230      (ERRLB + 230)  /*  */
686 #define  ELB231      (ERRLB + 231)  /*  */
687 #define  ELB232      (ERRLB + 232)  /*  */
688 #define  ELB233      (ERRLB + 233)  /*  */
689 #define  ELB234      (ERRLB + 234)  /*  */
690 #define  ELB235      (ERRLB + 235)  /*  */
691 #define  ELB236      (ERRLB + 236)  /*  */
692 #define  ELB237      (ERRLB + 237)  /*  */
693 #define  ELB238      (ERRLB + 238)  /*  */
694 #define  ELB239      (ERRLB + 239)  /*  */
695 #define  ELB240      (ERRLB + 240)  /*  */
696 #define  ELB241      (ERRLB + 241)  /*  */
697 #define  ELB242      (ERRLB + 242)  /*  */
698 #define  ELB243      (ERRLB + 243)  /*  */
699 #define  ELB244      (ERRLB + 244)  /*  */
700 #define  ELB245      (ERRLB + 245)  /*  */
701 #define  ELB246      (ERRLB + 246)  /*  */
702 #define  ELB247      (ERRLB + 247)  /*  */
703 #define  ELB248      (ERRLB + 248)  /*  */
704 #define  ELB249      (ERRLB + 249)  /*  */
705 #define  ELB250      (ERRLB + 250)  /*  */
706 #define  ELB251      (ERRLB + 251)  /*  */
707 #define  ELB252      (ERRLB + 252)  /*  */
708 #define  ELB253      (ERRLB + 253)  /*  */
709 #define  ELB254      (ERRLB + 254)  /*  */
710 #define  ELB255      (ERRLB + 255)  /*  */
711 #define  ELB256      (ERRLB + 256)  /*  */
712 #define  ELB257      (ERRLB + 257)  /*  */
713 #define  ELB258      (ERRLB + 258)  /*  */
714 #define  ELB259      (ERRLB + 259)  /*  */
715 #define  ELB260      (ERRLB + 260)  /*  */
716 #define  ELB261      (ERRLB + 261)  /*  */
717 #define  ELB262      (ERRLB + 262)  /*  */
718 #define  ELB263      (ERRLB + 263)  /*  */
719 #define  ELB264      (ERRLB + 264)  /*  */
720 #define  ELB265      (ERRLB + 265)  /*  */
721 #define  ELB266      (ERRLB + 266)  /*  */
722 #define  ELB267      (ERRLB + 267)  /*  */
723 #define  ELB268      (ERRLB + 268)  /*  */
724 #define  ELB269      (ERRLB + 269)  /*  */
725 #define  ELB270      (ERRLB + 270)  /*  */
726 #define  ELB271      (ERRLB + 271)  /*  */
727 #define  ELB272      (ERRLB + 272)  /*  */
728 #define  ELB273      (ERRLB + 273)  /*  */
729 #define  ELB274      (ERRLB + 274)  /*  */
730 #define  ELB275      (ERRLB + 275)  /*  */
731 #define  ELB276      (ERRLB + 276)  /*  */
732 #define  ELB277      (ERRLB + 277)  /*  */
733 #define  ELB278      (ERRLB + 278)  /*  */
734 #define  ELB279      (ERRLB + 279)  /*  */
735 #define  ELB280      (ERRLB + 280)  /*  */
736 #define  ELB281      (ERRLB + 281)  /*  */
737 #define  ELB282      (ERRLB + 282)  /*  */
738 #define  ELB283      (ERRLB + 283)  /*  */
739 #define  ELB284      (ERRLB + 284)  /*  */
740 #define  ELB285      (ERRLB + 285)  /*  */
741 #define  ELB286      (ERRLB + 286)  /*  */
742 #define  ELB287      (ERRLB + 287)  /*  */
743 #define  ELB288      (ERRLB + 288)  /*  */
744 #define  ELB289      (ERRLB + 289)  /*  */
745 #define  ELB290      (ERRLB + 290)  /*  */
746 #define  ELB291      (ERRLB + 291)  /*  */
747 #define  ELB292      (ERRLB + 292)  /*  */
748 #define  ELB293      (ERRLB + 293)  /*  */
749 #define  ELB294      (ERRLB + 294)  /*  */
750 #define  ELB295      (ERRLB + 295)  /*  */
751 #define  ELB296      (ERRLB + 296)  /*  */
752 #define  ELB297      (ERRLB + 297)  /*  */
753 #define  ELB298      (ERRLB + 298)  /*  */
754 #define  ELB299      (ERRLB + 299)  /*  */
755 #define  ELB300      (ERRLB + 300)  /*  */
756 #define  ELB301      (ERRLB + 301)  /*  */
757 #define  ELB302      (ERRLB + 302)  /*  */
758 #define  ELB303      (ERRLB + 303)  /*  */
759 #define  ELB304      (ERRLB + 304)  /*  */
760 #define  ELB305      (ERRLB + 305)  /*  */
761 #define  ELB306      (ERRLB + 306)  /*  */
762 #define  ELB307      (ERRLB + 307)  /*  */
763 #define  ELB308      (ERRLB + 308)  /*  */
764 #define  ELB309      (ERRLB + 309)  /*  */
765 #define  ELB310      (ERRLB + 310)  /*  */
766 #define  ELB311      (ERRLB + 311)  /*  */
767 #define  ELB312      (ERRLB + 312)  /*  */
768 #define  ELB313      (ERRLB + 313)  /*  */
769 #define  ELB314      (ERRLB + 314)  /*  */
770 #define  ELB315      (ERRLB + 315)  /*  */
771 #define  ELB316      (ERRLB + 316)  /*  */
772 #define  ELB317      (ERRLB + 317)  /*  */
773 #define  ELB318      (ERRLB + 318)  /*  */
774 #define  ELB319      (ERRLB + 319)  /*  */
775 #define  ELB320      (ERRLB + 320)  /*  */
776 #define  ELB321      (ERRLB + 321)  /*  */
777 #define  ELB322      (ERRLB + 322)  /*  */
778 #define  ELB323      (ERRLB + 323)  /*  */
779 #define  ELB324      (ERRLB + 324)  /*  */
780 #define  ELB325      (ERRLB + 325)  /*  */
781 #define  ELB326      (ERRLB + 326)  /*  */
782 #define  ELB327      (ERRLB + 327)  /*  */
783 #define  ELB328      (ERRLB + 328)  /*  */
784 #define  ELB329      (ERRLB + 329)  /*  */
785 #define  ELB330      (ERRLB + 330)  /*  */
786 #define  ELB331      (ERRLB + 331)  /*  */
787 #define  ELB332      (ERRLB + 332)  /*  */
788 #define  ELB333      (ERRLB + 333)  /*  */
789 #define  ELB334      (ERRLB + 334)  /*  */
790 #define  ELB335      (ERRLB + 335)  /*  */
791 #define  ELB336      (ERRLB + 336)  /*  */
792 #define  ELB337      (ERRLB + 337)  /*  */
793 #define  ELB338      (ERRLB + 338)  /*  */
794 #define  ELB339      (ERRLB + 339)  /*  */
795 #define  ELB340      (ERRLB + 340)  /*  */
796 #define  ELB341      (ERRLB + 341)  /*  */
797 #define  ELB342      (ERRLB + 342)  /*  */
798 #define  ELB343      (ERRLB + 343)  /*  */
799 #define  ELB344      (ERRLB + 344)  /*  */
800 #define  ELB345      (ERRLB + 345)  /*  */
801 #define  ELB346      (ERRLB + 346)  /*  */
802 #define  ELB347      (ERRLB + 347)  /*  */
803 #define  ELB348      (ERRLB + 348)  /*  */
804 #define  ELB349      (ERRLB + 349)  /*  */
805 #define  ELB350      (ERRLB + 350)  /*  */
806 #define  ELB351      (ERRLB + 351)  /*  */
807 #define  ELB352      (ERRLB + 352)  /*  */
808 #define  ELB353      (ERRLB + 353)  /*  */
809 #define  ELB354      (ERRLB + 354)  /*  */
810   
811 #endif
812
813 \f
814 /* Error classes */
815 #ifndef ERRCLS_ADD_RES
816 #define ERRCLS_ADD_RES 0x1
817 #endif /* ERRCLS_ADD_RES */
818
819 #ifndef ERRCLS_INT_PAR
820 #define ERRCLS_INT_PAR 0x2
821 #endif /* ERRCLS_INT_PAR */
822
823 #ifndef ERRCLS_DEBUG
824 #define ERRCLS_DEBUG   0x4
825 #endif /* ERRCLS_DEBUG */
826
827 /* New error class for FTHA added */
828 #ifndef ERRCLS_FTHA
829 #define ERRCLS_FTHA    0x8
830 #endif /* ERRCLS_FTHA */
831
832 #ifndef NO_ERRCLS
833 /* New error class for FTHA added */
834 #define ERRCLASS ( ERRCLS_ADD_RES|ERRCLS_INT_PAR|ERRCLS_DEBUG|ERRCLS_FTHA )
835 #else
836 #define ERRCLASS 0
837 #endif /* NO_ERRCLS */
838
839 /* macros to validate packing functions */
840
841 #if (ERRCLASS & ERRCLS_ADD_RES)
842
843 #define CMCHKPK(func, val, mBuf) \
844    { \
845       S16 ret; \
846       if ((ret = func(val, mBuf)) != ROK) \
847          return (ret); \
848    }
849
850 #define CMCHKPKLOG(func, val, mBuf, errCode, pst) \
851    { \
852       S16 ret; \
853       if ((ret = func(val, mBuf)) != ROK) \
854       { \
855          SPutMsg(mBuf); \
856          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, \
857                    __LINE__, (ErrCls) ERRCLS_ADD_RES, errCode, (ErrVal)ret, \
858                    "Packing failure"); \
859           return (ret); \
860        } \
861    }
862
863 #define CMCHKPKVERLOG(func, val, mBuf, errCode, pst) \
864    { \
865       S16 ret; \
866       if ((ret = func(pst, val, mBuf)) != ROK) \
867       { \
868          SPutMsg(mBuf); \
869          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, \
870                    __LINE__, (ErrCls) ERRCLS_ADD_RES, errCode, (ErrVal)ret, \
871                    "Packing failure"); \
872          return (ret); \
873       } \
874    }
875
876 #else   /* (ERRCLASS & ERRCLS_ADD_RES) */
877
878 #define CMCHKPK(func, val, mBuf) \
879    func(val, mBuf);
880
881 #define CMCHKPKLOG(func, val, mBuf, errCode, pst) \
882    func(val, mBuf);
883
884 #define CMCHKPKVERLOG(func, val, mBuf, errCode, pst) \
885    func(pst, val, mBuf);
886
887 #endif   /* (ERRCLASS & ERRCLS_ADD_RES) */
888
889 /* macros to validate unpacking functions */
890 /*ssi_h_001.main_151 : changed check so that return value will return 
891  * to the caller incase of unpacking failures
892  */
893 #if (ERRCLASS & ERRCLS_ADD_RES)
894
895 #define CMCHKUNPK(func, val, mBuf) \
896    { \
897       S16 ret; \
898       if ((ret = func(val, mBuf)) != ROK) \
899          return (ret); \
900    }
901
902 #define CMCHKUNPKLOG(func, val, mBuf, errCode, pst) \
903    { \
904       S16 ret; \
905       if ((ret = func(val, mBuf)) != ROK) \
906       { \
907          SPutMsg(mBuf); \
908          SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId, __FILE__, \
909                    __LINE__, (ErrCls) ERRCLS_ADD_RES, (ErrVal)errCode, (ErrVal)ret, \
910                    "Unpacking failure"); \
911           return (ret); \
912        } \
913    }
914
915 #define CMCHKUNPKVERLOG(func, val, mBuf, errCode, pst) \
916    { \
917       S16 ret; \
918       if ((ret = func(pst, val, mBuf)) != ROK) \
919       { \
920          SPutMsg(mBuf); \
921          SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId, __FILE__, \
922                    __LINE__, (ErrCls) ERRCLS_ADD_RES, (ErrVal)errCode, (ErrVal)ret, \
923                    "Unpacking failure"); \
924          return (ret); \
925       } \
926    }
927
928 #else   /* (ERRCLASS & ERRCLS_ADD_RES) */
929
930 #define CMCHKUNPK(func, val, mBuf) \
931    func(val, mBuf);
932
933 #define CMCHKUNPKLOG(func, val, mBuf, errCode, pst) \
934    func(val, mBuf);
935
936 #define CMCHKUNPKVERLOG(func, val, mBuf, errCode, pst) \
937    func(pst, val, mBuf);
938 #endif   /* (ERRCLASS & ERRCLS_ADD_RES) */
939
940 \f
941 /* strtIdx and endIdx for buffer.t.dat */
942
943 #ifdef DOS                          /* dos environment */
944 #ifdef OD                           /* odi environment */
945 #define DSTRTIDX    00              /* buffer start index */
946 #define DENDIDX     127             /* buffer end index */
947 #else                               /* non-odi environment */
948 #define DSTRTIDX    00              /* buffer start index */
949 #define DENDIDX     31              /* buffer end index */
950 #endif /* DOS */
951 #else  /* not dos */
952 #ifdef UNIX                         /* unix environment */
953 #define DSTRTIDX    00              /* buffer start index */
954 #define DENDIDX     31              /* buffer end index */
955 #else  /* not unix */
956 #ifdef MOTADS                       /* motorola ads environment */
957 #define DSTRTIDX    00              /* buffer start index */
958 #define DENDIDX     63              /* buffer end index */
959 #else  /* not MOTADS */
960 #ifdef PS
961 #define DSTRTIDX    00              /* buffer start index */
962 #define DENDIDX     31              /* buffer end index */
963 #else  /* not PS */
964 #ifdef QUICCADS
965 #define DSTRTIDX    00              /* buffer start index */
966 #define DENDIDX     31              /* buffer end index */
967 #else /* not quiccads */
968 #ifdef ALC_EVAL
969 /*
970  * The ALC receive buffers should be of size
971  *    ((n+1)*48) + 47
972  * in order take care of bug ALC02001
973  *   where n > 0 for chaining
974  *
975  * setting n = 2, we get size = 143
976  */ 
977 #define  DSTRTIDX   00              /* buffer start index */
978 #define  DENDIDX    142             /* buffer end index */
979 #else /* not alceval */
980 #ifdef ELVIS_68302
981 #define DSTRTIDX    00
982 #define DENDIDX     63
983 #else
984 #ifdef ELVIS_68360
985 #define DSTRTIDX    00
986 #define DENDIDX     63
987 #else
988 #define DSTRTIDX    00              /* buffer start index */
989 #define DENDIDX     31              /* buffer end index */
990 #endif  /* ELVIS_68360 */
991 #endif  /* ELVIS_68302 */
992 #endif  /* ALC_EVAL */
993 #endif /* QUICCADS */
994 #endif /* PS */
995 #endif /* MOTADS */
996 #endif /* UNIX */
997 #endif /* DOS */
998
999 #define DSIZE       (DENDIDX+1)       /* buffer size */
1000
1001 #ifdef SUNATMADPT                   /* sun atm adaptor */
1002 #define DSTRTPAD     8
1003 #else
1004 #define DSTRTPAD     0
1005 #endif /* SUNATMADPT */
1006
1007 /* region and pool macros */
1008
1009 #define SGETBUFREGION(buf)   (DFLT_REGION)
1010 #define SGETBUFPOOL(buf)     (DFLT_POOL)
1011
1012 /* bufType for buffer */
1013   
1014 #define BDATA       0x01              /* data buffer */
1015 #define BMSG        0x02              /* message buffer */
1016 #define BTSK        0x03              /* task buffer */
1017 /* #define BEXT        0x04               extension buffer */
1018 /* #define BDMA        0x05               dma buffer */
1019 #define BDPOOL      0x06              /* dynamic pool buffer */
1020 #define BSPOOL      0x07              /* static pool buffer */
1021 #define BUNK        0x08              /* unknown buffer */
1022    
1023 /* ttype for SRegTsk function */
1024   
1025 #define TTUND       0x00              /* undefined task */
1026 #define TTNORM      0x01              /* normal task - non preemptive */
1027 #define TTPERM      0x02              /* permanent task */
1028 #define TTPREEMPT   0x03              /* normal task - preemptive */
1029 #define TTTMR       0x04              /* timer task */
1030 #define TTMOS       0x05              /* MOS */
1031
1032 #ifdef MOSVER
1033 #define MAXEXTENT   0x04              /* maximum extension entries */
1034 #endif
1035 #ifdef PS
1036 #define MAXEXTENT   0x04              /* maximum extension entries */
1037 #endif
1038
1039 \f
1040 /* priority, route, entity and instance are passed to SPostTsk function */
1041 /* for loosely coupled interface */
1042
1043 /* process id for mos header */
1044 #define PROCIDNC    0xFFFF            /* processor id, not configured */
1045
1046 /* TUCL priority for Create Task */
1047 #ifdef HI_MULTI_THREADED
1048 #ifndef TENB_RTLIN_CHANGES
1049 #define HI_STSK_PRI             13
1050 #else
1051 #define HI_STSK_PRI             35
1052 #endif
1053 #endif
1054
1055 /* priority for mos header, maximum of 16 allowed */
1056   
1057 #define PRIOR0      0x00              /* priority 0 - highest */
1058 #define PRIOR1      0x01              /* priority 1 */
1059 #define PRIOR2      0x02              /* priority 2 */
1060 #define PRIOR3      0x03              /* priority 3 - lowest */
1061 #define PRIORNC     0xFF              /* priority not configured */
1062   
1063 /* route for mos header */
1064   
1065 #define RTESPEC     0x00              /* route to specific instance */
1066 #define RTEFRST     0x01              /* route to first available instance */
1067 #define RTEALL      0x02              /* route to all available instances */
1068 #define RTESHM      0x03              /* route for shared memory */
1069 #define RTETRNQ     0x04              /* route for SWFT messages */
1070 #define RTEQONLY    0x05              /* for messages towards non SWFT nodes*/
1071 #define RTE_PROTO   0x06              /* for messages towards protocl layers*/
1072 #define RTE_RT_UPD  0x07              /* for messages towards standby nodes*/
1073 #define RTE_REV_UPD 0x08              /* for messages towards master nodes*/
1074 #define RTENC       0xFF              /* route not configured */
1075
1076 /* entity for mos header */
1077
1078 #define ENTPRM      0x00              /* Permanent task */
1079 #define ENTTST      0x00              /* Test */
1080 #define ENTSS       0x01              /* Common System Services */
1081 #define ENTMS       ENTSS             /* Multiprocessor Operating System */
1082 #define ENTNS       ENTSS             /* NTSS */
1083 #define ENTSC       0x02              /* Physical Layer - SCC */
1084 #define ENTLB       0x03              /* Data Link Layer - LAPB */
1085 #define ENTLD       0x04              /* Data Link Layer - LAPD */
1086 #define ENTML       0x05              /* Data Link Layer - Multilink */
1087 #define ENTBD       0x06              /* Data Link Layer - LAPB & LAPD */
1088 #define ENTXI       0x07              /* Network Layer - X.25 Intermediate System */
1089 #define ENTXN       0x08              /* Network Layer - X.25 End System */
1090 #define ENTXG       0x09              /* Network Layer - X.75 */
1091 #define ENTIN       0x0A              /* Network Layer - Q.930/Q.931 */
1092 #define ENTAP       0x0B              /* Application Layer - Asynchronous PAD */
1093 #define ENTBR       0x0C              /* Data Link Layer - Basic Frame Relay */
1094                                       /* OBSOLETE */
1095 #ifndef ENTER
1096 #define ENTER       0x0D              /* Data Link Layer - Extended Frame Relay */
1097 #endif
1098                                       /* OBSOLETE */
1099 #define ENTSM       0x0E              /* Stack Manager */
1100 #define ENTMD       0x0F              /* Mos Driver */
1101 #define ENTAL       0x10              /* Application Program */
1102 #define ENTLDLM     0x11              /* Lapd Layer Manager */
1103 #define ENTTC       0x12              /* TCP/IP */
1104 #define ENTIX       0x13              /* X.31 */
1105 #define ENTSI       0x14              /* SS7 - isup */
1106 #define ENTSN       0x15              /* SS7 - mtp, level 3 */
1107 #define ENTSD       0x16              /* SS7 - mtp, level 2 */
1108 #define ENTST       0x17              /* SS7 - tcap */
1109 #define ENTDB       0x18              /* 68000 Debugger */
1110 #define ENTIS       0x19              /* Physical - ISAC-S */
1111 #define ENTLC       0x1A              /* Data Link Layer - LLC */
1112 #define ENTOD       0x1B              /* Novell ODI */
1113 #define ENTSE       0x1C              /* 68302 */
1114 #define ENTHE       0x1D              /* Hello World */
1115 #define ENTSP       0x1E              /* SS7 - sccp */
1116 #define ENTCC       0x1F              /* Interworking call control */
1117 #define ENTTU       0x20              /* SS7 - tcap user */
1118 #define ENTUD       0x21              /* UDP/IP (without TCP) */
1119 #define ENTM1       0x22              /* Dummy MAC (with MACINT1) */
1120 #define ENTM2       0x23              /* Dummy MAC (with MACINT2) */
1121 #define ENTM3       0x24              /* Dummy MAC (with MACINT3) */
1122 #define ENTTP       0x25              /* SS7 - tup */
1123 #define ENTBS       0x26              /* ATM - LANE Broadcast Server (BUS) */
1124 #define ENTM4       0x27              /* Dummy MAC (with MACINT4) */
1125 #define ENTM5       0x28              /* Dummy MAC (with MACINT5) */
1126 #define ENTM6       0x29              /* Dummy MAC (with MACINT6) */
1127 #define ENTM7       0x2A              /* Dummy MAC (with MACINT7) */
1128 #define ENTM8       0x2B              /* Dummy MAC (with MACINT8) */
1129 #define ENTM9       0x2C              /* Dummy MAC (with MACINT9) */
1130 #define ENTME       0x2D              /* Message Exchange */
1131 #define ENTAC       0x2E              /* ATM - cpcs */
1132 #define ENTAS       0x2F              /* ATM - q.saal */
1133 #define ENTAM       0x30              /* ATM - q.93b */
1134 #define ENTUM       0x31              /* ATM - ume */
1135 #define ENTMU       0x32              /* ATM - management user */
1136 #define ENTLR       0x33              /* loader */
1137 #define ENTLU       0x34              /* loader user */
1138 #define ENTRY       0x35              /* relay */
1139 #define ENTEC       0x36              /* ATM - LANE Client (LEC) */
1140 #define ENTFA       0x37              /* ATM - Fujitsu ALC driver */
1141 #define ENTSR       0x38              /* MTP 3 Simple Router */
1142 #define ENTES       0x39              /* ATM - LANE Services (LEServices) */
1143 #define ENTPN       0x3A              /* ATM - PNNI */
1144 #define ENTQI       0x3B              /* QUICC Driver */
1145 #define ENTWD       0x3C              /* MTP Level 2 Wrapper */
1146 #define ENTWN       0x3D              /* MTP Level 3 Wrapper */
1147 #define ENTWI       0x3E              /* ISUP Wrapper */
1148 #define ENTWU       0x3F              /* TUP Wrapper */
1149 #define ENTWS       0x40              /* SCCP Wrapper */
1150 #define ENTWC       0x41              /* TCAP Wrapper */
1151 #define ENTPU       0x42              /* ATM PNNI User */
1152 #define ENTSA       0x43              /* ATM - Q.2140 */
1153 #define ENTFM       0x44              /* SS7 - Fault Manager */
1154 #define ENTBI       0x45              /* ATM - b-isup */
1155 #define ENTMA       0x46              /* SS7 - MAP*/
1156 #define ENTFN       0x47              /* Frame Relay Network Layer - Q.933 */
1157 #define ENTNV       0x48              /* V5.X PSTN */
1158 #define ENTLV       0x49              /* LAPV5-DL */
1159 #define ENTEV       0x4a              /* V5.X Envelope Function */
1160 #define ENTPL       0x4b              /* ATM - PMC Sierra LASAR driver */
1161 #define ENTAU       0x4c              /* MAP Upper User */
1162 #define ENTVM       0x4d              /* V5.1 mac layer */
1163 #define ENTAF       0x4e              /* Frame Relay ATM IW Layer */
1164 #define ENTFR       0x4f              /* Frame Relay */
1165 #define ENTMT       0x50              /* mt_ss */
1166 #define ENTCV       0x51              /* V5.X Control Protocol */
1167 #define ENTMV       0x52              /* V5.X System Management Layer */
1168 #define ENTIM       0x53              /* ATM - IME */
1169 #define ENTBV       0x54              /* V5 - BCC. */
1170 #define ENTPA       0x55              /* PLOA */
1171 #define ENTPV       0x56              /* V5 - Protection Protocol. */
1172 #define ENTLK       0x57              /* V5 - LCP */
1173 #define ENTL1       0x58              /* V5 - Link Layer 1 */
1174 #define ENTIA       0x59              /* map is41 */
1175 #define ENTIU       0x5a              /* map is41 user */
1176 #define ENTRM       0x5b              /* Resource Manager */
1177 #define ENTRT       0x5c              /* Router */
1178 #define ENTSG       0x5d              /* System manager */
1179 #define ENTPQ       0x5e              /* Power QUICC Driver */
1180 #define ENTMC       0x5f              /* Mac over sockets */
1181 #define ENTIE       0x60              /* INAP */
1182 #define ENTBW       ENTBI             /* BISUP Wrapper */
1183 #define ENTIW       ENTSI             /* ISUP Wrapper */
1184 #define ENTQW       ENTIN             /* ISDN Wrapper */
1185 #define ENTAW       ENTAM             /* q.93B Wrapper */
1186 #define ENTSF       0x61              /* Switching Fabric */
1187 #define ENTVF       0x62              /* Integrated V5 layer 3 */ 
1188 #define ENTCL       0x63              /* ASN.1 encoder/decoder */ 
1189 #define ENTSH       0x65              /* System Agent */ 
1190 #define ENTMR       0x66              /* Message Router */ 
1191 #define ENTL4       0x67              /* dummy layer4 */
1192 #define ENTTT       0x68              /* TCAP over TCP/IP */
1193 #define ENTPR       0x69              /* MPC860SAR Driver */
1194 #define ENTGN       0x6a              /* GPRS Network Service */
1195 #define ENTGG       0x6b              /* GPRS BSSGP */
1196 #define ENTAR       0x6c              /* ARI module */
1197 #define ENTGT       0x6d              /* GPRS GTP */
1198 #define ENTGM       0x6e              /* GPRS Mobility Management */
1199 #define ENTGR       0x6f              /* GPRS Relay */
1200 #define ENTGW       0x70              /* GPRS Ineterworking unit */
1201 #define ENTGL       0x71              /* GPRS LLC */
1202 #define ENTGS       0x72              /* GPRS SNDCP */
1203 #define ENTGZ       0x73              /* GPRS RLC/MAC */
1204 #define ENTGY       0x74              /* GPRS SMS */
1205 #define ENTHI       0x75              /* TUCL */
1206 #define ENTHC       0x76              /* H.323 */
1207 #define ENTHU       0x77              /* H.323 user */
1208 #define ENTHR       0x78              /* RTP/RTCP */
1209 #define ENTNM       0x79              /* GPRS Network Management */
1210 #define ENTGB       0x7a              /* GPRS BSS Relay */
1211 #define ENTGP       0x7b              /* GPRS PDP at MS */
1212 #define ENTIQ       0x7c              /* Q.930/931-Q.SAAL Convergence Layer */
1213 #define ENTXM       0x7d              /* Connection Manager */
1214 #define ENTMG       0x7e              /* MGCP */
1215 #define ENTHG       0x7f              /* Annex G */
1216 #define ENTDN       0x80              /* LDF-MTP3 */
1217 #define ENTTS       0x81              /* Trillium Stack Manager */
1218 #define ENTVO       0x82              /* MPC8260 Driver */
1219 #define ENTGO       0x83              /* GTP Location-MGMT */
1220 #define ENTGI       0x84              /* CC-3G */
1221 #define ENTGH       0x85              /* GTP-Charging */
1222 #define ENTGU       0x86              /* Relay on IU for GTP */
1223 #define ENTLN       0x87              /* MPLS */
1224 #define ENTSB       0x88              /* SCTP */
1225 #define ENTIT       0x89              /* M3UA */
1226 #define ENTFW       0x8a              /* MPLS - Forwarder */
1227 #define ENTRL       0x8b              /* 3GPP-RLC */
1228 #define ENTAL2      0x8c              /* AAL2 Signaling */
1229 #define ENTAA       0x8d              /* AAL2 Signaling User */
1230 #define ENTRA       0x8f              /* RANAP */
1231 #define ENTNF       0x90              /* M3UA-NIF */
1232 #define ENTRN       0x91              /* RNSAP */
1233 #define ENTDP       0x92              /* LDF-SCCP */
1234 #define ENTDT       0x93              /* LDF-TCAP */
1235 #define ENTNP       0x94              /* SUA NIF */
1236 #define ENTP1       0x95              /* PXY dummy for PLOA */
1237 #define ENTID       0x96              /* IUA */
1238 #define ENTND       0x97              /* IUA-NIF */
1239 #define ENTDM       0x98              /* IWF */
1240 #define ENTSO       0x99              /* SIP */
1241 #define ENTSU       0x9a              /* SUA */
1242 #ifndef OP_IU
1243 /*ssi_h_001.main_145-defined new RANAP user*/
1244 #define ENTRU       0x9b              /* RANAP User */
1245 #else
1246 /* Map ENTRU to ENTPP */
1247 #define ENTRU       ENTPP              /* RANAP User */
1248 #endif
1249 #define ENTQC       0x9c              /* CAP */
1250 #define ENTCU       0x9d              /* CAP User */
1251 #define ENTMM       0x9e              /* Mobility Management at VLR */
1252 #define ENTGA       0x9f              /* BSSAP+ */
1253 #define ENTGE       0xa0              /* GMM Application at SGSN */
1254 #define ENTSV       0xa1              /* SIP Application */ 
1255 #define ENTMW       0xa2              /* M2UA */
1256 #define ENTNW       0xa3              /* M2UA-NIF */
1257 #define ENTDI       0xa4              /* ISUP-LDF */
1258 #define ENTMK       0xa5              /* 3GPP-MAC */
1259 #define ENTRR       0xa6              /* 3GPP-RRC */
1260 #define ENTIB       0xa7              /* 3GPP-NBAP */
1261 #define ENTPH       0xa8              /* 3GPP-PH */
1262 #define ENTII       ENTSM             /* ISM */
1263 #define ENTUL       0xa9              /* 3GPP-NBAP User - Dummy */
1264 #define ENTGD       0xaa              /* RM Application at SGSN */
1265 #define ENTGX       0xab              /* SM-APPL Application at SGSN */
1266 #define ENTDG       0xac              /* LDF-GCP */
1267
1268 #define ENTXX       0xad              /* 3GPP-RRC User */
1269 #define ENTPD       0xae              /* 3GPP-PDCP */
1270 #define ENTUS       0xaf              /* 3GPP-USIM */
1271 #define ENTBM       0xb0              /* 3GPP-BMC */
1272
1273 #define ENTLA       0xb1              /* MPLS User */
1274 #define ENTLT       0xb2              /* MPLS Resource Manager */
1275 #define ENTRD       0xb3              /* RNSAP user         */
1276
1277 #define ENTGF       0xb4              /* GMM SS User */
1278 #define ENTDV       0xb5              /* LDF-M3UA */
1279 #define ENTCS       0xb6              /* SIP Compression module */
1280 #define ENTFP       0xb7              /* FP Layer    */
1281 #define ENTDU       0xb8              /* NodeB IWF Dummy */
1282 #define ENTFU       0xb9              /* FP Control User */
1283 #define ENTVU       0xba              /* End Driver */
1284 /* Nuera PS Changes - M1UA Entry */
1285 #define ENTMZ       0xbb              /* M1UA*/
1286 /* M2PA changes */
1287 #define ENTMX       0xbc              /* M2PA */
1288
1289 #define ENTD3       0xbd              /* DPNSS/DASS2 L3 */ 
1290 #define ENTD2       0xbe              /* DPNSS/DASS2 L3 */
1291
1292 #define ENTNDD3     0xbf              /* NIF for DUA */
1293
1294 #define ENTRP       0xc0              /* LDF - RANAP */
1295 #define ENTDK       0xc1              /* LDF - RANAP */
1296 #define ENTTM       0xc2              /* TOM entity  Patch ssi_h_001.main_115 */
1297 #define ENTSPU      0xc3              /* Generic SCCPU User */
1298 #define ENTGC       0xc4              /* Phy Layer */ 
1299 #define ENTLM       0xc5              /* LAPDm */
1300
1301 /**MAC-HS ssi_h_001.main_120 */
1302 #define ENTHS       0xc6              /* MAC-HS */
1303 #define ENTCH       0xc7             /*MAC-HS Control Part*/ 
1304 #define ENTUH       0xc8             /*MAC-HS User Part*/ 
1305 /**ssi_h_001.main_122: Added Diameter and Diameter User entities */
1306 #define ENTAQ       0xc9             /* Diameter Base Protocol */ 
1307 #define ENTAB       0xca             /* Diameter User */ 
1308
1309 /* ssi_h_001.main_124: Added LDF-SUA & PSF-SUA User entities */
1310 #define ENTAH       0xcb             /* LDF-SUA */ 
1311 #define ENTAE       0xcc             /* PSF-SUA */ 
1312
1313 /* ssi_h_001.main_125 : for RRC */
1314 #define ENTRX       0xcd             /* RRC User */
1315 /* ssi_h_001.main_128: Entity for FAP is added */
1316 /*ssi_h_001.main_149 warning removal*/
1317 #ifndef OP_IU
1318 #define ENTPP       ENTSM             /* FAP behaves as User and SM */  
1319 #endif
1320 /*-- ssi_h_001.main_129 --*/
1321 #define ENTLX       0xce             /* IuUP --*/
1322
1323 /*ssi_h_001.main_145-defined new IuUP user*/
1324 #ifndef OP_IU
1325 #define ENTXU       0xcf             /* IuUP user --*/
1326 #else
1327 /* Map ENTXU to ENTPP */
1328 #define ENTXU       ENTPP             /* IuUP user --*/
1329 #endif
1330 /* ssi_h_001.main_148: Fixed compiler warning */
1331 /*#define ENTXU       0xcf */            /* IuUP user --*/
1332
1333 /* ssi_h_001.main_130 - Entity for DNRC MAC user added */
1334 #define ENTXY       0xd0             /* App/Relay on DRNC MAC */
1335
1336 /* ssi_h_001.main_132 Entity added for S1AP and S1AP user */
1337 #define ENTSZ       0xd1             /* S1AP */
1338 #define ENTUZ       0xd2             /* S1AP User */
1339 /* ssi_h_001.main_134 : Adtion for eGTP protocol */
1340 #define ENTEG       0xd3            /*  EGTP Layer */
1341 #ifndef INTEL_WLS_MEM
1342 #define ENTPHYSTUB  0xd4
1343 #else
1344 #define ENTEU       0xd4            /* EGTP USER */
1345 #endif
1346 /* ssi_h_001.main_135 : addition of LTE related entities */
1347 #define ENTLWRMAC       0xd5             /* LTE-PHY */
1348 #define ENTMAC       0xd6             /* LTE-MAC */
1349 #define ENTRLC       0xd7             /* LTE-RLC */
1350 #define ENTPJ       0xd8             /* LTE-PDCP */
1351 #define ENTNH       0xd9             /* LTE-RRC */
1352
1353 /* ssi_h_001.main_137 : addition of LTE-X2AP related entities */
1354 /* ssi_h_001.main_138 : rearrange entity list */
1355 #define ENTNX       0xda             /* LTE-RRC user */
1356 #define ENTCZ       0xdb             /* LTE-X2AP User */
1357 #define ENTRS       0xdc             /* LTE-X2AP */
1358
1359 /* ssi_h_001.main_139 : addition of Iuh layer entries */
1360 #define ENTHM       0xdd             /* Iuh */
1361 #define ENTHX       0xde             /* Iuh-HNBAP User */
1362
1363 /* ssi_h_001.main_140 : addition of ENTVE Macro  */
1364 #define ENTVE       0xdf             /* For eNodeB Application */
1365 #define ENTWR       0xe3             /* For WR eNodeB Application */
1366
1367 /* ssi_h_001.main_141 : addition of PDCP layer off-board entries */
1368 #define ENTOS       0xe0             /* Off-board Security */
1369 #define ENTOC       0xe1             /* Off-board Compression */
1370
1371 #define ENTPX       0xe2             /* LTE PDCP Data User */
1372
1373 #ifdef SS_FAP
1374 /* ssi_h_001.main_128: Entity for FAP is added */
1375 /*ssi_h_001.main_145-FAP specific aditions*/
1376 /* ssi_h_001.main_148: Entity for LTE convergence layer is added */
1377 /* ssi_h_001.main_149 changed for warnings*/
1378 #ifdef OP_IU
1379 #define ENTPP       0xe3
1380 #endif
1381 #endif
1382
1383 /* ssi_h_001.main_148: Entity for LTE convergence layer is added */
1384 #define ENTYS       0xe4             /* LTE PDCP Data User */
1385 /* ssi_h_001.main_150: Entity for LTE MME application layer is added */
1386 #define ENTVB       0xe5             /* Lte-CNE */
1387 #ifdef WR_DG_OAM
1388 #define ENTOAMSOCK  0xe6
1389 #define ENTOAMSTAT  0xe7
1390 #define ENTNL       0xe8             /* LTE SON Feature*/    
1391 #define ENTLAST     ENTNL            /* last entity id */
1392 #else /* WR_DG_OAM */
1393 /* ssi_h_001.main_152: Entity for SIGTRAN,IuPS,IuCS and LTES1 monitoring stack added */
1394 #define ENTVN       0xe6             /*SIGTRAN Trillium Integrated Monitoring Stack*/
1395 #define ENTQZ       0xe7             /*Iu-PS Trillium Integrated Monitoring Stack*/
1396 #define ENTAX       0xe8             /*Iu-CS Trillium Integrated Monitoring Stack*/
1397 #define ENTQB       0xe9             /*LTE-S1 Trillium Integrated Monitoring Stack*/
1398 #define ENTNL       0xea             /* LTE SON Feature */
1399
1400 #define ENTLAST     ENTNL            /* last entity id */
1401 #endif /* WR_DG_OAM */
1402
1403 #ifdef ODU
1404 #define ENTDUAPP    0xeb             /* ORAN DU APP */
1405 #define ENTSCTP     0xec             /* ORAN SCTP */
1406 #define ENTF1AP     0xed             /* ORAN F1AP */
1407 #define ENTEGTP     0xee             /* ORAN EGTP */
1408 #endif //ORAN
1409 /* un-configured procId */ 
1410 #ifdef SS_MULTIPLE_PROCS
1411 #define PROCNC      0xFFFF            /* Processor not configured */
1412 #endif /* SS_MULTIPLE_PROCS */
1413
1414 #define ENTNC       0xFF              /* Entity not configured */
1415
1416 /* instance for mos header */
1417
1418 #define INSTNC      0xFF              /* Instance not configured */
1419
1420 /* service user id */
1421 #define SUIDNC      0xFFFF            /* service user id not configured */
1422
1423 /* service provider id */
1424 #define SPIDNC      0xFFFF            /* service provider id not configured */
1425
1426 /* region id for mos header */
1427 #define REGIONNC    0xFF              /* region not configured */
1428
1429 /* pool id for mos header */
1430 #define POOLNC      0xFF              /* pool not configured */
1431
1432 \f
1433 /* event code for task to task header */
1434
1435 #define EVTNONE         0x00             /* None */
1436
1437 #define EVTPERM         0x01             /* Permanent */
1438 #define EVT_TIMEOUT     0x02             /* Timeout */
1439
1440 #define EVTBNDREQ       0x04             /* Bind request */
1441 /* #define EVTBNDCFM    0x05              Bind confirm */
1442 /* #define EVTBNDIND    0x06              Bind indication */
1443 /* #define EVTBNDRSP    0x07              Bind response */
1444   
1445 #define EVTUBNDREQ      0x08             /* Unbind request */
1446 /* #define EVTUBNDCFM   0x09              Unbind confirm */
1447 /* #define EVTUBNDIND   0x0A              Unbind indication */
1448 /* #define EVTUBNDRSP   0x0B              Unbind response */
1449   
1450 #define EVTCONREQ       0x0C             /* Connect request */
1451 #define EVTCONCFM       0x0D             /* Connect confirm */
1452 #define EVTCONIND       0x0E             /* Connect indication */
1453 #define EVTCONRSP       0x0F             /* Connect response */
1454   
1455 #define EVTDISCREQ      0x10             /* Disconnect request */
1456 #define EVTDISCCFM      0x11             /* Disconnect confirm */
1457 #define EVTDISCIND      0x12             /* Disconnect indication */
1458 #define EVTDISCRSP      0x13             /* Disconnect response */
1459
1460 #define EVTDATREQ       0x14             /* Data request */
1461 #define EVTDATCFM       0x15             /* Data confirm */
1462 #define EVTDATIND       0x16             /* Data indication */
1463 #define EVTDATRSP       0x17             /* Data response */
1464   
1465 #define EVTUDATREQ      0x18             /* Unit data request */
1466 #define EVTUDATCFM      0x19             /* Unit data confirm */
1467 #define EVTUDATIND      0x1A             /* Unit data indication */
1468 #define EVTUDATRSP      0x1B             /* Unit data response */
1469   
1470 #define EVTEDATREQ      0x1C             /* Expedited data request */
1471 #define EVTEDATCFM      0x1D             /* Expedited data confirm */
1472 #define EVTEDATIND      0x1E             /* Expedited data indication */
1473 #define EVTEDATRSP      0x1F             /* Expedited data response */
1474   
1475 #define EVTDATCHRREQ    0x20             /* Data character request */
1476 #define EVTDATCHRCFM    0x21             /* Data character confirm */
1477 #define EVTDATCHRIND    0x22             /* Data character indication */
1478 #define EVTDATCHRRSP    0x23             /* Data character response */
1479   
1480 #define EVTDATACKREQ    0x24             /* Data acknowledge request */
1481 #define EVTDATACKCFM    0x25             /* Data acknowledge confirm */
1482 #define EVTDATACKIND    0x26             /* Data acknowledge indication */
1483 #define EVTDATACKRSP    0x27             /* Data acknowledge response */
1484   
1485 #define EVTFLCREQ       0x28             /* Flow control request */
1486 /* #define EVTFLCCFM    0x29              Flow control confirm */
1487 #define EVTFLCIND       0x2A             /* Flow control indication */
1488 /* #define EVTFLCRSP    0x2B              Flow control response */
1489                      
1490 #define EVTRSTREQ       0x2C             /* Reset request */
1491 #define EVTRSTCFM       0x2D             /* Reset confirmation */
1492 #define EVTRSTIND       0x2E             /* Reset indication */
1493 #define EVTRSTRSP       0x2F             /* Reset response */
1494   
1495 #define EVTCFGXXREQ     0x30             /* Configuration request */
1496 /* #define EVTCFGXXCFM  0x31              Configuration confirmation */
1497 /* #define EVTCFGXXIND  0x32              Configuration indication */
1498 /* #define EVTCFGXXRSP  0x33              Configuration response */
1499    
1500 #define EVTRESMREQ      0x34             /* Call resume request */
1501 /* #define EVTRESCFM    0x35              Call resume confirm */
1502 #define EVTRESMIND      0x36             /* Call resume indication */
1503 /* #define EVTRESRSP    0x37              Call resume response */
1504
1505 #define EVTSUSPREQ      0x38             /* Call suspend request */
1506 /* #define EVTSUSPCFM   0x39              Call suspend confirm */
1507 #define EVTSUSPIND      0x3A             /* Call suspend indication */
1508 /* #define EVTSUSPRSP   0x3B              Call suspend response */
1509
1510 #define EVTCFGREQ       0x3C             /* Configuration request */
1511 #define EVTCFGCFM       0x3D             /* Configuration confirmation */
1512 #define EVTCFGIND       0x3E             /* Configuration indication */
1513 /* #define EVTCFGXXRSP  0x3F              Configuration response */
1514
1515 #define EVTSTAREQ       0x40             /* Status request */
1516 #define EVTSTACFM       0x41             /* Status confirm */
1517 #define EVTSTAIND       0x42             /* Status indication */
1518 /* #define EVTSTARSP    0x43              Status response */
1519
1520 #define EVTSTSREQ       0x44             /* Statistics request */
1521 #define EVTSTSCFM       0x45             /* Statistics confirm */
1522 /* #define EVTSTSIND    0x46              Statistics indication */
1523 /* #define EVTSTSRSP    0x47              Statistics response */
1524
1525 #define EVTTRCIND       0x48             /* Trace indication */
1526 /* #define EVTTRCCFM    0x49              Trace confirm */
1527 /* #define EVTTRCIND    0x4A              Trace indication */
1528 /* #define EVTTRCRSP    0x4B              Trace response */
1529
1530 #define EVTCNTRLREQ     0x4C             /* Control request */
1531 #define EVTCNTRLCFM     0x4D             /* Control confirm */
1532 #define EVTCNTRLIND     0x4E             /* Control indication */
1533 #define EVTCNTRLRSP     0x4F             /* Control response */
1534    
1535 #define EVTXIDREQ       0x50             /* Exchange id request */
1536 #define EVTXIDCFM       0x51             /* Exchange id confirm */
1537 #define EVTXIDIND       0x52             /* Exchange id indication */
1538 #define EVTXIDRSP       0x53             /* Exchange id response */
1539
1540 #define EVTACNTREQ      0x54             /* Accounting request */
1541 /* #define EVTACNTCFM   0x55              Accounting confirm */
1542 #define EVTACNTIND      0x56             /* Accounting indication */
1543 /* #define EVTACNTRSP   0x57              Accounting response */
1544
1545 #define EVTCNSTREQ      0x58             /* Connection progress status request */
1546 /* #define EVTCNSTCFM   0x59              Connection progress status confirm */
1547 #define EVTCNSTIND      0x5A             /* Connection progress status indication */
1548 /* #define EVTCNSTRSP   0x5B              Connection progress status response */
1549
1550 #define EVTRELREQ       0x5C             /* Connection release request */
1551 #define EVTRELCFM       0x5D             /* Connection release confirmation */
1552 #define EVTRELIND       0x5E             /* Connection release indication */
1553 #define EVTRELRSP       0x5F             /* Connection release response */
1554
1555 #define EVTSSHLREQ      0x60             /* Connection suspend and hold request */
1556 #define EVTSSHLCFM      0x61             /* COnnection suspend and hold confirmation */
1557 #define EVTSSHLIND      0x62             /* COnnection suspend and hold indication */
1558 #define EVTSSHLRSP      0x63             /* Connection suspend and hold response */
1559
1560 #define EVTRMRTREQ      0x64             /* Call resume/retrieve request */
1561 #define EVTRMRTCFM      0x65             /* Call resume/retrieve confirmation */
1562 #define EVTRMRTIND      0x66             /* Call resume/retrieve indication */
1563 #define EVTRMRTRSP      0x67             /* Call resume/retrieve response */
1564
1565 #define EVTFACREQ       0x68             /* Call facility request */
1566 #define EVTFACCFM       0x69             /* Call facility confirm */
1567 #define EVTFACIND       0x6A             /* Call facility indication */
1568 #define EVTFACRSP       0x6B             /* Call facility response */
1569
1570 #define EVTSTAENQREQ    0x6C             /* Status enquiry request */
1571 #define EVTSTAENQCFM    0x6D             /* Status enquiry confirmation */
1572 #define EVTSTAENQIND    0x6E             /* Status enquiry indication */
1573 #define EVTSTAENQRSP    0x6F             /* Status enquiry response */
1574
1575 #define EVTSRVREQ       0x70             /* Service request */
1576 #define EVTSRVCFM       0x71             /* Service confirmation */
1577 #define EVTSRVIND       0x72             /* Service indication */
1578 /* #define EVTSRVRSP    0x73              Service response */
1579
1580 /* #define EVTALRTREQ   0x74              Alert request */
1581 /* #define EVTALRTCFM   0x75              Alert confirmation */
1582 #define EVTALRTIND      0x76             /* Alert indication */
1583 /* #define EVTALRTRSP   0x77              Alert response */
1584
1585 #define EVTSTAXXREQ     0x78             /* Status request */
1586 #define EVTSTAXXCFM     0x79             /* Status confirm */
1587 #define EVTSTAXXIND     0x7A             /* Status indication */
1588 /* #define EVTSTAXXRSP  0x7B              Status response */
1589
1590 #define EVTLMUDATREQ    0x7C             /* LM - unit data request */
1591 /* #define EVTLMUDATCFM 0x7D              LM - unit data confirm */
1592 #define EVTLMUDATIND    0x7E             /* LM - unit data indication */
1593 /* #define EVTLMUDATRSP 0x7F              LM - unit data response */
1594   
1595 #define EVTADDREQ       0x80             /* Add request */
1596 #define EVTADDCFM       0x81             /* Add confirm */
1597 #define EVTADDIND       0x82             /* Add indication */
1598 #define EVTADDRSP       0x83             /* Add response */
1599   
1600 #define EVTREMREQ       0x84             /* Remove request */
1601 #define EVTREMCFM       0x85             /* Remove confirm */
1602 #define EVTREMIND       0x86             /* Remove indication */
1603 /* #define EVTREMRSP    0x87              Remove response */
1604   
1605 #define EVTSYNREQ       0x88             /* Synchronize request */
1606 #define EVTSYNCFM       0x89             /* Synchronize confirm */
1607 #define EVTSYNIND       0x8A             /* Synchronize indication */
1608 /* #define EVTSYNRSP    0x8B              Synchronize response */
1609   
1610 #define EVTEXAMREQ      0x8C             /* Examine request */
1611 #define EVTEXAMCFM      0x8D             /* Examine confirm */
1612 /* #define EVTEXAMIND   0x8E              Examine indication */
1613 /* #define EVTEXAMRSP   0x8F              Examine response */
1614
1615 #define EVTADDPTYREQ    0x90             /* Add Party Request */
1616 #define EVTADDPTYCFM    0x91             /* Add Party Confirm */
1617 #define EVTADDPTYIND    0x92             /* Add Party Indication */
1618 #define EVTADDPTYRSP    0x93             /* Add Party Response */
1619
1620 #define EVTADDPTYREJREQ 0x94             /* Add Party Reject Request */
1621 #define EVTADDPTYREJCFM 0x95             /* Add Party Reject Confirm */
1622 #define EVTADDPTYREJIND 0x96             /* Add Party Reject Indication */
1623 #define EVTADDPTYREJRSP 0x97             /* Add Party Reject Response */
1624
1625 #define EVTDROPPTYREQ   0x98             /* Drop Party Request */
1626 #define EVTDROPPTYCFM   0x99             /* Drop Party Confirm */
1627 #define EVTDROPPTYIND   0x9A             /* Drop Party Indication */
1628 #define EVTDROPPTYRSP   0x9B             /* Drop Party Response */
1629
1630 #define EVTNEXTREQ      0x9C             /* Next request */
1631 #define EVTNEXTCFM      0x9D             /* Next confirm */
1632 #define EVTNEXTIND      0x9E             /* Next indication */
1633 /* #define EVTNEXTRSP   0x9F              Next response */
1634
1635 /* #define EVTERRREQ    0xA0              Error request */
1636 /* #define EVTERRCFM    0xA1              Error confirm */
1637 #define EVTERRIND       0xA2             /* Error indication */
1638 #define EVTERRRSP       0xA3             /* Error response */
1639
1640 #define EVT_BNDREQ      0xA4             /* Bind request */
1641 /* #define EVT_BNDCFM   0xA5              Bind confirm */
1642 /* #define EVT_BNDIND   0xA6              Bind indication */
1643 /* #define EVT_BNDRSP   0xA7              Bind response */
1644   
1645 #define EVT_UBNDREQ     0xA8             /* Unbind request */
1646 /* #define EVT_UBNDCFM  0xA9              Unbind confirm */
1647 /* #define EVT_UBNDIND  0xAA              Unbind indication */
1648 /* #define EVT_UBNDRSP  0xAB              Unbind response */
1649
1650 #define EVT_DATREQ      0xAC             /* Data request */
1651 #define EVT_DATCFM      0xAD             /* Data confirm */
1652 #define EVT_DATIND      0xAE             /* Data indication */
1653 #define EVT_DATRSP      0xAF             /* Data response */
1654   
1655 #define EVT_UDATREQ     0xB0             /* Unit data request */
1656 #define EVT_UDATCFM     0xB1             /* Unit data confirm */
1657 #define EVT_UDATIND     0xB2             /* Unit data indication */
1658 #define EVT_UDATRSP     0xB3             /* Unit data response */
1659   
1660 #define EVTESTREQ       0xB4             /* Establish request */
1661 #define EVTESTCFM       0xB5             /* Establish confirm */
1662 #define EVTESTIND       0xB6             /* Establish indication */
1663 #define EVTESTRSP       0xB7             /* Establish response */
1664
1665 #define EVTMODREQ       0xC0             /* Modify request */
1666 #define EVTMODCFM       0xC1             /* Modify confirm */
1667 #define EVTMODIND       0xC2             /* Modify indication */
1668 #define EVTMODRSP       0xC3             /* Modify response */
1669
1670 #define EVTTSKDOWNREQ    0xF0            /* Task shutdown request */
1671 #define EVTTSKDOWNCFM    0xF1            /* Task shutdown confirm */
1672 /* #define EVTTSKDOWNIND 0xF2             Task shutdown indication */
1673 /* #define EVTTSKDOWNRSP 0xF3             Task shutdown response */
1674
1675 #define EVTTSKUPREQ     0xF4             /* Task startup request */
1676 #define EVTTSKUPCFM     0xF5             /* Task startup confirm */
1677 /* #define EVTTSKUPIND  0xF6              Task startup indication */
1678 /* #define EVTTSKUPRSP  0xF7              Task startup response */
1679
1680 #define EVTCRDREQ       0xF8             /* SCCP mgmt - Coordinated Request */
1681 #define EVTCRDCFM       0xF9             /* SCCP mgmt - Coordinated Confirm */
1682 #define EVTCRDIND       0xFA             /* SCCP mgmt - Coordinated Indication */
1683 #define EVTCRDRSP       0xFB             /* SCCP mgmt - Coordinated Response */
1684
1685 #define EVTSTEREQ       0xFC             /* SCCP mgmt - State Request  */
1686 #define EVTSTEIND       0xFD             /* SCCP mgmt - State Indication */
1687 #define EVTPCSTEIND     0xFE             /* SCCP mgmt - PC-State Indication */
1688
1689 #define EVTSHIFT        0xFF             /* Shift to new event code set */
1690
1691 \f
1692 /*
1693    This section contains specific defines for the following operating systems:
1694  
1695    MOS      - MOSVER
1696    MOS, v2  - MSVER2
1697    psos     - PS
1698    vrtxsa   - VX
1699    vxworks  - VW
1700    Windows NT  - WINNT_IATM
1701    sslib    - system service library for elvis
1702    other    - 
1703
1704    The defines PORTVER, MOSVER and MSVER2 are mutually exclusive. The define PORTVER
1705    must be set in conjunction with the define PS, VX, VW or portable/other.
1706
1707 */
1708  
1709 \f
1710 #ifdef MOSVER                     /* mos version */
1711 /* mos defines */
1712
1713
1714 #else
1715 #ifdef MSVER2                     /* mos version 2 */
1716 /* mos version 2 defines */
1717 #define DFLT_REGION 0
1718 #define DFLT_POOL 0
1719
1720 #ifdef SS_FAP
1721 /*ssi_h_001.main_145- Defined new region for FAP*/
1722 #define SS_WL_REGION 1
1723 #endif
1724
1725 #define OWNREGION DFLT_REGION     /* own region */ 
1726
1727 #else
1728 #ifdef PS                         /* psos version */
1729 /* psos defines */
1730 #define DFLT_REGION 0
1731 #define DFLT_POOL 0
1732
1733 #ifdef SS_FAP
1734 /*ssi_h_001.main_145 - Defined new region for FAP*/
1735 #define SS_WL_REGION 1
1736 #endif
1737
1738 #define OWNREGION DFLT_REGION     /* own region */ 
1739
1740 #else
1741 #ifdef VX                         /* vrtxsa version */
1742 /* vrtxsa defines */
1743 #define DFLT_REGION 0
1744 #define DFLT_POOL 0
1745
1746 #ifdef SS_FAP
1747 /*ssi_h_001.main_145 - Defined new region for FAP*/
1748 #define SS_WL_REGION 1
1749 #endif
1750
1751 #define OWNREGION DFLT_REGION     /* own region */ 
1752
1753 /* events */
1754
1755 #define EVTTMRTCKREQ  0x80        /* Timer Tick request */
1756
1757 /* return codes */
1758
1759 #define VX_RET_OK     0x00        /* good return value */
1760 #define VX_ER_IIP     0x12        /* input parameter error */
1761 #define VX_ER_NOCB    0x30        /* no control block error */
1762 #define VX_ER_NMB     0x04        /* not a memory block error */
1763 #define VX_ER_ID      0x31        /* ID error */
1764 #define VX_ER_MEM     0x03        /* no memory error */
1765 #define VX_ER_PID     0x0E        /* partition id error */
1766 #define VX_ER_QID     0x0C        /* queue id error */
1767 #define VX_ER_QFL     0x0D        /* queue full error */
1768
1769 #else
1770 #ifdef VW                         /* vxworks version */
1771
1772 /* vxworks defines */
1773 #define VW_MBUF_POOL 3            /* message header pool id */
1774 #define VW_TMR_POOL  2            /* timer pool id */
1775 #define VW_WRAP_POOL 1            /* wrapper pool id */
1776 #define VW_PROT_POOL 0            /* protocol pool id */
1777
1778 #define DFLT_REGION 0
1779 #define DFLT_POOL VW_PROT_POOL    /* protocol data pool */
1780
1781 #ifdef SS_FAP
1782 /*ssi_h_001.main_145 - Defined new region for FAP*/
1783 #define SS_WL_REGION 1
1784 #endif
1785
1786 #define OWNREGION DFLT_REGION     /* own region */ 
1787
1788 #else                             
1789 #if (  defined(SSLIB) || defined(SSRYLIB) )
1790 #define DFLT_REGION 0
1791 #define DFLT_POOL 0
1792 #ifdef SS_FAP
1793 /*ssi_h_001.main_145 - Defined new region for FAP*/
1794 #define SS_WL_REGION 1
1795 #endif
1796
1797 #define MAXBUFSIZ 2048 
1798 #define STARTOFFSET 1024
1799 #else                             /* portable/other version */
1800 #ifdef SS                         /* Common System Services */
1801
1802 /* CTL operation codes */
1803 #define SS_MEM_V_TO_P           1
1804 #define SS_MEM_CHK_RES          2
1805
1806 #define DFLT_REGION       0
1807 #define DFLT_POOL         0
1808 #ifdef SS_FAP
1809 /*ssi_h_001.main_145 - Defined new region for FAP*/
1810 #define SS_WL_REGION 1
1811 #endif
1812
1813 #define OWNREGION         DFLT_REGION     /* own region */ 
1814
1815 /* basic lock types */
1816 #define SS_LOCK_MUTEX                   1
1817 #define SS_LOCK_SPIN                    2
1818 #define SS_LOCK_CRITSEC                 3
1819
1820 #ifdef SS_OLD_THREAD
1821 /* flags for SGetThread() */
1822 #define SS_THR_NOFLAGS   0x00
1823 #define SS_THR_SUSPENDED 0x01
1824 #define SS_THR_DETACHED  0x02
1825 #define SS_THR_BOUND     0x04
1826 #define SS_THR_NEW_LWP   0x08
1827 #define SS_THR_DAEMON    0x10
1828 #endif /* SS_OLD_THREAD */
1829
1830 /* Queue Macros */
1831 #ifdef SS_ENABLE_MACROS
1832 #define SQueueFirst(mBuf, q) \
1833      SAddQueue(mBuf, (q), 0)
1834
1835 #define SDequeueFirst(mBuf, q) \
1836      SRemQueue(mBuf, (q), 0)
1837
1838 #define SQueueLast(mBuf, q) \
1839      ((q) == NULLP ? RFAILED : SAddQueue(mBuf, (q), ((Queue *)(q))->crntSize))
1840
1841 #define SDequeueLast(mBuf, q) \
1842      ((q) == NULLP ? RFAILED :                          \
1843       (((Queue *)(q))->crntSize == 0 ? ROKDNA : SRemQueue(mBuf, q, \
1844                                                (((Queue *)q))->crntSize-1)))
1845
1846 /*
1847  * this depends on region and pool being the first two
1848  * parameters of ssMsgInfo
1849  */
1850
1851 #define SGetBufRegionPool(buf, region, pool)   \
1852         (((buf) == NULLP ||                                     \
1853           ((region) == NULLP && (pool) == NULLP)) ? RFAILED :   \
1854          ((region) == NULLP ||                                  \
1855           (*(region) = ((Region)*((Region *)((buf)->b_rptr))))),\
1856          ((pool) == NULLP   ||                                  \
1857           (*(pool) = ((Pool)*((Pool *)((buf)->b_rptr + sizeof(Region)))))),\
1858          ROK)
1859
1860 #endif /* SS_ENABLE_MACROS */
1861
1862 /* These are outside SS_ENABLE_MACROS for backward compatibility 
1863  *
1864  * redefine these to be different from default
1865  * these depend on region and pool being the first two
1866  * parameters of ssMsgInfo
1867  */
1868
1869 #undef SGETBUFREGION
1870 #define SGETBUFREGION(buf)   \
1871          (((buf) == NULLP) ? REGIONNC : (Region)*((Region *)(buf)->b_rptr))
1872
1873 #undef SGETBUFPOOL
1874 #define SGETBUFPOOL(buf)     \
1875          (((buf) == NULLP) ? POOLNC :  \
1876                            (Pool)*((Pool *)((buf)->b_rptr + sizeof(Region))))
1877
1878 /*ssi_h_001.main_147 ss_dep.h guarded under flag*/
1879 #ifdef SS_CAVIUM
1880 #include "jz_dep.h"
1881 #else
1882 #ifdef SS_4GMX_LCORE
1883 #include "ss_dep.h"
1884 #else
1885 #include "ss_dep.h"
1886 #endif /* SS_4GMX_LCORE*/
1887 #endif /*SS_CAVIUM*/
1888
1889 #else   /* Not SS */
1890 #ifdef MT                         /* mt version */
1891
1892 /* mtworks defines */
1893 #define MT_MBUF_POOL 3            /* message header pool id */
1894 #define MT_TMR_POOL  2            /* timer pool id */
1895 #define MT_WRAP_POOL 1            /* wrapper pool id */
1896 #define MT_PROT_POOL 0            /* protocol pool id */
1897
1898 #define DFLT_REGION 0
1899 #define DFLT_POOL MT_PROT_POOL    /* protocol data pool */
1900
1901 #define OWNREGION DFLT_REGION     /* own region (bc, use DFLT_REGION) */ 
1902
1903 /* thread types */
1904 #define MT_THR_NOFLAGS   0x00
1905 #define MT_THR_SUSPENDED 0x01
1906 #define MT_THR_DETACHED  0x02
1907 #define MT_THR_BOUND     0x04
1908 #define MT_THR_NEW_LWP   0x08
1909 #define MT_THR_DAEMON    0x10
1910
1911 /* thread priorities */
1912 #define MT_LOW_PRI          0
1913 #define MT_NORM_PRI         10
1914 #define MT_HIGH_PRI         20
1915
1916 #else /* not MT */
1917 #ifdef WINNT_IATM
1918 /* WINT defines */
1919 #define DFLT_REGION 0
1920 #define DFLT_POOL 0
1921 #ifdef SS_FAP
1922 /*ssi_h_001.main_145 - Defined new region for FAP*/
1923 #define SS_WL_REGION 1
1924 #endif
1925
1926 #define PHY_CONTIG_REGION 1
1927
1928 #define OWNREGION DFLT_REGION     /* own region */ 
1929 #else /* WINNT_IATM */
1930 /* portable/other defines */
1931 #define DFLT_REGION 0             /* required by portable */
1932 #define DFLT_POOL 0               /* required by portable */
1933 #ifdef SS_FAP
1934 /*ssi_h_001.main_145 - Defined new region for FAP*/
1935 #define SS_WL_REGION 1
1936 #endif
1937 #define OWNREGION DFLT_REGION     /* own region */ 
1938
1939 /* lock data types */
1940 #define SsSemaId                        uint8_t
1941 #define SLockId                         uint8_t
1942 /* ssi_h_001.main_143: Additions */
1943 #define SLockInfo                       uint8_t
1944
1945 /* basic lock types */
1946 #define SS_LOCK_MUTEX                   1
1947 #define SS_LOCK_SPIN                    2
1948 #define SS_LOCK_CRITSEC                 3
1949
1950 #endif /* WINNT_IATM */
1951 #endif /* MT */
1952 #endif /* SS */
1953 #endif /* SSLIB || SSRYLIB*/
1954 #endif /* VW */
1955 #endif /* VX */
1956 #endif /* PS */
1957 #endif /* MSVER2 */
1958 #endif /* MOSVER */
1959
1960 /* Macros for REGION1 and REGION2 support */
1961 #define SS_REGION1              1
1962 #define SS_REGION2              2
1963
1964 /* Time in seconds from UTC EPOCH */
1965 #define SS_REFTIME_01_01_1970   0
1966 #define SS_REFTIME_01_01_2002   1009843200
1967
1968 /* Ticks per second */
1969 #define SS_100MS                         10
1970 #define SS_10MS                          100
1971 #define SS_1MS                           1000
1972
1973 /*ssi_h_001.main_145-definednew value for SS_TICS_SEC for FAP*/
1974 #ifndef SS_FAP
1975 #ifndef SS_TICKS_SEC
1976 /* ssi_h_001.main_152: Modified SS_TICKS_SEC value for 4GMX */
1977 #ifdef SS_4GMX_LCORE
1978 #define SS_TICKS_SEC                     SS_1MS
1979 #else
1980 #define SS_TICKS_SEC                     SS_100MS
1981 #endif /*SS_4GMX_LCORE*/
1982 #endif
1983 #else
1984 #ifndef SS_TICKS_SEC
1985 #define SS_TICKS_SEC                     SS_1MS
1986 #endif
1987 #endif
1988
1989 /* procId added */ 
1990 /* ssi_h_001.main_127 Replaced SS_100MS with SS_TICKS_SEC in SRegCfgTmr/SDeregCfgTmr */
1991 #ifndef SS_MULTIPLE_PROCS
1992
1993 /* ssi_h_001.main_146 */
1994 #ifndef SS_FAP
1995 #define SRegTmr(ent,inst,period,fun)     SRegCfgTmr(ent,inst,period,SS_TICKS_SEC,fun)
1996 #define SDeregTmr(ent,inst,period,fun)   SDeregCfgTmr(ent,inst,period,SS_TICKS_SEC,fun)
1997 #else /* SS_FAP */
1998 #define SRegTmr(ent,inst,period,fun)     SRegCfgTmr(ent,inst,period,SS_10MS,fun)
1999 #define SDeregTmr(ent,inst,period,fun)   SDeregCfgTmr(ent,inst,period,SS_10MS,fun)
2000 #endif 
2001
2002 /* ssi_h_001.main_131 */
2003 #ifdef SS_MT_TMR
2004 /* ssi_h_001.main_126 */
2005 #define SRegTmrMt(ent,inst,period,fun)     SRegCfgTmrMt(ent,inst,period,SS_TICKS_SEC,fun)
2006 #define SDeregTmrMt(ent,inst,period,fun)   SDeregCfgTmrMt(ent,inst,period,SS_TICKS_SEC,fun)
2007 #endif
2008
2009 #else
2010
2011 /* ssi_h_001.main_146 */
2012 #ifndef SS_FAP
2013 #define SRegTmr(proc, ent,inst,period,fun)\
2014         SRegCfgTmr(proc, ent,inst,period,SS_TICKS_SEC,fun)
2015 #define SDeregTmr(proc, ent,inst,period,fun)\
2016         SDeregCfgTmr(proc, ent,inst,period,SS_TICKS_SEC,fun)
2017 #else /* SS_FAP */
2018 #define SRegTmr(proc, ent,inst,period,fun)\
2019         SRegCfgTmr(proc, ent,inst,period,SS_100MS,fun)
2020 #define SDeregTmr(proc, ent,inst,period,fun)\
2021         SDeregCfgTmr(proc, ent,inst,period,SS_100MS,fun)
2022 #endif
2023
2024 #endif /* SS_MULTIPLE_PROCS */
2025
2026 /* RELAY ONLY DEFINES */
2027 #ifdef ENB_RELAY
2028
2029 #define RY_SHM_KEY   0x3000
2030 #define RY_SHM_PERMS 0666
2031
2032 #define RY_MSG_KEY   0x2000
2033 #define RY_MSG_PERMS 0666
2034
2035 #define RY_BASECHANID 0
2036
2037 #ifdef INTNT_PMC860
2038
2039 /* 
2040  * Processor Id map for the Integrated Windows NT platform 
2041  *
2042  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2043  * |A A A A S S S R R I I I I I I I| 
2044  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2045  *
2046  * A - Application Id
2047  * S - Stack Id
2048  * R - Reserved
2049  * I - IPM Id
2050  *
2051  */
2052
2053 /* processor id masks */
2054 #define APP_MSK 0xf
2055 #define STK_MSK 0x7
2056 #define BUS_MSK 0x0
2057 #define VCM_MSK 0x0
2058 #define IPM_MSK 0x7f
2059 #define BVM_MSK 0x0
2060
2061 /* processor id  offsets */
2062 #define APP_OFF 12
2063 #define STK_OFF 9
2064 #define BUS_OFF 0
2065 #define VCM_OFF 0
2066 #define IPM_OFF 0
2067 #define BVM_OFF 0
2068 #else
2069 /* processor id masks */
2070 #define APP_MSK 0xf
2071 #define STK_MSK 0x7
2072 #define BUS_MSK 0x3
2073 #define VCM_MSK 0xf
2074 #define IPM_MSK 0x7
2075 #define BVM_MSK 0x3f
2076
2077 /* processor id  offsets */
2078 #define APP_OFF 12
2079 #define STK_OFF 9
2080 #define BUS_OFF 7
2081 #define VCM_OFF 3
2082 #define IPM_OFF 0
2083 #define BVM_OFF 3
2084 #endif /* INTNT_PMC860 */
2085
2086 /* set processor id macros */
2087 #define PID_APP(a)          ((a) << APP_OFF)
2088 #define PID_STK(h)          ((h) << STK_OFF)
2089 #define PID_B_V(b, v)       (((b) << BUS_OFF) | ((v) << VCM_OFF))
2090 #define PID_BV(bv)          ((bv) << BVM_OFF)
2091 #define PID_B_V_I(b, v, i)  (((b) << BUS_OFF) | ((v) << VCM_OFF) | (i) )
2092 #define PID_BV_I(bv, i)     (((bv) << BVM_OFF) | (i))
2093
2094 /* get processor id macros */
2095 #define GET_APP_ID(pid)   (((pid) & (APP_MSK << APP_OFF)) >> APP_OFF)
2096 #define GET_STK_ID(pid)   (((pid) & (STK_MSK << STK_OFF)) >> STK_OFF)
2097 #define GET_BUS_ID(pid)   (((pid) & (BUS_MSK << BUS_OFF)) >> BUS_OFF)
2098 #define GET_VCM_ID(pid)   (((pid) & (VCM_MSK << VCM_OFF)) >> VCM_OFF)
2099 #define GET_IPM_ID(pid)   ((pid) & IPM_MSK)
2100 #define GET_BV_ID(pid)    (((pid) & (BVM_MSK << BVM_OFF)) >> BVM_OFF)
2101
2102 #ifdef ELVIS_IMP
2103 #define MAXBRDS 16         /* 16 MVME's */
2104 #endif /* ELVIS_IMP */
2105
2106 #ifdef ELVIS_BIT3
2107 #define MAXBRDS 64         /* 16*4 MVME's */
2108 #endif /* ELVIS_BIT3 */
2109
2110 #ifdef ELVIS_FORCE
2111 #define MAXBRDS 16         /* 16 MVME's or Power Core's */
2112 #endif /* ELVIS_FORCE */
2113
2114 #ifdef ELVIS_68040
2115 #define MAXBRDS  4         /* 4 IPM's */
2116 #endif /* ELVIS_68040 */
2117
2118 #ifdef ELVIS_PPC60X
2119 #define MAXBRDS 2          /* 2 PMCS's Maximum */
2120 #endif /* ELVIS_PPC60X */
2121
2122 #ifdef INTNT_PMC860
2123 #define MAXBRDS 64         /* Maximum number of PMCS in system */
2124 #endif /* ELVIS_PPC60X */
2125
2126 #else /* not ENB_RELAY */
2127 #define PID_STK(h)        (h)
2128 #endif /* ENB_RELAY */
2129
2130 /* Inter CPU messages */
2131 #define SS_ICPU_DATA       6
2132 /*ssi_h_001.main_133*/
2133 /*ssi_h_001.main_151 ADDED SS_AFFINITY_SUPPORT*/
2134 #if defined(SS_MULTICORE_SUPPORT) || defined(SS_AFFINITY_SUPPORT)
2135 /* CPU affinity modes */
2136 #define SS_AFFINITY_MODE_DEFAULT 0
2137 #define SS_AFFINITY_MODE_SPECIFIC 1
2138 #define SS_AFFINITY_MODE_ASSOC 2
2139 #define SS_AFFINITY_MODE_EXCL 3
2140
2141 #define SS_MAX_CORES 64
2142 #define SS_MAX_THREADS_PER_CORE 16
2143 #define SS_DEFAULT_CORE ~0
2144
2145 #endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT*/
2146
2147 /* ssi_h_001.main_136: SSI-Phse-2, Added defines for memory 
2148  * allocation/de-allocation from static memory pool 
2149  */
2150 #ifdef SS_HISTOGRAM_SUPPORT 
2151 #define SGetSBuf(region, pool, bufPtr, size) SGetSBufNew(region,pool,bufPtr,size, __LINE__, (uint8_t*)__FILE__)
2152 #define SPutSBuf(region, pool, buf, size) SPutSBufNew(region, pool, buf, size, __LINE__, (uint8_t*)__FILE__)
2153 #define SGetMsg(region, pool, mBufPtr) SGetMsgNew(region, pool, mBufPtr, __LINE__,  (uint8_t*)__FILE__)
2154 #define SPutMsg(mBuf) SPutMsgNew(mBuf, __LINE__,  (uint8_t*)__FILE__)
2155 #elif defined(SS_LIGHT_MEM_LEAK_STS)
2156 #define SGetSBuf(region, pool, bufPtr, size) SGetSBufNew(region,pool,bufPtr,size, __LINE__, (uint8_t*)__func__)
2157 #define SGetMsg(region, pool, mBufPtr) SGetMsgNew(region, pool, mBufPtr, __LINE__, (uint8_t*)__func__)
2158 #define SGetDBuf(region, pool, bufPtr) SGetDBufNew(region,pool,bufPtr, __LINE__, (uint8_t*)__func__)
2159 #define SPutSBuf(region, pool, buf, size) SPutSBufNew(region, pool, buf, size, __LINE__, (uint8_t *)__func__)
2160 #define SPutMsg(mBuf) SPutMsgNew(mBuf, __LINE__,  (uint8_t*)__func__)
2161 #define SPutDBuf(region, pool, buf) SPutDBufNew(region, pool, buf, __LINE__, (uint8_t*)__func__)
2162 #endif /* SS_HISTOGRAM_SUPPORT */
2163 /* ssi_h_001.main_142 Readwrite additions */
2164 /* ssi_h_001.main_144 Readwrite locks Guarded */
2165 #ifdef SS_RDWR_LOCK_SUPPORT
2166 #define SRDWRLOCK 1
2167 #define SRDLOCK 2
2168 #define SWRLOCK 3
2169 #define STRYRDLOCK 4
2170 #define STRYWRLOCK 5
2171 #endif /* SS_RDWR_LOCK_SUPPORT */
2172 #ifdef SS_REC_LOCK_SUPPORT
2173 #define SMUTEXRECUR 6
2174 #endif /* SS_REC_LOCK_SUPPORT */
2175
2176 /* The below range from 30001 - 30099 is for 4GMX SSI and common */
2177 #ifndef TENB_T2K3K_SPECIFIC_CHANGES
2178 #define PID_SVSRALLOC_ICMSG           30001
2179 #define PID_SVSRSEND_ICMSG            30002
2180 #define PID_SVSRALLOC_MSG             30003
2181 #define PID_SSI_CORE3                 30004
2182 #define PID_SSI_CORE2                 30005
2183 #define PID_SSI_ICORE_MSG             30006
2184 #define PID_SSI_ICPU_MSG              30007
2185 #else
2186 #define PID_SSI_TSK_L2                30005
2187 #define PID_PHY_RCVR_THRD             30005
2188 #define PID_SSI_TSK                   30007
2189 #define PID_HI_TSK                   30331
2190 #define PID_SB_TSK                   30332
2191 #define PID_WR_TSK                   30333
2192 #define PID_S1_TSK                   30334
2193 #define PID_EG_TSK                   30335
2194 #define PID_SVSRALLOC_MSG             30003
2195 #endif /* TENB_T2K3K_SPECIFIC_CHANGES */
2196 /* The below range from 30101 - 30199 is for CL */
2197 #define PID_CRC_IND_DUMMY             30101
2198 #define PID_CRC_IND_REAL              30102
2199 #define PID_CL_CNTRL_REQ_DL           30103
2200 #define PID_CL_DAT_REQ                30104
2201 #define PID_CL_RECP_REQ               30105
2202 #define PID_CL_SEND_TO_PHY            30106
2203 #define PID_CL_RXEND_IND              30107
2204 #define PID_CL_PHY_MSG                30108
2205 #define PID_CL_RXSDU_IND              30109
2206 #define PID_CL_RXSDUANDEND_IND        30110
2207 #define PID_CL_FILL_DLCHNL_DESC       30111
2208 #define PID_CL_FILL_TXSDU             30112
2209 #define PID_CL_SND_VECT_TO_PHY        30113
2210 #define PID_CL_PHICH_DAT_REQ          30114
2211 #define PID_CL_PDCCH_DAT_REQ          30115
2212 #define PID_CL_PDSCH_DAT_REQ          30116
2213 #define PID_CL_PBCH_DAT_REQ           30117
2214 #define PID_CL_MAC_TTI_IND            30118
2215 #define PID_CL_CNTRL_REQ_UL           30119
2216 #define PID_CL_SPACC_BATCH_UL_BLK     30120
2217 #define PID_CL_SPACC_BATCH_DL_BLK     30121
2218
2219
2220
2221
2222 /* The below range from 30200 - 30299 is for MAC/RLC/PDCP */
2223 #define PID_SCH_TTI_IND               30200
2224 #define PID_MAC_DAT_IND               30201
2225 #define PID_MAC_SF_ALLOC_REQ          30202
2226 #define PID_MAC_STA_RSP               30203
2227 #define PID_MAC_DL_SCHD               30204
2228 #define PID_MAC_DL_CQI_IND            30205
2229 #define PID_MAC_UL_CQI_IND            30206
2230 #define PID_MAC_SR_IND                30207
2231 #define PID_MAC_HARQ_IND              30208
2232 #define PID_MAC_TA_IND                30209
2233 #define PID_MAC_UL_SCHD               30210
2234 #define PID_MAC_TTI_IND               30211
2235 #define PID_MAC_UE_CFG                30212
2236 #define PID_MAC_UE_RECFG              30213
2237 #define PID_MAC_UE_DEL                30214
2238 #define PID_MAC_UE_RST                30215
2239 #define PID_SCH_UE_CFG                30216
2240 #define PID_SCH_UE_RECFG              30217
2241 #define PID_SCH_UE_DEL                30218
2242 #define PID_SCH_UE_RST                30219
2243 #define PID_MAC_DDATREQ               30220
2244 #define PID_MAC_FILLDREQ              30221
2245 #define PID_MAC_TFUDREQ               30222
2246 #define PID_SCHUTL_CMALLCEVT          30223
2247 #define PID_TOMUTL_CMALLCEVT          30224
2248 #define PID_TOMINF_CMALLCEVT          30225
2249 #define PID_MACUTL_CMALLCEVT          30226
2250 #define PID_SCH_DUMMY_TTI_IND         30227
2251 #define PID_MAC_TFU_DATIND            30228
2252 #define PID_UL_SCHEDULING             30229  /* UL scheduling: CRC indication */
2253 #define PID_ysMsPrcUlSchSduInd        30230
2254 #define PID_CL_RCV_PHY_MSG            30231
2255 #define PID_CL_HARQ_STA_IND           30232 
2256 #define PID_CL_DL_BATCH_PROC          30233
2257 #define PID_CL_DLM_PRC_TTI_IND        30234
2258 #define PID_TTI_LATENCY               30235
2259 #define PID_RECPREQ_PROC              30236
2260 #define PID_MAC_UL_SRS_IND            30237
2261
2262 #define PID_RLC_STA_IND               30240
2263 #define PID_RLC_REASSEMBLY            30241
2264 #define PID_RLC_AM_SELF_PST_DL        30242
2265 #define PID_RLC_AM_PDU_RLS            30243
2266 #define PID_RLC_CHK_SDU_MAP           30244
2267 #define PID_RLC_SND_DAT_CFM           30245
2268 #define PID_RLC_AM_SELF_PDU_RSMBL     30246
2269 #define PID_RLC_AM_RGU_DATIND         30247
2270 #define PID_RLC_AM_ADDTOLIST_UL       30248
2271 #define PID_RLC_AM_FREEBUF            30249
2272 #define PID_RLC_AM_RETXLIST           30250
2273 #define PID_RLC_AM_POST_ULSELFMSG     30251
2274 #define PID_RLC_AM_UTL_RSMBL          30252
2275 #define PID_RLC_AM_STA_PDU            30253
2276 #define PID_RLC_CFG_REQ               30254
2277 #define PID_RLC_CFG_REQ_REEST         30255
2278 #define PID_RLC_CFG_REQ_REM           30256
2279 #define PID_RLC_AM_RLSPDUSET          30257
2280 #define PID_RLC_AM_RB_DELETE          30258
2281 #define PID_RLC_AM_REEST              30259
2282 #define PID_RLC_CFG_UE_DELETE         30260
2283 #ifndef BRDCM
2284 #define PID_RLC_STA_IND_MEMSET        30261
2285 #define PID_RLC_STA_IND_PRC           30262
2286 #define PID_RLC_KWUDAT_IND            30263
2287 #endif
2288 #define PID_RLC_UM_REEST              30264
2289 #define PID_RLC_AM_RLC_UE_DEL         30260
2290 #define PID_RLC_AM_QSDU               30261
2291 #define PID_RLC_TM_CSTAIND_SUCCESS    30265
2292 #define PID_RLC_TM_CSTAIND_FAIL       30266
2293 #define PID_RLC_TM_SEARCH_RNTI        30267
2294 #define PID_RLC_TM_QSDU               30268
2295
2296 /* UL IP THROUGHPUT PROFILING */
2297 #define PID_RLC_IP_TPT_INCTTI         30269
2298 #define PID_RLC_IP_TPT_INCVOL         30270
2299 #define PID_RLC_MEAS_REPORT           30271
2300 #define PID_RLC_MEAS_START            30272
2301 #define PID_RLC_MEAS_STOP             30273
2302 /* Discard SDU Profiling */
2303 #define PID_RLC_AMM_REASSEMBLE_SDUS   30274
2304 #define PID_RLC_AMM_DISC_SDUS         30275
2305 #define PID_RLC_UMM_REASSEMBLE_SDUS   30276
2306 #define PID_RLC_UMM_DISC_SDUS         30277
2307
2308 /* DL IP THROUGHPUT PROFILING */
2309 #define PID_RLC_DLIP_TPT_BURSTCALC    30278
2310 #define PID_RLC_DLIP_TPT_PRCHARQIND   30279
2311
2312 #define PID_MT_AM_SVSR_HDLR           30008
2313 #define PID_MT_AM_SVS_MSG             30009
2314 #define PID_MAC_AM_HARQ_RLS           30010
2315 #define PID_PDCP_DL_PKT               30280
2316 #define PID_PDCP_DAT_IND              30281
2317 #define PID_PDCP_CFG_REQ              30282
2318 #define PID_PDCP_CFG_REQ_REEST        30283
2319 #define PID_PDCP_CFG_REQ_REM          30284
2320 #define PID_PDCP_CFG_UE_DELETE        30285
2321
2322 #define PID_CM_PRC_TMR                30286
2323
2324 /* The below range is for detailed analysis of common functions */
2325 #define PID_SAddPstMsgMult    30600
2326 #define PID_SAddPreMsgMult    30601
2327 #define PID_SRemPreMsgMult    30602
2328 #define PID_SRemPstMsgMult    30603
2329 #define PID_SGetDataFrmMsg    30604
2330 #define PID_SSegMsg           30605
2331 #define PID_SCpyFixMsg        30607
2332 #define PID_SCpyMsgFix        30608
2333 #define PID_SCpyMsgMsg        30610
2334 #define PID_SAddMsgRef        30609
2335 #define PID_SCatMsg           30611
2336 #define PID_SCompressMsg      30612
2337 #define PID_SGetPstMsgMult    30613
2338 #define PID_SSwapMsg          30614
2339 #define PID_SCpyPartMsg       30615
2340 #define PID_SRepPartMsg       30616
2341 #define PID_SPkMsgMult        30617
2342 #define PID_SMovPartMsg       30618
2343
2344 #define PID_L2_PROCESSING     30998  /* Processing for all L2 tasks on CPU3 */
2345
2346 /* This captures all the processing invoked through PHY */
2347 #define PID_PHY_RCV_PROC              30999
2348
2349 #ifdef MSPD
2350 #ifdef SS_4GMX_LCORE
2351 #define RB_GET_CALLER() (__return_address()-4)
2352 #define RB_GET_SP() (__current_sp())
2353 #define RB_TRC() rbCallstackPush(RB_GET_CALLER(), RB_GET_SP())
2354 #define RB_TRC_RET()  rbCallstackPop();
2355 #endif
2356
2357 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
2358 #ifndef XEON_SPECIFIC_CHANGES
2359 #include "tl.h"
2360 #else
2361 #include "mlog_com.h"
2362 #endif
2363
2364 #define RESOURCE_LINL2 RESOURCE_L2
2365 #define RESOURCE_LARM  RESOURCE_L2
2366 #ifndef XEON_SPECIFIC_CHANGES
2367 #define GetTIMETICK()  TL_MLOG_TICK
2368 #else
2369 #define GetTIMETICK() 0
2370 #endif
2371 #ifdef PHY_SHUTDOWN_ENABLE
2372 #define stop_printf(...) do {uint8_t sndPhyShutDwn;printf(__VA_ARGS__); mtStopHndlr(); sndPhyShutDwn = 1;} while (0)
2373 #else
2374 #define stop_printf(...) do {printf(__VA_ARGS__); mtStopHndlr(); exit(-1);} while (0)
2375 #endif
2376 #define uart_printf(...) printf(__VA_ARGS__)
2377 #ifdef XEON_SPECIFIC_CHANGES
2378 #define MLogTask(a, b, c, d)  tlMlogTask(a, c, d)
2379 #else
2380 #define MLogTask  tlMlogTask
2381 #endif
2382 #define MLogAddVariables(a, b, c)
2383 #define rbCallstackShow()
2384 #define Ad9361RadioInit(a,b,c,d) 0
2385
2386 #ifndef CA_PHY
2387 #define SS_MLOG_BUF_SIZE        1591328 
2388 #else
2389 #define SS_MLOG_BUF_SIZE        7175200 
2390 #endif
2391 #define SS_MEMLOG_MAXSTRLEN     256
2392
2393 #ifdef MS_MUBUF_CORRUPTION /* Should be enabled when debugging mbuf corruption */
2394 #define MS_BUF_ADD_CALLER()\
2395 {\
2396    uint32_t cmFreeCaller[4];\
2397    if(cmFreeCaller[MxGetCpuID()] == NULLP)\
2398       cmFreeCaller[MxGetCpuID()] = __return_address()-4;\
2399 }
2400 #endif /* */
2401 #endif
2402 #endif/* MSPD */
2403
2404 #ifdef BRDCM
2405 char logBuf[100];
2406 int  glbTime;
2407 #define BRDCM_PROF(s) do {\
2408 } while(0) 
2409
2410 #define PID_CRC_IND_START                   3000
2411 #define PID_CRC_IND_END                     3001
2412 #define PID_CL_CNTRL_REQ_START              3002
2413 #define PID_CL_CNTRL_REQ_END                3003
2414 #define PID_CL_DAT_REQ_START                3004
2415 #define PID_CL_DAT_REQ_END                  3005
2416 #define PID_CL_RECP_REQ_START               3006
2417 #define PID_CL_RECP_REQ_END                 3007
2418 #define PID_CL_SEND_TO_PHY_START            3008
2419 #define PID_CL_SEND_TO_PHY_END              3009
2420 #define PID_CL_RXSDU_IND_START              3010
2421 #define PID_CL_RXSDU_IND_END                3011
2422 #define PID_MAC_TTI_IND_START               3400
2423 #define PID_MAC_TTI_IND_END                 3401
2424 #define PID_SCH_TTI_IND_START               3402
2425 #define PID_SCH_TTI_IND_END                 3403
2426 #define PID_MAC_DAT_IND_START               3404
2427 #define PID_MAC_DAT_IND_END                 3405
2428 #define PID_MAC_SF_ALLOC_REQ_START          3406
2429 #define PID_MAC_SF_ALLOC_REQ_END            3407
2430 #define PID_MAC_STA_RSP_START               3408
2431 #define PID_MAC_STA_RSP_END                 3409
2432 #define PID_MAC_CMN_STA_RSP_START           3410
2433 #define PID_MAC_CMN_STA_RSP_END             3411
2434 #define PID_MAC_DL_SCHD_START               3412
2435 #define PID_MAC_DL_SCHD_END                 3413
2436 #define PID_MAC_DL_CQI_IND            30205
2437 #define PID_MAC_UL_CQI_IND            30206
2438 #define PID_MAC_SR_IND                30207
2439 #define PID_MAC_HARQ_IND              30208
2440 #define PID_MAC_TA_IND                30209
2441 #define PID_MAC_UL_SCHD               30210
2442 #define PID_MAC_TTI_IND               30211
2443 #define PID_MAC_UE_CFG                30212
2444 #define PID_MAC_UE_RECFG              30213
2445 #define PID_MAC_UE_DEL                30214
2446 #define PID_MAC_UE_RST                30215
2447 #define PID_SCH_UE_CFG                30216
2448 #define PID_SCH_UE_RECFG              30217
2449 #define PID_SCH_UE_DEL                30218
2450 #define PID_SCH_UE_RST                30219
2451 #define PID_MAC_DDATREQ               30220
2452 #define PID_MAC_FILLDREQ              30221
2453 #define PID_MAC_TFUDREQ               30222
2454 #define PID_SCHUTL_CMALLCEVT          30223
2455 #define PID_TOMUTL_CMALLCEVT          30224
2456 #define PID_TOMINF_CMALLCEVT          30225
2457 #define PID_MACUTL_CMALLCEVT          30226
2458 #define PID_SCH_DUMMY_TTI_IND         30227
2459 #define PID_MAC_TFU_DATIND            30228
2460 #define PID_RLC_STA_IND               30240
2461 #define PID_RLC_REASSEMBLY            30241
2462 #define PID_RLC_AM_SELF_PST_DL        30242
2463 #define PID_RLC_AM_PDU_RLS            30243
2464 #define PID_RLC_CHK_SDU_MAP           30244
2465 #define PID_RLC_SND_DAT_CFM           30245
2466 #define PID_RLC_AM_SELF_PDU_RSMBL     30246
2467 #define PID_RLC_AM_RGU_DATIND         30247
2468 #define PID_RLC_AM_ADDTOLIST_UL       30248
2469 #define PID_RLC_AM_FREEBUF            30249
2470 #define PID_RLC_AM_RETXLIST           30250
2471 #define PID_RLC_AM_POST_ULSELFMSG     30251
2472 #define PID_RLC_AM_UTL_RSMBL          30252
2473 #define PID_RLC_AM_STA_PDU            30253
2474 #define PID_RLC_CFG_REQ               30254
2475 #define PID_RLC_CFG_REQ_REEST         30255
2476 #define PID_RLC_CFG_REQ_REM           30256
2477 #define PID_RLC_AM_RLSPDUSET          30257
2478 #define PID_RLC_AM_RLSPDUSET_DATA     30258
2479 #define PID_RLC_AM_RLSPDUSET_REEST    30259
2480 #define PID_RLC_AM_RLC_UE_DEL         30260
2481 #define PID_RLC_AM_QSDU               30261
2482 #define PID_MT_AM_SVSR_HDLR           30008
2483 #define PID_MT_AM_SVS_MSG             30009
2484 #define PID_MAC_AM_HARQ_RLS           30010
2485 #define PID_RLC_KWUDAT_IND            30012
2486 #define PID_RLC_STA_IND_MEMSET        30014
2487 #define PID_RLC_STA_IND_PRC           30015
2488 #define PID_PDCP_DL_PKT               30280
2489 #define PID_PDCP_DAT_IND              30281
2490 #define PID_PDCP_CFG_REQ              30282
2491 #define PID_PDCP_CFG_REQ_REEST        30283
2492 #define PID_PDCP_CFG_REQ_REM          30284
2493 #define PID_SAddPstMsgMult    30600
2494 #define PID_SAddPreMsgMult    30601
2495 #define PID_SRemPreMsgMult    30602
2496 #define PID_SRemPstMsgMult    30603
2497 #define PID_SGetDataFrmMsg    30604
2498 #define PID_SSegMsg           30605
2499 #define PID_SCpyFixMsg        30607
2500 #define PID_SCpyMsgFix        30608
2501 #define PID_SCpyMsgMsg        30610
2502 #define PID_SAddMsgRef        30609
2503 #define PID_SCatMsg           30611
2504 #define PID_SCompressMsg      30612
2505 #define PID_SGetPstMsgMult    30613
2506 #define PID_SSwapMsg          30614
2507 #define PID_SCpyPartMsg       30615
2508 #define PID_SRepPartMsg       30616
2509 #define PID_SPkMsgMult        30617
2510 #define PID_SMovPartMsg       30618
2511 #define PID_cmUnpkHitUDatInd_START           3300
2512 #define PID_cmUnpkHitUDatInd_END             3301
2513 #define PID_cmPkPjuDatReq_START              3310
2514 #define PID_cmPkPjuDatReq_END                3311
2515 #endif /* BRDCM */
2516 #endif /* __SSIH__ */
2517 /* ssi_h_001.main_120 */
2518 \f
2519 /********************************************************************30**
2520   
2521          End of file
2522 **********************************************************************/