aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-06-09 20:24:21 +0000
committerHarald Welte <laforge@gnumonks.org>2009-06-09 20:24:21 +0000
commitf7c43524cfc6e30a0223d3aaff89fe955d6e5146 (patch)
tree0669aee9c884c70e5778f64b459472986ad7c918 /include
parentd3ff51dfe3ecfde0ddbcd7bc5645d519912696dd (diff)
* add support for storing classmark1/2/3 per subscriber
* add support for parsing measurement results (both BTS and MS side)
Diffstat (limited to 'include')
-rw-r--r--include/openbsc/gsm_04_08.h36
-rw-r--r--include/openbsc/gsm_subscriber.h8
2 files changed, 42 insertions, 2 deletions
diff --git a/include/openbsc/gsm_04_08.h b/include/openbsc/gsm_04_08.h
index 8d0061261..fe18f4ee5 100644
--- a/include/openbsc/gsm_04_08.h
+++ b/include/openbsc/gsm_04_08.h
@@ -4,6 +4,14 @@
/* GSM TS 04.08 definitions */
struct gsm_lchan;
+struct gsm48_classmark1 {
+ u_int8_t spare:1,
+ rev_level:2,
+ es_ind:1,
+ a5_1:1,
+ pwr_lev:3;
+} __attribute__ ((packed));
+
/* Chapter 10.5.2.5 */
struct gsm48_chan_desc {
u_int8_t chan_nr;
@@ -73,7 +81,7 @@ struct gsm48_loc_upd_req {
u_int8_t type:4,
key_seq:4;
struct gsm48_loc_area_id lai;
- u_int8_t classmark1;
+ struct gsm48_classmark1 classmark1;
u_int8_t mi_len;
u_int8_t mi[0];
} __attribute__ ((packed));
@@ -186,7 +194,7 @@ struct gsm48_system_information_type_6 {
/* Section 9.2.12 IMSI Detach Indication */
struct gsm48_imsi_detach_ind {
- u_int8_t classmark1;
+ struct gsm48_classmark1 classmark1;
u_int8_t mi_len;
u_int8_t mi[0];
} __attribute__ ((packed));
@@ -506,6 +514,30 @@ enum gsm48_reject_value {
};
+/* extracted from a L3 measurement report IE */
+struct gsm_meas_rep_cell {
+ u_int8_t rxlev;
+ u_int8_t bcch_freq; /* fixme: translate to ARFCN */
+ u_int8_t bsic;
+};
+
+struct gsm_meas_rep {
+ unsigned int flags;
+ u_int8_t rxlev_full;
+ u_int8_t rxqual_full;
+ u_int8_t rxlev_sub;
+ u_int8_t rxqual_sub;
+ int num_cell;
+ struct gsm_meas_rep_cell cell[6];
+};
+#define MEAS_REP_F_DTX 0x01
+#define MEAS_REP_F_VALID 0x02
+#define MEAS_REP_F_BA1 0x04
+
+void gsm48_parse_meas_rep(struct gsm_meas_rep *rep, const u_int8_t *data,
+ int len);
+
+
struct msgb;
struct gsm_bts;
struct gsm_subscriber;
diff --git a/include/openbsc/gsm_subscriber.h b/include/openbsc/gsm_subscriber.h
index 99148b5df..1ca79e2ae 100644
--- a/include/openbsc/gsm_subscriber.h
+++ b/include/openbsc/gsm_subscriber.h
@@ -23,6 +23,14 @@ struct gsm_subscriber {
/* for internal management */
int use_count;
struct llist_head entry;
+
+ /* those are properties of the equipment, but they
+ * are applicable to the subscriber at the moment */
+ struct gsm48_classmark1 classmark1;
+ u_int8_t classmark2_len;
+ u_int8_t classmark2[3];
+ u_int8_t classmark3_len;
+ u_int8_t classmark3[14];
};
enum gsm_subscriber_field {