pespin submitted this change.
sigtran: Add API osmo_ss7_instance_get_pc_fmt()
This allows getting the PC format of an osmo_ss7_instance without having to
access its structs fields directly
Change-Id: Ia7e259574f14969348d3bcaa1991247272958a7d
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/TODO-RELEASE b/TODO-RELEASE
index e732e2e..df47c0f 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -11,4 +11,4 @@
libosmo-sigtran add API osmo_sccp_{release,return,reset,error,refusal}_cause_name(s), osmo_sua_sccp_cause_name
libosmo-sigtran add API osmo_ss7_route_get_dest_as()
libosmo-sigtran Make private osmo_ss7_route
-libosmo-sigtran add API osmo_ss7_instance_get_id(), osmo_ss7_instance_get_name()
+libosmo-sigtran add API osmo_ss7_instance_get_id(), osmo_ss7_instance_get_name(), osmo_ss7_instance_get_pc_fmt()
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 2eb4ede..5d5ba40 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -92,6 +92,8 @@
int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst,
uint8_t c0, uint8_t c1, uint8_t c2);
+const struct osmo_ss7_pc_fmt *
+osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst);
struct osmo_sccp_instance *osmo_ss7_ensure_sccp(struct osmo_ss7_instance *inst);
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 758f293..cbe7b7e 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -419,6 +419,12 @@
return 0;
}
+const struct osmo_ss7_pc_fmt *
+osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst)
+{
+ return &inst->cfg.pc_fmt;
+}
+
/*! Allocate an SCCP instance, if not present yet.
* \returns inst->sccp. */
struct osmo_sccp_instance *osmo_ss7_ensure_sccp(struct osmo_ss7_instance *inst)
To view, visit change 38652. To unsubscribe, or for help writing mail filters, visit settings.