pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38627?usp=email )
Change subject: sigtran: Add API osmo_ss7_route_get_dest_as() ......................................................................
sigtran: Add API osmo_ss7_route_get_dest_as()
This is needed by users willing to get the AS from a routing entry, i.e. osmo-bsc needs to access this information in order to inject MGCP into the IPA multiplex conn transporting the SCCPLite signalling.
Change-Id: Ife63bd384d247a761e0b89505ea71c41a4a16d9b --- M TODO-RELEASE M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 3 files changed, 12 insertions(+), 1 deletion(-)
Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved
diff --git a/TODO-RELEASE b/TODO-RELEASE index 6d8cb80..06d4f53 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line libosmo-sigtran API change struct osmo_ss7_instance has new member 'secondary_pc' 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() \ No newline at end of file diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index d009958..3b5aa4f 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -214,7 +214,8 @@ void osmo_ss7_route_destroy(struct osmo_ss7_route *rt); const char *osmo_ss7_route_print(const struct osmo_ss7_route *rt); const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps); - +struct osmo_ss7_as * +osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt);
/*********************************************************************** * SS7 Application Servers diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 38b07da..95e58a7 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -882,6 +882,15 @@ return buf; }
+/*! \brief Get destination AS of route + * \param[in] rt Route entry holding the AS destination + * \returns pointer to Application Server on success; NULL if rt doesn't route + * to an AS (i.e. routes to a linkset). */ +struct osmo_ss7_as * +osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt) +{ + return rt->dest.as; +}
/*********************************************************************** * SS7 Application Server