blob: 72bfa476fb0815dcd4196b7726e8c74e1b148a2d [file] [log] [blame]
Holger Hans Peter Freytherb3e10682010-09-30 01:57:45 +08001/*
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 Freyther1cb634a2010-09-30 16:10:17 +080025#include <inttypes.h>
26
27#include <osmocore/linuxlist.h>
28#include <osmocore/timer.h>
29
Holger Hans Peter Freytherb3e10682010-09-30 01:57:45 +080030#include <osmocore/protocol/gsm_08_08.h>
31
Holger Hans Peter Freyther1cb634a2010-09-30 16:10:17 +080032#include <osmocom/sccp/sccp.h>
33
Holger Hans Peter Freytherb3e10682010-09-30 01:57:45 +080034/*
35 * One SCCP connection.
36 * Use for connection tracking and fixups...
37 */
38struct 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 Freyther1cb634a2010-09-30 16:10:17 +080061struct active_sccp_con *find_con_by_src_ref(struct sccp_source_reference *src_ref);
62struct active_sccp_con *find_con_by_src_dest_ref(struct sccp_source_reference *src_ref,
63 struct sccp_source_reference *dst_ref);
64unsigned int sls_for_src_ref(struct sccp_source_reference *ref);
65
Holger Hans Peter Freytherb3e10682010-09-30 01:57:45 +080066#endif