Commit Graph

14 Commits

Author SHA1 Message Date
Max bb760c5915 SIGTRAN: add osmo_sccp_tx_disconn_data() helper
SCCP RLSD message might have up to 130 bytes of optional data according to ITU-T Rec Q.713 §4.5 - add helper which
allows sending it and use it in example code.

Related: OS#5579
Change-Id: I92ae22d2cab5863245fba3d904a300055fda34fe
2022-08-22 20:33:12 +07:00
Max 196ddcbb05 SIGTRAN: add function to check connection existence
Add convenience helper to check if particular connection ID exists and use it to
properly report errors when attempting to send messages over non-existent connections.

Change-Id: Iffedf55b4c292ee6b2f97bcdeef6dc13c050ce01
2022-08-22 18:36:51 +07:00
Neels Hofmeyr 7a4f614ba9 add osmo_sccp_addr_to_id_c()
Change-Id: Iadd34a167a7712796b2501f6a75b5a8d26a828eb
2020-09-23 21:13:18 +02:00
Neels Hofmeyr 134e463230 add osmo_sccp_addr_to_str_c osmo_sccp_inst_addr_to_str_c
Change-Id: Ia7f9d891ea92abd20855374b936aac8b28ae15df
2020-09-22 22:47:24 +02:00
Neels Hofmeyr 12715e8e99 add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_name()
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
2017-11-08 02:33:14 +01:00
Philipp Maier 564ff61800 sccp: make osmo_sccp_addr_name() available
osmo_sccp_addr_name() is not listed in any header file.

Add osmo_sccp_addr_name() to sccp_helpers.h in order to make
it available.

Change-Id: I092dd55948faeeff78f28f7d50c5b84b9e69ef24
2017-08-11 14:31:35 +02:00
Neels Hofmeyr 473048d0d2 add osmo_sccp_addr_set_ssn()
Will be used by e.g. osmo-hnbgw to add an SSN to addresses obtained from the
sccp address book.

Change-Id: I85b46269dbe7909e52873ace3f720f6292a4516c
2017-08-07 16:04:39 +02:00
Neels Hofmeyr 4313bdfa20 sccp_helpers.h: remove duplicate declaration of osmo_sccp_make_addr_pc_ssn()
Change-Id: Ifbb03de3df3b9bac86fb97dfc8e81e99fc172292
2017-06-29 19:56:31 +02:00
Harald Welte d40b9f842b SUA: Port to new osmo_ss7 and SCCP code
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
2017-04-10 11:48:34 +02:00
Harald Welte 0ebde0c42d sccp_helpers: Add osmo_sccp_{addr,gt}_dump() functions
They stringify a global title or SCCP address for human consumption

Change-Id: I630308aa4519c6e9a260419d37a376aac6a1ce28
2017-02-13 15:09:17 +01:00
Neels Hofmeyr e734655afb sccp_helpers: add convenience function for RANAP unitdata
Change-Id: Ie96d78512b8e3907753272d75471b882365968c4
2017-02-13 13:58:09 +00:00
Neels Hofmeyr 199b97652b sccp_helpers: add osmo_ prefix to all functions
Change-Id: I839c976f3ac722b955da18216de3df2eaa4c5af3
2017-02-13 13:58:01 +00:00
Neels Hofmeyr c07796dc3b sccp_helpers.h/.c: fix: apply rename of osmo_sua_link to osmo_sccp_link
Change-Id: If8b09bb05297ebf663b4a04d3cc094a6a8087f53
2017-02-13 13:57:44 +00:00
Neels Hofmeyr 86cfe9b3b4 Add sccp_helpers.[hc] moved from osmo-iuh, 1:1 at first
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
2017-02-13 13:57:29 +00:00