path: root/include
diff options
authorNeels Hofmeyr <>2019-01-25 15:47:24 +0100
committerNeels Hofmeyr <>2019-04-12 06:28:34 +0200
commit21ff9ae4264de159784a59ce4421365007bde08d (patch)
treea4ba9ac2e9d3f4e653f09d263eac302eeaca9089 /include
parentac729eb5a8295d0c1fc2dea3fb0f56413654c13e (diff)
add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp()
osmo-msc identifies its BSC and RNC peers by SCCP address, and compares those by memcmp(), which is not really accurate. Rather provide a meaningful osmo_sccp_addr_cmp() API to determine whether SCCP addresses are identical. Go for a full cmp that would also allow sorting. Change-Id: Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5
Diffstat (limited to 'include')
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h
index f64b7aa..9d285eb 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -276,5 +276,8 @@ void osmo_sccp_local_addr_by_instance(struct osmo_sccp_addr *dest_addr,
uint32_t ssn);
bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence);
+int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria);
+int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b);
+int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b);
const char *osmo_sccp_user_name(struct osmo_sccp_user *scu);