diff options
Diffstat (limited to 'src/gsm')
-rw-r--r-- | src/gsm/gsup.c | 18 | ||||
-rw-r--r-- | src/gsm/libosmogsm.map | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index a0893221..71dbbe18 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -477,6 +477,10 @@ int osmo_gsup_decode(const uint8_t *const_data, size_t data_len, gsup_msg->imei_result = osmo_decode_big_endian(value, value_len) + 1; break; + case OSMO_GSUP_MESSAGE_CLASS_IE: + gsup_msg->message_class = value[0]; + break; + default: LOGP(DLGSUP, LOGL_NOTICE, "GSUP IE type %d unknown\n", iei); @@ -718,7 +722,21 @@ int osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg) msgb_tlv_put(msg, OSMO_GSUP_IMEI_RESULT_IE, sizeof(u8), &u8); } + if (gsup_msg->message_class != OSMO_GSUP_MESSAGE_CLASS_UNSET) { + u8 = gsup_msg->message_class; + msgb_tlv_put(msg, OSMO_GSUP_MESSAGE_CLASS_IE, sizeof(u8), &u8); + } + return 0; } +const struct value_string osmo_gsup_message_class_names[] = { + { OSMO_GSUP_MESSAGE_CLASS_UNSET, "unset" }, + { OSMO_GSUP_MESSAGE_CLASS_SUBSCRIBER_MANAGEMENT, "Subscriber-Management" }, + { OSMO_GSUP_MESSAGE_CLASS_SMS, "SMS" }, + { OSMO_GSUP_MESSAGE_CLASS_USSD, "USSD" }, + { OSMO_GSUP_MESSAGE_CLASS_INTER_MSC, "Inter-MSC" }, + {} +}; + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 56481fdd..47f3b450 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -586,6 +586,7 @@ osmo_gsup_encode; osmo_gsup_decode; osmo_gsup_message_type_names; osmo_gsup_session_state_names; +osmo_gsup_message_class_names; osmo_gsup_get_err_msg_type; osmo_gsup_sms_encode_sm_rp_da; |