Commit Graph

1111 Commits

Author SHA1 Message Date
Max c01cff1a50 Constify llist_count() parameter
Counting list entires should not alter the list content: let's make this
obvious from type signature.

Change-Id: I414e67a3de733fab407161b3264d3b89070ba537
2018-12-10 13:42:08 +00:00
Pau Espin 2ca8cebac6 timer: Fix clockid_t undefined on MacOS < 10.12
Related: OS#3722
Change-Id: If466a64bd44dcb8ae8a9b7f82bc9c9435ba3e640
2018-12-10 11:02:16 +01:00
Philipp Maier 4f4905fac5 gsm0808: add encoder for cause codes and use it
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
2018-12-08 19:29:34 +00:00
Philipp Maier e190e032d9 gsm29118: add generator functions for GSM29118 messages
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
2018-12-07 18:35:10 +01:00
Philipp Maier f98c78ec4a gsm_29_118.h: Add constant for default port
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
2018-12-07 12:03:44 +00:00
Philipp Maier 8a942d27b6 cosmetic apn: correct whitespace error
there is a whitespace between the * and osmo_apn_to_str(). Lets
remove this.

Change-Id: I094e6eb08eacf2d6459c47a7370837601aa92925
2018-12-07 11:53:23 +00:00
Max 9d7a247da4 Add osmo_sockaddr_in_to_str_and_uint()
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
2018-12-07 10:33:29 +00:00
Philipp Maier 5986a3d89d gsm_29_118: add missing extern for struct value_string decl.
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
2018-12-05 19:35:47 +00:00
Max 14f24c678f LCLS: update osmo_lcls struct
* use pointer to proper struct type for GCR
* update comments to be useful for doxygen

Change-Id: I8ccfbd0c146e462e599e5305520cc89602364ec3
2018-12-04 10:26:42 +01:00
Max d82070c383 Add msgb_tl_put() helper
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
2018-12-04 10:26:42 +01:00
Max 30b2e348df ctrl: use #define for TRAP id
We always use id = 0 when sending TRAP messages. Let's make this more
obvious by introducing appropriate define.

Change-Id: I33d7d4c6a1885a75a85d6f2f017430e0860b4126
2018-12-03 21:42:51 +00:00
Max cb02a391cd Update msgb Lx helpers
* 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
2018-12-03 16:11:58 +00:00
Philipp Maier 225bdf4779 gsm0808: add message generator for BSSMAP HANDOVER PERFORMED
We currently have no generator function that can generate BSSMAP
HANDOVER PERFORMED messages. Lets add function for this.

Change-Id: I825106858bd89afc9837811b8fed2e8accc82441
Related: OS#3645
2018-12-03 13:54:31 +00:00
Max f69aa9cb6a Move BSSMAP_MSG_* defines to header file
This will be reused be several tests related to TS 48.008 and TS 29.205
in follow-up commits.

Change-Id: I4d8cc05b8df8e70c1f6257e53ae3acec7901681f
2018-11-30 17:45:57 +01:00
Pau Espin c8772517d9 gsm: Deprecate buggy gsm_arfcn2band API and introduce gsm_arfcn2band_rc
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
2018-11-20 16:56:28 +00:00
Max 738782467f LCLS: add 48.008 parameter structure
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
2018-11-20 12:32:56 +00:00
Neels Hofmeyr 5a25c3ec4d gsm_44_318.h: remove #if 0 from struct gan_cch_desc_ie
These are actually parts of the struct in big endian order, which will soon be
done automatically by struct_endianess.py.

Change-Id: I9bc694f10fa9cef0bb7fc791bb40e7602459b16b
2018-11-19 14:38:45 +00:00
Max adc4172fe3 Add missing header include
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
2018-11-19 10:44:55 +01:00
Max ed651d2485 Support cipher mode reject with extended cause
* 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
2018-11-19 05:52:28 +00:00
Max 84fb5bb6a0 Move msgb_push helpers to public header
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
2018-11-19 05:47:25 +00:00
Max 961db7c270 Update GSM0808_LCLS enums
Add values indicating that LCLS control/config/status value has not been
received yet.

Change-Id: I52dc6a52f5ee043ed2c1625ffecfd495e3c746b1
Related: OS#2487
2018-11-18 20:20:48 +00:00
Max aa93463053 Update 3GPP TS 08.08 Cause handling
* 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
2018-11-18 20:14:06 +00:00
Max c0d1de36f3 Add helper wrapper for BSSAP TLV parsing
Change-Id: Ib228368901ce90a02a5664f2510593371c7d29cd
2018-11-18 20:13:15 +00:00
Philipp Maier 086b345414 gsm29118: add value strings for SGSAP IEI
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
2018-11-16 17:42:38 +01:00
Martin Hauke e63b887358 gsm/protocol/gsm_08_58.h: Fix typo
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
2018-11-15 14:53:13 +01:00
Philipp Maier 534a4b2897 gsm_29_118: add missing include to header file
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
2018-11-07 11:35:21 +00:00
Vadim Yanitskiy e521edefda core/msgb.h: introduce msgb_l4len() helper
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
2018-11-07 03:58:10 +07:00
Vadim Yanitskiy 5a7b465b09 gsm/gsup.h: cosmetic: use tab for comment alignment
Change-Id: Id71d4b45e2b9f42da5e23e709ad97d4d0abfc3d9
2018-11-06 18:24:49 +07:00
Philipp Maier 1a146c89e2 gsm0808: cosmetic: rename parameter "reason" to "cause"
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
2018-10-30 09:36:49 +01:00
Harald Welte de1da35d51 gsm23003: Add MME domain name related helper functions
osmo_gen_mme_group_domain(), osmo_gen_mme_group_domain() and
osmo_gen_home_network_domain()

