aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2016-05-09Merge branch 'master' into sysmocom/iu, with tweakssysmocom/iu_orig_historyNeels Hofmeyr16-577/+63
Numerous manual adjustments are included to make sense on the sysmocom/iu branch: * gsm_04_08_gprs.h has moved to libosmocore on the master branch, but sysmocom/iu has added some entries. Until it is clear whether to move the additions to libosmocore as well, keep gsm_04_08_gprs.h on sysmocom/iu with merely the additions. * Thus, keep using the old gsm_04_08_gprs.[hc] from openbsc in the Makefiles, but only where the sysmocom/iu additions are needed. * In openbsc's gsm_04_08_gprs.h, * include the libosmocore gsm_04_08_gprs.h, * use '#pragma once' instead of #ifndef and * add a TODO comment about moving the rest to libosmocore. * Apply the addition of an osmo_auth_vector to gsm_auth_tuple: in the Iu auth vector hacks, use the gsm_auth_tuple.vec instead of a local struct. See iu_hack__get_hardcoded_auth_tuple() and gsm48_rx_gmm_att_req(). * In the si2q tests, pass NULL as ctx to gsm_network_init(). * In cscn_main.c, add a debug log that was originally added to osmo-nitb. * openbsc/.gitignore: keep only one addition of 'writtenconfig' Conflicts: openbsc/include/openbsc/gprs_sgsn.h openbsc/include/openbsc/gsm_04_08_gprs.h openbsc/src/gprs/gsm_04_08_gprs.c openbsc/src/libmsc/gsm_04_08.c openbsc/src/osmo-cscn/cscn_main.c openbsc/tests/gsm0408/Makefile.am
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-29osmo_oap_decode(): Use common argument orderingHarald Welte1-2/+2
In general, if a function generates output data like a msgb (or in this case filling an osmo_oap_message structure), the output argument precedes the source. This is what we use all over libosmo*, and it is modelled after memcpy(), where dst is the first argument, before src. Let's align osmo_oap_decode(). Intestingly, osmo_oap_encode was already correct, so the encode/decode functions used different conventions before.
2016-04-29OAP: use osmo_oap_ prefix for OAP, rather than plain oap_Harald Welte2-8/+8
this is in preparation of moving related code to libosmocore.
2016-04-29oap_message.h: Remove dependency to openbsc includeHarald Welte1-1/+1
This is a first step to moving oap_messages.h to libosmocore
2016-04-29Move osmo_gsup_messages.[ch] to libosmocoreHarald Welte2-140/+1
This requires the corresponding commit in libosmocore.
2016-04-29move utils.h functions to libosmocoreHarald Welte2-27/+1
This needs the corresponding commit in libosmocore which imports the related functions
2016-04-29osmo_gsup_messge.[ch] documentation update (doxygen)Harald Welte1-3/+15
2016-04-29gsup_messages: Add UMTS AKA related encoding/decoding supportHarald Welte1-0/+7
2016-04-29move osmo_shift_* / osmo_match_shift_* to libosmogsmHarald Welte1-11/+0
2016-04-29rename gprs_shift_*() to osmo_shift_*()Harald Welte1-6/+6
This rename is the first step of moving the associated functions into libosmocore. Also, rename gprs_match_* to osmo_match_shift_* to indicate that it is not just matching the TLV, but also shifting the data portion.
2016-04-29Rename gprs_gsup_* to osmo_gsup_*Harald Welte3-120/+121
This is a preparation to move the related code to libosmocore, whilst at the same time generalizing it from GPRS Subscriber Update Protocol to the Osmocom Generic Subscriber Update Protoco.
2016-04-29use new libosmocore gsm_23_003.h for IMEI/IMSI lengthHarald Welte4-12/+12
... rather than our private definitions everwhere. As an added benefit, gprs_gsup_messages.h is now free of any header dependencies within openbsc.
2016-04-29move gsm_04_08_gprs.h to libosmocoreHarald Welte4-401/+3
This requres the corresponding commit in libosmocore.
2016-04-29Start to use struct osmo_auth_vector from gsm_auth_tupleHarald Welte2-5/+4
Rather than having a 'private' structure for kc, sres and rand, we now finally (with 4 years delay) use osmo_auth_vector from libosmogsm, which encapsulates authentication vectors that can be either GSM triplets or UMTS quintuples or a combination of both. gsm_auth_tuple becomes a wrapper around osmo_auth_vector, adding use_count and key_seq to it. key_seq is no longer initialized inside gprs_gsup_messages.c, as there is no CKSN / key_seq inside the message anyway. If a usre of the code needs key_seq, they need to manage it themselves.
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-22Add vty check for max si2quater sizeMax1-0/+1
Explicitly check if added (U|E)ARFCN will fit into available si2quater message.
2016-04-22Add basic UARFCN supportMax3-4/+16
* add data structures, generation functions * vty interface for neightbor UARFCNs specific to SI2quater * vty test * unit test Fixes: OS#1666
2016-04-22Cleanup shared data structureMax1-2/+1
* remove unused variable. * lower max number of (e|u)arfcns to more realistic value.
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-16Add basic SI2quater supportMax2-0/+10
* support for sending arbitrary static SI2quater. * vty interface for neightbor EARFCNs specific to SI2quater. * dynamic generation of SI2quater messages. * unit test for SI2quater messages. Fixes: OS#1630
2016-04-16Refactor SI-related codeMax1-0/+1
Move define to header file. Use inline functions where appropriate. Change int variables which are used as boolean into actual bool to make code easier to follow.
2016-04-16Add SI2quater support to SI3Max1-1/+2
Advertise SI2 quater presence and location (if available) using SI3 according to 3GPP TS 44.018 ยง 10.5.2.34
2016-04-14NAT: reload BSCs config dynamicallyMax1-0/+5
Add vty tests for BSC configuration reloading. Load BSCs configuration on bscs-config-file command: * remove all runtime configured BSC not in the config file * close connections to all BSC with updated token value Fixes: OS#1670 Sponsored-by: On-Waves ehf
2016-04-14NAT: move BSC config into separate fileMax1-0/+5
Introduce new configuration option bscs-config-file which includes BSC configuration from the given file. Both absolute and relative (to the main config file) paths are supported. Add 'show bscs-config' command to display current BSC configuration. Note: it is still possible to have BSC configuration in the main file (provided proper index number is used) and in runtime but BSC configuration is no longer saved automatically. The management of included configuration file is left to external tools. Update configuration examples. Fixes: OS#1669 Sponsored-by: On-Waves ehf
2016-04-12NAT: allow allocating BSC in arbitrary orderMax1-1/+2
Check for existing BSC before allocating new one. Track number of remaining BSCs on deallocation. Explicitly use BSC number in allocation function.
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[].