FreeCalypso > hg > fc-magnetite
comparison src/g23m-fad/ip/ip_tim.c @ 174:90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 12 Oct 2016 05:40:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
173:bf64d785238a | 174:90eb61ecd093 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-FaD (8411) | |
4 | Modul : IP_TIM | |
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 Modul defines the timer handling functions | |
18 | for the component | |
19 | Radio Link Protocol of the mobile station | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #define ENTITY_IP | |
24 | |
25 /*==== INCLUDES ===================================================*/ | |
26 | |
27 #include <string.h> | |
28 #include "typedefs.h" | |
29 #include "pconst.cdg" | |
30 #include "vsi.h" | |
31 #include "macdef.h" | |
32 #include "pconst.cdg" | |
33 #include "custom.h" | |
34 #include "gsm.h" | |
35 #include "cnf_ip.h" | |
36 #include "mon_ip.h" | |
37 #include "prim.h" | |
38 #include "pei.h" | |
39 #include "tok.h" | |
40 #include "ccdapi.h" | |
41 | |
42 #include "dti.h" | |
43 #include "ip.h" | |
44 #include "ip_udp.h" | |
45 | |
46 /*==== EXPORT =====================================================*/ | |
47 | |
48 /*==== PRIVAT =====================================================*/ | |
49 | |
50 /*==== VARIABLES ==================================================*/ | |
51 | |
52 /*==== FUNCTIONS ==================================================*/ | |
53 | |
54 /* | |
55 +--------------------------------------------------------------------+ | |
56 | PROJECT : GSM-FaD (8411) MODULE : IP_TIM | | |
57 | STATE : code ROUTINE : tim_reassembly | | |
58 +--------------------------------------------------------------------+ | |
59 | |
60 PURPOSE : Timeout of timer T_REASSEMBLY | |
61 | |
62 */ | |
63 | |
64 GLOBAL void tim_reassembly (/* USHORT layer, USHORT segm_server*/) | |
65 { | |
66 /* | |
67 * shall be replaced for multiple instances by | |
68 * | |
69 * UBYTE sel_dl_layer = layer; | |
70 * p_dl->pos_server = segm_server; | |
71 */ | |
72 /* T_HILA *p_ul = &(ip_data->hila); */ | |
73 T_LOLA *p_dl = &(ip_data->lola); | |
74 T_KER *p_ker = &(ip_data->ker); | |
75 | |
76 | |
77 TRACE_FUNCTION ("tim_reassembly()"); | |
78 | |
79 | |
80 | |
81 switch (GET_STATE (KER)) | |
82 { | |
83 | |
84 case CONNECTED: | |
85 { | |
86 | |
87 build_ip_packet(FALSE, B_ICMP_REASSEMBLE_TIMEOUT); | |
88 | |
89 p_dl->state_reassembly[p_dl->pos_server] = NO_SEGMENTS; | |
90 | |
91 /* | |
92 * If ready indication is received - send data_req at once | |
93 */ | |
94 | |
95 if(GET_STATE(HILA) EQ WAIT) | |
96 { | |
97 T_DTI2_DATA_REQ *dti_data_req; | |
98 | |
99 p_ker->send_icmp = FALSE; | |
100 | |
101 dti_data_req = p_ker->icmp_dti_data_req; | |
102 | |
103 dti_data_req = p_ker->icmp_dti_data_req; | |
104 dti_data_req->parameters.p_id = DTI_PID_IP; | |
105 dti_data_req->parameters.st_lines.st_flow = DTI_FLOW_ON; | |
106 dti_data_req->parameters.st_lines.st_line_sa = DTI_SA_ON; | |
107 dti_data_req->parameters.st_lines.st_line_sb = DTI_SB_ON; | |
108 dti_data_req->parameters.st_lines.st_break_len = DTI_BREAK_OFF; | |
109 | |
110 PACCESS (dti_data_req); | |
111 { | |
112 PPASS(dti_data_req, dti_data_ind, DTI2_DATA_IND); | |
113 dti_send_data(ip_hDTI, IP_DTI_DEF_INSTANCE, IP_DTI_LL_INTERFACE, | |
114 IP_DTI_DEF_CHANNEL, dti_data_ind); | |
115 } | |
116 dti_start(ip_hDTI, IP_DTI_DEF_INSTANCE, IP_DTI_LL_INTERFACE, | |
117 IP_DTI_DEF_CHANNEL); | |
118 SET_STATE(HILA, IDLE); | |
119 } | |
120 else | |
121 | |
122 /* | |
123 * Send the ICMP-Message later on after ready indication | |
124 */ | |
125 | |
126 p_ker->send_icmp = TRUE; | |
127 } | |
128 break; | |
129 | |
130 default: | |
131 break; | |
132 } | |
133 | |
134 /* | |
135 * Free and stop the timer | |
136 */ | |
137 p_dl->timer_reass_running[p_dl->pos_server] = FALSE; | |
138 } | |
139 | |
140 /* | |
141 +--------------------------------------------------------------------+ | |
142 | PROJECT : GSM-FaD (8411) MODULE : IP_TIM | | |
143 | STATE : code ROUTINE : tim_init_timer | | |
144 +--------------------------------------------------------------------+ | |
145 | |
146 PURPOSE : Initialise Time-out FIFO and configuration data. | |
147 | |
148 */ | |
149 | |
150 GLOBAL BOOL tim_init_timer (void) | |
151 { | |
152 return TRUE; | |
153 } | |
154 | |
155 /* | |
156 +--------------------------------------------------------------------+ | |
157 | PROJECT : GSM-FaD (8411) MODULE : IP_TIM | | |
158 | STATE : code ROUTINE : tim_set_timeout_flag | | |
159 +--------------------------------------------------------------------+ | |
160 | |
161 PURPOSE : Set timeout flag according to timer handle | |
162 | |
163 */ | |
164 /* | |
165 +--------------------------------------------------------------------+ | |
166 | PROJECT : GSM-FaD (8411) MODULE : IP_TIM | | |
167 | STATE : code ROUTINE : tim_flush_fifo | | |
168 +--------------------------------------------------------------------+ | |
169 | |
170 PURPOSE : Flush timer fifo for timer handle | |
171 | |
172 */ | |
173 /* | |
174 +--------------------------------------------------------------------+ | |
175 | PROJECT : GSM-FaD (8411) MODULE : IP_TIM | | |
176 | STATE : code ROUTINE : tim_handle_timeout | | |
177 +--------------------------------------------------------------------+ | |
178 | |
179 PURPOSE : execute timeout function depending on t_flag | |
180 | |
181 */ | |
182 |