diff options
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_08_08.h | 4 | ||||
-rw-r--r-- | src/gsm/gsm0808.c | 165 |
2 files changed, 151 insertions, 18 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index 6ddab5dc..6fb4e9e8 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -143,7 +143,6 @@ enum BSS_MAP_MSG_TYPE { BSS_MAP_MSG_UPLINK_RELEASE_CMD = 76, BSS_MAP_MSG_UPLINK_SEIZED_CMD = 77, BSS_MAP_MSG_VGCS_ADDL_INFO = 0x60, - BSS_MAP_MSG_NOTIFICATION_DATA = 0x62, BSS_MAP_MSG_UPLINK_APP_DATA = 0x63, @@ -250,6 +249,7 @@ enum GSM0808_IE_CODING { GSM0808_IE_EMERGENCY_SET_INDICATION = 0x6b, GSM0808_IE_TALKER_IDENTITY = 0x6c, GSM0808_IE_CELL_ID_LIST_SEGMENT = 0x6d, + GSM0808_IE_SMS_TO_VGCS = 0x6e, GSM0808_IE_VGCS_TALKER_MODE = 0x6f, GSM0808_IE_VGCS_VBS_CELL_STATUS = 0x70, GSM0808_IE_CELL_ID_LIST_SEG_EST_CELLS = 0x71, @@ -278,7 +278,7 @@ enum GSM0808_IE_CODING { GSM0808_IE_GLOBAL_CALL_REF = 0x89, GSM0808_IE_LCLS_CONFIG = 0x8a, GSM0808_IE_LCLS_CONN_STATUS_CTRL = 0x8b, - GSM0808_IE_LCLS_CORR_NOT_NEEDEDL = 0x8c, + GSM0808_IE_LCLS_CORR_NOT_NEEDED = 0x8c, GSM0808_IE_LCLS_BSS_STATUS = 0x8d, GSM0808_IE_LCLS_BREAK_REQ = 0x8e, GSM0808_IE_CSFB_INDICATION = 0x8f, diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 06ee18e2..d055da18 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -295,32 +295,136 @@ struct msgb *gsm0808_create_dtap(struct msgb *msg_l3, uint8_t link_id) return msg; } +/* As per 3GPP TS 48.008 version 11.7.0 Release 11 */ static const struct tlv_definition bss_att_tlvdef = { .def = { + [GSM0808_IE_CIRCUIT_IDENTITY_CODE] = { TLV_TYPE_FIXED, 2 }, + [GSM0808_IE_CONNECTION_RELEASE_RQSTED] = { TLV_TYPE_TV }, + [GSM0808_IE_RESOURCE_AVAILABLE] = { TLV_TYPE_FIXED, 21 }, + [GSM0808_IE_CAUSE] = { TLV_TYPE_TLV }, [GSM0808_IE_IMSI] = { TLV_TYPE_TLV }, [GSM0808_IE_TMSI] = { TLV_TYPE_TLV }, - [GSM0808_IE_CELL_IDENTIFIER_LIST] = { TLV_TYPE_TLV }, - [GSM0808_IE_CHANNEL_NEEDED] = { TLV_TYPE_TV }, - [GSM0808_IE_EMLPP_PRIORITY] = { TLV_TYPE_TV }, + [GSM0808_IE_NUMBER_OF_MSS] = { TLV_TYPE_TV }, + [GSM0808_IE_LAYER_3_HEADER_INFORMATION] = { TLV_TYPE_TLV }, + [GSM0808_IE_ENCRYPTION_INFORMATION] = { TLV_TYPE_TLV }, [GSM0808_IE_CHANNEL_TYPE] = { TLV_TYPE_TLV }, + [GSM0808_IE_PERIODICITY] = { TLV_TYPE_TV }, + [GSM0808_IE_EXTENDED_RESOURCE_INDICATOR]= { TLV_TYPE_TV }, + [GSM0808_IE_TOTAL_RESOURCE_ACCESSIBLE] = { TLV_TYPE_FIXED, 4 }, + [GSM0808_IE_LSA_IDENTIFIER] = { TLV_TYPE_TLV }, + [GSM0808_IE_LSA_IDENTIFIER_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_LSA_IDENTIFIER_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_CELL_IDENTIFIER] = { TLV_TYPE_TLV }, [GSM0808_IE_PRIORITY] = { TLV_TYPE_TLV }, - [GSM0808_IE_CIRCUIT_IDENTITY_CODE] = { TLV_TYPE_FIXED, 2 }, - [GSM0808_IE_DOWNLINK_DTX_FLAG] = { TLV_TYPE_TV }, - [GSM0808_IE_INTERFERENCE_BAND_TO_USE] = { TLV_TYPE_TV }, [GSM0808_IE_CLASSMARK_INFORMATION_T2] = { TLV_TYPE_TLV }, - [GSM0808_IE_GROUP_CALL_REFERENCE] = { TLV_TYPE_TLV }, + [GSM0808_IE_CLASSMARK_INFORMATION_T3] = { TLV_TYPE_TLV }, + [GSM0808_IE_INTERFERENCE_BAND_TO_USE] = { TLV_TYPE_TV }, + [GSM0808_IE_RR_CAUSE] = { TLV_TYPE_TV }, + [GSM0808_IE_LSA_INFORMATION] = { TLV_TYPE_TLV }, + [GSM0808_IE_LAYER_3_INFORMATION] = { TLV_TYPE_TLV }, + [GSM0808_IE_DLCI] = { TLV_TYPE_TV }, + [GSM0808_IE_DOWNLINK_DTX_FLAG] = { TLV_TYPE_TV }, + [GSM0808_IE_CELL_IDENTIFIER_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_CELL_ID_LIST_SEGMENT] = { TLV_TYPE_TLV }, + [GSM0808_IE_CELL_ID_LIST_SEG_EST_CELLS] = { TLV_TYPE_TLV }, + [GSM0808_IE_CELL_ID_LIST_SEG_CELLS_TBE] = { TLV_TYPE_TLV }, + [GSM0808_IE_CELL_ID_LIST_SEG_REL_CELLS] = { TLV_TYPE_TLV }, + [GSM0808_IE_CELL_ID_LIST_SEG_NE_CELLS] = { TLV_TYPE_TLV }, + [GSM0808_IE_RESPONSE_RQST] = { TLV_TYPE_T }, + [GSM0808_IE_RESOURCE_INDICATION_METHOD] = { TLV_TYPE_TV }, + [GSM0808_IE_CLASSMARK_INFORMATION_TYPE_1] = { TLV_TYPE_TV }, + [GSM0808_IE_CIRCUIT_IDENTITY_CODE_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_DIAGNOSTIC] = { TLV_TYPE_TLV }, + [GSM0808_IE_CHOSEN_CHANNEL] = { TLV_TYPE_TV }, + [GSM0808_IE_CIPHER_RESPONSE_MODE] = { TLV_TYPE_TV }, + [GSM0808_IE_LAYER_3_MESSAGE_CONTENTS] = { TLV_TYPE_TLV }, + [GSM0808_IE_CHANNEL_NEEDED] = { TLV_TYPE_TV }, + [GSM0808_IE_TRACE_TYPE] = { TLV_TYPE_TV }, + [GSM0808_IE_TRIGGERID] = { TLV_TYPE_TLV }, + [GSM0808_IE_TRACE_REFERENCE] = { TLV_TYPE_TV }, + [GSM0808_IE_TRANSACTIONID] = { TLV_TYPE_TLV }, + [GSM0808_IE_MOBILE_IDENTITY] = { TLV_TYPE_TLV }, + [GSM0808_IE_OMCID] = { TLV_TYPE_TLV }, + [GSM0808_IE_FORWARD_INDICATOR] = { TLV_TYPE_TV }, + [GSM0808_IE_CHOSEN_ENCR_ALG] = { TLV_TYPE_TV }, + [GSM0808_IE_CIRCUIT_POOL] = { TLV_TYPE_TV }, + [GSM0808_IE_CIRCUIT_POOL_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_TIME_INDICATION] = { TLV_TYPE_TV }, + [GSM0808_IE_RESOURCE_SITUATION] = { TLV_TYPE_TLV }, + [GSM0808_IE_CURRENT_CHANNEL_TYPE_1] = { TLV_TYPE_TV }, + [GSM0808_IE_QUEUEING_INDICATOR] = { TLV_TYPE_TV }, + [GSM0808_IE_SPEECH_VERSION] = { TLV_TYPE_TV }, + [GSM0808_IE_ASSIGNMENT_REQUIREMENT] = { TLV_TYPE_TV }, [GSM0808_IE_TALKER_FLAG] = { TLV_TYPE_T }, + [GSM0808_IE_GROUP_CALL_REFERENCE] = { TLV_TYPE_TLV }, + [GSM0808_IE_EMLPP_PRIORITY] = { TLV_TYPE_TV }, [GSM0808_IE_CONFIG_EVO_INDI] = { TLV_TYPE_TV }, + [GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION] = { TLV_TYPE_TLV }, + [GSM0808_IE_LCS_QOS] = { TLV_TYPE_TLV }, [GSM0808_IE_LSA_ACCESS_CTRL_SUPPR] = { TLV_TYPE_TV }, + [GSM0808_IE_LCS_PRIORITY] = { TLV_TYPE_TLV }, + [GSM0808_IE_LOCATION_TYPE] = { TLV_TYPE_TLV }, + [GSM0808_IE_LOCATION_ESTIMATE] = { TLV_TYPE_TLV }, + [GSM0808_IE_POSITIONING_DATA] = { TLV_TYPE_TLV }, + [GSM0808_IE_LCS_CAUSE] = { TLV_TYPE_TLV }, + [GSM0808_IE_APDU] = { TLV_TYPE_TLV }, + [GSM0808_IE_NETWORK_ELEMENT_IDENTITY] = { TLV_TYPE_TLV }, + [GSM0808_IE_GPS_ASSISTANCE_DATA] = { TLV_TYPE_TLV }, + [GSM0808_IE_DECIPHERING_KEYS] = { TLV_TYPE_TLV }, + [GSM0808_IE_RETURN_ERROR_RQST] = { TLV_TYPE_TLV }, + [GSM0808_IE_RETURN_ERROR_CAUSE] = { TLV_TYPE_TLV }, + [GSM0808_IE_SEGMENTATION] = { TLV_TYPE_TLV }, [GSM0808_IE_SERVICE_HANDOVER] = { TLV_TYPE_TLV }, - [GSM0808_IE_ENCRYPTION_INFORMATION] = { TLV_TYPE_TLV }, - [GSM0808_IE_CIPHER_RESPONSE_MODE] = { TLV_TYPE_TV }, - [GSM0808_IE_CELL_IDENTIFIER] = { TLV_TYPE_TLV }, - [GSM0808_IE_CHOSEN_CHANNEL] = { TLV_TYPE_TV }, - [GSM0808_IE_LAYER_3_INFORMATION] = { TLV_TYPE_TLV }, - [GSM0808_IE_LAYER_3_HEADER_INFORMATION] = { TLV_TYPE_TLV }, - [GSM0808_IE_SPEECH_VERSION] = { TLV_TYPE_TV }, - [GSM0808_IE_CHOSEN_ENCR_ALG] = { TLV_TYPE_TV }, + [GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_UMTS] = { TLV_TYPE_TLV }, + [GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_CDMA2000] = { TLV_TYPE_TLV }, + [GSM0808_IE_GERAN_CLASSMARK] = { TLV_TYPE_TLV }, + [GSM0808_IE_GERAN_BSC_CONTAINER] = { TLV_TYPE_TLV }, + [GSM0808_IE_NEW_BSS_TO_OLD_BSS_INFO] = { TLV_TYPE_TLV }, + [GSM0800_IE_INTER_SYSTEM_INFO] = { TLV_TYPE_TLV }, + [GSM0808_IE_SNA_ACCESS_INFO] = { TLV_TYPE_TLV }, + [GSM0808_IE_VSTK_RAND_INFO] = { TLV_TYPE_TLV }, + [GSM0808_IE_PAGING_INFO] = { TLV_TYPE_TV }, + [GSM0808_IE_IMEI] = { TLV_TYPE_TLV }, + [GSM0808_IE_VELOCITY_ESTIMATE] = { TLV_TYPE_TLV }, + [GSM0808_IE_VGCS_FEATURE_FLAGS] = { TLV_TYPE_TLV }, + [GSM0808_IE_TALKER_PRIORITY] = { TLV_TYPE_TV }, + [GSM0808_IE_EMERGENCY_SET_INDICATION] = { TLV_TYPE_T }, + [GSM0808_IE_TALKER_IDENTITY] = { TLV_TYPE_TLV }, + [GSM0808_IE_SMS_TO_VGCS] = { TLV_TYPE_TLV }, + [GSM0808_IE_VGCS_TALKER_MODE] = { TLV_TYPE_TLV }, + [GSM0808_IE_VGCS_VBS_CELL_STATUS] = { TLV_TYPE_TLV }, + [GSM0808_IE_GANSS_ASSISTANCE_DATA] = { TLV_TYPE_TLV }, + [GSM0808_IE_GANSS_POSITIONING_DATA] = { TLV_TYPE_TLV }, + [GSM0808_IE_GANSS_LOCATION_TYPE] = { TLV_TYPE_TLV }, + [GSM0808_IE_APP_DATA] = { TLV_TYPE_TLV }, + [GSM0808_IE_DATA_IDENTITY] = { TLV_TYPE_TLV }, + [GSM0808_IE_APP_DATA_INFO] = { TLV_TYPE_TLV }, + [GSM0808_IE_MSISDN] = { TLV_TYPE_TLV }, + [GSM0808_IE_AOIP_TRASP_ADDR] = { TLV_TYPE_TLV }, + [GSM0808_IE_SPEECH_CODEC_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_SPEECH_CODEC] = { TLV_TYPE_TLV }, + [GSM0808_IE_CALL_ID] = { TLV_TYPE_FIXED, 4 }, + [GSM0808_IE_CALL_ID_LIST] = { TLV_TYPE_TLV }, + [GSM0808_IE_A_IF_SEL_FOR_RESET] = { TLV_TYPE_TV }, + [GSM0808_IE_KC_128] = { TLV_TYPE_FIXED, 16 }, + [GSM0808_IE_CSG_IDENTIFIER] = { TLV_TYPE_TLV }, + [GSM0808_IE_REDIR_ATTEMPT_FLAG] = { TLV_TYPE_T }, + [GSM0808_IE_REROUTE_REJ_CAUSE] = { TLV_TYPE_TV }, + [GSM0808_IE_SEND_SEQ_NUM] = { TLV_TYPE_TV }, + [GSM0808_IE_REROUTE_COMPL_OUTCOME] = { TLV_TYPE_TV }, + [GSM0808_IE_GLOBAL_CALL_REF] = { TLV_TYPE_TLV }, + [GSM0808_IE_LCLS_CONFIG] = { TLV_TYPE_TV }, + [GSM0808_IE_LCLS_CONN_STATUS_CTRL] = { TLV_TYPE_TV }, + [GSM0808_IE_LCLS_CORR_NOT_NEEDED] = { TLV_TYPE_TV }, + [GSM0808_IE_LCLS_BSS_STATUS] = { TLV_TYPE_TV }, + [GSM0808_IE_LCLS_BREAK_REQ] = { TLV_TYPE_TV }, + [GSM0808_IE_CSFB_INDICATION] = { TLV_TYPE_T }, + [GSM0808_IE_CS_TO_PS_SRVCC] = { TLV_TYPE_T }, + [GSM0808_IE_SRC_ENB_TO_TGT_ENB_TRANSP] = { TLV_TYPE_TLV }, + [GSM0808_IE_CS_TO_PS_SRVCC_IND] = { TLV_TYPE_T }, + [GSM0808_IE_CN_TO_MS_TRANSP_INFO] = { TLV_TYPE_TLV }, + [GSM0808_IE_SELECTED_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, + [GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, }, }; @@ -333,6 +437,7 @@ static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_ASSIGMENT_RQST, "ASSIGNMENT REQ" }, { BSS_MAP_MSG_ASSIGMENT_COMPLETE, "ASSIGNMENT COMPL" }, { BSS_MAP_MSG_ASSIGMENT_FAILURE, "ASSIGNMENT FAIL" }, + { BSS_MAP_MSG_CHAN_MOD_RQST, "CHANNEL MODIFY REQUEST" }, { BSS_MAP_MSG_HANDOVER_RQST, "HANDOVER REQ" }, { BSS_MAP_MSG_HANDOVER_REQUIRED, "HANDOVER REQUIRED" }, @@ -346,6 +451,10 @@ static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_HANDOVER_CANDIDATE_RESPONSE, "HANDOVER CAND RESP" }, { BSS_MAP_MSG_HANDOVER_REQUIRED_REJECT, "HANDOVER REQ REJ" }, { BSS_MAP_MSG_HANDOVER_DETECT, "HANDOVER DETECT" }, + { BSS_MAP_MSG_INT_HANDOVER_REQUIRED, "INT HANDOVER REQ" }, + { BSS_MAP_MSG_INT_HANDOVER_REQUIRED_REJ,"INT HANDOVER REQ REJ" }, + { BSS_MAP_MSG_INT_HANDOVER_CMD, "INT HANDOVER CMD" }, + { BSS_MAP_MSG_INT_HANDOVER_ENQUIRY, "INT HANDOVER ENQ" }, { BSS_MAP_MSG_CLEAR_CMD, "CLEAR COMMAND" }, { BSS_MAP_MSG_CLEAR_COMPLETE, "CLEAR COMPLETE" }, @@ -361,6 +470,8 @@ static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_PERFORM_LOCATION_RESPONSE, "PERFORM LOC RESP" }, { BSS_MAP_MSG_PERFORM_LOCATION_ABORT, "PERFORM LOC ABORT" }, { BSS_MAP_MSG_COMMON_ID, "COMMON ID" }, + { BSS_MAP_MSG_REROUTE_CMD, "REROUTE COMMAND" }, + { BSS_MAP_MSG_REROUTE_COMPLETE, "REROUTE COMPLETE" }, { BSS_MAP_MSG_RESET, "RESET" }, { BSS_MAP_MSG_RESET_ACKNOWLEDGE, "RESET ACK" }, @@ -370,6 +481,8 @@ static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_MSC_INVOKE_TRACE, "MSC INVOKE TRACE" }, { BSS_MAP_MSG_BSS_INVOKE_TRACE, "BSS INVOKE TRACE" }, { BSS_MAP_MSG_CONNECTIONLESS_INFORMATION, "CONNLESS INFO" }, + { BSS_MAP_MSG_RESET_IP_RSRC, "RESET IP RESOURCE" }, + { BSS_MAP_MSG_RESET_IP_RSRC_ACK, "RESET IP RESOURCE ACK" }, { BSS_MAP_MSG_BLOCK, "BLOCK" }, { BSS_MAP_MSG_BLOCKING_ACKNOWLEDGE, "BLOCK ACK" }, @@ -395,7 +508,27 @@ static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_CIPHER_MODE_REJECT, "CIPHER MODE REJECT" }, { BSS_MAP_MSG_LOAD_INDICATION, "LOAD IND" }, - /* FIXME: VGCS/VBS */ + { BSS_MAP_MSG_VGCS_VBS_SETUP, "VGCS/VBS SETUP" }, + { BSS_MAP_MSG_VGCS_VBS_SETUP_ACK, "VGCS/VBS SETUP ACK" }, + { BSS_MAP_MSG_VGCS_VBS_SETUP_REFUSE, "VGCS/VBS SETUP REFUSE" }, + { BSS_MAP_MSG_VGCS_VBS_ASSIGNMENT_RQST, "VGCS/VBS ASSIGN REQ" }, + { BSS_MAP_MSG_VGCS_VBS_ASSIGNMENT_RESULT, "VGCS/VBS ASSIGN RES" }, + { BSS_MAP_MSG_VGCS_VBS_ASSIGNMENT_FAILURE, "VGCS/VBS ASSIGN FAIL" }, + { BSS_MAP_MSG_VGCS_VBS_QUEUING_INDICATION, "VGCS/VBS QUEUING IND" }, + { BSS_MAP_MSG_UPLINK_RQST, "UPLINK REQ" }, + { BSS_MAP_MSG_UPLINK_RQST_ACKNOWLEDGE, "UPLINK REQ ACK" }, + { BSS_MAP_MSG_UPLINK_RQST_CONFIRMATION, "UPLINK REQ CONF" }, + { BSS_MAP_MSG_UPLINK_RELEASE_INDICATION,"UPLINK REL IND" }, + { BSS_MAP_MSG_UPLINK_REJECT_CMD, "UPLINK REJ CMD" }, + { BSS_MAP_MSG_UPLINK_RELEASE_CMD, "UPLINK REL CMD" }, + { BSS_MAP_MSG_UPLINK_SEIZED_CMD, "UPLINK SEIZED CMD" }, + { BSS_MAP_MSG_VGCS_ADDL_INFO, "VGCS ADDL INFO" }, + { BSS_MAP_MSG_NOTIFICATION_DATA, "NOTIF DATA" }, + { BSS_MAP_MSG_UPLINK_APP_DATA, "UPLINK APP DATA" }, + + { BSS_MAP_MSG_LCLS_CONNECT_CTRL, "LCLS-CONNECT-CONTROL" }, + { BSS_MAP_MSG_LCLS_CONNECT_CTRL_ACK, "CLS-CONNECT-CONTROL-ACK" }, + { BSS_MAP_MSG_LCLS_NOTIFICATION, "LCLS-NOTIFICATION" }, { 0, NULL } }; |