libosmogsm 1.9.0.196-9975
Osmocom GSM library
gsm29118.c File Reference

Functions

struct msgbgsm29118_msgb_alloc (void)
 
static int msgb_sgsap_name_put (struct msgb *msg, enum sgsap_iei iei, const char *name)
 
static void msgb_sgsap_imsi_put (struct msgb *msg, const char *imsi)
 
static void msgb_sgsap_lai_put (struct msgb *msg, const struct osmo_location_area_id *lai)
 
static struct msgbcreate_simple_msg (enum sgsap_msg_type msg_type, const char *imsi)
 
struct msgbgsm29118_create_alert_req (const char *imsi)
 
struct msgbgsm29118_create_dl_ud (const char *imsi, struct msgb *nas_msg)
 
struct msgbgsm29118_create_eps_det_ack (const char *imsi)
 
struct msgbgsm29118_create_imsi_det_ack (const char *imsi)
 
struct msgbgsm29118_create_lu_ack (const char *imsi, const struct osmo_location_area_id *lai, const uint8_t *new_id, unsigned int new_id_len)
 8.9 SGsAP-LOCATION-UPDATE-ACCEPT. More...
 
struct msgbgsm29118_create_lu_rej (const char *imsi, uint8_t rej_cause, const struct osmo_location_area_id *lai)
 
struct msgbgsm29118_create_mm_info_req (const char *imsi, const uint8_t *mm_info, uint8_t mm_info_len)
 
struct msgbgsm29118_create_paging_req (struct gsm29118_paging_req *params)
 
struct msgbgsm29118_create_reset_ack (struct gsm29118_reset_msg *params)
 
struct msgbgsm29118_create_reset_ind (struct gsm29118_reset_msg *params)
 
struct msgbgsm29118_create_status (const char *imsi, enum sgsap_sgs_cause cause, const struct msgb *err_msg)
 
struct msgbgsm29118_create_release_req (const char *imsi, const uint8_t sgs_cause)
 
struct msgbgsm29118_create_service_abort_req (const char *imsi)
 

Variables

const struct value_string sgsap_msg_type_names []
 
const struct value_string sgsap_iei_names []
 
const struct value_string sgsap_eps_lu_type_names []
 
const struct value_string sgsap_ismi_det_eps_type_names []
 
const struct value_string sgsap_ismi_det_noneps_type_names []
 
const struct value_string sgsap_service_ind_names []
 
const struct value_string sgsap_sgs_cause_names []
 
const struct value_string sgsap_ue_emm_mode_names []
 
const struct tlv_definition sgsap_ie_tlvdef
 

Function Documentation

◆ create_simple_msg()

static struct msgb * create_simple_msg ( enum sgsap_msg_type  msg_type,
const char *  imsi 
)
static

◆ gsm29118_create_alert_req()

struct msgb * gsm29118_create_alert_req ( const char *  imsi)

◆ gsm29118_create_dl_ud()

struct msgb * gsm29118_create_dl_ud ( const char *  imsi,
struct msgb nas_msg 
)

◆ gsm29118_create_eps_det_ack()

struct msgb * gsm29118_create_eps_det_ack ( const char *  imsi)

◆ gsm29118_create_imsi_det_ack()

struct msgb * gsm29118_create_imsi_det_ack ( const char *  imsi)

◆ gsm29118_create_lu_ack()

struct msgb * gsm29118_create_lu_ack ( const char *  imsi,
const struct osmo_location_area_id lai,
const uint8_t *  new_id,
unsigned int  new_id_len 
)

8.9 SGsAP-LOCATION-UPDATE-ACCEPT.

Parameters
[in]imsiIMSI of the subscriber.
[in]laiLocation Area Identity (optional, may be NULL).
[in]new_idvalue part of new Mobile Identity (optional, may be NULL).
[in]new_id_lenlength of new_id in octets.
Returns
callee-allocated msgb with the encoded message

References gsm29118_msgb_alloc(), lai, msg, msgb_push_u8(), msgb_sgsap_imsi_put(), msgb_sgsap_lai_put(), msgb_tlv_put(), SGSAP_IE_MOBILE_ID, and SGSAP_MSGT_LOC_UPD_ACK.

◆ gsm29118_create_lu_rej()

struct msgb * gsm29118_create_lu_rej ( const char *  imsi,
uint8_t  rej_cause,
const struct osmo_location_area_id lai 
)

◆ gsm29118_create_mm_info_req()

