comparison src/aci2/aci/sap_ppp.c @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS
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 : MUX for PPP primitives
18 |
19 | Different cases occur for same PPP primitives. In this
20 | file the correct PSA function will be called
21 +-----------------------------------------------------------------------------
22 */
23
24 /*==== INCLUDES ===================================================*/
25
26 /* All this is only needed if we have GPRS, an internal WAP application, or
27 * Riviera data. */
28 #if defined(FF_WAP) || defined(GPRS) || defined(FF_TCP_IP) || defined(FF_SAT_E)
29
30 #ifndef SAP_PPPP_C
31 #define SAP_PPPP_C
32 #endif
33
34 #include "aci_all.h"
35 /*==== INCLUDES ===================================================*/
36 #include "aci_cmh.h"
37 #include "ati_cmd.h"
38 #include "aci_cmd.h"
39
40 #if defined (FF_WAP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E)
41 #include "wap_aci.h"
42 #endif /* WAP */
43
44 #include "aci.h"
45
46 #ifdef FF_TCP_IP
47 #include "dti.h"
48 #include "dti_conn_mng.h"
49 #include "dti_cntrl_mng.h"
50 #include "psa_ppp_w.h"
51 #endif
52 /*==== CONSTANTS ==================================================*/
53
54
55 /*==== TYPES ======================================================*/
56
57
58 /*==== EXPORT =====================================================*/
59 #if defined (GPRS) AND defined (DTI)
60 EXTERN const void psa_gppp_establish_cnf ( T_PPP_ESTABLISH_CNF *ppp_establish_cnf );
61 EXTERN const void psa_gppp_terminate_ind ( T_PPP_TERMINATE_IND *ppp_terminate_ind );
62 EXTERN const void psa_gppp_pdp_activate_ind ( T_PPP_PDP_ACTIVATE_IND *ppp_pdp_activate_ind );
63 EXTERN const void psa_gppp_modification_cnf ( T_PPP_MODIFICATION_CNF *ppp_modification_cnf );
64 EXTERN const void psa_gppp_dti_connected_ind ( T_PPP_DTI_CONNECTED_IND *ppp_dti_connected_ind );
65 #endif /* GPRS */
66
67 #if defined(FF_WAP) || defined(FF_TCP_IP) || defined (FF_GPF_TCPIP) || defined(FF_SAT_E)
68 EXTERN const void psa_wppp_establish_cnf(T_PPP_ESTABLISH_CNF *ppp_establish_cnf);
69 EXTERN const void psa_wppp_terminate_ind(T_PPP_TERMINATE_IND *ppp_terminate_ind);
70 EXTERN const void psa_wppp_dti_connected_ind(T_PPP_DTI_CONNECTED_IND *ppp_dti_connected_ind);
71 #endif /* WAP or FF_TCP_IP or SAT E */
72 /*==== VARIABLES ==================================================*/
73
74
75 /*==== FUNCTIONS ==================================================*/
76
77 /*
78 +-------------------------------------------------------------------+
79 | PROJECT : GSM MODULE : SAP_DTI |
80 | ROUTINE : psa_ppp_establish_cnf |
81 +-------------------------------------------------------------------+
82
83 PURPOSE :
84 */
85
86 GLOBAL const void psa_ppp_establish_cnf ( T_PPP_ESTABLISH_CNF *ppp_establish_cnf )
87 {
88 TRACE_FUNCTION("psa_ppp_establish_cnf()...") ;
89 #if defined (FF_WAP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E)
90 if( Wap_Call EQ TRUE )
91 {
92 psa_wppp_establish_cnf(ppp_establish_cnf);
93 return;
94 }
95 else
96 #endif /* WAP or SAT E */
97 #ifdef FF_TCP_IP
98 if (pppShrdPrm.is_PPP_CALL EQ TRUE)
99 {
100 psa_wppp_establish_cnf(ppp_establish_cnf);
101 return;
102 }
103 else
104 #endif /* FF_TCP_IP */
105 {
106 #if defined (GPRS) AND defined (DTI)
107 psa_gppp_establish_cnf ( ppp_establish_cnf );
108 return;
109 #endif /* GPRS */
110 }
111
112 /* The primitive is PFREEd in the functions called. */
113 }
114
115 /*
116 +-------------------------------------------------------------------+
117 | PROJECT : GSM MODULE : SAP_DTI |
118 | ROUTINE : psa_ppp_terminate_ind |
119 +-------------------------------------------------------------------+
120
121 PURPOSE :
122 */
123
124 GLOBAL const void psa_ppp_terminate_ind ( T_PPP_TERMINATE_IND *ppp_terminate_ind )
125 {
126 #if defined (FF_WAP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E)
127 if( Wap_Call EQ TRUE )
128 {
129 psa_wppp_terminate_ind(ppp_terminate_ind);
130 return;
131 }
132 else
133 #endif /* WAP or SAT E */
134 #ifdef FF_TCP_IP
135 if (pppShrdPrm.is_PPP_CALL EQ TRUE)
136 {
137 psa_wppp_terminate_ind(ppp_terminate_ind);
138 return;
139 }
140 else
141 #endif /* FF_TCP_IP */
142 {
143 #if defined (GPRS) AND defined (DTI)
144 psa_gppp_terminate_ind ( ppp_terminate_ind );
145 return;
146 #endif /* GPRS */
147 }
148
149 /* The primitive is PFREEd in the function called. */
150 }
151
152 /*
153 +-------------------------------------------------------------------+
154 | PROJECT : GSM MODULE : SAP_DTI |
155 | ROUTINE : psa_ppp_pdp_activate_ind|
156 +-------------------------------------------------------------------+
157
158 PURPOSE :
159 */
160
161 GLOBAL const void psa_ppp_pdp_activate_ind ( T_PPP_PDP_ACTIVATE_IND *ppp_pdp_activate_ind )
162 {
163 #if defined (FF_WAP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E)
164
165 if( Wap_Call EQ TRUE )
166 {
167 PFREE (ppp_pdp_activate_ind);
168 return;
169 }
170 else
171 #endif /* WAP or SAT E */
172 {
173 #if defined (GPRS) AND defined (DTI)
174 psa_gppp_pdp_activate_ind ( ppp_pdp_activate_ind );
175 return;
176 #endif /* GPRS */
177 }
178
179 /* The primitive is PFREEd in the function called. */
180 }
181
182 /*
183 +-------------------------------------------------------------------+
184 | PROJECT : GSM MODULE : SAP_DTI |
185 | ROUTINE : psa_ppp_modification_cnf|
186 +-------------------------------------------------------------------+
187
188 PURPOSE :
189 */
190
191 GLOBAL const void psa_ppp_modification_cnf ( T_PPP_MODIFICATION_CNF *ppp_modification_cnf )
192 {
193 #if defined (GPRS) AND defined (DTI)
194 psa_gppp_modification_cnf ( ppp_modification_cnf );
195 return;
196 #endif /* GPRS */
197
198 /* The primitive is PFREEd in the function called. */
199 }
200
201 /*
202 +--------------------------------------------------------------------+
203 | PROJECT : GSM MODULE : SAP_DTI |
204 | ROUTINE : psa_ppp_dti_connected_ind|
205 +--------------------------------------------------------------------+
206
207 PURPOSE :
208 */
209
210 GLOBAL const void psa_ppp_dti_connected_ind ( T_PPP_DTI_CONNECTED_IND *ppp_dti_connected_ind )
211 {
212
213 TRACE_FUNCTION("psa_ppp_dti_connected_ind()");
214
215 #if defined (FF_WAP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E)
216 if( Wap_Call EQ TRUE )
217 {
218 psa_wppp_dti_connected_ind(ppp_dti_connected_ind);
219 return;
220 }
221 else
222 #endif /* WAP or SAT E */
223 #ifdef FF_TCP_IP
224 if (pppShrdPrm.is_PPP_CALL EQ TRUE)
225 {
226 psa_wppp_dti_connected_ind(ppp_dti_connected_ind);
227 return;
228 }
229 else
230 #endif /* FF_TCP_IP */
231 {
232 #if defined (GPRS) AND defined (DTI)
233 psa_gppp_dti_connected_ind ( ppp_dti_connected_ind );
234 return;
235 #endif /* GPRS */
236 }
237
238 /* The primitive is PFREEd in the function called. */
239 }
240
241
242
243 #endif /* WAP or GPRS or FF_TCP_IP or SAT E */