summaryrefslogtreecommitdiffstats
path: root/include/osmocom/sigtran/sccp_sap.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-26 18:07:53 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-08-09 13:54:44 +0200
commit603e065f43a9b0a6d9d92584ba458fefee32b516 (patch)
tree3d2df2bb9d4890ff31b5037445b6c88bd540bb0e /include/osmocom/sigtran/sccp_sap.h
parentc881c4912709be005cbb3ffb02ba06f13c69d24b (diff)
add osmo_sccp_addr_name() and three value_string[]s
osmo_sccp_addr_dump() just prints the raw values. In osmo_sccp_addr_name(), use osmo_ss7_pointcode_print() and newly added RI, SSN and GT value_string[] to print more human readable log output. Change-Id: Ie1aedd7894acd69ddc887cd65a8a0df4b888838c
Diffstat (limited to 'include/osmocom/sigtran/sccp_sap.h')
-rw-r--r--include/osmocom/sigtran/sccp_sap.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h
index 13b1022..796597f 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -60,6 +60,11 @@ enum osmo_sccp_routing_ind {
OSMO_SCCP_RI_SSN_IP,
};
+extern const struct value_string osmo_sccp_routing_ind_names[];
+static inline const char *osmo_sccp_routing_ind_name(enum osmo_sccp_routing_ind val)
+{ return get_value_string(osmo_sccp_routing_ind_names, val); }
+
+
/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */
enum osmo_sccp_gti {
OSMO_SCCP_GTI_NO_GT,
@@ -69,6 +74,10 @@ enum osmo_sccp_gti {
OSMO_SCCP_GTI_TT_NPL_ENC_NAI,
};
+extern const struct value_string osmo_sccp_gti_names[];
+static inline const char *osmo_sccp_gti_name(enum osmo_sccp_gti val)
+{ return get_value_string(osmo_sccp_gti_names, val); }
+
/* RFC 3868 3.10.2.3 */
enum osmo_sccp_npi {
OSMO_SCCP_NPI_UNKNOWN = 0,
@@ -126,6 +135,10 @@ enum osmo_sccp_ssn {
OSMO_SCCP_SSN_BSS_OAM = 253,
};
+extern const struct value_string osmo_sccp_ssn_names[];
+static inline const char *osmo_sccp_ssn_name(enum osmo_sccp_ssn val)
+{ return get_value_string(osmo_sccp_ssn_names, val); }
+
struct osmo_sccp_gt {
uint8_t gti;
uint8_t tt;