struct msgb * gsm29118_create_mm_info_req ( const char *  imsi,
const uint8_t *  mm_info,
uint8_t  mm_info_len 
)

◆ gsm29118_create_paging_req()

◆ gsm29118_create_release_req()

struct msgb * gsm29118_create_release_req ( const char *  imsi,
const uint8_t  sgs_cause 
)

◆ gsm29118_create_reset_ack()

◆ gsm29118_create_reset_ind()

◆ gsm29118_create_service_abort_req()

struct msgb * gsm29118_create_service_abort_req ( const char *  imsi)

◆ gsm29118_create_status()

struct msgb * gsm29118_create_status ( const char *  imsi,
enum sgsap_sgs_cause  cause,
const struct msgb err_msg 
)

◆ gsm29118_msgb_alloc()

◆ msgb_sgsap_imsi_put()

◆ msgb_sgsap_lai_put()

static void msgb_sgsap_lai_put ( struct msgb msg,
const struct osmo_location_area_id lai 
)
static

◆ msgb_sgsap_name_put()

static int msgb_sgsap_name_put ( struct msgb msg,
enum sgsap_iei  iei,
const char *  name 
)
static

Variable Documentation

◆ sgsap_eps_lu_type_names

const struct value_string sgsap_eps_lu_type_names[]
Initial value:
= {
{ SGSAP_EPS_LUT_IMSI_ATTACH, "IMSI Attach" },
{ SGSAP_EPS_LUT_NORMAL, "Normal" },
{ 0, NULL }
}
@ SGSAP_EPS_LUT_NORMAL
Definition: gsm_29_118.h:86
@ SGSAP_EPS_LUT_IMSI_ATTACH
Definition: gsm_29_118.h:85

Referenced by sgsap_eps_lu_type_name().

◆ sgsap_ie_tlvdef

const struct tlv_definition sgsap_ie_tlvdef

◆ sgsap_iei_names

const struct value_string sgsap_iei_names[]

Referenced by sgsap_iei_name().

◆ sgsap_ismi_det_eps_type_names

const struct value_string sgsap_ismi_det_eps_type_names[]
Initial value:
= {
{ SGSAP_ID_EPS_T_NETWORK_INITIATED, "Network initiated IMSI detach from EPS" },
{ SGSAP_ID_EPS_T_UE_INITIATED, "UE initiated IMSI detach from EPS" },
{ SGSAP_ID_EPS_T_EPS_NOT_ALLOWED, "EPS not allowed" },
{ 0, NULL }
}
@ SGSAP_ID_EPS_T_UE_INITIATED
Definition: gsm_29_118.h:96
@ SGSAP_ID_EPS_T_NETWORK_INITIATED
Definition: gsm_29_118.h:95
@ SGSAP_ID_EPS_T_EPS_NOT_ALLOWED
Definition: gsm_29_118.h:97

Referenced by sgsap_imsi_det_eps_type_name().

◆ sgsap_ismi_det_noneps_type_names

const struct value_string sgsap_ismi_det_noneps_type_names[]
Initial value:
= {
"Explicit UE initiated IMSI detach from non-EPS" },
"Combined UE initiated IMSI detach from EPS and non-EPS" },
"Implicit network initiated IMSI detach from EPS and non-EPS" },
{ 0, NULL }
}
@ SGSAP_ID_NONEPS_T_EXPLICIT_UE_NONEPS
Definition: gsm_29_118.h:106
@ SGSAP_ID_NONEPS_T_COMBINED_UE_EPS_NONEPS
Definition: gsm_29_118.h:107
@ SGSAP_ID_NONEPS_T_IMPLICIT_UE_EPS_NONEPS
Definition: gsm_29_118.h:108

Referenced by sgsap_imsi_det_noneps_type_name().

◆ sgsap_msg_type_names

