pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38652?usp=email )
Change subject: sigtran: Add API osmo_ss7_instance_get_pc_fmt() ......................................................................
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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/52/38652/1
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 34d0467..eaf3855 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -99,6 +99,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 0512b6b..667d1ad 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -413,6 +413,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)