Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 1 | /* 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 | * |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame^] | 7 | * This program is free software: you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU Affero General Public License as published by |
| 9 | * the Free Software Foundation, either version 3 of the License, or |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 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 |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame^] | 15 | * GNU Affero General Public License for more details. |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 16 | * |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame^] | 17 | * You should have received a copy of the GNU Affero General Public License |
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 19 | * |
| 20 | */ |
| 21 | #ifndef bss_patch_h |
| 22 | #define bss_patch_h |
| 23 | |
Holger Hans Peter Freyther | cbf7d18 | 2010-07-31 05:25:35 +0800 | [diff] [blame] | 24 | #include <osmocore/msgb.h> |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 25 | |
Holger Hans Peter Freyther | cf381e2 | 2010-08-04 18:39:26 +0800 | [diff] [blame] | 26 | #include <osmocom/sccp/sccp.h> |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 27 | |
| 28 | #define BSS_FILTER_RESET 1 |
| 29 | #define BSS_FILTER_RESET_ACK 2 |
| 30 | #define BSS_FILTER_RLSD 3 |
| 31 | #define BSS_FILTER_RLC 4 |
| 32 | #define BSS_FILTER_CLEAR_COMPL 5 |
| 33 | |
| 34 | /** |
| 35 | * Error is < 0 |
| 36 | * Success is == 0 |
| 37 | * Filter is > 0 |
| 38 | */ |
| 39 | int bss_patch_filter_msg(struct msgb *msg, struct sccp_parse_result *result); |
| 40 | |
| 41 | /* |
| 42 | * Copy inpt->l2h to target->l2h but rewrite the SCCP header on the way |
| 43 | */ |
| 44 | void bss_rewrite_header_for_msc(int, struct msgb *target, struct msgb *inpt, struct sccp_parse_result *result); |
| 45 | int bss_rewrite_header_to_bsc(struct msgb *target, int opc, int dpc); |
| 46 | |
| 47 | #endif |