aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm
AgeCommit message (Collapse)AuthorFilesLines
2012-12-26lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann1-2/+18
This was found while implementing handover on a sysmobts. When we receive a channel release request for a channel that was never really activated (set_lapdm_context() was not called) we segfault in lapd_recv_dlsap(). We now return early with -EINVAL in rslms_rx_rll() if we receive a message that assumes set_lapdm_context() was already called. These are: * RSL_MT_UNIT_DATA_REQ * RSL_MT_DATA_REQ * RSL_MT_SUSP_REQ * RSL_MT_REL_REQ A test case was added to trigger the issue.
2012-12-11build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut1-2/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-11gsm: Add method to find ARFCN based on frequencySylvain Munaut2-45/+66
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-06sms: Print 'network' or 'mobile' when creating the SMC/SMRHolger Hans Peter Freyther2-3/+4
2012-12-06gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut1-2/+6
Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-11-26lapd: Use LOGL_ERROR for messgaes that are wrong in the given contextHolger Hans Peter Freyther1-14/+14
Log message that are either too big or have the C/R bit set as error.
2012-11-22misc: Use static const struct for LAPD and AbisHolger Hans Peter Freyther2-2/+2
2012-11-22sms: Mark the state dispatch table as static constHolger Hans Peter Freyther2-4/+4
GCC 4.7.2 was already smart enough to see that the table is const so there is no change in the generated assembly code. For some reason the dispatch is still going through one relocation.
2012-11-22sms: Fix typos in the comments and log messages.Holger Hans Peter Freyther2-5/+5
2012-11-22smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther1-31/+68
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-30/+60
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: Fix a typo in the smc codeHolger Hans Peter Freyther1-1/+1
2012-11-11smc: Print the current state of the SMSHolger Hans Peter Freyther1-1/+3
When the connection may not released print the name of the current state to ease with debugging and verification that this is not a valid state transition.
2012-11-11sms: Remove the commented out code that was the default in OpenBSCHolger Hans Peter Freyther1-1/+0
This code got copied from OpenBSC and we used the network specific and private numbering plan. Remove it as it can be easily set.
2012-11-11sms: Reduce the logging level to debugHolger Hans Peter Freyther1-3/+3
<001c> gsm0411_smr.c:175 TX: MNSMS-REL-REQ adds little value so I am reducing it to a debug statement.
2012-11-05GSM48: Avoid unaligned access in gsm48_construct_raAndreas Eversberg1-1/+3
This avoids an unaligned access on platforms that don't support them, such as ARMv4/ARMv5.
2012-10-27Do not use --version-script linker flag on OSXTobias Engel1-1/+1
Add a check to not use --version-script linker flag if compiled on OSX since it doesn't exist there
2012-09-21gsm_utils.c: in 7bit decoding, first check if the last character was an ↵Nico Golde1-5/+5
extension character before doing anything else
2012-09-20gsm_utils: Fix up coding style in previous patchHarald Welte1-2/+2
'if' is not a function, so we have space before parenthesis.
2012-09-20gsm_utils.c: cleanup + do not use dynamic memory when decoding 7bit messagesNico Golde1-14/+13
2012-09-11gsm: Address compiler warning about unused variable 'z'Holger Hans Peter Freyther1-3/+4
The comment explains why we don't care about the content of z, stop storing it. gsm_utils.c: In function 'gsm_7bit_encode': gsm_utils.c:253:13: warning: variable 'z' set but not used [-Wunused-but-set-variable]
2012-08-29libosmogsm: Back-port SMS related fixes from openbscHarald Welte1-1/+10
This was fixed in 9c3dc90d16a40789081c84e46620f4d66689fec1 of openbsc.git, after the sms code had been migrated here: introduce HAVE_TM_GMTOFF_IN_TM Not all architectures have the tm.tm_gmtoff member. This fixes cygwin builds.
2012-08-24GSM 04.08: Add support for parsing CSD related bearer capabilitiesHarald Welte1-5/+90
Also adds a test case for both encoder and decoder of this IE
2012-08-24gsm48_ie: annotate functions with chapter numbers from 04.08 specHarald Welte1-29/+29
2012-08-03increaes libosmocgsm LIBVERSIN due to gsm_decode_lai() change0.5.3Harald Welte1-1/+1
2012-07-18authentication: More documentationHarald Welte1-3/+54
2012-07-14TLV: add new "vTvLV" type for GANHarald Welte2-1/+22
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-13gsm48_decode_lai(): return real integers for mcc/mnc, not hex!Harald Welte1-6/+13
This is to make it orthogonal with gsm48_encode_lai()
2012-07-13add gsm48_decode_lai() to map fileHarald Welte1-0/+1
2012-07-13import gsm48_decode_lai() function from osmocom-bb/mobile sysinfo.cHarald Welte1-0/+14
2012-06-30build: use LT_INIT(pic-only) instead of forcing -fPIC.0.5.2Diego Elio Pettenò1-1/+1
This actually allows for the user to override the decision and at the same time supports compilers that might not be able to use -fPIC at all. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-24ganc: add value_strings for GAN message type and protocol discriminatorHarald Welte3-1/+81
2012-04-26LAPDm: Ensure there is no payload in DISC frames0.4.2Harald Welte1-1/+6
When we send DISC frames (especially generated from RSL), we don't want any remaining bytes from the RSL message showing up as bogus DISC payload.
2012-04-18doc: Fix the Doxygen section endingsSylvain Munaut5-5/+5
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-05libosmogsm: Add tvlv_att_def to exported symbolsHarald Welte1-0/+1
2012-04-05misc: Fix make distcheck, add the new libosmogsm.map file to the tarballHolger Hans Peter Freyther1-0/+2
2012-04-05lapdm: fix RSL message format in RLL ERROR INDICATIONHarald Welte1-1/+0
In rsl_rll_error() we don't need to re-set the msg->l2h as that would corrupt the message. The recipient would interpret any cause value as 0.
2012-04-04libosmogsm: Introduce explicit list of exported symbolsHarald Welte3-3/+233
There is now a "libosmogsm.map" file containing an explicit list of to-be-exported symbols. This should prevent us from leaking non-static symbols into the global namespace. A similar scheme should be adopted by all other osmocom libraries
2012-03-21auth_milenage/osmo-auc-gen: compute OPC in case only OP is knownHarald Welte1-2/+13
2012-03-21milenage: Add function to compute OPC from OP and KHarald Welte2-0/+17
2012-03-16lapd: Remove unused variable t200_start in lapd_acknowledge.Holger Hans Peter Freyther1-2/+1
lapd_core.c: In function 'lapd_acknowledge': lapd_core.c:710:38: warning: variable 't200_start' set but not used [-Wunused-but-set-variable]
2012-03-02gsm/a5: Rewrite equation doc with proper numberingSylvain Munaut1-4/+4
No idea where I copied the original from but here we use the other notation. (matches wikipedia and sources) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-01-26GSM 08.08: change gsm0808_create_classmark_update() prototypeHarald Welte1-3/+6
The caller explicitly specifies CM2 and CM3, rather than one blob containing both.
2012-01-26GSM 08.08: Cleanup the code, remove lots of magic hard-coded numbersHarald Welte1-116/+60
Rather than manually hard-coding numbers and using byte-arrays, we use the msgb_*_{push,put}() function family of libosmocore/libosmogsm. This is currently untested.
2012-01-12lapdm: Make sure that the msgb_l3len(msg) == length...Holger Hans Peter Freyther1-4/+4
This code should not play with the internals of the msgb like this, this code got introduced in af48bed55607931307 and is breaking the osmo-bts usecase of forwarding an RSL message. Add a test case that fails without the new code. I would prefer if we could get rid of the manipulating the msgb like this, it is prone to errors like this one.
2012-01-12lapd: Warn if someone attempts to send an empty messageHolger Hans Peter Freyther1-0/+7
DATA REQ with a msgb_l3len(msg) == 0 message does not make any sense, log an error and return immediately before attempting to send an empty I frame in lapd_send_i.
2012-01-12lapd: Mention the L3 size of the payload being sentHolger Hans Peter Freyther1-1/+2
2012-01-10libosmocore/lapd: Fixed handling of sequence errors at lapd_core.cAndreas.Eversberg1-3/+21
If a sequence error is received, the N(R) variable must still be used to acknowledge previously transmitted frames. If there are two subsequent sequence errors received, ignore it. (Ignore every second subsequent error.) This happens if our reply with the REJ is too slow, so the remote gets a T200 timeout and sends another frame with a sequence error. Test showed that replying with two subsequent REJ messages could the remote L2 process to abort. Replying too slow shouldn't happen, but may happen over serial link between BB and LAPD. Written-by: Andreas.Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-12-14Fix generation of GPRS Routing Area in case of 3-digit MNCGus Bourg1-1/+1
This fixes a simple typo that causes erroneous GPRS Routing Area encoding if you use 3-digit MNCs.
2011-12-07auth_core: add missing string.h include to reduce warningsHarald Welte1-0/+1