summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/gsm_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* utils: add function gsm_fn_as_gsmtime_str()Philipp Maier2017-07-111-0/+3
| | | | | | | Convert a given frame number into a printable string that displays the sub components of the frame number. Change-Id: I8015d2ded3940b01b35df7b72fc35c70c25e9926
* gsm_utils: Add osmo_dump_gsmtimePau Espin Pedrol2017-07-101-0/+3
| | | | | | Used by osmo-bts, moved from osmo-bts l1sap.c:dump_gsmtime. Change-Id: Ib5452e2c20f53006c0f6d197fb055728947125d8
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-1/+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
* doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2017-06-231-4/+4
| | | | | | | | | | 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
* dyn TS: add definitions for dynamic TCH/F_TCH/H_PDCHNeels Hofmeyr2016-07-231-0/+1
| | | | | | | | | | | Add: * GSM_PCHAN_TCH_F_TCH_H_PDCH * NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH * RSL_CHAN_OSMO_PDCH * RSL_ACT_OSMO_PDCH Related: OS#1776 Change-Id: Ib1a8b11f37af4686d00ac88beba38557aa29edc2
* Addditional classmark check against A5/4 supportMax2016-04-221-1/+13
| | | | | Add classmark check function according to GSM 04.08 Chapter 10.5.1.7 Fix interface to use unsigned for unsigned value.
* Export names for gsm_chan_t and gsm48_chan_modeMax2016-03-301-0/+3
| | | | This can be used with get_value_string() to improve debugging output.
* fix gsm_7bit_decode API comment: septets, not octetsNeels Hofmeyr2016-02-291-1/+2
|
* Add G-RNTI derived TLLI types defined in 23.003Harald Welte2015-08-181-0/+2
|
* libosmo-gsm: Add PCHAN/LCHAN types for CBCHHarald Welte2014-12-281-0/+3
|
* include: Switch to #pragma once patternSylvain Munaut2014-06-161-5/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* sms: Fix gsm_7bit legacy functions return valueJacob Erlbeck2014-01-091-0/+3
| | | | | | | | | | | | | | The legacy 7bit conversion functions (those without the '_n_' in the name) gave wrong return values on 64 bit platforms due to unproper signed/unsigned conversions and the usage of SIZE_MAX. This patch fixes this by using a smaller max size (see GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, currently set to 64k) for the legacy wrappers and by using unsigned int for max_septets. In addition, there are tests now that check the return values of legacy encoding and decoding. Sponsored-by: On-Waves ehf
* core: Move OSMO_DEPRECATED to new core/defs.h fileJacob Erlbeck2013-08-141-13/+1
| | | | | | | | | | Add a new core/defs.h file for definitions that can be used from within header files without including prototypes and extern declarations. It's primarily meant for macro definitions and basic typedefs. Move the definition of OSMO_DEPRECATED there and use compiler version info to avoid compiler errors.
* sms: Disable deprecated messageJacob Erlbeck2013-08-121-6/+20
| | | | | This is a workaround to make the FreeBSD8.4 and Debian6.0 target build again. The deprecated attribute doesn't have arguments.
* sms: Added result buffer size parameter to 7bit conv funsJacob Erlbeck2013-08-121-7/+52
| | | | | | | | | | | | | The 7bit<->8bit encoding/decoding functions didn't check whether there is still enough space in the destination buffer. Therefore a buffer size parameter has been added to each of the functions which is used to truncate the output if the buffer is too small. In addition, the return value of the decoding functions has been changed to number of characters written (excluding \0), so this value is always equal to strlen(decoded). The old functions are still available as wrapper functions.
* Add special 7-bit encoding and decoding functions for USSD codingAndreas Eversberg2013-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Handling 7-bit coding is a little different for USSD, as TS 03.38 states: To avoid the situation where the receiving entity confuses 7 binary zero pad bits as the @ character, the carriage return or <CR> character shall be used for padding in this situation [...]. If <CR> is intended to be the last character and the message (including the wanted <CR>) ends on an octet boundary, then another <CR> must be added together with a padding bit 0. The receiving entity will perform the carriage return function twice, but this will not result in misoperation as the definition of <CR> [...] is identical to the definition of <CR><CR>. The receiving entity shall remove the final <CR> character where the message ends on an octet boundary with <CR> as the last character. Jacob has verified the fix with fakeBTS and the wireshark dissector. Fixes: OW#947 Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
* encoding: Provide an overload for the gsm_7bit_encode and a simple testHolger Hans Peter Freyther2013-08-081-0/+1
| | | | | | | This is required for encoding the SMS header using the alpha numeric rules. Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
* gsm: Try to clarify why we have gsm_septet_encode in the header fileHolger Hans Peter Freyther2013-08-071-0/+1
| | | | | These functions are not meant to be used by applications and are only here for the unit tests. Try to document that.
* gsm_utils: refer to ETSI TS 05.08 instead of TS 08.05Bhaskar2013-05-231-1/+1
|
* gsm_septets2octets(): Input parameter should be constHarald Welte2013-03-131-1/+1
|
* gsm: Add method to find ARFCN based on frequencySylvain Munaut2012-12-111-0/+3
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* add GSM_LCHAN_PDTCHHarald Welte2012-04-191-0/+1
|
* sms: SMS where cropped (from VTY), concatenation of SMS where not possibleDennis Wehrle2011-07-241-0/+5
| | | | | | | | | | | | Additionally it wasn't possible to send concatenated sms from the vty. To send multiple sms, it is necessary to use padding bits and add a user_data_header. Therefore the gsm_7bit_encode function was splitted to gsm_7bit_encode and gsm_septets2octets. gsm_septets2octets: this is the old gsm_7bit_encode function + additional padding parameter Additionally the gsm_7bit_decode function was modified to take account for the user_data_header. With the new gsm_get_octet_len function you can get the octet length for a given septet length. I also added several sms tests.
* don't call a function argoment 'class' for the benefit of c++ usersHarald Welte2011-07-231-1/+1
| | | | This had broken lcr compilation...
* gsm/utils: Adding conversion of "mobile power class" to dBmAndreas Eversberg2011-06-261-0/+2
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Import abis_nm_{chcomb4pchan,pchan4chcomb}() from openbscHarald Welte2011-05-241-0/+26
|
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-0/+117
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>