blob: 480971e6d1851ac65096fbde64de02fcd4c6fc08 [file] [log] [blame]
Vadim Yanitskiyc2628312018-09-25 23:03:13 +07001#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} */
16enum 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 Yanitskiyf9ee8da2018-11-13 02:06:15 +070025/*! Alert reason values, see 7.6.8.8 */
26enum 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 Yanitskiyc2628312018-09-25 23:03:13 +070032struct osmo_gsup_message;
33struct msgb;
34
35int osmo_gsup_sms_encode_sm_rp_da(struct msgb *msg,
36 const struct osmo_gsup_message *gsup_msg);
37int osmo_gsup_sms_decode_sm_rp_da(struct osmo_gsup_message *gsup_msg,
38 uint8_t *data, size_t data_len);
39
40int osmo_gsup_sms_encode_sm_rp_oa(struct msgb *msg,
41 const struct osmo_gsup_message *gsup_msg);
42int osmo_gsup_sms_decode_sm_rp_oa(struct osmo_gsup_message *gsup_msg,
43 uint8_t *data, size_t data_len);
44
45/*! @} */