Change-Id: Ia882d9db05ec0037e593aeebea21bc31adb680bb
2018-10-28 14:16:18 +01:00
Oliver Smith 7acd5d0394 add osmo_sock_get_{local,remote}_ip{,_port}()
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
2018-10-26 17:54:16 +00:00
Harald Welte 6721144c80 SGsAP protocol definitions (header + C file)
Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
2018-10-21 12:35:34 +00:00
Pau Espin fb97e72e52 gsm_08_58.h: Introduce struct abis_rsl_chan_nr
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
2018-10-21 12:25:13 +00:00
Pau Espin 4290803d89 gsm_08_58.h: Introduce struct abis_rsl_link_id
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
2018-10-10 20:43:25 +00:00
Shinjo Park 0903fce28b GSMTAP: fix typos in comments
Change-Id: I2e710141ee90ddc8b5336d5f81e99bd918d10106
2018-10-07 20:25:06 +02:00
Shinjo Park f589cbbdee GSMTAP: add definitions for LTE NAS subtypes
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
2018-10-07 20:23:32 +02:00
Shinjo Park d741b78315 GSMTAP: add definitions for new LTE RRC channels
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
2018-10-07 20:20:32 +02:00
Philipp Maier 8515d035ae gsm0808: add function to convert AMR S15-S0 to gsm0408 settings
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
2018-09-25 15:32:29 +00:00
Philipp Maier b066305016 gsm_utils: add function to get value strings for gsm48_chan_mode
The enum gsm48_chan_mode has value strings, but no function to retrieve
those strings. Lets add one.

Change-Id: If715705e1ebdfcfdfae1c2099932f7bb8b3861a7
2018-09-25 13:07:45 +02:00
Vadim Yanitskiy e65c8bad46 vty/command.h: document and prettify CMD_ATTR_* flags
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
2018-09-24 13:02:07 +07:00
Philipp Maier 369015c535 gsm0808_utils: constify parameter
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
2018-09-21 09:07:42 +02:00
Philipp Maier 5f2eb15074 gsm0808: add function to convert amr gsm0408 setings to gsm0808
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
2018-09-19 14:01:10 +00:00
Neels Hofmeyr dd8c73cc6d Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"
This reverts commit 2fd4fe6aa1.

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
2018-09-16 21:02:25 +00:00
Philipp Maier 2fd4fe6aa1 gsm0808: add function to convert amr gsm0408 setings to gsm0808
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
2018-09-14 16:24:10 +02:00
Philipp Maier 4b081b1d88 gsm0808: fix wrong codec defaults for OFR_AMR_WB
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
2018-09-14 09:14:08 +02:00
Neels Hofmeyr 098038ab18 logging vty: write: check logging levels validity
Change-Id: If683b1272ad2d5b402b91c52c496aa7975bc6315
2018-09-13 15:46:55 +00:00
Neels Hofmeyr ba0762d6cb logging vty: rewrite 'logging level' vty cmd generation
Completely drop the implementations of log_vty_command_{str,description}().
These functions have been public API once, marked as deprecated since
c65c5b4ea0 (March 2017). I considered to keep
them, or reduce them to useless stubs, but it is quite silly, really. These
functions are completely and utterly useless outside of libosmocore. Any
program linking these deserves to fail.

Re-implement vty logging level command gen, in logging_vty.c. logging.c is
simply the wrong place for that.

Introduce logging_internal.h to share logging definitions to logging_vty.c
without publishing as API.

Introduce static gen_logging_level_cmd_strs() to compose a list of category
arguments with their descriptions for VTY commands. Use osmo_talloc_asprintf()
instead of the previous error prone and chaotic strlen() counting method.

Do not dynamically generate log level arguments, just keep static strings. We
are super unlikely to ever change the log levels we have.

No changes in logging_vty_test.vty: proves that there is no functional change.

All of this, besides introducing basic sanity, is cosmetic preparation to be
able to re-use the generic command generation code for arbitrary commands with
category or level args (for deprecated and new keywords).

Rationale: I want to hide 'all' and 'everything' from the VTY command
documentation, by means of deprecating. I first tried to simply define a
deprecated 'logging level CAT everything' command:

  logging level (all|rsl|rr|...) (debug|info|notice|error|fatal)
  logging level CAT everything                   # <- deprecated and hidden

