From 12715e8e995b51e6d904a9dd8f4abf09fadc335c Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 8 Nov 2017 02:27:36 +0100 Subject: add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_name() It can be cumbersome to derive the ss7 instance needed to pass to sccp_addr_name(), because struct osmo_sccp_instance is opaque and only available in sccp_internal.h, within libosmo-sccp. Add osmo_sccp_inst_addr_name() which derives the ss7 instance from the internal knowledge of the osmo_sccp_instance struct. This can save calls to osmo_ss7_instance_find() just to do some logging of an sccp address. Naming: first I thought to pick osmo_sccp_addr_name2(), but for some of the string composing functions, adding a 2 already means that it is identical but using a second static buffer (to be used twice within the same printf). Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b --- include/osmocom/sigtran/sccp_helpers.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/osmocom/sigtran/sccp_helpers.h b/include/osmocom/sigtran/sccp_helpers.h index c2175f4..3ef7740 100644 --- a/include/osmocom/sigtran/sccp_helpers.h +++ b/include/osmocom/sigtran/sccp_helpers.h @@ -55,3 +55,4 @@ int osmo_sccp_tx_conn_resp(struct osmo_sccp_user *scu, uint32_t conn_id, char *osmo_sccp_gt_dump(const struct osmo_sccp_gt *gt); char *osmo_sccp_addr_dump(const struct osmo_sccp_addr *addr); char *osmo_sccp_addr_name(const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr); +char *osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr); -- cgit v1.2.3