From 002a51d7319a5d24fede88eaae5c155b3c2fd6aa Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 30 Oct 2019 04:37:47 +0100 Subject: add osmo_sockaddr_str_cmp() Currently planned user: for Distributed GSM in osmo-hlr: setting per-MSC service addresses in VTY: replace/remove existing entries. osmo_sockaddr_str_cmp() is useful to catch identical resulting IP addresses, regardless of differing strings (e.g. '0::' and '::' are equal but differ in strings). Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 --- include/osmocom/core/sockaddr_str.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/osmocom/core/sockaddr_str.h') diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index 6dd428c7..d7a8cdf6 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -70,6 +70,7 @@ struct osmo_sockaddr_str { bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str); bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str); +int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b); int osmo_sockaddr_str_from_str(struct osmo_sockaddr_str *sockaddr_str, const char *ip, uint16_t port); -- cgit v1.2.3