summaryrefslogtreecommitdiffstats
path: root/tests/ussd
diff options
context:
space:
mode:
authorTobias Engel <tobias@ccc.de>2012-03-08 13:31:52 +0100
committerHarald Welte <laforge@gnumonks.org>2015-01-01 14:19:17 +0100
commit419684e30c2fe12d3e3441cfa9fea21f1c4de959 (patch)
tree042c219b08278e9a691fdab86a47ff42ad16220c /tests/ussd
parentc13cf8bbd3a0650993b43e1cea071c02d0f00d8f (diff)
Supplementary Services (de)activation, interrogation added
These patches enhance the Supplementary Service (SS) processing from only being able to handle USSD to other SS, specifically activation, deactivation and interrogation of those SS. Registration is not yet implemented. include/osmocom/gsm/protocol/gsm_09_02.h has been added with needed values for SS. Modified by Harald Welte to keep the old ussd-only functiosn for API/ABI stability.
Diffstat (limited to 'tests/ussd')
-rw-r--r--tests/ussd/ussd_test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/ussd/ussd_test.c b/tests/ussd/ussd_test.c
index b04f8e8a..f798e37c 100644
--- a/tests/ussd/ussd_test.c
+++ b/tests/ussd/ussd_test.c
@@ -38,13 +38,13 @@ static int parse_ussd(const uint8_t *_data, int len)
{
uint8_t *data;
int rc;
- struct ussd_request req;
+ struct ss_request req;
struct gsm48_hdr *hdr;
data = malloc(len);
memcpy(data, _data, len);
hdr = (struct gsm48_hdr *) &data[0];
- rc = gsm0480_decode_ussd_request(hdr, len, &req);
+ rc = gsm0480_decode_ss_request(hdr, len, &req);
free(data);
return rc;
@@ -54,14 +54,14 @@ static int parse_mangle_ussd(const uint8_t *_data, int len)
{
uint8_t *data;
int rc;
- struct ussd_request req;
+ struct ss_request req;
struct gsm48_hdr *hdr;
data = malloc(len);
memcpy(data, _data, len);
hdr = (struct gsm48_hdr *) &data[0];
hdr->data[1] = len - sizeof(*hdr) - 2;
- rc = gsm0480_decode_ussd_request(hdr, len, &req);
+ rc = gsm0480_decode_ss_request(hdr, len, &req);
free(data);
return rc;
@@ -113,15 +113,15 @@ static void test_7bit_ussd(const char *text, const char *encoded_hex, const char
int main(int argc, char **argv)
{
- struct ussd_request req;
+ struct ss_request req;
const int size = sizeof(ussd_request);
int i;
struct msgb *msg;
osmo_init_logging(&info);
- gsm0480_decode_ussd_request((struct gsm48_hdr *) ussd_request, size, &req);
- printf("Tested if it still works. Text was: %s\n", req.text);
+ gsm0480_decode_ss_request((struct gsm48_hdr *) ussd_request, size, &req);
+ printf("Tested if it still works. Text was: %s\n", req.ussd_text);
printf("Testing parsing a USSD request and truncated versions\n");