pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sigtran/+/38651?usp=email )
Change subject: sigtran: Add API osmo_ss7_instance_get_name()
......................................................................
sigtran: Add API osmo_ss7_instance_get_name()
This allows getting the name of an osmo_ss7_instance without having to
access its structs fields directly.
Change-Id: I521b0b140c600dbd8d32721329ea02668ceac576
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
3 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/51/38651/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 5ede826..e732e2e 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()
+libosmo-sigtran add API osmo_ss7_instance_get_id(), osmo_ss7_instance_get_name()
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index d9d62a8..34d0467 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -95,6 +95,7 @@
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst);
uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst);
+const char *osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst);
int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst,
uint8_t c0, uint8_t c1, uint8_t c2);
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index ff771cb..0512b6b 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -390,6 +390,11 @@
return inst->cfg.id;
}
+const char *osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst)
+{
+ return inst->cfg.name;
+}
+
/*! \brief Set the point code format used in given SS7 instance */
int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst,
uint8_t c0, uint8_t c1, uint8_t c2)
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/38651?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I521b0b140c600dbd8d32721329ea02668ceac576
Gerrit-Change-Number: 38651
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>