FreeCalypso > hg > fc-magnetite
annotate src/aci2/aci/psa_pppp.c @ 204:e2714de970a4
TCS2/TCS3 hybrid config links after adding cl.lib
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Oct 2016 06:21:03 +0000 |
parents | 93999a60b835 |
children |
rev | line source |
---|---|
3
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : GSM-PS (6147) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : PSA_PPPP |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : This module defines the processing functions for the |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 | primitives sent to the protocol stack adapter by the PPP |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 | module. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #ifdef DTI |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #if defined (FF_WAP) || defined (FF_TCP_IP) || defined (FF_GPF_TCPIP) || defined (FF_SAT_E) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #ifndef PSA_PPPP_C |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #define PSA_PPPP_C |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #endif /* of PSA_PPPP_C */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "aci_all.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 /*==== INCLUDES ===================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "aci_cmh.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "ati_cmd.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "aci_cmd.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "dti.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "dti_conn_mng.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "dti_cntrl_mng.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include "aci_fd.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "psa.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #include "psa_l2r.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "psa_cc.h" /* for getting the NO_ENTRY definition */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #include "wap_aci.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "psa_ppp_w.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include "cmh.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include "cmh_ppp.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 /*==== CONSTANTS ==================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 /*==== TYPES ======================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 /*==== EXPORT =====================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 /*==== VARIABLES ==================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 /*==== FUNCTIONS ==================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 | PROJECT : GSM-PS (6147) MODULE : PSA_PPP | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 | ROUTINE : psa_wppp_establish_cnf | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 PURPOSE : processes the PPP_ESTABLISH_CNF primitive sent by PPP. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 GLOBAL const void psa_wppp_establish_cnf(T_PPP_ESTABLISH_CNF *ppp_establish_cnf) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 ULONG ip_address; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 USHORT max_receive_unit; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 ULONG dns1, dns2 ; /* Name server addresses. */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 TRACE_FUNCTION ("psa_wppp_establish_cnf()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 if(pppShrdPrm.state EQ PPP_ESTABLISH) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 TRACE_EVENT("PPP_ESTABLISH_CNF received: PPP activated"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 pppShrdPrm.state = PPP_ESTABLISHED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 ip_address = ppp_establish_cnf -> ip; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 TRACE_EVENT_P4 ("IP Address: %03u.%03u.%03u.%03u", (ip_address & 0xff000000) >> 24, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 (ip_address & 0x00ff0000) >> 16, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 (ip_address & 0x0000ff00) >> 8, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 (ip_address & 0x000000ff) ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 max_receive_unit = ppp_establish_cnf -> mru; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 TRACE_EVENT_P1 ("MRU : %u", max_receive_unit); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 dns1 = ppp_establish_cnf->dns1 ; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 dns2 = ppp_establish_cnf->dns2 ; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 cmhPPP_Established(ip_address, max_receive_unit, dns1, dns2); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 TRACE_EVENT("unexpected PPP_ESTABLISH_CNF primitive received"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 PFREE(ppp_establish_cnf); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 | PROJECT : GSM-PS (6147) MODULE : PSA_PPP | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 | ROUTINE : psa_ppp_dti_connected_ind| |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 PURPOSE : processes the PPP_DTI_CONNECTED_IND primitive sent by PPP. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 GLOBAL const void psa_wppp_dti_connected_ind(T_PPP_DTI_CONNECTED_IND |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 *ppp_dti_connected_ind) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 TRACE_FUNCTION("psa_wppp_dti_connected_ind()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 if (ppp_dti_connected_ind->connected_direction EQ PPP_DTI_CONN_PEER) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 dti_cntrl_entity_connected( peer_link_id, DTI_ENTITY_PPPC, DTI_OK ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 else if (ppp_dti_connected_ind->connected_direction EQ PPP_DTI_CONN_PROT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 dti_cntrl_entity_connected( prot_link_id, DTI_ENTITY_PPPC, DTI_OK ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 PFREE(ppp_dti_connected_ind); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 | PROJECT : GSM-PS (6147) MODULE : PSA_PPP | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 | ROUTINE : psa_wppp_terminate_ind | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 PURPOSE : processes the PPP_TERMINATE_IND primitive sent by PPP. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 GLOBAL const void psa_wppp_terminate_ind(T_PPP_TERMINATE_IND *ppp_terminate_ind) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 TRACE_FUNCTION("psa_wppp_terminate_ind()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 if (Wap_Call) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 * PPP is terminated before - second termination indication received |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 if(pppShrdPrm.state EQ PPP_TERMINATED) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 TRACE_EVENT("Unexpected: PPP_TERMINATE_IND received twice"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 PFREE(ppp_terminate_ind); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 return; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 * Termination after established and by terminate |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 if((pppShrdPrm.state EQ PPP_ESTABLISHED) OR (pppShrdPrm.state EQ PPP_TERMINATE)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 TRACE_EVENT("PPP_TERMINATE_IND, PPP terminate as requested"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 pppShrdPrm.state = PPP_TERMINATED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 cmhPPP_Terminated(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 PFREE(ppp_terminate_ind); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 return; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 * PPP send a terminate indication by establish request |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 if(pppShrdPrm.state EQ PPP_ESTABLISH) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 TRACE_EVENT("PPP_TERMINATE_IND, PPP terminate by establish"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 pppShrdPrm.state = PPP_TERMINATED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 // cmhIPA_Deconfigurated(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 cmhPPP_Terminated(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 PFREE(ppp_terminate_ind); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 return; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 pppShrdPrm.state = PPP_TERMINATED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 TRACE_EVENT("Unexpected: PPP_TERMINATE_IND, PPP in wrong ACI PPP state"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 TRACE_EVENT("Unexpected: Not a WAP Call"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 PFREE(ppp_terminate_ind); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 #endif /* of FF_WAP or FF_TCP_IP OR FF_GPF_TCPIP or FF_SAT_E */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 #endif /* DTI */ |