From 34cb3c16a597e5793cfb59b1772967e0a5e89489 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 14 Jun 2017 18:08:59 +0200 Subject: sccp: add addressbook functionality for sccp addresses SCCP addresses are defined through a number of compoinents, not just an IP-Address, there is also point code, ssn and more. To simplify and unify the handling of such objects, this patch introduces an addressbook functionality. The user can set up multiple addresses per ss7 instance and give them names. Later that name can be used to reference the address at a later point in the config. This means that the usage of sccp-addresses from the programmers point of view boils down to a VTY function that reads the string name of a previously defined address. The programmer can then use the API to get a pointer to the SCCP address struct and use it normally. For this feature, two additional VTY nodes are necessary, this commit depends libosmocore change: Change-Id I42aa29c0cccc97f284b85801c5329b015b189640 Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942 --- include/osmocom/sigtran/sccp_sap.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/osmocom/sigtran/sccp_sap.h') diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index f378e5c..2258b0d 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -247,3 +247,9 @@ osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn); int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); + +struct osmo_sccp_addr * +osmo_sccp_addr_by_name(const char *name, const struct osmo_ss7_instance *ss7); + +char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr, + const struct osmo_ss7_instance *ss7); -- cgit v1.2.3