aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gprs
AgeCommit message (Collapse)AuthorFilesLines
2016-04-29Move osmo_gsup_messages.[ch] to libosmocoreHarald Welte3-253/+2
This requires the corresponding commit in libosmocore.
2016-04-29move utils.h functions to libosmocoreHarald Welte3-245/+2
This needs the corresponding commit in libosmocore which imports the related functions
2015-11-02libcommon: soak up three static functions.Neels Hofmeyr1-1/+2
Add new kitchen sink openbsc/utils.h and libcommon/utils.c to make three so far static functions public (so I can use them in the upcoming OAP code). A place to put them could have been the gprs_utils.h, but all general functions in there have a gprs_ prefix, and todo markings to move them away. All other libcommon headers are too specific, so I opened up this kitchen sink header. Replace the implementation of encode_big_endian() with a call to osmo_store64be_ext(). See comments. Apply the change in Makefiles and C files.
2015-06-19Fix build wrt. missing CFLAGS constituentsAndreas Rottmann1-1/+1
When libosmo-netif and/or libosmo-abis are installed in distinct prefixes, the build failed with non-found headers.
2015-05-24gsup: Decode/Encode the hlr-Number in the GSUP messageHolger Hans Peter Freyther1-0/+2
Implement it similar to the msisdn_enc/msisdn_enc_len and extend the testcase to include it as well.
2015-05-05gsup: Extract the QoS fieldHolger Hans Peter Freyther1-1/+2
Add roundtrip test for the new QoS IE. It will be consumed in later commits.
2015-05-05gsup: Extract the new MSISDN stringHolger Hans Peter Freyther1-0/+2
Extract the new MSISDN IE from the GSUP message and verify that it is read/written to the message.
2015-01-30gprs/test: Fix GSUP Purge MS response messagesJacob Erlbeck1-2/+2
Currently the message types for these message types are wrong. This patch inserts the correct message types. Sponsored-by: On-Waves ehf
2015-01-26gprs: Add GPRS timer conversion functionsJacob Erlbeck2-0/+69
Currently, all GPRS timer values are hard-coded. To make these values configurable in seconds and to show them, conversion functions from and to seconds are needed. This patch adds gprs_tmr_to_secs and gprs_secs_to_tmr_floor. Due to the limited number of bits used to encode GPRS timer values, only a few durations can be represented. gprs_secs_to_tmr_floor therefore always returns the timer value that represents either the exact number (if an exact representation exists) or the next lower number for that an exact representation exists. Sponsored-by: On-Waves ehf
2015-01-18gprs: Implement PURGE_MS GSUP messagesJacob Erlbeck2-0/+26
This commit implements the encoding and decoding of the messages - Purge MS Request - Purge MS Error - Purge MS Result and adds corresponding tests. Sponsored-by: On-Waves ehf
2015-01-18gprs/test: Add tests for invalid GSUP messagesJacob Erlbeck1-0/+92
Currently, the tests only use valid GSUP messages. This does not check the robustness of the parser. This commit adds a test for truncated messages and another for modified messages. Thanks to Holger for the basic truncation test. Sponsored-by: On-Waves ehf
2015-01-10gprs: Add encoder/decoder for the Subscriber Update ProtocolJacob Erlbeck3-2/+151
This patch adds functions to encode and decode GSUP messages. This does not include the layer 1 framing (IPA). The messages so far supported are: send_auth_info_*, update_location_*, location_cancellation_*. Sponsored-by: On-Waves ehf
2014-12-23gprs: Add gprs_shift_tlv functionJacob Erlbeck1-5/+18
This function is similar to gprs_match_tlv with the exception, that the tag is not compared but returned in *tag instead. Sponsored-by: On-Waves ehf
2014-12-23gprs: Move TLV parser functions to gprs_utils.c and rename themJacob Erlbeck2-0/+229
Currently the parser functions for single information elements are defined within gprs_gb_parse.c and not exported explicitely. In addition they are named like libosmocore's TLV parser functions and do not have a proper name prefix. Since it is planned to use them for other protocols, they need to be globally accessible. This patch moves them to gprs_utils.c and renames them. The new names are: lv_shift -> gprs_shift_lv v_fixed_shift -> gprs_shift_v_fixed lv_shift -> gprs_shift_lv v_fixed_shift -> gprs_shift_v_fixed In the long term, these functions should be moved to libosmocore (and renamed again). Sponsored-by: On-Waves ehf
2014-08-04gprs: Add testcases for the APN string/octet conversion and fix itHolger Hans Peter Freyther2-1/+99
Create a testcase for the gprs_str_to_apn and gprs_apn_to_str routines. While writing the testcase we noticed it is possible to write more bytes than should have been allowed. This is fixed by checking that the max_len is at least 1 (needed to write the first length octet) and to do the size check before writing to the output. Modify the signature of gprs_str_to_apn to put the length/size next to the parameter that requires a size. Done with Jacob
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2012-01-06gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged informationHolger Hans Peter Freyther3-0/+75
GSM 04.64 8.4.2 asks to ignore UI frames if the DLCI is not known, or if the "(V(UR)- 32) <= N(U) < V(UR)". E.g. if we want to have V(UR) == 511 and this frame is dropped, we would ignore N(U)'s 0 to 510. Calculate the delta. The code is based on Jonathan Santos's "LLC UI window" fix but the issue was discovered independly.