gsm0411_smr.h
Go to the documentation of this file.
#pragma once
#include <osmocom/gsm/protocol/gsm_04_11.h>
#define GSM411_SM_RL_DATA_REQ 0x401
#define GSM411_SM_RL_DATA_IND 0x402
#define GSM411_SM_RL_MEM_AVAIL_REQ 0x403
#define GSM411_SM_RL_MEM_AVAIL_IND 0x404
#define GSM411_SM_RL_REPORT_REQ 0x405
#define GSM411_SM_RL_REPORT_IND 0x406
struct gsm411_smr_inst {
uint64_t id; /* a unique id for the SMS */
int network; /* is this a MO (0) or MT (1) transfer */
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);
enum gsm411_rp_state rp_state;
struct osmo_timer_list rp_timer;
};
extern const struct value_string gsm411_rp_cause_strs[];
/* init a new instance */
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));
/* clear instance */
void gsm411_smr_clear(struct gsm411_smr_inst *inst);
/* message from upper layer */
int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type,
struct msgb *msg);
/* message from lower layer */
int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type,
struct msgb *msg);
extern const struct value_string gsm411_rp_state_names[];
static inline const char *gsm411_rp_state_name(enum gsm411_rp_state rp_state) {
return get_value_string(gsm411_rp_state_names, rp_state);
}
gsm411_smr_send
int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.c:399
gsm411_smr_inst::network
int network
Definition: gsm0411_smr.h:18
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::rp_timer
struct osmo_timer_list rp_timer
Definition: gsm0411_smr.h:25
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_rp_state
gsm411_rp_state
Definition: gsm_04_11.h:18
gsm411_rp_cause_strs
const struct value_string gsm411_rp_cause_strs[]
Definition: gsm0411_smr.c:111
gsm411_rp_state_name
static const char * gsm411_rp_state_name(enum gsm411_rp_state rp_state)
Definition: gsm0411_smr.h:50
gsm411_smr_clear
void gsm411_smr_clear(struct gsm411_smr_inst *inst)
Definition: gsm0411_smr.c:95
gsm411_smr_inst::rp_state
enum gsm411_rp_state rp_state
Definition: gsm0411_smr.h:24
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:75
gsm411_smr_inst::id
uint64_t id
Definition: gsm0411_smr.h:17
gsm_04_11.h
msg_type
uint8_t msg_type
Definition: gsm_04_08.h:710
gsm411_smr_inst
Definition: gsm0411_smr.h:16
gsm411_rp_state_names
const struct value_string gsm411_rp_state_names[]
Definition: gsm0411_smr.c:495
gsm411_smr_recv
int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg)
Definition: gsm0411_smr.c:464