2008-12-23 20:25:15 +00:00
|
|
|
#ifndef _GSM_DATA_H
|
|
|
|
#define _GSM_DATA_H
|
|
|
|
|
2011-05-24 11:25:38 +00:00
|
|
|
#include <stdint.h>
|
2016-05-24 12:23:27 +00:00
|
|
|
#include <regex.h>
|
|
|
|
#include <sys/types.h>
|
2016-06-30 08:25:49 +00:00
|
|
|
#include <stdbool.h>
|
2011-05-24 11:25:38 +00:00
|
|
|
|
|
|
|
#include <osmocom/core/timer.h>
|
2016-07-12 13:42:02 +00:00
|
|
|
#include <osmocom/core/rate_ctr.h>
|
2011-05-25 11:10:08 +00:00
|
|
|
#include <osmocom/core/select.h>
|
2016-07-12 13:42:02 +00:00
|
|
|
#include <osmocom/core/stats.h>
|
2017-09-15 09:22:30 +00:00
|
|
|
#include <osmocom/gsm/gsm48.h>
|
2016-04-20 11:13:19 +00:00
|
|
|
#include <osmocom/crypt/auth.h>
|
2017-04-09 10:32:51 +00:00
|
|
|
#include <osmocom/sigtran/sccp_sap.h>
|
2011-05-24 11:25:38 +00:00
|
|
|
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/common.h>
|
|
|
|
#include <osmocom/msc/common_cs.h>
|
2017-09-03 23:03:58 +00:00
|
|
|
#include <osmocom/mgcp_client/mgcp_client.h>
|
2011-05-25 10:33:33 +00:00
|
|
|
|
2018-01-24 23:07:33 +00:00
|
|
|
#include "gsm_data_shared.h"
|
|
|
|
|
2018-04-09 14:35:01 +00:00
|
|
|
/* TS 48.008 DLCI containing DCCH/ACCH + SAPI */
|
|
|
|
#define OMSC_LINKID_CB(__msgb) (__msgb)->cb[3]
|
2017-04-09 10:32:51 +00:00
|
|
|
|
2018-03-15 11:55:46 +00:00
|
|
|
#include "../../bscconfig.h"
|
|
|
|
#if BUILD_IU
|
|
|
|
#include <osmocom/ranap/iu_client.h>
|
|
|
|
#endif
|
|
|
|
|
2013-04-29 07:11:02 +00:00
|
|
|
/** annotations for msgb ownership */
|
|
|
|
#define __uses
|
|
|
|
|
2011-10-26 16:37:09 +00:00
|
|
|
struct mncc_sock_state;
|
2016-06-19 16:06:02 +00:00
|
|
|
struct vlr_instance;
|
|
|
|
struct vlr_subscr;
|
2017-07-05 13:19:52 +00:00
|
|
|
struct ranap_ue_conn_ctx;
|
2011-10-26 16:37:09 +00:00
|
|
|
|
2017-01-09 23:49:56 +00:00
|
|
|
#define tmsi_from_string(str) strtoul(str, NULL, 10)
|
|
|
|
|
2009-02-01 13:32:45 +00:00
|
|
|
struct msgb;
|
|
|
|
typedef int gsm_cbfn(unsigned int hooknum,
|
|
|
|
unsigned int event,
|
|
|
|
struct msgb *msg,
|
|
|
|
void *data, void *param);
|
|
|
|
|
2009-12-27 20:56:14 +00:00
|
|
|
struct gsm_auth_tuple {
|
|
|
|
int use_count;
|
|
|
|
int key_seq;
|
2016-04-20 11:13:19 +00:00
|
|
|
struct osmo_auth_vector vec;
|
2009-12-27 20:56:14 +00:00
|
|
|
};
|
2010-06-09 10:45:37 +00:00
|
|
|
#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */
|
2009-12-27 20:56:14 +00:00
|
|
|
|
2017-02-02 00:07:28 +00:00
|
|
|
enum ran_type {
|
|
|
|
RAN_UNKNOWN,
|
|
|
|
RAN_GERAN_A, /* 2G / A-interface */
|
|
|
|
RAN_UTRAN_IU, /* 3G / Iu-interface (IuCS or IuPS) */
|
|
|
|
};
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
extern const struct value_string ran_type_names[];
|
|
|
|
static inline const char *ran_type_name(enum ran_type val)
|
|
|
|
{ return get_value_string(ran_type_names, val); }
|
|
|
|
|
2016-06-19 16:06:02 +00:00
|
|
|
struct gsm_classmark {
|
|
|
|
bool classmark1_set;
|
|
|
|
struct gsm48_classmark1 classmark1;
|
|
|
|
uint8_t classmark2_len;
|
|
|
|
uint8_t classmark2[3];
|
|
|
|
uint8_t classmark3_len;
|
|
|
|
uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be truncated */
|
|
|
|
};
|
|
|
|
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
enum integrity_protection_state {
|
|
|
|
INTEGRITY_PROTECTION_NONE = 0,
|
|
|
|
INTEGRITY_PROTECTION_IK = 1,
|
|
|
|
INTEGRITY_PROTECTION_IK_CK = 2,
|
|
|
|
};
|
|
|
|
|
subscr_conn: store complete_layer3_type in conn, not FSM event arg
Instead of jumping through hoops to pass the Complete Layer 3 operation that
created this conn via FSM event dispatch parameters, put it right in the
gsm_subscriber_connection struct, where it always belonged.
Move definition of the enum complete_layer3_type to gsm_data.h, where
gsm_subscriber_connection is defined.
Introduce msc_subscr_conn_update_id() to set the complete_layer3_type of the
conn as soon as a Complete Layer 3 message is received.
In msc_subscr_conn_update_id(), already include an mi_string argument to
prepare for an upcoming patch where the FSM will be allocated much earlier when
the Mobile Identity is not known yet, and we'll also update the fi->id here.
The odd logging change in the msc_vlr_tests output uncovers a wrong use of the
osmo_fsm_inst_dispatch() data argument for SUBSCR_CONN_E_CN_CLOSE events: if a
child FSM signals unsuccessful result, instead of the failure cause, it passed
the complete_layer3_type, as requested upon FSM allocation, which was then
misinterpreted as a failure cause. Now a child FSM failure will pass NULL
instead, while other SUBSCR_CONN_E_CN_CLOSE events may still pass a valid cause
value.
Related: OS#3122
Change-Id: Iae30dd57a8861c4eaaf56999f872d4e635ba97fb
2018-04-02 10:26:16 +00:00
|
|
|
enum complete_layer3_type {
|
|
|
|
COMPLETE_LAYER3_NONE,
|
|
|
|
COMPLETE_LAYER3_LU,
|
|
|
|
COMPLETE_LAYER3_CM_SERVICE_REQ,
|
|
|
|
COMPLETE_LAYER3_PAGING_RESP,
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct value_string complete_layer3_type_names[];
|
|
|
|
static inline const char *complete_layer3_type_name(enum complete_layer3_type val)
|
|
|
|
{
|
|
|
|
return get_value_string(complete_layer3_type_names, val);
|
|
|
|
}
|
|
|
|
|
2016-05-09 19:07:43 +00:00
|
|
|
/* active radio connection of a mobile subscriber */
|
2010-03-23 05:41:45 +00:00
|
|
|
struct gsm_subscriber_connection {
|
2016-06-19 16:06:02 +00:00
|
|
|
/* global linked list of subscriber_connections */
|
2010-09-15 16:53:37 +00:00
|
|
|
struct llist_head entry;
|
|
|
|
|
2018-03-31 16:45:59 +00:00
|
|
|
/* FSM instance to control the subscriber connection's permissions and lifetime. */
|
|
|
|
struct osmo_fsm_inst *fi;
|
subscr_conn: store complete_layer3_type in conn, not FSM event arg
Instead of jumping through hoops to pass the Complete Layer 3 operation that
created this conn via FSM event dispatch parameters, put it right in the
gsm_subscriber_connection struct, where it always belonged.
Move definition of the enum complete_layer3_type to gsm_data.h, where
gsm_subscriber_connection is defined.
Introduce msc_subscr_conn_update_id() to set the complete_layer3_type of the
conn as soon as a Complete Layer 3 message is received.
In msc_subscr_conn_update_id(), already include an mi_string argument to
prepare for an upcoming patch where the FSM will be allocated much earlier when
the Mobile Identity is not known yet, and we'll also update the fi->id here.
The odd logging change in the msc_vlr_tests output uncovers a wrong use of the
osmo_fsm_inst_dispatch() data argument for SUBSCR_CONN_E_CN_CLOSE events: if a
child FSM signals unsuccessful result, instead of the failure cause, it passed
the complete_layer3_type, as requested upon FSM allocation, which was then
misinterpreted as a failure cause. Now a child FSM failure will pass NULL
instead, while other SUBSCR_CONN_E_CN_CLOSE events may still pass a valid cause
value.
Related: OS#3122
Change-Id: Iae30dd57a8861c4eaaf56999f872d4e635ba97fb
2018-04-02 10:26:16 +00:00
|
|
|
enum complete_layer3_type complete_layer3_type;
|
2018-03-31 16:45:59 +00:00
|
|
|
|
2016-06-19 16:06:02 +00:00
|
|
|
/* usage count. If this drops to zero, we start the release
|
|
|
|
* towards A/Iu */
|
|
|
|
uint32_t use_count;
|
2017-11-22 13:33:12 +00:00
|
|
|
uint32_t use_tokens;
|
2016-06-19 16:06:02 +00:00
|
|
|
|
|
|
|
/* The MS has opened the conn with a CM Service Request, and we shall
|
|
|
|
* keep it open for an actual request (or until timeout). */
|
|
|
|
bool received_cm_service_request;
|
2010-03-23 05:41:45 +00:00
|
|
|
|
2016-06-19 16:06:02 +00:00
|
|
|
/* libmsc/libvlr subscriber information (if available) */
|
|
|
|
struct vlr_subscr *vsub;
|
|
|
|
|
2013-06-30 13:30:47 +00:00
|
|
|
/* LU expiration handling */
|
|
|
|
uint8_t expire_timer_stopped;
|
2014-02-08 14:20:48 +00:00
|
|
|
/* SMS helpers for libmsc */
|
|
|
|
uint8_t next_rp_ref;
|
2013-06-30 13:30:47 +00:00
|
|
|
|
2010-03-23 05:41:45 +00:00
|
|
|
/* Are we part of a special "silent" call */
|
|
|
|
int silent_call;
|
|
|
|
|
2010-03-23 06:52:17 +00:00
|
|
|
/* back pointers */
|
2016-05-09 20:33:01 +00:00
|
|
|
struct gsm_network *network;
|
|
|
|
|
2017-02-02 00:07:28 +00:00
|
|
|
/* connected via 2G or 3G? */
|
|
|
|
enum ran_type via_ran;
|
2016-06-19 16:06:02 +00:00
|
|
|
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
uint16_t lac;
|
2018-11-30 03:35:50 +00:00
|
|
|
struct geran_encr geran_encr;
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
|
A5/n Ciph: request Classmark Update if missing
When the VLR requests a Ciphering Mode with vlr_ops.set_ciph_mode(), and if we
need a ciph algo flag from a Classmark information that is not yet known
(usually CM 2 during LU), send a BSSMAP Classmark Request to get it.
To manage the intermission of the Classmark Request, add
- msc_classmark_request_then_cipher_mode_cmd(),
- state SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE,
- event SUBSCR_CONN_E_CLASSMARK_UPDATE.
From state AUTH_CIPH, switch to state WAIT_CLASSMARK_UPDATE. Once the BSSMAP
Classmark Response, is received, switch back to SUBSCR_CONN_S_AUTH_CIPH and
re-initiate Ciphering Mode.
To be able to re-enter the Ciphering Mode algo decision, factor it out into
msc_geran_set_cipher_mode().
Rationale:
In the following commit, essentially we stopped supporting A5/3 ciphering:
commit 71330720b6efdda2fcfd3e9c0cb45f89e32e5670
"MSC: Intersect configured A5 algorithms with MS-supported ones"
Change-Id: Id124923ee52a357cb7d3e04d33f585214774f3a3
A5/3 was no longer supported because from that commit on, we strictly checked
the MS-supported ciphers, but we did not have Classmark 2 available during
Location Updating.
This patch changes that: when Classmark 2 is missing, actively request it by a
BSSMAP Classmark Request; continue Ciphering only after the Response. Always
request missing Classmark, even if a lesser cipher were configured available.
If the Classmark Update response fails to come in, cause an attach failure.
Instead, we could attempt to use a lesser cipher that is also enabled. That is
left as a future feature, should that become relevant. I think it's unlikely.
Technically, we could now end up requesting a Classmark Updating both during LU
(vlr_lu_fsm) and CM Service/Paging Response (proc_arq_fsm), but in practice the
only time we lack a Classmark is: during Location Updating with A5/3 enabled.
A5/1 support is indicated in CM1 which is always available, and A5/3 support is
indicated in CM2, which is always available during CM Service Request as well
as Paging Response. So this patch has practical relevance only for Location
Updating. For networks that permit only A5/3, this patch fixes Location
Updating. For networks that support A5/3 and A5/1, so far we always used A5/1
during LU, and after this patch we request CM2 and likely use A5/3 instead.
In msc_vlr_test_gsm_ciph, verify that requesting Classmark 2 for A5/3 works
during LU. Also verify that the lack of a Classmark Response results in attach
failure.
In msc_vlr_test_gsm_ciph, a hacky unit test fakes a situation where a CM2 is
missing during proc_arq_fsm and proves that that code path works, even though
the practical relevance is currently zero. It would only become interesting if
ciphering algorithms A5/4 and higher became relevant, because support of those
would be indicated in Classmark 3, which would always require a Classmark
Request.
Related: OS#3043
Depends: I4a2e1d3923e33912579c4180aa1ff8e8f5abb7e7 (libosmocore)
Change-Id: I73c7cb6a86624695bd9c0f59abb72e2fdc655131
2018-09-13 01:23:07 +00:00
|
|
|
/* "Temporary" storage for the case the VLR asked for Cipher Mode Command, but the MSC still
|
|
|
|
* wants to request a Classmark Update first. */
|
|
|
|
struct {
|
|
|
|
bool umts_aka;
|
|
|
|
bool retrieve_imeisv;
|
|
|
|
} geran_set_cipher_mode;
|
|
|
|
|
2018-02-03 20:08:26 +00:00
|
|
|
/* N(SD) expected in the received frame, per flow (TS 24.007 11.2.3.2.3.2.2) */
|
|
|
|
uint8_t n_sd_next[4];
|
|
|
|
|
2017-04-09 10:32:51 +00:00
|
|
|
struct {
|
2017-11-07 16:19:25 +00:00
|
|
|
struct mgcp_ctx *mgcp_ctx;
|
2017-04-09 10:32:51 +00:00
|
|
|
unsigned int mgcp_rtp_endpoint;
|
2017-11-07 16:19:25 +00:00
|
|
|
|
|
|
|
uint16_t local_port_ran;
|
|
|
|
char local_addr_ran[INET_ADDRSTRLEN];
|
|
|
|
uint16_t remote_port_ran;
|
|
|
|
char remote_addr_ran[INET_ADDRSTRLEN];
|
2018-08-07 11:00:14 +00:00
|
|
|
enum mgcp_codecs codec_ran;
|
|
|
|
|
2017-11-07 16:19:25 +00:00
|
|
|
uint16_t local_port_cn;
|
|
|
|
char local_addr_cn[INET_ADDRSTRLEN];
|
|
|
|
uint16_t remote_port_cn;
|
|
|
|
char remote_addr_cn[INET_ADDRSTRLEN];
|
2018-08-07 11:00:14 +00:00
|
|
|
enum mgcp_codecs codec_cn;
|
2017-04-09 10:32:51 +00:00
|
|
|
} rtp;
|
|
|
|
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
/* which Iu-CS connection, if any. */
|
|
|
|
struct {
|
2017-07-05 13:19:52 +00:00
|
|
|
struct ranap_ue_conn_ctx *ue_ctx;
|
2016-05-20 19:59:55 +00:00
|
|
|
uint8_t rab_id;
|
2018-04-01 18:55:54 +00:00
|
|
|
bool waiting_for_release_complete;
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
} iu;
|
2017-04-09 10:32:51 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
/* A pointer to the SCCP user that handles
|
|
|
|
* the SCCP connections for this subscriber
|
|
|
|
* connection */
|
|
|
|
struct osmo_sccp_user *scu;
|
|
|
|
|
|
|
|
/* The address of the BSC that is associated
|
|
|
|
* with this subscriber connection */
|
|
|
|
struct osmo_sccp_addr bsc_addr;
|
|
|
|
|
|
|
|
/* The connection identifier that is used
|
|
|
|
* to reference the SCCP connection that is
|
|
|
|
* associated with this subscriber connection */
|
2018-01-30 10:38:59 +00:00
|
|
|
uint32_t conn_id;
|
2018-04-01 18:55:54 +00:00
|
|
|
|
|
|
|
bool waiting_for_clear_complete;
|
2017-04-09 10:32:51 +00:00
|
|
|
} a;
|
2018-09-18 13:52:58 +00:00
|
|
|
|
|
|
|
/* Temporary storage for Classmark Information for times when a connection has no VLR subscriber
|
|
|
|
* associated yet. It will get copied to the VLR subscriber upon msc_vlr_subscr_assoc(). */
|
|
|
|
struct gsm_classmark temporary_classmark;
|
2010-03-23 05:41:45 +00:00
|
|
|
};
|
|
|
|
|
2011-02-14 15:15:21 +00:00
|
|
|
|
2016-08-02 09:34:11 +00:00
|
|
|
enum {
|
2016-07-12 13:42:02 +00:00
|
|
|
MSC_CTR_LOC_UPDATE_TYPE_ATTACH,
|
|
|
|
MSC_CTR_LOC_UPDATE_TYPE_NORMAL,
|
|
|
|
MSC_CTR_LOC_UPDATE_TYPE_PERIODIC,
|
|
|
|
MSC_CTR_LOC_UPDATE_TYPE_DETACH,
|
LU counters: count completion and failure, not messages sent
From a human admin viewpoint it doesn't make sense to count the messages sent:
When we use TMSIs, we first send a LU Accept with a new TMSI, and then expect
the MS to respond with a TMSI Realloc Complete message. When that fails to come
through, the LU actually ends in failure, even though a LU Accept was sent.
If a conn breaks/vanishes during LU, we cancel the LU without sending any reply
at all, so the failed LU would not be counted.
Instead, count Location Updating results, i.e. completion and failures.
(With the new VLR developments, LU counters need to be triggered in completely
different places, and this patch prepares for that by providing sensible
counters.)
Change-Id: I03f14c6a2f7ec5e1d3ba401e32082476fc7b0cc6
2016-05-09 11:18:03 +00:00
|
|
|
MSC_CTR_LOC_UPDATE_FAILED,
|
|
|
|
MSC_CTR_LOC_UPDATE_COMPLETED,
|
refactor subscr_conn and subscr_conn_fsm de-/alloc
Refactor:
1. Glue the gsm_subscriber_connection alloc to the subscr_conn_fsm.
2. Add separate AUTH_CIPH state to the FSM.
3. Use conn->use_count to trigger conn release.
4. Add separate RELEASING state to the FSM.
5. Add rate counters for each of the three Complete Layer 3 types.
Details:
1. Glue the gsm_subscriber_connection alloc to the subscr_conn_fsm.
Historically, a gsm_subscriber_connection was allocated in libbsc land, and
only upon Complete Layer 3 did libmsc add the fsm instance. After splitting
openbsc.git into a separate osmo-msc, this is no longer necessary, hence:
Closely tie gsm_subscriber_connection allocation to the subscr_conn_fsm
instance: talloc the conn as a child of the FSM instance, and discard the conn
as soon as the FSM terminates.
2. Add separate AUTH_CIPH state to the FSM.
Decoding the Complete Layer 3 message is distinctly separate from waiting for
the VLR FSMs to conclude. Use the NEW state as "we don't know if this is a
valid message yet", and the AUTH_CIPH state as "evaluating, don't release".
A profound effect of this: should we for any odd reason fail to leave the FSM's
NEW state, the conn will be released right at the end of msc_compl_l3(),
without needing to trigger release in each code path.
3. Use conn->use_count to trigger conn release.
Before, the FSM itself would hold a use count on the conn, and hence we would
need to ask it whether it is ready to release the conn yet by dispatching
events, to achieve a use_count decrement.
Instead, unite the FSM instance and conn, and do not hold a use count by the
FSM. Hence, trigger an FSM "UNUSED" event only when the use_count reaches zero.
As long as use counts are done correctly, the FSM will terminate correctly.
These exceptions:
- The new AUTH_CIPH state explicitly ignores UNUSED events, since we expect the
use count to reach zero while evaluating Authentication and Ciphering. (I
experimented with holding a use count by AUTH_CIPH onenter() and releasing by
onleave(), but the use count and thus the conn are released before the next
state can initiate transactions that would increment the use count again.
Same thing for the VLR FSMs holding a use count, they should be done before
we advance to the next state. The easiest is to simply expect zero use count
during the AUTH_CIPH state.)
- A CM Service Request means that even though the MSC would be through with all
it wants to do, we shall still wait for a request to follow from the MS.
Hence the FSM holds a use count on itself while a CM Service is pending.
- While waiting for a Release/Clear Complete, the FSM holds a use count on
itself.
4. Add separate RELEASING state to the FSM.
If we decide to release for other reasons than a use count reaching zero, we
still need to be able to wait for the msc_dtap() use count on the conn to
release.
(An upcoming patch will further use the RELEASING state to properly wait for
Clear Complete / Release Complete messages.)
5. Add rate counters for each of the three Complete Layer 3 types.
Besides LU, also count CM Service Request and Paging Response
acceptance/rejections. Without these counters, only very few of the auth+ciph
outcomes actually show in the counters.
Related: OS#3122
Change-Id: I55feb379e176a96a831e105b86202b17a0ffe889
2018-03-30 22:02:14 +00:00
|
|
|
MSC_CTR_CM_SERVICE_REQUEST_REJECTED,
|
|
|
|
MSC_CTR_CM_SERVICE_REQUEST_ACCEPTED,
|
|
|
|
MSC_CTR_PAGING_RESP_REJECTED,
|
|
|
|
MSC_CTR_PAGING_RESP_ACCEPTED,
|
2016-07-12 13:42:02 +00:00
|
|
|
MSC_CTR_SMS_SUBMITTED,
|
|
|
|
MSC_CTR_SMS_NO_RECEIVER,
|
|
|
|
MSC_CTR_SMS_DELIVERED,
|
|
|
|
MSC_CTR_SMS_RP_ERR_MEM,
|
|
|
|
MSC_CTR_SMS_RP_ERR_OTHER,
|
2016-08-21 18:16:33 +00:00
|
|
|
MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR,
|
2016-07-12 13:42:02 +00:00
|
|
|
MSC_CTR_CALL_MO_SETUP,
|
|
|
|
MSC_CTR_CALL_MO_CONNECT_ACK,
|
|
|
|
MSC_CTR_CALL_MT_SETUP,
|
|
|
|
MSC_CTR_CALL_MT_CONNECT,
|
2016-08-23 05:32:27 +00:00
|
|
|
MSC_CTR_CALL_ACTIVE,
|
|
|
|
MSC_CTR_CALL_COMPLETE,
|
|
|
|
MSC_CTR_CALL_INCOMPLETE,
|
2018-06-22 20:32:20 +00:00
|
|
|
MSC_CTR_NC_SS_MO_REQUESTS,
|
|
|
|
MSC_CTR_NC_SS_MO_ESTABLISHED,
|
|
|
|
MSC_CTR_NC_SS_MT_REQUESTS,
|
|
|
|
MSC_CTR_NC_SS_MT_ESTABLISHED,
|
2018-11-02 15:01:03 +00:00
|
|
|
MSC_CTR_BSSMAP_CIPHER_MODE_REJECT,
|
|
|
|
MSC_CTR_BSSMAP_CIPHER_MODE_COMPLETE,
|
2016-07-12 13:42:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct rate_ctr_desc msc_ctr_description[] = {
|
2017-11-18 22:22:17 +00:00
|
|
|
[MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type:attach", "Received location update imsi attach requests."},
|
|
|
|
[MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type:normal", "Received location update normal requests."},
|
|
|
|
[MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type:periodic", "Received location update periodic requests."},
|
|
|
|
[MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type:detach", "Received location update detach indication."},
|
|
|
|
[MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp:failed", "Rejected location updates."},
|
|
|
|
[MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp:completed", "Successful location updates."},
|
refactor subscr_conn and subscr_conn_fsm de-/alloc
Refactor:
1. Glue the gsm_subscriber_connection alloc to the subscr_conn_fsm.
2. Add separate AUTH_CIPH state to the FSM.
3. Use conn->use_count to trigger conn release.
4. Add separate RELEASING state to the FSM.
5. Add rate counters for each of the three Complete Layer 3 types.
Details:
1. Glue the gsm_subscriber_connection alloc to the subscr_conn_fsm.
Historically, a gsm_subscriber_connection was allocated in libbsc land, and
only upon Complete Layer 3 did libmsc add the fsm instance. After splitting
openbsc.git into a separate osmo-msc, this is no longer necessary, hence:
Closely tie gsm_subscriber_connection allocation to the subscr_conn_fsm
instance: talloc the conn as a child of the FSM instance, and discard the conn
as soon as the FSM terminates.
2. Add separate AUTH_CIPH state to the FSM.
Decoding the Complete Layer 3 message is distinctly separate from waiting for
the VLR FSMs to conclude. Use the NEW state as "we don't know if this is a
valid message yet", and the AUTH_CIPH state as "evaluating, don't release".
A profound effect of this: should we for any odd reason fail to leave the FSM's
NEW state, the conn will be released right at the end of msc_compl_l3(),
without needing to trigger release in each code path.
3. Use conn->use_count to trigger conn release.
Before, the FSM itself would hold a use count on the conn, and hence we would
need to ask it whether it is ready to release the conn yet by dispatching
events, to achieve a use_count decrement.
Instead, unite the FSM instance and conn, and do not hold a use count by the
FSM. Hence, trigger an FSM "UNUSED" event only when the use_count reaches zero.
As long as use counts are done correctly, the FSM will terminate correctly.
These exceptions:
- The new AUTH_CIPH state explicitly ignores UNUSED events, since we expect the
use count to reach zero while evaluating Authentication and Ciphering. (I
experimented with holding a use count by AUTH_CIPH onenter() and releasing by
onleave(), but the use count and thus the conn are released before the next
state can initiate transactions that would increment the use count again.
Same thing for the VLR FSMs holding a use count, they should be done before
we advance to the next state. The easiest is to simply expect zero use count
during the AUTH_CIPH state.)
- A CM Service Request means that even though the MSC would be through with all
it wants to do, we shall still wait for a request to follow from the MS.
Hence the FSM holds a use count on itself while a CM Service is pending.
- While waiting for a Release/Clear Complete, the FSM holds a use count on
itself.
4. Add separate RELEASING state to the FSM.
If we decide to release for other reasons than a use count reaching zero, we
still need to be able to wait for the msc_dtap() use count on the conn to
release.
(An upcoming patch will further use the RELEASING state to properly wait for
Clear Complete / Release Complete messages.)
5. Add rate counters for each of the three Complete Layer 3 types.
Besides LU, also count CM Service Request and Paging Response
acceptance/rejections. Without these counters, only very few of the auth+ciph
outcomes actually show in the counters.
Related: OS#3122
Change-Id: I55feb379e176a96a831e105b86202b17a0ffe889
2018-03-30 22:02:14 +00:00
|
|
|
[MSC_CTR_CM_SERVICE_REQUEST_REJECTED] = {"cm_service_request:rejected", "Rejected CM Service Request."},
|
|
|
|
[MSC_CTR_CM_SERVICE_REQUEST_ACCEPTED] = {"cm_service_request:accepted", "Accepted CM Service Request."},
|
|
|
|
[MSC_CTR_PAGING_RESP_REJECTED] = {"paging_resp:rejected", "Rejected Paging Response."},
|
|
|
|
[MSC_CTR_PAGING_RESP_ACCEPTED] = {"paging_resp:accepted", "Accepted Paging Response."},
|
2017-11-18 22:22:17 +00:00
|
|
|
[MSC_CTR_SMS_SUBMITTED] = {"sms:submitted", "Received a RPDU from a MS (MO)."},
|
|
|
|
[MSC_CTR_SMS_NO_RECEIVER] = {"sms:no_receiver", "Counts SMS which couldn't routed because no receiver found."},
|
|
|
|
[MSC_CTR_SMS_DELIVERED] = {"sms:delivered", "Global SMS Deliver attempts."},
|
|
|
|
[MSC_CTR_SMS_RP_ERR_MEM] = {"sms:rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."},
|
|
|
|
[MSC_CTR_SMS_RP_ERR_OTHER] = {"sms:rp_err_other", "Other error of MS responses on a sms delive attempt."},
|
|
|
|
[MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms:deliver_unknown_error", "Unknown error occured during sms delivery."},
|
2016-07-12 13:42:02 +00:00
|
|
|
/* FIXME: count also sms delivered */
|
2017-11-18 22:22:17 +00:00
|
|
|
[MSC_CTR_CALL_MO_SETUP] = {"call:mo_setup", "Received setup requests from a MS to init a MO call."},
|
|
|
|
[MSC_CTR_CALL_MO_CONNECT_ACK] = {"call:mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."},
|
|
|
|
[MSC_CTR_CALL_MT_SETUP] = {"call:mt_setup", "Sent setup requests to the MS (MT)."},
|
|
|
|
[MSC_CTR_CALL_MT_CONNECT] = {"call:mt_connect", "Sent a connect to the MS (MT)."},
|
|
|
|
[MSC_CTR_CALL_ACTIVE] = {"call:active", "Count total amount of calls that ever reached active state."},
|
|
|
|
[MSC_CTR_CALL_COMPLETE] = {"call:complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."},
|
|
|
|
[MSC_CTR_CALL_INCOMPLETE] = {"call:incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."},
|
2018-06-22 20:32:20 +00:00
|
|
|
[MSC_CTR_NC_SS_MO_REQUESTS] = {"nc_ss:mo_requests", "Received MS-initiated call independent SS/USSD requests."},
|
|
|
|
[MSC_CTR_NC_SS_MO_ESTABLISHED] = {"nc_ss:mo_established", "Established MS-initiated call independent SS/USSD sessions."},
|
|
|
|
[MSC_CTR_NC_SS_MT_REQUESTS] = {"nc_ss:mt_requests", "Received network-initiated call independent SS/USSD requests."},
|
|
|
|
[MSC_CTR_NC_SS_MT_ESTABLISHED] = {"nc_ss:mt_established", "Established network-initiated call independent SS/USSD sessions."},
|
2018-11-02 15:01:03 +00:00
|
|
|
[MSC_CTR_BSSMAP_CIPHER_MODE_REJECT] = {"bssmap:cipher_mode_reject", "Number of CIPHER MODE REJECT messages processed by BSSMAP layer"},
|
|
|
|
[MSC_CTR_BSSMAP_CIPHER_MODE_COMPLETE] = {"bssmap:cipher_mode_complete", "Number of CIPHER MODE COMPLETE messages processed by BSSMAP layer"},
|
2016-08-02 09:34:11 +00:00
|
|
|
};
|
|
|
|
|
2016-07-12 13:42:02 +00:00
|
|
|
static const struct rate_ctr_group_desc msc_ctrg_desc = {
|
|
|
|
"msc",
|
|
|
|
"mobile switching center",
|
|
|
|
OSMO_STATS_CLASS_GLOBAL,
|
|
|
|
ARRAY_SIZE(msc_ctr_description),
|
|
|
|
msc_ctr_description,
|
2009-12-21 23:41:05 +00:00
|
|
|
};
|
|
|
|
|
fix paging: add timeout to discard unsuccessful paging
Currently, if there is no reply from the BSS / RNC, a subscriber will remain as
"already paged" forever, and is never going to be paged again. Even on IMSI
Detach, the pending request will keep a ref count on the vlr_subscr.
Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the
'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' /
'T3113' in OsmoBSC, but to not confuse the two, give this a different name.)
Add test_ms_timeout_paging() test to verify the timeout works.
I hit this while testing Paging across multiple hNodeB, when a UE lost
connection to the hNodeB. I noticed that no matter how long I wait, no Paging
is sent out anymore, and found this embarrassing issue. Good grief...
The choice of 10 seconds is taken from https://osmocom.org/issues/2756
Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5
2017-12-15 02:02:27 +00:00
|
|
|
#define MSC_PAGING_RESPONSE_TIMER_DEFAULT 10
|
2009-12-01 12:06:54 +00:00
|
|
|
|
2016-05-10 11:29:33 +00:00
|
|
|
struct gsm_tz {
|
|
|
|
int override; /* if 0, use system's time zone instead. */
|
|
|
|
int hr; /* hour */
|
|
|
|
int mn; /* minute */
|
|
|
|
int dst; /* daylight savings */
|
|
|
|
};
|
|
|
|
|
2008-12-23 20:25:15 +00:00
|
|
|
struct gsm_network {
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
/* TODO MSCSPLIT the gsm_network struct is basically a kitchen sink for
|
|
|
|
* global settings and variables, "madly" mixing BSC and MSC stuff. Split
|
|
|
|
* this in e.g. struct osmo_bsc and struct osmo_msc, with the things
|
|
|
|
* these have in common, like country and network code, put in yet
|
|
|
|
* separate structs and placed as members in osmo_bsc and osmo_msc. */
|
|
|
|
|
2018-02-22 03:04:54 +00:00
|
|
|
struct osmo_plmn_id plmn;
|
|
|
|
|
2008-12-30 18:01:02 +00:00
|
|
|
char *name_long;
|
|
|
|
char *name_short;
|
2018-02-22 03:04:54 +00:00
|
|
|
|
2017-12-23 18:30:32 +00:00
|
|
|
/* bit-mask of permitted encryption algorithms. LSB=A5/0, MSB=A5/7 */
|
|
|
|
uint8_t a5_encryption_mask;
|
2016-06-19 16:06:02 +00:00
|
|
|
bool authentication_required;
|
2009-12-14 08:00:24 +00:00
|
|
|
int send_mm_info;
|
2008-12-23 20:25:15 +00:00
|
|
|
|
2016-08-02 09:34:11 +00:00
|
|
|
struct rate_ctr_group *msc_ctrs;
|
2016-08-23 05:32:27 +00:00
|
|
|
struct osmo_counter *active_calls;
|
2018-06-26 11:27:25 +00:00
|
|
|
struct osmo_counter *active_nc_ss;
|
2009-12-21 23:41:05 +00:00
|
|
|
|
2009-06-10 15:11:52 +00:00
|
|
|
/* layer 4 */
|
2011-10-26 16:37:09 +00:00
|
|
|
struct mncc_sock_state *mncc_state;
|
2016-05-11 12:28:25 +00:00
|
|
|
mncc_recv_cb_t mncc_recv;
|
2009-06-10 15:11:52 +00:00
|
|
|
struct llist_head upqueue;
|
2016-05-20 19:59:55 +00:00
|
|
|
/*
|
|
|
|
* TODO: Move the trans_list into the subscriber connection and
|
|
|
|
* create a pending list for MT transactions. These exist before
|
|
|
|
* we have a subscriber connection.
|
|
|
|
*/
|
2009-06-10 15:11:52 +00:00
|
|
|
struct llist_head trans_list;
|
|
|
|
|
fix paging: add timeout to discard unsuccessful paging
Currently, if there is no reply from the BSS / RNC, a subscriber will remain as
"already paged" forever, and is never going to be paged again. Even on IMSI
Detach, the pending request will keep a ref count on the vlr_subscr.
Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the
'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' /
'T3113' in OsmoBSC, but to not confuse the two, give this a different name.)
Add test_ms_timeout_paging() test to verify the timeout works.
I hit this while testing Paging across multiple hNodeB, when a UE lost
connection to the hNodeB. I noticed that no matter how long I wait, no Paging
is sent out anymore, and found this embarrassing issue. Good grief...
The choice of 10 seconds is taken from https://osmocom.org/issues/2756
Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5
2017-12-15 02:02:27 +00:00
|
|
|
unsigned int paging_response_timer;
|
2009-12-13 09:53:12 +00:00
|
|
|
|
|
|
|
/* Radio Resource Location Protocol (TS 04.31) */
|
|
|
|
struct {
|
|
|
|
enum rrlp_mode mode;
|
|
|
|
} rrlp;
|
2010-09-06 01:25:48 +00:00
|
|
|
|
2010-12-24 12:48:27 +00:00
|
|
|
struct gsm_sms_queue *sms_queue;
|
2011-07-22 15:55:42 +00:00
|
|
|
|
|
|
|
/* control interface */
|
|
|
|
struct ctrl_handle *ctrl;
|
dyn TS: OS#1778 workaround: disable TCH/F on dyn TS for nitb
To avoid two phones picking mismatching TCH pchans, never pick TCH/F on dynamic
TS in osmo-nitb.
Add gsm_network flag dyn_ts_allow_tch_f, set to true by default in
gsm_network_init().
Set this flag to false in osmo-nitb's main().
See http://osmocom.org/issues/1778
Reasoning about ways to solve this:
* a compile time switch doesn't work because libbsc is first compiled and then
linked to both osmo-nitb and osmo-bsc.
* we could test net->bsc_api == msc_bsc_api(), but I have the so-called MSC
split waiting on branch sysmocom/cscn, which will result in msc_bsc_api() not
being linked in the osmo-bsc binary.
* have a function am_i_nitb() with different implementations in osmo-nitb and
osmo-bsc, but then we'd need to add implementations to all tests and other
binaries linking lchan_alloc().
* have a flag in struct bsc_api, but so far there are only function pointers
there.
Having a "global" flag in gsm_network allows to add a VTY command in case we
decide to keep this feature (#1781), has no linking implications and is nicely
explicit.
Tested that osmo-bsc still picks TCH/F on dyn TS indirectly, since I have no
standalone MSC available: when compiling osmo-nitb with the line that sets
dyn_ts_allow_tch_f = false commented out, TCH/F is picked as described in
OS#1778; and by printf-verifying that dyn_ts_allow_tch_f == true in osmo-bsc
main(), only osmo-nitb should have TCH/F disabled.
Related: OS#1778, OS#1781
Change-Id: If7e4797a72815fc6e2bbef27756ea5df69f4bde7
2016-07-23 18:15:28 +00:00
|
|
|
|
2016-05-09 19:03:12 +00:00
|
|
|
/* all active subscriber connections. */
|
|
|
|
struct llist_head subscr_conns;
|
2016-05-10 11:29:33 +00:00
|
|
|
|
|
|
|
/* if override is nonzero, this timezone data is used for all MM
|
|
|
|
* contexts. */
|
|
|
|
/* TODO: in OsmoNITB, tz-override used to be BTS-specific. To enable
|
|
|
|
* BTS|RNC specific timezone overrides for multi-tz networks in
|
2017-02-23 20:06:12 +00:00
|
|
|
* OsmoMSC, this should be tied to the location area code (LAC). */
|
2016-05-10 11:29:33 +00:00
|
|
|
struct gsm_tz tz;
|
add struct bsc_subscr, separating libbsc from gsm_subscriber
In a future commit, gsm_subscriber will be replaced by vlr_subscr, and it will
not make sense to use vlr_subscr in libbsc. Thus we need a dedicated BSC
subscriber: struct bsc_subscr.
Add rf_policy arg to bsc_grace_paging_request() because the bsc_subscr will no
longer have a backpointer to gsm_network (used to be via subscr->group).
Create a separate logging filter for the new BSC subscriber. The implementation
of adjusting the filter context is added in libbsc to not introduce
bsc_subscr_get/_put() dependencies to libcommon.
During Paging Response, fetch a bsc_subscr from the mobile identity, like we do
for the gsm_subscriber. It looks like a duplication now, but will make sense
for the VLR as well as for future MSC split patches.
Naming: it was requested to not name the new struct bsc_sub, because 'sub' is
too ambiguous. At the same time it would be fine to have 'bsc_sub_' as function
prefix. Instead of struct bsc_subscriber and bsc_sub_ prefix, I decided to
match both up as struct bsc_subscr and bsc_subscr_ function prefix. It's fast
to type, relatively short, unambiguous, and the naming is consistent.
Add bsc_subscr unit test.
Related: OS#1592, OS#1594
Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e
2017-02-18 21:20:46 +00:00
|
|
|
|
2016-06-19 16:06:02 +00:00
|
|
|
/* MSC: GSUP server address of the HLR */
|
|
|
|
const char *gsup_server_addr_str;
|
|
|
|
uint16_t gsup_server_port;
|
|
|
|
|
|
|
|
struct vlr_instance *vlr;
|
mscsplit: various preparations to separate MSC from BSC
Disable large parts of the code that depend on BSC presence. The code sections
disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of
adding the A-interface.
Don't set msg->lchan nor msg->dst.
Don't use lchan in libmsc.
Decouple lac from bts.
Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication:
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to
different interfaces depending on the actual subscriber connection.
While iu_tx() is going to be functional fairly soon, the a_tx() is going to be
just a dummy for some time (see comment).
Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer
and an indicator for the Integrity Protection status on Iu (to be fully
implemented in later commits).
Add lac member to gsm_subscriber_connection, to allow decoupling from
bts->location_area_code. The conn->lac will actually be set in iu.c in an
upcoming commit ("add iucs.[hc]").
move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi().
libmsc: duplicate gsm0808 / gsm48 functions (towards BSC).
In osmo-nitb, libmsc would directly call the functions on the BSC level, not
always via the bsc_api. When separating libmsc from libbsc, some functions are
missing from the linkage.
Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also
add a _tx to gsm0808_cipher_mode():
* add msc_gsm0808_tx_cipher_mode() (dummy/stub)
* add msc_gsm48_tx_mm_serv_ack()
* add msc_gsm48_tx_mm_serv_rej()
Call these from libmsc instead of
* gsm0808_cipher_mode()
* gsm48_tx_mm_serv_ack()
* gsm48_tx_mm_serv_rej()
Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places.
Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC,
this will be done with an external MGCP gateway.
Remove LCHAN_MODIFY from internal MNCC state machine.
Temporarily disable all paging to be able to link libmsc without libbsc.
Skip the paging part of channel_test because the paging is now disabled.
Employ fake paging shims in order for msc_vlr_tests to still work.
msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values
for return val, to avoid dependency on libbsc headers. Make callable from
other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c
add gsm_encr to subscr_conn
move subscr_request to gsm_subscriber.h
subscr_request_channel() -> subscr_request_conn()
move to libmsc: osmo_stats_vty_add_cmds()
gsm_04_08: remove apply_codec_restrictions()
gsm0408_test: use NULL for root ctx
move to libbsc: gsm_bts_neighbor()
move to libbsc: lchan_next_meas_rep()
move vty config for t3212 to network level (periodic lu)
remove unneccessary linking from some tests
remove handle_abisip_signal()
abis_rsl.c: don't use libvlr from libbsc
gsm_subscriber_connection: put the LAC here, so that it is available without
accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of
transition: Iu and A will use this new field to pass the LAC around, but in a
completely separate OsmoBSC this is not actually needed. It can be removed
again from osmo-bsc.git when the time has come.
Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall
be added in osmo-bsc once the A-Interface code has settled. See OS#2389.
Related: OS#1845 OS#2257 OS#2389
Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-05-08 13:12:20 +00:00
|
|
|
|
|
|
|
/* Periodic location update default value */
|
|
|
|
uint8_t t3212;
|
2016-05-20 19:59:55 +00:00
|
|
|
|
2018-10-10 15:00:49 +00:00
|
|
|
/* Global MNCC guard timer value */
|
|
|
|
int mncc_guard_timeout;
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
struct {
|
2017-09-03 23:03:58 +00:00
|
|
|
struct mgcp_client_conf conf;
|
|
|
|
struct mgcp_client *client;
|
|
|
|
} mgw;
|
2016-05-20 19:59:55 +00:00
|
|
|
|
2018-03-15 11:55:46 +00:00
|
|
|
#if BUILD_IU
|
2016-05-20 19:59:55 +00:00
|
|
|
struct {
|
2017-04-09 10:32:51 +00:00
|
|
|
/* CS7 instance id number (set via VTY) */
|
|
|
|
uint32_t cs7_instance;
|
2018-03-15 11:55:46 +00:00
|
|
|
enum ranap_nsap_addr_enc rab_assign_addr_enc;
|
2017-04-09 10:32:51 +00:00
|
|
|
struct osmo_sccp_instance *sccp;
|
2016-05-20 19:59:55 +00:00
|
|
|
} iu;
|
2018-03-15 11:55:46 +00:00
|
|
|
#endif
|
2017-04-09 10:32:51 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
/* CS7 instance id number (set via VTY) */
|
|
|
|
uint32_t cs7_instance;
|
|
|
|
/* A list with the context information about
|
|
|
|
* all BSCs we have connections with */
|
|
|
|
struct llist_head bscs;
|
|
|
|
struct osmo_sccp_instance *sccp;
|
|
|
|
} a;
|
2018-02-09 19:41:14 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
/* MSISDN to which to route MO emergency calls */
|
|
|
|
char *route_to_msisdn;
|
|
|
|
} emergency;
|
2008-12-23 20:25:15 +00:00
|
|
|
};
|
|
|
|
|
2012-11-08 18:44:08 +00:00
|
|
|
struct osmo_esme;
|
|
|
|
|
|
|
|
enum gsm_sms_source_id {
|
|
|
|
SMS_SOURCE_UNKNOWN = 0,
|
|
|
|
SMS_SOURCE_MS, /* received from MS */
|
|
|
|
SMS_SOURCE_VTY, /* received from VTY */
|
|
|
|
SMS_SOURCE_SMPP, /* received via SMPP */
|
|
|
|
};
|
|
|
|
|
2009-03-30 20:56:32 +00:00
|
|
|
#define SMS_HDR_SIZE 128
|
|
|
|
#define SMS_TEXT_SIZE 256
|
2012-11-23 18:02:37 +00:00
|
|
|
|
|
|
|
struct gsm_sms_addr {
|
|
|
|
uint8_t ton;
|
|
|
|
uint8_t npi;
|
|
|
|
char addr[21+1];
|
|
|
|
};
|
|
|
|
|
2009-03-30 20:56:32 +00:00
|
|
|
struct gsm_sms {
|
2009-11-06 15:06:19 +00:00
|
|
|
unsigned long long id;
|
2016-06-19 16:06:02 +00:00
|
|
|
struct vlr_subscr *receiver;
|
2012-11-23 22:35:01 +00:00
|
|
|
struct gsm_sms_addr src, dst;
|
2012-11-08 18:44:08 +00:00
|
|
|
enum gsm_sms_source_id source;
|
|
|
|
|
libmsc: send RP-ACK to MS after ESME sends SMPP DELIVER-SM-RESP
Hold on with the GSM 04.11 RP-ACK/RP-ERROR that we send to the MS until
we get a confirmation from the ESME, via SMPP DELIVER-SM-RESP, that we
can route this sms somewhere we can reach indeed.
After this change, the conversation looks like this:
MS GSM 03.40 SMSC SMPP 3.4 ESME
| | |
| SMS-SUBMIT | |
|------------------->| |
| | DELIVER-SM |
| |---------------->|
| | |
| | DELIVER-SM-RESP |
| |<----------------|
| GSM 04.11 RP-ACK | |
|<-------------------| |
| | |
Before this patch, the RP-ACK was sent back straight forward to the MS,
no matter if the sms can be route by the ESME or not. Thus, the user
ends up getting a misleading "message delivered" in their phone screen,
when the message may just be unroutable by the ESME hence silently
dropped.
If we get no reply from the ESME, there is a hardcoded timer that will
expire to send back an RP-ERROR to the MS indicating that network is
out-of-order. Currently this timer is arbitrarily set to 5 seconds. I
found no specific good default value on the SMPP 3.4 specs, section 7.2,
where the response_timer is described. There must be a place that
describes a better default value for this. We could also expose this
timer through VTY for configurability reasons, to be done later.
Given all this needs to happen asyncronously, ie. block the SMSC, this
patch extends the gsm_sms structure with two new fields to annotate
useful information to send the RP-ACK/RP-ERROR back to the MS of origin.
These new fields are:
* the GSM 04.07 transaction id, to look up for the gsm_trans object.
* the GSM 04.11 message reference so the MS of origin can correlate this
response to its original request.
Tested here using python-libsmpp script that replies with
DELIVER_SM_RESP and status code 0x0b (Invalid Destination). I can see
here on my motorola C155 that message cannot be delivered. I have tested
with the success status code in the SMPP DELIVER_SM_RESP too.
Change-Id: I0d5bd5693fed6d4f4bd2951711c7888712507bfd
2017-05-04 16:44:22 +00:00
|
|
|
struct {
|
|
|
|
uint8_t transaction_id;
|
|
|
|
uint32_t msg_ref;
|
|
|
|
} gsm411;
|
|
|
|
|
2012-11-08 18:44:08 +00:00
|
|
|
struct {
|
|
|
|
struct osmo_esme *esme;
|
|
|
|
uint32_t sequence_nr;
|
|
|
|
int transaction_mode;
|
|
|
|
char msg_id[16];
|
|
|
|
} smpp;
|
2009-03-30 20:56:32 +00:00
|
|
|
|
2009-07-05 12:02:46 +00:00
|
|
|
unsigned long validity_minutes;
|
2017-08-16 20:45:07 +00:00
|
|
|
time_t created;
|
2017-08-07 13:01:30 +00:00
|
|
|
bool is_report;
|
2011-04-18 15:04:00 +00:00
|
|
|
uint8_t reply_path_req;
|
|
|
|
uint8_t status_rep_req;
|
|
|
|
uint8_t ud_hdr_ind;
|
|
|
|
uint8_t protocol_id;
|
|
|
|
uint8_t data_coding_scheme;
|
|
|
|
uint8_t msg_ref;
|
|
|
|
uint8_t user_data_len;
|
|
|
|
uint8_t user_data[SMS_TEXT_SIZE];
|
2009-07-27 18:11:35 +00:00
|
|
|
|
2009-03-30 20:56:32 +00:00
|
|
|
char text[SMS_TEXT_SIZE];
|
|
|
|
};
|
|
|
|
|
2013-01-09 16:03:27 +00:00
|
|
|
/* control interface handling */
|
|
|
|
int bsc_base_ctrl_cmds_install(void);
|
2016-06-19 16:06:02 +00:00
|
|
|
int msc_ctrl_cmds_install(struct gsm_network *net);
|
2013-01-09 16:03:27 +00:00
|
|
|
|
2011-05-25 11:10:08 +00:00
|
|
|
#endif /* _GSM_DATA_H */
|