summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
Commit message (Collapse)AuthorAgeFilesLines
* TLV: add TLVP_PRES_LEN() definition to check for existance + minimum lengthHarald Welte2014-08-181-0/+3
| | | | | This is an import from osmo-bts where it was introduced in 6b561bb7ba5f10c5fd96542a7e42de2822352a67
* ipaccess.h: Add IPAC_PROTO_EXT_ORC for OML Router ControlHarald Welte2014-08-181-0/+1
|
* abis_nm: add abis_nm_msg_disc_names[] value_stringHarald Welte2014-08-171-0/+1
|
* abis_nm: introduce abis_nm_{osmo,ipa}_magic[]Harald Welte2014-08-171-0/+3
| | | | ... used to be oml_{osmo,ipa}_magic in osmo-bts
* update TS 08.08 header + TLV definitions to TS 48.008 / 11.7.0Harald Welte2014-06-211-2/+2
| | | | | | | | | | This adds support for A-over-IP and LCLS related message/IEI definitions. Old definitions are in decimal, which is very hard (at least for me) to compare with the binary tables in the spec. Hex is much easier to manually compare for completeness/correctness. I didn't touch the existing definitions, but think they should move to hex, too.
* update gsm_08_08.h to Release 11Harald Welte2014-06-211-1/+119
|
* gsm: Add Kasumi cipher implementationSylvain Munaut2014-06-161-0/+48
| | | | | Submitted-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* include: Switch to #pragma once patternSylvain Munaut2014-06-1635-142/+35
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* abis_nm: Add the abis_nm_osmo_att_tlvdef to the abis headerÁlvaro Neira Ayuso2014-05-201-0/+1
| | | | | | | Avoid compiler warnings and declare the presence of the new tlv_description. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
* Fix introducing osmocom speficic OML attributesHarald Welte2014-05-191-1/+3
| | | | | | | | | | | | | | | | | | | Rename NM_ATT_O_REDUCEPOWER to NM_ATT_OSMO_REDUCEPOWER, which makes it more clear that this is an osmcoom specific attribute. Also, we cannot simply overload 0x01 as an already defined OML attribute. The problem is quite simple: When we use abis_nm_att_tlvdef during the TLV parse, 0x01 will match to NM_ATT_ABIS_CHANNEL, which is defined as { TLV_TYPE_FIXED, 3 }. So instead, we need to introduce a new abis_nm_osmo_att_tlvdef[], which has to be patched into abis_nm_att_tlvdef[] by the means of tlv_def_patch(), exactly how we do it for bs-11 and nanobts specific attributes. I'm using 0xfe for the attribute, as 0xfe doesn't overlap with the IPA specific attribues (and we might want to combine/merge the 12.21 plus IPA plus osmocom spefici attributes)
* protocol/gsm_12_21.h: Add the Manufacturer Attribute ID O_REDUCEPOWER.Álvaro Neira Ayuso2014-05-151-0/+2
| | | | Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
* gsm/lapdm: Prevent LAPD tx_queue from filling up in polling modeDaniel Willmann2014-03-261-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.
* lapdm: Make lapdm_datalink_for_sapi publicDaniel Willmann2014-03-261-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.
* sms: Fix typo in a macros name: GSM340_SMS_RESSERVED -> GSM340_SMS_RESERVED.Alexander Chemeris2014-03-121-1/+1
|
* 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
* abis: Use the right return value for abis_nm_pchan4chcombHolger Hans Peter Freyther2014-01-021-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
* Refactor COMP128v23 implementation and add test suitMax2013-12-071-2/+2
|
* implement COMP128 version 2 and 3 A3/A8 algorithmKevin Redon2013-11-031-0/+23
| | | | simple copy into C from reversed code from www.hackingprojects.net
* gsm48: Added 'Network Daylight Saving Time' info elementJacob Erlbeck2013-09-161-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
* misc: Include time.h for time_t on FreeBSDHolger Hans Peter Freyther2013-09-041-0/+2
| | | | | Fix the build after I changed the order of header files in the SMS test.
* sms: Implement encoding the address as alphanumeric typeHolger Hans Peter Freyther2013-09-041-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.
* 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.
* Fix RR cause valuesAndreas Eversberg2013-07-061-3/+3
|
* Add chan_nr to RACH info at L1SAP interfaceAndreas Eversberg2013-07-061-0/+1
| | | | | The chan_nr is required to locate timeslot and subslot of access bursts during handover procedure.
* Add RSSI to l1sapAndreas Eversberg2013-07-061-0/+2
|
* Add MPH and TCH primitives to layer 1 SAPAndreas Eversberg2013-07-061-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.
* Remove osmo_phsap_prim from lapdm.h and move to a seperate header fileAndreas Eversberg2013-07-062-49/+54
|
* introduce gsm0808_create_reset_ack()Harald Welte2013-06-291-0/+1
|
* gsm_04_08.h: GSM48_MT_RR_VGCS_UPL_GRANT value correctedBhaskar2013-05-231-1/+1
|
* gsm_04_08.h: Fix GSM48_CMODE_DATA_3k6 as per 3GPP TS 04.08 / 10.5.2.6.Bhaskar2013-05-231-1/+1
|
* gsm_utils: refer to ETSI TS 05.08 instead of TS 08.05Bhaskar2013-05-231-1/+1
|
* add new gsm/meas_rep.h file for shared/common measurement report stuffHarald Welte2013-03-131-0/+29
|
* Add smpp34_osmocom.h for Osmocom SMPP vendor additionsHarald Welte2013-03-131-0/+48
|
* gsm_septets2octets(): Input parameter should be constHarald Welte2013-03-131-1/+1
|
* misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi2013-02-151-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.
* abis_nm: add parenthesis for new abis_nm_debugp_foh() macroHarald Welte2013-02-101-3/+3
| | | | without this, we break e.g. the openbsc build...
* turn abis_nm_debugp_foh() into a macroHarald Welte2013-02-101-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.
* Add tlvp_val16_unal() / tlvp_val32_unal() to align 16 and 32 bit valuesAndreas Eversberg2012-12-181-0/+24
| | | | | This is required for CPUs < armv6, to access 16 and 32 values at right memory locations.
* gsm: Add method to find ARFCN based on frequencySylvain Munaut2012-12-111-0/+3
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* rsl: Add the 9.3.20 release mode enum to be used in OpenBSCHolger Hans Peter Freyther2012-12-061-0/+6
|
* gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut2012-12-061-1/+1
| | | | | | Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther2012-11-221-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.
* smc: Introduce an id and prefix all log messages with SMC(ID)Holger Hans Peter Freyther2012-11-221-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
* smc: Make it possible to include gsm0411_smc.h as first header fileHolger Hans Peter Freyther2012-11-141-0/+1
| | | | The code embeds the timer so one needs to include the header file.
* Add "extern" keywordsTobias Engel2012-10-271-5/+5
| | | | | Without the "extern" keyword the variables in this header file will be seen as empty definitions when compiled on OSX.