summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/gsm0480.h
Commit message (Collapse)AuthorAgeFilesLines
* gsm/gsm0480: introduce gsm0480_create_release_complete()Vadim Yanitskiy2019-02-081-1/+3
| | | | | | | | | | | | In OsmoMSC, it's required to be able to specify a particular GSM 04.07 transaction ID for GSM 04.80 Release complete message instead of the hard-coded value, that is used gsm0480_create_ussd_release_complete(). Let's finally deprecate gsm0480_create_ussd_release_complete(), and introduce a new function without USSD prefix, as this message is also used in other "structured" supplementary services. Change-Id: Ie3ac85fcef90a5e532334ba3482804d5305c88d7
* libosmogsm: (re)introduce gsm48_push_l3hdr()Vadim Yanitskiy2018-08-051-3/+0
| | | | | | | | | | | | | There was gsm0480_l3hdr_push() declared in a header file, but not exposed in 'libosmogsm.map'. Furthermore, for some reason it was a part of GSM 04.80 API, what is not actually correct. Let's rename this symbol, and properly expose it as a part of the GSM 04.08 API. Also, let's introduce an auxiliary wrapper for messages, where the transaction identifier is required (see GSM 04.07, section 11.2.3.1.2). Change-Id: I8a045efe8335d83fcbe8d43eb180972e3b1d9dda
* 04.80: New gsm0480_gen_{reject,return_error}() functionsHarald Welte2018-07-291-0/+2
| | | | | | | Add functions to generate TS 04.80 (supplementary services) Reject and ReturnError components. Change-Id: I6e5ee39c3d03364f7833ec717593d5ddb0a4c5f9
* USSD: Introduce gsm0480_gen_ussd_resp_7bit()Harald Welte2018-07-291-0/+1
| | | | | | | | | | Contrary to the existing gsm0480_create_ussd_resp(), the new function only generates the value part of the FACILITY IE, and not the IE Tag/Length or the 04.08 L3 header. This is needed in the context of GSUP-encapsulated USSD, as here we don't work with L3 messages, but only pass on the FACILITY IE value. Change-Id: Ide240279240322f643e142229eb7829f538c6314
* gsm0480: Factor out msgb allocation helper functionHarald Welte2018-07-291-0/+2
| | | | Change-Id: If25b467481023eadaaf3f78157eceff4b81d24d2
* gsm 04.80: Add value_string for component type and op codeHarald Welte2018-06-161-0/+10
| | | | Change-Id: I2615a88db5224d65f37c7cc505e183ec8b196e8a
* gsm/gsm0480: refactor and expose gsm0480_parse_facility_ie()Vadim Yanitskiy2018-06-111-0/+2
| | | | | | | | | | | | | | This function can be used when there is only a part of GSM 04.80 message available - Facility IE, e.g. when a message is carried over GSUP/MAP. Let's expose it. Refactoring includes the following: - adding the 'gsm0480_' prefix; - correcting inverted return value; - cosmetic code style changes. Change-Id: I623c39ffbe6cdee65eade8435a2faa04d0da193e
* gsm/gsm0480.c: introduce gsm0480_extract_ie_by_tag()Vadim Yanitskiy2018-06-111-0/+2
| | | | | | | | In some cases, there is no need to parse the whole message, e.g. during the conversion from DTAP to GSUP/MAP. This function can be used to extract given IE from a message. Change-Id: I3989d061903352473305f80712f1a1560d05df3d
* gsm0480: copy the raw USSD data, its DCS and lengthVadim Yanitskiy2018-04-041-0/+12
| | | | | | | | | | | | | | | | | | As it was already documented before, the 'ss_request' struct has a rudiment of deprecated 'ussd_request' struct - the 'ussd_text' field. It represents the data either of an INVOKE component, either of a RETURN_RESULT component, encoded as ASCII in case if DCS is 0x0f (i.e. decoded by the code itself), otherwise raw bytes 'as is'. Previously, there was no possibility to distinguish between ASCII and raw bytes with different DCS. Moreover, the payload decoding is not desired in some cases. Let's introduce the new fields, which will carry the raw unmodified payload, its length and DCS (Data Coding Scheme). Change-Id: Ia193d175021e145bb3b131290231f307dbefc64a
* gsm0480: document the 'ss_request' structureVadim Yanitskiy2018-04-041-0/+31
| | | | Change-Id: I22144dd759e0c1bb1965574b7ddd676606e5d6b7
* gsm0480: fix USSD OCTET STRING length confusionVadim Yanitskiy2018-01-171-2/+22
| | | | | | | | | | | | | | | | | | | | | | According to the GSM 04.80 (version 5.0.0) specification Annex A "Expanded ASN.1 Module "SS-Protocol", the maximum size of a USSD OCTET STRING is 160 bytes. Thus according to ETSI TS 123 038 (version 10.0.0) specification 6.1.2.3 "USSD packing of 7 bit characters", in 160 octets, it's possible to pack (160 * 8) / 7 = 182.8, that is 182 characters. The remaining 6 bits are set to zero. This change defines both mentioned values: - GSM0480_USSD_OCTET_STRING_LEN 160 - GSM0480_USSD_7BIT_STRING_LEN 182 keeping the old MAX_LEN_USSD_STRING 'as is' due to compatibility reasons. Now the new value is used for ss_request structure, while old one is still used for deprecated ussd_request structure. Change-Id: I6dead74f9ecea079752ff2400cdaf7c30187784e
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-0/+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
* gsm0480: add gsm0480_create_ussd_notify() and *_release_complete()Neels Hofmeyr2016-12-011-0/+2
| | | | | | | | | | | Add two functions to create USSD messages. Moves and generalizes code from openbsc. Pending: use the new functions in openbsc. It looks like _release_complete() should also set trans_id and direction flag; but since this is moving code from openbsc that is apparently working, just place a fixme comment and don't change the functionality. Change-Id: Ia80e32c7105359915bfad3cc5621a1c09caf20f0
* gsm0480: code dup: introduce and use gsm0480_l3hdr_push()Neels Hofmeyr2016-12-011-0/+3
| | | | | | | | Add function gsm0480_l3hdr_push() to push a struct gsm48_hdr to the start of a msgb. Use in gsm0480.c and gsm0411_utils.c. Further callers of the new function will follow in openbsc as well as another libosmocore patch for ussd. Change-Id: I54fce6053ab8362015686fe22dbcd38bf1366700
* Supplementary Services (de)activation, interrogation addedTobias Engel2015-01-011-1/+15
| | | | | | | | | | | | | These patches enhance the Supplementary Service (SS) processing from only being able to handle USSD to other SS, specifically activation, deactivation and interrogation of those SS. Registration is not yet implemented. include/osmocom/gsm/protocol/gsm_09_02.h has been added with needed values for SS. Modified by Harald Welte to keep the old ussd-only functiosn for API/ABI stability.
* include: Switch to #pragma once patternSylvain Munaut2014-06-161-4/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* USSD: text is 'char' not uint8_tHarald Welte2012-09-071-1/+1
|
* gsm 04.80: ussd_request.text can contain 0xff, needs to be unsignedHarald Welte2011-07-161-1/+1
| | | | Found by Smatch
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-0/+26
This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>