blob: 170ebab0b7f78aecab9ccd9ad1cb2dc8acca90cd [file] [log] [blame]
Harald Welte52b1f982008-12-23 20:25:15 +00001#ifndef _GSM_DATA_H
2#define _GSM_DATA_H
3
4#include <sys/types.h>
5
Harald Welte4bfdfe72009-06-10 23:11:52 +08006enum gsm_phys_chan_config {
7 GSM_PCHAN_NONE,
8 GSM_PCHAN_CCCH,
9 GSM_PCHAN_CCCH_SDCCH4,
10 GSM_PCHAN_TCH_F,
11 GSM_PCHAN_TCH_H,
12 GSM_PCHAN_SDCCH8_SACCH8C,
Harald Weltea1499d02009-10-24 10:25:50 +020013 GSM_PCHAN_PDCH, /* GPRS PDCH */
14 GSM_PCHAN_TCH_F_PDCH, /* TCH/F if used, PDCH otherwise */
Harald Welte4bfdfe72009-06-10 23:11:52 +080015 GSM_PCHAN_UNKNOWN,
16};
17
18enum gsm_chan_t {
19 GSM_LCHAN_NONE,
20 GSM_LCHAN_SDCCH,
21 GSM_LCHAN_TCH_F,
22 GSM_LCHAN_TCH_H,
23 GSM_LCHAN_UNKNOWN,
24};
25
Harald Welteeab84a12009-12-13 10:53:12 +010026/* RRLP mode of operation */
27enum rrlp_mode {
28 RRLP_MODE_NONE,
29 RRLP_MODE_MS_BASED,
30 RRLP_MODE_MS_PREF,
31 RRLP_MODE_ASS_PREF,
32};
Harald Welte4bfdfe72009-06-10 23:11:52 +080033
34/* Channel Request reason */
35enum gsm_chreq_reason_t {
36 GSM_CHREQ_REASON_EMERG,
37 GSM_CHREQ_REASON_PAG,
38 GSM_CHREQ_REASON_CALL,
39 GSM_CHREQ_REASON_LOCATION_UPD,
40 GSM_CHREQ_REASON_OTHER,
41};
42
Harald Weltedfe6c7d2010-02-20 16:24:02 +010043#include <osmocore/timer.h>
Holger Freyther1adb4ff2009-02-04 00:04:52 +000044#include <openbsc/gsm_04_08.h>
Harald Welte9943c5b2009-07-29 15:41:29 +020045#include <openbsc/abis_rsl.h>
Harald Welte4bfdfe72009-06-10 23:11:52 +080046#include <openbsc/mncc.h>
Harald Weltedfe6c7d2010-02-20 16:24:02 +010047#include <osmocore/tlv.h>
48#include <osmocore/bitvec.h>
49#include <osmocore/statistics.h>
50#include <osmocore/gsm_utils.h>
51#include <osmocore/utils.h>
Harald Welte8470bf22008-12-25 23:28:35 +000052
Harald Welte85770c72009-01-18 17:47:32 +000053#define TRX_NR_TS 8
Harald Welte8470bf22008-12-25 23:28:35 +000054#define TS_MAX_LCHAN 8
Harald Welte52b1f982008-12-23 20:25:15 +000055
56#define HARDCODED_ARFCN 123
Harald Welte02b0e092009-02-28 13:11:07 +000057#define HARDCODED_TSC 7
Harald Welte78f2f502009-05-23 16:56:52 +000058#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
Harald Welte52b1f982008-12-23 20:25:15 +000059
Harald Welte63589be2009-08-06 17:38:10 +020060/* for multi-drop config */
61#define HARDCODED_BTS0_TS 1
62#define HARDCODED_BTS1_TS 6
63#define HARDCODED_BTS2_TS 11
64
Harald Welte8e1e3ee2009-02-01 13:32:45 +000065enum gsm_hooks {
66 GSM_HOOK_NM_SWLOAD,
Harald Welte0932d1e2009-02-16 22:53:52 +000067 GSM_HOOK_RR_PAGING,
Sylvain Munaut30a15382009-12-24 00:27:26 +010068 GSM_HOOK_RR_SECURITY,
Harald Welte0932d1e2009-02-16 22:53:52 +000069};
70
71enum gsm_paging_event {
72 GSM_PAGING_SUCCEEDED,
73 GSM_PAGING_EXPIRED,
Holger Freyther85a7b362009-04-18 13:48:55 +020074 GSM_PAGING_OOM,
Harald Welte8e1e3ee2009-02-01 13:32:45 +000075};
76
Harald Welte4511d892010-04-18 15:51:20 +020077enum bts_gprs_mode {
78 BTS_GPRS_NONE = 0,
79 BTS_GPRS_GPRS = 1,
80 BTS_GPRS_EGPRS = 2,
81};
82
Harald Welte0809d792010-04-30 14:36:25 +020083/* the data structure stored in msgb->cb for openbsc apps */
84struct openbsc_msgb_cb {
Harald Weltefd3fa1d2010-05-02 09:50:42 +020085 unsigned char *bssgph;
86 unsigned char *llch;
Harald Welte44f1c272010-04-30 19:54:29 +020087
Harald Welte11d7c102010-05-02 11:54:55 +020088 /* Cell Identifier */
89 unsigned char *bssgp_cell_id;
90
Harald Weltee6afd602010-05-02 11:19:37 +020091 /* Identifiers of a BTS, equal to 'struct bssgp_bts_ctx' */
Harald Welte44f1c272010-04-30 19:54:29 +020092 u_int16_t nsei;
93 u_int16_t bvci;
94
Harald Weltee6afd602010-05-02 11:19:37 +020095 /* Identifier of a MS (inside BTS), equal to 'struct sgsn_mm_ctx' */
Harald Welte0809d792010-04-30 14:36:25 +020096 u_int32_t tlli;
Harald Welte44f1c272010-04-30 19:54:29 +020097} __attribute__((packed));
Harald Welte0809d792010-04-30 14:36:25 +020098#define OBSC_MSGB_CB(__msgb) ((struct openbsc_msgb_cb *)&((__msgb)->cb[0]))
Harald Welte943c5bc2010-04-30 16:33:12 +020099#define msgb_tlli(__x) OBSC_MSGB_CB(__x)->tlli
Harald Welte44f1c272010-04-30 19:54:29 +0200100#define msgb_nsei(__x) OBSC_MSGB_CB(__x)->nsei
101#define msgb_bvci(__x) OBSC_MSGB_CB(__x)->bvci
Harald Weltefd3fa1d2010-05-02 09:50:42 +0200102#define msgb_gmmh(__x) (__x)->l3h
103#define msgb_bssgph(__x) OBSC_MSGB_CB(__x)->bssgph
Harald Welte721961c2010-05-02 21:29:36 +0200104#define msgb_bssgp_len(__x) ((__x)->tail - (uint8_t *)msgb_bssgph(__x))
Harald Welte11d7c102010-05-02 11:54:55 +0200105#define msgb_bcid(__x) OBSC_MSGB_CB(__x)->bssgp_cell_id
Harald Weltefd3fa1d2010-05-02 09:50:42 +0200106#define msgb_llch(__x) OBSC_MSGB_CB(__x)->llch
Harald Welte0809d792010-04-30 14:36:25 +0200107
Holger Hans Peter Freyther9c595b72010-06-15 11:20:52 +0800108#define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
109
Sylvain Munaut30a15382009-12-24 00:27:26 +0100110enum gsm_security_event {
111 GSM_SECURITY_NOAVAIL,
112 GSM_SECURITY_AUTH_FAILED,
113 GSM_SECURITY_SUCCEEDED,
114};
115
Harald Welte8e1e3ee2009-02-01 13:32:45 +0000116struct msgb;
117typedef int gsm_cbfn(unsigned int hooknum,
118 unsigned int event,
119 struct msgb *msg,
120 void *data, void *param);
121
Holger Freytherc6ea9db2008-12-30 19:18:21 +0000122/*
123 * Use the channel. As side effect the lchannel recycle timer
124 * will be started.
125 */
Harald Welteb9c758b2009-07-05 14:02:46 +0200126#define LCHAN_RELEASE_TIMEOUT 20, 0
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100127#define use_subscr_con(con) \
128 do { (con)->use_count++; \
Harald Welted0c19142009-12-24 11:46:44 +0100129 DEBUGP(DREF, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) increases usage to: %d\n", \
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100130 (con)->lchan->ts->trx->bts->nr, (con)->lchan->ts->trx->nr, (con)->lchan->ts->nr, \
131 (con)->lchan->nr, (con)->use_count); \
132 bsc_schedule_timer(&(con)->release_timer, LCHAN_RELEASE_TIMEOUT); } while(0);
Holger Freytherc6ea9db2008-12-30 19:18:21 +0000133
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100134#define put_subscr_con(con) \
135 do { (con)->use_count--; \
Harald Welted0c19142009-12-24 11:46:44 +0100136 DEBUGP(DREF, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) decreases usage to: %d\n", \
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100137 (con)->lchan->ts->trx->bts->nr, (con)->lchan->ts->trx->nr, (con)->lchan->ts->nr, \
138 (con)->lchan->nr, (con)->use_count); \
Holger Freyther4f584c32009-06-02 02:55:07 +0000139 } while(0);
140
Holger Freytherc6ea9db2008-12-30 19:18:21 +0000141
Sylvain Munaut47193072009-12-27 21:56:14 +0100142/* Real authentication information containing Ki */
143enum gsm_auth_algo {
144 AUTH_ALGO_NONE,
145 AUTH_ALGO_XOR,
146 AUTH_ALGO_COMP128v1,
147};
148
149struct gsm_auth_info {
150 enum gsm_auth_algo auth_algo;
151 unsigned int a3a8_ki_len;
152 u_int8_t a3a8_ki[16];
153};
154
155struct gsm_auth_tuple {
156 int use_count;
157 int key_seq;
158 u_int8_t rand[16];
159 u_int8_t sres[4];
160 u_int8_t kc[8];
161};
Sylvain Munautb48216f2010-06-09 12:45:37 +0200162#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */
Sylvain Munaut47193072009-12-27 21:56:14 +0100163
164
Harald Welte49f48b82009-02-17 15:29:33 +0000165struct gsm_lchan;
166struct gsm_subscriber;
Harald Welte4bfdfe72009-06-10 23:11:52 +0800167struct gsm_mncc;
Harald Welte805f6442009-07-28 18:25:29 +0200168struct rtp_socket;
Holger Hans Peter Freytherabcddf12010-06-14 18:20:15 +0800169struct bsc_api;
Harald Welte49f48b82009-02-17 15:29:33 +0000170
Harald Weltebbcc7a52009-02-14 19:45:44 +0000171/* Network Management State */
172struct gsm_nm_state {
173 u_int8_t operational;
174 u_int8_t administrative;
Harald Welte8c1d0e42009-02-15 03:38:12 +0000175 u_int8_t availability;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000176};
Harald Weltebbcc7a52009-02-14 19:45:44 +0000177
Holger Freyther73487a22008-12-31 18:53:57 +0000178/*
179 * LOCATION UPDATING REQUEST state
180 *
181 * Our current operation is:
182 * - Get imei/tmsi
183 * - Accept/Reject according to global policy
184 */
185struct gsm_loc_updating_operation {
186 struct timer_list updating_timer;
Holger Hans Peter Freyther251aa912009-10-27 10:42:28 +0100187 unsigned int waiting_for_imsi : 1;
188 unsigned int waiting_for_imei : 1;
Sylvain Munaut2030a2a2010-06-10 13:36:59 +0200189 unsigned int key_seq : 4;
Holger Freyther73487a22008-12-31 18:53:57 +0000190};
191
Sylvain Munaut30a15382009-12-24 00:27:26 +0100192/*
193 * AUTHENTICATION/CIPHERING state
194 */
195struct gsm_security_operation {
196 struct gsm_auth_tuple atuple;
197 gsm_cbfn *cb;
198 void *cb_data;
199};
200
Harald Weltef7c28b02009-12-21 13:30:17 +0100201/* Maximum number of neighbor cells whose average we track */
202#define MAX_NEIGH_MEAS 10
203/* Maximum size of the averaging window for neighbor cells */
204#define MAX_WIN_NEIGH_AVG 10
205
206/* processed neighbor measurements for one cell */
207struct neigh_meas_proc {
208 u_int16_t arfcn;
209 u_int8_t bsic;
210 u_int8_t rxlev[MAX_WIN_NEIGH_AVG];
211 unsigned int rxlev_cnt;
212 u_int8_t last_seen_nr;
213};
214
Harald Welte08d91a52009-08-30 15:37:11 +0900215#define MAX_A5_KEY_LEN (128/8)
Sylvain Munaute824d9c2010-06-11 00:19:42 +0200216#define A38_XOR_MIN_KEY_LEN 12
217#define A38_XOR_MAX_KEY_LEN 16
Sylvain Munaut30a15382009-12-24 00:27:26 +0100218#define A38_COMP128_KEY_LEN 16
Harald Welte08d91a52009-08-30 15:37:11 +0900219#define RSL_ENC_ALG_A5(x) (x+1)
220
Holger Hans Peter Freyther5ba6f482009-10-28 14:23:39 +0100221/* is the data link established? who established it? */
222#define LCHAN_SAPI_UNUSED 0
223#define LCHAN_SAPI_MS 1
224#define LCHAN_SAPI_NET 2
225
Harald Welteb8bfc562009-12-21 13:27:11 +0100226/* state of a logical channel */
227enum gsm_lchan_state {
228 LCHAN_S_NONE, /* channel is not active */
Harald Welte (local)3e460312009-12-27 18:12:29 +0100229 LCHAN_S_ACT_REQ, /* channel activatin requested */
Harald Welteb8bfc562009-12-21 13:27:11 +0100230 LCHAN_S_ACTIVE, /* channel is active and operational */
Harald Welte8e93b792009-12-29 10:44:17 +0100231 LCHAN_S_REL_REQ, /* channel release has been requested */
Holger Hans Peter Freyther4b4dd102010-05-31 21:38:24 +0800232 LCHAN_S_REL_ERR, /* channel is in an error state */
Harald Welteb8bfc562009-12-21 13:27:11 +0100233 LCHAN_S_INACTIVE, /* channel is set inactive */
234};
235
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100236/* the per subscriber data for lchan */
237struct gsm_subscriber_connection {
238 /* To whom we are allocated at the moment */
239 struct gsm_subscriber *subscr;
240
241 /* Timer started to release the channel */
242 struct timer_list release_timer;
243
244 /*
245 * Operations that have a state and might be pending
246 */
247 struct gsm_loc_updating_operation *loc_operation;
Sylvain Munaut30a15382009-12-24 00:27:26 +0100248 struct gsm_security_operation *sec_operation;
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100249
250 /* use count. how many users use this channel */
251 unsigned int use_count;
252
253 /* Are we part of a special "silent" call */
254 int silent_call;
255
Holger Hans Peter Freyther18b63f42010-03-23 07:52:17 +0100256 /* back pointers */
Holger Hans Peter Freyther97643312010-06-17 16:41:25 +0800257 int allocated;
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100258 struct gsm_lchan *lchan;
Holger Hans Peter Freyther18b63f42010-03-23 07:52:17 +0100259 struct gsm_bts *bts;
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100260};
261
Harald Welte8470bf22008-12-25 23:28:35 +0000262struct gsm_lchan {
263 /* The TS that we're part of */
264 struct gsm_bts_trx_ts *ts;
265 /* The logical subslot number in the TS */
266 u_int8_t nr;
Harald Welte45b407a2009-05-23 15:51:12 +0000267 /* The logical channel type */
Harald Welte8470bf22008-12-25 23:28:35 +0000268 enum gsm_chan_t type;
Harald Welte9943c5b2009-07-29 15:41:29 +0200269 /* RSL channel mode */
270 enum rsl_cmod_spd rsl_cmode;
Harald Welte45b407a2009-05-23 15:51:12 +0000271 /* If TCH, traffic channel mode */
Harald Welte9943c5b2009-07-29 15:41:29 +0200272 enum gsm48_chan_mode tch_mode;
Harald Welteb8bfc562009-12-21 13:27:11 +0100273 /* State */
274 enum gsm_lchan_state state;
Harald Welted4c9bf32009-02-15 16:56:18 +0000275 /* Power levels for MS and BTS */
276 u_int8_t bs_power;
277 u_int8_t ms_power;
Harald Welte08d91a52009-08-30 15:37:11 +0900278 /* Encryption information */
279 struct {
280 u_int8_t alg_id;
281 u_int8_t key_len;
282 u_int8_t key[MAX_A5_KEY_LEN];
283 } encr;
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100284
285 struct timer_list T3101;
Holger Hans Peter Freytherf30c0dc2010-05-31 21:33:15 +0800286 struct timer_list T3111;
Holger Hans Peter Freyther4b4dd102010-05-31 21:38:24 +0800287 struct timer_list error_timer;
Holger Hans Peter Freytherea528022009-11-18 22:57:02 +0100288
289 /* AMR bits */
290 struct gsm48_multi_rate_conf mr_conf;
Harald Welted4c9bf32009-02-15 16:56:18 +0000291
Holger Hans Peter Freyther5ba6f482009-10-28 14:23:39 +0100292 /* Established data link layer services */
293 u_int8_t sapis[8];
294
Harald Welted12b0fd2009-12-15 21:36:05 +0100295 /* cache of last measurement reports on this lchan */
296 struct gsm_meas_rep meas_rep[6];
297 int meas_rep_idx;
298
Harald Weltef7c28b02009-12-21 13:30:17 +0100299 /* table of neighbor cell measurements */
300 struct neigh_meas_proc neigh_meas[MAX_NEIGH_MEAS];
301
Harald Welte2c828992009-12-02 01:56:49 +0530302 struct {
303 u_int32_t bound_ip;
Harald Welte5e3d91b2009-12-19 16:42:06 +0100304 u_int32_t connect_ip;
Harald Welte2c828992009-12-02 01:56:49 +0530305 u_int16_t bound_port;
Harald Welte5e3d91b2009-12-19 16:42:06 +0100306 u_int16_t connect_port;
Harald Welte2c828992009-12-02 01:56:49 +0530307 u_int16_t conn_id;
Sylvain Munautb54dda42009-12-20 22:06:40 +0100308 u_int8_t rtp_payload;
Harald Welte5e3d91b2009-12-19 16:42:06 +0100309 u_int8_t rtp_payload2;
310 u_int8_t speech_mode;
Harald Welte2c828992009-12-02 01:56:49 +0530311 struct rtp_socket *rtp_socket;
312 } abis_ip;
Holger Hans Peter Freyther68884aa2010-03-23 06:41:45 +0100313
314 struct gsm_subscriber_connection conn;
Harald Welte8470bf22008-12-25 23:28:35 +0000315};
316
Harald Welte85770c72009-01-18 17:47:32 +0000317struct gsm_e1_subslot {
318 /* Number of E1 link */
319 u_int8_t e1_nr;
320 /* Number of E1 TS inside E1 link */
321 u_int8_t e1_ts;
322 /* Sub-slot within the E1 TS, 0xff if full TS */
323 u_int8_t e1_ts_ss;
324};
325
Harald Welte4563eab2010-03-28 14:42:09 +0800326#define TS_F_PDCH_MODE 0x1000
Harald Welte52b1f982008-12-23 20:25:15 +0000327/* One Timeslot in a TRX */
328struct gsm_bts_trx_ts {
329 struct gsm_bts_trx *trx;
330 /* number of this timeslot at the TRX */
331 u_int8_t nr;
332
Harald Welte8470bf22008-12-25 23:28:35 +0000333 enum gsm_phys_chan_config pchan;
334
Harald Welte52b1f982008-12-23 20:25:15 +0000335 unsigned int flags;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000336 struct gsm_nm_state nm_state;
Harald Welte93e9d172009-06-20 19:04:31 +0200337 struct tlv_parsed nm_attr;
Harald Welte39c7deb2009-08-09 21:49:48 +0200338 u_int8_t nm_chan_comb;
Harald Welte8470bf22008-12-25 23:28:35 +0000339
Harald Welte6e0cd042009-09-12 13:05:33 +0200340 struct {
Harald Weltefd370892010-06-15 08:52:12 +0200341 /* Parameters below are configured by VTY */
Harald Weltea39b0f22010-06-14 22:26:10 +0200342 int enabled;
Harald Welte6e0cd042009-09-12 13:05:33 +0200343 u_int8_t maio;
344 u_int8_t hsn;
Harald Weltea39b0f22010-06-14 22:26:10 +0200345 struct bitvec arfcns;
346 u_int8_t arfcns_data[1024/8];
Harald Weltefd370892010-06-15 08:52:12 +0200347 /* This is the pre-computed MA for channel assignments */
348 struct bitvec ma;
349 u_int8_t ma_data[8]; /* 10.5.2.21: max 8 bytes value part */
Harald Welte6e0cd042009-09-12 13:05:33 +0200350 } hopping;
351
Harald Welte85770c72009-01-18 17:47:32 +0000352 /* To which E1 subslot are we connected */
353 struct gsm_e1_subslot e1_link;
354
Harald Welte8470bf22008-12-25 23:28:35 +0000355 struct gsm_lchan lchan[TS_MAX_LCHAN];
Harald Welte52b1f982008-12-23 20:25:15 +0000356};
357
358/* One TRX in a BTS */
359struct gsm_bts_trx {
Harald Weltee441d9c2009-06-21 16:17:15 +0200360 /* list header in bts->trx_list */
361 struct llist_head list;
362
Harald Welte52b1f982008-12-23 20:25:15 +0000363 struct gsm_bts *bts;
364 /* number of this TRX in the BTS */
365 u_int8_t nr;
Harald Welte197dea92010-05-14 17:59:53 +0200366 /* human readable name / description */
367 char *description;
Harald Welte1fa60c82009-02-09 18:13:26 +0000368 /* how do we talk RSL with this TRX? */
Harald Welte42581822009-08-08 16:12:58 +0200369 struct gsm_e1_subslot rsl_e1_link;
370 u_int8_t rsl_tei;
Harald Welte1fa60c82009-02-09 18:13:26 +0000371 struct e1inp_sign_link *rsl_link;
Harald Welte42581822009-08-08 16:12:58 +0200372
Harald Weltebbcc7a52009-02-14 19:45:44 +0000373 struct gsm_nm_state nm_state;
Harald Welte93e9d172009-06-20 19:04:31 +0200374 struct tlv_parsed nm_attr;
Harald Welte8c1d0e42009-02-15 03:38:12 +0000375 struct {
376 struct gsm_nm_state nm_state;
377 } bb_transc;
Harald Welte52b1f982008-12-23 20:25:15 +0000378
379 u_int16_t arfcn;
Harald Weltefcd24452009-06-20 18:15:19 +0200380 int nominal_power; /* in dBm */
381 unsigned int max_power_red; /* in actual dB */
Harald Welte8b697c72009-06-05 19:18:45 +0000382
383 union {
384 struct {
385 struct {
386 struct gsm_nm_state nm_state;
387 } bbsig;
388 struct {
389 struct gsm_nm_state nm_state;
390 } pa;
391 } bs11;
392 };
Harald Welte85770c72009-01-18 17:47:32 +0000393 struct gsm_bts_trx_ts ts[TRX_NR_TS];
Harald Welte52b1f982008-12-23 20:25:15 +0000394};
395
Harald Welte978cb422009-01-18 17:57:27 +0000396enum gsm_bts_type {
397 GSM_BTS_TYPE_UNKNOWN,
398 GSM_BTS_TYPE_BS11,
Mike Habene2d82272009-10-02 12:19:34 +0100399 GSM_BTS_TYPE_NANOBTS,
Harald Welte978cb422009-01-18 17:57:27 +0000400};
401
Harald Welte39315c42010-01-10 18:01:52 +0100402struct gsm_bts_model {
403 struct llist_head list;
404
405 enum gsm_bts_type type;
406 const char *name;
407
408 struct tlv_definition nm_att_tlvdef;
Harald Weltef3d8e922010-06-14 22:44:42 +0200409
410 struct bitvec features;
411 uint8_t _features_data[128/8];
412};
413
414enum gsm_bts_features {
415 BTS_FEAT_HSCSD,
416 BTS_FEAT_GPRS,
417 BTS_FEAT_EGPRS,
418 BTS_FEAT_ECSD,
419 BTS_FEAT_HOPPING,
Harald Welte39315c42010-01-10 18:01:52 +0100420};
421
Holger Freytherceb59b72009-02-06 18:54:00 +0000422/**
423 * A pending paging request
424 */
425struct gsm_paging_request {
Harald Welte0932d1e2009-02-16 22:53:52 +0000426 /* list_head for list of all paging requests */
Holger Freytherceb59b72009-02-06 18:54:00 +0000427 struct llist_head entry;
Harald Welte0932d1e2009-02-16 22:53:52 +0000428 /* the subscriber which we're paging. Later gsm_paging_request
429 * should probably become a part of the gsm_subscriber struct? */
Holger Freytherceb59b72009-02-06 18:54:00 +0000430 struct gsm_subscriber *subscr;
Harald Welte0932d1e2009-02-16 22:53:52 +0000431 /* back-pointer to the BTS on which we are paging */
Holger Freytherceb59b72009-02-06 18:54:00 +0000432 struct gsm_bts *bts;
Harald Welte0932d1e2009-02-16 22:53:52 +0000433 /* what kind of channel type do we ask the MS to establish */
Holger Freytherceb59b72009-02-06 18:54:00 +0000434 int chan_type;
Harald Weltecd06bfb2009-02-10 17:33:56 +0000435
436 /* Timer 3113: how long do we try to page? */
437 struct timer_list T3113;
Harald Welte0932d1e2009-02-16 22:53:52 +0000438
439 /* callback to be called in case paging completes */
440 gsm_cbfn *cbfn;
441 void *cbfn_param;
Holger Freytherceb59b72009-02-06 18:54:00 +0000442};
443
444/*
445 * This keeps track of the paging status of one BTS. It
446 * includes a number of pending requests, a back pointer
447 * to the gsm_bts, a timer and some more state.
448 */
449struct gsm_bts_paging_state {
Holger Freytherceb59b72009-02-06 18:54:00 +0000450 /* pending requests */
451 struct llist_head pending_requests;
Holger Freytherceb59b72009-02-06 18:54:00 +0000452 struct gsm_bts *bts;
453
Harald Welte75a1fa82009-02-17 01:39:41 +0000454 struct timer_list work_timer;
455
Holger Freyther392209c2009-02-10 00:06:19 +0000456 /* load */
457 u_int16_t available_slots;
Holger Freytherceb59b72009-02-06 18:54:00 +0000458};
459
Harald Welte8b697c72009-06-05 19:18:45 +0000460struct gsm_envabtse {
461 struct gsm_nm_state nm_state;
462};
463
Harald Welte55dd4432009-10-24 10:19:14 +0200464struct gsm_bts_gprs_nsvc {
465 struct gsm_bts *bts;
Harald Welteab88a622010-03-18 00:01:23 +0800466 /* data read via VTY config file, to configure the BTS
467 * via OML from BSC */
Harald Welte55dd4432009-10-24 10:19:14 +0200468 int id;
Harald Welte97a282b2010-03-14 15:37:43 +0800469 u_int16_t nsvci;
Harald Welteab88a622010-03-18 00:01:23 +0800470 u_int16_t local_port; /* on the BTS */
471 u_int16_t remote_port; /* on the SGSN */
472 u_int32_t remote_ip; /* on the SGSN */
473
Harald Welte55dd4432009-10-24 10:19:14 +0200474 struct gsm_nm_state nm_state;
475};
476
Harald Welte52b1f982008-12-23 20:25:15 +0000477/* One BTS */
478struct gsm_bts {
Harald Weltee441d9c2009-06-21 16:17:15 +0200479 /* list header in net->bts_list */
480 struct llist_head list;
481
Harald Welte52b1f982008-12-23 20:25:15 +0000482 struct gsm_network *network;
483 /* number of ths BTS in network */
484 u_int8_t nr;
Harald Welte197dea92010-05-14 17:59:53 +0200485 /* human readable name / description */
486 char *description;
Holger Hans Peter Freytherc4a49e32009-08-21 14:44:12 +0200487 /* Cell Identity */
488 u_int16_t cell_identity;
Harald Welte52b1f982008-12-23 20:25:15 +0000489 /* location area code of this BTS */
Holger Hans Peter Freyther0b7f4b32009-09-29 14:02:33 +0200490 u_int16_t location_area_code;
Harald Welte02b0e092009-02-28 13:11:07 +0000491 /* Training Sequence Code */
492 u_int8_t tsc;
Harald Welte78f2f502009-05-23 16:56:52 +0000493 /* Base Station Identification Code (BSIC) */
494 u_int8_t bsic;
Harald Welte978cb422009-01-18 17:57:27 +0000495 /* type of BTS */
496 enum gsm_bts_type type;
Harald Welte39315c42010-01-10 18:01:52 +0100497 struct gsm_bts_model *model;
Harald Weltefcd24452009-06-20 18:15:19 +0200498 enum gsm_band band;
Harald Weltefc0d9522009-08-10 13:46:55 +0200499 /* should the channel allocator allocate channels from high TRX to TRX0,
500 * rather than starting from TRX0 and go upwards? */
501 int chan_alloc_reverse;
Harald Welte (local)0e451d02009-08-13 10:14:26 +0200502 /* maximum Tx power that the MS is permitted to use in this cell */
503 int ms_max_power;
Harald Weltefc0d9522009-08-10 13:46:55 +0200504
Harald Welte1fa60c82009-02-09 18:13:26 +0000505 /* how do we talk OML with this TRX? */
Harald Welte42581822009-08-08 16:12:58 +0200506 struct gsm_e1_subslot oml_e1_link;
507 u_int8_t oml_tei;
Harald Welte1fa60c82009-02-09 18:13:26 +0000508 struct e1inp_sign_link *oml_link;
Harald Welte52b1f982008-12-23 20:25:15 +0000509
510 /* Abis network management O&M handle */
511 struct abis_nm_h *nmh;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000512 struct gsm_nm_state nm_state;
Harald Welte93e9d172009-06-20 19:04:31 +0200513 struct tlv_parsed nm_attr;
Harald Welte978cb422009-01-18 17:57:27 +0000514
Harald Welte52b1f982008-12-23 20:25:15 +0000515 /* number of this BTS on given E1 link */
516 u_int8_t bts_nr;
517
Holger Freytherceb59b72009-02-06 18:54:00 +0000518 /* paging state and control */
519 struct gsm_bts_paging_state paging;
520
Harald Welte52b1f982008-12-23 20:25:15 +0000521 /* CCCH is on C0 */
522 struct gsm_bts_trx *c0;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000523
524 struct {
525 struct gsm_nm_state nm_state;
526 } site_mgr;
Harald Welteedb37782009-05-01 14:59:07 +0000527
Harald Weltea43f7892009-12-01 18:04:30 +0530528 /* parameters from which we build SYSTEM INFORMATION */
529 struct {
530 struct gsm48_rach_control rach_control;
531 u_int8_t ncc_permitted;
532 struct gsm48_cell_sel_par cell_sel_par;
533 struct gsm48_cell_options cell_options;
534 struct gsm48_control_channel_descr chan_desc;
Harald Welte6c40def2009-12-14 22:07:14 +0100535 struct bitvec neigh_list;
536 struct bitvec cell_alloc;
537 struct {
538 /* bitmask large enough for all possible ARFCN's */
539 u_int8_t neigh_list[1024/8];
540 u_int8_t cell_alloc[1024/8];
541 } data;
Harald Weltea43f7892009-12-01 18:04:30 +0530542 } si_common;
543
Harald Welteedb37782009-05-01 14:59:07 +0000544 /* ip.accesss Unit ID's have Site/BTS/TRX layout */
Harald Welte7b26bcb2009-05-28 11:39:21 +0000545 union {
546 struct {
547 u_int16_t site_id;
548 u_int16_t bts_id;
Harald Welte88a412a2009-12-16 17:32:37 +0100549 u_int32_t flags;
Harald Welte7b26bcb2009-05-28 11:39:21 +0000550 } ip_access;
551 struct {
552 struct {
553 struct gsm_nm_state nm_state;
554 } cclk;
555 struct {
556 struct gsm_nm_state nm_state;
557 } rack;
Harald Welte8b697c72009-06-05 19:18:45 +0000558 struct gsm_envabtse envabtse[4];
Harald Welte7b26bcb2009-05-28 11:39:21 +0000559 } bs11;
560 };
Harald Welte55dd4432009-10-24 10:19:14 +0200561
562 /* Not entirely sure how ip.access specific this is */
563 struct {
Harald Welte4511d892010-04-18 15:51:20 +0200564 enum bts_gprs_mode mode;
Harald Welte55dd4432009-10-24 10:19:14 +0200565 struct {
566 struct gsm_nm_state nm_state;
Harald Weltea5731cf2010-03-22 11:48:36 +0800567 u_int16_t nsei;
Harald Welte615e9562010-05-11 23:50:21 +0200568 uint8_t timer[7];
Harald Welte55dd4432009-10-24 10:19:14 +0200569 } nse;
570 struct {
571 struct gsm_nm_state nm_state;
Harald Welte97a282b2010-03-14 15:37:43 +0800572 u_int16_t bvci;
Harald Welte615e9562010-05-11 23:50:21 +0200573 uint8_t timer[11];
Harald Welte55dd4432009-10-24 10:19:14 +0200574 } cell;
575 struct gsm_bts_gprs_nsvc nsvc[2];
Harald Welte97a282b2010-03-14 15:37:43 +0800576 u_int8_t rac;
Harald Welte55dd4432009-10-24 10:19:14 +0200577 } gprs;
Holger Hans Peter Freyther95c22902010-04-25 23:08:39 +0800578
579 /* RACH NM values */
580 int rach_b_thresh;
581 int rach_ldavg_slots;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000582
Harald Welte52b1f982008-12-23 20:25:15 +0000583 /* transceivers */
584 int num_trx;
Harald Weltee441d9c2009-06-21 16:17:15 +0200585 struct llist_head trx_list;
Harald Welte52b1f982008-12-23 20:25:15 +0000586};
587
Harald Welte24ff6ee2009-12-22 00:41:05 +0100588/* Some statistics of our network */
589struct gsmnet_stats {
590 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100591 struct counter *total;
592 struct counter *no_channel;
Harald Welte24ff6ee2009-12-22 00:41:05 +0100593 } chreq;
594 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100595 struct counter *attempted;
596 struct counter *no_channel; /* no channel available */
597 struct counter *timeout; /* T3103 timeout */
598 struct counter *completed; /* HO COMPL received */
599 struct counter *failed; /* HO FAIL received */
Harald Welte24ff6ee2009-12-22 00:41:05 +0100600 } handover;
601 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100602 struct counter *attach;
603 struct counter *normal;
604 struct counter *periodic;
605 struct counter *detach;
Harald Welte24ff6ee2009-12-22 00:41:05 +0100606 } loc_upd_type;
607 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100608 struct counter *reject;
609 struct counter *accept;
Harald Welte24ff6ee2009-12-22 00:41:05 +0100610 } loc_upd_resp;
611 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100612 struct counter *attempted;
613 struct counter *detached;
614 struct counter *completed;
615 struct counter *expired;
Harald Welte24ff6ee2009-12-22 00:41:05 +0100616 } paging;
617 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100618 struct counter *submitted; /* MO SMS submissions */
619 struct counter *no_receiver;
620 struct counter *delivered; /* MT SMS deliveries */
621 struct counter *rp_err_mem;
622 struct counter *rp_err_other;
Harald Welte24ff6ee2009-12-22 00:41:05 +0100623 } sms;
624 struct {
Harald Welteffa55a42009-12-22 19:07:32 +0100625 struct counter *dialled; /* total number of dialled calls */
626 struct counter *alerted; /* we alerted the other end */
627 struct counter *connected;/* how many calls were accepted */
Harald Welte24ff6ee2009-12-22 00:41:05 +0100628 } call;
Holger Hans Peter Freyther3ba36d52010-04-17 06:48:29 +0200629 struct {
630 struct counter *rf_fail;
631 struct counter *rll_err;
632 } chan;
Holger Hans Peter Freytherbb110f92010-04-12 10:45:52 +0200633 struct {
634 struct counter *oml_fail;
635 struct counter *rsl_fail;
636 } bts;
Harald Welte24ff6ee2009-12-22 00:41:05 +0100637};
638
Harald Welte (local)69de3972009-08-12 14:42:23 +0200639enum gsm_auth_policy {
640 GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */
641 GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */
642 GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */
643};
644
Harald Welteb84ddfc2009-12-01 17:36:54 +0530645#define GSM_T3101_DEFAULT 10
646#define GSM_T3113_DEFAULT 60
647
Harald Welte52b1f982008-12-23 20:25:15 +0000648struct gsm_network {
649 /* global parameters */
Harald Welteb84e2f42008-12-28 23:42:04 +0000650 u_int16_t country_code;
651 u_int16_t network_code;
Harald Weltec6ba9c22008-12-30 18:01:02 +0000652 char *name_long;
653 char *name_short;
Harald Welte (local)69de3972009-08-12 14:42:23 +0200654 enum gsm_auth_policy auth_policy;
Harald Welte1085c092009-11-18 20:33:19 +0100655 enum gsm48_reject_value reject_cause;
Harald Welte4381cfe2009-08-30 15:47:06 +0900656 int a5_encryption;
Holger Hans Peter Freytherf7d752f2009-11-16 17:12:38 +0100657 int neci;
Harald Welte648b6ce2009-12-14 09:00:24 +0100658 int send_mm_info;
Harald Weltebc814502009-12-19 21:41:52 +0100659 struct {
660 int active;
Harald Weltef7c28b02009-12-21 13:30:17 +0100661 /* Window RXLEV averaging */
662 unsigned int win_rxlev_avg; /* number of SACCH frames */
663 /* Window RXQUAL averaging */
664 unsigned int win_rxqual_avg; /* number of SACCH frames */
665 /* Window RXLEV neighbouring cells averaging */
666 unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */
667
668 /* how often should we check for power budget HO */
669 unsigned int pwr_interval; /* SACCH frames */
670 /* how much better does a neighbor cell have to be ? */
671 unsigned int pwr_hysteresis; /* dBm */
672 /* maximum distacne before we try a handover */
673 unsigned int max_distance; /* TA values */
Harald Weltebc814502009-12-19 21:41:52 +0100674 } handover;
Harald Welte52b1f982008-12-23 20:25:15 +0000675
Harald Welte24ff6ee2009-12-22 00:41:05 +0100676 struct gsmnet_stats stats;
677
Harald Welte4bfdfe72009-06-10 23:11:52 +0800678 /* layer 4 */
679 int (*mncc_recv) (struct gsm_network *net, int msg_type, void *arg);
680 struct llist_head upqueue;
681 struct llist_head trans_list;
Holger Hans Peter Freytherabcddf12010-06-14 18:20:15 +0800682 struct bsc_api *bsc_api;
Harald Welte4bfdfe72009-06-10 23:11:52 +0800683
Harald Welte52b1f982008-12-23 20:25:15 +0000684 unsigned int num_bts;
Harald Weltee441d9c2009-06-21 16:17:15 +0200685 struct llist_head bts_list;
Holger Hans Peter Freytherc4d88ad2009-11-21 21:18:38 +0100686
687 /* timer values */
688 int T3101;
Holger Hans Peter Freyther23975e72009-11-21 21:42:26 +0100689 int T3103;
690 int T3105;
691 int T3107;
692 int T3109;
693 int T3111;
694 int T3113;
695 int T3115;
696 int T3117;
697 int T3119;
698 int T3141;
Harald Welteeab84a12009-12-13 10:53:12 +0100699
700 /* Radio Resource Location Protocol (TS 04.31) */
701 struct {
702 enum rrlp_mode mode;
703 } rrlp;
Holger Hans Peter Freytherca999a92010-06-15 18:52:38 +0800704 int msc_prio;
Harald Welte52b1f982008-12-23 20:25:15 +0000705};
706
Harald Welte7e310b12009-03-30 20:56:32 +0000707#define SMS_HDR_SIZE 128
708#define SMS_TEXT_SIZE 256
709struct gsm_sms {
Harald Welted409be72009-11-07 00:06:19 +0900710 unsigned long long id;
Harald Welte7e310b12009-03-30 20:56:32 +0000711 struct gsm_subscriber *sender;
712 struct gsm_subscriber *receiver;
713
Harald Welteb9c758b2009-07-05 14:02:46 +0200714 unsigned long validity_minutes;
Harald Welte76042182009-08-08 16:03:15 +0200715 u_int8_t reply_path_req;
716 u_int8_t status_rep_req;
717 u_int8_t ud_hdr_ind;
718 u_int8_t protocol_id;
719 u_int8_t data_coding_scheme;
720 u_int8_t msg_ref;
721 char dest_addr[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes
722 * BCD == 20 bytes string */
723 u_int8_t user_data_len;
724 u_int8_t user_data[SMS_TEXT_SIZE];
Harald Weltef3efc592009-07-27 20:11:35 +0200725
Harald Welte7e310b12009-03-30 20:56:32 +0000726 char text[SMS_TEXT_SIZE];
727};
728
Harald Welte3606cc52009-12-05 15:13:22 +0530729
Harald Weltee441d9c2009-06-21 16:17:15 +0200730struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_code,
Harald Welte4bfdfe72009-06-10 23:11:52 +0800731 int (*mncc_recv)(struct gsm_network *, int, void *));
Harald Weltee441d9c2009-06-21 16:17:15 +0200732struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, enum gsm_bts_type type,
733 u_int8_t tsc, u_int8_t bsic);
734struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
Harald Welte39315c42010-01-10 18:01:52 +0100735int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type);
Harald Weltee441d9c2009-06-21 16:17:15 +0200736
737struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num);
Harald Welte84874c92009-12-14 22:33:02 +0100738
739/* Get reference to a neighbor cell on a given BCCH ARFCN */
Harald Welte0b121032009-12-15 00:21:31 +0100740struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts,
741 u_int16_t arfcn, u_int8_t bsic);
Harald Welte84874c92009-12-14 22:33:02 +0100742
Harald Weltee441d9c2009-06-21 16:17:15 +0200743struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num);
Harald Welte8470bf22008-12-25 23:28:35 +0000744
Harald Weltea72c98e2009-01-04 16:10:38 +0000745const char *gsm_pchan_name(enum gsm_phys_chan_config c);
Harald Welte65da9122009-08-07 00:32:22 +0200746enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
Harald Welte (local)ccd88452009-12-27 18:05:25 +0100747const char *gsm_lchant_name(enum gsm_chan_t c);
Harald Weltea72c98e2009-01-04 16:10:38 +0000748const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
Harald Welte (local)d48f4eb2009-12-28 23:14:22 +0100749char *gsm_trx_name(struct gsm_bts_trx *trx);
Harald Welte23a68632009-02-19 17:06:42 +0000750char *gsm_ts_name(struct gsm_bts_trx_ts *ts);
Harald Welte (local)19ef62a2009-12-27 18:16:36 +0100751char *gsm_lchan_name(struct gsm_lchan *lchan);
Harald Welte1887f9d2009-12-29 10:52:38 +0100752const char *gsm_lchans_name(enum gsm_lchan_state s);
Harald Weltea72c98e2009-01-04 16:10:38 +0000753
Harald Weltead384642008-12-26 10:20:07 +0000754enum gsm_e1_event {
755 EVT_E1_NONE,
Harald Welte1fa60c82009-02-09 18:13:26 +0000756 EVT_E1_TEI_UP,
757 EVT_E1_TEI_DN,
Harald Weltead384642008-12-26 10:20:07 +0000758};
759
Harald Weltecd06bfb2009-02-10 17:33:56 +0000760void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
761 u_int8_t e1_ts, u_int8_t e1_ts_ss);
Harald Welte1d014a52009-08-08 15:38:29 +0200762enum gsm_bts_type parse_btstype(const char *arg);
Holger Hans Peter Freyther2dceae62009-06-12 17:39:38 +0200763const char *btstype2str(enum gsm_bts_type type);
Harald Welte6e670aa2010-01-07 20:44:32 +0100764struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr);
Harald Weltebe991492009-05-23 13:56:40 +0000765struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
766 struct gsm_bts *start_bts);
Harald Welte32201c12009-03-10 12:15:10 +0000767
Andreas Eversberg8226fa72009-06-29 15:19:38 +0200768extern void *tall_bsc_ctx;
Harald Weltef88c8a02009-12-20 13:48:15 +0100769extern int ipacc_rtp_direct;
Harald Welte2cf161b2009-06-20 22:36:41 +0200770
Harald Welte32201c12009-03-10 12:15:10 +0000771static inline int is_ipaccess_bts(struct gsm_bts *bts)
772{
773 switch (bts->type) {
Mike Habene2d82272009-10-02 12:19:34 +0100774 case GSM_BTS_TYPE_NANOBTS:
Harald Welte32201c12009-03-10 12:15:10 +0000775 return 1;
776 default:
777 break;
778 }
779 return 0;
780}
781
Harald Welte5b570672009-08-10 10:08:01 +0200782static inline int is_siemens_bts(struct gsm_bts *bts)
783{
784 switch (bts->type) {
785 case GSM_BTS_TYPE_BS11:
786 return 1;
787 default:
788 break;
789 }
790
791 return 0;
792}
793
Harald Welte (local)69de3972009-08-12 14:42:23 +0200794
795enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
796const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
797
Harald Welteeab84a12009-12-13 10:53:12 +0100798enum rrlp_mode rrlp_mode_parse(const char *arg);
799const char *rrlp_mode_name(enum rrlp_mode mode);
800
Harald Welte4511d892010-04-18 15:51:20 +0200801enum bts_gprs_mode bts_gprs_mode_parse(const char *arg);
802const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
803
Holger Hans Peter Freyther2d501ea2009-11-11 11:54:24 +0100804void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
805
Harald Welte97a282b2010-03-14 15:37:43 +0800806int gsm48_ra_id_by_bts(u_int8_t *buf, struct gsm_bts *bts);
807void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
Harald Welted12b0fd2009-12-15 21:36:05 +0100808struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan);
809
Harald Weltef3d8e922010-06-14 22:44:42 +0200810int gsm_btsmodel_set_feature(struct gsm_bts_model *model, enum gsm_bts_features feat);
811int gsm_bts_has_feature(struct gsm_bts *bts, enum gsm_bts_features feat);
Harald Weltefbda4e12010-03-04 11:04:52 +0100812int gsm_bts_model_register(struct gsm_bts_model *model);
813
Harald Welte52b1f982008-12-23 20:25:15 +0000814#endif