|Age||Commit message (Collapse)||Author||Files||Lines|
This marks the first version of this source package that includes
libosmo-sigtran and osmo-stp.
* Add Doxygen API documentation
* Add examples for libosmo-sigtran client and server side API
* Add 'struct sccp_data_unitdata_service' for UDTS
* Big endian support for sccp_src_ref_to_int() and sccp_src_ref_from_int()
* Fix any unintended references to AGPL in the soruce
The Doxygen annotation we have in this library, and which the Doxyfile
generates is actually for the shared libosmo-sigtran, and not for the
legacy libosmo-sccp. Let's correct that mistake.
The recent bug with chopped-off point codes in SCCP Address handling
has shown that this code could need proper test cases. This patch
adds a testsuite for SCCP address encoding and decoding.
Log errors in case the user provides global title indicators or
nature-of-address indicators that exceed the permitted value range
In osmo_sccp_addr_encode(), we accidentially truncated all point
codes to 10 bits, where in reality we should have truncated them to
14 bits: One 'f' was missing in the bit-mask.
... and bail out + log an error.
Since the NI is in bits DC, not BA, it needs to be shifted by 6, not 4, to end
up in the two most significant bits. Also, NI is two bits wide, hence & 0x3.
(The m3ua.c side of this is already correct.)
See ITU-T Recommendation Q.704 (07/96), 14.2 "Service information octet".
Before this patch, NI was always sent as 00 == International regardless of the
This patch was verified to work by a wireshark trace of osmo-bsc connecting to
osmo-msc, showing the NI decoded as configured by an osmo-bsc.cfg file in the
BSSMAP Reset message MTP 3 / Protocol data.
Make sure doxygen generates library documentation by default (can be
disabled at compile time).
libosmo-sigtran is using symbols from libosmo-vty, so make sure that
we explicitly link against libosmo-vty to ensure the dependency shows
up in `ldd` of the library.
If the user does not create an AS, but creates an ASP with a name
that is equal to the default name, then the simple client detects
that and trys to use this ASP. However, unfortunately it then
overwrites the settings of the ASP with the default settings.
If the detected ASP is not created by the simple client, use it,
but preseve the settings of that ASP.
We can set the ASP's remote IP (i.e. where to reach osmo-stp), but so far the
only way to specify the local IP address to bind to can only be set from C code
(e.g. the simple client). Allow setting the local address via VTY.
For example, this is desired for the osmo-gsm-tester, to not use arbitrary IP
* BSSAP is 254 on both MSC and BSC side: Add missing define
* BSSAP-LE (LCS Extension) has 250/251, adjust name to add -LE suffix
In commit eed8c1bfae1d151e135b574d83ed295d36ad8b44 we introduced
some singal handling code for (among others) SIGINT and SIGTERM.
This code causes the process to hang rather than terminate, as it
only dispatches a signal that nobody handles yet in libosmo-sccp.
Until a proper implementation is made, let's terminate the process
The previous fix (I312caf9d54cedb02034e4ef88fdd2e6ad9ca1c34) caused the default
addresses to be discarded. Actually talloc_strdup() the default addresses to
use them if not NULL.
The VTY definition for this command is flawed and breaks osmo-msc VTY tests.
The small problem is a stray '}' in the definition, the bigger problem is that
square brackets indicating optional arguments must not enclose more than one
Split up the command in several separate definitions with si arg, with ssn arg,
with both, and with neither.
If si and/or ssn are not passed, set them to zero.
"optional vty items are stricter than expected"
A doc element is missing, which fails the VTY tests in osmo-msc at Change-Id
When the server (STP) disappears from a live SCCP client,
then the xUA default layer manager receives LM_E_SCTP_DISC_IND,
which is traversing retart_asp(). In there, we first terminate
the current instance of the layer manager FSM, and then re-initialize
the ASP to use the default layer manager using
However, osmo_ss7_asp_use_default_lm() uses the presence of an
asp->lm_priv pointer as a sign that the old layer manager is still
running and attempts to terminate it - despite being terminated
just before in restart_as().
So let's simply remove the termination from restart_asp(), and
leave it to osmo_ss7_asp_use_default_lm().
The asp->cfg.remote.host is allowed to be NULL in cases where the
localhost is used.
Check if asp->cfg.remote.host is NULL when writing the config file
and omit it when it is set to NULL.
osmo_sccp_get_ss7() has the risk of a nullpointer dereference, when
sccp is NULL.
Return NULL when the sccp instance is NULL.
Add doxygen comment
It is currently impossible to find out which SCCP instance handles
a particular user.
Introduce function to lookup the SCCP instance from a given SCCP
osmo_sccp_addr_name() is not listed in any header file.
Add osmo_sccp_addr_name() to sccp_helpers.h in order to make
Some of the functons in sccp_user.c have already
doygen comments on them.
Add doxygen comments for the simple client functions as well
The point-code is not checked in the beginning, only the ASP
checks the point code at a very late stage and fails in case
an invalid point-code is detected.
Remove the check in the ASP creation.
Add a new check after the SS7 initalization that checks the
point-code. If none is set, the default point-code will be
When the default IP addresses (remote or local) the respective
struct value should be set to NULL.
Fix wrong ?:-notation.
The simple client takes certain parameters (pc, ip and port
numbers) which serve as a fallback default in case the user
did not configure any suitable parameters via the VTY.
Prefix all default variables with default_ to make the
purpose clear to the API user
Make sure that all values of the resulting sccp_addr are cleared to obtain a
clean PC+SSN address. Before this, gt and ip remained unset/random, e.g. in
The SG (signal gateway) requires an extra set of VTY commands in
order to be fully configurable. These VTY commands do not make
sense in a situation where libosmo-sccp is used to implement an
ASP (application server process).
Detect in which role libosmo-sccp is used by which of the VTY
initalization functions are called:
osmo_ss7_vty_init_asp() ==> ASP
osmo_ss7_vty_init_sg() ==> SG
Prevent writing back of SG specific configuration when in
running as ASP. Only write back the full parameter set when
running as SG.
The simple client (osmo_sccp_simple_client_on_ss7_id() and
osmo_sccp_simple_client) does not create a default route if
the user has already created an AS via VTY.
Check the presence of a default route independently of the
AS. If no default route exists, create one.
Adjust xua_test accordingly.
osmo_sccp_addr_dump() just prints the raw values. In osmo_sccp_addr_name(), use
osmo_ss7_pointcode_print() and newly added RI, SSN and GT value_string to
print more human readable log output.
Allows to automatically set an RI in future change
"sccp-addr vty: set RI to SSN_PC when setting a point-code"
A previous patch added ss7_instance primary_pc validity checks by means of
OSMO_SS7_PC_INVALID. To be consistent, also adjust sccp_user accordingly.
Remove the osmo_sccp_user's pc_valid field, replaced by pc=OSMO_SS7_PC_INVALID.
Adjust all code paths.
Simplify some log printing, using the fact that osmo_ss7_pointcode_print() now
outputs "(no PC)" for unset point codes.
Initialize osmo_ss7_instance.cfg.primary_pc = OSMO_SS7_PC_INVALID.
Adjust all code paths using primary_pc to ensure it is indeed valid.
It looks like we are going to use the primary point-code of an SS7 instance to
derive a local SCCP address, e.g. for osmo-bsc and osmo-hnbgw.
point-code 1.2.3 ! sets osmo_ss7_instance.primary_pc = 1.2.3
remote-addr msc ! derives cs7 instance 1 and local pc 1.2.3
If 'point-code 1.2.3' is omitted, this becomes '0.0.0' without the user
noticing, and this happens for each client that omits it. I would like to barf
when no local PC is set.
Introduce OSMO_SS7_PC_INVALID to mark an unset point code.
Add static osmo_ss7_pc_is_valid() (name matches schema of
In osmo_ss7_pointcode_print(), return "(no PC)" if !osmo_ss7_pc_is_valid(), for
convenient printing of any PC state.
Subsequent patches will use this for
as well as osmo_sccp_user (I8684c9b559712072c772012890bbf7efa7c8eb35).
Currently, in osmo_ss7_vty.c we had "if (inst->cfg.primary_pc)" suggesting 0 is
invalid, but in struct osmo_sccp_user we have flag pc_valid suggesting 0 is
indeed valid. All known point code formats are <= 24bit, so we can easily use
0xffffffff as indicator for an unset PC, which removes the need to remember to
set a second field for validity and keeps the structs nice and lean.
In order to catch invalid CS7 configurations, It is necessary
to check if sccp addresses contain plausible address data.
Drop the separate osmo_ss7_set_vty_alloc_ctx() because we are likely to forget
calling it. Instead, incorporate into osmo_ss7_vty_init_*() with a new ctx arg,
and set the static context var in vty_init_shared().
Will be used by e.g. osmo-hnbgw to add an SSN to addresses obtained from the
sccp address book.
The most important parts of an SCCP address are the routing
indicator and the pointcode. The latter one is always available
via the SS7 instance, so a basic local address can be derived
Add function osmo_sccp_local_addr_by_instance() to derive a basic
local SCCP address from a given SCCP instance
check input parameters local_ip and remote_ip of the function
osmo_sccp_simple_client_on_ss7_id() before using them with