Vadim Yanitskiy | c262831 | 2018-09-25 23:03:13 +0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | /*! \addtogroup gsup |
| 4 | * @{ |
| 5 | * |
| 6 | * This header defines SMS (Short Message Service) extensions for |
| 7 | * Osmocom GSUP (Generic Subscriber Update Protocol). The scope of |
| 8 | * this module is defined by 3GPP TS 29.002, section 12. |
| 9 | * |
| 10 | * \file gsup_sms.h |
| 11 | * SMS (Short Message Service) extensions for Osmocom GSUP. */ |
| 12 | |
| 13 | #include <stdint.h> |
| 14 | |
| 15 | /*! Possible identity types for SM-RP-{OA|DA} */ |
| 16 | enum osmo_gsup_sms_sm_rp_oda_t { |
| 17 | OSMO_GSUP_SMS_SM_RP_ODA_NONE = 0x00, |
| 18 | OSMO_GSUP_SMS_SM_RP_ODA_IMSI = 0x01, |
| 19 | OSMO_GSUP_SMS_SM_RP_ODA_MSISDN = 0x02, |
| 20 | OSMO_GSUP_SMS_SM_RP_ODA_SMSC_ADDR = 0x03, |
| 21 | /*! Special value for noSM-RP-DA and noSM-RP-OA */ |
| 22 | OSMO_GSUP_SMS_SM_RP_ODA_NULL = 0xff, |
| 23 | }; |
| 24 | |
Vadim Yanitskiy | f9ee8da | 2018-11-13 02:06:15 +0700 | [diff] [blame] | 25 | /*! Alert reason values, see 7.6.8.8 */ |
| 26 | enum osmo_gsup_sms_sm_alert_rsn_t { |
| 27 | OSMO_GSUP_SMS_SM_ALERT_RSN_NONE = 0x00, |
| 28 | OSMO_GSUP_SMS_SM_ALERT_RSN_MS_PRESENT = 0x01, |
| 29 | OSMO_GSUP_SMS_SM_ALERT_RSN_MEM_AVAIL = 0x02, |
| 30 | }; |
| 31 | |
Vadim Yanitskiy | c262831 | 2018-09-25 23:03:13 +0700 | [diff] [blame] | 32 | struct osmo_gsup_message; |
| 33 | struct msgb; |
| 34 | |
| 35 | int osmo_gsup_sms_encode_sm_rp_da(struct msgb *msg, |
| 36 | const struct osmo_gsup_message *gsup_msg); |
| 37 | int osmo_gsup_sms_decode_sm_rp_da(struct osmo_gsup_message *gsup_msg, |
| 38 | uint8_t *data, size_t data_len); |
| 39 | |
| 40 | int osmo_gsup_sms_encode_sm_rp_oa(struct msgb *msg, |
| 41 | const struct osmo_gsup_message *gsup_msg); |
| 42 | int osmo_gsup_sms_decode_sm_rp_oa(struct osmo_gsup_message *gsup_msg, |
| 43 | uint8_t *data, size_t data_len); |
| 44 | |
| 45 | /*! @} */ |