libosmogsm 1.13.1.1-afb4 Osmocom GSM library

Files | Data Structures | Macros | Functions | Variables
Short Message Service (SMS)

## Files
file | gsm0341.h
file | gsm0411_smc.h
file | gsm0411_smr.h
file | gsm0411_utils.h
file | gsm0341.c
file | gsm0411_smc.c
| Point-to-Point (PP) Short Message Service (SMS) as per TS 04.11.
file | gsm0411_smr.c
file | gsm0411_utils.c

## Data Structures
struct | gsm411_smc_inst
struct | gsm411_smr_inst
struct | smcdownstate
struct | smcdatastate
struct | smrdownstate
struct | smrdatastate

## Macros
#define | GSM411_MMSMS_EST_REQ 0x310
#define | GSM411_MMSMS_EST_IND 0x312
#define | GSM411_MMSMS_EST_CNF 0x311
#define | GSM411_MMSMS_REL_REQ 0x320
#define | GSM411_MMSMS_REL_IND 0x322
#define | GSM411_MMSMS_DATA_REQ 0x330
#define | GSM411_MMSMS_DATA_IND 0x332
#define | GSM411_MMSMS_UNIT_DATA_REQ 0x340
#define | GSM411_MMSMS_UNIT_DATA_IND 0x342
#define | GSM411_MMSMS_ERR_IND 0x372
#define | GSM411_MNSMS_ABORT_REQ 0x101
#define | GSM411_MNSMS_DATA_REQ 0x102
#define | GSM411_MNSMS_DATA_IND 0x103
#define | GSM411_MNSMS_EST_REQ 0x104
#define | GSM411_MNSMS_EST_IND 0x105
#define | GSM411_MNSMS_ERROR_IND 0x106
#define | GSM411_MNSMS_REL_REQ 0x107
#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
#define | MAX_SMS_RETRY 2
#define | SMC_LOG_STR "SMC(%" PRIu64 ") "
#define | SMCDOWNSLLEN (sizeof(smcdownstatelist) / sizeof(struct smcdownstate))
#define | SMCDATASLLEN (sizeof(smcdatastatelist) / sizeof(struct smcdatastate))
#define | SMRDOWNSLLEN (sizeof(smrdownstatelist) / sizeof(struct smrdownstate))
#define | SMRDATASLLEN (sizeof(smrdatastatelist) / sizeof(struct smrdatastate))
#define | GSM411_ALLOC_SIZE 1024
#define | GSM411_ALLOC_HEADROOM 128

## Functions
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)

## Variables
const struct value_string | gsm411_cp_cause_strs []
const struct value_string | gsm411_cp_state_names []
const struct value_string | gsm411_rp_cause_strs []
const struct value_string | gsm411_rp_state_names []
const char * | smc_state_names []
const struct value_string | gsm411_cp_cause_strs []
static const struct smcdownstate | smcdownstatelist []
static const struct smcdatastate | smcdatastatelist []
const struct value_string | gsm411_cp_state_names []
static const char * | smr_state_names []
const struct value_string | gsm411_rp_cause_strs []
static const struct smrdownstate | smrdownstatelist []
static const struct smrdatastate | smrdatastatelist []
const struct value_string | gsm411_rp_state_names []

## Detailed Description

## Macro Definition Documentation

## ◆ 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

#define MAX_SMS_RETRY 2

## ◆ SMC_LOG_STR

#define SMC_LOG_STR "SMC(%" PRIu64 ") "

## ◆ SMCDATASLLEN

#define SMCDATASLLEN (sizeof(smcdatastatelist) / sizeof(struct smcdatastate))

## ◆ SMCDOWNSLLEN

#define SMCDOWNSLLEN (sizeof(smcdownstatelist) / sizeof(struct smcdownstate))

## ◆ SMRDATASLLEN

#define SMRDATASLLEN (sizeof(smrdatastatelist) / sizeof(struct smrdatastate))

## ◆ SMRDOWNSLLEN

#define SMRDOWNSLLEN (sizeof(smrdownstatelist) / sizeof(struct smrdownstate))

