path: root/include
diff options
authorPhilipp Maier <>2017-07-19 18:41:09 +0200
committerHarald Welte <>2017-07-22 09:08:13 +0000
commitdae7491c14f5e7bdfecb25fba5c2624127daadc8 (patch)
tree8780c71d3873a5771bffb08cf001455bf8df8969 /include
parent9fc351de69a2f3f451a2c44145fbabb156ef410a (diff)
sccp: make simple client configurable via VTY
The osmo_sccp_simple_client_on_ss7_id and osmo_sccp_simple_client are not entirely configurable via VTY commands. The relation to the VTY is implicit. The user may set up instance objects via VTY (cs7/ss7, AS, ASP), which are then automatically created on startup. Each cs7 instance gets its own ID via the VTY configuration. When osmo_sccp_simple_client_on_ss7_id() is called with the cs7 instance id. (for osmo_sccp_simple_client() the ID will be hardcoded to 1), the function automatically checks if the CS7 instance is present, if not it will create one automatically using the caller supplied parameters as a defult. If a CS7 instance is present, the function checks for the presence of an AS and an ASP. These objects are present, they will be used. If not, new objects will be created. Both functions must not be called if an SCCP instance is already present. Since there can only be one SCCP instance per CS7 instance, this is an error condition. Add additional logic that checks to detect an already existing, valid configuration. If no or an insufficient configuration is detected, use the caller supplied parameters as default configuration. Change-Id: I293f3526ce6182dca74a169a23449dbc7af57c7c
Diffstat (limited to 'include')
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 57a4e06..87ace4a 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -307,6 +307,8 @@ struct osmo_ss7_as *
osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx);
struct osmo_ss7_as *
osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id);
+struct osmo_ss7_as *osmo_ss7_as_find_by_proto(struct osmo_ss7_instance *inst,
+ enum osmo_ss7_asp_protocol proto);
struct osmo_ss7_as *
osmo_ss7_as_find_or_create(struct osmo_ss7_instance *inst, const char *name,
enum osmo_ss7_asp_protocol proto);
@@ -383,6 +385,9 @@ struct osmo_ss7_asp {
struct osmo_ss7_asp *
osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name);
+struct osmo_ss7_asp
+*osmo_ss7_asp_find_by_proto(struct osmo_ss7_as *as,
+ enum osmo_ss7_asp_protocol proto);
struct osmo_ss7_asp *
osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name,
uint16_t remote_port, uint16_t local_port,