blob: 5925f69beba2350b08aedc588eb3c7771ade8594 [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 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
Pablo Neira Ayuso83419342011-03-22 16:36:13 +010021#include <osmocom/gsm/protocol/gsm_03_41.h>
Holger Hans Peter Freythere05c7df2010-12-29 11:57:48 +010022
23#include <stdio.h>
Jacob Erlbeck73ae7a92013-10-08 12:04:42 +020024#include <arpa/inet.h>
Holger Hans Peter Freythere05c7df2010-12-29 11:57:48 +010025
26static uint8_t smscb_msg[] = { 0x40, 0x10, 0x05, 0x0d, 0x01, 0x11 };
27
28int main(int argc, char **argv)
29{
30 struct gsm341_ms_message *msg;
31
32 msg = (struct gsm341_ms_message *) smscb_msg;
33 printf("(srl) GS: %d MSG_CODE: %d UPDATE: %d\n",
34 msg->serial.gs, GSM341_MSG_CODE(msg), msg->serial.update);
35 printf("(msg) msg_id: %d\n", htons(msg->msg_id));
36 printf("(dcs) group: %d language: %d\n",
37 msg->dcs.language, msg->dcs.group);
38 printf("(pge) page total: %d current: %d\n",
39 msg->page.total, msg->page.current);
40
41 return 0;
42}