libosmogsm 1.13.1.1-afb4 Osmocom GSM library

gsm0411_smr.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <osmocom/gsm/protocol/gsm_04_11.h>
8
9#define GSM411_SM_RL_DATA_REQ 0x401
10#define GSM411_SM_RL_DATA_IND 0x402
11#define GSM411_SM_RL_MEM_AVAIL_REQ 0x403
12#define GSM411_SM_RL_MEM_AVAIL_IND 0x404
13#define GSM411_SM_RL_REPORT_REQ 0x405
14#define GSM411_SM_RL_REPORT_IND 0x406
15
16 struct gsm411_smr_inst {
17 uint64_t id; /* a unique id for the SMS */
18 int network; /* is this a MO (0) or MT (1) transfer */
19 int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
20 struct msgb *msg);
21 int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
22 struct msgb *msg);
23
24 enum gsm411_rp_state rp_state;
25 struct osmo_timer_list rp_timer;
26};
27
28 extern const struct value_string gsm411_rp_cause_strs[];
29
30/* init a new instance */
31 void gsm411_smr_init(struct gsm411_smr_inst *inst, uint64_t id, int network,
32 int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
33 struct msgb *msg),
34 int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
35 struct msgb *msg));
36
37/* clear instance */
38 void gsm411_smr_clear(struct gsm411_smr_inst *inst);
39
40/* message from upper layer */
41 int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type,
42 struct msgb *msg);
43
44/* message from lower layer */
45 int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type,
46 struct msgb *msg);
47
48 extern const struct value_string gsm411_rp_state_names[];
49
50 static inline const char *gsm411_rp_state_name(enum gsm411_rp_state rp_state) {
51 return get_value_string(gsm411_rp_state_names, rp_state);
52}
53
network
write Write running configuration to network
gsm411_smr_recv
int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.c:465
gsm411_rp_state_name
static const char * gsm411_rp_state_name(enum gsm411_rp_state rp_state)
Definition: gsm0411_smr.h:50
gsm411_smr_init
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:76
gsm411_smr_clear
void gsm411_smr_clear(struct gsm411_smr_inst *inst)
Definition: gsm0411_smr.c:96
gsm411_smr_send
int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.c:400
gsm411_rp_cause_strs
const struct value_string gsm411_rp_cause_strs[]
Definition: gsm0411_smr.c:112
gsm411_rp_state_names
const struct value_string gsm411_rp_state_names[]
Definition: gsm0411_smr.c:496
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
msg_type
uint8_t msg_type
Definition: gsm_04_08.h:2
gsm_04_11.h
gsm411_rp_state
gsm411_rp_state
Definition: gsm_04_11.h:18
msg
uint8_t msg[0]
Definition: gsm_08_08.h:8
gsm411_smr_inst
Definition: gsm0411_smr.h:16
gsm411_smr_inst::rp_state
enum gsm411_rp_state rp_state
Definition: gsm0411_smr.h:24
gsm411_smr_inst::rp_timer
struct osmo_timer_list rp_timer
Definition: gsm0411_smr.h:25
gsm411_smr_inst::rl_recv
int(* rl_recv)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.h:19
gsm411_smr_inst::mn_send
int(* mn_send)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.h:21
gsm411_smr_inst::id
uint64_t id
Definition: gsm0411_smr.h:17
gsm411_smr_inst::network
int network
Definition: gsm0411_smr.h:18
msgb
osmo_timer_list
value_string