But unfortunately, command matching doesn't work as intended when the CAT
argument reflects a valid category; I want it to invoke the deprecated function
as soon as the 'everything' keyword follows, but it stays stuck to the "valid"
command when the category argument matches an explicit keyword in that list,
and will throw an error on the following 'everything' keyword. I.e.:

  logging level rsl everything
  % Unknown command  # <-- leads to config file parse error

  logging level unknown_string everything
  % Ignoring deprecated 'everything'  # <-- works only for invalid categories

So I need to define 'everything' separately, again with a list of each valid
category instead of a generic CAT arg.

Change-Id: I3b083f27e3d751ccec258880ae7676e9af959a63
2018-09-13 15:46:55 +00:00
Neels Hofmeyr 2c79d55934 gsm0808: implement BSSMAP Classmark Request
Related: OS#3043
Change-Id: I4a2e1d3923e33912579c4180aa1ff8e8f5abb7e7
2018-09-13 14:27:26 +00:00
Neels Hofmeyr 7c749893bf add osmo_str_tolower() and _toupper() with test
We already have osmo_str2lower() and osmo_str2upper(), but these lack:
* proper destination buffer bounds checking,
* ability to call directly as printf() argument.

Deprecate osmo_str2upper() and osmo_str2lower() because of missing bounds
checking.

Introduce osmo_str_tolower_buf(), osmo_str_toupper_buf() to provide
bounds-safe conversion, also able to safely convert a buffer in-place.

Introduce osmo_str_tolower(), osmo_str_toupper() that call the above _buf()
equivalents using a static buffer[128] and returning the resulting string
directly, convenient for direct printing. Possibly truncated but always safe.

Add unit tests to utils_test.c.

Replace all libosmocore uses of now deprecated osmo_str2lower().

Naming: the ctype.h API is called tolower() and toupper(), so just prepend
'osmo_str_' and don't separate 'to_lower'.

Change-Id: Ib0ee1206b9f31d7ba25c31f8008119ac55440797
2018-09-07 04:28:39 +02:00
Vadim Yanitskiy 5594430405 core/utils.h: move includes to the top
Having all inculdes listed in one place is a common good
practice, which prevents one from adding duplicates.

Change-Id: I3f52189d5e8f9afafc39525e95385a085f8f850a
2018-09-05 02:58:03 +07:00
Vadim Yanitskiy 80f4ff9368 core/utils.h: drop duplicate '<stdbool.h>' include
Change-Id: I0979ddda91c4c0aa080b714cf2a698d7634f5091
2018-09-05 02:57:25 +07:00
Harald Welte b99ed7ff18 Add RSPRO support to IPA and logging definitions
Change-Id: Iee79f5273f32cb9ce4bd7a984e7f0625542e776f
2018-09-03 14:21:54 +02:00
Keith Whyte 3cdaa8d525 Add CC_CAUSE value_string array
Adds a value_string array for GSM 04.08 Call Control
cause values

Change-Id: I296f208581ce2550805f9d96e20f7319e1199023
2018-09-02 12:33:54 +02:00
Neels Hofmeyr 77ae45d22f log: add 'last' option to 'logging print file'
Allow printing the source file information *after* the log information.

Add target->print_filename_pos, log_set_print_filename_pos() and enum
log_filename_pos, and the optional 'last' keyword to the 'logging print file'
vty command. (An enum in case we want to add other positions later.)

Rationale: on log lines, the logging context is usually printed first in the
logging text. Without the source file information, this logging context pretty
much aligns in an easily readable way. When adding the source file information,
each line's logging context info is shifted right by a pretty much random
amount and it is hard to spot recurring logging contexts.

One solution is to switch off source file info, of course, but that's not an
option when actively hacking on bugs and new features.

For example, it is unnecessarily hard to spot lchan FSM related log lines in
this osmo-bsc log snippet:

DRSL NOTICE mgw_endpoint_fsm.c:603 mgw-endpoint(conn0){WAIT_MGW_RESPONSE}: Freeing instance
DRSL NOTICE fsm.c:381 mgw-endpoint(conn0){WAIT_MGW_RESPONSE}: Deallocated
DMSC NOTICE mgw_endpoint_fsm.c:603 SUBSCR_CONN(conn0){CLEARING}: Received Event FORGET_MGW_ENDPOINT
DCHAN DEBUG lchan_rtp_fsm.c:741 lchan(0-0-1-TCH_F-0){WAIT_RLL_RTP_ESTABLISH}: Received Event LCHAN_EV_RTP_RELEASED
DCHAN DEBUG lchan_rtp_fsm.c:520 lchan_rtp(0-0-1-TCH_F-0){ROLLBACK}: Freeing instance
DCHAN DEBUG fsm.c:381 lchan_rtp(0-0-1-TCH_F-0){ROLLBACK}: Deallocated
DCHAN DEBUG lchan_rtp_fsm.c:520 lchan(0-0-1-TCH_F-0){WAIT_RLL_RTP_ESTABLISH}: Received Event LCHAN_EV_RTP_RELEASED
DCHAN DEBUG lchan_fsm.c:1232 lchan(0-0-1-TCH_F-0){WAIT_RLL_RTP_ESTABLISH}: state_chg to WAIT_RF_RELEASE_ACK
DRSL NOTICE handover_fsm.c:762 handover(interBSCin_conn0){WAIT_RR_HO_DETECT}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
DRSL NOTICE handover_fsm.c:762 handover(interBSCin_conn0){WAIT_RR_HO_DETECT}: Freeing instance
DRSL NOTICE fsm.c:381 handover(interBSCin_conn0){WAIT_RR_HO_DETECT}: Deallocated
DCHAN DEBUG lchan_fsm.c:1196 lchan(0-0-1-TCH_F-0){WAIT_RF_RELEASE_ACK}: state_chg to BORKEN
DCHAN DEBUG lchan_fsm.c:354 lchan(0-0-1-TCH_F-0){BORKEN}: (type=TCH_F) Clearing lchan state
DLMGCP DEBUG mgcp_client.c:741 Tx MGCP msg to MGCP GW: 'DLCX 3 2@mgw MGCP 1.0'
DLMGCP DEBUG mgcp_client.c:743 Sending msg to MGCP GW size: 66
DRLL NOTICE mgcp_client_fsm.c:422 MGCP_CONN(to-BTS){ST_DLCX_RESP}: Received Event EV_DLCX_RESP

Placing the source file info behind the log text makes it much easier to
follow, while the source file info is still available:

DRSL NOTICE mgw-endpoint(conn0){WAIT_MGW_RESPONSE}: Freeing instance (mgw_endpoint_fsm.c:603)
DRSL NOTICE mgw-endpoint(conn0){WAIT_MGW_RESPONSE}: Deallocated (fsm.c:381)
DMSC NOTICE SUBSCR_CONN(conn0){CLEARING}: Received Event FORGET_MGW_ENDPOINT (mgw_endpoint_fsm.c:603)
DCHAN DEBUG lchan(0-0-1-TCH_F-0){WAIT_RLL_RTP_ESTABLISH}: Received Event LCHAN_EV_RTP_RELEASED (lchan_rtp_fsm.c:741)
DCHAN DEBUG lchan_rtp(0-0-1-TCH_F-0){ROLLBACK}: Freeing instance (lchan_rtp_fsm.c:520)
DCHAN DEBUG lchan_rtp(0-0-1-TCH_F-0){ROLLBACK}: Deallocated (fsm.c:381)
DCHAN DEBUG lchan(0-0-1-TCH_F-0){WAIT_RLL_RTP_ESTABLISH}: Received Event LCHAN_EV_RTP_RELEASED (lchan_rtp_fsm.c:520)
DCHAN DEBUG lchan(0-0-1-TCH_F-0){WAIT_RLL_RTP_ESTABLISH}: state_chg to WAIT_RF_RELEASE_ACK (lchan_fsm.c:1232)
DRSL NOTICE handover(interBSCin_conn0){WAIT_RR_HO_DETECT}: Terminating (cause = OSMO_FSM_TERM_REGULAR) (handover_fsm.c:745)
DRSL NOTICE handover(interBSCin_conn0){WAIT_RR_HO_DETECT}: Freeing instance (handover_fsm.c:745)
DRSL NOTICE handover(interBSCin_conn0){WAIT_RR_HO_DETECT}: Deallocated (fsm.c:381)
DCHAN DEBUG lchan(0-0-1-TCH_F-0){WAIT_RF_RELEASE_ACK}: state_chg to BORKEN (lchan_fsm.c:1196)
DCHAN DEBUG lchan(0-0-1-TCH_F-0){BORKEN}: (type=TCH_F) Clearing lchan state (lchan_fsm.c:354)
DLMGCP DEBUG Tx MGCP msg to MGCP GW: 'DLCX 3 12@mgw MGCP 1.0' (mgcp_client.c:741)
DLMGCP DEBUG Sending msg to MGCP GW size: 67 (mgcp_client.c:743)
DRLL NOTICE MGCP_CONN(to-BTS){ST_DLCX_RESP}: Received Event EV_DLCX_RESP (mgcp_client_fsm.c:422)

Implementation: for 'last', insert source file info only when an '\n' is found
at the end of the log line composition buffer, so that LOGP()...LOGPC()
constructs also print source file info only when a log line actually ends.

Change-Id: I393907b3c9e0cc1145e102328adad0a83ee13a9f
2018-08-27 20:52:04 +02:00
Philipp Maier 73196e77fb socket: add flag to enforce SO_REUSEADDR on UDP sockets
When IPPROTO_UDP is used then SO_REUSEADDR omitted since UDP is
connection less we do not have to wait until lingering connections time
out. There were also negative effects such as that two applicatications
could use the same UDP port, normally one of the two applications would
get an error, but with SO_REUSEADDR this is supressed. However, there
are applications (UDP MULTICAST) where two applications must be able to
use the same port. In the osmocom project those are osmo-bts-virtual,
virtphy and gsmtap in general.

Lets introduce a flag that the API user can supply in order to have
SO_REUSEADDR applied.