const struct value_string sgsap_msg_type_names[]
Initial value:
= {
{ SGSAP_MSGT_PAGING_REQ, "PAGING-REQUEST" },
{ SGSAP_MSGT_PAGING_REJ, "PAGING-REJECT" },
{ SGSAP_MSGT_SERVICE_REQ, "SERVICE-REQUEST" },
{ SGSAP_MSGT_DL_UD, "DOWNLINK-UNITDATA" },
{ SGSAP_MSGT_UL_UD, "UPLINK-UNITDATA" },
{ SGSAP_MSGT_LOC_UPD_REQ, "LOCATION-UPDATE-REQUEST" },
{ SGSAP_MSGT_LOC_UPD_ACK, "LOCATION-UPDATE-ACCEPT" },
{ SGSAP_MSGT_LOC_UPD_REJ, "LOCATION-UPDATE-REJECT" },
{ SGSAP_MSGT_TMSI_REALL_CMPL, "TMSI-REALLOCATION-COMPLETE" },
{ SGSAP_MSGT_ALERT_REQ, "ALERT-REQQUEST" },
{ SGSAP_MSGT_ALERT_ACK, "ALERT-ACK" },
{ SGSAP_MSGT_ALERT_REJ, "ALERT-REJECT" },
{ SGSAP_MSGT_UE_ACT_IND, "UE-ACTIVITY-INDICATION" },
{ SGSAP_MSGT_EPS_DET_IND, "EPS-DETACH-INDICATION" },
{ SGSAP_MSGT_EPS_DET_ACK, "EPS-DETACH-ACK" },
{ SGSAP_MSGT_IMSI_DET_IND, "IMSI-DETACH-INDICATION" },
{ SGSAP_MSGT_IMSI_DET_ACK, "IMSI-DETACH-ACK" },
{ SGSAP_MSGT_RESET_IND, "RESET-INDICATION" },
{ SGSAP_MSGT_RESET_ACK, "RESET-ACK" },
{ SGSAP_MSGT_SERVICE_ABORT_REQ, "SERVICE-ABORT-REQUEST" },
{ SGSAP_MSGT_MO_CSFB_IND, "MO-CSFB-INDICATION" },
{ SGSAP_MSGT_MM_INFO_REQ, "MM-INFO-REQUEST" },
{ SGSAP_MSGT_RELEASE_REQ, "RELEASE-REQUEST" },
{ SGSAP_MSGT_STATUS, "STATUS" },
{ SGSAP_MSGT_UE_UNREACHABLE, "UE-UNREACHABLE" },
{ 0, NULL }
}
@ SGSAP_MSGT_LOC_UPD_REQ
Definition: gsm_29_118.h:14
@ SGSAP_MSGT_IMSI_DET_IND
Definition: gsm_29_118.h:24
@ SGSAP_MSGT_ALERT_REQ
Definition: gsm_29_118.h:18
@ SGSAP_MSGT_RESET_IND
Definition: gsm_29_118.h:26
@ SGSAP_MSGT_IMSI_DET_ACK
Definition: gsm_29_118.h:25
@ SGSAP_MSGT_ALERT_ACK
Definition: gsm_29_118.h:19
@ SGSAP_MSGT_RESET_ACK
Definition: gsm_29_118.h:27
@ SGSAP_MSGT_ALERT_REJ
Definition: gsm_29_118.h:20
@ SGSAP_MSGT_SERVICE_ABORT_REQ
Definition: gsm_29_118.h:28
@ SGSAP_MSGT_STATUS
Definition: gsm_29_118.h:34
@ SGSAP_MSGT_EPS_DET_ACK
Definition: gsm_29_118.h:23
@ SGSAP_MSGT_UE_UNREACHABLE
Definition: gsm_29_118.h:36
@ SGSAP_MSGT_LOC_UPD_REJ
Definition: gsm_29_118.h:16
@ SGSAP_MSGT_DL_UD
Definition: gsm_29_118.h:12
@ SGSAP_MSGT_SERVICE_REQ
Definition: gsm_29_118.h:11
@ SGSAP_MSGT_TMSI_REALL_CMPL
Definition: gsm_29_118.h:17
@ SGSAP_MSGT_RELEASE_REQ
Definition: gsm_29_118.h:32
@ SGSAP_MSGT_PAGING_REQ
Definition: gsm_29_118.h:8
@ SGSAP_MSGT_LOC_UPD_ACK
Definition: gsm_29_118.h:15
@ SGSAP_MSGT_PAGING_REJ
Definition: gsm_29_118.h:9
@ SGSAP_MSGT_UL_UD
Definition: gsm_29_118.h:13
@ SGSAP_MSGT_UE_ACT_IND
Definition: gsm_29_118.h:21
@ SGSAP_MSGT_MM_INFO_REQ
Definition: gsm_29_118.h:31
@ SGSAP_MSGT_EPS_DET_IND
Definition: gsm_29_118.h:22
@ SGSAP_MSGT_MO_CSFB_IND
Definition: gsm_29_118.h:29

Referenced by sgsap_msg_type_name().

◆ sgsap_service_ind_names

