blob: 44c652bbd35c237cf332bf49832a848fb7642e88 [file] [log] [blame]
Holger Hans Peter Freyther3485feb2010-11-09 23:28:33 +01001/* GSM 08.08 BSSMAP handling */
2/* (C) 2009-2010 by Holger Hans Peter Freyther <zecke@selfish.org>
3 * (C) 2009-2010 by On-Waves
4 * All Rights Reserved
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 */
21
22#include <openbsc/osmo_bsc.h>
23#include <openbsc/debug.h>
24
25#include <osmocore/protocol/gsm_08_08.h>
26
27int bsc_handle_udt(struct gsm_network *network,
28 struct bsc_msc_connection *conn,
29 struct msgb *msgb, unsigned int length)
30{
31 struct bssmap_header *bs;
32
33 LOGP(DMSC, LOGL_DEBUG, "Incoming SCCP message ftom MSC: %s\n",
34 hexdump(msgb->l3h, length));
35
36 if (length < sizeof(*bs)) {
37 LOGP(DMSC, LOGL_ERROR, "The header is too short.\n");
38 return -1;
39 }
40
41 bs = (struct bssmap_header *) msgb->l3h;
42 if (bs->length < length - sizeof(*bs))
43 return -1;
44
45 switch (bs->type) {
46 case BSSAP_MSG_BSS_MANAGEMENT:
47 LOGP(DMSC, LOGL_ERROR, "BSS management not implemented.\n");
48 break;
49 default:
50 LOGP(DMSC, LOGL_ERROR, "Unimplemented msg type: %d\n", bs->type);
51 }
52
53 return 0;
54}
55
56int bsc_handle_dt1(struct osmo_bsc_sccp_con *conn,
57 struct msgb *msg, unsigned int len)
58{
59 return -1;
60}