diff options
Diffstat (limited to 'include/openbsc/gsm_data.h')
-rw-r--r-- | include/openbsc/gsm_data.h | 69 |
1 files changed, 39 insertions, 30 deletions
diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h index a97405105..fa2fed778 100644 --- a/include/openbsc/gsm_data.h +++ b/include/openbsc/gsm_data.h @@ -24,6 +24,8 @@ struct mncc_sock_state; struct gsm_subscriber_group; struct bsc_subscr; +struct vlr_instance; +struct vlr_subscr; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -70,20 +72,6 @@ struct gsm_auth_tuple { #define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */ /* - * LOCATION UPDATING REQUEST state - * - * Our current operation is: - * - Get imei/tmsi - * - Accept/Reject according to global policy - */ -struct gsm_loc_updating_operation { - struct osmo_timer_list updating_timer; - unsigned int waiting_for_imsi : 1; - unsigned int waiting_for_imei : 1; - unsigned int key_seq : 4; -}; - -/* * AUTHENTICATION/CIPHERING state */ struct gsm_security_operation { @@ -120,16 +108,34 @@ enum ran_type { RAN_UTRAN_IU, /* 3G / Iu-interface (IuCS or IuPS) */ }; +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 */ +}; + /* active radio connection of a mobile subscriber */ struct gsm_subscriber_connection { + /* global linked list of subscriber_connections */ struct llist_head entry; - /* To whom we are allocated at the moment */ - struct gsm_subscriber *subscr; + /* usage count. If this drops to zero, we start the release + * towards A/Iu */ + uint32_t use_count; + + /* 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; - /* libbsc subscriber information */ + /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; + /* libmsc/libvlr subscriber information (if available) */ + struct vlr_subscr *vsub; + /* LU expiration handling */ uint8_t expire_timer_stopped; /* SMS helpers for libmsc */ @@ -138,10 +144,11 @@ struct gsm_subscriber_connection { /* * Operations that have a state and might be pending */ - struct gsm_loc_updating_operation *loc_operation; struct gsm_security_operation *sec_operation; struct gsm_anchor_operation *anch_operation; + struct osmo_fsm_inst *conn_fsm; + /* Are we part of a special "silent" call */ int silent_call; @@ -156,7 +163,7 @@ struct gsm_subscriber_connection { /* back pointers */ struct gsm_network *network; - int in_release; + bool in_release; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ @@ -167,6 +174,8 @@ struct gsm_subscriber_connection { /* connected via 2G or 3G? */ enum ran_type via_ran; + + struct gsm_classmark classmark; }; @@ -312,6 +321,7 @@ struct gsm_network { char *authorized_reg_str; enum gsm48_reject_value reject_cause; int a5_encryption; + bool authentication_required; int neci; int send_mm_info; struct { @@ -375,17 +385,8 @@ struct gsm_network { /* MSC data in case we are a true BSC */ struct osmo_bsc_data *bsc_data; - /* subscriber related features */ - bool auto_create_subscr; - bool auto_assign_exten; - uint64_t ext_min; - uint64_t ext_max; - struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; - /* nitb related control */ - int avoid_tmsi; - /* control interface */ struct ctrl_handle *ctrl; @@ -409,6 +410,12 @@ struct gsm_network { * not require gsm_data.h). In an MSC-without-BSC environment, this * pointer is NULL to indicate absence of a bsc_subscribers list. */ struct llist_head *bsc_subscribers; + + /* MSC: GSUP server address of the HLR */ + const char *gsup_server_addr_str; + uint16_t gsup_server_port; + + struct vlr_instance *vlr; }; struct osmo_esme; @@ -431,7 +438,7 @@ struct gsm_sms_addr { struct gsm_sms { unsigned long long id; - struct gsm_subscriber *receiver; + struct vlr_subscr *receiver; struct gsm_sms_addr src, dst; enum gsm_sms_source_id source; @@ -582,7 +589,7 @@ extern const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1]; /* control interface handling */ int bsc_base_ctrl_cmds_install(void); -int msc_ctrl_cmds_install(void); +int msc_ctrl_cmds_install(struct gsm_network *net); /* dependency handling */ void bts_depend_mark(struct gsm_bts *bts, int dep); @@ -593,4 +600,6 @@ int bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other); int gsm_bts_get_radio_link_timeout(const struct gsm_bts *bts); void gsm_bts_set_radio_link_timeout(struct gsm_bts *bts, int value); +bool classmark_is_r99(struct gsm_classmark *cm); + #endif /* _GSM_DATA_H */ |