- Add new flag OSMO_SOCK_F_UDP_REUSEADDR

Change-Id: I94aaf6d5224ab23bde5ea5c4a83569b6145ab32b
Related: OS#3497
2018-08-23 20:17:45 +02:00
Neels Hofmeyr 983dcb9af3 use __FILE__, not __BASE_FILE__
The intention was to use the file's basename, but __BASE_FILE__ means "the root
file that is being parsed and contains #include statements".

If we had a function using __BASE_FILE__ and that was defined in an #included
file, __BASE_FILE__ would indicate the first file where the #include is, and
not the file where the function is defined. __BASE_FILE__ works for us because
we don't ever include function definitions that log something, so __BASE_FILE__
always coincides with __FILE__ for our logging; but still __BASE_FILE__ is
semantically the wrong constant.

Related: OS#2740
Change-Id: Ibc1d3746f1876ac42d6b1faf0e5f83bd2283cdcc
2018-08-20 20:23:18 +00:00
Pau Espin 8ce6f488b6 msgb: Introduce msgb_{de,en}queue_count APIs
It's a common pattern having a list of msgb and having to maintain its
size (for instance, to limit the maximum size of the list). Having the
counter updated at the same time that the msgb is enqueued or dequeued
helps avoiding introducing new bugs by forgetting to update the size
counter at the right places.

Change-Id: I33b501e89a8f29e4aa121696bcbb13d4b83db40f
2018-08-17 10:34:15 +02:00
Pau Espin 0b6fcb0349 signal: Introduce API osmo_signal_talloc_ctx_init
Otherwise applications need to use "extern void* tall_sigh_ctx" and set
it manually (that symbol is not exported in any header file) or end up
allocating struct signal_handler into the NULL talloc ctx.

API created in a similar way as already existing msgb_talloc_ctx_init(),
but without the pool_size because it's not considered necessary in this
case.

Change-Id: Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09
2018-08-16 21:03:32 +02:00
Alexander Couzens acc0a070c7 bssgp: introduce flush queue functions
To reset the state of BSSGP allow to flush the BSSGP queues.
When testing (with TTCN3) the test object should be resetted between
each test.

Introduce the functions:
bssgp_fc_flush_queue() - flushs a single flow control object
bssgp_flush_all_queues() - flushs queues of all BSSGP connections

Change-Id: I29b6ad6742ddf9b0b58b4af37d9a1cf18e019325
2018-08-10 06:55:43 +00:00
Vadim Yanitskiy 30cfeeb4a0 libosmogsm: (re)introduce gsm48_push_l3hdr()
There was gsm0480_l3hdr_push() declared in a header file, but
not exposed in 'libosmogsm.map'. Furthermore, for some reason
it was a part of GSM 04.80 API, what is not actually correct.

Let's rename this symbol, and properly expose it as a part of
the GSM 04.08 API. Also, let's introduce an auxiliary wrapper
for messages, where the transaction identifier is required
(see GSM 04.07, section 11.2.3.1.2).

Change-Id: I8a045efe8335d83fcbe8d43eb180972e3b1d9dda
2018-08-05 23:21:43 +07:00
Harald Welte 5a7740d1db re-introduce ipa_ccm_idtag_parse_off()
In the previous commit we deprecated ipa_ccm_idtag_parse() but
also removed ipa_ccm_idtag_parse_off(), for which I couldn't find
any users.  However, legacy openbsc.git still uses this function,
so let's re-introiduce it in its original form.

Change-Id: Ibfe53b04340eb355c8bfb8453a2af1522a4b6baf
2018-08-01 17:42:06 +02:00
Harald Welte 7869baf843 Deprecate ipa_ccm_idtag_parse() with ipa_ccm_id_{get,resp}_parse()
In the past, the function ipa_ccm_idtag_parse() was used to parse
the payload of IPA CCM ID RESP packets.  However, the function was
based on a possible misunderstanding of the message encoding, and
callers actually counted the first (upper) length nibble as part
of the header and passed a pointer to the second
(lower) length nibble of the first TLV into this function.  As such,
it was unfixable, and had to be replaced with a new function called
ipa_ccm_id_resp_parse().  At the same time, we also add
ipa_ccm_id_get_parse() to parse the slightly different format of
the IPA CCM ID GET payload.

We can never be 100% sure what is "correct", as our understanding
of the protocol is entirely based on protocol analysis, without any
official documentation available.

This patch also introduces unit test coverage for both of the new
functions.

Revert "ipa: Add libosmogsm.map entry for ipa_ccm_idtag_parse_off"
This reverts commit 7f31c90b80.

Revert "ipa: Properly parse LV stream of a ID_GET request"
This reverts commit f558ed4bb9.

It introduced a function/behavior that was not originally intended:
The parse of IPA CCM ID GET (8bit length followed by 1 byte tag
and variable-length payload) instead of the IPA CCM ID RESP (16bit
length followed by 1 byte tag and variable-length payload).

