libosmogsm
1.9.2
Osmocom GSM library
|
|
struct gsm341_ms_message * | gsm0341_build_msg (void *ctx, uint8_t geo_scope, uint8_t msg_code, uint8_t update, uint16_t msg_id, uint8_t dcs, uint8_t page_total, uint8_t page_cur, uint8_t *data, uint8_t len) |
| Encode a 3GPP TS 03.41 SMS-CB message. More...
|
|
void | gsm411_smc_init (struct gsm411_smc_inst *inst, uint64_t id, int network, int(*mn_recv)(struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg), int(*mm_send)(struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg, int cp_msg_type)) |
|
void | gsm411_smc_clear (struct gsm411_smc_inst *inst) |
|
int | gsm411_smc_send (struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg) |
|
int | gsm411_smc_recv (struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg, int cp_msg_type) |
|
static const char * | gsm411_cp_state_name (enum gsm411_cp_state cp_state) |
|
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)) |
|
void | gsm411_smr_clear (struct gsm411_smr_inst *inst) |
|
int | gsm411_smr_send (struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg) |
|
int | gsm411_smr_recv (struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg) |
|
static const char * | gsm411_rp_state_name (enum gsm411_rp_state rp_state) |
|
uint8_t | gsm411_bcdify (uint8_t value) |
| Turn int into semi-octet representation: 98 => 0x89. More...
|
|
uint8_t | gsm411_unbcdify (uint8_t value) |
| Turn semi-octet representation into int: 0x89 => 98. More...
|
|
struct msgb * | gsm411_msgb_alloc (void) |
| Allocate a message buffer for use as TS 04.11 message. More...
|
|
void | gsm340_gen_scts (uint8_t *scts, time_t time) |
| Generate 03.40 TP-SCTS. More...
|
|
time_t | gsm340_scts (uint8_t *scts) |
| Decode 03.40 TP-SCTS (into utc/gmt timestamp) More...
|
|
unsigned long | gsm340_validity_period (uint8_t sms_vpf, uint8_t *sms_vp) |
| decode validity period. More...
|
|
enum sms_alphabet | gsm338_get_sms_alphabet (uint8_t dcs) |
| determine coding alphabet dependent on GSM 03.38 Section 4 DCS More...
|
|
int | gsm340_gen_oa (uint8_t *oa, unsigned int oa_len, uint8_t type, uint8_t plan, const char *number) |
| generate a TPDU address field compliant with 03.40 sec. More...
|
|
int | gsm411_push_rp_header (struct msgb *msg, uint8_t rp_msg_type, uint8_t rp_msg_ref) |
| Prefix Message buffers with a RP header. More...
|
|
int | gsm411_push_cp_header (struct msgb *msg, uint8_t proto, uint8_t trans, uint8_t msg_type) |
| Prefix Message buffers with a 04.08/04.11 CP header. More...
|
|
static void | cp_timer_expired (void *data) |
|
static void | new_cp_state (struct gsm411_smc_inst *inst, enum gsm411_cp_state state) |
|
static int | gsm411_tx_cp_error (struct gsm411_smc_inst *inst, uint8_t cause) |
|
static int | gsm411_mnsms_est_req (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mmsms_send_msg (struct gsm411_smc_inst *inst) |
|
static int | gsm411_mmsms_est_cnf (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mmsms_cp_ack (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mmsms_cp_data (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_data_req (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_rel_req (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mmsms_cp_error (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mmsms_rel_ind (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_abort_req (struct gsm411_smc_inst *inst, struct msgb *msg) |
|
static void | rp_timer_expired (void *data) |
|
static void | new_rp_state (struct gsm411_smr_inst *inst, enum gsm411_rp_state state) |
|
static int | gsm411_rp_sendmsg (struct gsm411_smr_inst *inst, struct msgb *msg, uint8_t rp_msg_type, uint8_t rp_msg_ref, int mnsms_msg_type) |
|
static int | gsm411_send_rp_error (struct gsm411_smr_inst *inst, uint8_t msg_ref, uint8_t cause) |
|
static int | gsm411_send_release (struct gsm411_smr_inst *inst) |
|
static int | gsm411_send_abort (struct gsm411_smr_inst *inst) |
|
static int | gsm411_send_report (struct gsm411_smr_inst *inst) |
|
static int | gsm411_rl_data_req (struct gsm411_smr_inst *inst, struct msgb *msg) |
|
static int | gsm411_rl_report_req (struct gsm411_smr_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_est_ind (struct gsm411_smr_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_data_ind_tx (struct gsm411_smr_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_error_ind_tx (struct gsm411_smr_inst *inst, struct msgb *msg) |
|
static int | gsm411_mnsms_error_ind_rx (struct gsm411_smr_inst *inst, struct msgb *msg) |
|
static unsigned long | gsm340_vp_default (void) |
|
static unsigned long | gsm340_vp_relative (uint8_t *sms_vp) |
|
static unsigned long | gsm340_vp_absolute (uint8_t *sms_vp) |
|
static unsigned long | gsm340_vp_relative_integer (uint8_t *sms_vp) |
|
static unsigned long | gsm340_vp_relative_semioctet (uint8_t *sms_vp) |
|
◆ GSM411_ALLOC_HEADROOM
#define GSM411_ALLOC_HEADROOM 128 |
◆ GSM411_ALLOC_SIZE
#define GSM411_ALLOC_SIZE 1024 |
◆ GSM411_MMSMS_DATA_IND
#define GSM411_MMSMS_DATA_IND 0x332 |
◆ GSM411_MMSMS_DATA_REQ
#define GSM411_MMSMS_DATA_REQ 0x330 |
◆ GSM411_MMSMS_ERR_IND
#define GSM411_MMSMS_ERR_IND 0x372 |
◆ GSM411_MMSMS_EST_CNF
#define GSM411_MMSMS_EST_CNF 0x311 |
◆ GSM411_MMSMS_EST_IND
#define GSM411_MMSMS_EST_IND 0x312 |
◆ GSM411_MMSMS_EST_REQ
#define GSM411_MMSMS_EST_REQ 0x310 |
◆ GSM411_MMSMS_REL_IND
#define GSM411_MMSMS_REL_IND 0x322 |
◆ GSM411_MMSMS_REL_REQ
#define GSM411_MMSMS_REL_REQ 0x320 |
◆ GSM411_MMSMS_UNIT_DATA_IND
#define GSM411_MMSMS_UNIT_DATA_IND 0x342 |
◆ GSM411_MMSMS_UNIT_DATA_REQ
#define GSM411_MMSMS_UNIT_DATA_REQ 0x340 |
◆ GSM411_MNSMS_ABORT_REQ
#define GSM411_MNSMS_ABORT_REQ 0x101 |
◆ GSM411_MNSMS_DATA_IND
#define GSM411_MNSMS_DATA_IND 0x103 |
◆ GSM411_MNSMS_DATA_REQ
#define GSM411_MNSMS_DATA_REQ 0x102 |
◆ GSM411_MNSMS_ERROR_IND
#define GSM411_MNSMS_ERROR_IND 0x106 |
◆ GSM411_MNSMS_EST_IND
#define GSM411_MNSMS_EST_IND 0x105 |
◆ GSM411_MNSMS_EST_REQ
#define GSM411_MNSMS_EST_REQ 0x104 |
◆ GSM411_MNSMS_REL_REQ
#define GSM411_MNSMS_REL_REQ 0x107 |
◆ GSM411_SM_RL_DATA_IND
#define GSM411_SM_RL_DATA_IND 0x402 |
◆ GSM411_SM_RL_DATA_REQ
#define GSM411_SM_RL_DATA_REQ 0x401 |
◆ GSM411_SM_RL_MEM_AVAIL_IND
#define GSM411_SM_RL_MEM_AVAIL_IND 0x404 |
◆ GSM411_SM_RL_MEM_AVAIL_REQ
#define GSM411_SM_RL_MEM_AVAIL_REQ 0x403 |
◆ GSM411_SM_RL_REPORT_IND
#define GSM411_SM_RL_REPORT_IND 0x406 |
◆ GSM411_SM_RL_REPORT_REQ
#define GSM411_SM_RL_REPORT_REQ 0x405 |
◆ MAX_SMS_RETRY
◆ SMC_LOG_STR
#define SMC_LOG_STR "SMC(%" PRIu64 ") " |
◆ SMCDATASLLEN
◆ SMCDOWNSLLEN
◆ SMRDATASLLEN
◆ SMRDOWNSLLEN
◆ cp_timer_expired()
static void cp_timer_expired |
( |
void * |
data | ) |
|
|
static |
References gsm411_smc_inst::cp_max_retr, gsm411_smc_inst::cp_msg, gsm411_smc_inst::cp_retx, data, DLSMS, GSM411_CPS_IDLE, gsm411_mmsms_est_cnf(), GSM411_MMSMS_REL_REQ, GSM411_MNSMS_ERROR_IND, gsm411_msgb_alloc(), gsm411_smc_inst::id, LOGL_INFO, LOGP, gsm411_smc_inst::mm_send, gsm411_smc_inst::mn_recv, msgb_free(), new_cp_state(), and SMC_LOG_STR.
Referenced by gsm411_mmsms_send_msg().
◆ gsm0341_build_msg()
struct gsm341_ms_message * gsm0341_build_msg |
( |
void * |
ctx, |
|
|
uint8_t |
geo_scope, |
|
|
uint8_t |
msg_code, |
|
|
uint8_t |
update, |
|
|
uint16_t |
msg_id, |
|
|
uint8_t |
dcs, |
|
|
uint8_t |
page_total, |
|
|
uint8_t |
page_cur, |
|
|
uint8_t * |
data, |
|
|
uint8_t |
len |
|
) |
| |
◆ gsm338_get_sms_alphabet()
◆ gsm340_gen_oa()
int gsm340_gen_oa |
( |
uint8_t * |
oa, |
|
|
unsigned int |
oa_len, |
|
|
uint8_t |
type, |
|
|
uint8_t |
plan, |
|
|
const char * |
number |
|
) |
| |
generate a TPDU address field compliant with 03.40 sec.
9.1.2.5
- Parameters
-
[out] | oa | caller-provided output buffer |
[in] | oa_len | caller-specified length of oa in bytes |
[in] | type | GSM340_TYPE_* |
[in] | plan | Numbering Plan |
[in] | number | string containing number |
- Returns
- number of bytes of oa that have been used
References GSM340_TYPE_ALPHA_NUMERIC, gsm48_encode_bcd_number(), gsm_7bit_encode_n(), and type.
◆ gsm340_gen_scts()
void gsm340_gen_scts |
( |
uint8_t * |
scts, |
|
|
time_t |
time |
|
) |
| |
Generate 03.40 TP-SCTS.
- Parameters
-
[out] | scts | Caller-provided buffer to store SCTS (7 octets) |
[in] | time | to encode |
References gsm411_bcdify(), and time.
◆ gsm340_scts()
time_t gsm340_scts |
( |
uint8_t * |
scts | ) |
|
Decode 03.40 TP-SCTS (into utc/gmt timestamp)
- Parameters
-
[in] | scts | SMS Center Time Stamp |
- Returns
- time in UTC time_t format
References gsm411_unbcdify().
Referenced by gsm340_vp_absolute().
◆ gsm340_validity_period()
unsigned long gsm340_validity_period |
( |
uint8_t |
sms_vpf, |
|
|
uint8_t * |
sms_vp |
|
) |
| |
decode validity period.
return minutes
- Parameters
-
[in] | sms_vpf | Validity Period Format in 03.40 encoding |
[in] | sms_vp | Validity Period Information Element |
- Returns
- validity period in minutes
References DLSMS, GSM340_TP_VPF_ABSOLUTE, GSM340_TP_VPF_ENHANCED, GSM340_TP_VPF_NONE, GSM340_TP_VPF_RELATIVE, gsm340_vp_absolute(), gsm340_vp_default(), gsm340_vp_relative(), gsm340_vp_relative_integer(), gsm340_vp_relative_semioctet(), LOGL_ERROR, and LOGP.
◆ gsm340_vp_absolute()
static unsigned long gsm340_vp_absolute |
( |
uint8_t * |
sms_vp | ) |
|
|
static |
◆ gsm340_vp_default()
static unsigned long gsm340_vp_default |
( |
void |
| ) |
|
|
static |
◆ gsm340_vp_relative()
static unsigned long gsm340_vp_relative |
( |
uint8_t * |
sms_vp | ) |
|
|
static |
◆ gsm340_vp_relative_integer()
static unsigned long gsm340_vp_relative_integer |
( |
uint8_t * |
sms_vp | ) |
|
|
static |
◆ gsm340_vp_relative_semioctet()
static unsigned long gsm340_vp_relative_semioctet |
( |
uint8_t * |
sms_vp | ) |
|
|
static |
◆ gsm411_bcdify()
uint8_t gsm411_bcdify |
( |
uint8_t |
value | ) |
|
Turn int into semi-octet representation: 98 => 0x89.
- Parameters
-
[in] | integer | value representing decimal number 0..99 |
- Returns
- BSC encoded as nibbles, swapped
Referenced by gsm340_gen_scts().
◆ gsm411_cp_state_name()
◆ gsm411_mmsms_cp_ack()
References gsm411_smc_inst::cp_msg, gsm411_smc_inst::cp_rel, gsm411_smc_inst::cp_timer, DLSMS, GSM411_CPS_IDLE, GSM411_CPS_MM_ESTABLISHED, GSM411_MMSMS_REL_REQ, gsm411_msgb_alloc(), gsm411_smc_inst::id, LOGL_INFO, LOGP, gsm411_smc_inst::mm_send, msgb_free(), new_cp_state(), osmo_timer_del(), and SMC_LOG_STR.
◆ gsm411_mmsms_cp_data()
References gsm411_smc_inst::cp_rel, gsm411_smc_inst::cp_state, DLSMS, GSM411_CPS_IDLE, GSM411_CPS_MM_ESTABLISHED, GSM411_MMSMS_DATA_REQ, GSM411_MNSMS_DATA_IND, GSM411_MNSMS_EST_IND, gsm411_msgb_alloc(), GSM411_MT_CP_ACK, gsm411_smc_inst::id, LOGL_INFO, LOGP, gsm411_smc_inst::mm_send, gsm411_smc_inst::mn_recv, msg, new_cp_state(), and SMC_LOG_STR.
◆ gsm411_mmsms_cp_error()
References gsm411_smc_inst::cp_msg, DLSMS, GSM411_CPS_IDLE, GSM411_MMSMS_REL_REQ, GSM411_MNSMS_ERROR_IND, gsm411_msgb_alloc(), gsm411_smc_inst::id, LOGL_INFO, LOGP, gsm411_smc_inst::mm_send, gsm411_smc_inst::mn_recv, msg, msgb_free(), new_cp_state(), and SMC_LOG_STR.
◆ gsm411_mmsms_est_cnf()
◆ gsm411_mmsms_rel_ind()
References gsm411_smc_inst::cp_msg, DLSMS, GSM411_CPS_IDLE, GSM411_MNSMS_ERROR_IND, gsm411_msgb_alloc(), gsm411_smc_inst::id, LOGL_INFO, LOGP, gsm411_smc_inst::mn_recv, msgb_free(), new_cp_state(), and SMC_LOG_STR.
◆ gsm411_mmsms_send_msg()
References gsm411_smc_inst::cp_msg, gsm411_smc_inst::cp_retx, gsm411_smc_inst::cp_state, gsm411_smc_inst::cp_tc1, gsm411_smc_inst::cp_timer, cp_timer_expired(), msgb::data, DLSMS, GSM411_CPS_WAIT_CP_ACK, GSM411_MMSMS_DATA_REQ, gsm411_msgb_alloc(), GSM411_MT_CP_DATA, gsm411_smc_inst::id, msgb::len, LOGL_INFO, LOGP, gsm411_smc_inst::mm_send, msgb_put(), new_cp_state(), osmo_timer_schedule(), osmo_timer_setup(), and SMC_LOG_STR.
Referenced by gsm411_mmsms_est_cnf(), and gsm411_mnsms_data_req().
◆ gsm411_mnsms_abort_req()
◆ gsm411_mnsms_data_ind_tx()
References gsm48_hdr::data, DLSMS, GSM411_MT_RP_ACK_MO, GSM411_MT_RP_ACK_MT, GSM411_MT_RP_ERROR_MO, GSM411_MT_RP_ERROR_MT, GSM411_RP_CAUSE_MSG_INCOMP_STATE, GSM411_RP_CAUSE_MSGTYPE_NOTEXIST, GSM411_RPS_IDLE, gsm411_send_release(), gsm411_send_rp_error(), GSM411_SM_RL_REPORT_IND, gsm411_smr_inst::id, LOGL_DEBUG, LOGL_NOTICE, LOGP, msg, msg_type, gsm411_smr_inst::network, new_rp_state(), gsm411_smr_inst::rl_recv, and SMR_LOG_STR.
◆ gsm411_mnsms_data_req()
◆ gsm411_mnsms_error_ind_rx()
◆ gsm411_mnsms_error_ind_tx()
References DLSMS, GSM411_RPS_IDLE, gsm411_send_release(), GSM411_SM_RL_REPORT_IND, gsm411_smr_inst::id, LOGL_DEBUG, LOGP, msg, new_rp_state(), gsm411_smr_inst::rl_recv, and SMR_LOG_STR.
◆ gsm411_mnsms_est_ind()
References gsm48_hdr::data, DLSMS, GSM411_MT_RP_DATA_MO, GSM411_MT_RP_DATA_MT, GSM411_MT_RP_SMMA_MO, GSM411_RP_CAUSE_MSG_INCOMP_STATE, GSM411_RP_CAUSE_MSGTYPE_NOTEXIST, GSM411_RPS_IDLE, GSM411_RPS_WAIT_TO_TX_RP_ACK, gsm411_send_release(), gsm411_send_rp_error(), GSM411_SM_RL_DATA_IND, GSM411_TMR_TR2M, gsm411_smr_inst::id, LOGL_DEBUG, LOGL_NOTICE, LOGP, msg, msg_type, gsm411_smr_inst::network, new_rp_state(), osmo_timer_schedule(), gsm411_smr_inst::rl_recv, gsm411_smr_inst::rp_timer, and SMR_LOG_STR.
◆ gsm411_mnsms_est_req()
References gsm411_smc_inst::cp_msg, gsm411_smc_inst::cp_rel, DLSMS, GSM411_CPS_MM_CONN_PENDING, GSM411_MMSMS_EST_REQ, gsm411_msgb_alloc(), gsm411_smc_inst::id, LOGL_FATAL, LOGP, gsm411_smc_inst::mm_send, msg, msgb_free(), new_cp_state(), and SMC_LOG_STR.
◆ gsm411_mnsms_rel_req()
References gsm411_smc_inst::cp_msg, gsm411_smc_inst::cp_rel, gsm411_smc_inst::cp_state, DLSMS, GSM411_CPS_IDLE, GSM411_CPS_MM_ESTABLISHED, GSM411_MMSMS_REL_REQ, gsm411_msgb_alloc(), gsm411_smc_inst::id, LOGL_NOTICE, LOGP, gsm411_smc_inst::mm_send, msg, msgb_free(), new_cp_state(), SMC_LOG_STR, and smc_state_names.
◆ gsm411_msgb_alloc()
struct msgb * gsm411_msgb_alloc |
( |
void |
| ) |
|
Allocate a message buffer for use as TS 04.11 message.
- Returns
- allocated message buffer
References GSM411_ALLOC_HEADROOM, GSM411_ALLOC_SIZE, and msgb_alloc_headroom().
Referenced by cp_timer_expired(), gsm411_mmsms_cp_ack(), gsm411_mmsms_cp_data(), gsm411_mmsms_cp_error(), gsm411_mmsms_rel_ind(), gsm411_mmsms_send_msg(), gsm411_mnsms_abort_req(), gsm411_mnsms_est_req(), gsm411_mnsms_rel_req(), gsm411_send_abort(), gsm411_send_release(), gsm411_send_report(), gsm411_send_rp_error(), gsm411_smc_recv(), and gsm411_tx_cp_error().
◆ gsm411_push_cp_header()
int gsm411_push_cp_header |
( |
struct msgb * |
msg, |
|
|
uint8_t |
proto, |
|
|
uint8_t |
trans, |
|
|
uint8_t |
msg_type |
|
) |
| |
◆ gsm411_push_rp_header()
int gsm411_push_rp_header |
( |
struct msgb * |
msg, |
|
|
uint8_t |
rp_msg_type, |
|
|
uint8_t |
rp_msg_ref |
|
) |
| |
◆ gsm411_rl_data_req()
References DLSMS, GSM411_MNSMS_EST_REQ, GSM411_RPS_WAIT_FOR_RP_ACK, GSM411_TMR_TR1M, gsm411_smr_inst::id, LOGL_DEBUG, LOGP, gsm411_smr_inst::mn_send, msg, new_rp_state(), osmo_timer_schedule(), gsm411_smr_inst::rp_timer, and SMR_LOG_STR.
◆ gsm411_rl_report_req()
References DLSMS, GSM411_MNSMS_DATA_REQ, GSM411_RPS_IDLE, gsm411_send_release(), gsm411_smr_inst::id, LOGL_DEBUG, LOGP, gsm411_smr_inst::mn_send, msg, new_rp_state(), and SMR_LOG_STR.
◆ gsm411_rp_sendmsg()
static int gsm411_rp_sendmsg |
( |
struct gsm411_smr_inst * |
inst, |
|
|
struct msgb * |
msg, |
|
|
uint8_t |
rp_msg_type, |
|
|
uint8_t |
rp_msg_ref, |
|
|
int |
mnsms_msg_type |
|
) |
| |
|
static |
◆ gsm411_rp_state_name()
◆ gsm411_send_abort()
◆ gsm411_send_release()
References DLSMS, GSM411_MNSMS_REL_REQ, gsm411_msgb_alloc(), gsm411_smr_inst::id, LOGL_DEBUG, LOGP, gsm411_smr_inst::mn_send, msg, and SMR_LOG_STR.
Referenced by gsm411_mnsms_data_ind_tx(), gsm411_mnsms_error_ind_tx(), gsm411_mnsms_est_ind(), and gsm411_rl_report_req().
◆ gsm411_send_report()
◆ gsm411_send_rp_error()
static int gsm411_send_rp_error |
( |
struct gsm411_smr_inst * |
inst, |
|
|
uint8_t |
msg_ref, |
|
|
uint8_t |
cause |
|
) |
| |
|
static |
References cause, DLSMS, get_value_string(), GSM411_MNSMS_DATA_REQ, gsm411_msgb_alloc(), GSM411_MT_RP_ERROR_MO, GSM411_MT_RP_ERROR_MT, gsm411_rp_cause_strs, gsm411_rp_sendmsg(), gsm411_smr_inst::id, LOGL_NOTICE, LOGP, msg, msg_ref, msgb_tv_put(), gsm411_smr_inst::network, and SMR_LOG_STR.
Referenced by gsm411_mnsms_data_ind_tx(), and gsm411_mnsms_est_ind().
◆ gsm411_smc_clear()
◆ gsm411_smc_init()
References gsm411_smc_inst::cp_max_retr, gsm411_smc_inst::cp_state, gsm411_smc_inst::cp_tc1, DLSMS, GSM411_CPS_IDLE, GSM411_TMR_TC1A_SEC, gsm411_smc_inst::id, LOGL_INFO, LOGP, MAX_SMS_RETRY, gsm411_smc_inst::mm_send, gsm411_smc_inst::mn_recv, network, gsm411_smc_inst::network, and SMC_LOG_STR.
◆ gsm411_smc_recv()
int gsm411_smc_recv |
( |
struct gsm411_smc_inst * |
inst, |
|
|
int |
msg_type, |
|
|
struct msgb * |
msg, |
|
|
int |
cp_msg_type |
|
) |
| |
References gsm411_smc_inst::cp_state, smcdatastate::cp_type, DLSMS, GSM411_CP_CAUSE_MSGTYPE_NOTEXIST, GSM411_CPS_IDLE, GSM411_MMSMS_DATA_IND, GSM411_MMSMS_EST_IND, GSM411_MMSMS_REL_REQ, GSM411_MNSMS_ERROR_IND, gsm411_msgb_alloc(), gsm411_tx_cp_error(), gsm411_smc_inst::id, LOGL_INFO, LOGL_NOTICE, LOGP, gsm411_smc_inst::mm_send, gsm411_smc_inst::mn_recv, msg, msg_type, msgb_free(), smcdatastate::name, new_cp_state(), smcdatastate::rout, SBIT, SMC_LOG_STR, smc_state_names, SMCDATASLLEN, smcdatastatelist, smcdatastate::states, and type.
◆ gsm411_smc_send()
References gsm411_smc_inst::cp_state, DLSMS, gsm411_smc_inst::id, LOGL_INFO, LOGL_NOTICE, LOGP, msg, msg_type, msgb_free(), smcdownstate::name, smcdownstate::rout, SBIT, SMC_LOG_STR, smc_state_names, SMCDOWNSLLEN, smcdownstatelist, smcdownstate::states, and type.
◆ gsm411_smr_clear()
◆ gsm411_smr_init()
References DLSMS, GSM411_RPS_IDLE, gsm411_smr_inst::id, LOGL_INFO, LOGP, gsm411_smr_inst::mn_send, network, gsm411_smr_inst::network, osmo_timer_setup(), gsm411_smr_inst::rl_recv, gsm411_smr_inst::rp_state, gsm411_smr_inst::rp_timer, rp_timer_expired(), and SMR_LOG_STR.
◆ gsm411_smr_recv()
References DLSMS, gsm411_smr_inst::id, LOGL_INFO, LOGL_NOTICE, LOGP, msg, msg_type, smrdatastate::name, smrdatastate::rout, gsm411_smr_inst::rp_state, SBIT, SMR_LOG_STR, smr_state_names, SMRDATASLLEN, smrdatastatelist, smrdatastate::states, and type.
◆ gsm411_smr_send()
References DLSMS, gsm411_smr_inst::id, LOGL_INFO, LOGL_NOTICE, LOGP, msg, msg_type, msgb_free(), smrdownstate::name, smrdownstate::rout, gsm411_smr_inst::rp_state, SBIT, SMR_LOG_STR, smr_state_names, SMRDOWNSLLEN, smrdownstatelist, smrdownstate::states, and type.
◆ gsm411_tx_cp_error()
static int gsm411_tx_cp_error |
( |
struct gsm411_smc_inst * |
inst, |
|
|
uint8_t |
cause |
|
) |
| |
|
static |
References cause, DLSMS, get_value_string(), gsm411_cp_cause_strs, GSM411_MMSMS_DATA_REQ, gsm411_msgb_alloc(), GSM411_MT_CP_ERROR, gsm411_smc_inst::id, LOGL_NOTICE, LOGP, gsm411_smc_inst::mm_send, msgb_put(), and SMC_LOG_STR.
Referenced by gsm411_smc_recv().
◆ gsm411_unbcdify()
uint8_t gsm411_unbcdify |
( |
uint8_t |
value | ) |
|
◆ new_cp_state()
References gsm411_smc_inst::cp_state, DLSMS, gsm411_smc_inst::id, LOGL_INFO, LOGP, SMC_LOG_STR, and smc_state_names.
Referenced by cp_timer_expired(), gsm411_mmsms_cp_ack(), gsm411_mmsms_cp_data(), gsm411_mmsms_cp_error(), gsm411_mmsms_rel_ind(), gsm411_mmsms_send_msg(), gsm411_mnsms_abort_req(), gsm411_mnsms_est_req(), gsm411_mnsms_rel_req(), and gsm411_smc_recv().
◆ new_rp_state()
References DLSMS, GSM411_RPS_IDLE, gsm411_smr_inst::id, LOGL_INFO, LOGP, osmo_timer_del(), gsm411_smr_inst::rp_state, gsm411_smr_inst::rp_timer, SMR_LOG_STR, and smr_state_names.
Referenced by gsm411_mnsms_data_ind_tx(), gsm411_mnsms_error_ind_rx(), gsm411_mnsms_error_ind_tx(), gsm411_mnsms_est_ind(), gsm411_rl_data_req(), and gsm411_rl_report_req().
◆ rp_timer_expired()
static void rp_timer_expired |
( |
void * |
data | ) |
|
|
static |
◆ gsm411_cp_cause_strs [1/2]
◆ gsm411_cp_cause_strs [2/2]
Initial value:= {
"Message incompatible with protocol state" },
{ 0, 0 }
}
Referenced by gsm411_tx_cp_error().
◆ gsm411_cp_state_names [1/2]
◆ gsm411_cp_state_names [2/2]
◆ gsm411_rp_cause_strs [1/2]
◆ gsm411_rp_cause_strs [2/2]
◆ gsm411_rp_state_names [1/2]
◆ gsm411_rp_state_names [2/2]
◆ smc_state_names
const char* smc_state_names[] |
◆ smcdatastatelist
◆ smcdownstatelist
◆ smr_state_names
const char* smr_state_names[] |
|
static |
◆ smrdatastatelist
◆ smrdownstatelist
@ GSM411_RP_CAUSE_MO_SMS_REJECTED
Definition: gsm_04_11.h:71
@ GSM411_RPS_IDLE
Definition: gsm_04_11.h:19
@ GSM411_RP_CAUSE_MT_MEM_EXCEEDED
Definition: gsm_04_11.h:84
@ GSM411_CP_CAUSE_PROTOCOL_ERR
Definition: gsm_04_11.h:48
@ GSM411_CPS_IDLE
Definition: gsm_04_11.h:11
@ GSM411_CP_CAUSE_CONGESTION
Definition: gsm_04_11.h:41
@ GSM411_RP_CAUSE_MO_REQ_FAC_NOTSUBSCR
Definition: gsm_04_11.h:80
@ GSM411_RPS_WAIT_FOR_RETRANS_T
Definition: gsm_04_11.h:22
@ GSM411_RPS_WAIT_FOR_RP_ACK
Definition: gsm_04_11.h:20
@ GSM411_RP_CAUSE_MO_CONGESTION
Definition: gsm_04_11.h:78
@ GSM411_CP_CAUSE_MSGTYPE_NOTEXIST
Definition: gsm_04_11.h:45
static int gsm411_mnsms_rel_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:326
@ GSM411_RP_CAUSE_IE_NOTEXIST
Definition: gsm_04_11.h:91
#define ALL_STATES
Definition: gsm_04_08.h:2114
@ GSM411_RPS_WAIT_TO_TX_RP_ACK
Definition: gsm_04_11.h:21
@ GSM411_RP_CAUSE_INV_MAND_INF
Definition: gsm_04_11.h:88
@ GSM411_CP_CAUSE_IE_NOTEXIST
Definition: gsm_04_11.h:47
@ GSM411_CP_CAUSE_SEMANT_INC_MSG
Definition: gsm_04_11.h:43
@ GSM411_CP_CAUSE_NET_FAIL
Definition: gsm_04_11.h:40
@ GSM411_RP_CAUSE_MO_INTERWORKING
Definition: gsm_04_11.h:82
static int gsm411_mnsms_error_ind_rx(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:353
@ GSM411_CP_CAUSE_INV_MAND_INF
Definition: gsm_04_11.h:44
#define GSM411_MNSMS_DATA_REQ
Definition: gsm0411_smc.h:22
static int gsm411_mnsms_error_ind_tx(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:342
@ GSM411_RP_CAUSE_MO_FACILITY_REJ
Definition: gsm_04_11.h:74
@ GSM411_RP_CAUSE_MO_RES_UNAVAIL
Definition: gsm_04_11.h:79
@ GSM411_RP_CAUSE_SEMANT_INC_MSG
Definition: gsm_04_11.h:87
static int gsm411_mnsms_abort_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:401
@ GSM411_RP_CAUSE_MO_CALL_BARRED
Definition: gsm_04_11.h:70
static int gsm411_mnsms_data_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:310
@ GSM411_CPS_MM_ESTABLISHED
Definition: gsm_04_11.h:14
static int gsm411_mnsms_est_ind(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:241
@ GSM411_CPS_WAIT_CP_ACK
Definition: gsm_04_11.h:13
#define GSM411_MNSMS_ABORT_REQ
Definition: gsm0411_smc.h:21
static int gsm411_rl_data_req(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:219
@ GSM411_RP_CAUSE_MSG_INCOMP_STATE
Definition: gsm_04_11.h:90
#define GSM411_MNSMS_REL_REQ
Definition: gsm0411_smc.h:27
#define GSM411_MNSMS_EST_REQ
Definition: gsm0411_smc.h:24
#define GSM411_SM_RL_DATA_REQ
Definition: gsm0411_smr.h:9
@ GSM411_RP_CAUSE_PROTOCOL_ERR
Definition: gsm_04_11.h:92
@ GSM411_RP_CAUSE_MO_OP_DET_BARR
Definition: gsm_04_11.h:69
@ GSM411_RP_CAUSE_INV_TRANS_REF
Definition: gsm_04_11.h:86
@ GSM411_RP_CAUSE_MO_TEMP_FAIL
Definition: gsm_04_11.h:77
#define SBIT(a)
Definition: gsm_04_08.h:2113
@ GSM411_RP_CAUSE_MO_UNIDENTIFIED_SUBSCR
Definition: gsm_04_11.h:73
@ GSM411_CP_CAUSE_MSG_INCOMP_STATE
Definition: gsm_04_11.h:46
@ GSM411_RP_CAUSE_MO_REQ_FAC_NOTIMPL
Definition: gsm_04_11.h:81
#define GSM411_MNSMS_EST_IND
Definition: gsm0411_smc.h:25
@ GSM411_RP_CAUSE_MO_UNKNOWN_SUBSCR
Definition: gsm_04_11.h:75
@ GSM411_RP_CAUSE_MO_DEST_OUT_OF_ORDER
Definition: gsm_04_11.h:72
@ GSM411_RP_CAUSE_MO_NUM_UNASSIGNED
Definition: gsm_04_11.h:68
static int gsm411_mnsms_data_ind_tx(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:292
static int gsm411_mnsms_est_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:163
@ GSM411_CP_CAUSE_INV_TRANS_ID
Definition: gsm_04_11.h:42
#define GSM411_SM_RL_REPORT_REQ
Definition: gsm0411_smr.h:13
static int gsm411_rl_report_req(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:230
@ GSM411_CPS_MM_CONN_PENDING
Definition: gsm_04_11.h:12
#define GSM411_MNSMS_ERROR_IND
Definition: gsm0411_smc.h:26
@ GSM411_RP_CAUSE_MSGTYPE_NOTEXIST
Definition: gsm_04_11.h:89
#define GSM411_MNSMS_DATA_IND
Definition: gsm0411_smc.h:23
@ GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER
Definition: gsm_04_11.h:76