Do not print the GTI if gti is set to OSMO_SCCP_GTI_NO_GT and no GT is present
in the address.
If addr->gt.gti is set to OSMO_SCCP_GTI_NO_GT, i.e. currently always,
osmo_sccp_addr_name() and osmo_sccp_addr_dump() output
",GTI=NO_GT" in every address dump, which is useless clutter. Drop that.
However, if a Global Title is flagged in addr->presence, still output the GTI
to highlight situations where GTI might mismatch the presence of a GT.
Change-Id: I9f87b2b703223ecb5d0442b6199c5b779fe544a1
In I19cb83302aaa404ab1a2d92e6f2aec43d0380426 I set the headroom of
msgb's for SCCP User primitives to zero, assuming that we wouldn't
need any headroom in those primitives.
According to pespin, osmo-msc however needs this headroom:
DLSCCP <002e> sccp_user.c:156 Delivering N-CONNECT.indication to SCCP User 'OsmoMSC-A'
msgb(0xadfba0): Not enough headroom msgb_push (0 < 264)
So let's make sure the new SCCP User primitives are allocated with the
same headroom, just like before I19cb83302aaa404ab1a2d92e6f2aec43d0380426.
Change-Id: I92d7648f8ffd034341e2f12aa79dd3d16ec3a98d
It's a bad idea to use sccp_msgb_alloc() for SCCP User Primitive msgbs.
The rationale is quite simple: The SCU msgb's are used for wrapping
osmo_prim. The user payload data (e.g. BSSAP) in such primitives is
found at msgb->l2h. However, user payload data is optional. So in a
SCU primitive without user data, we must have msgb->l2h == NULL.
The old behavior resulted in bogus data (actually the sccp_user_prim)
to be contained in the DATA section of SCCP messages such as RLSD/RLC.
Also, the old implementation of scu_msgb_alloc() discarded the 'name'
argument and replaced it with a static "SCU" which was of course another
bug.
Change-Id: I19cb83302aaa404ab1a2d92e6f2aec43d0380426
Related: OS#2732
It can be cumbersome to derive the ss7 instance needed to pass to
sccp_addr_name(), because struct osmo_sccp_instance is opaque and only
available in sccp_internal.h, within libosmo-sccp.
Add osmo_sccp_inst_addr_name() which derives the ss7 instance from the internal
knowledge of the osmo_sccp_instance struct. This can save calls to
osmo_ss7_instance_find() just to do some logging of an sccp address.
Naming: first I thought to pick osmo_sccp_addr_name2(), but for some of the
string composing functions, adding a 2 already means that it is identical but
using a second static buffer (to be used twice within the same printf).
Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b
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
osmo_sccp_tx_unitdata_ranap()
Change-Id: I37395169d364050e45e99793c495a9848a4f8601
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.
Change-Id: Ie1aedd7894acd69ddc887cd65a8a0df4b888838c
When we crate a sccp address with PC+SSN, we should also set the routing
indicator accordingly (OSMO_SCCP_RI_SSN_PC).
Change-Id: Ie179df7158624520e90093da063c57f1e3efa0bd
If we use the infrastructure provided by osmo_ss7 on the lower layer and
the SCCP SCRC, SCLC and SCOC code on the upper side, not much of the
original sua.c code remains. It looks much like the M3UA code now.
Change-Id: I193b74f58aa70c443ae17e78b5604246d6bc3f71
libosmo-sigtran is GPLv2-or-later, there were some files that
accidentially had an AGPLv3 license header, which was a copy+paste
mistake at that time.
Change-Id: I67dfd0ae6157afafd3873a3baaa4c6107c04ddfd
Move here unchanged first, so we're able to see the modifications in diffs.
Pending changes will follow in subsequent patches.
Moved from osmo-iuh 3da8608b6ad014fc74536dbb49019704fd425b8c, which was before
the rename of osmo_sua_link and osmo_sua_user to osmo_sccp_link and
osmo_sccp_user, so this will not compile.
Change-Id: Iae0c58c5f1eb00a685de70add0d5257e4316c6d5