Change-Id: I1834d90fbcdbfcb05f5b8cfe39bfe9543737ef8f
2018-08-01 13:38:17 +02:00
Harald Welte 9b04c17c7a oap_client: Rename symbols with osmo_ prefix
As we're moving this to a common/shared library now, we need to use
the osmo_ namespace prefix for symbol names, struct/type names and
constants.

Change-Id: Ie36729996abd30b84d1c30a09f62ebc6a9794950
2018-07-30 12:50:51 +02:00
Harald Welte fdd366ed1b import oap_client into libosmogsm
This imports the code from osmo-msc 6afef893e17bce67e4d4119acd34d480ed03ba77
with minimal changes to make it compile.  Symbol renaming to osmo_
prefix is done separately in a follow-up patch to have a as-clean-as-possible
import first.

Change-Id: I9bc38102318da02d1fe46ef516df3cfd6bf8e3da
2018-07-30 12:16:11 +02:00
Harald Welte 7ecc4a3171 04.80: New gsm0480_gen_{reject,return_error}() functions
Add functions to generate TS 04.80 (supplementary services)
Reject and ReturnError components.

Change-Id: I6e5ee39c3d03364f7833ec717593d5ddb0a4c5f9
2018-07-29 14:39:36 +00:00
Harald Welte b0d9594081 USSD: Introduce gsm0480_gen_ussd_resp_7bit()
Contrary to the existing gsm0480_create_ussd_resp(), the new function
only generates the value part of the FACILITY IE, and not the IE
Tag/Length or the 04.08 L3 header.  This is needed in the context of
GSUP-encapsulated USSD, as here we don't work with L3 messages, but
only pass on the FACILITY IE value.

Change-Id: Ide240279240322f643e142229eb7829f538c6314
2018-07-29 14:39:36 +00:00
Harald Welte 88fa5a3e1e gsm0480: Factor out msgb allocation helper function
Change-Id: If25b467481023eadaaf3f78157eceff4b81d24d2
2018-07-29 14:39:36 +00:00
Kevin Redon 0bc3b83654 GSMTAP: add SIM sub_types
In SIMtrace 1 the ATR was sent the same way as an APDU.
The ATR is not an APDU, and could be mis-interpreted as valid APDU.
This change allows to make the difference between actual APDU and
the ATR, but also adds sub_types for future SIMtrace 2 use cases.

Change-Id: I5bd0dff5a4a90cfe96d9c4f3dec6657e1d85bf7a
2018-07-27 17:19:47 +00:00
Harald Welte 83361bd963 gprs_ns.h: Declare gprs_ns_cause_str() which already existed in c file
Change-Id: Ia95f0cc8d110f95814173bb5a1c11bd85d8cd533
2018-07-22 15:14:58 +02:00
Neels Hofmeyr 59f4caf4ef add osmo_sockaddr_to_str_and_uint()
This came from osmo-bsc refactoring patch I82e3f918295daa83274a4cf803f046979f284366
https://gerrit.osmocom.org/#/c/osmo-bsc/+/9671/6/src/osmo-bsc/gsm_data.c@1708

Add regression test in utils_test.c.

Change-Id: I1f2918418c38918c5ac70acaa51a47adfca12b5e
2018-07-20 14:02:21 +00:00
Pau Espin 239ed3b3ee ctrl: Introduce ctrl_cmd_parse3 API
Callers require to know whether the returned ERROR cmd was received or
generated locally, in order to send it or do something with it locally.

Related: OS#3394

Change-Id: Ide9170e5c31967c353f8fe4e8227e64130b91eae
2018-07-16 17:56:25 +00:00
Pau Espin f2cda621c0 gsm0808: Add value_string for encryption algorithms
Change-Id: Iadf6460c438d02c53c2eaa9e42d51844ad28859a
2018-07-12 20:58:23 +02:00
Philipp Maier cdd05816da gsm_08_08: gsm0808_permitted_speech does not have value strings
enum gsm0808_permitted_speech does not have any value strings. Lets
add value strings to make debugging easier.

Change-Id: I5b5612a5df2758b0137a34c17f7c8c2b3f07c806
2018-07-12 18:18:39 +00:00
Philipp Maier 5796a218db gsm_04_08: add function to get value string
The value string table gsm48_chan_mode_names[] lacks a function
to get the value string by a value. Lets add one.

Change-Id: I0757bcc278c140e18249e35864338e19cdaa3cf7
2018-07-12 18:18:39 +00:00
Vadim Yanitskiy 94c0031297 Don't enforce Python 2 for utilities
The conv_gen.py utility was tested against both Python 2 and 3,
so there is no need to enforce Python 2. Also, having:

  #!/usr/local/bin/python{2|3}

is a bad idea, because Python may be installed in a different location.

Change-Id: I6007d481047b584db13d6eda70fb99f11f9ddaa1
2018-07-02 20:30:31 +07:00
Harald Welte bc568d0b9f osmo_panic(): Annotate as __attribute__ ((noreturn))
In Change-Id I5a70eb65952cbc329bf96eacb428b07a9da32433 we redirected
all OSMO_ASSERT() via osmo_panic().  However, this caused various
applications to have build failures, as OSMO_ASSERT() now appeared
to be able to return to the call site.  Let's inform the compiler
explicitly that there's no return from osmo_panic().

