aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
AgeCommit message (Collapse)AuthorFilesLines
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
2016-03-03gsm0408_rcvmsg_iucs: remove unused link_id arg.Neels Hofmeyr1-1/+1
2016-03-03msc: implicitly link to iu_tx, don't have callbacks.Neels Hofmeyr1-48/+15
This is more akin to the way openbsc do, as well as less code.
2016-03-03libiu: Add support for RAB assignment response callbackDaniel Willmann1-1/+7
2016-03-03sgsn_libgtp: Update rab (de)act function names to libui versionDaniel Willmann1-0/+1
2016-03-03sgsn_iu: Parse the RAB assignemnt response and get pdp ctx form itDaniel Willmann1-1/+0
The RAB assignment response includes the gtp teid that we sent along in the assignment request. Retrieve the correct pdp context from there and activate it.
2016-03-03sgsn: Add a function to return the pdp ctx for an mm ctx and teiDaniel Willmann1-0/+3
2016-03-03sgsn: Get gtp ip and teid from pdp context in gprs_iu_rab_act()Daniel Willmann1-1/+1
2016-03-03WIP: Wait for radio bearer before sending pdp context acceptDaniel Willmann1-1/+4
2016-03-03mscsplit: fix compilation and comments. move msc_api.h.Neels Hofmeyr3-5/+34