aboutsummaryrefslogtreecommitdiffstats
path: root/include/openbsc/gsm_data.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-03-30 20:56:32 +0000
committerHarald Welte <laforge@gnumonks.org>2009-03-30 20:56:32 +0000
commit7e310b12ff120bdfd4b98eb52d10b013b00a2eaa (patch)
tree75e704d9e7a1c32214ecf72d59ce7076329642b2 /include/openbsc/gsm_data.h
parent93d9303331b7e103da810e851db1adb1fcf57f6d (diff)
Store incoming SMS into SQL database
* gsm_util now uses caller-allocated data (rather than callee-allocated) * correctly parse destination address * parse (but not transcode) non-default encodings of SMS * reject SMS to unknown destination number * resolve target subscriber id and store incoming SMS (without header) in 'sms' table What we're now missing is the sending part, i.e. a regular task iterating over all pending SMS and trying to deliver them. Also, check for pending SMS once we get a LOCATION UPDATE.
Diffstat (limited to 'include/openbsc/gsm_data.h')
-rw-r--r--include/openbsc/gsm_data.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index 84d33d2c4..614c63d17 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -317,6 +317,17 @@ struct gsm_network {
struct gsm_bts bts[GSM_MAX_BTS+1];
};
+#define SMS_HDR_SIZE 128
+#define SMS_TEXT_SIZE 256
+struct gsm_sms {
+ u_int64_t id;
+ struct gsm_subscriber *sender;
+ struct gsm_subscriber *receiver;
+
+ unsigned char header[SMS_HDR_SIZE];
+ char text[SMS_TEXT_SIZE];
+};
+
struct gsm_network *gsm_network_init(unsigned int num_bts, enum gsm_bts_type bts_type,
u_int16_t country_code, u_int16_t network_code);