Add osmo_ss7_asp getters for name and proto
Some apps such as osmo-bsc are accessing some of those fields, so better add a getter API to make it easier to update the struct contents. Change-Id: If9acfca1abc9ab7eb6d2388f548d7ee577b9c5ac
This commit is contained in:
parent
5d30f648f4
commit
af768c716a
|
@ -8,4 +8,5 @@
|
|||
# If any interfaces have been removed or changed since the last public release: c:r:0.
|
||||
#library what description / commit summary line
|
||||
libosmocore >1.8.0 uses new osmo_prim_operation_name()
|
||||
libosmo-sccp add API osmo_ss7_asp_get_name(), osmo_ss7_asp_get_proto()
|
||||
osmo_sccp_simple_client_on_ss7_id() behavior change: ASPs asp-clnt-* defined through VTY must explicitly configure "role" and "sctp-role"
|
|
@ -471,6 +471,8 @@ int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
|
|||
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
|
||||
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
|
||||
int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
|
||||
const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp);
|
||||
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp);
|
||||
|
||||
/*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
|
||||
* This function can be overridden by application code to implement whatever handling
|
||||
|
|
|
@ -2432,6 +2432,24 @@ int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp)
|
|||
}
|
||||
}
|
||||
|
||||
/*! \brief Get the name of a given ASP
|
||||
* \param[in] asp The ASP for which the name is requested
|
||||
* \returns The name of the ASP, or NULL if not set
|
||||
*/
|
||||
const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp)
|
||||
{
|
||||
return asp->cfg.name;
|
||||
}
|
||||
|
||||
/*! \brief Get the proto of a given ASP
|
||||
* \param[in] asp The ASP for which the proto is requested
|
||||
* \returns The proto of the ASP
|
||||
*/
|
||||
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp)
|
||||
{
|
||||
return asp->cfg.proto;
|
||||
}
|
||||
|
||||
/*! Register a call-back function for unknown SCTP PPID / IPA Stream ID */
|
||||
void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue