b609b7da394a75770f1b55b91dc99ff7927efca2
[osmocom-bb.git] / src / host / layer23 / include / osmocom / bb / mobile / support.h
1 #ifndef _SUPPORT_H
2 #define _SUPPORT_H
3
4 #define GSM_CIPHER_A5_1         0
5 #define GSM_CIPHER_A5_2         1
6 #define GSM_CIPHER_A5_3         2
7 #define GSM_CIPHER_A5_4         3
8 #define GSM_CIPHER_A5_5         4
9 #define GSM_CIPHER_A5_6         5
10 #define GSM_CIPHER_A5_7         6
11 #define GSM_CIPHER_RESERVED     7
12
13 #define GSM_CAP_SDCCH           0
14 #define GSM_CAP_SDCCH_TCHF      1
15 #define GSM_CAP_SDCCH_TCHF_TCHH 2
16
17 struct gsm_support {
18         struct osmocom_ms *ms;
19
20         /* controlled early classmark sending */
21         uint8_t es_ind;
22         /* revision level */
23         uint8_t rev_lev;
24         /* support of VGCS */
25         uint8_t vgcs;
26         /* support of VBS */
27         uint8_t vbs;
28         /* support of SMS */
29         uint8_t sms_ptp;
30         /* screening indicator */
31         uint8_t ss_ind;
32         /* pseudo synchronised capability */
33         uint8_t ps_cap;
34         /* CM service prompt */
35         uint8_t cmsp;
36         /* solsa support */
37         uint8_t solsa;
38         /* location service support */
39         uint8_t lcsva;
40         /* codec supprot */
41         uint8_t a5_1;
42         uint8_t a5_2;
43         uint8_t a5_3;
44         uint8_t a5_4;
45         uint8_t a5_5;
46         uint8_t a5_6;
47         uint8_t a5_7;
48         /* radio support */
49         uint8_t p_gsm;
50         uint8_t e_gsm;
51         uint8_t r_gsm;
52         uint8_t dcs;
53         uint8_t class_900;
54         uint8_t class_dcs;
55         uint8_t freq_map[128];
56         /* multi slot support */
57         uint8_t ms_sup;
58         /* ucs2 treatment */
59         uint8_t ucs2_treat;
60         /* support extended measurements */
61         uint8_t ext_meas;
62         /* support switched measurement capability */
63         uint8_t meas_cap;
64         uint8_t sms_val;
65         uint8_t sm_val;
66         /* positioning method capability */
67         uint8_t loc_serv;
68         uint8_t e_otd_ass;
69         uint8_t e_otd_based;
70         uint8_t gps_ass;
71         uint8_t gps_based;
72         uint8_t gps_conv;
73
74         /* radio */
75         uint8_t ch_cap; /* channel capability */
76         int8_t min_rxlev_db;
77         uint8_t scan_to;
78         uint8_t sync_to;
79
80         /* codecs */
81         uint8_t full_v1;
82         uint8_t full_v2;
83         uint8_t full_v3;
84         uint8_t half_v1;
85         uint8_t half_v3;
86 };
87
88 struct gsm_support_scan_max {
89         uint16_t        start;
90         uint16_t        end;
91         uint16_t        max;
92         uint16_t        temp;   
93 };
94 extern struct gsm_support_scan_max gsm_sup_smax[];
95
96 void gsm_support_init(struct osmocom_ms *ms);
97 void gsm_support_dump(struct osmocom_ms *ms,
98                         void (*print)(void *, const char *, ...), void *priv);
99
100 #endif /* _SUPPORT_H */
101