blob: fa8132d4d0683e1a11bb976ffc586604388364c2 [file] [log] [blame]
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +08001/* Patch Messages to and from the MSC */
2/*
3 * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
4 * (C) 2010 by On-Waves
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 */
22#ifndef bss_patch_h
23#define bss_patch_h
24
Holger Hans Peter Freythercbf7d182010-07-31 05:25:35 +080025#include <osmocore/msgb.h>
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +080026
Holger Hans Peter Freythercf381e22010-08-04 18:39:26 +080027#include <osmocom/sccp/sccp.h>
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +080028
29#define BSS_FILTER_RESET 1
30#define BSS_FILTER_RESET_ACK 2
31#define BSS_FILTER_RLSD 3
32#define BSS_FILTER_RLC 4
33#define BSS_FILTER_CLEAR_COMPL 5
34
35/**
36 * Error is < 0
37 * Success is == 0
38 * Filter is > 0
39 */
40int bss_patch_filter_msg(struct msgb *msg, struct sccp_parse_result *result);
41
42/*
43 * Copy inpt->l2h to target->l2h but rewrite the SCCP header on the way
44 */
45void bss_rewrite_header_for_msc(int, struct msgb *target, struct msgb *inpt, struct sccp_parse_result *result);
46int bss_rewrite_header_to_bsc(struct msgb *target, int opc, int dpc);
47
48#endif