Daniel Willmann | 8b3390e | 2008-12-28 00:31:09 +0000 | [diff] [blame] | 1 | #ifndef _GSM_04_11_H |
| 2 | #define _GSM_04_11_H |
| 3 | |
Pablo Neira Ayuso | 136f453 | 2011-03-22 16:47:59 +0100 | [diff] [blame] | 4 | #include <osmocom/gsm/protocol/gsm_04_11.h> |
Harald Welte | 7e310b1 | 2009-03-30 20:56:32 +0000 | [diff] [blame] | 5 | |
Harald Welte | 2483f1b | 2016-06-19 18:06:02 +0200 | [diff] [blame] | 6 | struct vlr_subscr; |
Neels Hofmeyr | c036b79 | 2018-11-29 22:37:51 +0100 | [diff] [blame] | 7 | struct ran_conn; |
Harald Welte | 2483f1b | 2016-06-19 18:06:02 +0200 | [diff] [blame] | 8 | struct gsm_trans; |
| 9 | |
Holger Hans Peter Freyther | 6a3d765 | 2010-06-15 12:03:10 +0800 | [diff] [blame] | 10 | #define UM_SAPI_SMS 3 /* See GSM 04.05/04.06 */ |
| 11 | |
Daniel Willmann | 6fe997e | 2008-12-29 04:20:41 +0000 | [diff] [blame] | 12 | /* SMS deliver PDU */ |
| 13 | struct sms_deliver { |
Holger Hans Peter Freyther | c42ad8b | 2011-04-18 17:04:00 +0200 | [diff] [blame] | 14 | uint8_t mti:2; /* message type indicator */ |
| 15 | uint8_t mms:1; /* more messages to send */ |
| 16 | uint8_t rp:1; /* reply path */ |
| 17 | uint8_t udhi:1; /* user data header indicator */ |
| 18 | uint8_t sri:1; /* status report indication */ |
| 19 | uint8_t *orig_addr; /* originating address */ |
| 20 | uint8_t pid; /* protocol identifier */ |
| 21 | uint8_t dcs; /* data coding scheme */ |
Harald Welte | b9c758b | 2009-07-05 14:02:46 +0200 | [diff] [blame] | 22 | /* service centre time stamp */ |
Holger Hans Peter Freyther | c42ad8b | 2011-04-18 17:04:00 +0200 | [diff] [blame] | 23 | uint8_t ud_len; /* user data length */ |
| 24 | uint8_t *user_data; /* user data */ |
Harald Welte | b9c758b | 2009-07-05 14:02:46 +0200 | [diff] [blame] | 25 | |
Holger Hans Peter Freyther | c42ad8b | 2011-04-18 17:04:00 +0200 | [diff] [blame] | 26 | uint8_t msg_ref; /* message reference */ |
| 27 | uint8_t *smsc; |
Daniel Willmann | 6fe997e | 2008-12-29 04:20:41 +0000 | [diff] [blame] | 28 | }; |
| 29 | |
Vadim Yanitskiy | 24e025e | 2018-11-22 15:42:39 +0700 | [diff] [blame] | 30 | struct gsm_network; |
Daniel Willmann | 8b3390e | 2008-12-28 00:31:09 +0000 | [diff] [blame] | 31 | struct msgb; |
| 32 | |
Neels Hofmeyr | c036b79 | 2018-11-29 22:37:51 +0100 | [diff] [blame] | 33 | int gsm0411_rcv_sms(struct ran_conn *conn, struct msgb *msg); |
Daniel Willmann | 8b3390e | 2008-12-28 00:31:09 +0000 | [diff] [blame] | 34 | |
Holger Hans Peter Freyther | 34e9749 | 2009-08-10 07:54:02 +0200 | [diff] [blame] | 35 | struct gsm_sms *sms_alloc(void); |
| 36 | void sms_free(struct gsm_sms *sms); |
Harald Welte | 2483f1b | 2016-06-19 18:06:02 +0200 | [diff] [blame] | 37 | struct gsm_sms *sms_from_text(struct vlr_subscr *receiver, |
Harald Welte | 39b5548 | 2018-04-09 19:19:33 +0200 | [diff] [blame] | 38 | const char *sender_msisdn, |
Harald Welte | 2483f1b | 2016-06-19 18:06:02 +0200 | [diff] [blame] | 39 | int dcs, const char *text); |
Daniel Willmann | 6fe997e | 2008-12-29 04:20:41 +0000 | [diff] [blame] | 40 | |
Vadim Yanitskiy | 24e025e | 2018-11-22 15:42:39 +0700 | [diff] [blame] | 41 | int gsm411_send_sms(struct gsm_network *net, |
| 42 | struct vlr_subscr *vsub, |
Holger Hans Peter Freyther | 11b28f9 | 2010-12-24 13:48:27 +0100 | [diff] [blame] | 43 | struct gsm_sms *sms); |
Neels Hofmeyr | c036b79 | 2018-11-29 22:37:51 +0100 | [diff] [blame] | 44 | void gsm411_sapi_n_reject(struct ran_conn *conn); |
Holger Hans Peter Freyther | ca11443 | 2014-02-08 15:20:48 +0100 | [diff] [blame] | 45 | |
Pablo Neira Ayuso | 93ffbd0 | 2017-05-04 18:44:22 +0200 | [diff] [blame] | 46 | int gsm411_send_rp_ack(struct gsm_trans *trans, uint8_t msg_ref); |
| 47 | int gsm411_send_rp_error(struct gsm_trans *trans, uint8_t msg_ref, |
| 48 | uint8_t cause); |
| 49 | |
Daniel Willmann | 8b3390e | 2008-12-28 00:31:09 +0000 | [diff] [blame] | 50 | #endif |