aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
AgeCommit message (Collapse)AuthorFilesLines
2015-07-03Add mnc_t for 3 digit mncs.mmcternan/bb_maintMichael McTernan2-4/+29
Signed-off-by: Michael McTernan <mike.mcternan@wavemobile.com>
2014-03-26gsm/lapdm: Prevent LAPD tx_queue from filling up in polling modeDaniel Willmann1-0/+1
If LAPDm receives an I-Frame while there already is an I-Frame in the tx_queue the code generates an additional RR (to acknowledge the received I-Frame). Instead, N(R) of the I-Frame in the tx_queue should be updated to ACK the data.
2014-03-26lapdm: Make lapdm_datalink_for_sapi publicDaniel Willmann1-0/+2
This API allows you to get the lapdm_datalink for a SAPI. It's needed in the lapdm_test, so make it public.
2014-03-12sms: Fix typo in a macros name: GSM340_SMS_RESSERVED -> GSM340_SMS_RESERVED.Alexander Chemeris1-1/+1
2014-01-09sms: Fix gsm_7bit legacy functions return valueJacob Erlbeck1-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
2014-01-02abis: Use the right return value for abis_nm_pchan4chcombHolger Hans Peter Freyther1-1/+1
abis_nm_pchan4chcomb will return a pchan for a given channel combination but returned a value of the channel combination. Fix it to return the physical channel combination. Fixes: Coverity CID 1040767
2013-12-07Refactor COMP128v23 implementation and add test suitMax1-2/+2
2013-11-03implement COMP128 version 2 and 3 A3/A8 algorithmKevin Redon1-0/+23
simple copy into C from reversed code from www.hackingprojects.net
2013-09-16gsm48: Added 'Network Daylight Saving Time' info elementJacob Erlbeck1-0/+1
This information element has been added to the MM Information message in GSM24.008. This patch adds it to the tlv_definition to keep the TLV parser from breaking. Ticket: OW#978
2013-09-04misc: Include time.h for time_t on FreeBSDHolger Hans Peter Freyther1-0/+2
Fix the build after I changed the order of header files in the SMS test.
2013-09-04sms: Implement encoding the address as alphanumeric typeHolger Hans Peter Freyther1-0/+32
The number of digits is the number of used octets times two (two digits per octet). The result has been successfully dissected by wireshark. It has not been tested with real phones.
2013-08-14core: Move OSMO_DEPRECATED to new core/defs.h fileJacob Erlbeck1-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.
2013-08-12sms: Disable deprecated messageJacob Erlbeck1-6/+20
This is a workaround to make the FreeBSD8.4 and Debian6.0 target build again. The deprecated attribute doesn't have arguments.
2013-08-12sms: Added result buffer size parameter to 7bit conv funsJacob Erlbeck1-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.
2013-08-08Add special 7-bit encoding and decoding functions for USSD codingAndreas Eversberg1-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>
2013-08-08encoding: Provide an overload for the gsm_7bit_encode and a simple testHolger Hans Peter Freyther1-0/+1
This is required for encoding the SMS header using the alpha numeric rules. Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
2013-08-07gsm: Try to clarify why we have gsm_septet_encode in the header fileHolger Hans Peter Freyther1-0/+1
These functions are not meant to be used by applications and are only here for the unit tests. Try to document that.
2013-07-06Fix RR cause valuesAndreas Eversberg1-3/+3
2013-07-06Add chan_nr to RACH info at L1SAP interfaceAndreas Eversberg1-0/+1
The chan_nr is required to locate timeslot and subslot of access bursts during handover procedure.
2013-07-06Add RSSI to l1sapAndreas Eversberg1-0/+2
2013-07-06Add MPH and TCH primitives to layer 1 SAPAndreas Eversberg1-3/+72
In order to control layer 1 via primitives, MPH primitives are required. There is only one (MPH-INFO) primitive defined in TS 04.04 for all control and measurement functions. A type identifier inside this primitive is used to differentiate between different functions. The TCH primitives are used to carry traffic. TCH primitives carry voice or data traffic, whereas PH-DATA primitives carry FACCH data. PH_RTS and TCH_RTS (ready-to-send) primitives are used to poll requests from upper layers.
2013-07-06Remove osmo_phsap_prim from lapdm.h and move to a seperate header fileAndreas Eversberg2-49/+54
2013-06-29introduce gsm0808_create_reset_ack()Harald Welte1-0/+1
2013-05-23gsm_04_08.h: GSM48_MT_RR_VGCS_UPL_GRANT value correctedBhaskar1-1/+1
2013-05-23gsm_04_08.h: Fix GSM48_CMODE_DATA_3k6 as per 3GPP TS 04.08 / 10.5.2.6.Bhaskar1-1/+1
2013-05-23gsm_utils: refer to ETSI TS 05.08 instead of TS 08.05Bhaskar1-1/+1
2013-03-13add new gsm/meas_rep.h file for shared/common measurement report stuffHarald Welte1-0/+29
2013-03-13Add smpp34_osmocom.h for Osmocom SMPP vendor additions0.6.0Harald Welte1-0/+48
2013-03-13gsm_septets2octets(): Input parameter should be constHarald Welte1-1/+1
2013-02-15misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi1-3/+5
Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
2013-02-10abis_nm: add parenthesis for new abis_nm_debugp_foh() macroHarald Welte1-3/+3
without this, we break e.g. the openbsc build...
2013-02-10turn abis_nm_debugp_foh() into a macroHarald Welte1-1/+11
this will avoid printing 'abis_nm.c' as the filename in the log, which is pretty useless during debugging. We want to know where abis_nm_debugp_foh() is being used from, not where it is implemented.
2012-12-18Add tlvp_val16_unal() / tlvp_val32_unal() to align 16 and 32 bit valuesAndreas Eversberg1-0/+24
This is required for CPUs < armv6, to access 16 and 32 values at right memory locations.
2012-12-11gsm: Add method to find ARFCN based on frequencySylvain Munaut1-0/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-06rsl: Add the 9.3.20 release mode enum to be used in OpenBSCHolger Hans Peter Freyther1-0/+6
2012-12-06gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut1-1/+1
Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-11-22smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther1-1/+2
When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMR instance. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMR(ID). This change is ABI and API incompatible with previous versions of libosmogsm.
2012-11-22smc: Introduce an id and prefix all log messages with SMC(ID)Holger Hans Peter Freyther1-1/+2
When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMC. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMC(ID). This change is ABI and API incompatible with previous versions of libosmogsm. Example: SMC(100) instance created SMC(100) message MNSMS-EST-REQ received in state IDLE
2012-11-14smc: Make it possible to include gsm0411_smc.h as first header fileHolger Hans Peter Freyther1-0/+1
The code embeds the timer so one needs to include the header file.
2012-10-27Add "extern" keywordsTobias Engel1-5/+5
Without the "extern" keyword the variables in this header file will be seen as empty definitions when compiled on OSX.
2012-09-07USSD: text is 'char' not uint8_tHarald Welte1-1/+1
2012-08-24GSM 04.08: Add 'enum gsm48_bcap_speech_ver'Harald Welte1-0/+9
2012-08-24GSM 04.08: Add support for parsing CSD related bearer capabilitiesHarald Welte2-0/+79
Also adds a test case for both encoder and decoder of this IE
2012-08-24GSM 08.58: Add channel modes for transparent data servicesHarald Welte1-4/+20
2012-07-14TLV: add new "vTvLV" type for GANHarald Welte1-1/+97
This new TLV type is specific to TS 44.318. Contrary to the TvLV type of TS 08.16/08.18, it has an inverted meaning of the extension (0x80) bit: * if the extension bit is not set, 1-byte length * if the extension bit is set, 2-byte length Futhermore, it has support for variable-length tags, where the tag part can be optionally two bytes in length. As this esoteric option hasn't been seen in the wild yet, we only add encoding support but skip decoding for now.
2012-07-13import gsm48_decode_lai() function from osmocom-bb/mobile sysinfo.cHarald Welte1-0/+2
2012-06-30build: simplify headers management and remove recursionDiego Elio Pettenò2-14/+0
There is no real reason to keep the include directory a multi-level recursion, so instead declare everything within include (so that we can use proper nobase_ declarations) and be it. Please note that since we removed the sub-Makefile.am, ./configure will not create the directory structure for us on out-of-tree builds, so we have to make sure the directory we're generating to exists first. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-29GAN/UMA: use correct IE Identifier foer T3920Harald Welte1-2/+2
As Dieter found out, there has been a mix-up of 3902 with 3920 :/
2012-06-24ganc: add value_strings for GAN message type and protocol discriminatorHarald Welte2-1/+10
2012-06-2444.318: Add missing message typesHarald Welte1-0/+3