2008-12-28 00:31:09 +00:00
|
|
|
#ifndef _GSM_04_11_H
|
|
|
|
#define _GSM_04_11_H
|
|
|
|
|
|
|
|
/* GSM TS 04.11 definitions */
|
|
|
|
|
|
|
|
/* Chapter 8.1.2 (refers to GSM 04.07 Chapter 11.2.3.1.1 */
|
|
|
|
#define GSM411_PDISC_SMS 0x09
|
|
|
|
|
|
|
|
/* Chapter 8.1.3 */
|
|
|
|
#define GSM411_MT_CP_DATA 0x01
|
|
|
|
#define GSM411_MT_CP_ACK 0x04
|
|
|
|
#define GSM411_MT_CP_ERROR 0x10
|
|
|
|
|
2009-02-16 22:32:17 +00:00
|
|
|
enum gsm411_cp_ie {
|
|
|
|
GSM411_CP_IE_USER_DATA = 0x01, /* 8.1.4.1 */
|
|
|
|
GSM411_CP_IE_CAUSE = 0x02, /* 8.1.4.2. */
|
|
|
|
};
|
|
|
|
|
2008-12-28 00:31:09 +00:00
|
|
|
/* Chapter 8.2.2 */
|
|
|
|
#define GSM411_MT_RP_DATA_MO 0x00
|
|
|
|
#define GSM411_MT_RP_DATA_MT 0x01
|
|
|
|
#define GSM411_MT_RP_ACK_MO 0x02
|
|
|
|
#define GSM411_MT_RP_ACK_MT 0x03
|
|
|
|
#define GSM411_MT_RP_ERROR_MO 0x04
|
|
|
|
#define GSM411_MT_RP_ERROR_MT 0x04
|
|
|
|
#define GSM411_MT_RP_SMMA_MO 0x05
|
|
|
|
|
2009-02-16 22:32:17 +00:00
|
|
|
enum gsm411_rp_ie {
|
|
|
|
GSM411_IE_RP_USER_DATA = 0x41, /* 8.2.5.3 */
|
|
|
|
GSM411_IE_RP_CAUSE = 0x42, /* 8.2.5.4 */
|
|
|
|
};
|
|
|
|
|
2008-12-29 01:54:02 +00:00
|
|
|
/* Chapter 8.2.1 */
|
|
|
|
struct gsm411_rp_hdr {
|
2008-12-29 00:44:41 +00:00
|
|
|
u_int8_t len;
|
|
|
|
u_int8_t msg_type;
|
2008-12-28 00:31:09 +00:00
|
|
|
u_int8_t msg_ref;
|
|
|
|
u_int8_t data[0];
|
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
2008-12-29 00:44:41 +00:00
|
|
|
/* SMS submit PDU */
|
|
|
|
struct sms_submit {
|
|
|
|
u_int8_t *smsc;
|
|
|
|
u_int8_t mti:2;
|
|
|
|
u_int8_t mms:1;
|
|
|
|
u_int8_t vpf:2;
|
|
|
|
u_int8_t sri:1;
|
|
|
|
u_int8_t udhi:1;
|
|
|
|
u_int8_t rp:1;
|
|
|
|
u_int8_t msg_ref;
|
|
|
|
u_int8_t *dest_addr;
|
|
|
|
u_int8_t pid;
|
|
|
|
u_int8_t dcs;
|
|
|
|
u_int8_t vp;
|
|
|
|
u_int8_t ud_len;
|
|
|
|
u_int8_t *user_data;
|
|
|
|
};
|
|
|
|
|
2008-12-29 04:20:41 +00:00
|
|
|
/* SMS deliver PDU */
|
|
|
|
struct sms_deliver {
|
|
|
|
u_int8_t *smsc;
|
|
|
|
u_int8_t mti:2;
|
|
|
|
u_int8_t rd:1;
|
|
|
|
u_int8_t vpf:2;
|
|
|
|
u_int8_t srr:1;
|
|
|
|
u_int8_t udhi:1;
|
|
|
|
u_int8_t rp:1;
|
|
|
|
u_int8_t msg_ref;
|
|
|
|
u_int8_t *orig_addr;
|
|
|
|
u_int8_t pid;
|
|
|
|
u_int8_t dcs;
|
|
|
|
u_int8_t vp;
|
|
|
|
u_int8_t ud_len;
|
|
|
|
u_int8_t *user_data;
|
|
|
|
};
|
|
|
|
|
2008-12-28 00:31:09 +00:00
|
|
|
struct msgb;
|
|
|
|
|
|
|
|
int gsm0411_rcv_sms(struct msgb *msg);
|
|
|
|
|
2008-12-29 04:20:41 +00:00
|
|
|
int gsm0411_send_sms(struct gsm_lchan *lchan, struct sms_deliver *sms);
|
|
|
|
|
2009-01-04 20:16:25 +00:00
|
|
|
struct msgb *gsm411_msgb_alloc(void);
|
|
|
|
int gsm0411_sendmsg(struct msgb *msg);
|
|
|
|
|
2008-12-28 00:31:09 +00:00
|
|
|
#endif
|