neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/32214 )
Change subject: add two value_string[]s related to N-PCSTATE
......................................................................
add two value_string[]s related to N-PCSTATE
Related: SYS#6319
Change-Id: I873ea30e8f64280487769668c748c67ce4ff4023
---
M include/osmocom/sigtran/sccp_sap.h
M src/sccp_sap.c
2 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/14/32214/1
diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h
index 4bcdd38..ca47036 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -143,6 +143,13 @@
OSMO_SCCP_SP_S_CONGESTED = 2,
OSMO_SCCP_SP_S_ACCESSIBLE = 3,
};
+
+extern const struct value_string osmo_sccp_sp_status_names[];
+static inline const char *osmo_sccp_sp_status_name(enum osmo_sccp_sp_status val)
+{
+ return get_value_string(osmo_sccp_sp_status_names, val);
+}
+
/* Q.711 6.3.2.2.6 Remote SCCP status */
enum osmo_sccp_rem_sccp_status {
OSMO_SCCP_REM_SCCP_S_AVAILABLE = 1,
@@ -152,6 +159,12 @@
OSMO_SCCP_REM_SCCP_S_CONGESTED = 5,
};
+extern const struct value_string osmo_sccp_rem_sccp_status_names[];
+static inline const char *osmo_sccp_rem_sccp_status_name(enum osmo_sccp_rem_sccp_status
val)
+{
+ return get_value_string(osmo_sccp_rem_sccp_status_names, val);
+}
+
/* legacy shim for name change */
#define OSMO_SCCP_SSN_SMLC_BSSAP OSMO_SCCP_SSN_SMLC_BSSAP_LE
diff --git a/src/sccp_sap.c b/src/sccp_sap.c
index 51237ad..b3bc3e8 100644
--- a/src/sccp_sap.c
+++ b/src/sccp_sap.c
@@ -120,6 +120,22 @@
{ 0, NULL }
};
+const struct value_string osmo_sccp_sp_status_names[] = {
+ { OSMO_SCCP_SP_S_INACCESSIBLE, "INACCESSIBLE" },
+ { OSMO_SCCP_SP_S_CONGESTED, "CONGESTED" },
+ { OSMO_SCCP_SP_S_ACCESSIBLE, "ACCESSIBLE" },
+ {}
+};
+
+const struct value_string osmo_sccp_rem_sccp_status_names[] = {
+ { OSMO_SCCP_REM_SCCP_S_AVAILABLE, "AVAILABLE" },
+ { OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN, "UNAVAILABLE_UNKNOWN" },
+ { OSMO_SCCP_REM_SCCP_S_UNEQUIPPED, "UNEQUIPPED" },
+ { OSMO_SCCP_REM_SCCP_S_INACCESSIBLE, "INACCESSIBLE" },
+ { OSMO_SCCP_REM_SCCP_S_CONGESTED, "CONGESTED" },
+ {}
+};
+
const struct value_string osmo_sccp_ssn_names[] = {
{ OSMO_SCCP_SSN_MGMT, "MGMT" },
{ OSMO_SCCP_SSN_ISUP, "ISUP" },
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/32214
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I873ea30e8f64280487769668c748c67ce4ff4023
Gerrit-Change-Number: 32214
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange