aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/gsup_sms.h
blob: 521412d6254f4ca86e73b516d5d58ee8f8d6d5d3 (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
#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,
};

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);

/*! @} */