2009-02-14 22:51:00 +00:00
|
|
|
/* Generic signalling/notification infrastructure */
|
2015-05-02 17:55:38 +00:00
|
|
|
/* (C) 2009-2010, 2015 by Holger Hans Peter Freyther <zecke@selfish.org>
|
2009-02-16 22:05:44 +00:00
|
|
|
* (C) 2009 by Harald Welte <laforge@gnumonks.org>
|
2010-09-15 18:30:36 +00:00
|
|
|
* (C) 2010 by On-Waves
|
2009-02-14 22:51:00 +00:00
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2011-01-01 14:25:50 +00:00
|
|
|
* 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
|
2009-02-14 22:51:00 +00:00
|
|
|
* (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
|
2011-01-01 14:25:50 +00:00
|
|
|
* GNU Affero General Public License for more details.
|
2009-02-14 22:51:00 +00:00
|
|
|
*
|
2011-01-01 14:25:50 +00:00
|
|
|
* 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/>.
|
2009-02-14 22:51:00 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPENBSC_SIGNAL_H
|
|
|
|
#define OPENBSC_SIGNAL_H
|
|
|
|
|
2009-02-16 22:05:44 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/gsm_data.h>
|
2009-02-14 22:51:00 +00:00
|
|
|
|
2011-03-22 15:47:59 +00:00
|
|
|
#include <osmocom/core/signal.h>
|
2009-02-14 22:51:00 +00:00
|
|
|
|
|
|
|
/*
|
2009-02-16 22:05:44 +00:00
|
|
|
* Signalling subsystems
|
2009-02-14 22:51:00 +00:00
|
|
|
*/
|
2009-02-17 14:35:45 +00:00
|
|
|
enum signal_subsystems {
|
|
|
|
SS_PAGING,
|
|
|
|
SS_SMS,
|
2009-07-29 21:14:15 +00:00
|
|
|
SS_SUBSCR,
|
2009-11-14 09:08:40 +00:00
|
|
|
SS_SCALL,
|
2009-02-17 14:35:45 +00:00
|
|
|
};
|
2009-02-14 22:51:00 +00:00
|
|
|
|
2009-02-16 22:05:44 +00:00
|
|
|
/* SS_PAGING signals */
|
|
|
|
enum signal_paging {
|
2009-12-19 11:38:10 +00:00
|
|
|
S_PAGING_SUCCEEDED,
|
|
|
|
S_PAGING_EXPIRED,
|
2009-02-14 22:51:00 +00:00
|
|
|
};
|
|
|
|
|
2009-08-08 14:03:15 +00:00
|
|
|
/* SS_SMS signals */
|
|
|
|
enum signal_sms {
|
|
|
|
S_SMS_SUBMITTED, /* A SMS has been successfully submitted to us */
|
|
|
|
S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */
|
|
|
|
S_SMS_SMMA, /* A MS tells us it has more space available */
|
2009-08-09 12:59:02 +00:00
|
|
|
S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */
|
2010-12-24 08:47:04 +00:00
|
|
|
S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */
|
2009-08-08 14:03:15 +00:00
|
|
|
};
|
|
|
|
|
2009-07-29 21:14:15 +00:00
|
|
|
/* SS_SUBSCR signals */
|
|
|
|
enum signal_subscr {
|
|
|
|
S_SUBSCR_ATTACHED,
|
|
|
|
S_SUBSCR_DETACHED,
|
2009-12-13 11:39:18 +00:00
|
|
|
S_SUBSCR_IDENTITY, /* we've received some identity information */
|
2009-07-29 21:14:15 +00:00
|
|
|
};
|
|
|
|
|
2009-11-14 09:08:40 +00:00
|
|
|
/* SS_SCALL signals */
|
|
|
|
enum signal_scall {
|
|
|
|
S_SCALL_SUCCESS,
|
|
|
|
S_SCALL_EXPIRED,
|
|
|
|
S_SCALL_DETACHED,
|
|
|
|
};
|
|
|
|
|
2010-03-05 18:36:20 +00:00
|
|
|
/* SS_IPAC_NWL signals */
|
|
|
|
enum signal_ipaccess {
|
|
|
|
S_IPAC_NWL_COMPLETE,
|
|
|
|
};
|
|
|
|
|
2009-11-30 18:37:18 +00:00
|
|
|
enum signal_global {
|
2011-01-14 14:55:42 +00:00
|
|
|
S_GLOBAL_BTS_CLOSE_OM,
|
2009-11-30 18:37:18 +00:00
|
|
|
};
|
|
|
|
|
2009-02-14 22:51:00 +00:00
|
|
|
struct paging_signal_data {
|
2016-06-19 16:06:02 +00:00
|
|
|
struct vlr_subscr *vsub;
|
2009-02-14 22:51:00 +00:00
|
|
|
struct gsm_bts *bts;
|
|
|
|
|
2010-12-23 17:19:17 +00:00
|
|
|
int paging_result;
|
|
|
|
|
2009-02-14 22:51:00 +00:00
|
|
|
/* NULL in case the paging didn't work */
|
2010-06-17 07:05:57 +00:00
|
|
|
struct gsm_subscriber_connection *conn;
|
2009-02-14 22:51:00 +00:00
|
|
|
};
|
|
|
|
|
2009-11-14 09:08:40 +00:00
|
|
|
struct scall_signal_data {
|
2010-06-17 07:05:57 +00:00
|
|
|
struct gsm_subscriber_connection *conn;
|
2009-11-14 09:08:40 +00:00
|
|
|
void *data;
|
|
|
|
};
|
2010-12-24 09:15:55 +00:00
|
|
|
struct sms_signal_data {
|
|
|
|
/* The transaction where this occured */
|
|
|
|
struct gsm_trans *trans;
|
|
|
|
/* Can be NULL for SMMA */
|
|
|
|
struct gsm_sms *sms;
|
|
|
|
/* int paging result. Only the ones with > 0 */
|
|
|
|
int paging_result;
|
|
|
|
};
|
|
|
|
|
2009-02-14 22:51:00 +00:00
|
|
|
#endif
|