2011-02-16 15:12:07 +00:00
|
|
|
/* Stuff to handle the SS7 application */
|
|
|
|
/*
|
|
|
|
* (C) 2011 by Holger Hans Peter Freyther <zecke@selfish.org>
|
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SS7_APPLICATION_H
|
|
|
|
#define SS7_APPLICATION_H
|
|
|
|
|
2011-05-08 08:29:23 +00:00
|
|
|
#include <osmocom/core/linuxlist.h>
|
|
|
|
#include <osmocom/core/timer.h>
|
2011-02-16 15:12:07 +00:00
|
|
|
|
|
|
|
struct bsc_data;
|
|
|
|
struct msc_connection;
|
|
|
|
struct mtp_link_set;
|
|
|
|
struct mtp_link;
|
|
|
|
|
|
|
|
enum ss7_set_type {
|
|
|
|
SS7_SET_LINKSET,
|
|
|
|
SS7_SET_MSC,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ss7_app_type {
|
2011-02-22 19:57:08 +00:00
|
|
|
APP_NONE,
|
2011-02-16 15:12:07 +00:00
|
|
|
APP_CELLMGR,
|
|
|
|
APP_RELAY,
|
|
|
|
APP_STP,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ss7_application_route {
|
|
|
|
int type;
|
|
|
|
int nr;
|
|
|
|
|
2011-03-02 23:45:49 +00:00
|
|
|
int up;
|
|
|
|
|
2011-02-16 15:12:07 +00:00
|
|
|
/* maybe they were resolved */
|
|
|
|
struct mtp_link_set *set;
|
|
|
|
struct msc_connection *msc;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ss7_application {
|
|
|
|
/* handling */
|
|
|
|
struct llist_head entry;
|
|
|
|
int nr;
|
|
|
|
char *name;
|
|
|
|
|
|
|
|
/* app type */
|
|
|
|
int type;
|
|
|
|
|
|
|
|
/* for the routing */
|
2011-02-22 19:57:08 +00:00
|
|
|
int route_is_set;
|
2011-02-16 15:12:07 +00:00
|
|
|
struct ss7_application_route route_src;
|
|
|
|
struct ss7_application_route route_dst;
|
|
|
|
|
|
|
|
struct bsc_data *bsc;
|
|
|
|
|
2011-02-17 19:32:09 +00:00
|
|
|
/* isup handling */
|
|
|
|
int isup_pass;
|
|
|
|
|
2011-02-16 15:12:07 +00:00
|
|
|
/* handling for the NAT/State handling */
|
|
|
|
struct llist_head sccp_connections;
|
2011-05-08 08:29:23 +00:00
|
|
|
struct osmo_timer_list reset_timeout;
|
2011-02-16 15:12:07 +00:00
|
|
|
struct mtp_link_set *target_link;
|
|
|
|
int forward_only;
|
|
|
|
int reset_count;
|
2011-09-13 18:08:57 +00:00
|
|
|
|
2012-12-11 14:32:09 +00:00
|
|
|
/* mgcp handling for the cellmgr and stp */
|
2011-09-13 18:08:57 +00:00
|
|
|
char *mgcp_domain_name;
|
2012-12-11 14:32:09 +00:00
|
|
|
char *trunk_name;
|
2013-05-13 19:08:36 +00:00
|
|
|
|
|
|
|
/* various hacks/quirks to deal with broken equipment */
|
|
|
|
/*
|
|
|
|
* Some equipments do not look into the codec list but only the
|
|
|
|
* size of it.
|
|
|
|
*/
|
|
|
|
unsigned fixed_ass_cmpl_reply : 1;
|
2015-09-21 14:42:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* force link down
|
|
|
|
*/
|
|
|
|
int force_down;
|
2011-02-16 15:12:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct ss7_application *ss7_application_alloc(struct bsc_data *);
|
|
|
|
struct ss7_application *ss7_application_num(struct bsc_data *, int nr);
|
|
|
|
int ss7_application_setup(struct ss7_application *, int type,
|
|
|
|
int src_type, int src_num,
|
|
|
|
int dst_type, int dst_num);
|
|
|
|
|
2011-02-16 21:23:52 +00:00
|
|
|
int ss7_application_start(struct ss7_application *);
|
|
|
|
|
2011-02-17 19:32:09 +00:00
|
|
|
/* config changes */
|
|
|
|
void ss7_application_pass_isup(struct ss7_application *, int pass);
|
|
|
|
|
2011-09-13 18:08:57 +00:00
|
|
|
int ss7_application_mgcp_domain_name(struct ss7_application *,
|
|
|
|
const char *domain_name);
|
2012-12-11 14:32:09 +00:00
|
|
|
int ss7_application_trunk_name(struct ss7_application *,
|
|
|
|
const char *trunk_name);
|
2011-09-13 18:08:57 +00:00
|
|
|
|
2015-09-21 13:47:10 +00:00
|
|
|
int ss7_application_msc_down(struct ss7_application *app);
|
|
|
|
int ss7_application_msc_up(struct ss7_application *app);
|
|
|
|
|
2011-02-16 15:12:07 +00:00
|
|
|
#endif
|