aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-10-20Revert "Constify ctrl_cmd struct fields where appropriate"Neels Hofmeyr1-3/+3
This reverts commit ed9d6da5df98538adc70aa03cb569eb9505d04b6. The commit is good as such, but it causes many compiler warnings in the OpenBSC build. We want this to be re-applied as soon as we have patches ready that fix the fallout in openbsc.git. See also https://lists.osmocom.org/pipermail/openbsc/2016-October/009802.html Related: OS#1829 Change-Id: I722ad60232a6ef5b4cb984b92c42851de26b3ccd
2016-10-12Add function to send TRAP over Control InterfaceMax1-0/+1
Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 Related: OS#1646
2016-10-12gsm0408: Adding 3g spcific RR message typesPhilipp1-0/+5
GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds four new message types related to paging and notifiction See also 3GPP TS 04.18, section 10.4, table 10.4.1 Change-Id: I071cc9ecac342b5221fa0ec0b782b04b51b40e93
2016-10-11Constify ctrl_cmd struct fields where appropriateMax1-3/+3
Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9
2016-09-30Mark inline header function as staticMax1-1/+1
Change-Id: Ib751f7467d54cbcae76f72448a38e30f2ecc63d4
2016-09-28AMR: add function to check speech framesMax1-0/+21
Add convenience function osmo_amr_is_speech() to check if given AMR frame is speech frame: non-speech frames often require special processing. Change-Id: Ifaab02a2f581acc302b367d34fd2fc28a4d1e2e3
2016-09-27msgb: add msgb_talloc_ctx_init(), deprecate msgb_set_talloc_ctx()Neels Hofmeyr1-1/+4
So far each and every main() scope creates a msgb talloc context and either passes it to msgb_set_talloc_ctx() or sets tall_msgb_ctx directly (by defining it extern first). Remove some code duplication: add one central function that creates the "msgb" talloc context for all. Most users of msgb employ a talloc_named_const(), but osmo-bts uses a talloc_pool() instead. Offer both ways by means of the pool_size argument, and for both ways make sure the context is called "msgb". Suggest that msgb users should move to this new function: deprecate msgb_set_talloc_ctx(). To be able to do so, include core/defs.h in msgb.h. There's a tradeoff between hiding the msgb talloc context behind API that tries to guess all use cases versus avoiding code dup. This patch opts against code dup and boldly assumes that all future use is covered. Also, the new function suggests to not access tall_msgb_ctx directly, which can be considered a style improvement. It seems that not all main scopes that use msgb actually initialize the msgb ctx. As a fallback for these, explicitly initialize tall_msgb_ctx to NULL. Change-Id: I747fbbf977c4d2c868c8dead64cfc5fd86eb8d4c
2016-09-23gprs: Increase NS_ALLOC_SIZE to 3kDaniel Willmann1-1/+2
2k can be insufficient when responding with a STATUS message to a long LLC packet because the original message is included in the STATUS. Change-Id: I6f76751cfadf61e87ce4367a38907083e1c98562 Ticket: SYS#2967 Sponsored-by: On-Waves ehf
2016-09-22add osmo_gettimeofday as a shim around gettimeofdayNeels Hofmeyr1-0/+11
This allows feeding a custom time for unit tests by overriding osmo_gettimeofday. Change-Id: Ic7a81a6eb51f27fe452962b91f2eae2070d87089
2016-09-09fix GGSN Ctrl port to 4257Neels Hofmeyr2-1/+2
4253 used to collide with the sysmobts-mgr VTY port. Note, openggsn does not actually have a Ctrl interface yet. Change-Id: If0fa0e606dabd5bc89907a56ef18cdbbbdedb4b7
2016-09-09comment: */ports.h: link to wiki + manuals, indicate used portsNeels Hofmeyr2-2/+16
Change-Id: I6a7bf04e589ccfaea98f20900a9bfe9dd4808dce
2016-09-09Add Marker to ph_tch_paramMax1-0/+1
Extend struct ph_tch_param with Marker bit from RTP header to indicate speech onset in case of DTX. Change-Id: Ic664902630b9d335ff9abc7a9ca7249eaf80e05f Related: OS#1750
2016-09-09fix error msg: msgb_put(): say "msgb_put", not "msgb_push"Neels Hofmeyr1-1/+1
Change-Id: I72f31ebad693f98eb088a99b83aeb10cf9acc29e
2016-08-30core/counter: add osmo_counter_dec()Alexander Couzens1-0/+6
Change-Id: I030140a45afa295c3ebc4d3ccaffd437b984f515
2016-08-29IuPS: add GMM Service Request related constants and value_strNeels Hofmeyr1-0/+16
Change-Id: Ie023fc78099932f95cc8f1b3a04fe25dfd14bc35
2016-08-08Add control interface port for GGSNMax1-0/+1
Change-Id: Ie7232189fe3265a8631fd3652b2c8c152cdee918 Related: OS#1646
2016-08-04Extend L1SAP with MeasurementsMax1-0/+3
We already have RSSI parameter in PH-DATA. Add other measurement information (BER, BTO, Link Quality). Change-Id: I2b127eb1856c4cd1bc46490a89592a595f1ee86b Related: OS#1616
2016-07-28Mark input string to osmo_talloc_replace_string() as constHarald Welte1-1/+1
This allows us to pass in strings that are 'const', which for the source of a copy should be the normal/regular case anyway. Change-Id: Icee6a5f88babd3a4e30bf0886f0f8d3b865d80ce
2016-07-25egprs: Add CPS tables from TS 04.60Tom Tsou2-0/+28
Includes EGPRS coding and puncturing scheme (CPS) tables from 3GPP TS 04.60. Currently osmo-bts-trx is the only user of CPS table values, but this may change with gprsdecode and other utilities. Change-Id: I09fe6514a0e2e51bb3206f8387633f7e0255345f
2016-07-24Update structure in libosmocore for 11 bit RACHbhargava1-1/+11
Parameters are added to the structure ph_rach_ind_param to differentiate the type of RACH received from Layer 1. This is to further support the 11 bit RACH. Change-Id: Ic4f0f2424a3af7599d986044be25ea4fcc0ca477
2016-07-23Add define for invalid TAMax1-0/+2
Add GSM48_TA_INVALID which is invalid Timing Advance value according to 3GPP TS 44.018 § 10.5.2.40. Change-Id: I061760ccac656f39164562a7883f8ab522cd0911 Related: OS#1526
2016-07-23rsl: add rsl_act_type_name()Neels Hofmeyr1-0/+8
Change-Id: Ie90c76d8aef42d5e2c9be94f4b206d4994e305f8
2016-07-23dyn TS: add definitions for dynamic TCH/F_TCH/H_PDCHNeels Hofmeyr3-0/+5
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
2016-07-23gsm_08_58.h: introduce RSL_CHAN_NR_1 constantNeels Hofmeyr1-0/+1
Using the RSL_CHAN_* constants, we sometimes need to add 1 to the chan bits to indicate e.g. the second TCH/H channel. RSL_CHAN_NR_1 marks this lowest channel bit that needs to be added. The name is analogous to RSL_CHAN_NR_MASK. Change-Id: Iea06432039d1cd23cc6b5acec308bb829b596d47
2016-07-16Add function to check TA validityMax1-0/+10
Check if given Timing Advance is valid according to 3GPP TS 44.018 § 10.5.2.40. Change-Id: I5cb6149d6e36fda8cb3f557e4d6d3a724da805a5 Related: OS#1545
2016-07-12Add EGPRS RLC/MAC headers from 3GPP TS 04.60Tom Tsou2-0/+209
For shared use by osmo-pcu and osmo-bts-trx. Change-Id: I500cdc87cd30faf36c8cd92d234642f809c8f2aa
2016-07-11Add GEA3 & GEA4 ciphersMax3-1/+20
Corresponding test code include both official test vectors from the specs and data from over-the-air tests. This obsoletes libosmo-crypt-a53 as it was last missing piece unimplemented in libosmogsm. Change-Id: I939e4f6b91b4a7c591ef3761fe2d46ed1c2fb2d3 Related: OS#1582
2016-07-08Add strings with GPRS GMM messagesMax1-0/+1
Change-Id: I48477b733e2da72f59349c00554dd3e080c9f445 Related: OS#1582
2016-07-07Add function to check GMM encryptabilityMax1-1/+2
Check if particular GMM message can be encrypted according to 3GPP TS 24.008 § 4.7.1.2 Related: OS#1582 Change-Id: I7ad0e03c2c738d174dd6bc3453f332eeb8da1e7d
2016-06-29Clarify GPRS algorithmMax1-5/+6
Add spec reference and set explicit values for enum representing ciphering algorithm for GPRS encryption. Change-Id: Ia9ee429b73a37d52599fce70778cfe87b767411c Related: OS#1582
2016-06-29Clarify GPRS ciphering directionMax1-2/+3
Add spec reference and set explicit values for enum representing direction parameter for GPRS encryption. Change-Id: Iaf1b13da2e889d55cc9dd7516710104dba48c992 Related: OS#1582
2016-06-29Add function to check MS GEA capabilitiesMax1-0/+5
Add function which parses MS network capability IE value for bits indicating support for particular version of GEA. Change-Id: I785cef37dd272a2fab9b172f6e1392f865174e9a Relates: OS#1582
2016-06-29Make C4 function globally availableMax1-1/+1
This function perform 64 -> 128 bit key expansion which useful for converting between UMTS CK and GSM Kc, A5/3 and A5/4, GEA3 and GEA4 keys. Change-Id: I5a6c6deef6027cd6af144c9062d4c9166be26904 Related: OS#1582
2016-06-29Add strings for GPRS ciphersMax1-0/+3
Change-Id: I050bda5fb50aad42fe2d72de39f8256b4fb12fb2 Related: OS#1582
2016-06-27Mark input parameter to bitvec_set_bits() as 'const'Harald Welte1-1/+1
The input data is accessed in a read-only manner, so it should be marked with the const qualifier. Change-Id: I0d6b86289fa647594f3da1f1c0e0168685307a37
2016-06-27fsm: Introduce default time-out handlingHarald Welte1-1/+3
If a FSM doesn't specify any timer_cb, simply terminate the FSM by default on time-out. This is a reasonable default for most cases, and avoids copy+pasting a one-line timer_cb function in every FSM. Also, even if there is a timer_cb, let it have a return value to decide if the core should terminate after return from timer_cb or not. Change-Id: I0461a9593bfb729c82b7d1d1cf9f30b1079d0212
2016-06-20Add octet-aligned/unaligned shift functionsMax1-0/+5
The actual code is from OsmoBTS' tch.c by Harald Welte. Add unit tests, doxygen annotation and extra memory safety check. Those functions are used in several BTS implementations but seems generic enough to be generally useful. Change-Id: I2b1901c4161e8035f059585901dca593b661556d
2016-06-16Add Finite State Machine abstraction codeHarald Welte2-0/+136
This code is supposed to formalize some of the state machine handling in Osmocom code. Change-Id: I0b0965a912598c1f6b84042a99fea9d522642466 Reviewed-on: https://gerrit.osmocom.org/163 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-06-16Add UMTS AKA related MM/GMM message type and IE definitionsHarald Welte2-0/+13
Change-Id: Id45ea2c631ee589a4df1f8213da6f7e7d1bf6616 Reviewed-on: https://gerrit.osmocom.org/305 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-06-16Add structures defining decoded TS 23.003 identitiesHarald Welte2-0/+81
Change-Id: I6423f8d75bb3e7aeca285854ab3232a087d62b57 Reviewed-on: https://gerrit.osmocom.org/304 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-06-16gsup: Add OSMO_GSUP_MSGT_AUTH_FAIL_REPORTHarald Welte1-0/+2
The VLR must be able to notify the HLR of authentication failures. Change-Id: I156cff76e092b3548b05534141b61887ee6be3f3 Reviewed-on: https://gerrit.osmocom.org/303 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-06-14add vty call show asciidoc: generate a documentation for countersAlexander Couzens1-0/+2
For each counter group a ascii doc table is generated containing all single counter with a reference to a section to add additional information to the counter Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Reviewed-on: https://gerrit.osmocom.org/70 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Harald Welte <laforge@gnumonks.org>
2016-06-13add rsl_or_ipac_msg_name() for both standard and ip.access msg typesNeels Hofmeyr1-0/+1
Context: in osmo-bts, I want to look up an RSL message name in rsl_msgt_names and fall back to rsl_ipac_msgt_names if not found, because the IPAC PDCH ACT and DEACT messages are sent in a standard ABIS_RSL_MDISC_DED_CHAN. Change-Id: Ic9ba721a1469cf51aed97ab0f44a7fe055c94b1f Reviewed-on: https://gerrit.osmocom.org/231 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-06-13add get_value_string_or_null() to handle unknown itemsNeels Hofmeyr1-0/+2
Add get_value_string_or_null() to return NULL in case the given value is not found in the list of strings, to be able to cleanly fall back to another list of strings. Absorb the lookup loop from get_value_string(). Context: in osmo-bts, I want to look up an RSL message name in rsl_msgt_names and fall back to rsl_ipac_msgt_names if not found, because the IPAC PDCH ACT and DEACT messages are sent in a standard ABIS_RSL_MDISC_DED_CHAN. In a subsequent commit, get_value_string_or_null() will be used by new rsl_or_ipac_msg_name(). Change-Id: I1fa3907e28d528d2758bc3eae9d19e6c1168f5e5 Reviewed-on: https://gerrit.osmocom.org/230 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-06-01Add functions to detect HR/FR SID framesMax1-0/+3
Add functions which check if given FR or HR frame (packed in RTP) contains SID (SIlence Descriptor) and corresponding tests. Related: OS#22 Change-Id: I4051e3c0d4fb9ee93d7e9e0ef4abaf9f18e227ca Reviewed-on: https://gerrit.osmocom.org/160 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-05-31Patched structs for big-endian architecturesRuben Undheim1-0/+160
Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 Reviewed-on: https://gerrit.osmocom.org/124 Tested-by: Jenkins Builder Reviewed-by: Neels Hofmeyr <nhofmeyr@sysmocom.de> Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-05-31Add helper functions for AMR codecMax1-0/+31
* add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 Reviewed-on: https://gerrit.osmocom.org/118 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-30Add strings with PH primitive namesMax1-0/+2
It's useful debugging helper while troubleshooting L1-related issues. Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Reviewed-on: https://gerrit.osmocom.org/117 Tested-by: Jenkins Builder Reviewed-by: Max <msuraev@sysmocom.de> Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-28Fixing build on Mac OSXBeshr Al Nahas1-1/+1
Fix minor syntax error Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 Reviewed-on: https://gerrit.osmocom.org/125 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-20Fix build for OSXArran Cudbard-Bell1-0/+11
Change-Id: I580a500edcf4812e570be586890abef746083a8c Reviewed-on: https://gerrit.osmocom.org/74 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>