comparison g23m/condat/ms/src/aci/psa_sndp.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 by SNDCP.
19 +-----------------------------------------------------------------------------
20 */
21
22 #if defined (GPRS) && defined (DTI)
23
24 #ifndef PSA_SNDP_C
25 #define PSA_SNDP_C
26 #endif
27
28 #include "aci_all.h"
29 /*==== INCLUDES ===================================================*/
30 #include "dti.h" /* functionality of the dti library */
31 #include "aci_cmh.h"
32 #include "ati_cmd.h"
33 #include "aci_cmd.h"
34
35 #include "aci.h"
36
37 #include "dti_conn_mng.h"
38 #include "dti_cntrl_mng.h"
39
40 #include "gaci.h"
41 #include "gaci_cmh.h"
42 #include "psa.h"
43 #include "psa_sm.h"
44 #include "cmh.h"
45 #include "cmh_sm.h"
46
47 #if defined (FF_WAP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E)
48 #include "wap_aci.h"
49 #include "psa_tcpip.h"
50 #endif /* defined (FF_WAP) || defined (FF_GPF_TCPIP) */
51
52 #ifdef FF_GPF_TCPIP
53 #include "dcm_utils.h"
54 #endif
55 #include "dcm_f.h"
56
57 /*==== CONSTANTS ==================================================*/
58
59 /*==== TYPES ======================================================*/
60
61 /*==== EXPORT =====================================================*/
62
63 /*==== VARIABLES ==================================================*/
64
65 /*==== FUNCTIONS ==================================================*/
66
67 EXTERN void cmhSNDCP_Counted( UBYTE nsapi,
68 ULONG octets_uplink,
69 ULONG octets_downlink,
70 ULONG packets_uplink,
71 ULONG packets_downlink );
72
73 /*
74 +-------------------------------------------------------------+
75 | PROJECT : GPRS (8441) MODULE : PSA_SM |
76 | STATE : finished ROUTINE : psa_sn_count_cnf |
77 +-------------------------------------------------------------+
78
79 PURPOSE : processes the SN_COUNT_CNF primitive send by SNDCP.
80 */
81 GLOBAL const void psa_sn_count_cnf ( T_SN_COUNT_CNF *sn_count_cnf )
82 {
83
84 TRACE_FUNCTION ("psa_sn_count_cnf()");
85
86 cmhSNDCP_Counted( sn_count_cnf->nsapi,
87 sn_count_cnf->octets_uplink,
88 sn_count_cnf->octets_downlink,
89 sn_count_cnf->packets_uplink,
90 sn_count_cnf->packets_downlink );
91
92 TRACE_EVENT_P4("Packet count: UL Octets:%d,DL Octets:%d,UL Packets:%d,DL Packets:%d",
93 sn_count_cnf->octets_uplink,sn_count_cnf->octets_downlink,
94 sn_count_cnf->packets_uplink,sn_count_cnf->packets_downlink);
95
96 PFREE (sn_count_cnf);
97 }
98
99 /*
100 +-------------------------------------------------------------+
101 | PROJECT : GPRS (8441) MODULE : PSA_SND |
102 | STATE : finished ROUTINE : psa_sn_switch_cnf |
103 +-------------------------------------------------------------+
104
105 PURPOSE : processes the SN_SWITCH_CNF primitive send by SNDCP.
106 */
107 GLOBAL const void psa_sn_switch_cnf ( T_SN_SWITCH_CNF *sn_switch_cnf )
108 {
109 T_DTI_ENTITY_ID dti_entity = DTI_ENTITY_IP;
110 if(is_gpf_tcpip_call()) {
111 GPF_TCPIP_STATEMENT(dti_entity = DTI_ENTITY_TCPIP);
112 }
113
114 TRACE_FUNCTION ("psa_sn_switch_cnf()");
115
116 cmhSM_context_connected( sn_switch_cnf->nsapi);
117
118 PFREE (sn_switch_cnf);
119
120 #if defined (CO_UDP_IP) || defined (FF_GPF_TCPIP)
121 /* if WAP over GPRS is in progress, request WAP configuration */
122 if (dti_entity EQ pdp_context[work_cids[cid_pointer] - 1].entity_id)
123 {
124 psaTCPIP_Configure(NULL, pdp_context[work_cids[cid_pointer] - 1].allocated_pdp_addr,
125 NULL, NULL, NULL, 1500, cmhSM_IP_activate_cb );
126 }
127 #endif /* CO_UDP_IP || FF_GPF_TCPIP */
128 }
129
130 #endif /* GPRS */