add two value_string[]s related to N-PCSTATE

Related: SYS#6319
Change-Id: I873ea30e8f64280487769668c748c67ce4ff4023
This commit is contained in:
Neels Hofmeyr 2023-03-30 05:25:37 +02:00
parent 79c64ab555
commit 078622128a
2 changed files with 29 additions and 0 deletions

View File

@ -143,6 +143,13 @@ enum osmo_sccp_sp_status {
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 @@ enum osmo_sccp_rem_sccp_status {
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

View File

@ -120,6 +120,22 @@ const struct value_string osmo_sccp_gti_names[] = {
{ 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" },