aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/gsup_sms.h
blob: 480971e6d1851ac65096fbde64de02fcd4c6fc08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once

/*! \addtogroup gsup
 *  @{
 *
 *  This header defines SMS (Short Message Service) extensions for
 *  Osmocom GSUP (Generic Subscriber Update Protocol). The scope of
 *  this module is defined by 3GPP TS 29.002, section 12.
 *
 *  \file gsup_sms.h
 *  SMS (Short Message Service) extensions for Osmocom GSUP. */

#include <stdint.h>

/*! Possible identity types for SM-RP-{OA|DA} */
enum osmo_gsup_sms_sm_rp_oda_t {
	OSMO_GSUP_SMS_SM_RP_ODA_NONE		= 0x00,
	OSMO_GSUP_SMS_SM_RP_ODA_IMSI		= 0x01,
	OSMO_GSUP_SMS_SM_RP_ODA_MSISDN		= 0x02,
	OSMO_GSUP_SMS_SM_RP_ODA_SMSC_ADDR	= 0x03,
	/*! Special value for noSM-RP-DA and noSM-RP-OA */
	OSMO_GSUP_SMS_SM_RP_ODA_NULL		= 0xff,
};

/*! Alert reason values, see 7.6.8.8 */
enum osmo_gsup_sms_sm_alert_rsn_t {
	OSMO_GSUP_SMS_SM_ALERT_RSN_NONE		= 0x00,
	OSMO_GSUP_SMS_SM_ALERT_RSN_MS_PRESENT	= 0x01,
	OSMO_GSUP_SMS_SM_ALERT_RSN_MEM_AVAIL	= 0x02,
};

struct osmo_gsup_message;
struct msgb;

int osmo_gsup_sms_encode_sm_rp_da(struct msgb *msg,
	const struct osmo_gsup_message *gsup_msg);
int osmo_gsup_sms_decode_sm_rp_da(struct osmo_gsup_message *gsup_msg,
	uint8_t *data, size_t data_len);

int osmo_gsup_sms_encode_sm_rp_oa(struct msgb *msg,
	const struct osmo_gsup_message *gsup_msg);
int osmo_gsup_sms_decode_sm_rp_oa(struct osmo_gsup_message *gsup_msg,
	uint8_t *data, size_t data_len);

/*! @} */