pespin submitted this change.
sigtran: Add API osmo_ss7_as_get_asp_protocol()
This is currently needed for osmo-bsc, otherwise it's accessing the
struct field of osmo_ss7-as directly.
Change-Id: I6171287c9bc76db6561f8ff92c4aebe453efaa7d
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7_as.c
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/TODO-RELEASE b/TODO-RELEASE
index f56b4e5..261567c 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -13,3 +13,4 @@
libosmo-sigtran Make private osmo_ss7_route
libosmo-sigtran add API osmo_ss7_instance_get_id(), osmo_ss7_instance_get_name(), osmo_ss7_instance_get_pc_fmt(), osmo_ss7_instance_get_primary_pc(), osmo_ss7_get_sccp()
libosmo-sigtran add API osmo_ss7_instances_llist_entry()
+libosmo-sigtran add API osmo_ss7_as_get_asp_protocol()
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index d4fb87b..83956d8 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -268,6 +268,7 @@
struct osmo_ss7_as *
osmo_ss7_as_find_or_create(struct osmo_ss7_instance *inst, const char *name,
enum osmo_ss7_asp_protocol proto);
+enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol(const struct osmo_ss7_as *as);
int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name);
int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
index cc61b12..5af7098 100644
--- a/src/osmo_ss7_as.c
+++ b/src/osmo_ss7_as.c
@@ -95,6 +95,14 @@
return as;
}
+/*! \brief Get asp_protocol configuration of a given AS
+ * \param[in] as Application Server in which to look for \ref asp_protocol
+ * \returns The asp_protocol this AS is configured with */
+enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol(const struct osmo_ss7_as *as)
+{
+ return as->cfg.proto;
+}
+
/*! \brief Add given ASP to given AS
* \param[in] as Application Server to which \ref asp is added
* \param[in] asp Application Server Process to be added to \ref as
To view, visit change 38717. To unsubscribe, or for help writing mail filters, visit settings.