## Function Documentation

## ◆ 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
| ) |  |

Encode a 3GPP TS 03.41 SMS-CB message.

Parameters

  [in] | ctx | talloc allocation context
  [in] | geo_scope | Geographic Scope
  [in] | msg_code | Message Code
  [in] | update | Is this an update?
  [in] | msg_id | Message ID
  [in] | dcs | Data Coding Scheme
  [in] | page_total | Total number of pages
  [in] | page_cur | Current Page (up to page_total)
  [in] | data | Message data (copied 1:1)
  [in] | len | Length of data in bytes (up to 88)

Returns
  callee-allocated TS 03.41 message with encoded data

References data, gsm341_ms_message::data, dcs, gsm341_ms_message::dcs, len, msg_id, gsm341_ms_message::msg_id, osmo_htons, gsm341_ms_message::page, and gsm341_ms_message::serial.

## ◆ gsm338_get_sms_alphabet()

enum sms_alphabet gsm338_get_sms_alphabet | ( | uint8_t | dcs | ) |

determine coding alphabet dependent on GSM 03.38 Section 4 DCS

Parameters

  [in] | dcs | Data Coding Scheme in 03.38 encoding

Returns
  libosmogsm internal enum sms_alphabet

References dcs, DCS_7BIT_DEFAULT, DCS_8BIT_DATA, DCS_NONE, DCS_UCS2, DLSMS, LOGL_NOTICE, and LOGP.

## ◆ 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

References gsm340_scts(), and time.

Referenced by gsm340_validity_period().

## ◆ gsm340_vp_default()

static unsigned long gsm340_vp_default | ( | void |  | ) |
| static

Referenced by gsm340_validity_period(), and gsm340_vp_relative_integer().

## ◆ gsm340_vp_relative()

static unsigned long gsm340_vp_relative | ( | uint8_t * | sms_vp | ) |
| static

Referenced by gsm340_validity_period().

## ◆ gsm340_vp_relative_integer()

static unsigned long gsm340_vp_relative_integer | ( | uint8_t * | sms_vp | ) |
| static

References DLSMS, gsm340_vp_default(), LOGL_ERROR, and LOGP.

Referenced by gsm340_validity_period().

## ◆ gsm340_vp_relative_semioctet()

static unsigned long gsm340_vp_relative_semioctet | ( | uint8_t * | sms_vp | ) |
| static

References gsm411_unbcdify().

Referenced by gsm340_validity_period().

## ◆ 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()

static const char * gsm411_cp_state_name | ( | enum gsm411_cp_state | cp_state | ) |
| inline static

References get_value_string(), and gsm411_cp_state_names.

## ◆ gsm411_mmsms_cp_ack()

static int gsm411_mmsms_cp_ack | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mmsms_cp_data | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mmsms_cp_error | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mmsms_est_cnf | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

References gsm411_smc_inst::cp_msg, DLSMS, gsm411_mmsms_send_msg(), gsm411_smc_inst::id, LOGL_FATAL, LOGP, and SMC_LOG_STR.

Referenced by cp_timer_expired().

## ◆ gsm411_mmsms_rel_ind()

static int gsm411_mmsms_rel_ind | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mmsms_send_msg | ( | struct gsm411_smc_inst * | inst | ) |
| static

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()

static int gsm411_mnsms_abort_req | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

References gsm411_smc_inst::cp_msg, GSM411_CPS_IDLE, GSM411_MMSMS_DATA_REQ, GSM411_MMSMS_REL_REQ, gsm411_msgb_alloc(), GSM411_MT_CP_ERROR, gsm411_smc_inst::mm_send, msg, msgb_free(), and new_cp_state().

## ◆ gsm411_mnsms_data_ind_tx()

