• 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       : selcblccmn.c                                      */
30 /*  file contents   : Uni-Directional and Bi-Directional                */
31 /*                  :              Logical Channel Signalling Entity    */
32 /*                  :                                 Common Management */
33 /*  draw            : '96.11.23                                         */
34 /*----------------------------------------------------------------------*/
35 /*  amendment       :                                                   */
36 /*                          Copyright (C) 1996 NTT DoCoMo               */
37 /************************************************************************/
38 
39 
40 /************************************************************************/
41 /*  Headerfile Include                                                  */
42 /************************************************************************/
43 #include    "h245pri.h"
44 #include    "semsgque.h"
45 #include    "lcentry.h"
46 #include    "lcblccmn.h"
47 
48 
49 /************************************************************************/
50 /*  function name       : Se_LcBlcT103TimerIdGet                        */
51 /*  function outline    : T103 Timer Id Get                             */
52 /*  function discription: Se_LcBlcT103TimerIdGet( PS_LCB_ENTRY )        */
53 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
54 /*  output data         : int32 Timer Id                                  */
55 /*  draw time           : '96.11.11                                     */
56 /*----------------------------------------------------------------------*/
57 /*  amendent career (x)  :                                               */
58 /*                                                                      */
59 /*                          Copyright (C) 1996 NTT DoCoMo               */
60 /************************************************************************/
T103TimerIdGet(uint32 forwardLcn)61 int32 LCBLCCmn::T103TimerIdGet(uint32 forwardLcn)
62 {
63     /* Return T103 Timer Id  */
64     return((forwardLcn << 16) | E_TmrId_LcBlc_T103) ;
65 }
66 
67 
68 /************************************************************************/
69 /*  function name       : Se_LcBlcT103TimerStart                        */
70 /*  function outline    : T103 Timer Start                              */
71 /*  function discription: Se_LcBlcT103TimerStart( PS_LCB_ENTRY )        */
72 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
73 /*  output data         : None                                          */
74 /*  draw time           : '96.11.11                                     */
75 /*----------------------------------------------------------------------*/
76 /*  amendent career (x)  :                                               */
77 /*                                                                      */
78 /*                          Copyright (C) 1996 NTT DoCoMo               */
79 /************************************************************************/
T103TimerStart(uint32 forwardLcn,uint32 tmrSqcNumber)80 void LCBLCCmn::T103TimerStart(uint32 forwardLcn, uint32 tmrSqcNumber)
81 {
82     RequestTimer(T103TimerIdGet(forwardLcn), tmrSqcNumber, TimerDuration) ;
83 }
84 
85 
86 /************************************************************************/
87 /*  function name       : Se_LcBlcT103TimerStop                         */
88 /*  function outline    : T103 Timer Stop                               */
89 /*  function discription: Se_LcBlcT103TimerStop( PS_LCB_ENTRY )         */
90 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
91 /*  output data         : None                                          */
92 /*  draw time           : '96.11.11                                     */
93 /*----------------------------------------------------------------------*/
94 /*  amendent career (x)  :                                               */
95 /*                                                                      */
96 /*                          Copyright (C) 1996 NTT DoCoMo               */
97 /************************************************************************/
T103TimerStop(uint32 forwardLcn)98 void LCBLCCmn::T103TimerStop(uint32 forwardLcn)
99 {
100     CancelTimer(T103TimerIdGet(forwardLcn)) ;
101 }
102 
103 
104 /************************************************************************/
105 /*  function name       : Se_LcBlcMsgOpenSend                           */
106 /*  function outline    : Open Logical Channel Send                     */
107 /*  function discription: Se_LcBlcMsgOpenSend( PS_LCB_ENTRY ,           */
108 /*                      :                      PS_ForwardReverseParam ) */
109 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
110 /*                      : PS_ForwardReverseParam p_ForwardReverseParam  */
111 /*  output data         : None                                          */
112 /*  draw time           : '96.11.24                                     */
113 /*----------------------------------------------------------------------*/
114 /*  amendent career (x)  :                                               */
115 /*                                                                      */
116 /*                          Copyright (C) 1996 NTT DoCoMo               */
117 /************************************************************************/
MsgOpenSend(uint16 forwardLcn,PS_ForwardReverseParam p_ForwardReverseParam)118 void LCBLCCmn::MsgOpenSend(uint16 forwardLcn, PS_ForwardReverseParam p_ForwardReverseParam)
119 {
120     S_OpenLogicalChannel   openLogicalChannel ;
121     S_H245Msg              h245Msg ;
122 
123     openLogicalChannel.forwardLogicalChannelNumber = forwardLcn;
124     oscl_memcpy((int8*)&openLogicalChannel.forwardLogicalChannelParameters ,
125                 (int8*)&p_ForwardReverseParam->forwardLogicalChannelParameters ,
126                 sizeof(S_ForwardLogicalChannelParameters)) ;
127 
128     openLogicalChannel.option_of_reverseLogicalChannelParameters = p_ForwardReverseParam->option_of_reverseLogicalChannelParameters ;
129     oscl_memcpy((int8*)&openLogicalChannel.reverseLogicalChannelParameters ,
130                 (int8*)&p_ForwardReverseParam->reverseLogicalChannelParameters ,
131                 sizeof(S_ReverseLogicalChannelParameters)) ;
132 
133     openLogicalChannel.option_of_separateStack = false ;
134     oscl_memset((int8*)&openLogicalChannel.separateStack , 0 , sizeof(S_NetworkAccessParameters)) ;
135 
136     openLogicalChannel.option_of_encryptionSync = false;
137 
138     h245Msg.Type1 = H245_MSG_REQ ;
139     h245Msg.Type2 = MSGTYP_LCBLC_OP ;
140     h245Msg.pData = (uint8*) & openLogicalChannel ;
141 
142     MessageSend(&h245Msg) ;
143 }
144 
145 
146 /************************************************************************/
147 /*  function name       : Se_LcBlcMsgOpenAckSend                        */
148 /*  function outline    : Open Logical Channel Ack Send                 */
149 /*  function discription: Se_LcBlcMsgOpenAckSend( PS_LCB_ENTRY ,        */
150 /*                      :                              PS_ReverseData ) */
151 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
152 /*                      : PS_ReverseData p_ReverseData                  */
153 /*  output data         : None                                          */
154 /*  draw time           : '96.11.25                                     */
155 /*----------------------------------------------------------------------*/
156 /*  amendent career (x)  :                                               */
157 /*                                                                      */
158 /*                          Copyright (C) 1996 NTT DoCoMo               */
159 /************************************************************************/
MsgOpenAckSend(uint16 forwardLcn,PS_ReverseData p_ReverseData)160 void LCBLCCmn::MsgOpenAckSend(uint16 forwardLcn, PS_ReverseData p_ReverseData)
161 {
162     S_OpenLogicalChannelAck    openLogicalChannelAck ;
163     S_H245Msg                  h245Msg ;
164 
165     // Logical Channel Number
166     openLogicalChannelAck.forwardLogicalChannelNumber = forwardLcn;
167 
168     // ReverseLogicalChannelParameters
169     openLogicalChannelAck.option_of_ackReverseLogicalChannelParameters =
170         p_ReverseData->option_of_reverseLogicalChannelParameters ;
171 
172     oscl_memcpy((int8*)&openLogicalChannelAck.ackReverseLogicalChannelParameters ,
173                 (int8*)&p_ReverseData->reverseLogicalChannelParameters ,
174                 sizeof(S_AckReverseLogicalChannelParameters)) ;
175 
176     openLogicalChannelAck.option_of_separateStack = false ;
177 
178     // SeparateStack is OFF
179     oscl_memset((int8*)&openLogicalChannelAck.separateStack , 0 , sizeof(S_NetworkAccessParameters)) ;
180 
181     openLogicalChannelAck.option_of_forwardMultiplexAckParameters =
182         p_ReverseData->option_of_forwardMultiplexAckParameters ;
183     oscl_memcpy((int8*)&openLogicalChannelAck.forwardMultiplexAckParameters ,
184                 (int8*)&p_ReverseData->forwardMultiplexAckParameters ,
185                 sizeof(S_ForwardMultiplexAckParameters)) ;
186 
187     // EncryptionSync is OFF
188     openLogicalChannelAck.option_of_encryptionSync = false; /* IMP20 */
189 
190     h245Msg.Type1 = H245_MSG_RPS ;
191     h245Msg.Type2 = MSGTYP_LCBLC_OP_ACK ;
192     h245Msg.pData = (uint8*) & openLogicalChannelAck ;
193 
194     MessageSend(&h245Msg) ;
195 }
196 
197 
198 /************************************************************************/
199 /*  function name       : Se_LcBlcMsgOpenCfmSend                        */
200 /*  function outline    : Open Logical Channel Confirm Send             */
201 /*                      :                       ( Bi-Directional Only ) */
202 /*  function discription: Se_LcBlcMsgOpenCfmSend( PS_LCB_ENTRY ,        */
203 /*                      :                    PS_OpenLogicalChannelAck ) */
204 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
205 /*                      : PS_OpenLogicalChannelAck                      */
206 /*                      :                       p_OpenLogicalChannelAck */
207 /*  output data         : None                                          */
208 /*  draw time           : '96.11.25                                     */
209 /*----------------------------------------------------------------------*/
210 /*  amendent career (x)  :                                               */
211 /*                                                                      */
212 /*                          Copyright (C) 1996 NTT DoCoMo               */
213 /************************************************************************/
MsgOpenCfmSend(uint16 forwardLcn,PS_OpenLogicalChannelAck p_OpenLogicalChannelAck)214 void LCBLCCmn::MsgOpenCfmSend(uint16 forwardLcn, PS_OpenLogicalChannelAck p_OpenLogicalChannelAck)
215 {
216     S_OpenLogicalChannelConfirm    openLogicalChannelConfirm ;
217     S_H245Msg                      h245Msg ;
218 
219     OSCL_UNUSED_ARG(p_OpenLogicalChannelAck);
220 
221     openLogicalChannelConfirm.forwardLogicalChannelNumber = forwardLcn;
222 
223     h245Msg.Type1 = H245_MSG_IDC ;
224     h245Msg.Type2 = MSGTYP_LCBLC_OP_CFM ;
225     h245Msg.pData = (uint8*) & openLogicalChannelConfirm ;
226 
227     MessageSend(&h245Msg) ;
228 }
229 
230 
231 /************************************************************************/
232 /*  function name       : Se_LcBlcMsgOpenRjtSend                        */
233 /*  function outline    : Open Logical Channel Reject Send              */
234 /*  function discription: Se_LcBlcMsgOpenRjtSend( PS_LCB_ENTRY ,        */
235 /*                      :                              PS_Cause_LcBlc ) */
236 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
237 /*                      : PS_Cause_LcBlc p_Cause_LcBlc                  */
238 /*  output data         : None                                          */
239 /*  draw time           : '96.11.24                                     */
240 /*----------------------------------------------------------------------*/
241 /*  amendent career (x)  :                                               */
242 /*                                                                      */
243 /*                          Copyright (C) 1996 NTT DoCoMo               */
244 /************************************************************************/
MsgOpenRjtSend(uint16 forwardLcn,PS_OlcRejectCause p_Cause)245 void LCBLCCmn::MsgOpenRjtSend(uint16 forwardLcn, PS_OlcRejectCause p_Cause)
246 {
247     S_OpenLogicalChannelReject openLogicalChannelReject ;
248     S_H245Msg                  h245Msg ;
249 
250     openLogicalChannelReject.forwardLogicalChannelNumber = forwardLcn;
251     oscl_memcpy((int8*)&openLogicalChannelReject.olcRejectCause ,
252                 (int8*)p_Cause ,
253                 sizeof(S_OlcRejectCause)) ;
254 
255     h245Msg.Type1 = H245_MSG_RPS ;
256     h245Msg.Type2 = MSGTYP_LCBLC_OP_RJT ;
257     h245Msg.pData = (uint8*) & openLogicalChannelReject ;
258 
259     MessageSend(&h245Msg) ;
260 }
261 
262 
263 /************************************************************************/
264 /*  function name       : Se_LcBlcMsgCloseSend                          */
265 /*  function outline    : Close Logical Channel Send                    */
266 /*  function discription: Se_LcBlcMsgCloseSend( PS_LCB_ENTRY ,          */
267 /*                      :                                   PS_Source ) */
268 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
269 /*                      : PS_Source p_Source                            */
270 /*  output data         : None                                          */
271 /*  draw time           : '96.11.24                                     */
272 /*----------------------------------------------------------------------*/
273 /*  amendent career (x)  :                                               */
274 /*                                                                      */
275 /*                          Copyright (C) 1996 NTT DoCoMo               */
276 /************************************************************************/
MsgCloseSend(uint16 forwardLcn,PS_Source p_Source)277 void LCBLCCmn::MsgCloseSend(uint16 forwardLcn, PS_Source p_Source)
278 {
279     S_CloseLogicalChannel  closeLogicalChannel ;
280     S_H245Msg              h245Msg ;
281 
282     closeLogicalChannel.forwardLogicalChannelNumber = forwardLcn;
283     oscl_memcpy((int8*)&closeLogicalChannel.source , (int8*)p_Source , sizeof(S_Source)) ;
284     /* IMP20_1 */
285     closeLogicalChannel.option_of_reason = 1;
286     closeLogicalChannel.reason.index = 0;
287 
288     h245Msg.Type1 = H245_MSG_REQ ;
289     h245Msg.Type2 = MSGTYP_LCBLC_CL ;
290     h245Msg.pData = (uint8*) & closeLogicalChannel ;
291 
292     MessageSend(&h245Msg) ;
293 }
294 
295 
296 /************************************************************************/
297 /*  function name       : Se_LcBlcMsgCloseAckSend                       */
298 /*  function outline    : Close Logical Channel Ack Send                */
299 /*  function discription: Se_LcBlcMsgCloseAckSend( PS_LCB_ENTRY )       */
300 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
301 /*  output data         : None                                          */
302 /*  draw time           : '96.11.24                                     */
303 /*----------------------------------------------------------------------*/
304 /*  amendent career (x)  :                                               */
305 /*                                                                      */
306 /*                          Copyright (C) 1996 NTT DoCoMo               */
307 /************************************************************************/
MsgCloseAckSend(uint16 forwardLcn)308 void LCBLCCmn::MsgCloseAckSend(uint16 forwardLcn)
309 {
310     S_CloseLogicalChannelAck   closeLogicalChannelAck ;
311     S_H245Msg                  h245Msg ;
312 
313     closeLogicalChannelAck.forwardLogicalChannelNumber = forwardLcn;
314 
315     h245Msg.Type1 = H245_MSG_RPS ;
316     h245Msg.Type2 = MSGTYP_LCBLC_CL_ACK ;
317     h245Msg.pData = (uint8*) & closeLogicalChannelAck ;
318 
319     MessageSend(&h245Msg) ;
320 }
321 
322 
323 /************************************************************************/
324 /*  function name       : Se_LcBlcPtvEtbIdcSend                         */
325 /*  function outline    : ESTABLISH.indication Send                     */
326 /*  function discription: Se_LcBlcPtvEtbIdcSend( PS_LCB_ENTRY ,         */
327 /*                      :                       PS_OpenLogicalChannel ) */
328 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
329 /*                      : PS_OpenLogicalChannel p_OpenLogicalChannel    */
330 /*  output data         : None                                          */
331 /*  draw time           : '96.11.24                                     */
332 /*----------------------------------------------------------------------*/
333 /*  amendent career (x)  :                                               */
334 /*                                                                      */
335 /*                          Copyright (C) 1996 NTT DoCoMo               */
336 /************************************************************************/
PtvEtbIdcSend(uint32 forwardLcn,PS_OpenLogicalChannel p_OpenLogicalChannel,int32 reverseLcn)337 void LCBLCCmn::PtvEtbIdcSend(uint32 forwardLcn, PS_OpenLogicalChannel p_OpenLogicalChannel, int32 reverseLcn)
338 {
339     S_InfHeader                infHeader ;
340     S_ForwardReverseParam      forwardReverseParam ;
341 
342     oscl_memcpy((int8*)&forwardReverseParam.forwardLogicalChannelParameters ,
343                 (int8*)&p_OpenLogicalChannel->forwardLogicalChannelParameters ,
344                 sizeof(S_ForwardLogicalChannelParameters)) ;
345     forwardReverseParam.option_of_reverseLogicalChannelParameters =
346         p_OpenLogicalChannel->option_of_reverseLogicalChannelParameters ;
347     oscl_memcpy((int8*)&forwardReverseParam.reverseLogicalChannelParameters ,
348                 (int8*)&p_OpenLogicalChannel->reverseLogicalChannelParameters ,
349                 sizeof(S_ReverseLogicalChannelParameters)) ;
350 
351     infHeader.InfType = H245_PRIMITIVE ;
352     if (reverseLcn == -1)  /* Uni-Directional */
353     {
354         infHeader.InfId = E_PtvId_Lc_Etb_Idc ;
355     }
356     else /* Bi-Directional */
357     {
358         infHeader.InfId = E_PtvId_Blc_Etb_Idc ;
359     }
360     infHeader.InfSupplement1 = forwardLcn;
361     infHeader.InfSupplement2 = reverseLcn;
362     infHeader.pParameter = (uint8*) & forwardReverseParam ;
363     infHeader.Size = sizeof(S_ForwardReverseParam) ;
364 
365     PrimitiveSend(&infHeader) ;
366 
367     return ;
368 }
369 
370 
371 /************************************************************************/
372 /*  function name       : Se_LcBlcPtvEtbCfmSend                         */
373 /*  function outline    : ESTABLISH.confirm Send                        */
374 /*  function discription: Se_LcBlcPtvEtbCfmSend( PS_LCB_ENTRY ,         */
375 /*                      :                    PS_OpenLogicalChannelAck ) */
376 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
377 /*                      : PS_OpenLogicalChannelAck                      */
378 /*                      :                       p_OpenLogicalChannelAck */
379 /*  output data         : None                                          */
380 /*  draw time           : '96.11.24                                     */
381 /*----------------------------------------------------------------------*/
382 /*  amendent career (x)  :                                               */
383 /*                                                                      */
384 /*                          Copyright (C) 1996 NTT DoCoMo               */
385 /************************************************************************/
PtvEtbCfmSend(uint32 forwardLcn,PS_OpenLogicalChannelAck p_OpenLogicalChannelAck,int32 reverseLcn)386 void LCBLCCmn::PtvEtbCfmSend(uint32 forwardLcn, PS_OpenLogicalChannelAck p_OpenLogicalChannelAck, int32 reverseLcn)
387 {
388     S_InfHeader    infHeader ;
389     S_ReverseData  reverseData ;
390 
391     // ReverseLogicalChannelParameters
392     reverseData.option_of_reverseLogicalChannelParameters =
393         p_OpenLogicalChannelAck->option_of_ackReverseLogicalChannelParameters ;
394     oscl_memcpy((int8*)&reverseData.reverseLogicalChannelParameters ,
395                 (int8*)&p_OpenLogicalChannelAck->ackReverseLogicalChannelParameters ,
396                 sizeof(S_AckReverseLogicalChannelParameters)) ;
397 
398     // ForwardMultiplexAckParameters added to 245 Library on 9/28/00 (RAN)
399     reverseData.option_of_forwardMultiplexAckParameters =
400         p_OpenLogicalChannelAck->option_of_forwardMultiplexAckParameters;
401     oscl_memcpy((int8*)&reverseData.forwardMultiplexAckParameters ,
402                 (int8*)&p_OpenLogicalChannelAck->forwardMultiplexAckParameters ,
403                 sizeof(S_ForwardMultiplexAckParameters)) ;
404 
405     infHeader.InfType = H245_PRIMITIVE ;
406     if (reverseLcn == -1)  /* Uni-Directional */
407     {
408         infHeader.InfId = E_PtvId_Lc_Etb_Cfm ;
409     }
410     else /* Bi-Directional */
411     {
412         infHeader.InfId = E_PtvId_Blc_Etb_Cfm ;
413     }
414     infHeader.InfSupplement1 = forwardLcn;
415     infHeader.InfSupplement2 = reverseLcn;
416     infHeader.pParameter = (uint8*) & reverseData ;
417     infHeader.Size = sizeof(S_ReverseData) ;
418 
419     PrimitiveSend(&infHeader) ;
420 
421     return ;
422 }
423 
PtvEtbCfmSend2(uint32 forwardLcn,PS_OpenLogicalChannelAck p_OpenLogicalChannelAck,int32 reverseLcn)424 void LCBLCCmn::PtvEtbCfmSend2(uint32 forwardLcn, PS_OpenLogicalChannelAck p_OpenLogicalChannelAck, int32 reverseLcn)
425 {
426     S_InfHeader    infHeader ;
427     S_ReverseData  reverseData ;
428 
429     // ReverseLogicalChannelParameters
430     reverseData.option_of_reverseLogicalChannelParameters =
431         p_OpenLogicalChannelAck->option_of_ackReverseLogicalChannelParameters ;
432     oscl_memcpy((int8*)&reverseData.reverseLogicalChannelParameters ,
433                 (int8*)&p_OpenLogicalChannelAck->ackReverseLogicalChannelParameters ,
434                 sizeof(S_AckReverseLogicalChannelParameters)) ;
435 
436     // ForwardMultiplexAckParameters added to 245 Library on 9/28/00 (RAN)
437     reverseData.option_of_forwardMultiplexAckParameters =
438         p_OpenLogicalChannelAck->option_of_forwardMultiplexAckParameters ;
439     oscl_memcpy((int8*)&reverseData.forwardMultiplexAckParameters ,
440                 (int8*)&p_OpenLogicalChannelAck->forwardMultiplexAckParameters ,
441                 sizeof(S_ForwardMultiplexAckParameters)) ;
442 
443     infHeader.InfType = H245_PRIMITIVE ;
444 
445     infHeader.InfId = E_PtvId_Blc_Etb_Cfm2 ;
446 
447     infHeader.InfSupplement1 = forwardLcn;
448     infHeader.InfSupplement2 = reverseLcn;
449     infHeader.pParameter = (uint8*) & reverseData ;
450     infHeader.Size = sizeof(S_ReverseData) ;
451 
452     PrimitiveSend(&infHeader) ;
453 
454     return ;
455 }
456 
457 /************************************************************************/
458 /*  function name       : Se_LcBlcPtvRlsIdcSend                         */
459 /*  function outline    : RELEASE.indication Send                       */
460 /*  function discription: Se_LcBlcPtvRlsIdcSend( PS_LCB_ENTRY ,         */
461 /*                      :                  PS_Source , PS_Cause_lcse2 ) */
462 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
463 /*                      : PS_Source p_Source                            */
464 /*                      : PS_Cause_lcse2 p_Cause_lcse2                  */
465 /*  output data         : None                                          */
466 /*  draw time           : '96.11.24                                     */
467 /*----------------------------------------------------------------------*/
468 /*  amendent career (x)  :                                               */
469 /*                                                                      */
470 /*                          Copyright (C) 1996 NTT DoCoMo               */
471 /************************************************************************/
PtvRlsIdcSend(uint32 forwardLcn,PS_Source p_Source,PS_OlcRejectCause p_Cause,S_InfHeader::TDirection dir,int32 reverseLcn)472 void LCBLCCmn::PtvRlsIdcSend(uint32 forwardLcn, PS_Source p_Source , PS_OlcRejectCause p_Cause,
473                              S_InfHeader::TDirection dir, int32 reverseLcn)
474 {
475     S_InfHeader            infHeader ;
476     S_SourceCause_LcBlc    sourceCause_LcBlc ;
477 
478     if (p_Source->index == 0)   /* Source == User */
479     {
480         sourceCause_LcBlc.Source = Src_USER ;
481     }
482     else                        /* Source == LCSE */
483     {
484         if (reverseLcn == -1)  /* Uni-Directional */
485         {
486             sourceCause_LcBlc.Source = Src_LCSE ;
487         }
488         else /* Bi-Directional */
489         {
490             sourceCause_LcBlc.Source = Src_BLCSE ;
491         }
492     }
493     oscl_memcpy((int8*)&sourceCause_LcBlc.Cause , (int8*)p_Cause , sizeof(S_OlcRejectCause)) ;
494 
495     infHeader.InfType = H245_PRIMITIVE ;
496     if (reverseLcn == -1)  /* Uni-Directional */
497     {
498         infHeader.InfId = E_PtvId_Lc_Rls_Idc ;
499     }
500     else /* Bi-Directional */
501     {
502         infHeader.InfId = E_PtvId_Blc_Rls_Idc ;
503     }
504     infHeader.InfSupplement1 = forwardLcn;
505     infHeader.InfSupplement2 = reverseLcn;
506     infHeader.pParameter = (uint8*) & sourceCause_LcBlc ;
507     infHeader.Size = sizeof(S_SourceCause_LcBlc) ;
508     infHeader.Dir = dir;
509 
510     PrimitiveSend(&infHeader) ;
511 
512     return ;
513 }
514 
515 
516 /************************************************************************/
517 /*  function name       : Se_LcBlcPtvRlsCfmSend                         */
518 /*  function outline    : RELEASE.confirm Send                          */
519 /*  function discription: Se_LcBlcPtvRlsCfmSend( PS_LCB_ENTRY )         */
520 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
521 /*  output data         : None                                          */
522 /*  draw time           : '96.11.24                                     */
523 /*----------------------------------------------------------------------*/
524 /*  amendent career (x)  :                                               */
525 /*                                                                      */
526 /*                          Copyright (C) 1996 NTT DoCoMo               */
527 /************************************************************************/
PtvRlsCfmSend(uint32 forwardLcn,int32 reverseLcn)528 void LCBLCCmn::PtvRlsCfmSend(uint32 forwardLcn, int32 reverseLcn)
529 {
530     S_InfHeader    infHeader ;
531 
532     infHeader.InfType = H245_PRIMITIVE ;
533     if (reverseLcn == -1)  /* Uni-Directional */
534     {
535         infHeader.InfId = E_PtvId_Lc_Rls_Cfm ;
536     }
537     else /* Bi-Directional */
538     {
539         infHeader.InfId = E_PtvId_Blc_Rls_Cfm ;
540     }
541     infHeader.InfSupplement1 = forwardLcn;
542     infHeader.InfSupplement2 = reverseLcn;
543     infHeader.pParameter = NULL ;
544     infHeader.Size = 0 ;
545 
546     PrimitiveSend(&infHeader) ;
547 
548     return ;
549 }
550 
551 
552 /************************************************************************/
553 /*  function name       : Se_LcBlcPtvErrIdcSend                         */
554 /*  function outline    : ERROR.indication Send                         */
555 /*  function discription: Se_LcBlcPtvErrIdcSend( PS_LCB_ENTRY ,         */
556 /*                      :                                ENUM_ErrCode ) */
557 /*  input data          : PS_LCB_ENTRY p_LcbEntry                       */
558 /*                      : ENUM_ErrCode ErrCode                          */
559 /*  output data         : None                                          */
560 /*  draw time           : '96.11.24                                     */
561 /*----------------------------------------------------------------------*/
562 /*  amendent career (x)  :                                               */
563 /*                                                                      */
564 /*                          Copyright (C) 1996 NTT DoCoMo               */
565 /************************************************************************/
PtvErrIdcSend(uint32 forwardLcn,ENUM_ErrCode ErrCode,int32 reverseLcn)566 void LCBLCCmn::PtvErrIdcSend(uint32 forwardLcn, ENUM_ErrCode ErrCode, int32 reverseLcn)
567 {
568     S_InfHeader    infHeader ;
569     S_ErrCode      errCode ;
570 
571     errCode.ErrCode = ErrCode ;
572 
573     infHeader.InfType = H245_PRIMITIVE ;
574     if (reverseLcn == -1)  /* Uni-Directional */
575     {
576         infHeader.InfId = E_PtvId_Lc_Err_Idc ;
577     }
578     else /* Bi-Directional */
579     {
580         infHeader.InfId = E_PtvId_Blc_Err_Idc ;
581     }
582     infHeader.InfSupplement1 = forwardLcn;
583     infHeader.InfSupplement2 = reverseLcn;
584     infHeader.pParameter = (uint8*) & errCode ;
585     infHeader.Size = sizeof(S_ErrCode) ;
586 
587     PrimitiveSend(&infHeader) ;
588 
589     return ;
590 }
591