| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This change defines the GSM FR bit positions as described
in RFC 3551, which will be used by further ECU
(Error Correction Unit) implementation.
Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed
|
|
|
|
|
|
|
|
|
| |
There are some projects, such as OsmoBTS and OsmocomBB, which
are dealing with raw TCH payloads, so they need to have the
FR/HR/EFR frame length defined. At the moment, each project
defines them itself. Let's share these definitions.
Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38
|
|
|
|
|
|
|
|
|
| |
So far it uses 2323, a development default. Instead, assign new ports,
appending to the common range of VTY and CTRL ports: 4261 and 4262.
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers
Related: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 (osmo-gsm-manuals)
Change-Id: Ife52a968a41cb286f640006587877971ff66c1a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a control command fails to parse, we so far discard specific error messages
and instead send just "Command parser error".
In ctrl_cmd_parse() we actually compose detailed error replies, but in the end
simply talloc_free() them and return NULL.
A first step to report these errors to the ctrl command issuer is to not return
NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add
ctrl_cmd_parse2() to return such instead of NULL.
To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors.
ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper
around ctrl_cmd_parse2() which discards the cmd on error.
No need really to deprecate ctrl_cmd_parse() yet; especially as long as
compiler warnings might break jenkins builds.
Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880
|
|
|
|
|
|
|
|
|
|
| |
In order to allow unit testing the ctrl iface msgb handling, have a separate
msgb entry point function from the actual fd read function.
An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test
that needs this separation.
Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To report invalid characters in identifiers, it is desirable to escape any
weird characters. Otherwise we might print stray newlines or control characters
in the log output.
ctrl_test.c already uses a print_escaped() function, which will be replaced by
osmo_escape_str() in a subsequent patch.
control_cmd.c will use osmo_escape_str() to log invalid identifiers.
Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA
tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES.
For SRES, it requires an OPC, which may need to be derived from OP first. All
we need is a Kc, so we could feed a zero OPC ... but to simplify the function
call for cases where just a Kc is required, separate the c3 function out from
gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from
gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover
exactly that implementation).
Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc)
Related: OS#2745
Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa
|
|
|
|
|
|
|
|
| |
For validating CTRL input, we want to verify that an input variable is a series
of valid osmo_identifier_valid() separated by dots. Allow validating any
additional chars with identifiers, for CTRL vars will be just ".".
Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de
|
|
|
|
| |
Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:
* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests
Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
|
|
|
|
| |
Change-Id: I7b057c026f9df90608b7cbd12481ab9e7a41d88c
|
|
|
|
| |
Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b
|
|
|
|
|
|
|
|
| |
For the lua console printing I need to print several values with
continuation but also specify the filename. Add a "C" for continue
and forward arguments.
Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e
|
|
|
|
| |
Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example encode_auth_info() from gsup.c calls
msgb_tlv_put(msg, iei, 0, NULL)
to put a tag and len with content data following later.
However, this would cause a memcpy() from a NULL pointer, in tlv_put(). Allow
passing NULL and len = 0 for cases like the above:
If val is NULL, use memset(0) instead of memcpy().
If len is zero, do not copy nor memset anything.
Hence make tlv_put() behave in a well-defined and valid way for any and all
input args; no negative fallout is possible from this patch.
Add proper API doc comment.
Fixes a sanitizer build failure in gsup_test:
../../../../src/libosmocore/include/osmocom/gsm/tlv.h:99:2: runtime error: null pointer passed as argument 2, which is declared to never be null
Helps fix sanitizer build on debian 9.
Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64
|
|
|
|
|
| |
Related: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 (libosmo-netif)
Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7
|
|
|
|
|
|
|
|
| |
It was decided that osmo-mgw as direct successor of osmo-bsc_mgcp
will use the same VTY port number (similar to osmo-nitb, osmo-bsc
and osmo-bsc-sccplite all using the same VTY port number)
Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577
|
|
|
|
|
|
|
|
| |
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.
Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
|
|
|
|
| |
Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
|
|
|
|
|
|
|
|
|
|
|
| |
Following I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b a deprecation of
vty_install_default() and install_default() commands is indicated.
However, compiler warnings may clutter build output or even fail strict builds,
hence I am submitting the deprecation in a separate patch.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: Icf5d83f641e838cebcccc635a043e94ba352abff
|
|
|
|
| |
Change-Id: I549ab7c26ac1489e01f281594bafe44b0681dc83
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As rate counters are automatically exposed on the CTRL interface,
we need to make sure they don't contain special characters such as '.'
which are not permitted/supported by CTRL.
In order to be able to run old versions of osmocom programs with
libosmocore versions after this commit, we introduce some special
name mangling: Any '.' in the names are replaced with ':' during
counter group registration, if valid identifiers can be obtained
this way.
Change-Id: Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56
|
|
|
|
|
|
|
|
|
| |
We define the notion of an 'osmocom identifier' which is basically a
7-bit US-ASCII without any special characters beyond "-_:@". We
introduce a function to verify if an identifier consists only of the
permitted characters.
Change-Id: I96a8d345c5a69238a12d040f39b70c485a5c421c
|
|
|
|
|
|
|
|
|
| |
* add comment about underlying assumption that structs in ip/frgre union
members in gprs_nsvc struct have the same memory layout
* remove such assumption from gprs_ns_ll_str()
* use gprs_ns_ll_str() for NSE dump
Change-Id: Idcb912b7b3f7460fd2b058e16650c0bde8f757ee
|
|
|
|
|
|
|
|
|
| |
* introduce defines with NS state names
* use them for vty and tests
* expand test output to print complete NS state
Change-Id: I69f8d536135ae76dbca623c2f1ffba625adcb1e9
Related: SYS#3610
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add macro to append to a CTRL commands' reply string, ctrl_cmd_reply_printf().
The talloc_asprintf() part of it is generic enough to qualify for a separate
macro, osmo_talloc_asprintf().
The idea is to not have to decide for each bit added to a string whether the
string is already allocated or not, but simply be able to issue printf commands
and let the macro worry about initial allocation or reallocation.
This originally came from osmo-hlr change
I1bd62ae0d4eefde7e1517db15a2155640a1bab58, where it was requested to move this
bit to libosmocore.
Change-Id: Ic9dba0e4a1eb5a7dc3cee2f181b9024ed4fc7005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When listening for nsip connections is enabled, then every remote
host may send packets. This is useful for an SGSN that serves
multiple PCUs, but contraproductive for a PCU that awaits packets
from a single SGSN.
Add struct members remote_ip, and remote_port to struct gprs_ns_inst,
when set, then the listening end uses connect() to ensure that only
the expected host may send packets.
Related: OS#2401
Change-Id: Ifeb201d9006eec275a46708007ff342cdfc14e45
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old bitvec_set_uint() uses "unsigned int" as input parameter which
length is not guaranteed. It does not allow to specify which bit_value
to set and does not check for incorrect length. Overall this makes it
harder to re-use and more error-prone.
Let's replace it with extended implementation which uses fixed type
length parameters and extra checks. The additional parameter allows
caller to explicitly indicate the need to use L/H instead of 0/1 for bit
vector elements. It's necessary to properly encode some of the messages
from 3GPP TS 44.018, for example §10.5.2.16 IA Rest Octets.
The old function is left for backward compatibility as a tiny wrapper
around new function and will be deprecated in follow-up patches.
Change-Id: I1b670dacb55fb3063271d045f9faa10fccba10a6
Related: OS#1526
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ctrl_interface_setup_dynip2() to add a node_count parameter, which can be
used to define more ctrl nodes without having to merge a patch to libosmocore.
In consequence, also add ctrl_handle_alloc2(), since
ctrl_interface_setup_dynip() uses ctrl_handle_alloc() to allocate the node
slots, and add node_count param to static ctrl_init().
Passing zero as node_count indicates to use the default of _LAST_CTRL_NODE as
before, i.e. to not define more ctrl nodes. Assert that we never allocate less
than _LAST_CTRL_NODE slots.
The current ctrl_interface_setup_dynip() and ctrl_handle_alloc() become simple
wrappers that pass zero as node_count. Their use is still valid and they do not
need to be deprecated.
The API comment to ctrl_interface_setup_dynip2() explains how to define more
node IDs.
This patch was verified to work by osmo-hlr.git change
I98ee6a06b3aa6a67adb868e0b63b0e04eb42eb50 which adds two node IDs for use by
osmo-hlr only.
Change-Id: I1bd62ae0d4eefde7e1517db15a2155640a1bab58
|
|
|
|
|
|
|
|
|
| |
Similar APIs exist for opstate and availability status.
This patch does not break backward compatibility because osmo-bsc still
requires direct use of the structure in get_string_value().
Change-Id: Ieace734aaff3f07606113feddde65b75202d96d6
|
|
|
|
|
|
|
|
|
|
| |
In some cases it is required to know the ip-address of the interface
through that a given remote IP-Address can be reached.
Add function osmo_sock_local_ip() to determine the local ip-address
for a given remote ip-address
Change-Id: I2988cc52b196fc8476703d1287e24cb4a48491c2
|
|
|
|
|
|
|
|
|
|
|
| |
In ASCII string based protocols it a printf() version that prints
directly to the message buffer may be useful.
Add function msgb_printf(), make sure that msg buffer bounderies
are not exceeded. If the end of the tail buffer is hit, return
with an error code.
Change-Id: I15e1af68616309555d0ed9ac5da027c9833d42e3
|
|
|
|
| |
Change-Id: I6c1f47d13c5b7a9cb2281de9f017df4f1ed88ba7
|
|
|
|
| |
Change-Id: I91920c69c86d6a1932172becacb76faff2d3eb1e
|
|
|
|
| |
Change-Id: I1e875991ae1dd93862f850f85d40b3dac61ece72
|
|
|
|
| |
Change-Id: Ieee6213dc5aad082a2d439c7418b51f281b80b1a
|
|
|
|
| |
Change-Id: I24c56ccb56d5b39cfb887808f91b715da54c0f8b
|
|
|
|
| |
Change-Id: I2fd24c86f9b52244073ec800a3287e3d38e660d9
|
|
|
|
| |
Change-Id: I5fb1c34475ea9db36c2ec5cddc988074a72a35f7
|
|
|
|
|
|
| |
Let's hence not call the group "GSM L3 compatible TLV parser"
Change-Id: Ic53f9c0d5ee787f994f42cf2aff313c6e131fbe6
|
|
|
|
|
|
|
| |
We also have "A-bis OML" and it's a bit odd to have one with prefix
and the other without.
Change-Id: Ida325f8a9c40b40c1aeaa4edfd1123ced7cc92b8
|
|
|
|
|
|
| |
Also, make sure prim.c is actually part of the 'prim' module.
Change-Id: I4363e46a5f606eb2114a9cc1d2086007eaa58d31
|
|
|
|
|
|
| |
.. and add missing API documentation bits
Change-Id: I67119894bcbf8c779426a0272bae4c5ce1fbd1ed
|
|
|
|
| |
Change-Id: If824a5c8d8ee6e3dc96a3fddeb105786c0c027c1
|
|
|
|
| |
Change-Id: I8e49505f5c19beac90290fdba8821714e8eecd97
|
|
|
|
|
|
|
| |
This adds a more complete set of API documentation for all
osmo_counter relatedd functions and definitions.
Change-Id: I24283c05620ee86a8beb165af98a85d754549efb
|
|
|
|
|
|
|
|
| |
The stat_item code base had some incomplete doxygen documentation
so far. Let's complete it, and at the same time fix some cosmetic
as well as copy+paste issues in the existing documentation bits.
Change-Id: Ib514c137b40bf7b9791bd74be99af0b65575f2b6
|
|
|
|
|
|
|
|
|
| |
With stat_item, stats.c and stats_statsd.c, it is becoming a bit
difficult to understand file naming. Also, the 'statistics.c' file
actually only contained osmo_counter handling, so let's rename it to
counter.c altogether.
Change-Id: I2cfb2310543902b7da46cb15a76e2da317eaed7d
|
|
|
|
|
|
| |
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: Idf75946eb0a84e145adad13fc7c78bb7a267aa0a
|
|
|
|
|
|
| |
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: Ic39f3404d1a49ffd06070aa9897b36f219eacf4d
|