FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/aci/psa_gmms.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 signalling functions of the | |
18 | protocol stack adapter for the registration part of | |
19 | GPRS mobility management ( GMM ). | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #ifdef GPRS | |
24 | |
25 #ifndef PSA_GMMS_C | |
26 #define PSA_GMMS_C | |
27 #endif | |
28 | |
29 #include "aci_all.h" | |
30 /*==== INCLUDES ===================================================*/ | |
31 #include "aci_cmh.h" | |
32 #include "ati_cmd.h" | |
33 #include "aci_cmd.h" | |
34 #include "gaci_cmh.h" | |
35 #include "aci.h" | |
36 #include "psa.h" | |
37 #include "psa_gmm.h" | |
38 | |
39 /*==== CONSTANTS ==================================================*/ | |
40 | |
41 | |
42 /*==== TYPES ======================================================*/ | |
43 | |
44 | |
45 /*==== EXPORT =====================================================*/ | |
46 | |
47 | |
48 /*==== VARIABLES ==================================================*/ | |
49 | |
50 | |
51 /*==== FUNCTIONS ==================================================*/ | |
52 | |
53 /* | |
54 +-------------------------------------------------------------------+ | |
55 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
56 | ROUTINE : psaGMM_Attach | | |
57 +-------------------------------------------------------------------+ | |
58 | |
59 PURPOSE : start an attach | |
60 | |
61 */ | |
62 GLOBAL void psaGMM_Attach ( UBYTE mobile_class, UBYTE attach_type, UBYTE service_mode ) | |
63 { | |
64 | |
65 TRACE_FUNCTION ("psaGMM_Attach()"); | |
66 | |
67 GMM_PRIM_TRACE_2("ATT_REQ", | |
68 dbg_mobileClass(mobile_class), | |
69 dbg_attachType(attach_type)); | |
70 /* | |
71 *------------------------------------------------------------------- | |
72 * create and send primitive for network attach | |
73 *------------------------------------------------------------------- | |
74 */ | |
75 { | |
76 PALLOC (gmmreg_attach_req, GMMREG_ATTACH_REQ); | |
77 | |
78 /* fill in primitive parameter: registration mode */ | |
79 gmmreg_attach_req -> mobile_class = mobile_class; | |
80 gmmreg_attach_req -> attach_type = attach_type; | |
81 gmmreg_attach_req -> service_mode = service_mode; | |
82 | |
83 psaGMM_NetworkRegistrationStatus(GMMREG_ATTACH_REQ, gmmreg_attach_req); | |
84 | |
85 PSEND (hCommGMM, gmmreg_attach_req); | |
86 } | |
87 | |
88 } | |
89 | |
90 /* | |
91 +-------------------------------------------------------------------+ | |
92 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
93 | ROUTINE : psaGMM_Detach | | |
94 +-------------------------------------------------------------------+ | |
95 | |
96 PURPOSE : start an detach | |
97 | |
98 */ | |
99 GLOBAL void psaGMM_Detach ( UBYTE detach_type ) | |
100 { | |
101 | |
102 TRACE_FUNCTION ("psaGMM_Detach()"); | |
103 | |
104 GMM_PRIM_TRACE_1("DET_REQ", | |
105 dbg_detachType(detach_type)); | |
106 /* | |
107 *------------------------------------------------------------------- | |
108 * create and send primitive for network attach | |
109 *------------------------------------------------------------------- | |
110 */ | |
111 { | |
112 PALLOC (gmmreg_detach_req, GMMREG_DETACH_REQ); | |
113 | |
114 /* fill in primitive parameter: registration mode */ | |
115 gmmreg_detach_req -> detach_type = detach_type; | |
116 | |
117 PSEND (hCommGMM, gmmreg_detach_req); | |
118 } | |
119 } | |
120 | |
121 /* | |
122 +-------------------------------------------------------------------+ | |
123 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
124 | ROUTINE : psaGMM_Net_Req | | |
125 +-------------------------------------------------------------------+ | |
126 | |
127 PURPOSE : start a network search | |
128 | |
129 */ | |
130 GLOBAL void psaGMM_Net_Req ( void ) | |
131 { | |
132 | |
133 TRACE_FUNCTION ("psaGMM_Net_Req()"); | |
134 | |
135 /* | |
136 *------------------------------------------------------------------- | |
137 * create and send primitive for network attach | |
138 *------------------------------------------------------------------- | |
139 */ | |
140 { | |
141 PALLOC (gmmreg_net_req, GMMREG_NET_REQ); | |
142 PSEND (hCommGMM, gmmreg_net_req); | |
143 } | |
144 } | |
145 | |
146 /* | |
147 +-------------------------------------------------------------------+ | |
148 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
149 | ROUTINE : psaGMM_Plmn_res | | |
150 +-------------------------------------------------------------------+ | |
151 | |
152 PURPOSE : select a PLMN after network search | |
153 | |
154 */ | |
155 GLOBAL void psaGMM_Plmn_res ( UBYTE mobile_class, UBYTE attach_type, T_plmn *plmn ) | |
156 { | |
157 | |
158 TRACE_FUNCTION ("psaGMM_Plmn_res()"); | |
159 | |
160 GMM_PRIM_TRACE_2("PLMN_RES", | |
161 dbg_mobileClass(mobile_class), | |
162 dbg_attachType(attach_type)); | |
163 /* | |
164 *------------------------------------------------------------------- | |
165 * create and send primitive for network attach | |
166 *------------------------------------------------------------------- | |
167 */ | |
168 { | |
169 PALLOC (gmmreg_plmn_res, GMMREG_PLMN_RES); | |
170 | |
171 /* fill in primitive parameter: registration mode */ | |
172 gmmreg_plmn_res -> plmn = *plmn; | |
173 gmmreg_plmn_res -> attach_type = attach_type; | |
174 gmmreg_plmn_res -> mobile_class = mobile_class; | |
175 | |
176 PSEND (hCommGMM, gmmreg_plmn_res); | |
177 } | |
178 | |
179 } | |
180 | |
181 /* | |
182 +-------------------------------------------------------------------+ | |
183 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
184 | ROUTINE : psaGMM_Plmn_mode_req | | |
185 +-------------------------------------------------------------------+ | |
186 | |
187 PURPOSE : switch between automatic and manual mode of registration | |
188 | |
189 */ | |
190 GLOBAL void psaGMM_Plmn_mode_req ( UBYTE net_selection_mode ) | |
191 { | |
192 | |
193 TRACE_FUNCTION ("psaGMM_Plmn_mode_req()"); | |
194 | |
195 /* | |
196 *------------------------------------------------------------------- | |
197 * create and send primitive for network attach | |
198 *------------------------------------------------------------------- | |
199 */ | |
200 { | |
201 PALLOC (gmmreg_plmn_mode_req, GMMREG_PLMN_MODE_REQ); | |
202 | |
203 /* fill in primitive parameter: registration mode */ | |
204 gmmreg_plmn_mode_req -> net_selection_mode = net_selection_mode; | |
205 | |
206 PSEND (hCommGMM, gmmreg_plmn_mode_req); | |
207 } | |
208 | |
209 } | |
210 | |
211 /* | |
212 +-------------------------------------------------------------------+ | |
213 | PROJECT : GPRS (8441) MODULE : PSA_GMMS | | |
214 | ROUTINE : psaGMM_Config_req | | |
215 +-------------------------------------------------------------------+ | |
216 | |
217 PURPOSE : send a config request to GMM. | |
218 | |
219 */ | |
220 GLOBAL void psaGMM_Config_req( UBYTE cipher_on, UBYTE tlli_handling ) | |
221 { | |
222 TRACE_FUNCTION ("psaGMM_Config_req()"); | |
223 | |
224 { | |
225 PALLOC (gmmreg_config_req, GMMREG_CONFIG_REQ); | |
226 | |
227 gmmreg_config_req -> cipher_on = cipher_on; | |
228 gmmreg_config_req -> tlli_handling = tlli_handling; | |
229 | |
230 PSEND (hCommGMM, gmmreg_config_req); | |
231 } | |
232 | |
233 } | |
234 | |
235 #endif /* GPRS */ | |
236 /*==== EOF ========================================================*/ | |
237 |