Holger Hans Peter Freyther | b3e1068 | 2010-09-30 01:57:45 +0800 | [diff] [blame] | 1 | /* |
| 2 | * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org> |
| 3 | * (C) 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 | #ifndef bsc_sccp_h |
| 23 | #define bsc_sccp_h |
| 24 | |
Holger Hans Peter Freyther | 1cb634a | 2010-09-30 16:10:17 +0800 | [diff] [blame] | 25 | #include <inttypes.h> |
| 26 | |
| 27 | #include <osmocore/linuxlist.h> |
| 28 | #include <osmocore/timer.h> |
| 29 | |
Holger Hans Peter Freyther | b3e1068 | 2010-09-30 01:57:45 +0800 | [diff] [blame] | 30 | #include <osmocore/protocol/gsm_08_08.h> |
| 31 | |
Holger Hans Peter Freyther | 1cb634a | 2010-09-30 16:10:17 +0800 | [diff] [blame] | 32 | #include <osmocom/sccp/sccp.h> |
| 33 | |
Holger Hans Peter Freyther | b3e1068 | 2010-09-30 01:57:45 +0800 | [diff] [blame] | 34 | /* |
| 35 | * One SCCP connection. |
| 36 | * Use for connection tracking and fixups... |
| 37 | */ |
| 38 | struct active_sccp_con { |
| 39 | struct llist_head entry; |
| 40 | |
| 41 | struct sccp_source_reference src_ref; |
| 42 | struct sccp_source_reference dst_ref; |
| 43 | |
| 44 | int has_dst_ref; |
| 45 | |
| 46 | /* fixup stuff */ |
| 47 | |
| 48 | /* We get a RLSD from the MSC and need to send a RLC */ |
| 49 | int released_from_msc; |
| 50 | |
| 51 | /* timeout for waiting for the RLC */ |
| 52 | struct timer_list rlc_timeout; |
| 53 | |
| 54 | /* how often did we send a RLSD this */ |
| 55 | unsigned int rls_tries; |
| 56 | |
| 57 | /* sls id */ |
| 58 | int sls; |
| 59 | }; |
| 60 | |
Holger Hans Peter Freyther | 3594855 | 2010-09-30 17:30:50 +0800 | [diff] [blame^] | 61 | void free_con(struct active_sccp_con *con); |
| 62 | struct active_sccp_con *find_con_by_dest_ref(struct sccp_source_reference *ref); |
Holger Hans Peter Freyther | 1cb634a | 2010-09-30 16:10:17 +0800 | [diff] [blame] | 63 | struct active_sccp_con *find_con_by_src_ref(struct sccp_source_reference *src_ref); |
| 64 | struct active_sccp_con *find_con_by_src_dest_ref(struct sccp_source_reference *src_ref, |
| 65 | struct sccp_source_reference *dst_ref); |
| 66 | unsigned int sls_for_src_ref(struct sccp_source_reference *ref); |
| 67 | |
Holger Hans Peter Freyther | b3e1068 | 2010-09-30 01:57:45 +0800 | [diff] [blame] | 68 | #endif |