aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-05 14:08:13 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-05 14:08:13 +0200
commitc2e302dc84490691b17fcfa6246e40eaf9a0ab32 (patch)
tree6d455dd1de967a12940df7ce120425d3f1128fe7 /openbsc/include
parent53833f6fd8f3cc24480dd48570a2524a41ccf555 (diff)
Store classmark1/2/3 in equipment SQL table
For further evaluation/analysis, this patch stores the classmark 1, 2 and 3 values of every equipment in the SQL database. We can use this non-volatile data to determine the supported features for each handset that we've ever seen on our network.
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index dc4f6d7a6..4a2311555 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -11,6 +11,18 @@
#define GSM_NAME_LENGTH 128
#define GSM_EXTENSION_LENGTH 128
+struct gsm_equipment {
+ long long unsigned int id;
+ char imei[GSM_IMEI_LENGTH];
+ char name[GSM_NAME_LENGTH];
+
+ struct gsm48_classmark1 classmark1;
+ u_int8_t classmark2_len;
+ u_int8_t classmark2[3];
+ u_int8_t classmark3_len;
+ u_int8_t classmark3[14];
+};
+
struct gsm_subscriber {
struct gsm_network *net;
long long unsigned int id;
@@ -21,18 +33,14 @@ struct gsm_subscriber {
char extension[GSM_EXTENSION_LENGTH];
int authorized;
+ /* Every user can only have one equipment in use at any given
+ * point in time */
+ struct gsm_equipment equipment;
+
/* 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];
-
/* pending requests */
int in_callback;
struct llist_head requests;
@@ -47,6 +55,7 @@ enum gsm_subscriber_field {
enum gsm_subscriber_update_reason {
GSM_SUBSCRIBER_UPDATE_ATTACHED,
GSM_SUBSCRIBER_UPDATE_DETACHED,
+ GSM_SUBSCRIBER_UPDATE_EQUIPMENT,
};
struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr);