comparison src/aci2/aci/psa_udpas.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 (6147)
4 | Modul : PSA_UDPAS
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_UDPAS_C
23 #define PSA_UDPAS_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 #include "dti_conn_mng.h"
33 #include "dti_cntrl_mng.h"
34
35 #include "aci.h"
36 #include "psa.h"
37 #include "psa_cc.h"
38 #include "psa_ss.h"
39 #include "aoc.h"
40
41 #if !defined (MFW)
42 #include "aci_io.h"
43 #endif
44
45 #include "wap_aci.h"
46
47 #include "psa_tcpip.h"
48 #include "psa_sim.h"
49 /*==== CONSTANTS ==================================================*/
50
51 /*==== TYPES ======================================================*/
52
53 /*==== EXPORT =====================================================*/
54
55 /*==== VARIABLES ==================================================*/
56
57 /*==== FUNCTIONS ==================================================*/
58
59
60 /*
61 +-------------------------------------------------------------------+
62 | PROJECT : GSM-PS (6147) MODULE : PSA_UDPAS |
63 | ROUTINE : psaUDPA_Config |
64 +-------------------------------------------------------------------+
65
66 PURPOSE : setup UDPA
67
68 */
69
70 GLOBAL void psaUDPA_Config ( UBYTE dirc )
71 {
72
73 switch( dirc )
74 {
75
76 case ( UDPA_CONFIG_UP ):
77 wap_state = UDPA_Configuration;
78 {
79 PALLOC(udpa_config_req,UDPA_CONFIG_REQ);
80 udpa_config_req->cmd = UDPA_CONFIG_UP;
81 PSENDX(UDP,udpa_config_req);
82 }
83 break;
84
85 case ( UDPA_CONFIG_DOWN ):
86 wap_state = UDPA_Deconfiguration;
87 {
88 PALLOC(udpa_config_req,UDPA_CONFIG_REQ);
89 udpa_config_req->cmd = UDPA_CONFIG_DOWN;
90 PSENDX(UDP,udpa_config_req);
91 }
92 break;
93 }
94 }
95
96
97 /*
98 +-------------------------------------------------------------------+
99 | PROJECT : GSM-PS (6147) MODULE : PSA_UDPAS |
100 | ROUTINE : psaUDPA_Dti_Req |
101 +-------------------------------------------------------------------+
102
103 PURPOSE : connect UDP
104
105 */
106
107 GLOBAL void psaUDPA_Dti_Req(T_DTI_CONN_LINK_ID dti_id, UBYTE peer_to_connect_to, UBYTE dti_conn)
108 {
109
110 PALLOC( udpa_dti_req, UDPA_DTI_REQ);
111
112
113 TRACE_FUNCTION("psaUDPA_Dti_Req");
114
115
116 udpa_dti_req -> dti_conn = dti_conn;
117 udpa_dti_req -> link_id = dti_id;
118
119 if (dti_conn EQ UDPA_CONNECT_DTI)
120 {
121
122 switch( peer_to_connect_to )
123 {
124 case( DTI_ENTITY_IP ):
125 udpa_dti_req -> dti_direction = DTI_CHANNEL_TO_LOWER_LAYER;
126 strcpy((char*)udpa_dti_req->entity_name, dti_entity_name[DTI_ENTITY_IP].name);
127 break;
128 case( DTI_ENTITY_WAP ):
129 udpa_dti_req -> dti_direction = DTI_CHANNEL_TO_HIGHER_LAYER;
130 strcpy((char*)udpa_dti_req->entity_name, dti_entity_name[DTI_ENTITY_WAP].name);
131
132 if (dti_cntrl_set_conn_parms(dti_id, DTI_ENTITY_UDP, DTI_INSTANCE_NOTPRESENT, DTI_SUB_NO_NOTPRESENT) EQ FALSE)
133 {
134 return;
135 }
136
137 break;
138 #ifdef FF_SAT_E
139 case( DTI_ENTITY_SIM ):
140 udpa_dti_req -> dti_direction = DTI_CHANNEL_TO_HIGHER_LAYER;
141 strcpy((char*)udpa_dti_req->entity_name, dti_entity_name[DTI_ENTITY_SIM].name);
142 break;
143 #endif /* FF_SAT_E */
144 default:
145 TRACE_EVENT("unknown conn_peer_Id: UDPA_DTI_REQ not sent");
146 PFREE(udpa_dti_req);
147 return;
148 }
149 }
150
151 PSENDX( UDP, udpa_dti_req );
152
153 }
154
155
156
157 #endif /* of FF_WAP or SAT E */