Change-Id: I8adf4c7b0ee6a4581cef8dd4e9f6a1dfde70ee55
2018-06-29 20:32:57 +02:00
Harald Welte 459a180877 Don't call abort() directly, always use osmo_panic()
A loooong time ago, we introduced osmo_panic() as a wrapper around
abort().  The advantage is, that this wrapper can be overridden, and
that it will also work in embedded (bare iron) targets, where the
abort simply translates to an infinite loop.

Change-Id: I5a70eb65952cbc329bf96eacb428b07a9da32433
2018-06-28 10:57:42 +02:00
Neels Hofmeyr 60f3153125 add and tweak inter-BSC HO API
Add:
gsm0808_create_handover_detect()
gsm0808_create_handover_complete()
gsm0808_create_handover_failure()

To existing structs gsm0808_old_bss_to_new_bss_info and
gsm0808_handover_required, add a final 'more_items' flag that makes future
extensions API and ABI compatible.

Fix the msgb string for Handover Request Ack.

Extend some API doc comments.

Related: OS#2283 (inter-BSC Handover, BSC side, MT)
Change-Id: I03ee7ce840ecfa0b6a33358e7385528aabd4873f
2018-06-18 17:32:58 +00:00
Harald Welte b1a35d63b9 gsm 04.80: Add value_string for component type and op code
Change-Id: I2615a88db5224d65f37c7cc505e183ec8b196e8a
2018-06-16 18:39:59 +02:00
Harald Welte 6a6a609309 gsup: Add value_string for Session State IE
In Change-Id I1cee271fed0284a134ffed103c0d4bebbcfde2a8 we added support
for a new session state IE, but we didn't add any value_string array
for string conversion of it.  Let's fix this.

Change-Id: I3d9f087786dc37c42498fa9a2be07483ec93ba7b
2018-06-16 11:11:08 +02:00
Daniel Willmann f1318fe371 Add function gprs_nsvc_state_append
A common function to append the nsvc state from osmo-sgsn or osmo-gbproxy

Change-Id: I7f0eaff7329ab98cad792d30b20ab053007aab85
2018-06-14 17:43:31 +02:00
Harald Welte 520ebc17d9 gsup: Add osmo_gsup_get_err_msg_type() function
This function can be used to resolve the error message type for
a given message type.  Can be used by generic error handlers that
work for any incoming message type.

Change-Id: Ic637bec53dd7fe3ec83da99b49b4eae34d5602b2
2018-06-11 20:28:18 +02:00
Vadim Yanitskiy 5a09f75c1e gsm/gsm0480: refactor and expose gsm0480_parse_facility_ie()
This function can be used when there is only a part of GSM 04.80
message available - Facility IE, e.g. when a message is carried
over GSUP/MAP. Let's expose it.

Refactoring includes the following:

  - adding the 'gsm0480_' prefix;
  - correcting inverted return value;
  - cosmetic code style changes.

Change-Id: I623c39ffbe6cdee65eade8435a2faa04d0da193e
2018-06-11 23:50:00 +07:00
Vadim Yanitskiy 52e44121db gsm/gsm0480.c: introduce gsm0480_extract_ie_by_tag()
In some cases, there is no need to parse the whole message,
e.g. during the conversion from DTAP to GSUP/MAP. This
function can be used to extract given IE from a message.

Change-Id: I3989d061903352473305f80712f1a1560d05df3d
2018-06-11 23:45:48 +07:00
Harald Welte 11eb4b5add vty: Add logging_vty_add_deprecated_subsys
This function permits the user to register deprecated log categories,
which will ensure that if log categories are removed from a program,
old config files will still load.

We simply dynamically allocate a cmd_element and install it at
CFG_LOG_NODE.  Not registering it at VIEW_NODE or ENABLE_NODE
ensures that it's not accessible from the interactive VTY, but only
from the config file / configure node.

Change-Id: I171f62ea2dc565b3a6c3eecd27fb7853e2529598
2018-06-09 17:43:33 +02:00
Harald Welte 3385e4b0c4 fsm: Change semantics of LOGPFSML() log-level
The general idea about each osmo_fsm_instance having a separate
log-level was to be able to selectively increase/show/enable logging
for some FSM instances (e.g. of a particular subscriber) while
maintaining normal logging verbosity for all other instances of the
same FSM.

The introduction of LOGPFSML() in Change-Id
If295fdabb3f31a0fd9490d1e0df57794c75ae547 broke that idea, as it would
use a compile-time log level, irrespective of the
osmo_fsm_inst.log_level setting of the given instance.

Let's combine the two:
Use the explicit level stated at LOGPFSML(), _unless_ this instance
has a higher log_level configured.

This way, all FSMs should normally be created with
osmo_fsm_inst.log_level == LOGL_DEBUG.  At that point LOGPFSM()
statements would be rendered at debug level, typically below the
threshold of most logging configurations.

Code that has explicit higher log levels like LOGPFSML(fi, LOGL_ERROR)
would always be printed, as it is an error message.

