Andreas Eversberg | c1a91a8 | 2011-10-28 11:05:37 +0200 | [diff] [blame] | 1 | #ifndef _GSM0411_SMR_H |
| 2 | #define _GSM0411_SMR_H |
| 3 | |
| 4 | #include <osmocom/gsm/protocol/gsm_04_11.h> |
| 5 | |
| 6 | #define GSM411_SM_RL_DATA_REQ 0x401 |
| 7 | #define GSM411_SM_RL_DATA_IND 0x402 |
| 8 | #define GSM411_SM_RL_MEM_AVAIL_REQ 0x403 |
| 9 | #define GSM411_SM_RL_MEM_AVAIL_IND 0x404 |
| 10 | #define GSM411_SM_RL_REPORT_REQ 0x405 |
| 11 | #define GSM411_SM_RL_REPORT_IND 0x406 |
| 12 | |
| 13 | struct gsm411_smr_inst { |
Holger Hans Peter Freyther | bcf125c | 2012-11-14 06:07:47 +0100 | [diff] [blame] | 14 | uint64_t id; /* a unique id for the SMS */ |
Andreas Eversberg | c1a91a8 | 2011-10-28 11:05:37 +0200 | [diff] [blame] | 15 | int network; /* is this a MO (0) or MT (1) transfer */ |
| 16 | int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type, |
| 17 | struct msgb *msg); |
| 18 | int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type, |
| 19 | struct msgb *msg); |
| 20 | |
| 21 | enum gsm411_rp_state rp_state; |
| 22 | struct osmo_timer_list rp_timer; |
| 23 | }; |
| 24 | |
| 25 | extern const struct value_string gsm411_rp_cause_strs[]; |
| 26 | |
| 27 | /* init a new instance */ |
Holger Hans Peter Freyther | bcf125c | 2012-11-14 06:07:47 +0100 | [diff] [blame] | 28 | void gsm411_smr_init(struct gsm411_smr_inst *inst, uint64_t id, int network, |
Andreas Eversberg | c1a91a8 | 2011-10-28 11:05:37 +0200 | [diff] [blame] | 29 | int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type, |
| 30 | struct msgb *msg), |
| 31 | int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type, |
| 32 | struct msgb *msg)); |
| 33 | |
| 34 | /* clear instance */ |
| 35 | void gsm411_smr_clear(struct gsm411_smr_inst *inst); |
| 36 | |
| 37 | /* message from upper layer */ |
| 38 | int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type, |
| 39 | struct msgb *msg); |
| 40 | |
| 41 | /* message from lower layer */ |
| 42 | int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type, |
| 43 | struct msgb *msg); |
| 44 | |
| 45 | #endif /* _GSM0411_SMR_H */ |
| 46 | |