summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
Commit message (Collapse)AuthorAgeFilesLines
...
* Add basic EARFCN supportMax2016-03-171-1/+31
| | | | | | Add structure representing group of EARFCNs with common priority, threshold etc. Add functions to populate this structure.
* gsm48: factor out MCC+MNC BCD parsing for re-use in UMTSNeels Hofmeyr2016-03-151-0/+3
| | | | | | | | | | For 3G, I need a BCD composer/parser similar to gsm48_generate_lai()/ gsm48_decode_lai(). Those functions also handle a trivial extra member (lac) which I don't need in this way for 3G. So create new functions to take on the MCC+MNC BCD handling and call those from gsm48_generate_lai() and gsm48_decode_lai(). In this way, the 3G code in openbsc can use only the BCD functionality without code duplication.
* 04.08: add inline funcs for transaction id bitsNeels Hofmeyr2016-03-151-0/+19
| | | | | | Various users of gsm48_hdr apply the same hardcoded shifts/bitmasks to obtain the transaction ID encoded in the upper nibble of the protocol discriminator. Centralize. Patch for openbsc.git will follow.
* 04.08: switch to r99 msg type bitmasks by defaultNeels Hofmeyr2016-03-151-1/+1
| | | | | [hfreyther: Separated from the previous patch to allow an easy revert]
* 04.08: add inline funcs for pdisc + msg type bitmasksNeels Hofmeyr2016-03-151-0/+56
| | | | | | | | | | | | | | | | Add inline functions for both release <= 98 and release >= 99 as well as a default define. Use the release 98 by default since the current code base uses the r98 bitmasks. These inline functions relieve callers of the decision on masking bits of the protocol discriminator and message type octets. Also add a define for the protocol discriminator extension to one octet length (GSM48_PDISC_EXTEND). Apply new pdisc function in gsm0480.c. [hfreyther: Make the hdr param const]
* Add support for SI2quater messagesMax2016-03-111-0/+7
| | | | Add basic data structure for System information Type 2quater.
* fix gsm_7bit_decode API comment: septets, not octetsNeels Hofmeyr2016-02-291-1/+2
|
* Extend L1SAP PH-DATA with presence informationMax2016-02-221-0/+11
| | | | | | | | | Previously the presence of header and data blocks were communicated in-band which decreases code readability and makes it unnecessary hard to add support for new hardware. Note: OsmoBTS have to be modified to take advantage of extended ph_data_param structure.
* gsm: Add APN conversion functionsJacob Erlbeck2016-01-151-0/+3
| | | | | | | | | | | | These functions are currently part of openbsc but also needed by other projects. The function have been renamed as follows: gprs_apn_to_str -> osmo_apn_to_str gprs_str_to_apn -> osmo_apn_from_str Sponsored-by: On-Waves ehf
* some comments / fixed typosNeels Hofmeyr2015-12-213-2/+5
|
* RSL: Add enum + TLV definitions for ip.access style embedded IEsHarald Welte2015-12-132-0/+31
|
* gsm_03_41: Fix structure definitions for big-endian machinesRuben Undheim2015-12-091-0/+31
| | | | | this was detected by debian packaging, as the associated gsm_03_41 test case fails on big endian machines like ppc.
* ipaccess: add OAP proto_ext (in design).Neels Hofmeyr2015-09-231-0/+1
|
* Introduce gsm48_mi_type_name() functionHarald Welte2015-08-181-0/+1
|
* Add G-RNTI derived TLLI types defined in 23.003Harald Welte2015-08-181-0/+2
|
* ipa: Properly parse LV stream of a ID_GET requestHolger Hans Peter Freyther2015-06-021-0/+3
| | | | | | | | For some reason the structure is closer to be a LV (length and value). The value is actually a tag but it is counted inside the length. Introduce an overload of the parse function to provide an offset for the length. This will be taken from the returned length.
* Add APN utility function to libosmogsmHarald Welte2015-05-251-0/+13
| | | | | | The current functions are used to 'qualify' an APN from the user-supplied APN name (name identifier) towards the fully-qualified APN name which is used in the .grps DNS zone.
* gsm: Add A5/3-4 cipher supportMax2015-03-281-1/+1
| | | | | Signed-off-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Supplementary Services (de)activation, interrogation addedTobias Engel2015-01-012-1/+152
| | | | | | | | | | | | | 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.
* SMS-CB: introduce and use GSM341_7BIT_PADDINGHarald Welte2014-12-301-0/+1
|
* SMS-CB: Add #defines for maximum block/msg size and payload charsHarald Welte2014-12-302-0/+8
|
* add missing gsm0341.hHarald Welte2014-12-301-0/+9
|
* Add Cell Broadcast MSGIDs from TS 23.041 v12.6.0 Release 12Harald Welte2014-12-291-0/+38
|
* libosmo-gsm: Add PCHAN/LCHAN types for CBCHHarald Welte2014-12-281-0/+3
|
* ipa: Add forward declaration of struct osmo_fdJacob Erlbeck2014-12-221-0/+2
| | | | | | | | | | | A pointer to struct osmo_fd is used in a few prototypes declared in gsm/ipa.h, but is neither declared explicitly nor is such a declaration reachable via the given include directives. This patch adds a forward declaration of this type to ensure proper compilation. Sponsored-by: On-Waves ehf
* ipa: Make a reservation for the GSUP protocolHolger Hans Peter Freyther2014-12-141-0/+1
| | | | | GSUP is a protocol to have the OpenBSC SGSN talk to an exterbal system for 3GPP MAP connectivity.
* gsm48.h: define the reserved TMSI in libosmocore, not openbscHarald Welte2014-08-241-0/+3
|
* ipa: rename functions for consistencyHarald Welte2014-08-201-12/+12
| | | | | | | | As we are breaking builds by moving functions from libosmo-abis to libosmocore anyway, we might as well give functions more appropriate names. ipaccess is a company, while IPA is the multiplex protocol, and CCM is the protocol used for establishing identities on the IPA multiplex.
* import various generic IPA related functions from libosmo-abisHarald Welte2014-08-201-0/+62
| | | | | | | | | libosmo-abis is about forming A-bis interfaces/lines by means of E1 or the IPA multiplex (or possibly other link layers). The IPA multiplex is used in other contexts, such as the Control interface, or the A interface. In that context, it makes sense to have generic IPA related functions in libosmocore.
* 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.