summaryrefslogtreecommitdiffstats
path: root/include/openbsc/gsm_04_11.h
blob: 2abe3e202ef38e0cbebb35887f3e0e3b360630f5 (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
#ifndef _GSM_04_11_H
#define _GSM_04_11_H

#include <osmocom/gsm/protocol/gsm_04_11.h>

#define UM_SAPI_SMS 3	/* See GSM 04.05/04.06 */

/* SMS deliver PDU */
struct sms_deliver {
	uint8_t mti:2;		/* message type indicator */
	uint8_t mms:1;		/* more messages to send */
	uint8_t rp:1;		/* reply path */
	uint8_t udhi:1;	/* user data header indicator */
	uint8_t sri:1;		/* status report indication */
	uint8_t *orig_addr;	/* originating address */
	uint8_t pid;		/* protocol identifier */
	uint8_t dcs;		/* data coding scheme */
				/* service centre time stamp */
	uint8_t ud_len;	/* user data length */
	uint8_t *user_data;	/* user data */

	uint8_t msg_ref;	/* message reference */
	uint8_t *smsc;
};

struct msgb;

int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn, struct msgb *msg);

struct gsm_sms *sms_alloc(void);
void sms_free(struct gsm_sms *sms);
struct gsm_sms *sms_from_text(struct gsm_subscriber *receiver, int dcs, const char *text);

void _gsm411_sms_trans_free(struct gsm_trans *trans);
int gsm411_send_sms_subscr(struct gsm_subscriber *subscr,
			   struct gsm_sms *sms);
int gsm411_send_sms(struct gsm_subscriber_connection *conn,
		    struct gsm_sms *sms);
void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn);
#endif