blob: 3b6b74d331d3d2d3b04a2a3cc754f0578c8fb568 [file] [log] [blame]
Holger Hans Peter Freythere05c7df2010-12-29 11:57:48 +01001/*
2 * (C) 2010 Holger Hans Peter Freyther
3 * All Rights Reserved
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
Holger Hans Peter Freythere05c7df2010-12-29 11:57:48 +010015 */
16
Pablo Neira Ayuso83419342011-03-22 16:36:13 +010017#include <osmocom/gsm/protocol/gsm_03_41.h>
Holger Hans Peter Freythere05c7df2010-12-29 11:57:48 +010018
19#include <stdio.h>
Jacob Erlbeck73ae7a92013-10-08 12:04:42 +020020#include <arpa/inet.h>
Holger Hans Peter Freythere05c7df2010-12-29 11:57:48 +010021
22static uint8_t smscb_msg[] = { 0x40, 0x10, 0x05, 0x0d, 0x01, 0x11 };
23
24int main(int argc, char **argv)
25{
26 struct gsm341_ms_message *msg;
27
28 msg = (struct gsm341_ms_message *) smscb_msg;
29 printf("(srl) GS: %d MSG_CODE: %d UPDATE: %d\n",
30 msg->serial.gs, GSM341_MSG_CODE(msg), msg->serial.update);
31 printf("(msg) msg_id: %d\n", htons(msg->msg_id));
32 printf("(dcs) group: %d language: %d\n",
33 msg->dcs.language, msg->dcs.group);
34 printf("(pge) page total: %d current: %d\n",
35 msg->page.total, msg->page.current);
36
37 return 0;
38}