| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* add functions to encode Global Call. Ref. from TS 29.205 as 3GPP TS
48.008 ยง3.2.2.115 information element
* add corresponding tests
Change-Id: I82ce0207dc8de50689a8806c6471ad7fbae6219d
|
|
|
|
|
|
|
|
| |
Add functions to encode and decode Global Call Reference as per
3GPP TS 29.205 Table B 2.1.9.1 add corresponding tests.
Change-Id: Iee95aa4e5c056645b6cb5667e4a067097d52dfbf
Related: OS#2487
|
|
|
|
|
|
|
| |
Otherwise struct osmo_stats_config is not defined and compiler fails.
Related: OS#3722
Change-Id: I037c3ca141ecee2d457e0a881a56e32ee24cec4d
|
|
|
|
|
|
|
|
| |
It's often handy to compare certain msgb layer to a given array and
print the position where they differ. Add simple pretty-printer and
corresponding L* wrappers.
Change-Id: I3bc95f2f5ab6e3f4b502647fb3e0aaaf1f7c4cf5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a standalone bcd-to-string conversion function with generic parameters.
Add a regression test in utils_test.c.
So far there is no single universal implementation that converts a BCD to a
string. I could only find gsm48_mi_to_string(), which also interprets
surrounding bytes, MI type and TMSI as non-BCD value.
The idea is to use this function from gsm48_mi_to_string() and similar
implementations in subsequent commits.
Root cause: in osmo-msc, I want to have an alternative MI-to-string function
for composing an FSM name, which needs the BCD part of gsm48_mi_to_string() but
not the TMSI part.
Change-Id: I86b09d37ceef33331c1a56046a5443127d6c6be0
|
|
|
|
|
|
|
| |
Counting list entires should not alter the list content: let's make this
obvious from type signature.
Change-Id: I414e67a3de733fab407161b3264d3b89070ba537
|
|
|
|
|
| |
Related: OS#3722
Change-Id: If466a64bd44dcb8ae8a9b7f82bc9c9435ba3e640
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment the all gsm0808 cause codes are encoded directly using the
tlv API directly to put a one byte TLV field. This works ok for most
situations where the cause code consists of a single byte. However,
gsm0808 specifies a two byte cause code model where cause codes may be
extended up to two bytes. Instead of implementing the encoding over and
over and again, let's rather have an encoder function we can call.
- Add an encoder function that can generate single byte and extended
cause codeds and makes the length decision automatically.
- Use only this function to append cause codes
Change-Id: I71d58fad89502a43532f60717ca022c15c73f8bb
|
|
|
|
|
|
|
|
|
| |
We already have some GSM29118 related definitions and functions in
libosmocore. Lets also add some functions to generate GSM29118 messages
(similar to those we have for GSM0808).
Change-Id: Ic87f8a771b87b52215d0a7451b67794557b80b8a
Related: OS#3615
|
|
|
|
|
|
|
|
| |
The specification defines a default port where the SGs interface should
be reachable. Lets add a define-constant for it.
Change-Id: Ia4b9f547dd980411d15b2691b7f535fa0463f0f1
Related: OS#3615
|
|
|
|
|
|
|
| |
there is a whitespace between the * and osmo_apn_to_str(). Lets
remove this.
Change-Id: I094e6eb08eacf2d6459c47a7370837601aa92925
|
|
|
|
|
|
|
|
|
| |
It's similar to osmo_sockaddr_to_str_and_uint() but does not require odd
typecasting for AF_INET case. Make osmo_sockaddr_to_str_and_uint() into
wrapper around new function and make sure to check for address family
before typecasting. Also use proper return type.
Change-Id: Ie384483124d407a960ab6732e6a7fd90554389d2
|
|
|
|
|
|
|
|
| |
The value string arrays in the header file (gsm_29_118.h) are not
declared as extern. Lets add it now.
Change-Id: Ib6c4cbea649f790fa4db1ed2fe2b7e76a60291b4
Related: OS#3615
|
|
|
|
|
|
|
| |
* use pointer to proper struct type for GCR
* update comments to be useful for doxygen
Change-Id: I8ccfbd0c146e462e599e5305520cc89602364ec3
|
|
|
|
|
|
|
|
|
| |
When adding complex TLV structures where length of V is not known in
advance it's handy to be able to simply add Tag and save the pointer to
the Length field so it can be updated once entire Value is added and its
length is known.
Change-Id: I8dc1e4880352833a0a49c1dd0d7cb4148ac43aff
|
|
|
|
|
|
|
| |
We always use id = 0 when sending TRAP messages. Let's make this more
obvious by introducing appropriate define.
Change-Id: I33d7d4c6a1885a75a85d6f2f017430e0860b4126
|
|
|
|
|
|
|
|
|
| |
* add missing L1 and L4 hexdump
* add msgb_l4() for consistency and convert msgb_sms() into simple alias
Those will be used in follow-up patches for msgb debug/test helpers.
Change-Id: I8d6dd1b1ff3aa98a452711c692ca7dee0449203b
|
|
|
|
|
|
|
|
| |
We currently have no generator function that can generate BSSMAP
HANDOVER PERFORMED messages. Lets add function for this.
Change-Id: I825106858bd89afc9837811b8fed2e8accc82441
Related: OS#3645
|
|
|
|
|
|
|
| |
This will be reused be several tests related to TS 48.008 and TS 29.205
in follow-up commits.
Change-Id: I4d8cc05b8df8e70c1f6257e53ae3acec7901681f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ARFCNs are values in well defined ranges. Until this patch, ARFCNs not
belonging to any band were blindly assigned to DCS1800 by
gsm_arfcn2band, causing unnoticed bugs and misconfigurations in
osmo-bsc.
Previous API gsm_arfcn2band cannot accomodate this kind of check easily,
so let's deprecate it to tell people to use a new API gsm_arfcn2band_rc
which performs this kind of checks and allows callers to log failures,
misconfigurations, etc.
At the same time, modify implementation of gsm_arfcn2band to abort if an
invalid ARFCN is passed, this way users of this API can notice they are
passing wrong data to it that most probably will produce unexpected
results.
Related: OS#3063
Change-Id: I780d452dcebce385469e32ef2fd844df6033393a
|
|
|
|
|
|
|
|
|
|
|
| |
It's convenient to hold all LCLS-related parameters from 3GPP TS 48.008
in a single structure.
This will be used in follow-up patch handling Assignment Request with
extended parameters as well as corresponding BSC code working with LCLS.
Change-Id: I4b873f9a3c5a5d33b438382971b3d92e40d48d62
Related: OS#2487
|
|
|
|
|
|
|
| |
These are actually parts of the struct in big endian order, which will soon be
done automatically by struct_endianess.py.
Change-Id: I9bc694f10fa9cef0bb7fc791bb40e7602459b16b
|
|
|
|
|
|
|
|
| |
That's necessary for 'struct tlv_parsed' definition although lack of it
does not cause build failure in libosmocore for me but does so for
osmo-bsc.
Change-Id: I3b2d3955d02b07dc7ec5e9f0c66cc477196703ed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add function to generate cipher mode reject with extended (2-byte)
Cause IE
* add function to get (extended) Cause value
* add corresponding (extended cause) test
* update existing (non-extended cause) test
* use enum as a parameter for existing non-extended version to make
interface more unified
Change-Id: Id5509b94a18180a44f45300caaa02b843c166fa3
Related: OS#3187
|
|
|
|
|
|
|
|
|
|
| |
The msgb_wrap_with_TL() is generally useful so it make sense to make it
public to facilitate code re-use.
Other helpers can be implemented as trivial wrappers over existing tlv.h
functions. Update headers and code accordingly.
Change-Id: I37e91d031fba28cf1c6735b8069b0265746f55e6
|
|
|
|
|
|
|
|
| |
Add values indicating that LCLS control/config/status value has not been
received yet.
Change-Id: I52dc6a52f5ee043ed2c1625ffecfd495e3c746b1
Related: OS#2487
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add Class definitions
* add helper to check for extended bit
* add helper to get Cause's Class
* use enum in gsm0808_cause_name() and gsm0808_create_cipher_reject() to
avoid confusion between class and cause
* update gsm0808_create_cipher_reject() comments
Change-Id: I31b31dfc22eb4b6b07089e1255246ac458125340
Related: OS#3187
|
|
|
|
| |
Change-Id: Ib228368901ce90a02a5664f2510593371c7d29cd
|
|
|
|
|
|
|
|
| |
The value strings for the SGSAP IEI are missing, lets add a set of value
strings and a function to retrieve them.
Change-Id: I2787303174f74ffba86675bce2c12f680d8ea708
Related: OS#3615
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a typo that prevents building on ppc64 (Power8, Big Endian).
Tested with gcc version: 8.2.1+r265487
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -DBUILDING_LIBOSMOCORE -Wall -Wall -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DBUILDING_LIBOSMOCORE -Wall -c -o panic.lo panic.c
In file included from ../include/osmocom/gsm/rsl.h:6,
from gsmtap_util.c:37:
../include/osmocom/gsm/protocol/gsm_08_58.h:60:4: error: expected specifier-qualifier-list before 'sapi'
sapi:3;
^~~~
Change-Id: I4a40fc68cb6dfdfadfcc34213c4ecdabbbc356f2
|
|
|
|
|
|
|
|
|
| |
The header file gsm_29_118.h is defining variables of type struct
value_string, which is declared in core/utils.h. We should add an
include to utils.h to prevent confusion when the header is used.
Change-Id: I9f9bb62d29cd068820ad5aa677717bd448de3f4a
Related: OS#3615
|
|
|
|
|
|
|
|
|
|
| |
There is already a group of similar functions for L1, L2 and L3,
but L4 was missing. The L4 is usually used for parsing of complex
L3 messages, such as SS/USSD and SMS.
This change introduces a similar halper for L4.
Change-Id: I755f2d654bbdad2a8b4f94df9023bdd370b07ae6
|
|
|
|
| |
Change-Id: Id71d4b45e2b9f42da5e23e709ad97d4d0abfc3d9
|
|
|
|
|
|
|
|
|
| |
The function that generates the clear command takes a parameter
"reason", which is the cause code. Lets give it the name "cause" to have
a coherent naming scheme that matches the other functions and the 3gpp
specs.
Change-Id: I7b6c15e8fa8db13deef5041095944ca1c58fb99f
|
|
|
|
|
|
|
| |
osmo_gen_mme_group_domain(), osmo_gen_mme_group_domain() and
osmo_gen_home_network_domain()
Change-Id: Ia882d9db05ec0037e593aeebea21bc31adb680bb
|
|
|
|
|
|
|
|
|
|
| |
Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.
Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
|
|
|
|
| |
Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
|
|
|
|
|
|
|
|
|
|
|
|
| |
It will allow to make code handling chan_nr values more easier to read
and less prone to errors.
union is used to be able to get the full octet in
case we need to pass it somewhere else or encode it.
An extra union is used in struct abis_rsl_common_hdr and others to allow
using fields directly while keeping API compatibility.
Change-Id: Icd6822021207270a00106c50f8ca6b93c1250df9
|
|
|
|
|
|
|
|
|
|
|
|
| |
It will allow to make code handling link_id values more easier to read
and less prone to errors.
union is used to be able to get the full octet in
case we need to pass it somewhere else or encode it.
An extra union is used in struct abis_rsl_common_hdr to allow using fields
directly while keeping API compatibility.
Change-Id: Ibd75a493bcfdf46c028ea466867d0c0d83d46343
|
|
|
|
| |
Change-Id: I2e710141ee90ddc8b5336d5f81e99bd918d10106
|
|
|
|
|
|
|
|
| |
Wireshark GSMTAP dissector has LTE NAS subtypes for plain NAS messages
and NAS messages with security header. This commit adds definition for
these subtypes.
Change-Id: I49d15fb13299c1bcbe0fb7e50bf222294c7a49ef
|
|
|
|
|
|
|
| |
Later release of 3GPP TS 36.331 added new LTE RRC channels. This commit
additionally defines LTE RRC message types existing in Release V15.3.0.
Change-Id: Ifa48b2227be15af04c9a4702d2025abcc660f0df
|
|
|
|
|
|
|
|
| |
Add a function to convert S0-S15 bits to struct gsm48_multi_rate_conf,
which hold the codec settings for AMR.
Change-Id: I973736273c236eee84decf15868190e339c3fed4
Related: OS#3548
|
|
|
|
|
|
|
| |
The enum gsm48_chan_mode has value strings, but no function to retrieve
those strings. Lets add one.
Change-Id: If715705e1ebdfcfdfae1c2099932f7bb8b3861a7
|
|
|
|
|
|
|
|
|
|
| |
Since the CMD_ATTR_* flags are intended to be used in bitwise
operations, let's assign them proper values. Adding a new flag
(e.g. CMD_ATTR_FOO_BAR) could actually result in assigning 0x03
instead of expected (0x01 << 2).
Change-Id: I3b1badef830f7e6436a67673b5709ec33c060c68
Related: OS#3584
|
|
|
|
|
|
|
| |
parameter cfg in gsm0808_sc_cfg_from_gsm48_mr_cfg() is used read only.
Lets add a const to make this clear to the compiler.
Change-Id: I31e8d273b070b0afc446a298299d4f502d6c396b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a function to convert struct gsm48_multi_rate_conf, which holds the
codec settings for AMR, to S0-S15 bit representation as defined in
3GPP TS 48.008 3.2.2.49
This resurrects change-id I4e656731b16621736c7a2f4e64d9ce63b1064e98
which was reverted in I9e0d405e303ed86d23703ca6362e958dddb2f861
due to gsm0808_test failing.
The test failure is fixed by properly clearing the struct
gsm48_multirate_cfg prior to running tests (add memset(0)).
Change-Id: Ia782e21c206c15e840226d79b4209d13658ee916
Related: OS#3548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2fd4fe6aa109c8df50baac465f0393a303a64dd2.
As shown in https://jenkins.osmocom.org/jenkins/view/master/job/master-libosmocore/475/a2=default,a3=default,arch=amd64,label=osmocom-master-debian9/console
This commit breaks gsm0808_test with:
stderr:
--- expout 2018-09-16 22:37:31.382280438 +0200
+++ /n/s/dev/make/libosmocore/tests/testsuite.dir/at-groups/21/stdout 2018-09-16 22:37:31.426281372 +0200
@@ -78,9 +78,9 @@
Input:
m4_75= 0 smod= 0
m5_15= 0 spare= 0
- m5_90= 0 icmi= 0
+ m5_90= 0 icmi= 1
m6_70= 0 nscb= 0
- m7_40= 0 ver= 0
+ m7_40= 0 ver= 6
m7_95= 0
m10_2= 0
m12_2= 0
@@ -92,9 +92,9 @@
Input:
m4_75= 1 smod= 0
m5_15= 0 spare= 0
- m5_90= 0 icmi= 0
+ m5_90= 0 icmi= 1
m6_70= 0 nscb= 0
- m7_40= 0 ver= 0
+ m7_40= 0 ver= 6
m7_95= 0
m10_2= 0
m12_2= 0
@@ -106,9 +106,9 @@
Input:
m4_75= 0 smod= 0
m5_15= 1 spare= 0
- m5_90= 0 icmi= 0
+ m5_90= 0 icmi= 1
[...]
Change-Id: I9e0d405e303ed86d23703ca6362e958dddb2f861
|
|
|
|
|
|
|
|
|
| |
Add a function to convert struct gsm48_multi_rate_conf, which holds the
codec settings for AMR, to S0-S15 bit representation as defined in
3GPP TS 48.008 3.2.2.49
Change-Id: I4e656731b16621736c7a2f4e64d9ce63b1064e98
Related: OS#3548
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
3GPP TS 48.008 chapter 3.2.2.103 states that the configuration bits of
OFR_AMR_WB are coded as follows:
"S0, S2, S4 indicates the supported Codec Configurations. S1, S3, S5, S6,
S7 are reserved and coded with zeroes."
The current default setting of 0x3F violates this requirement. Lets set
the "forbidden" settings zu zero and keep only the allowed ones.
Change-Id: I4a481def59e9c98cfdcafc2b80c0ac7df0c14130
|