FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/aci/psa_gpppp.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This module defines the processing functions for the | |
18 | primitives send to the protocol stack adapter for GPRS | |
19 | Point-to-Point Protocol ( PPP ). | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #if defined (GPRS) && defined (DTI) | |
24 | |
25 #ifndef PSA_GPPPP_C | |
26 #define PSA_GPPPP_C | |
27 #endif | |
28 | |
29 #include "aci_all.h" | |
30 /*==== INCLUDES ===================================================*/ | |
31 #include "dti.h" /* functionality of the dti library */ | |
32 #include "aci_cmh.h" | |
33 #include "ati_cmd.h" | |
34 #include "aci_cmd.h" | |
35 | |
36 #include "aci.h" | |
37 | |
38 #include "dti_conn_mng.h" | |
39 #include "dti_cntrl_mng.h" | |
40 | |
41 #include "gaci.h" | |
42 #include "psa.h" | |
43 #include "psa_gppp.h" | |
44 #include "cmh.h" | |
45 #include "cmh_gppp.h" | |
46 | |
47 | |
48 /*==== CONSTANTS ==================================================*/ | |
49 | |
50 | |
51 /*==== TYPES ======================================================*/ | |
52 | |
53 | |
54 /*==== EXPORT =====================================================*/ | |
55 | |
56 | |
57 /*==== VARIABLES ==================================================*/ | |
58 | |
59 | |
60 /*==== FUNCTIONS ==================================================*/ | |
61 | |
62 /* | |
63 +-------------------------------------------------------------------+ | |
64 | PROJECT : GPRS (8441) MODULE : PSA_PPPP | | |
65 | STATE : finished ROUTINE : psa_ppp_establish_cnf | | |
66 +-------------------------------------------------------------------+ | |
67 | |
68 PURPOSE : Processes the PPP_ESTABLISH_REQ primitive send by PPP. | |
69 This starts PPP in the correct mode. | |
70 */ | |
71 GLOBAL const void psa_gppp_establish_cnf ( T_PPP_ESTABLISH_CNF *ppp_establish_cnf ) | |
72 { | |
73 | |
74 TRACE_FUNCTION ("psa_gppp_establish_cnf()"); | |
75 | |
76 /* | |
77 *------------------------------------------------------------------- | |
78 * update shared parameter and notify ACI | |
79 *------------------------------------------------------------------- | |
80 */ | |
81 memcpy(&gpppShrdPrm.est, ppp_establish_cnf, sizeof(T_PPP_ESTABLISH_CNF)); | |
82 | |
83 if ( cmhGPPP_Established() < 0) | |
84 { | |
85 TRACE_EVENT("cmhGPPP_Established() gives not supported return value."); | |
86 } | |
87 | |
88 /* | |
89 *------------------------------------------------------------------- | |
90 * free the primitive buffer | |
91 *------------------------------------------------------------------- | |
92 */ | |
93 PFREE (ppp_establish_cnf); | |
94 } | |
95 | |
96 /* | |
97 +-------------------------------------------------------------------+ | |
98 | PROJECT : GPRS (8441) MODULE : PSA_PPPP | | |
99 | STATE : finished ROUTINE : psa_ppp_terminate_ind | | |
100 +-------------------------------------------------------------------+ | |
101 | |
102 PURPOSE : Processes the PPP_TERMINATE_IND primitive send by PPP. | |
103 This indicates that the PPP connection is closed. | |
104 */ | |
105 GLOBAL const void psa_gppp_terminate_ind ( T_PPP_TERMINATE_IND *ppp_terminate_ind ) | |
106 { | |
107 | |
108 TRACE_FUNCTION ("psa_gppp_terminate_ind()"); | |
109 | |
110 /* | |
111 *------------------------------------------------------------------- | |
112 * update shared parameter and notify ACI | |
113 *------------------------------------------------------------------- | |
114 */ | |
115 gpppShrdPrm.ppp_cause = ppp_terminate_ind->ppp_cause; | |
116 | |
117 gpppShrdPrm.tui = DTI_ENTITY_PPPS; /*ppp_terminate_ind->tui;*/ | |
118 | |
119 if ( DTI_ENTITY_PPPS EQ gpppShrdPrm.tui) | |
120 { | |
121 if ( cmhGPPP_Terminated() < 0) | |
122 { | |
123 TRACE_EVENT("cmhGPPP_Terminated() gives not supported return value."); | |
124 } | |
125 } | |
126 else | |
127 { | |
128 /* PPP Client with L2R - circuit switched */ | |
129 } | |
130 | |
131 /* | |
132 *------------------------------------------------------------------- | |
133 * free the primitive buffer | |
134 *------------------------------------------------------------------- | |
135 */ | |
136 PFREE (ppp_terminate_ind); | |
137 } | |
138 | |
139 /* | |
140 +--------------------------------------------------------------------+ | |
141 | PROJECT : GPRS (8441) MODULE : PSA_PPPP | | |
142 | STATE : finished ROUTINE : psa_ppp_pdp_activate_ind | | |
143 +--------------------------------------------------------------------+ | |
144 | |
145 PURPOSE : Processes the PPP_PDP_ACTIVATE_IND primitive send by PPP. | |
146 PPP is ready for PDP context activation (only in server mode). | |
147 */ | |
148 GLOBAL const void psa_gppp_pdp_activate_ind ( T_PPP_PDP_ACTIVATE_IND *ppp_pdp_activate_ind ) | |
149 { | |
150 | |
151 TRACE_FUNCTION ("psa_gppp_pdp_activate_ind()"); | |
152 | |
153 /* | |
154 *------------------------------------------------------------------- | |
155 * update shared parameter and notify ACI | |
156 *------------------------------------------------------------------- | |
157 */ | |
158 gpppShrdPrm.pdp = ppp_pdp_activate_ind; | |
159 | |
160 if ( cmhGPPP_Activated() < 0) | |
161 { | |
162 TRACE_EVENT("cmhGPPP_Activated() give not supported return value."); | |
163 } | |
164 | |
165 /* | |
166 *------------------------------------------------------------------- | |
167 * free the primitive buffer | |
168 *------------------------------------------------------------------- | |
169 */ | |
170 PFREE (ppp_pdp_activate_ind); | |
171 } | |
172 | |
173 /* | |
174 +--------------------------------------------------------------------+ | |
175 | PROJECT : GPRS (8441) MODULE : PSA_PPPP | | |
176 | STATE : finished ROUTINE : psa_ppp_modification_cnf | | |
177 +--------------------------------------------------------------------+ | |
178 | |
179 PURPOSE : Processes the PPP_MODIFICATION_CNF primitive send by PPP. | |
180 this indicate the negotiated header compression (only in server mode). | |
181 */ | |
182 GLOBAL const void psa_gppp_modification_cnf ( T_PPP_MODIFICATION_CNF *ppp_modification_cnf ) | |
183 { | |
184 | |
185 TRACE_FUNCTION ("psa_gppp_modification_cnf()"); | |
186 | |
187 /* | |
188 *------------------------------------------------------------------- | |
189 * update shared parameter and notify ACI | |
190 *------------------------------------------------------------------- | |
191 */ | |
192 gpppShrdPrm.ppp_hc = ppp_modification_cnf->ppp_hc; | |
193 gpppShrdPrm.msid = ppp_modification_cnf->msid; | |
194 | |
195 if ( cmhGPPP_Modified() < 0) | |
196 { | |
197 TRACE_EVENT("cmhGPPP_Modified() give not supported return value."); | |
198 } | |
199 | |
200 /* | |
201 *------------------------------------------------------------------- | |
202 * free the primitive buffer | |
203 *------------------------------------------------------------------- | |
204 */ | |
205 PFREE (ppp_modification_cnf); | |
206 } | |
207 | |
208 /* | |
209 +--------------------------------------------------------------------+ | |
210 | PROJECT : GPRS (8441) MODULE : PSA_PPPP | | |
211 | STATE : finished ROUTINE : psa_ppp_dti_connected_ind| | |
212 +--------------------------------------------------------------------+ | |
213 | |
214 PURPOSE : Processes the PPP_MODIFICATION_CNF primitive send by PPP. | |
215 this indicate the negotiated header compression (only in server mode). | |
216 */ | |
217 GLOBAL const void psa_gppp_dti_connected_ind ( T_PPP_DTI_CONNECTED_IND *ppp_dti_connected_ind ) | |
218 { | |
219 | |
220 TRACE_FUNCTION ("psa_gppp_dti_connected_ind()"); | |
221 | |
222 /* | |
223 *------------------------------------------------------------------- | |
224 * inform DTI Manager | |
225 *------------------------------------------------------------------- | |
226 */ | |
227 cmhGPPPS_DTIconnected( ppp_dti_connected_ind->connected_direction ); | |
228 | |
229 /* | |
230 *------------------------------------------------------------------- | |
231 * free the primitive buffer | |
232 *------------------------------------------------------------------- | |
233 */ | |
234 PFREE (ppp_dti_connected_ind); | |
235 } | |
236 | |
237 #endif /* GPRS */ | |
238 /*==== EOF =========================================================*/ |