aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
AgeCommit message (Collapse)AuthorFilesLines
2016-05-04libiu: Keep current ra_id in ue_conn_ctxDaniel Willmann1-0/+1
2016-05-04gprs: Track PMM statesDaniel Willmann1-2/+13
For Iu mode it is important to know when the UE is in PMM-IDLE mode since the SGSN will need to page the UE if there is data for it.
2016-05-04msc subscr: add paging timeoutNeels Hofmeyr1-0/+1
In NITB, the paging timeout would be handled from the BSC side. In IuCS, we need to invalidate the paging request from libmsc alone, so add a paging timer to gsm_subscriber. Possibly, the HNB-GW should respond with a paging failure and libmsc could trigger on that, nevertheless libmsc should not rely on a failure message to expire pending pagings.
2016-05-02add enum iu_event_type to string conversionNeels Hofmeyr1-0/+6
2016-05-02paging: change subscr_paging_cb() into subscr_rx_paging_response()Neels Hofmeyr1-0/+2
Remove one layer of callback indirection in paging. When a paging response arrives, we always want to first secure the connection, thus a fixed subscr_rx_paging_response() function is more appropriate and avoids having to store a cbfn. The actual actions to be taken upon successful paging are of course still in callback functions stored with each subscriber.
2016-05-02add comments on MSCSPLIT and pagingNeels Hofmeyr1-0/+2
2016-05-02gsm_04_08 mscsplit: subscr_request_channel() -> subscr_request_conn()Neels Hofmeyr1-2/+2
Rename subscr_request_channel() to _conn() and remove the channel_type arg. The "channel" is a term from closely tied MSC+BSC code, after separation we shall call it a "connection", i.e. over IuCS or A. The channel_type arg is already unused from a previous MSCSPLIT commit.
2016-05-02gsm_04_08: factor out subscr authorization checkNeels Hofmeyr1-0/+4
Add function subscr_authorized(), absorbing the guts of static authorize_subscriber() from gsm_04_08.c, except the parts specific to Location Updating. subscr_authorized() is a check that is to be added to validation of a paging response.
2016-05-01Identify PDP context by RAB ID, not TEIHarald Welte1-3/+0
When receiving an RAB-Assignment response from the RNC, we should use the RAB ID (=NSAPI) to resolve the PDP context. We cannot use the TEID, as the TEID chosen by the RNC for this RAB has no relationship to the TEID we were using for the RAB-Assignment request. TEIDs are local to each of the peer, like UDP port numbers.
2016-05-01SGSN: Use PDP Context NSAPI as RAB IDHarald Welte1-2/+0
As Dieter has pointed out, the RANAP spec requires the RAB ID to be equal to the NSAPI of the PDP context for which it is established.
2016-04-25RAB parameters: apply use_x213_nsap parameter additionNeels Hofmeyr1-1/+3
Add use_x213_nsap parameter to iu_rab_act_ps(), pass the new parameter from two callers as 1 such that there is no functional change.
2016-04-25paging_signal_data: remove unused lac memberNeels Hofmeyr1-1/+0
2016-04-20add preliminary paging response handling, incompleteNeels Hofmeyr1-0/+14
In gsm_04_08.c, add a static handle_paging_resp() to take over from the libbsc function gsm48_handle_paging_resp(). Use the subscr->requests listing to handle a Paging Response and call the pending cbfn. In NITB, this used to be done via BTS, and I haven't entirely resolved yet how exactly to rewire this in standalone libmsc. So far, this "works for me", but is worth another visit. Still missing: enable Integrity Protection.
2016-04-20Add Iu pagingNeels Hofmeyr1-0/+3
Add iu_page_cs() and iu_page_ps() API, also add to libiudummy for linking in tests. Implement msc_paging_request() by calling iu_page_cs().
2016-04-20iu.c: add registry of RNC-Ids in LACsNeels Hofmeyr1-0/+1
Introduce struct gsm_rnc, stored in a global list, static to iu.c. (This list is not part of gsm_network so that the code can be used from both MSC and GPRS code, i.e. both for CS and PS.) Parse RANAP Global RNC Id, add GSM flags to build for gsm48_mcc_mnc_from_bcd() to decode the PLMN Id. Upon every Initial UE message, record/verify RNC Id and LAC for that connection. In case of mismatch, so far just log an error.
2016-04-19cosmetic: comment, whitespaceNeels Hofmeyr1-1/+1
2016-04-19iu.h: add iu_link_del()Neels Hofmeyr1-0/+2
2016-04-19Iu RANAP event: add IU_EVENT_LINK_INVALIDATEDNeels Hofmeyr1-1/+5
See in-code comment...
2016-04-19gprs: Keep track of key negotiation and set the key status flag in sec_mod_cmdDaniel Willmann2-2/+2
2016-04-11cscn: record and use LAC on incoming InitialUE msgNeels Hofmeyr1-1/+2
Add lac argument to gsm0408_rcvmsg_iucs(), to record the LAC in newly allocated gsm_subscriber_connections. In effect, fix the LAC sent to UE during Location Updating Accept message. Before, 0 was stored as LAC and sent to the UE, regardless of the actual LAC in use.
2016-04-11remove subscr_conn_allocate_iu() from public headerNeels Hofmeyr1-4/+0
It is only used statically in iu.c
2016-04-08gprs: Save integrity protection status inside ue ctx, not mm ctxDaniel Willmann2-2/+4
2016-04-08gprs: Use different RAB IDs for activationDaniel Willmann1-0/+2
2016-04-08sgsn: Pass RAB ID to iu_rab_act_ps() functionDaniel Willmann1-1/+1
2016-03-31mscsplit: rewire MSC gsm0808_submit_dtap() to msc_tx_dtap()Neels Hofmeyr1-0/+7
2016-03-31Merge branch 'master' into sysmocom/iuNeels Hofmeyr1-0/+9
Conflicts: openbsc/src/libmsc/auth.c openbsc/src/libmsc/gsm_04_08.c openbsc/src/osmo-bsc/osmo_bsc_vty.c openbsc/tests/Makefile.am
2016-03-31MM Auth: introduce AUTH_ERROR constant.Neels Hofmeyr1-0/+1
Instead of using hardcoded -1 for errors, include -1 in the enum auth_action type; apply its use. In the mm_auth test, the string output changes from '(internal error)' to 'AUTH_ERROR', since now the proper enum value is used in auth_action_names[].
2016-03-31Add MM Auth test; add auth_action_str() functionNeels Hofmeyr1-0/+8
Add basic MM Authentication test setup, with fake DB access and RAND_bytes(). So far implement simple tests for IO error during DB access and missing auth entry. To print the auth action during tests, add struct auth_action_names and auth_action_str() inline function in auth.[hc].
2016-03-22cscn: implement integrity protectionNeels Hofmeyr2-0/+9
Upon authentication response, initiate integrity protection for Iu by sending a Security Mode Command (IK), with hardcoded auth tuple so far. Implement RANAP event handling to receive Security Mode Complete message, adding stubs for the other events; in new files osmo-cscn/iucs_ranap.[hc] to keep RANAP dependencies separate, and particularly out of libmsc. Upon receiving Security Mode Complete, call the security operation callback (conn->sec_operation->cb) to complete the Location Update. Introduce enum integrity_protection_state constants to indicate integrity protection, record in gsm_subscriber_conn.iu.integrity_protection. Make subscr_conn_lookup_iu() non-static and declare in iu_cs.h to be able to call from iucs_ranap.c's Security Mode Complete event. Implement dummy iu_tx_sec_mode_cmd() to allow tests to build without RANAP dependencies. In cscn_main.c, call iucs_rx_ranap_event(), to populate the struct gsm_network struct with cscn_network explicitly (don't share cscn_network across compilation scopes because it's ugly).
2016-03-22iu_tx_sec_mode_cmd(): add send_ck flag parameterNeels Hofmeyr1-1/+2
In this way the caller can distinguish between sending an IK or an IK+CK Security Mode Command.
2016-03-22cosmetic: whitespace, comment, rename static func rx_iu_event()Neels Hofmeyr1-2/+2
2016-03-18fix build: iu.h: remove iu_rab_act_ps()'s rab_id parameterNeels Hofmeyr1-1/+1
Error was introduced in d04db9d907 'libiu: Replace RAB assignment response callback with a general one' For iu_rab_act_ps(), the rab_id parameter was added in iu.h but not in the implementation, nor for the callers. Make the iu.h signature match the implementation, again.
2016-03-18libiu: Change gprs_transp_upd_key to be useful for CS as wellDaniel Willmann2-0/+2
gprs_transp_upd_key only sends a security mode command which is needed for CS as well so change it. Make sure it is called after the UE is authenticated in Iu mode.
2016-03-17Revert "move to hex TMSI representation"Harald Welte1-1/+1
This reverts commit 044fbe6568f82a12bf4e3addc7e3d6db529b6548.
2016-03-17move to hex TMSI representationVadim Yanitskiy1-1/+1
In OpenBSC, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits. This patch aligns OpenBSC with the telecom industry standard. Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2016-03-17fix confusing typo in constant (THAN -> THEN)Neels Hofmeyr1-1/+1
2016-03-16libiu: Replace RAB assignment response callback with a general oneDaniel Willmann1-2/+11
The new iu event callback will now be called for RAB assignment response, IU release and security mode complete
2016-03-14fix confusing typo in constant (THAN -> THEN)Neels Hofmeyr1-1/+1
2016-03-04move two gsm0480_send_*() to xsc as gsm0480_gen_*()Neels Hofmeyr1-0/+3
Have two separate gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() for each of libbsc and libmsc. Move their core into libxsc as generator functions returning a msgb. Add src/libbsc/gsm_04_80_utils.c (note, not 04_08) to implement the libbsc side of it. The code is identical, but the linked structs and functions differ in each case. There could be a common source file built for both, but I decided against it, for more clarity I hope.
2016-03-04move sms_next_rp_msg_ref() to libxsc, for gsm0408testNeels Hofmeyr1-1/+1
Also change the signature to avoid using gsm_subscriber_connection, which has different members in libbsc and libmsc.
2016-03-04rename nitb vty config to cscn, move to cscn_vty.cNeels Hofmeyr1-1/+2
2016-03-04gsm_subscriber_connection: further split between BSC and MSCNeels Hofmeyr1-10/+20
Move some Iu/A members into the MSC #ifdef. Have separate allocate and free functions for the two scopes.
2016-03-04create libxsc and move some code, never link libbsc and libmscNeels Hofmeyr5-4/+10
libbsc and libmsc have conflicting definitions of gsm_subscriber_connection and do no longer belong together anyway. Create libxsc, meaning 'lib[bm]sc', to hold all code used by both libmsc and libbsc, and make sure gsm_subscriber_connection isn't used there. In various binaries and tests, do not link libbsc and libmsc. (Note: this commit was reshaped out of a large wip chunk, it may not compile properly without the subsequent commits)
2016-03-03wip: exclude more bsc stuff from gsm_subscriber_connNeels Hofmeyr1-7/+7
2016-03-03osmo-bsc: half-fix tz override to allow compilationNeels Hofmeyr1-6/+8
As described in a comment, for MSCSPLIT the tz data has been moved to network level. To allow compiling osmo-bsc on the sysmocom-iu branch, move tz up to network level in osmo-bsc as well. This could be done better for osmo-bsc, rather easily too, still allowing per-BTS timezone settings. But I'm trying to focus on IuCS and would like to come back to this later.
2016-03-03WIP: Try and activate RABs after service requestDaniel Willmann1-0/+6
2016-03-03gprs: Handle GMM service request (Iu mode only)Daniel Willmann1-0/+15
Iu mode has a GMM service request message which a UE in PMM-IDLE mode can use to switch back to PMM-CONNECTED mode.
2016-03-03iu.h: fix opaque declaration of RANAP_RAB_SetupOrModifiedItemIEs_sNeels Hofmeyr1-2/+1
struct RANAP_RAB_SetupOrModifiedItemIEs_s; may be declared, but not the corresponding typedef. It leads to a redefinition error in our coverity build.
2016-03-03libui: Don't assume gsm_network and gsm_subscriber_conncetion in libiuDaniel Willmann1-5/+1
The sgsn uses other data structs so don't require them inside libiu. Instead keep a private list of ue contexts and iterate through that. This commit reverts the libui changes of commit d03faa4bacd4d2a8b9155faf5219a948b73f481c
2016-03-03msc: define extern iu_tx()Neels Hofmeyr1-0/+3