2 * (C) 2010 by Andreas Eversberg <jolly@eversberg.eu>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 /* collection of system information of the current cell */
24 /* frequency mask flags of frequency type */
25 #define FREQ_TYPE_SERV 0x01 /* frequency of the serving cell */
26 #define FREQ_TYPE_HOPP 0x02 /* frequency used for channel hopping */
27 #define FREQ_TYPE_NCELL 0x1c /* frequency of the neighbor cell */
28 #define FREQ_TYPE_NCELL_2 0x04 /* sub channel of SI 2 */
29 #define FREQ_TYPE_NCELL_2bis 0x08 /* sub channel of SI 2bis */
30 #define FREQ_TYPE_NCELL_2ter 0x10 /* sub channel of SI 2ter */
31 #define FREQ_TYPE_REP 0xe0 /* frequency to be reported */
32 #define FREQ_TYPE_REP_5 0x20 /* sub channel of SI 5 */
33 #define FREQ_TYPE_REP_5bis 0x40 /* sub channel of SI 5bis */
34 #define FREQ_TYPE_REP_5ter 0x80 /* sub channel of SI 5ter */
36 /* structure of one frequency */
37 struct gsm_sysinfo_freq {
38 /* if the frequency included in the sysinfo */
40 /* the power measured as real value */
45 /* structure of all received system informations */
47 uint8_t si1, si2, si2bis, si2ter, si3,
48 si4, si5, si5bis, si5ter, si6;
50 struct gsm_sysinfo_freq freq[1024]; /* all frequencies */
51 uint16_t hopping[64]; /* hopping arfcn */
55 uint16_t mcc, mnc, lac; /* LAI */
56 uint8_t max_retrans; /* decoded */
57 uint8_t tx_integer; /* decoded */
58 uint8_t reest_denied; /* 1 = denied */
59 uint8_t cell_barred; /* 1 = barred */
60 uint8_t class_barr[16]; /* 10 is emergency */
65 uint8_t nb_multi_rep; /* see GSM 05.08 8.4.3 */
66 uint8_t nb_ncc_permitted;
67 uint8_t nb_max_retrans; /* decoded */
68 uint8_t nb_tx_integer; /* decoded */
69 uint8_t nb_reest_denied; /* 1 = denied */
70 uint8_t nb_cell_barred; /* 1 = barred */
71 uint8_t nb_class_barr[16]; /* 10 is emergency */