Change in libosmo-sccp[master]: add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp()

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Apr 18 13:10:31 UTC 2019


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13118 )

Change subject: add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp()
......................................................................

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
---
M include/osmocom/sigtran/sccp_sap.h
M src/sccp_user.c
M tests/xua/xua_test.c
M tests/xua/xua_test.ok
4 files changed, 392 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



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 @@
 				      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);
diff --git a/src/sccp_user.c b/src/sccp_user.c
index 8a98e46..63eba2a 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -293,6 +293,124 @@
 	return true;
 }
 
+/*! Compare two SCCP Global Titles.
+ * \param[in] a  left side.
+ * \param[in] b  right side.
+ * \return -1 if a < b, 1 if a > b, and 0 if a == b.
+ */
+int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b)
+{
+	if (a == b)
+		return 0;
+	if (!a)
+		return -1;
+	if (!b)
+		return 1;
+	return memcmp(a, b, sizeof(*a));
+}
+
+/*! Compare two SCCP addresses by given presence criteria.
+ * Any OSMO_SCCP_ADDR_T_* type not set in presence_criteria is ignored.
+ * In case all bits are set in presence_criteria, the comparison is in the order of:
+ * OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_SSN.
+ * The SCCP addresses' Routing Indicator is not compared, see osmo_sccp_addr_ri_cmp().
+ * \param[in] a  left side.
+ * \param[in] b  right side.
+ * \param[in] presence_criteria  A bitmask of OSMO_SCCP_ADDR_T_* values, or 0xffffffff to compare all parts, except the
+ *                               routing indicator.
+ * \return -1 if a < b, 1 if a > b, and 0 if all checked values match.
+ */
+int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria)
+{
+	int rc;
+	if (a == b)
+		return 0;
+	if (!a)
+		return -1;
+	if (!b)
+		return 1;
+
+	if (presence_criteria & OSMO_SCCP_ADDR_T_GT) {
+		if ((a->presence & OSMO_SCCP_ADDR_T_GT) != (b->presence & OSMO_SCCP_ADDR_T_GT))
+			return (b->presence & OSMO_SCCP_ADDR_T_GT) ? -1 : 1;
+		rc = osmo_sccp_gt_cmp(&a->gt, &b->gt);
+		if (rc)
+			return rc;
+	}
+
+	if (presence_criteria & OSMO_SCCP_ADDR_T_PC) {
+		if ((a->presence & OSMO_SCCP_ADDR_T_PC) != (b->presence & OSMO_SCCP_ADDR_T_PC))
+			return (b->presence & OSMO_SCCP_ADDR_T_PC) ? -1 : 1;
+
+		if ((a->presence & OSMO_SCCP_ADDR_T_PC)
+		    && a->pc != b->pc)
+			return (a->pc < b->pc)? -1 : 1;
+	}
+
+	if (presence_criteria & OSMO_SCCP_ADDR_T_IPv4) {
+		if ((a->presence & OSMO_SCCP_ADDR_T_IPv4) != (b->presence & OSMO_SCCP_ADDR_T_IPv4))
+			return (b->presence & OSMO_SCCP_ADDR_T_IPv4) ? -1 : 1;
+		rc = memcmp(&a->ip.v4, &b->ip.v4, sizeof(a->ip.v4));
+		if (rc)
+			return rc;
+	}
+
+	if (presence_criteria & OSMO_SCCP_ADDR_T_IPv6) {
+		if ((a->presence & OSMO_SCCP_ADDR_T_IPv6) != (b->presence & OSMO_SCCP_ADDR_T_IPv6))
+			return (b->presence & OSMO_SCCP_ADDR_T_IPv6) ? -1 : 1;
+		rc = memcmp(&a->ip.v6, &b->ip.v6, sizeof(a->ip.v6));
+		if (rc)
+			return rc;
+	}
+
+	if (presence_criteria & OSMO_SCCP_ADDR_T_SSN) {
+		if ((a->presence & OSMO_SCCP_ADDR_T_SSN) != (b->presence & OSMO_SCCP_ADDR_T_SSN))
+			return (b->presence & OSMO_SCCP_ADDR_T_SSN) ? -1 : 1;
+		if (a->ssn != b->ssn)
+			return (a->ssn < b->ssn) ? -1 : 1;
+	}
+
+	return 0;
+}
+
+/*! Compare the routing information of two SCCP addresses.
+ * Compare the ri of a and b, and, if equal, return osmo_sccp_addr_cmp() with presence criteria selected according to
+ * ri.
+ * \param[in] a  left side.
+ * \param[in] b  right side.
+ * \return -1 if a < b, 1 if a > b, and 0 if a == b.
+ */
+int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b)
+{
+	uint32_t presence_criteria;
+	if (a == b)
+		return 0;
+	if (!a)
+		return -1;
+	if (!b)
+		return 1;
+	if (a->ri != b->ri)
+		return (a->ri < b->ri) ? -1 : 1;
+	switch (a->ri) {
+	case OSMO_SCCP_RI_NONE:
+		return 0;
+	case OSMO_SCCP_RI_GT:
+		presence_criteria = OSMO_SCCP_ADDR_T_GT;
+		break;
+	case OSMO_SCCP_RI_SSN_PC:
+		presence_criteria = OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC;
+		break;
+	case OSMO_SCCP_RI_SSN_IP:
+		/* Pick IPv4 or v6 depending on what a->presence indicates. */
+		presence_criteria = OSMO_SCCP_ADDR_T_SSN | (a->presence & (OSMO_SCCP_ADDR_T_IPv4 | OSMO_SCCP_ADDR_T_IPv6));
+		break;
+	default:
+		return 0;
+	}
+
+	return osmo_sccp_addr_cmp(a, b, presence_criteria);
+}
+
 /*! Compose a human readable string to describe the SCCP user's connection.
  * The output follows ['<scu.name>':]<local-sccp-addr>, e.g.  "'OsmoHNBW':RI=SSN_PC,PC=0.23.5,SSN=RANAP",
  * or just "RI=SSN_PC,PC=0.23.5,SSN=RANAP" if no scu->name is set.
diff --git a/tests/xua/xua_test.c b/tests/xua/xua_test.c
index 37ba645..77daa56 100644
--- a/tests/xua/xua_test.c
+++ b/tests/xua/xua_test.c
@@ -569,6 +569,32 @@
 	talloc_free(xua);
 }
 
+void test_sccp_addr_cmp()
+{
+	int ai;
+	int bi;
+	int rc;
+
+	printf("\n%s()\n", __func__);
+
+	for (ai = 0; ai < ARRAY_SIZE(enc_cases); ai++) {
+		for (bi = 0; bi < ARRAY_SIZE(enc_cases); bi++) {
+			struct osmo_sccp_addr a = enc_cases[ai].addr_in;
+			struct osmo_sccp_addr b = enc_cases[bi].addr_in;
+
+			rc = osmo_sccp_addr_cmp(&a, &b, a.presence);
+			rc = OSMO_MIN(1, OSMO_MAX(-1, rc));
+			printf(" [%2d] vs. [%2d]: %2d = osmo_sccp_addr_cmp( %s ,", ai, bi, rc, osmo_sccp_addr_dump(&a));
+			printf(" %s, 0x%x )\n", osmo_sccp_addr_dump(&b), a.presence);
+
+			rc = osmo_sccp_addr_ri_cmp(&a, &b);
+			rc = OSMO_MIN(1, OSMO_MAX(-1, rc));
+			printf("                %2d = osmo_sccp_addr_ri_cmp( %s ,", rc, osmo_sccp_addr_dump(&a));
+			printf(" %s )\n", osmo_sccp_addr_dump(&b));
+		}
+	}
+};
+
 
 static const struct log_info_cat default_categories[] = {
 	[0] = {
@@ -598,6 +624,7 @@
 	test_sccp2sua();
 	test_rkm();
 	test_sccp_addr_encdec();
+	test_sccp_addr_cmp();
 
 	printf("All tests passed.\n");
 	return 0;
diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok
index 83b8b8d..f93b41e 100644
--- a/tests/xua/xua_test.ok
+++ b/tests/xua/xua_test.ok
@@ -205,4 +205,248 @@
 expected addr: 10031204a1fb
 decod addr: RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF)
 
+
+test_sccp_addr_cmp()
+ [ 0] vs. [ 0]:  0 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=2,PC=1024, 0x2 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=2,PC=1024 )
+ [ 0] vs. [ 1]: -1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=2,PC=16383, 0x2 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=2,PC=16383 )
+ [ 0] vs. [ 2]: -1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=2,PC=16383,SSN=90, 0x2 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=2,PC=16383,SSN=90 )
+ [ 0] vs. [ 3]: -1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=2,PC=16383,GTI=1,GT=(), 0x2 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=2,PC=16383,GTI=1,GT=() )
+ [ 0] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=1,GT=(), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=1,GT=() )
+ [ 0] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=2,GT=(TT=3,DIG=), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 0] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 0] vs. [ 7]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 0] vs. [ 8]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 0] vs. [ 9]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=23,GT=(DIG=1234), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 0] vs. [10]:  1 = osmo_sccp_addr_cmp( RI=2,PC=1024 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=1024 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 1] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=2,PC=1024, 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=2,PC=1024 )
+ [ 1] vs. [ 1]:  0 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=2,PC=16383, 0x2 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=2,PC=16383 )
+ [ 1] vs. [ 2]:  0 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=2,PC=16383,SSN=90, 0x2 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=2,PC=16383,SSN=90 )
+ [ 1] vs. [ 3]:  0 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=2,PC=16383,GTI=1,GT=(), 0x2 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=2,PC=16383,GTI=1,GT=() )
+ [ 1] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=1,GT=(), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=1,GT=() )
+ [ 1] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=2,GT=(TT=3,DIG=), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 1] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 1] vs. [ 7]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 1] vs. [ 8]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 1] vs. [ 9]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=23,GT=(DIG=1234), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 1] vs. [10]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x2 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 2] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=1024, 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=1024 )
+ [ 2] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=16383, 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=16383 )
+ [ 2] vs. [ 2]:  0 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=16383,SSN=90, 0x6 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=16383,SSN=90 )
+ [ 2] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=16383,GTI=1,GT=(), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=2,PC=16383,GTI=1,GT=() )
+ [ 2] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=1,GT=(), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=1,GT=() )
+ [ 2] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=2,GT=(TT=3,DIG=), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 2] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 2] vs. [ 7]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 2] vs. [ 8]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 2] vs. [ 9]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=23,GT=(DIG=1234), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 2] vs. [10]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x6 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,SSN=90 , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 3] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=1024, 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=1024 )
+ [ 3] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=16383, 0x3 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=16383 )
+ [ 3] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=16383,SSN=90, 0x3 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=16383,SSN=90 )
+ [ 3] vs. [ 3]:  0 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=16383,GTI=1,GT=(), 0x3 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=2,PC=16383,GTI=1,GT=() )
+ [ 3] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=1,GT=(), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=1,GT=() )
+ [ 3] vs. [ 5]: -1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=2,GT=(TT=3,DIG=), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 3] vs. [ 6]: -1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 3] vs. [ 7]: -1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 3] vs. [ 8]: -1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 3] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=23,GT=(DIG=1234), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 3] vs. [10]: -1 = osmo_sccp_addr_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x3 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=2,PC=16383,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 4] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=2,PC=1024 )
+ [ 4] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=2,PC=16383 )
+ [ 4] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=2,PC=16383,SSN=90 )
+ [ 4] vs. [ 3]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=2,PC=16383,GTI=1,GT=() )
+ [ 4] vs. [ 4]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=1,GT=(), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=1,GT=() )
+ [ 4] vs. [ 5]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 4] vs. [ 6]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 4] vs. [ 7]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 4] vs. [ 8]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 4] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 4] vs. [10]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=1,GT=() , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 5] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=1024 )
+ [ 5] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=16383 )
+ [ 5] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=16383,SSN=90 )
+ [ 5] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=2,PC=16383,GTI=1,GT=() )
+ [ 5] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=1,GT=(), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=1,GT=() )
+ [ 5] vs. [ 5]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 5] vs. [ 6]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 5] vs. [ 7]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 5] vs. [ 8]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 5] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 5] vs. [10]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=2,GT=(TT=3,DIG=) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 6] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=1024 )
+ [ 6] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=16383 )
+ [ 6] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=16383,SSN=90 )
+ [ 6] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=2,PC=16383,GTI=1,GT=() )
+ [ 6] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=1,GT=(), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=1,GT=() )
+ [ 6] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 6] vs. [ 6]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 6] vs. [ 7]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 6] vs. [ 8]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 6] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 6] vs. [10]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 7] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=1024 )
+ [ 7] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=16383 )
+ [ 7] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=16383,SSN=90 )
+ [ 7] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=2,PC=16383,GTI=1,GT=() )
+ [ 7] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=1,GT=(), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=1,GT=() )
+ [ 7] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 7] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 7] vs. [ 7]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 7] vs. [ 8]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 7] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 7] vs. [10]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 8] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=1024 )
+ [ 8] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=16383 )
+ [ 8] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=16383,SSN=90 )
+ [ 8] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=2,PC=16383,GTI=1,GT=() )
+ [ 8] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=1,GT=(), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=1,GT=() )
+ [ 8] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 8] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 8] vs. [ 7]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 8] vs. [ 8]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 8] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 8] vs. [10]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [ 9] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=1024 )
+ [ 9] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=16383 )
+ [ 9] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=16383,SSN=90 )
+ [ 9] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=2,PC=16383,GTI=1,GT=() )
+ [ 9] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=1,GT=(), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=1,GT=() )
+ [ 9] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [ 9] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [ 9] vs. [ 7]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [ 9] vs. [ 8]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [ 9] vs. [ 9]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=23,GT=(DIG=1234) )
+ [ 9] vs. [10]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=23,GT=(DIG=1234) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
+ [10] vs. [ 0]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=1024, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=1024 )
+ [10] vs. [ 1]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=16383, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=16383 )
+ [10] vs. [ 2]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=16383,SSN=90, 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=16383,SSN=90 )
+ [10] vs. [ 3]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=16383,GTI=1,GT=(), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=2,PC=16383,GTI=1,GT=() )
+ [10] vs. [ 4]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=1,GT=(), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=1,GT=() )
+ [10] vs. [ 5]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=2,GT=(TT=3,DIG=), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=2,GT=(TT=3,DIG=) )
+ [10] vs. [ 6]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=123) )
+ [10] vs. [ 7]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=3,GT=(TT=3,NPL=1,DIG=1234) )
+ [10] vs. [ 8]:  1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234), 0x1 )
+                 1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1234) )
+ [10] vs. [ 9]: -1 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=23,GT=(DIG=1234), 0x1 )
+                -1 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=23,GT=(DIG=1234) )
+ [10] vs. [10]:  0 = osmo_sccp_addr_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF), 0x1 )
+                 0 = osmo_sccp_addr_ri_cmp( RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) , RI=1,GTI=4,GT=(TT=3,NPL=1,NAI=4,DIG=1ABF) )
 All tests passed.

-- 
To view, visit https://gerrit.osmocom.org/13118
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5
Gerrit-Change-Number: 13118
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <suraev at alumni.ntnu.no>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190418/2e854aee/attachment.html>


More information about the gerrit-log mailing list