FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/aci/psa_ipas.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 : GSM-PS (6147) | |
4 | Modul : PSA_IPAS | |
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 : | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 #if defined (FF_WAP) || defined (FF_SAT_E) | |
21 | |
22 #ifndef PSA_IPAS_C | |
23 #define PSA_IPAS_C | |
24 #endif | |
25 | |
26 #include "aci_all.h" | |
27 /*==== INCLUDES ===================================================*/ | |
28 #include "aci_cmh.h" | |
29 #include "ati_cmd.h" | |
30 #include "aci_cmd.h" | |
31 #include "dti.h" /* functionality of the dti library */ | |
32 | |
33 #include "aci.h" | |
34 #include "psa.h" | |
35 //#include "psa_l2r.h" | |
36 #include "psa_cc.h" | |
37 #include "aci_fd.h" | |
38 #include "cmh.h" | |
39 #include "dti_conn_mng.h" | |
40 //#include "cmh_l2r.h" | |
41 | |
42 #include "wap_aci.h" | |
43 #include "psa_tcpip.h" | |
44 | |
45 /*==== CONSTANTS ==================================================*/ | |
46 | |
47 | |
48 /*==== TYPES ======================================================*/ | |
49 | |
50 | |
51 /*==== EXPORT =====================================================*/ | |
52 | |
53 | |
54 /*==== VARIABLES ==================================================*/ | |
55 | |
56 | |
57 /*==== FUNCTIONS ==================================================*/ | |
58 | |
59 | |
60 /* | |
61 +-------------------------------------------------------------------+ | |
62 | PROJECT : GSM-PS (6147) MODULE : PSA_IPA | | |
63 | ROUTINE : psaIPA_Config | | |
64 +-------------------------------------------------------------------+ | |
65 | |
66 PURPOSE : Configurate or disconfigurate IPA. | |
67 | |
68 */ | |
69 | |
70 GLOBAL void psaIPA_Config(ULONG ip, USHORT max_trans_unit, T_ACI_IPA_DIRC dirc | |
71 /*T_ACI_AT_CMD at_cmd */) | |
72 { | |
73 /* dirc = IPA_CONN if IPA is to be activated | |
74 dirc = IPA_DSC if IPA i to be deactivated */ | |
75 | |
76 TRACE_FUNCTION("psaIPA_Config()") ; | |
77 | |
78 switch( dirc ) | |
79 { | |
80 | |
81 case ( IPA_CONN ): | |
82 wap_state = IPA_Configuration; | |
83 { | |
84 PALLOC(ipa_config_req,IPA_CONFIG_REQ); | |
85 ipa_config_req -> ip = ip; | |
86 ipa_config_req->peer_ip = 0; | |
87 ipa_config_req->cmd = IPA_CONFIG_UP; | |
88 ipa_config_req -> mtu = max_trans_unit; | |
89 | |
90 PSENDX(IP,ipa_config_req); | |
91 } | |
92 break; | |
93 | |
94 case ( IPA_DSC ): | |
95 wap_state = IPA_Deconfiguration; | |
96 { | |
97 PALLOC(ipa_config_req,IPA_CONFIG_REQ); | |
98 ipa_config_req -> ip = 0; | |
99 ipa_config_req->peer_ip = 0; | |
100 ipa_config_req->cmd = IPA_CONFIG_DOWN; | |
101 ipa_config_req -> mtu = 0; | |
102 | |
103 PSENDX(IP,ipa_config_req); | |
104 } | |
105 break; | |
106 } | |
107 } | |
108 | |
109 | |
110 /* | |
111 +-------------------------------------------------------------------+ | |
112 | PROJECT : GSM-PS (6147) MODULE : PSA_IPAS | | |
113 | ROUTINE : psaIPA_Dti_Req | | |
114 +-------------------------------------------------------------------+ | |
115 | |
116 PURPOSE : connect IP | |
117 | |
118 */ | |
119 | |
120 GLOBAL void psaIPA_Dti_Req(ULONG link_id, UBYTE peer_to_connect_to, UBYTE dti_conn) | |
121 { | |
122 | |
123 PALLOC( ipa_dti_req, IPA_DTI_REQ); | |
124 | |
125 TRACE_FUNCTION("psaIPA_Dti_Req"); | |
126 | |
127 | |
128 ipa_dti_req -> dti_conn = dti_conn; | |
129 ipa_dti_req -> link_id = link_id; | |
130 | |
131 if (dti_conn EQ IPA_CONNECT_DTI) | |
132 { | |
133 switch( peer_to_connect_to ) | |
134 { | |
135 case( DTI_ENTITY_UDP ): | |
136 ipa_dti_req -> dti_direction = DTI_CHANNEL_TO_HIGHER_LAYER; | |
137 strcpy((char*)ipa_dti_req->entity_name, dti_entity_name[DTI_ENTITY_UDP].name); | |
138 break; | |
139 #ifdef GPRS | |
140 case( DTI_ENTITY_SNDCP ): | |
141 ipa_dti_req -> dti_direction = DTI_CHANNEL_TO_LOWER_LAYER; | |
142 strcpy((char*)ipa_dti_req->entity_name, dti_entity_name[DTI_ENTITY_SNDCP].name); | |
143 break; | |
144 #endif | |
145 case( DTI_ENTITY_PPPC ): | |
146 ipa_dti_req -> dti_direction = DTI_CHANNEL_TO_LOWER_LAYER; | |
147 strcpy((char*)ipa_dti_req->entity_name, dti_entity_name[DTI_ENTITY_PPPC].name); | |
148 break; | |
149 default: | |
150 TRACE_EVENT("unknown conn_peer_Id: IPA_DTI_REQ not sent"); | |
151 PFREE(ipa_dti_req); | |
152 return; | |
153 } | |
154 } | |
155 | |
156 PSENDX( IP, ipa_dti_req ); | |
157 } | |
158 | |
159 | |
160 #endif /* WAP || SAT E */ |