aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm/gsup.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-16gsup: Add value_string for Session State IEHarald Welte1-0/+8
In Change-Id I1cee271fed0284a134ffed103c0d4bebbcfde2a8 we added support for a new session state IE, but we didn't add any value_string array for string conversion of it. Let's fix this. Change-Id: I3d9f087786dc37c42498fa9a2be07483ec93ba7b
2018-06-11gsup: Add osmo_gsup_get_err_msg_type() functionHarald Welte1-0/+23
This function can be used to resolve the error message type for a given message type. Can be used by generic error handlers that work for any incoming message type. Change-Id: Ic637bec53dd7fe3ec83da99b49b4eae34d5602b2
2018-05-31GSUP: introduce new messages for SS/USSD payloadsVadim Yanitskiy1-0/+15
In order to be able to transfer SS/USSD messages via GSUP, this change introduces the following new message types: - OSMO_GSUP_MSGT_PROC_SS_*, and the following new IE: - OSMO_GSUP_SS_INFO_IE which represents an ASN.1 encoded MAP payload coming to/from the mobile station 'as is', without any transcoding. Change-Id: Ie17a78043a35fffbdd59e80fd2b2da39cce5e532 Related: OS#1597
2018-05-31GSUP: implement TCAP-like session managementVadim Yanitskiy1-0/+16
Unlike TCAP/MAP, GSUP is just a transport layer without the dialogue/context. This prevents us from having session based communication, required e.g. for USSD. But we can emulate TCAP dialogue by adding additional IEs, which would allow to relate each message to a particular session. This change introduces the following IEs: - OSMO_GSUP_SESSION_ID_IE, - OSMO_GSUP_SESSION_STATE_IE, which optionally can be used to indicate that the message is related to a session with given ID, and to manage session state, i.e. initiate, continue, and finish. Change-Id: I1cee271fed0284a134ffed103c0d4bebbcfde2a8 Related: OS#1597
2018-02-05GSUP: change osmo_gsup_encode() return typeMax1-4/+9
* match return type of osmo_gsup_encode() with osmo_gsup_decode() to allow propagating error to caller * check return value of osmo_gsup_encode() in GSUP test * return errors instead of braking app with aseert Change-Id: Idaa1deecb6d9e15329bd51867b4f6a03357461f0 Related: OS#2864
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte1-2/+3
Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-10-17[doc] Define 'gsup' group with proper name, add intro textHarald Welte1-2/+1
Change-Id: Ieee6213dc5aad082a2d439c7418b51f281b80b1a
2017-07-07gsup: Add encoding/decoding for the pdp charging characteristicsHolger Hans Peter Freyther1-0/+20
These fields can be in the ISD and the PDP Context inofmration. Store pointers to this IE in both cases. It needs to be used by the SGSN when opening a PDP context. Change-Id: Iedc7c02adcf77ca5c9545119e19c968dfbbb3e6b
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr1-2/+2
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr1-1/+1
Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-12update/extend doxygen documentationHarald Welte1-0/+7
It's a pity that even with this patch we still are fare away from having the whole API documented. However, at least we have a more solid foundation. Updates not only extend the documentation, but also make sure it is rendered properly in the doxygen HTML. Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
2017-02-21gsup decode: fix expectation of AUTS length, should be 14Neels Hofmeyr1-2/+2
The wrong expectation caused OsmoHLR to fail on Auth Sync. Change-Id: I277fb3d407396dffa5c07a9c5454d87a415d393f
2017-02-15gsup: add osmo_gsup_message_type_name()Neels Hofmeyr1-0/+29
Change-Id: Ic29b588b72893821d73fe90ecc16c6bf78d5a360
2017-02-02GSUP, OAP, osmo-gen-vec: fix AUTS length to 14, not 16Neels Hofmeyr1-1/+1
GSUP transmits AUTS for UMTS authentication procedures, and OAP uses the same procedures to authenticate. osmo-gen-vec is a utility program that passes AUTS to our osmo_auth_gen_vec_auts() API. According to 3GPP 33.102 6.3.3, AUTS = SQN^AK || MAC-S, which are 6 || 8 == 14 bytes. This is confirmed by 24.008 9.2.3a where the TLV has 16 bytes, TL = 2 and AUTS being the V = 14. It is not harmful for milenage_gen_vec_auts() to pass two more AUTS bytes. But writing 16 bytes to a GSUP struct is a potential problem when passing in a 14 byte long AUTS buffer to the GSUP API, which then reads past the AUTS buffer. The API implies the length, so far to be 16, so passing in a 14 byte buffer to GSUP would require copying to a larger buffer first. Fix this by using a length of 14 for AUTS everywhere instead. This constitues an ABI breakage, we may handle it as a "fix before an official release", otherwise we need a version bump. The OAP protocol document has also been updated, needs an update in the osmo-gsm-manuals as well. Change-Id: If25b173d9ec57ea4c504d860954912b7d82af455
2016-12-09cosmetic: gsup comments: write 'Generic' for the G in GSUPNeels Hofmeyr1-1/+1
The G used to mean GPRS, but the scope is larger now. To satisfy the curious reader, give the G a name in gsup files' header comments. BTW, logging.h and gsup_test.c already mentioned "Generic" before this. Change-Id: I6ac5cf94c215e156ceff6a58da3d9e520ca942d9
2016-12-09license: gsup: libosmogsm requires GPL, not AGPL; say 'sysmocom'Neels Hofmeyr1-5/+5
The copyright in gsup.h differed from the one in gsup.c: gsup.c names the GNU Affero GPL, gsup.h only the GNU GPL. Change both to GPL-v2-or-later. In gsup.c/h's copyright notice, 'sysmocom' should be spelled lower case. Change-Id: Ia5748c275501889b9086aef7d20ccb5c9edb8031
2016-11-26osmo_gsup_encode(): Make coverity happy by invariant checkingHarald Welte1-0/+1
gsm48_encode_bcd_number() can theoretically return a length in excess of the size of the bcd_buf, but only in case an overly-long IMSI is passed into the function (which would be illegal in the first place). Change-Id: If3dc68ee13ff784b487bbc686b777cec9057d537 Fixes: Coverity CID 135216
2016-07-17fix compiler warning: gsup.c: missing bracesNeels Hofmeyr1-1/+1
osmo_auth_vector's first member is an array, so for a zero initializer, we should add a second set of array braces. Change-Id: Iace448caca8152e46244f26c3af250f2035c99eb
2016-06-16gsup.c: Fix encoding of UMTS auth vectorsHarald Welte1-6/+22
Encoding auth vectors worked fine for GSM authentication, but didn't yet include the new IEs for UMTS authentication yet. Change-Id: I7fa5ba1c950292bd0a9874b3102a27f221ce390d Reviewed-on: https://gerrit.osmocom.org/302 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-05-06GSUP: Add support for RAND in SendAuthInfo.reqHarald Welte1-1/+12
In the autentication re-sync case, we need not only the AUTS from the MS/UE, but also the RAND that we sent as part of the failed authentication challenge.
2016-05-06GSUP: Add OSMO_GSUP_CN_DOMAIN_IE to differentiate CS and PS planeHarald Welte1-0/+9
We're starting to use GSUP for circuit-switched (CS) plane, so we need to differentiate the two planes somehow from each other.
2016-05-06import gprs_gsup_message.[ch] from openbsc as gsup.[ch]0.9.4Harald Welte1-0/+472
Move those routines from OpenBSC to libosmogsm, so they can be re-used from other programs. I think it was a mistake to add them only inside the openbsc repository in the first place. We need to pay more attention to this in the future.