static int gsm411_mnsms_data_ind_tx | ( | struct gsm411_smr_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mnsms_data_req | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

References gsm411_smc_inst::cp_msg, DLSMS, gsm411_mmsms_send_msg(), gsm411_smc_inst::id, LOGL_FATAL, LOGP, msg, msgb_free(), and SMC_LOG_STR.

## ◆ gsm411_mnsms_error_ind_rx()

static int gsm411_mnsms_error_ind_rx | ( | struct gsm411_smr_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

References DLSMS, GSM411_RPS_IDLE, 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_error_ind_tx()

static int gsm411_mnsms_error_ind_tx | ( | struct gsm411_smr_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mnsms_est_ind | ( | struct gsm411_smr_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mnsms_est_req | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_mnsms_rel_req | ( | struct gsm411_smc_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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
| ) |  |

Prefix Message buffers with a 04.08/04.11 CP header.

Parameters

  | msg | Message Buffer containing message
  [in] | proto | Protocol
  [in] | trans | Transaction
  [in] | msg_type | Message Type

Returns
  0

References gsm48_push_l3hdr_tid, msg, msg_type, and proto.

## ◆ gsm411_push_rp_header()

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.

Parameters

  | msg | Message Buffer containing message
  [in] | rp_msg_type | RP Message Type
  [in] | rp_msg_ref | RP Message Reference

Returns
  0

References len, gsm411_rp_hdr::len, msg, gsm411_rp_hdr::msg_ref, gsm411_rp_hdr::msg_type, and msgb_push().

## ◆ gsm411_rl_data_req()

static int gsm411_rl_data_req | ( | struct gsm411_smr_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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()

static int gsm411_rl_report_req | ( | struct gsm411_smr_inst * | inst,
|  | struct msgb * | msg
| ) |  |
| static

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

References len, gsm411_rp_hdr::len, gsm411_smr_inst::mn_send, msg, gsm411_rp_hdr::msg_ref, gsm411_rp_hdr::msg_type, and msgb_push().

Referenced by gsm411_send_rp_error().

## ◆ gsm411_rp_state_name()

static const char * gsm411_rp_state_name | ( | enum gsm411_rp_state | rp_state | ) |
| inline static

References get_value_string(), and gsm411_rp_state_names.

## ◆ gsm411_send_abort()

static int gsm411_send_abort | ( | struct gsm411_smr_inst * | inst | ) |
| static

References DLSMS, GSM411_MNSMS_ABORT_REQ, gsm411_msgb_alloc(), gsm411_smr_inst::id, LOGL_DEBUG, LOGP, gsm411_smr_inst::mn_send, msg, msgb_tv_put(), and SMR_LOG_STR.

Referenced by rp_timer_expired().

## ◆ gsm411_send_release()

static int gsm411_send_release | ( | struct gsm411_smr_inst * | inst | ) |
| static

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()

static int gsm411_send_report | ( | struct gsm411_smr_inst * | inst | ) |
| static

References DLSMS, gsm411_msgb_alloc(), GSM411_SM_RL_REPORT_IND, gsm411_smr_inst::id, LOGL_DEBUG, LOGP, msg, gsm411_smr_inst::rl_recv, and SMR_LOG_STR.

Referenced by rp_timer_expired().

## ◆ 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()

void gsm411_smc_clear | ( | struct gsm411_smc_inst * | inst | ) |

References gsm411_smc_inst::cp_msg, gsm411_smc_inst::cp_timer, DLSMS, gsm411_smc_inst::id, LOGL_INFO, LOGP, msgb_free(), osmo_timer_del(), and SMC_LOG_STR.

## ◆ gsm411_smc_init()

void gsm411_smc_init | ( | struct gsm411_smc_inst * | inst,
|  | uint64_t | id,
|  | int | network,
|  | int(*)(struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg) | mn_recv,
|  | int(*)(struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg, int cp_msg_type) | mm_send
| ) |  |

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()

int gsm411_smc_send | ( | struct gsm411_smc_inst * | inst,
|  | int | msg_type,
|  | struct msgb * | msg
| ) |  |

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()

void gsm411_smr_clear | ( | struct gsm411_smr_inst * | inst | ) |

References DLSMS, gsm411_smr_inst::id, LOGL_INFO, LOGP, osmo_timer_del(), gsm411_smr_inst::rp_timer, and SMR_LOG_STR.

## ◆ gsm411_smr_init()

void gsm411_smr_init | ( | struct gsm411_smr_inst * | inst,
|  | uint64_t | id,
|  | int | network,
|  | int(*)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg) | rl_recv,
|  | int(*)(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg) | mn_send
| ) |  |

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()

int gsm411_smr_recv | ( | struct gsm411_smr_inst * | inst,
|  | int | msg_type,
|  | struct msgb * | msg
| ) |  |

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()

int gsm411_smr_send | ( | struct gsm411_smr_inst * | inst,
|  | int | msg_type,
|  | struct msgb * | msg
| ) |  |

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 | ) |

Turn semi-octet representation into int: 0x89 => 98.

Parameters

  [in] | value | byte containing two BCD nibbles in revere order

Returns
  integer representing decoded, re-ordered nibbles

References DLSMS, LOGL_ERROR, and LOGP.

Referenced by gsm340_scts(), and gsm340_vp_relative_semioctet().

## ◆ new_cp_state()

static void new_cp_state | ( | struct gsm411_smc_inst * | inst,
|  | enum gsm411_cp_state | state
| ) |  |
| static

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()

static void new_rp_state | ( | struct gsm411_smr_inst * | inst,
|  | enum gsm411_rp_state | state
| ) |  |
| static

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

References data, DLSMS, GSM411_RPS_WAIT_TO_TX_RP_ACK, gsm411_send_abort(), gsm411_send_report(), gsm411_smr_inst::id, LOGL_DEBUG, LOGP, gsm411_smr_inst::rp_state, and SMR_LOG_STR.

Referenced by gsm411_smr_init().

## Variable Documentation

## ◆ gsm411_cp_cause_strs [1/2]

const struct value_string gsm411_cp_cause_strs[]
| extern

Referenced by gsm411_tx_cp_error().

## ◆ gsm411_cp_cause_strs [2/2]

const struct value_string gsm411_cp_cause_strs[]

Initial value:
= {
{ GSM411_CP_CAUSE_NET_FAIL, "Network Failure" },
{ GSM411_CP_CAUSE_CONGESTION, "Congestion" },
{ GSM411_CP_CAUSE_INV_TRANS_ID, "Invalid Transaction ID" },
{ GSM411_CP_CAUSE_SEMANT_INC_MSG, "Semantically Incorrect Message" },
{ GSM411_CP_CAUSE_INV_MAND_INF, "Invalid Mandatory Information" },
{ GSM411_CP_CAUSE_MSGTYPE_NOTEXIST, "Message Type doesn't exist" },
{ GSM411_CP_CAUSE_MSG_INCOMP_STATE,
"Message incompatible with protocol state" },
{ GSM411_CP_CAUSE_IE_NOTEXIST, "IE does not exist" },
{ GSM411_CP_CAUSE_PROTOCOL_ERR, "Protocol Error" },
{ 0, 0 }
}
GSM411_CP_CAUSE_MSG_INCOMP_STATE
@ GSM411_CP_CAUSE_MSG_INCOMP_STATE
Definition: gsm_04_11.h:46
GSM411_CP_CAUSE_NET_FAIL
@ GSM411_CP_CAUSE_NET_FAIL
Definition: gsm_04_11.h:40
GSM411_CP_CAUSE_CONGESTION
@ GSM411_CP_CAUSE_CONGESTION
Definition: gsm_04_11.h:41
GSM411_CP_CAUSE_INV_TRANS_ID
@ GSM411_CP_CAUSE_INV_TRANS_ID
Definition: gsm_04_11.h:42
GSM411_CP_CAUSE_PROTOCOL_ERR
@ GSM411_CP_CAUSE_PROTOCOL_ERR
Definition: gsm_04_11.h:48
GSM411_CP_CAUSE_MSGTYPE_NOTEXIST
@ GSM411_CP_CAUSE_MSGTYPE_NOTEXIST
Definition: gsm_04_11.h:45
GSM411_CP_CAUSE_IE_NOTEXIST
@ GSM411_CP_CAUSE_IE_NOTEXIST
Definition: gsm_04_11.h:47
GSM411_CP_CAUSE_SEMANT_INC_MSG
@ GSM411_CP_CAUSE_SEMANT_INC_MSG
Definition: gsm_04_11.h:43
GSM411_CP_CAUSE_INV_MAND_INF
@ GSM411_CP_CAUSE_INV_MAND_INF
Definition: gsm_04_11.h:44

Referenced by gsm411_tx_cp_error().

## ◆ gsm411_cp_state_names [1/2]

const struct value_string gsm411_cp_state_names[]
| extern

Referenced by gsm411_cp_state_name().

## ◆ gsm411_cp_state_names [2/2]

const struct value_string gsm411_cp_state_names[]

Initial value:
= {
{ GSM411_CPS_IDLE, "IDLE" },
{ GSM411_CPS_MM_CONN_PENDING, "MM_CONN_PENDING" },
{ GSM411_CPS_WAIT_CP_ACK, "WAIT_CP_ACK" },
{ GSM411_CPS_MM_ESTABLISHED, "ESTABLISHD" },
{ 0, NULL }
}
GSM411_CPS_MM_ESTABLISHED
@ GSM411_CPS_MM_ESTABLISHED
Definition: gsm_04_11.h:14
GSM411_CPS_WAIT_CP_ACK
@ GSM411_CPS_WAIT_CP_ACK
Definition: gsm_04_11.h:13
GSM411_CPS_IDLE
@ GSM411_CPS_IDLE
Definition: gsm_04_11.h:11
GSM411_CPS_MM_CONN_PENDING
@ GSM411_CPS_MM_CONN_PENDING
Definition: gsm_04_11.h:12

Referenced by gsm411_cp_state_name().

## ◆ gsm411_rp_cause_strs [1/2]

const struct value_string gsm411_rp_cause_strs[]
| extern

Referenced by gsm411_send_rp_error().

## ◆ gsm411_rp_cause_strs [2/2]

const struct value_string gsm411_rp_cause_strs[]

Initial value:
= {
{ GSM411_RP_CAUSE_MO_NUM_UNASSIGNED, "(MO) Number not assigned" },
{ GSM411_RP_CAUSE_MO_OP_DET_BARR, "(MO) Operator determined barring" },
{ GSM411_RP_CAUSE_MO_CALL_BARRED, "(MO) Call barred" },
{ GSM411_RP_CAUSE_MO_SMS_REJECTED, "(MO) SMS rejected" },
{ GSM411_RP_CAUSE_MO_DEST_OUT_OF_ORDER, "(MO) Destination out of order" },
{ GSM411_RP_CAUSE_MO_UNIDENTIFIED_SUBSCR, "(MO) Unidentified subscriber" },
{ GSM411_RP_CAUSE_MO_FACILITY_REJ, "(MO) Facility reject" },
{ GSM411_RP_CAUSE_MO_UNKNOWN_SUBSCR, "(MO) Unknown subscriber" },
{ GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER, "(MO) Network out of order" },
{ GSM411_RP_CAUSE_MO_TEMP_FAIL, "(MO) Temporary failure" },
{ GSM411_RP_CAUSE_MO_CONGESTION, "(MO) Congestion" },
{ GSM411_RP_CAUSE_MO_RES_UNAVAIL, "(MO) Resource unavailable" },
{ GSM411_RP_CAUSE_MO_REQ_FAC_NOTSUBSCR, "(MO) Requested facility not subscribed" },
{ GSM411_RP_CAUSE_MO_REQ_FAC_NOTIMPL, "(MO) Requested facility not implemented" },
{ GSM411_RP_CAUSE_MO_INTERWORKING, "(MO) Interworking" },
{ GSM411_RP_CAUSE_MT_MEM_EXCEEDED, "(MT) Memory Exceeded" },
{ GSM411_RP_CAUSE_INV_TRANS_REF, "Invalid Transaction Reference" },
{ GSM411_RP_CAUSE_SEMANT_INC_MSG, "Semantically Incorrect Message" },
{ GSM411_RP_CAUSE_INV_MAND_INF, "Invalid Mandatory Information" },
{ GSM411_RP_CAUSE_MSGTYPE_NOTEXIST, "Message Type non-existent" },
{ GSM411_RP_CAUSE_MSG_INCOMP_STATE, "Message incompatible with protocol state" },
{ GSM411_RP_CAUSE_IE_NOTEXIST, "Information Element not existing" },
{ GSM411_RP_CAUSE_PROTOCOL_ERR, "Protocol Error" },
{ 0, NULL }
}
GSM411_RP_CAUSE_MO_REQ_FAC_NOTIMPL
@ GSM411_RP_CAUSE_MO_REQ_FAC_NOTIMPL
Definition: gsm_04_11.h:91
GSM411_RP_CAUSE_MSGTYPE_NOTEXIST
@ GSM411_RP_CAUSE_MSGTYPE_NOTEXIST
Definition: gsm_04_11.h:99
GSM411_RP_CAUSE_MO_OP_DET_BARR
@ GSM411_RP_CAUSE_MO_OP_DET_BARR
Definition: gsm_04_11.h:79
GSM411_RP_CAUSE_MO_INTERWORKING
@ GSM411_RP_CAUSE_MO_INTERWORKING
Definition: gsm_04_11.h:92
GSM411_RP_CAUSE_MO_FACILITY_REJ
@ GSM411_RP_CAUSE_MO_FACILITY_REJ
Definition: gsm_04_11.h:84
GSM411_RP_CAUSE_INV_MAND_INF
@ GSM411_RP_CAUSE_INV_MAND_INF
Definition: gsm_04_11.h:98
GSM411_RP_CAUSE_MO_UNKNOWN_SUBSCR
@ GSM411_RP_CAUSE_MO_UNKNOWN_SUBSCR
Definition: gsm_04_11.h:85
GSM411_RP_CAUSE_MO_CALL_BARRED
@ GSM411_RP_CAUSE_MO_CALL_BARRED
Definition: gsm_04_11.h:80
GSM411_RP_CAUSE_MO_TEMP_FAIL
@ GSM411_RP_CAUSE_MO_TEMP_FAIL
Definition: gsm_04_11.h:87
GSM411_RP_CAUSE_MT_MEM_EXCEEDED
@ GSM411_RP_CAUSE_MT_MEM_EXCEEDED
Definition: gsm_04_11.h:94
GSM411_RP_CAUSE_INV_TRANS_REF
@ GSM411_RP_CAUSE_INV_TRANS_REF
Definition: gsm_04_11.h:96
GSM411_RP_CAUSE_MO_RES_UNAVAIL
@ GSM411_RP_CAUSE_MO_RES_UNAVAIL
Definition: gsm_04_11.h:89
GSM411_RP_CAUSE_SEMANT_INC_MSG
@ GSM411_RP_CAUSE_SEMANT_INC_MSG
Definition: gsm_04_11.h:97
GSM411_RP_CAUSE_MO_SMS_REJECTED
@ GSM411_RP_CAUSE_MO_SMS_REJECTED
Definition: gsm_04_11.h:81
GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER
@ GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER
Definition: gsm_04_11.h:86
GSM411_RP_CAUSE_MO_NUM_UNASSIGNED
@ GSM411_RP_CAUSE_MO_NUM_UNASSIGNED
Definition: gsm_04_11.h:78
GSM411_RP_CAUSE_IE_NOTEXIST
@ GSM411_RP_CAUSE_IE_NOTEXIST
Definition: gsm_04_11.h:101
GSM411_RP_CAUSE_MO_CONGESTION
@ GSM411_RP_CAUSE_MO_CONGESTION
Definition: gsm_04_11.h:88
GSM411_RP_CAUSE_MO_DEST_OUT_OF_ORDER
@ GSM411_RP_CAUSE_MO_DEST_OUT_OF_ORDER
Definition: gsm_04_11.h:82
GSM411_RP_CAUSE_MO_UNIDENTIFIED_SUBSCR
@ GSM411_RP_CAUSE_MO_UNIDENTIFIED_SUBSCR
Definition: gsm_04_11.h:83
GSM411_RP_CAUSE_MSG_INCOMP_STATE
@ GSM411_RP_CAUSE_MSG_INCOMP_STATE
Definition: gsm_04_11.h:100
GSM411_RP_CAUSE_MO_REQ_FAC_NOTSUBSCR
@ GSM411_RP_CAUSE_MO_REQ_FAC_NOTSUBSCR
Definition: gsm_04_11.h:90
GSM411_RP_CAUSE_PROTOCOL_ERR
@ GSM411_RP_CAUSE_PROTOCOL_ERR
Definition: gsm_04_11.h:102

Referenced by gsm411_send_rp_error().

## ◆ gsm411_rp_state_names [1/2]

const struct value_string gsm411_rp_state_names[]
| extern

Referenced by gsm411_rp_state_name().

## ◆ gsm411_rp_state_names [2/2]

const struct value_string gsm411_rp_state_names[]

Initial value:
= {
{ GSM411_RPS_IDLE, "IDLE" },
{ GSM411_RPS_WAIT_FOR_RP_ACK, "WAIT_FOR_RP_ACK" },
{ GSM411_RPS_WAIT_TO_TX_RP_ACK, "WAIT_TO_TX_RP_ACK" },
{ GSM411_RPS_WAIT_FOR_RETRANS_T,"WAIT_FOR_RETRANS_T" },
{ 0, NULL }
}
GSM411_RPS_WAIT_TO_TX_RP_ACK
@ GSM411_RPS_WAIT_TO_TX_RP_ACK
Definition: gsm_04_11.h:21
GSM411_RPS_WAIT_FOR_RETRANS_T
@ GSM411_RPS_WAIT_FOR_RETRANS_T
Definition: gsm_04_11.h:22
GSM411_RPS_IDLE
@ GSM411_RPS_IDLE
Definition: gsm_04_11.h:19
GSM411_RPS_WAIT_FOR_RP_ACK
@ GSM411_RPS_WAIT_FOR_RP_ACK
Definition: gsm_04_11.h:20

Referenced by gsm411_rp_state_name().

## ◆ smc_state_names

const char* smc_state_names[]

Initial value:
= {
"IDLE",
"MM_CONN_PENDING",
"WAIT_CP_ACK",
"MM_ESTABLISHED",
}

Referenced by gsm411_mnsms_rel_req(), gsm411_smc_recv(), gsm411_smc_send(), and new_cp_state().

## ◆ smcdatastatelist

const struct smcdatastate smcdatastatelist[]
| static

Referenced by gsm411_smc_recv().

## ◆ smcdownstatelist

const struct smcdownstate smcdownstatelist[]
| static

Initial value:
= {
{SBIT(GSM411_CPS_IDLE),
GSM411_MNSMS_EST_REQ,
"MNSMS-EST-REQ", gsm411_mnsms_est_req},
{ALL_STATES,
GSM411_MNSMS_REL_REQ,
"MNSMS-REL-REQ", gsm411_mnsms_rel_req},
{SBIT(GSM411_CPS_MM_ESTABLISHED),
GSM411_MNSMS_DATA_REQ,
"MNSMS-DATA-REQ", gsm411_mnsms_data_req},
{ALL_STATES - SBIT(GSM411_CPS_IDLE),
GSM411_MNSMS_ABORT_REQ,
"MNSMS-ABORT-REQ", gsm411_mnsms_abort_req},
}
gsm411_mnsms_data_req
static int gsm411_mnsms_data_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:310
GSM411_MNSMS_EST_REQ
#define GSM411_MNSMS_EST_REQ
Definition: gsm0411_smc.h:24
GSM411_MNSMS_DATA_REQ
#define GSM411_MNSMS_DATA_REQ
Definition: gsm0411_smc.h:22
GSM411_MNSMS_ABORT_REQ
#define GSM411_MNSMS_ABORT_REQ
Definition: gsm0411_smc.h:21
gsm411_mnsms_est_req
static int gsm411_mnsms_est_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:163
gsm411_mnsms_rel_req
static int gsm411_mnsms_rel_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:326
gsm411_mnsms_abort_req
static int gsm411_mnsms_abort_req(struct gsm411_smc_inst *inst, struct msgb *msg)
Definition: gsm0411_smc.c:401
GSM411_MNSMS_REL_REQ
#define GSM411_MNSMS_REL_REQ
Definition: gsm0411_smc.h:27
SBIT
#define SBIT(a)
Definition: gsm_04_08.h:2124
ALL_STATES
#define ALL_STATES
Definition: gsm_04_08.h:2125

Referenced by gsm411_smc_send().

## ◆ smr_state_names

const char* smr_state_names[]
| static

Initial value:
= {
"IDLE",
"WAIT_FOR_RP_ACK",
"illegal state 2",
"WAIT_TO_TX_RP_ACK",
"WAIT_FOR_RETRANS_T",
}

Referenced by gsm411_smr_recv(), gsm411_smr_send(), and new_rp_state().

## ◆ smrdatastatelist

const struct smrdatastate smrdatastatelist[]
| static

Initial value:
= {
{SBIT(GSM411_RPS_IDLE),
GSM411_MNSMS_EST_IND,
"MNSMS-EST-IND", gsm411_mnsms_est_ind},
{SBIT(GSM411_RPS_WAIT_FOR_RP_ACK),
GSM411_MNSMS_DATA_IND,
"MNSMS-DATA-IND", gsm411_mnsms_data_ind_tx},
{SBIT(GSM411_RPS_WAIT_FOR_RP_ACK),
GSM411_MNSMS_ERROR_IND,
"MNSMS-ERROR-IND", gsm411_mnsms_error_ind_tx},
{SBIT(GSM411_RPS_WAIT_TO_TX_RP_ACK),
GSM411_MNSMS_ERROR_IND,
"MNSMS-ERROR-IND", gsm411_mnsms_error_ind_rx},
}
gsm411_mnsms_data_ind_tx
static int gsm411_mnsms_data_ind_tx(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:292
gsm411_mnsms_est_ind
static int gsm411_mnsms_est_ind(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:241
GSM411_MNSMS_DATA_IND
#define GSM411_MNSMS_DATA_IND
Definition: gsm0411_smc.h:23
GSM411_MNSMS_EST_IND
#define GSM411_MNSMS_EST_IND
Definition: gsm0411_smc.h:25
gsm411_mnsms_error_ind_rx
static int gsm411_mnsms_error_ind_rx(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:353
gsm411_mnsms_error_ind_tx
static int gsm411_mnsms_error_ind_tx(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:342
GSM411_MNSMS_ERROR_IND
#define GSM411_MNSMS_ERROR_IND
Definition: gsm0411_smc.h:26

Referenced by gsm411_smr_recv().

## ◆ smrdownstatelist

const struct smrdownstate smrdownstatelist[]
| static

Initial value:
= {
{SBIT(GSM411_RPS_IDLE),
GSM411_SM_RL_DATA_REQ,
"SM-RL-DATA_REQ", gsm411_rl_data_req},
{SBIT(GSM411_RPS_WAIT_TO_TX_RP_ACK),
GSM411_SM_RL_REPORT_REQ,
"SM-RL-REPORT_REQ", gsm411_rl_report_req},
}
gsm411_rl_report_req
static int gsm411_rl_report_req(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:230
GSM411_SM_RL_REPORT_REQ
#define GSM411_SM_RL_REPORT_REQ
Definition: gsm0411_smr.h:13
GSM411_SM_RL_DATA_REQ
#define GSM411_SM_RL_DATA_REQ
Definition: gsm0411_smr.h:9
gsm411_rl_data_req
static int gsm411_rl_data_req(struct gsm411_smr_inst *inst, struct msgb *msg)
Definition: gsm0411_smr.c:219

Referenced by gsm411_smr_send().