const struct value_string sgsap_service_ind_names[]
Initial value:
= {
{ SGSAP_SERV_IND_CS_CALL, "CS Call" },
{ SGSAP_SERV_IND_SMS, "SMS" },
{ 0, NULL }
}
@ SGSAP_SERV_IND_SMS
Definition: gsm_29_118.h:118
@ SGSAP_SERV_IND_CS_CALL
Definition: gsm_29_118.h:117

Referenced by sgsap_service_ind_name().

◆ sgsap_sgs_cause_names

const struct value_string sgsap_sgs_cause_names[]
Initial value:
= {
{ SGSAP_SGS_CAUSE_IMSI_DET_EPS, "IMSI detached for EPS" },
{ SGSAP_SGS_CAUSE_IMSI_DET_EPS_NONEPS, "IMSI detached for EPS and non-EPS" },
{ SGSAP_SGS_CAUSE_IMSI_UNKNOWN, "IMSI unknown" },
{ SGSAP_SGS_CAUSE_IMSI_DET_NON_EPS, "IMSI detached for non-EPS" },
{ SGSAP_SGS_CAUSE_IMSI_IMPL_DET_NON_EPS,"IMSI implicitly detached for non-EPS" },
{ SGSAP_SGS_CAUSE_UE_UNREACHABLE, "UE unreachable" },
{ SGSAP_SGS_CAUSE_MSG_INCOMP_STATE, "Message not compatible with protocol state" },
{ SGSAP_SGS_CAUSE_MISSING_MAND_IE, "Missing mandatory IE" },
{ SGSAP_SGS_CAUSE_INVALID_MAND_IE, "Invalid mandatory IE" },
{ SGSAP_SGS_CAUSE_COND_IE_ERROR, "Conditional IE error" },
{ SGSAP_SGS_CAUSE_SEMANT_INCORR_MSG, "Semantically incorrect message" },
{ SGSAP_SGS_CAUSE_MSG_UNKNOWN, "Message unknown" },
{ SGSAP_SGS_CAUSE_MT_CSFB_REJ_USER, "MT CSFB call rejected by user" },
{ SGSAP_SGS_CAUSE_UE_TEMP_UNREACHABLE, "UE temporarily unreachable" },
{ 0, NULL }
}
@ SGSAP_SGS_CAUSE_SEMANT_INCORR_MSG
Definition: gsm_29_118.h:137
@ SGSAP_SGS_CAUSE_MT_CSFB_REJ_USER
Definition: gsm_29_118.h:139
@ SGSAP_SGS_CAUSE_MISSING_MAND_IE
Definition: gsm_29_118.h:134
@ SGSAP_SGS_CAUSE_IMSI_IMPL_DET_NON_EPS
Definition: gsm_29_118.h:131
@ SGSAP_SGS_CAUSE_INVALID_MAND_IE
Definition: gsm_29_118.h:135
@ SGSAP_SGS_CAUSE_MSG_UNKNOWN
Definition: gsm_29_118.h:138
@ SGSAP_SGS_CAUSE_IMSI_DET_NON_EPS
Definition: gsm_29_118.h:130
@ SGSAP_SGS_CAUSE_IMSI_DET_EPS
Definition: gsm_29_118.h:127
@ SGSAP_SGS_CAUSE_IMSI_UNKNOWN
Definition: gsm_29_118.h:129
@ SGSAP_SGS_CAUSE_IMSI_DET_EPS_NONEPS
Definition: gsm_29_118.h:128
@ SGSAP_SGS_CAUSE_MSG_INCOMP_STATE
Definition: gsm_29_118.h:133
@ SGSAP_SGS_CAUSE_UE_UNREACHABLE
Definition: gsm_29_118.h:132
@ SGSAP_SGS_CAUSE_COND_IE_ERROR
Definition: gsm_29_118.h:136
@ SGSAP_SGS_CAUSE_UE_TEMP_UNREACHABLE
Definition: gsm_29_118.h:140

Referenced by sgsap_sgs_cause_name().

◆ sgsap_ue_emm_mode_names

const struct value_string sgsap_ue_emm_mode_names[]
Initial value:
= {
{ SGSAP_UE_EMM_MODE_IDLE, "EMM-IDLE" },
{ SGSAP_UE_EMM_MODE_CONNECTED, "EMM-CONNECTED" },
{ 0, NULL }
}
@ SGSAP_UE_EMM_MODE_CONNECTED
Definition: gsm_29_118.h:150
@ SGSAP_UE_EMM_MODE_IDLE
Definition: gsm_29_118.h:149

Referenced by sgsap_ue_emm_mode_name().