| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94
Reviewed-on: https://gerrit.osmocom.org/114
Tested-by: Jenkins Builder
Reviewed-by: Neels Hofmeyr <nhofmeyr@sysmocom.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a "flag" day change. Old OpenBSC break with new libosmocore
because suddenly there is the 0x in front. I am afraid we need to
find a better solution here. I think we will need to create a
gsm48_mi_to_string variant that takes a mode parameter to enable the
TMSI mode and deprecate the old method.
Right now we should not break old versions of OpenBSC.
This reverts commit 78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4.
Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b
Reviewed-on: https://gerrit.osmocom.org/86
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <holger@freyther.de>
|
|
|
|
|
|
|
| |
Change-Id: I580a500edcf4812e570be586890abef746083a8c
Reviewed-on: https://gerrit.osmocom.org/74
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <holger@freyther.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we traditionally displayed a TMSI in its integer
representation, which is quite unusual in the telecom world.
A TMSI is normally printed as a series of 8 hex digits.
Review at https://gerrit.osmocom.org/57/
Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2
Reviewed-on: https://gerrit.osmocom.org/57
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Reviewed-by: Holger Freyther <holger@freyther.de>
|
|
|
|
|
|
|
|
|
|
|
| |
It assembles RSL Uplink Measurement IE according to 3GPP TS 08.58
ยง9.3.25. The function is based on lchan_build_rsl_ul_meas() from OsmoBTS
but optionally includes DTX information.
Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e
Reviewed-on: https://gerrit.osmocom.org/44
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rename field of struct gsm48_cell_options to better match the spec
* add comments with spec references
* add function for setting DTX in cell options struct
* add necessary enum type
Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54
Reviewed-on: https://gerrit.osmocom.org/39
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Tested-by: Jenkins Builder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add various missing \returns doxygen entries.
In osmo_auth_3g_from_2g(), also adjust two comment-closing instances to
match common style and add a period to end a sentence.
(The recent addition of osmo_auth_3g_from_2g() raised my attention, and I added
more return value docs while at it.)
Change-Id: Iea71eb666bc061acb6b14215f398bd38d17b3ad3
Reviewed-on: https://gerrit.osmocom.org/33
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <holger@freyther.de>
|
|
|
|
|
|
| |
In the autentication re-sync case, we need not only the AUTS from
the MS/UE, but also the RAND that we sent as part of the failed
authentication challenge.
|
|
|
|
|
| |
We're starting to use GSUP for circuit-switched (CS) plane, so we need
to differentiate the two planes somehow from each other.
|
|
|
|
|
|
|
| |
Move those routines from OpenBSC to libosmogsm, so they can be
re-used from other programs. I think it was a mistake to add them only
inside the openbsc repository in the first place. We need to pay more
attention to this in the future.
|
| |
|
|
|
|
|
| |
These routines have nothing to do with specifically the BSC, so import
them to the TLV parser we keep in libosmogsm.
|
|
|
|
|
| |
This adds and improves doxygen API descriptions all over libosmocore,
reducing the 'white spots' that don't have any documentation.
|
|
|
|
|
|
| |
The definitions in this header file (and associated strings in the
c file) are generic about the GPRS Layer3 signalling protocols, and
thus should be part of the library.
|
|
|
|
|
| |
This is e.g. quite useful to call at the end of test code, in order to
show that all memory allocated actually is released before exit().
|
|
|
|
|
| |
This function performs the C5+C4 conversion to derive UMTS key
material from a 2G-only subscriber.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script does not work with python3:
$ python3 utils/conv_gen.py
File "utils/conv_gen.py", line 124
def _print_term(self, fi, num_states, pack = False):
Second there is no 'python' on FreeBSD and one needs to select
the major version to use.
GEN conv_cs3_gen.c
GEN conv_xcch_gen.c
GEN conv_cs2_gen.c
python: not found
python: not found
python: not found
By using python2 we solve both issues. On Debian python2 is located
inside the python-minimal package.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add python utility to generate .c code with convolutional
encoder/decoder based on polynomial description of the code. If argument
given it'll be interpreted as intended output directory, otherwise
current working directory is used.
Codes for *CCH, CS2/3 and TCH/AFS are generated. Corresponding manual
implementations are removed from tests. This introduce build-time
dependency on python.
The main work for this patch was generously contributed by Sylvain
Munaut.
Fixes: OS#1629
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend the u8 to u32 before going to shift it.
Fixes:
milenage/aes-internal.c:799:4: runtime error: left shift of 128 by 24 places cannot be represented in type 'int'
#0 0x7f84e9fe86a2 in rijndaelKeySetupEnc (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0xfa6a2)
#1 0x7f84e9febad8 in aes_encrypt_init (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0xfdad8)
#2 0x7f84e9fe7d14 in aes_128_encrypt_block (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0xf9d14)
#3 0x7f84e9febe7d in milenage_f1 (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0xfde7d)
#4 0x7f84e9fee2ce in milenage_generate (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0x1002ce)
#5 0x7f84e9fe76d7 in milenage_gen_vec (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0xf96d7)
#6 0x7f84e9fe6c08 in osmo_auth_gen_vec (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/src/gsm/.libs/libosmogsm.so.5+0xf8c08)
#7 0x401441 in main (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/tests/auth/.libs/lt-milenage_test+0x401441)
#8 0x7f84e8e33a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
#9 0x400e58 in _start (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/libosmocore/tests/auth/.libs/lt-milenage_test+0x400e58)
|
|
|
|
|
|
|
|
| |
gprs_bssgp.c:461:9: runtime error: load of misaligned address
0x62100001a66b for type 'uint32_t', which requires 4 byte alignment
gprs_ns.c:937:16: runtime error: load of misaligned address
0x61d00002a97f for type 'uint16_t', which requires 2 byte alignment
|
|
|
|
|
| |
Add convenience function to append range1024 encoded data (see 3GPP TS
44.018 Annex J) to a given bitvec.
|
|
|
|
|
| |
Mark function as deprecated to discourage its usage: people should use
generic API in osmocom/crypt/auth.h
|
|
|
|
|
| |
Mark the functions as deprecated to discourage their use: people should
use unified osmo_a5 which supports all the A5/1-4 ciphers.
|
|
|
|
| |
Use generic functions covered by testsuit for SQN calculations.
|
|
|
|
|
| |
Update internal API (for GPRS cipher implementors): make it compliant
with ETSI TS 155.22. External API left untouched.
|
|
|
|
|
|
| |
This function returns the number of bits necessary to pack osmo_earfcn
into Repeated E-UTRAN Neighbour Cells IE (3GPP TS 44.018 Table
10.5.2.33b.1).
|
| |
|
|
|
|
|
| |
Move functions for conversion between soft and unpacked bits to main
library as they are generally useful.
|
|
|
|
| |
[hfreyther: To be used by osmo-pcu]
|
|
|
|
| |
Fixes the build failure with extended tests enabled.
|
|
|
|
|
| |
It's useful for debugging and is similar to existing reset command for
nsvc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To integrate with an external event loop (in this case glib) we
need to allow an application to get a filled out fd_set and then
dispatch it. osmo_fds and maxfds are static and I decided to keep
it that way and instead create two routines to fill the fdset and
then one to dispatch the result.
The public header file does not include sys/select.h and we can
compile the library without select, so I didn't want to require
having to include this file, and used void * for the parameter.
Mark the routines as inline to avoid a call from the select
function. I have confirmed that inlining has an effect on x86
using Debian's gcc-4.9.2-10 compiler
|
|
|
|
| |
This can be used with get_value_string() to improve debugging output.
|
| |
|
|
|
|
|
|
| |
This function can be used to obtain the osmo_fd corresponding to a given
fd. The latter can be useful when integrating libosmocore main loop
with other libraries.
|
|
|
|
|
| |
The tables permit code to determine the APDU class of an APDU
based on it APDU/TPDU header (CLA/INS/P1/P2/P3).
|
|
|
|
|
| |
Print string representation of Cause IE and PDU type instead of
numerical value.
|
| |
|
|
|
|
| |
This reverts commit f451ce66eb8206bad1078849723edcb209632834.
|
|
|
|
| |
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
|
|
|
|
|
|
| |
Add structure representing group of EARFCNs with common priority,
threshold etc.
Add functions to populate this structure.
|
|
|
|
|
|
|
|
|
| |
Add function which adds specified number of bits from each element of
array to the bit vector prefixing each addition with one and finishing
entire sequence with adding 0. This is very common patter for various
repetitive data structures described with CSN.1 in 3GPP standards.
Corresponding test vectors and doxygen headers are added too.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
| |
they return an osim_file_desc, and not an osim_file, so fix the naming
|
|
|
|
|
| |
We don't always want to look-up by name, but the latter is the only
implemented 'find' function so far. Let's change that.
|
|
|
|
|
| |
The variable is not used anymore as the decision is done in the
newly added check_log_to_target method.
|
|
|
|
|
|
| |
There doesn't seem to be a reason not to check the filter. Update
and extend the test. Currently the filter function will be called
once for the log check and once for the output of it.
|
|
|
|
|
|
| |
Extract the mapping of the subsystem number and the checking for
the loglevel to a inline method that is shared between the new
and old.
|