And if we now increase the osmo_fsm_inst.log_level, then even the normal
LOGPFSM() statements would suddenly be logged at that higher level,
selectively increasing log verbosity - like originally intended.

Change-Id: I1820f04d0c6f5d5ff08eb95b8c0e88764534491a
2018-06-08 10:22:41 +00:00
Neels Hofmeyr 94e4265f07 fix gsm0808_permitted_speech(): don't return HR3 for TCH_F + AMR
Change-Id: Icca23940791f97fa64dbc3f2734270b99f9550c1
2018-06-07 16:55:36 +02:00
Harald Welte 15a5f8de00 Add osmo_isqrt32() to compute 32bit integer square root
Change-Id: I2b96db6e037e72e92317fec874877e473a1cf909
2018-06-06 16:58:53 +02:00
Harald Welte 1fbe3eba75 tlv: Add TLVP_VAL_MINLEN() to obtain value _if_ length is >= minimum
This is a combination of TLVP_VAP() and TLVP_GET_MINLEN()

Change-Id: Ic5a177941219ebc3a3bceb3f68bdb3b2cacb934b
2018-06-02 12:53:29 +00:00
Harald Welte ebd362dbd2 gsm0808: Add value_string for LCLS related IEs
Change-Id: I18d7a29496929c761aeaba9c0aee847befc13108
2018-06-02 14:44:09 +02:00
Neels Hofmeyr 407df02e7c add osmo_fsm_inst_state_chg_keep_timer()
Change-Id: I3c0e53b846b2208bd201ace99777f2286ea39ae8
2018-05-31 21:01:33 +00:00
Vadim Yanitskiy 36c7b33ccc GSUP: introduce new messages for SS/USSD payloads
In order to be able to transfer SS/USSD messages via GSUP,
this change introduces the following new message types:

  - OSMO_GSUP_MSGT_PROC_SS_*,

and the following new IE:

  - OSMO_GSUP_SS_INFO_IE

which represents an ASN.1 encoded MAP payload coming to/from
the mobile station 'as is', without any transcoding.

Change-Id: Ie17a78043a35fffbdd59e80fd2b2da39cce5e532
Related: OS#1597
2018-05-31 16:12:14 +00:00
Vadim Yanitskiy 72696040df GSUP: implement TCAP-like session management
Unlike TCAP/MAP, GSUP is just a transport layer without the
dialogue/context. This prevents us from having session based
communication, required e.g. for USSD. But we can emulate
TCAP dialogue by adding additional IEs, which would allow
to relate each message to a particular session.

This change introduces the following IEs:

  - OSMO_GSUP_SESSION_ID_IE,
  - OSMO_GSUP_SESSION_STATE_IE,

which optionally can be used to indicate that the message is
related to a session with given ID, and to manage session
state, i.e. initiate, continue, and finish.

Change-Id: I1cee271fed0284a134ffed103c0d4bebbcfde2a8
Related: OS#1597
2018-05-31 16:11:14 +00:00
Harald Welte 64e807c4bc gsm0808: Add encoding functions for LCLS BSSMAP messages
Change-Id: Ib83143e467df068b7d462a8e51d94b9d961ce18f
2018-05-30 01:36:04 +02:00
Harald Welte 2f51684e63 gsm_08_08.h: Add enum for LCLS config, control and status
Change-Id: I775aba59942fb6f34fb31b71d2f0f2ac5c3ae831
2018-05-30 01:36:04 +02:00
Daniel Willmann 07f075d197 ports.h: Add ctrl port for osmo-gbproxy
Change-Id: I46a1cef3013c9bbf9b5a6d64e83cd84568f2523c
2018-05-29 21:02:16 +02:00
Keith Whyte 05d3278c0e Add enum gsm48_progress_desc
From GSM 04.08
Section 10.5.4.21 / Table 10.5.127

Change-Id: I6574e8808aaf39fad8026290aa2cc657734e18b5
2018-05-28 15:10:16 +00:00
Neels Hofmeyr b662b36da0 add gsm0808_create_handover_request_ack()
Related: OS#2283 (inter-BSC Handover, BSC side, MT)
Change-Id: I692292a06c7d66004404560dc4ed933ca9107f9b
2018-05-27 22:04:17 +02:00
Neels Hofmeyr 70aba3ffe2 add support for gsm0808 HANDOVER REQUIRED message
Related: OS#2283 (inter-BSC Handover, BSC side, MO)
Change-Id: Idb6dc3eab0282158a17091d97ed77c1e2e3eb3c2
2018-05-27 22:04:17 +02:00
Neels Hofmeyr 38e58416b1 add gsm0808_cell_id_to_list()
The idea is to be able to add a gsm0808_cell_id to a gsm0808_cell_id_list2:
first convert it to a list, then re-use gsm0808_cell_id_list_add(). It will be
used by osmo-bsc to manage neighbor-BSS cell identifiers from VTY.

Change-Id: Ibf746ac60b1b1e920baf494b396658a5ceabd788
2018-05-27 21:54:12 +02:00