comparison src/g23m-gprs/sm/sm_memory_handler.h @ 1:d393cd9bb723

src/g23m-*: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:40:46 +0000
parents
children
comparison
equal deleted inserted replaced
0:b6a5e36de839 1:d393cd9bb723
1 /*----------------------------------------------------------------------------
2 | Project : 3G PS
3 | Module : SM
4 +-----------------------------------------------------------------------------
5 | Copyright 2003 Texas Instruments.
6 | All rights reserved.
7 |
8 | This file is confidential and a trade secret of Texas
9 | Instruments .
10 | The receipt of or possession of this file does not convey
11 | any rights to reproduce or disclose its contents or to
12 | manufacture, use, or sell anything it may describe, in
13 | whole, or in part, without the specific written consent of
14 | Texas Instruments.
15 +-----------------------------------------------------------------------------
16 | Purpose: Memory allocation function definition for the SM Entity.
17 | For design details, see:
18 | 8010.908 SM Detailed Specification
19 +---------------------------------------------------------------------------*/
20
21 /*==== DECLARATION CONTROL =================================================*/
22
23 #ifndef SM_MEMORY_HANDLER_H
24 #define SM_MEMORY_HANDLER_H
25
26 /*==== INCLUDES =============================================================*/
27
28 /*==== CONSTS ===============================================================*/
29
30 /*==== TYPES ================================================================*/
31
32 /*==== EXPORTS ==============================================================*/
33
34 /* Memory allocation/free functions */
35 void sm_pfree(/*@only@*/ /*@out@*/ /*@null@*/void *data);
36
37 /*************************************************************/
38 /* Functions for managing context data structures and arrays */
39 /*************************************************************/
40
41 /*@only@*/ /*@null@*/
42 struct T_SM_CONTEXT_DATA *
43 sm_allocate_context_data(void);
44
45 void sm_assign_context_data_to_nsapi (/*@only@*/
46 struct T_SM_CONTEXT_DATA *context,
47 int /*@alt U8@*/ nsapi);
48
49 /*@observer@*/
50 struct T_SM_CONTEXT_DATA *
51 sm_get_context_data_from_nsapi (int /*@alt U8@*/ nsapi);
52
53 /*@observer@*/ /*@null@*/
54 struct T_SM_CONTEXT_DATA *
55 sm_get_context_data_from_ti (int /*@alt U8@*/ ti);
56
57 void sm_free_context_data (/*@only@*/
58 struct T_SM_CONTEXT_DATA *context);
59
60 void sm_free_context_data_by_nsapi (int /*@alt U8@*/ nsapi);
61
62 /*@observer@*/ /*@null@*/
63 struct T_SM_CONTEXT_DATA *
64 sm_insert_mt_context_data (int /*@alt U8@*/ ti);
65
66 /*@null@*/ /*@only@*/
67 struct T_SM_CONTEXT_DATA *
68 sm_extract_mt_context_data (int /*@alt U8@*/ ti);
69
70 void sm_free_pending_mt_context_by_index(U16 index);
71
72 U16 sm_linked_nsapis (U8 ti);
73
74 void sm_allocate_and_copy_coded_msg (struct T_SM_CONTEXT_DATA *context,
75 U8 est_cause,
76 /*@in@*/ T_sdu *msg);
77
78 void sm_free_coded_msg (struct T_SM_CONTEXT_DATA *context);
79
80 /***********************************************************************/
81 /* Network Control Managed Memory Handler Functions */
82 /***********************************************************************/
83
84 void sm_nw_allocate_and_copy_requested_pco(/*@special@*/
85 struct T_SM_CONTEXT_DATA *context,
86 size_t /*@alt U8,U16@*/ pco_len,
87 /*@unique@*/ U8 *pco);
88
89 void sm_nw_allocate_and_copy_negotiated_pco(/*@special@*/
90 struct T_SM_CONTEXT_DATA *context,
91 size_t /*@alt U8@*/ pco_len,
92 /*@unique@*/ U8 *pco);
93
94 void sm_nw_free_requested_pco (/*@special@*/
95 struct T_SM_CONTEXT_DATA *context);
96
97 void sm_nw_free_negotiated_pco (/*@special@*/
98 struct T_SM_CONTEXT_DATA *context);
99
100 void sm_nw_allocate_and_copy_apn (/*@special@*/
101 struct T_SM_CONTEXT_DATA *context,
102 U8 c_apn, /*@unique@*/ U8 *apn);
103
104 void sm_nw_free_apn (/*@special@*/
105 struct T_SM_CONTEXT_DATA *context);
106
107 BOOL sm_nw_is_address_and_apn_equal (struct T_SM_CONTEXT_DATA *context,
108 /*@observer@*/T_NAS_ip *context_address,
109 /*@observer@*/T_M_SM_address *msg_address,
110 U8 v_apn, T_M_SM_apn *apn);
111
112 void sm_nw_allocate_and_copy_requested_tft(/*@special@*/
113 struct T_SM_CONTEXT_DATA *context,
114 /*@in@*/ T_NAS_tft *tft);
115
116 void sm_nw_allocate_active_tft (/*@special@*/
117 struct T_SM_CONTEXT_DATA *context);
118
119 void sm_nw_free_requested_tft (/*@special@*/
120 struct T_SM_CONTEXT_DATA *context);
121
122 void sm_nw_free_active_tft (/*@special@*/
123 struct T_SM_CONTEXT_DATA *context);
124
125 void sm_nw_store_requested_address (struct T_SM_CONTEXT_DATA *context,
126 U8 pdp_type,
127 T_NAS_ctrl_ip_address ctrl_ip_address,
128 T_NAS_ip_address *ip_address);
129
130 void sm_nw_store_negotiated_address (struct T_SM_CONTEXT_DATA *context,
131 T_M_SM_address *address,
132 U8 v_address);
133
134 void sm_nw_copy_negotiated_address_to_requested(struct T_SM_CONTEXT_DATA *);
135
136 BOOL sm_is_address_changed_with_reactivation(struct T_SM_CONTEXT_DATA *context,
137 T_M_SM_address *address,
138 U8 v_address);
139 #endif /* SM_MEMORY_HANDLER_H */
140
141 /*==== END OF FILE ==========================================================*/