• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 // ----------------------------------------------------------------------
19 //
20 // This Software is an original work of authorship of PacketVideo Corporation.
21 // Portions of the Software were developed in collaboration with NTT  DoCoMo,
22 // Inc. or were derived from the public domain or materials licensed from
23 // third parties.  Title and ownership, including all intellectual property
24 // rights in and to the Software shall remain with PacketVideo Corporation
25 // and NTT DoCoMo, Inc.
26 //
27 // -----------------------------------------------------------------------
28 /************************************************************************/
29 /*  file name       : selc.c                                            */
30 /*  file contents   : Uni-Directional Logical Channel Signalling Entity */
31 /*                  :                                        Management */
32 /*  draw            : '96.11.25                                         */
33 /*----------------------------------------------------------------------*/
34 /*  amendment       :                                                   */
35 /*                          Copyright (C) 1996 NTT DoCoMo               */
36 /************************************************************************/
37 
38 
39 /************************************************************************/
40 /*  Headerfile Include                                                  */
41 /************************************************************************/
42 #include "h245inf.h"
43 #include "lcentry.h"
44 #include "msd.h"
45 #include "lc.h"
46 
47 /************************************************************************/
48 /*  function name       : Se_Lc_0200_0000                               */
49 /*  function outline    : Event     ESTABLISH.request                   */
50 /*                      :                           ( Uni-Directional ) */
51 /*                      : Status    Outgoing Released                   */
52 /*  function discription: Se_Lc_0200_0000( PS_LCB_ENTRY ,               */
53 /*                      :                      PS_ForwardReverseParam ) */
54 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
55 /*                      : PS_ForwardReverseParam p_ForwardReverseParam  */
56 /*  output data         : None                                          */
57 /*  draw time           : '96.11.01                                     */
58 /*----------------------------------------------------------------------*/
59 /*  amendent career     :                                               */
60 /*                                                                      */
61 /*                          Copyright (C) 1996 NTT DoCoMo               */
62 /************************************************************************/
_0200_0000(LCEntry * p_LcbEntry,PS_ForwardReverseParam p_ForwardReverseParam)63 void LC::_0200_0000(LCEntry *p_LcbEntry , PS_ForwardReverseParam p_ForwardReverseParam)
64 {
65     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
66     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_AWTING_ETBMNT) ;
67     MsgOpenSend((uint16) forwardLcn, p_ForwardReverseParam) ;
68     T103TimerStart(forwardLcn, p_LcbEntry->TmrSqcNumberInc()) ;
69 }
70 
71 
72 /************************************************************************/
73 /*  function name       : Se_Lc_0200_0030                               */
74 /*  function outline    : Event     ESTABLISH.request                   */
75 /*                      :                           ( Uni-Directional ) */
76 /*                      : Status    Outgoing Awaiting Release           */
77 /*  function discription: Se_Lc_0200_0030( PS_LCB_ENTRY ,               */
78 /*                      :                      PS_ForwardReverseParam ) */
79 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
80 /*                      : PS_ForwardReverseParam p_ForwardReverseParam  */
81 /*  output data         : None                                          */
82 /*  draw time           : '96.11.01                                     */
83 /*----------------------------------------------------------------------*/
84 /*  amendent career     :                                               */
85 /*                                                                      */
86 /*                          Copyright (C) 1996 NTT DoCoMo               */
87 /************************************************************************/
_0200_0030(LCEntry * p_LcbEntry,PS_ForwardReverseParam p_ForwardReverseParam)88 void LC::_0200_0030(LCEntry *p_LcbEntry , PS_ForwardReverseParam p_ForwardReverseParam)
89 {
90     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
91     T103TimerStop(forwardLcn) ;
92     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_AWTING_ETBMNT) ;
93     MsgOpenSend((uint16) forwardLcn, p_ForwardReverseParam) ;
94     T103TimerStart(forwardLcn, p_LcbEntry->TmrSqcNumberInc()) ;
95 }
96 
97 
98 /************************************************************************/
99 /*  function name       : Se_Lc_0201_0010                               */
100 /*  function outline    : Event     OpenLogicalChannel                  */
101 /*                      :                           ( Uni-Directional ) */
102 /*                      : Status    Outgoing Awaiting Establishment     */
103 /*  function discription: Se_Lc_0201_0010( PS_LCB_ENTRY ,               */
104 /*                      :                       PS_OpenLogicalChannel ) */
105 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
106 /*                      : PS_OpenLogicalChannel p_OpenLogicalChannel    */
107 /*  output data         : None                                          */
108 /*  draw time           : '96.11.01                                     */
109 /*----------------------------------------------------------------------*/
110 /*  amendent career     :                                               */
111 /*                                                                      */
112 /*                          Copyright (C) 1996 NTT DoCoMo               */
113 /************************************************************************/
_0201_0010(LCEntry * p_LcbEntry,PS_OpenLogicalChannel p_OpenLogicalChannel)114 void LC::_0201_0010(LCEntry *p_LcbEntry , PS_OpenLogicalChannel p_OpenLogicalChannel)
115 {
116     if (MyMSD->GetStatus() != MSD_MASTER)
117     {
118         uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
119         T103TimerStop(forwardLcn) ;
120         p_LcbEntry->StatusWrite(LCBLC_INCOMING_AWTING_ETBMNT) ;
121         PtvEtbIdcSend(forwardLcn , p_OpenLogicalChannel) ;
122     }
123 }
124 
125 
126 /************************************************************************/
127 /*  function name       : Se_Lc_0203_0010                               */
128 /*  function outline    : Event     RELEASE.request                     */
129 /*                      :                           ( Uni-Directional ) */
130 /*                      : Status    Outgoing Awaiting Establishment     */
131 /*  function discription: Se_Lc_0203_0010( PS_LCB_ENTRY ,               */
132 /*                      :                              PS_Cause_LcBlc ) */
133 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
134 /*                      : PS_Cause_LcBlc p_Cause_LcBlc                  */
135 /*  output data         : None                                          */
136 /*  draw time           : '96.11.01                                     */
137 /*----------------------------------------------------------------------*/
138 /*  amendent career     :                                               */
139 /*                                                                      */
140 /*                          Copyright (C) 1996 NTT DoCoMo               */
141 /************************************************************************/
_0203_0010(LCEntry * p_LcbEntry,PS_OlcRejectCause p_Cause_LcBlc)142 void LC::_0203_0010(LCEntry *p_LcbEntry , PS_OlcRejectCause p_Cause_LcBlc)
143 {
144     S_Source    source ;
145 
146     OSCL_UNUSED_ARG(p_Cause_LcBlc);
147 
148     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
149 
150     T103TimerStop(forwardLcn) ;
151 
152     /* NEW245
153     source.select_of_Source = 0 ;
154     source.user = true ;
155     source.lcse = false ;
156     */
157     source.index = 0;
158 
159     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_AWTING_RLS) ;
160     MsgCloseSend((uint16) forwardLcn, &source) ;
161     T103TimerStart(forwardLcn, p_LcbEntry->TmrSqcNumberInc()) ;
162 }
163 
164 
165 /************************************************************************/
166 /*  function name       : Se_Lc_0203_0020                               */
167 /*  function outline    : Event     RELEASE.request                     */
168 /*                      :                           ( Uni-Directional ) */
169 /*                      : Status    Outgoing Established                */
170 /*  function discription: Se_Lc_0203_0020( PS_LCB_ENTRY ,               */
171 /*                      :                              PS_Cause_LcBlc ) */
172 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
173 /*                      : PS_Cause_LcBlc p_Cause_LcBlc                  */
174 /*  output data         : None                                          */
175 /*  draw time           : '96.11.25                                     */
176 /*----------------------------------------------------------------------*/
177 /*  amendent career     :                                               */
178 /*                                                                      */
179 /*                          Copyright (C) 1996 NTT DoCoMo               */
180 /************************************************************************/
_0203_0020(LCEntry * p_LcbEntry,PS_OlcRejectCause p_Cause_LcBlc)181 void LC::_0203_0020(LCEntry *p_LcbEntry , PS_OlcRejectCause p_Cause_LcBlc)
182 {
183     S_Source    source ;
184 
185     OSCL_UNUSED_ARG(p_Cause_LcBlc);
186     /* NEW245
187     source.select_of_Source = 0 ;
188     source.user = true ;
189     source.lcse = false ;
190     */
191     source.index = 0;
192 
193     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
194 
195     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_AWTING_RLS) ;
196     MsgCloseSend((uint16) forwardLcn, &source) ;
197     T103TimerStart(forwardLcn, p_LcbEntry->TmrSqcNumberInc()) ;
198 }
199 
200 
201 /************************************************************************/
202 /*  function name       : Se_Lc_0204_0000                               */
203 /*  function outline    : Event     OpenLogicalChannelAck               */
204 /*                      :                           ( Uni-Directional ) */
205 /*                      : Status    Outgoing Released                   */
206 /*  function discription: Se_Lc_0204_0000( PS_LCB_ENTRY ,               */
207 /*                      :                    PS_OpenLogicalChannelAck ) */
208 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
209 /*                      : PS_OpenLogicalChannelAck                      */
210 /*                      :                       p_OpenLogicalChannelAck */
211 /*  output data         : None                                          */
212 /*  draw time           : '96.11.01                                     */
213 /*----------------------------------------------------------------------*/
214 /*  amendent career     :                                               */
215 /*                                                                      */
216 /*                          Copyright (C) 1996 NTT DoCoMo               */
217 /************************************************************************/
_0204_0000(LCEntry * p_LcbEntry,PS_OpenLogicalChannelAck p_OpenLogicalChannelAck)218 void LC::_0204_0000(LCEntry *p_LcbEntry , PS_OpenLogicalChannelAck p_OpenLogicalChannelAck)
219 {
220     OSCL_UNUSED_ARG(p_OpenLogicalChannelAck);
221     PtvErrIdcSend(p_LcbEntry->FwdLcnRead() , ErrCode_Lc_A) ;
222 }
223 
224 
225 /************************************************************************/
226 /*  function name       : Se_Lc_0204_0010                               */
227 /*  function outline    : Event     OpenLogicalChannelAck               */
228 /*                      :                           ( Uni-Directional ) */
229 /*                      : Status    Outgoing Awaiting Establishment     */
230 /*  function discription: Se_Lc_0204_0010( PS_LCB_ENTRY ,               */
231 /*                      :                    PS_OpenLogicalChannelAck ) */
232 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
233 /*                      : PS_OpenLogicalChannelAck                      */
234 /*                      :                       p_OpenLogicalChannelAck */
235 /*  output data         : None                                          */
236 /*  draw time           : '96.11.01                                     */
237 /*----------------------------------------------------------------------*/
238 /*  amendent career     :                                               */
239 /*                                                                      */
240 /*                          Copyright (C) 1996 NTT DoCoMo               */
241 /************************************************************************/
_0204_0010(LCEntry * p_LcbEntry,PS_OpenLogicalChannelAck p_OpenLogicalChannelAck)242 void LC::_0204_0010(LCEntry *p_LcbEntry , PS_OpenLogicalChannelAck p_OpenLogicalChannelAck)
243 {
244     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
245     T103TimerStop(forwardLcn) ;
246     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_ETBED) ;
247     PtvEtbCfmSend(forwardLcn, p_OpenLogicalChannelAck) ;
248 }
249 
250 
251 /************************************************************************/
252 /*  function name       : Se_Lc_0206_0000                               */
253 /*  function outline    : Event     OpenLogicalChannelReject            */
254 /*                      :                           ( Uni-Directional ) */
255 /*                      : Status    Outgoing Released                   */
256 /*  function discription: Se_Lc_0206_0000( PS_LCB_ENTRY ,               */
257 /*                      :                 PS_OpenLogicalChannelReject ) */
258 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
259 /*                      : PS_OpenLogicalChannelReject                   */
260 /*                      :                    p_OpenLogicalChannelReject */
261 /*  output data         : None                                          */
262 /*  draw time           : '96.11.01                                     */
263 /*----------------------------------------------------------------------*/
264 /*  amendent career     :                                               */
265 /*                                                                      */
266 /*                          Copyright (C) 1996 NTT DoCoMo               */
267 /************************************************************************/
_0206_0000(LCEntry * p_LcbEntry,PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)268 void LC::_0206_0000(LCEntry *p_LcbEntry , PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)
269 {
270     OSCL_UNUSED_ARG(p_OpenLogicalChannelReject);
271     PtvErrIdcSend(p_LcbEntry->FwdLcnRead() , ErrCode_Lc_B) ;
272 }
273 
274 
275 /************************************************************************/
276 /*  function name       : Se_Lc_0206_0010                               */
277 /*  function outline    : Event     OpenLogicalChannelReject            */
278 /*                      :                           ( Uni-Directional ) */
279 /*                      : Status    Outgoing Awaiting Establishment     */
280 /*  function discription: Se_Lc_0206_0010( PS_LCB_ENTRY ,               */
281 /*                      :                 PS_OpenLogicalChannelReject ) */
282 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
283 /*                      : PS_OpenLogicalChannelReject                   */
284 /*                      :                    p_OpenLogicalChannelReject */
285 /*  output data         : None                                          */
286 /*  draw time           : '96.11.01                                     */
287 /*----------------------------------------------------------------------*/
288 /*  amendent career     :                                               */
289 /*                                                                      */
290 /*                          Copyright (C) 1996 NTT DoCoMo               */
291 /************************************************************************/
_0206_0010(LCEntry * p_LcbEntry,PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)292 void LC::_0206_0010(LCEntry *p_LcbEntry , PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)
293 {
294     S_Source    source ;
295 
296     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
297 
298     T103TimerStop(forwardLcn) ;
299 
300     source.index = 0;  /* user */
301 
302     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
303     PtvRlsIdcSend(forwardLcn, &source , &p_OpenLogicalChannelReject->olcRejectCause, S_InfHeader::OUTGOING) ;
304 }
305 
306 
307 /************************************************************************/
308 /*  function name       : Se_Lc_0206_0020                               */
309 /*  function outline    : Event     OpenLogicalChannelReject            */
310 /*                      :                           ( Uni-Directional ) */
311 /*                      : Status    Outgoing Established                */
312 /*  function discription: Se_Lc_0206_0020( PS_LCB_ENTRY ,               */
313 /*                      :                 PS_OpenLogicalChannelReject ) */
314 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
315 /*                      : PS_OpenLogicalChannelReject                   */
316 /*                      :                    p_OpenLogicalChannelReject */
317 /*  output data         : None                                          */
318 /*  draw time           : '96.11.01                                     */
319 /*----------------------------------------------------------------------*/
320 /*  amendent career     :                                               */
321 /*                                                                      */
322 /*                          Copyright (C) 1996 NTT DoCoMo               */
323 /************************************************************************/
_0206_0020(LCEntry * p_LcbEntry,PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)324 void LC::_0206_0020(LCEntry *p_LcbEntry , PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)
325 {
326     S_Source    source ;
327 
328     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
329 
330     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
331 
332     PtvErrIdcSend(forwardLcn, ErrCode_Lc_B) ;
333 
334     /* NEW245
335     source.select_of_Source = 1 ;
336     source.user = false ;
337     source.lcse = true ;
338     */
339     source.index = 1;
340 
341     PtvRlsIdcSend(forwardLcn, &source , &p_OpenLogicalChannelReject->olcRejectCause, S_InfHeader::OUTGOING) ;
342 }
343 
344 
345 /************************************************************************/
346 /*  function name       : Se_Lc_0206_0030                               */
347 /*  function outline    : Event     OpenLogicalChannelReject            */
348 /*                      :                           ( Uni-Directional ) */
349 /*                      : Status    Outgoing Awaiting Release           */
350 /*  function discription: Se_Lc_0206_0030( PS_LCB_ENTRY ,               */
351 /*                      :                 PS_OpenLogicalChannelReject ) */
352 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
353 /*                      : PS_OpenLogicalChannelReject                   */
354 /*                      :                    p_OpenLogicalChannelReject */
355 /*  output data         : None                                          */
356 /*  draw time           : '96.11.01                                     */
357 /*----------------------------------------------------------------------*/
358 /*  amendent career     :                                               */
359 /*                                                                      */
360 /*                          Copyright (C) 1996 NTT DoCoMo               */
361 /************************************************************************/
_0206_0030(LCEntry * p_LcbEntry,PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)362 void LC::_0206_0030(LCEntry *p_LcbEntry , PS_OpenLogicalChannelReject p_OpenLogicalChannelReject)
363 {
364     OSCL_UNUSED_ARG(p_OpenLogicalChannelReject);
365     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
366 
367     T103TimerStop(forwardLcn) ;
368     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
369     PtvRlsCfmSend(forwardLcn) ;
370 }
371 
372 
373 /************************************************************************/
374 /*  function name       : Se_Lc_0207_0010                               */
375 /*  function outline    : Event     Timer T103 Timeout                  */
376 /*                      :                           ( Uni-Directional ) */
377 /*                      : Status    Outgoing Awaiting Establishment     */
378 /*  function discription: Se_Lc_0207_0010( PS_LCB_ENTRY , int32 )         */
379 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
380 /*                      : int32 TmrSqcNumber                              */
381 /*  output data         : None                                          */
382 /*  draw time           : '96.11.11                                     */
383 /*----------------------------------------------------------------------*/
384 /*  amendent career     :                                               */
385 /*                                                                      */
386 /*                          Copyright (C) 1996 NTT DoCoMo               */
387 /************************************************************************/
_0207_0010(LCEntry * p_LcbEntry,int32 TmrSqcNumber)388 void LC::_0207_0010(LCEntry *p_LcbEntry , int32 TmrSqcNumber)
389 {
390     S_Source        source ;
391     S_OlcRejectCause   cause ;
392 
393     if (TmrSqcNumber == p_LcbEntry->TmrSqcNumberRead())
394     {
395         uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
396 
397         p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
398         PtvErrIdcSend(forwardLcn, ErrCode_Lc_D) ;
399 
400         /* NEW245
401         source.select_of_Source = 1 ;
402         source.user = false ;
403         source.lcse = true ;
404         */
405         source.index = 1;
406 
407         MsgCloseSend((uint16) forwardLcn, &source) ;
408 
409         cause.index = 0 ;
410         /* NEW245
411         cause.unspecified = true ;
412         cause.unsuitableReverseParameters = false ;
413         cause.dataTypeNotSupported = false ;
414         cause.dataTypeNotAvailable = false ;
415         cause.unknownDataType = false ;
416         cause.dataTypeALCombinationNotSupported = false ;
417         cause.multicastChanneNotAllowed = false ;
418         cause.insufficientBandwidth = false ;
419         cause.separateStackEstablishmentFailed = false ;
420         cause.invalidSessionID = false ;
421         */
422 
423         PtvRlsIdcSend(forwardLcn, &source , &cause, S_InfHeader::OUTGOING) ;
424     }
425 }
426 
427 
428 /************************************************************************/
429 /*  function name       : Se_Lc_0207_0030                               */
430 /*  function outline    : Event     Timer T103 Timeout                  */
431 /*                      :                           ( Uni-Directional ) */
432 /*                      : Status    Outgoing Awaiting Release           */
433 /*  function discription: Se_Lc_0207_0030( PS_LCB_ENTRY , int32 )         */
434 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
435 /*                      : int32 TmrSqcNumber                              */
436 /*  output data         : None                                          */
437 /*  draw time           : '96.11.11                                     */
438 /*----------------------------------------------------------------------*/
439 /*  amendent career     :                                               */
440 /*                                                                      */
441 /*                          Copyright (C) 1996 NTT DoCoMo               */
442 /************************************************************************/
_0207_0030(LCEntry * p_LcbEntry,int32 TmrSqcNumber)443 void LC::_0207_0030(LCEntry *p_LcbEntry , int32 TmrSqcNumber)
444 {
445     if (TmrSqcNumber == p_LcbEntry->TmrSqcNumberRead())
446     {
447         uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
448         p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
449         PtvErrIdcSend(forwardLcn, ErrCode_Lc_D) ;
450         PtvRlsCfmSend(forwardLcn) ;
451     }
452 }
453 
454 
455 /************************************************************************/
456 /*  function name       : Se_Lc_0209_0020                               */
457 /*  function outline    : Event     CloseLogicalChannelAck              */
458 /*                      :                           ( Uni-Directional ) */
459 /*                      : Status    Outgoing Established                */
460 /*  function discription: Se_Lc_0209_0020( PS_LCB_ENTRY ,               */
461 /*                      :                   PS_CloseLogicalChannelAck ) */
462 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
463 /*                      : PS_CloseLogicalChannelAck                     */
464 /*                      :                      p_CloseLogicalChannelAck */
465 /*  output data         : None                                          */
466 /*  draw time           : '96.11.01                                     */
467 /*----------------------------------------------------------------------*/
468 /*  amendent career     :                                               */
469 /*                                                                      */
470 /*                          Copyright (C) 1996 NTT DoCoMo               */
471 /************************************************************************/
_0209_0020(LCEntry * p_LcbEntry,PS_CloseLogicalChannelAck p_CloseLogicalChannelAck)472 void LC::_0209_0020(LCEntry *p_LcbEntry , PS_CloseLogicalChannelAck p_CloseLogicalChannelAck)
473 {
474     S_Source        source ;
475     S_OlcRejectCause   cause ;
476 
477     OSCL_UNUSED_ARG(p_CloseLogicalChannelAck);
478 
479     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
480 
481     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
482 
483     PtvErrIdcSend(forwardLcn, ErrCode_Lc_C) ;
484 
485     /* NEW245
486     source.select_of_Source = 1 ;
487     source.user = false ;
488     source.lcse = true ;
489     */
490     source.index = 1;
491 
492     cause.index = 0 ;
493     /* NEW245
494     cause.unspecified = true ;
495     cause.unsuitableReverseParameters = false ;
496     cause.dataTypeNotSupported = false ;
497     cause.dataTypeNotAvailable = false ;
498     cause.unknownDataType = false ;
499     cause.dataTypeALCombinationNotSupported = false ;
500     cause.multicastChanneNotAllowed = false ;
501     cause.insufficientBandwidth = false ;
502     cause.separateStackEstablishmentFailed = false ;
503     cause.invalidSessionID = false ;
504     */
505 
506     PtvRlsIdcSend(forwardLcn, &source , &cause, S_InfHeader::OUTGOING) ;
507 }
508 
509 
510 /************************************************************************/
511 /*  function name       : Se_Lc_0209_0030                               */
512 /*  function outline    : Event     CloseLogicalChannelAck              */
513 /*                      :                           ( Uni-Directional ) */
514 /*                      : Status    Outgoing Awaiting Release           */
515 /*  function discription: Se_Lc_0209_0030( PS_LCB_ENTRY ,               */
516 /*                      :                   PS_CloseLogicalChannelAck ) */
517 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
518 /*                      : PS_CloseLogicalChannelAck                     */
519 /*                      :                      p_CloseLogicalChannelAck */
520 /*  output data         : None                                          */
521 /*  draw time           : '96.11.01                                     */
522 /*----------------------------------------------------------------------*/
523 /*  amendent career     :                                               */
524 /*                                                                      */
525 /*                          Copyright (C) 1996 NTT DoCoMo               */
526 /************************************************************************/
_0209_0030(LCEntry * p_LcbEntry,PS_CloseLogicalChannelAck p_CloseLogicalChannelAck)527 void LC::_0209_0030(LCEntry *p_LcbEntry , PS_CloseLogicalChannelAck p_CloseLogicalChannelAck)
528 {
529     OSCL_UNUSED_ARG(p_CloseLogicalChannelAck);
530     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
531     T103TimerStop(forwardLcn) ;
532     p_LcbEntry->StatusWrite(LCBLC_OUTGOING_RLSED) ;
533     PtvRlsCfmSend(forwardLcn) ;
534 }
535 
536 
537 /************************************************************************/
538 /*  function name       : Se_Lc_0201_0001                               */
539 /*  function outline    : Event     OpenLogicalChannel                  */
540 /*                      :                           ( Uni-Directional ) */
541 /*                      : Status    Incoming Released                   */
542 /*                      : Status    Outgoing Released                   */
543 /*  function discription: Se_Lc_0201_0001( PS_LCB_ENTRY ,               */
544 /*                      :                       PS_OpenLogicalChannel ) */
545 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
546 /*                      : PS_OpenLogicalChannel p_OpenLogicalChannel    */
547 /*  output data         : None                                          */
548 /*  draw time           : '96.11.01                                     */
549 /*----------------------------------------------------------------------*/
550 /*  amendent career     :                                               */
551 /*                                                                      */
552 /*                          Copyright (C) 1996 NTT DoCoMo               */
553 /************************************************************************/
_0201_0001(LCEntry * p_LcbEntry,PS_OpenLogicalChannel p_OpenLogicalChannel)554 void LC::_0201_0001(LCEntry *p_LcbEntry , PS_OpenLogicalChannel p_OpenLogicalChannel)
555 {
556     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
557     p_LcbEntry->StatusWrite(LCBLC_INCOMING_AWTING_ETBMNT) ;
558     PtvEtbIdcSend(forwardLcn, p_OpenLogicalChannel) ;
559 }
560 
561 
562 /************************************************************************/
563 /*  function name       : Se_Lc_0201_0011                               */
564 /*  function outline    : Event     OpenLogicalChannel                  */
565 /*                      :                           ( Uni-Directional ) */
566 /*                      : Status    Incoming Awaiting Establishment     */
567 /*                      : Status    Incoming Established                */
568 /*  function discription: Se_Lc_0201_0011( PS_LCB_ENTRY ,               */
569 /*                      :                       PS_OpenLogicalChannel ) */
570 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
571 /*                      : PS_OpenLogicalChannel p_OpenLogicalChannel    */
572 /*  output data         : None                                          */
573 /*  draw time           : '96.11.01                                     */
574 /*----------------------------------------------------------------------*/
575 /*  amendent career     :                                               */
576 /*                                                                      */
577 /*                          Copyright (C) 1996 NTT DoCoMo               */
578 /************************************************************************/
_0201_0011(LCEntry * p_LcbEntry,PS_OpenLogicalChannel p_OpenLogicalChannel)579 void LC::_0201_0011(LCEntry *p_LcbEntry , PS_OpenLogicalChannel p_OpenLogicalChannel)
580 {
581     S_Source        source ;
582     S_OlcRejectCause   cause ;
583 
584     source.index = 0;  /* User */
585 
586     cause.index = 999 ; /* Special cause to indicate received CLC */
587     // Note that the RELEASE.indication generated here is essentially the
588     //   same as if a CLC has been received for the given channel.
589     //   (it's really a new OLC for an existing, established channel, so
590     //    the intent seems to be to close the channel and immediately
591     //    reopen it).
592     // See the notes I made in Se_Lc_0208_0011() for more info.
593     // (This was added 9/29/00, RAN)
594 
595     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
596 
597     p_LcbEntry->StatusWrite(LCBLC_INCOMING_AWTING_ETBMNT) ;
598     PtvRlsIdcSend(forwardLcn, &source , &cause, S_InfHeader::INCOMING) ;
599     PtvEtbIdcSend(forwardLcn, p_OpenLogicalChannel) ;
600 }
601 
602 
603 /************************************************************************/
604 /*  function name       : Se_Lc_0202_0011                               */
605 /*  function outline    : Event     ESTABLISH.response                  */
606 /*                      :                           ( Uni-Directional ) */
607 /*                      : Status    Incoming Awaiting Establishment     */
608 /*  function discription: Se_Lc_0202_0011( PS_LCB_ENTRY ,               */
609 /*                      :                              PS_ReverseData ) */
610 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
611 /*                      : PS_ReverseData p_ReverseData                  */
612 /*  output data         : None                                          */
613 /*  draw time           : '96.11.24                                     */
614 /*----------------------------------------------------------------------*/
615 /*  amendent career     :                                               */
616 /*                                                                      */
617 /*                          Copyright (C) 1996 NTT DoCoMo               */
618 /************************************************************************/
_0202_0011(LCEntry * p_LcbEntry,PS_ReverseData p_ReverseData)619 void LC::_0202_0011(LCEntry *p_LcbEntry , PS_ReverseData p_ReverseData)
620 {
621     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
622     p_LcbEntry->StatusWrite(LCBLC_INCOMING_ETBED) ;
623     MsgOpenAckSend((uint16) forwardLcn, p_ReverseData) ;
624 }
625 
626 
627 /************************************************************************/
628 /*  function name       : Se_Lc_0203_0011                               */
629 /*  function outline    : Event     RELEASE.request                     */
630 /*                      :                           ( Uni-Directional ) */
631 /*                      : Status    Incoming Awaiting Establishment     */
632 /*  function discription: Se_Lc_0203_0011( PS_LCB_ENTRY ,               */
633 /*                      :                              PS_Cause_LcBlc ) */
634 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
635 /*                      : PS_Cause_LcBlc p_Cause_LcBlc                  */
636 /*  output data         : None                                          */
637 /*  draw time           : '96.11.01                                     */
638 /*----------------------------------------------------------------------*/
639 /*  amendent career     :                                               */
640 /*                                                                      */
641 /*                          Copyright (C) 1996 NTT DoCoMo               */
642 /************************************************************************/
_0203_0011(LCEntry * p_LcbEntry,PS_OlcRejectCause p_Cause_LcBlc)643 void LC::_0203_0011(LCEntry *p_LcbEntry , PS_OlcRejectCause p_Cause_LcBlc)
644 {
645     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
646     p_LcbEntry->StatusWrite(LCBLC_INCOMING_RLSED) ;
647     MsgOpenRjtSend((uint16) forwardLcn, p_Cause_LcBlc) ;
648 }
649 
650 
651 /************************************************************************/
652 /*  function name       : Se_Lc_0208_0001                               */
653 /*  function outline    : Event     CloseLogicalChannel                 */
654 /*                      :                           ( Uni-Directional ) */
655 /*                      : Status    Incoming Released                   */
656 /*  function discription: Se_Lc_0208_0001( PS_LCB_ENTRY ,               */
657 /*                      :                      PS_CloseLogicalChannel ) */
658 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
659 /*                      : PS_CloseLogicalChannel p_CloseLogicalChannel  */
660 /*  output data         : None                                          */
661 /*  draw time           : '96.11.01                                     */
662 /*----------------------------------------------------------------------*/
663 /*  amendent career     :                                               */
664 /*                                                                      */
665 /*                          Copyright (C) 1996 NTT DoCoMo               */
666 /************************************************************************/
_0208_0001(LCEntry * p_LcbEntry,PS_CloseLogicalChannel p_CloseLogicalChannel)667 void LC::_0208_0001(LCEntry *p_LcbEntry , PS_CloseLogicalChannel p_CloseLogicalChannel)
668 {
669     OSCL_UNUSED_ARG(p_CloseLogicalChannel);
670     MsgCloseAckSend((uint16) p_LcbEntry->FwdLcnRead()) ;
671 }
672 
673 
674 /************************************************************************/
675 /*  function name       : Se_Lc_0208_0011                               */
676 /*  function outline    : Event     CloseLogicalChannel                 */
677 /*                      :                           ( Uni-Directional ) */
678 /*                      : Status    Incoming Awaiting Establishment     */
679 /*                      : Status    Incoming Established                */
680 /*  function discription: Se_Lc_0208_0011( PS_LCB_ENTRY ,               */
681 /*                      :                      PS_CloseLogicalChannel ) */
682 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
683 /*                      : PS_CloseLogicalChannel p_CloseLogicalChannel  */
684 /*  output data         : None                                          */
685 /*  draw time           : '96.11.01                                     */
686 /*----------------------------------------------------------------------*/
687 /*  amendent career     :                                               */
688 /*                                                                      */
689 /*                          Copyright (C) 1996 NTT DoCoMo               */
690 /************************************************************************/
_0208_0011(LCEntry * p_LcbEntry,PS_CloseLogicalChannel p_CloseLogicalChannel)691 void LC::_0208_0011(LCEntry *p_LcbEntry , PS_CloseLogicalChannel p_CloseLogicalChannel)
692 {
693     S_OlcRejectCause   cause ;
694 
695     uint32 forwardLcn = p_LcbEntry->FwdLcnRead();
696 
697     p_LcbEntry->StatusWrite(LCBLC_INCOMING_RLSED) ;
698 
699     MsgCloseAckSend((uint16) forwardLcn) ;
700 
701     cause.index = 999 ; /* Special cause to indicate received CLC */
702     // NOTE: I'm putting this in because there's currently no way for
703     //   Tsc to distinguish between the following cases:
704     //   1. Outgoing LCSE: OLCReject received or Timer Expired
705     //   2. Incoming LCSE: CLC received for normal channel closure
706     // We'll require Tsc to intercept this special (illegal) OLCRejectCause
707     //   and take action appropriate for a received CLC.
708     // (This was added 9/29/00, RAN)
709 
710     PtvRlsIdcSend(forwardLcn, &p_CloseLogicalChannel->source , &cause, S_InfHeader::INCOMING) ;
711 }
712