blob: 51426b549291798a8daecf307aa70b097f3a0b1f [file] [log] [blame]
Holger Hans Peter Freythera7bc3aa2011-02-16 16:12:07 +01001/* Stuff to handle the SS7 application */
2/*
3 * (C) 2011 by Holger Hans Peter Freyther <zecke@selfish.org>
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 Affero General Public License as published by
8 * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef SS7_APPLICATION_H
22#define SS7_APPLICATION_H
23
24#include <osmocore/linuxlist.h>
25#include <osmocore/timer.h>
26
27struct bsc_data;
28struct msc_connection;
29struct mtp_link_set;
30struct mtp_link;
31
32enum ss7_set_type {
33 SS7_SET_LINKSET,
34 SS7_SET_MSC,
35};
36
37enum ss7_app_type {
38 APP_CELLMGR,
39 APP_RELAY,
40 APP_STP,
41};
42
43struct ss7_application_route {
44 int type;
45 int nr;
46
47 /* maybe they were resolved */
48 struct mtp_link_set *set;
49 struct msc_connection *msc;
50};
51
52struct ss7_application {
53 /* handling */
54 struct llist_head entry;
55 int nr;
56 char *name;
57
58 /* app type */
59 int type;
60
61 /* for the routing */
62 struct ss7_application_route route_src;
63 struct ss7_application_route route_dst;
64
65 struct bsc_data *bsc;
66
67 /* handling for the NAT/State handling */
68 struct llist_head sccp_connections;
69 struct timer_list reset_timeout;
70 struct mtp_link_set *target_link;
71 int forward_only;
72 int reset_count;
73};
74
75
76struct ss7_application *ss7_application_alloc(struct bsc_data *);
77struct ss7_application *ss7_application_num(struct bsc_data *, int nr);
78int ss7_application_setup(struct ss7_application *, int type,
79 int src_type, int src_num,
80 int dst_type, int dst_num);
81
Holger Hans Peter Freytherab7c6012011-02-16 22:23:52 +010082int ss7_application_start(struct ss7_application *);
83
Holger Hans Peter Freythera7bc3aa2011-02-16 16:12:07 +010084#endif