libosmogsm  0.9.6.311-c977
Osmocom GSM library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gsm0411_smr.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <osmocom/gsm/protocol/gsm_04_11.h>
6 
7 #define GSM411_SM_RL_DATA_REQ 0x401
8 #define GSM411_SM_RL_DATA_IND 0x402
9 #define GSM411_SM_RL_MEM_AVAIL_REQ 0x403
10 #define GSM411_SM_RL_MEM_AVAIL_IND 0x404
11 #define GSM411_SM_RL_REPORT_REQ 0x405
12 #define GSM411_SM_RL_REPORT_IND 0x406
13 
15  uint64_t id; /* a unique id for the SMS */
16  int network; /* is this a MO (0) or MT (1) transfer */
17  int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
18  struct msgb *msg);
19  int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
20  struct msgb *msg);
21 
22  enum gsm411_rp_state rp_state;
23  struct osmo_timer_list rp_timer;
24 };
25 
26 extern const struct value_string gsm411_rp_cause_strs[];
27 
28 /* init a new instance */
29 void gsm411_smr_init(struct gsm411_smr_inst *inst, uint64_t id, int network,
30  int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
31  struct msgb *msg),
32  int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
33  struct msgb *msg));
34 
35 /* clear instance */
36 void gsm411_smr_clear(struct gsm411_smr_inst *inst);
37 
38 /* message from upper layer */
39 int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type,
40  struct msgb *msg);
41 
42 /* message from lower layer */
43 int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type,
44  struct msgb *msg);
uint64_t id
Definition: gsm0411_smr.h:15
struct osmo_timer_list rp_timer
Definition: gsm0411_smr.h:23
int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.c:462
Definition: gsm0411_smr.h:14
int(* mn_send)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.h:19
int(* rl_recv)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.h:17
void gsm411_smr_clear(struct gsm411_smr_inst *inst)
Definition: gsm0411_smr.c:93
int network
Definition: gsm0411_smr.h:16
int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.c:397
void gsm411_smr_init(struct gsm411_smr_inst *inst, uint64_t id, int network, int(*rl_recv)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg), int(*mn_send)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg))
Definition: gsm0411_smr.c:73
const struct value_string gsm411_rp_cause_strs[]
Definition: gsm0411_smr.c:109
enum gsm411_rp_state rp_state
Definition: gsm0411_smr.h:22