libosmogsm  0.6.3
Osmocom GSM library
gsm0411_smr.h
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 
14  uint64_t id; /* a unique id for the SMS */
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 */
28 void gsm411_smr_init(struct gsm411_smr_inst *inst, uint64_t id, int network,
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