libosmogsm 0.9.6-23.20170220git32ee5af8.fc42
Osmocom GSM library
Loading...
Searching...
No Matches
gsm0411_smr.h
1#pragma once
2
3#include <osmocom/gsm/protocol/gsm_04_11.h>
4
5#define GSM411_SM_RL_DATA_REQ 0x401
6#define GSM411_SM_RL_DATA_IND 0x402
7#define GSM411_SM_RL_MEM_AVAIL_REQ 0x403
8#define GSM411_SM_RL_MEM_AVAIL_IND 0x404
9#define GSM411_SM_RL_REPORT_REQ 0x405
10#define GSM411_SM_RL_REPORT_IND 0x406
11
13 uint64_t id; /* a unique id for the SMS */
14 int network; /* is this a MO (0) or MT (1) transfer */
15 int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
16 struct msgb *msg);
17 int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
18 struct msgb *msg);
19
20 enum gsm411_rp_state rp_state;
21 struct osmo_timer_list rp_timer;
22};
23
24extern const struct value_string gsm411_rp_cause_strs[];
25
26/* init a new instance */
27void gsm411_smr_init(struct gsm411_smr_inst *inst, uint64_t id, int network,
28 int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
29 struct msgb *msg),
30 int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
31 struct msgb *msg));
32
33/* clear instance */
34void gsm411_smr_clear(struct gsm411_smr_inst *inst);
35
36/* message from upper layer */
37int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type,
38 struct msgb *msg);
39
40/* message from lower layer */
41int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type,
42 struct msgb *msg);
Definition gsm0411_smr.h:12