diff --git a/lib/include/srslte/asn1/gtpc.h b/lib/include/srslte/asn1/gtpc.h index f41473bb0..362765935 100644 --- a/lib/include/srslte/asn1/gtpc.h +++ b/lib/include/srslte/asn1/gtpc.h @@ -25,206 +25,13 @@ #define GTPC_V2_H #include - +#include "srslte/asn1/gtpc_msg.h" namespace srslte{ /*GTP-C Version*/ const uint8_t GTPC_V2 = 2; -/**************************************************************** - * - * GTP-C Message Types - * Ref: TS 29.274 v10.14.0 Table 6.1-1 - * - ****************************************************************/ -const uint8_t GTPC_MSG_TYPE_RESERVED = 0; -const uint8_t GTPC_MSG_TYPE_ECHO_REQUEST = 1; -const uint8_t GTPC_MSG_TYPE_ECHO_RESPONSE = 2; -const uint8_t GTPC_MSG_TYPE_VERSION_SUPPORT = 3; -//4-24 Reserved for S101 -//25-31 Reserved for Sv interface -//SGSN/MME/ePDG to PGW (S4/S11, S5/S8, S2b) -const uint8_t GTPC_MSG_TYPE_CREATE_SESSION_REQUEST = 32; -const uint8_t GTPC_MSG_TYPE_CREATE_SESSION_RESPONSE = 33; -const uint8_t GTPC_MSG_TYPE_DELETE_SESSION_REQUEST = 36; -const uint8_t GTPC_MSG_TYPE_DELETE_SESSION_RESPONSE = 37; -//SGSN/MME to PGW (S4/S11, S5/S8) -const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_REQUEST = 34; -const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_RESPONSE = 35; -const uint8_t GTPC_MSG_TYPE_CHANGE_NOTIFICATION_REQUEST = 38; -const uint8_t GTPC_MSG_TYPE_CHANGE_NOTIFICATION_RESPONSE = 39; -//40 - 63 for future use -const uint8_t GTPC_MSG_TYPE_RESUME_NOTIFICATION = 164; -const uint8_t GTPC_MSG_TYPE_RESUME_ACKNOWLEDGE = 165; -//Messages without explicit response -const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_COMMAND = 64; //(MME/SGSN/ePDG to PGW – S11/S4, S5/S8, S2b) -const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_FAILURE_INDICATION = 65; //(PGW to MME/SGSN/ePDG – S5/S8, S11/S4, S2b) -const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_COMMAND = 66; //(MME/SGSN to PGW – S11/S4, S5/S8) -const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_FAILURE_INDICATION = 67; //(PGW to MME/SGSN – S5/S8, S11/S4)) -const uint8_t GTPC_MSG_TYPE_BEARER_RESOURCE_COMMAND = 68; //(MME/SGSN to PGW – S11/S4, S5/S8) -const uint8_t GTPC_MSG_TYPE_BEARER_RESOURCE_FAILURE_INDICATION = 69; //(PGW to MME/SGSN – S5/S8, S11/S4) -const uint8_t GTPC_MSG_TYPE_DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION = 70; //(SGSN/MME to SGW – S4/S11) -const uint8_t GTPC_MSG_TYPE_TRACE_SESSION_ACTIVATION = 71; //(MME/SGSN/ePDG to PGW – S11/S4, S5/S8, S2b) -const uint8_t GTPC_MSG_TYPE_TRACE_SESSION_DEACTIVATION = 72; //(MME/SGSN/ePDG to PGW – S11/S4, S5/S8, S2b) -const uint8_t GTPC_MSG_TYPE_STOP_PAGING_INDICATION = 73; //(SGW to MME/SGSN – S11/S4) -//74-94 For future use -//P-GW to SGSN/MME/ePDG -const uint8_t GTPC_MSG_TYPE_CREATE_BEARER_REQUEST = 95; -const uint8_t GTPC_MSG_TYPE_CREATE_BEARER_RESPONSE = 96; -const uint8_t GTPC_MSG_TYPE_UPDATE_BEARER_REQUEST = 97; -const uint8_t GTPC_MSG_TYPE_UPDATE_BEARER_RESPONSE = 98; -const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_REQUEST = 99; -const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_RESPONSE = 100; -//PGW to MME, MME to PGW, SGW to PGW, SGW to MME, PGW to ePDG, ePDG to PGW (S5/S8, S11, S2b) -const uint8_t GTPC_MSG_TYPE_DELETE_PDN_CONNECTION_SET_REQUEST = 101; -const uint8_t GTPC_MSG_TYPE_DELETE_PDN_CONNECTION_SET_RESPONSE = 102; -//103-127 For future use -//MME to MME, SGSN to MME, MME to SGSN, SGSN to SGSN (S3/S10/S16) -const uint8_t GTPC_MSG_TYPE_IDENTIFICATION_REQUEST = 128; -const uint8_t GTPC_MSG_TYPE_IDENTIFICATION_RESPONSE = 129; -const uint8_t GTPC_MSG_TYPE_CONTEXT_REQUEST = 130; -const uint8_t GTPC_MSG_TYPE_CONTEXT_RESPONSE = 131; -const uint8_t GTPC_MSG_TYPE_CONTEXT_ACKNOWLEDGE = 132; -const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_REQUEST = 133; -const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_RESPONSE = 134; -const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_COMPLETE_NOTIFICATION = 135; -const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_COMPLETE_ACKNOWLEDGE = 136; -const uint8_t GTPC_MSG_TYPE_FORWARD_ACCESS_CONTEXT_NOTIFICATION = 137; -const uint8_t GTPC_MSG_TYPE_FORWARD_ACCESS_CONTEXT_ACKNOWLEDGE = 138; -const uint8_t GTPC_MSG_TYPE_RELOCATION_CANCEL_REQUEST = 139; -const uint8_t GTPC_MSG_TYPE_RELOCATION_CANCEL_RESPONSE = 140; -const uint8_t GTPC_MSG_TYPE_CONFIGURATION_TRANSFER_TUNNEL = 141; -//142 - 148 For future use -const uint8_t GTPC_MSG_TYPE_RAN_INFORMATION_RELAY = 152; -//SGSN to MME, MME to SGSN (S3) -const uint8_t GTPC_MSG_TYPE_DETACH_NOTIFICATION = 149; -const uint8_t GTPC_MSG_TYPE_DETACH_ACKNOWLEDGE = 150; -const uint8_t GTPC_MSG_TYPE_CS_PAGING_INDICATION = 151; -const uint8_t GTPC_MSG_TYPE_ALERT_MME_NOTIFICATION = 153; -const uint8_t GTPC_MSG_TYPE_ALERT_MME_ACKNOWLEDGE = 154; -const uint8_t GTPC_MSG_TYPE_UE_ACTIVITY_NOTIFICATION = 155; -const uint8_t GTPC_MSG_TYPE_UE_ACTIVITY_ACKNOWLEDGE = 156; -//157 - 159 For future use -//GSN/MME to SGW, SGSN to MME (S4/S11/S3) SGSN to SGSN (S16), SGW to PGW (S5/S8) -const uint8_t GTPC_MSG_TYPE_SUSPEND_NOTIFICATION = 162; -const uint8_t GTPC_MSG_TYPE_SUSPEND_ACKNOWLEDGE = 163; -//SGSN/MME to SGW (S4/S11) const uint8_t GTPC_IE_TYPE_ -const uint8_t GTPC_MSG_TYPE_CREATE_FORWARDING_TUNNEL_REQUEST = 160; -const uint8_t GTPC_MSG_TYPE_CREATE_FORWARDING_TUNNEL_RESPONSE = 161; -const uint8_t GTPC_MSG_TYPE_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST = 166; -const uint8_t GTPC_MSG_TYPE_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE = 167; -const uint8_t GTPC_MSG_TYPE_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST = 168; -const uint8_t GTPC_MSG_TYPE_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE = 169; -const uint8_t GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_REQUEST = 170; -const uint8_t GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_RESPONSE = 171; -//172 - 175 For future use -//SGW to SGSN/MME (S4/S11) -const uint8_t GTPC_MSG_TYPE_DOWNLINK_DATA_NOTIFICATION = 176; -const uint8_t GTPC_MSG_TYPE_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE = 177; -const uint8_t GTPC_MSG_TYPE_PGW_RESTART_NOTIFICATION = 179; -const uint8_t GTPC_MSG_TYPE_PGW_RESTART_NOTIFICATION_ACKNOWLEDGE = 180; -//SGW to SGSN (S4) -//178 Reserved. Allocated in earlier version of the specification. -//181 -189 For future use -//SGW to PGW, PGW to SGW (S5/S8) -const uint8_t GTPC_MSG_TYPE_UPDATE_PDN_CONNECTION_SET_REQUEST = 200; -const uint8_t GTPC_MSG_TYPE_UPDATE_PDN_CONNECTION_SET_RESPONSE = 201; -//For future use -//MME to SGW (S11) -const uint8_t GTPC_MSG_TYPE_MODIFY_ACCESS_BEARERS_REQUEST = 211; -const uint8_t GTPC_MSG_TYPE_MODIFY_ACCESS_BEARERS_RESPONSE = 212; -//For future use -//MBMS GW to MME/SGSN (Sm/Sn) -const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_START_REQUEST = 231; -const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_START_RESPONSE = 232; -const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_UPDATE_REQUEST = 233; -const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_UPDATE_RESPONSE = 234; -const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_STOP_REQUEST = 235; -const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_STOP_RESPONSE = 236; -//For future use -//Other -//240 - 255 For future use - -/**************************************************************************** - * - * GTP-C v2 Create Session Request - * Ref: 3GPP TS 29.274 v10.14.0 Table 7.2.1-1 - * - ***************************************************************************/ - -typedef struct gtpc_create_session_request -{ - bool imsi_present; - uint64_t imsi; // C - bool msidn_present; - uint64_t msisdn; // C - bool mei_present; - uint64_t mei; // C/CO - /* - bool user_location_info_present; - struct user_location_info_ uli; // C/CO - bool serving_network_present; - struct serving_network_ serving_network; // C/CO - - enum rat_type_ rat_type; // M - bool indication_flags_present; - struct indication_flags_ indication_flags; // C - - struct fteid_ sender_f_teid; // M - bool pgw_addr_present; - struct fteid_ pgw_addr; // C - - uint64_t apn; // M - bool selection_mode_present; - enum selection_mode_ selection_mode; // C/CO - bool pdn_type_present; - enum pdn_type_ pdn_type; // C - bool pdn_addr_alloc_present; - struct pdn_addr_alloc_ pdn_addr_alloc; // C/CO - bool max_apn_restriction_present; - enum apn_restriction_ max_apn_restriction; // C - bool apn_ambr_present; - struct ambr_ apn_ambr; // C - bool linked_eps_bearer_id_present; - uint8_t linked_eps_bearer_id; // C - bool pco_present; - uint8_t pco; // C - - struct bearer_context_ bearer_context_created; // M - bool bearer_context_deleted_present; - struct bearer_context_ bearer_context_deleted; // C - bool trace_information_present; - struct trace_infromation_ trace_information; // C - bool recovery_present - uint8_t recovery; // C - bool mme_fq_csid_present; - struct fq_csid_ mme_fq_csid; // C - bool sgw_fq_csid_present; - struct fq_csid_ sgw_fq_csid; // C - bool epdg_fq_csid_present; - struct fq_csid_ epdg_fq_csid; // C - bool ue_time_zone_present; - struct ue_time_zone_ ue_time_zone; // CO - bool uci_present; - struct uci_ uci; // CO - bool charging_caracteristics_present; - enum charging_characteristics_ charging_caracteristics; // O - bool mme_ldn_present; - uint8_t mme_ldn[LDN_MAX_SIZE]; // O - bool sgw_ldn_present; - uint8_t sgw_ldn[LDN_MAX_SIZE]; // O - bool epgd_ldn_present; - uint8_t epdg_ldn[LDN_MAX_SIZE]; // O - bool signaling_priority_indication; - enum signalling_priority_indication_ spi; // CO - bool acpo_present; - uint8_t apco; // CO - bool ext; // O - */ -} gtpc_create_session_request_t; - - /**************************************************************************** * GTP-C v2 Header * Ref: 3GPP TS 29.274 v10.14.0 Section 5 diff --git a/lib/include/srslte/asn1/gtpc_ies.h b/lib/include/srslte/asn1/gtpc_ies.h index 784dd6ac7..e643b8f41 100644 --- a/lib/include/srslte/asn1/gtpc_ies.h +++ b/lib/include/srslte/asn1/gtpc_ies.h @@ -22,6 +22,13 @@ * */ +#ifndef GTPC_IES_H +#define GTPC_IES_H + + +#include "srslte/phy/io/netsource.h" +//#include +//#include /**************************************************************** * @@ -29,122 +36,293 @@ * Ref: TS 29.274 v10.14.0 Table 8.1-1 * ****************************************************************/ - -const uint8_t GTPC_IE_TYPE_RESERVED = 0; -const uint8_t GTPC_IE_TYPE_IMSI = 1; -const uint8_t GTPC_IE_TYPE_CAUSE = 2; -const uint8_t GTPC_IE_TYPE_RECOVERY = 3; +enum gtpc_ie_type +{ +//const uint8_t GTPC_IE_TYPE_RESERVED = 0; + GTPC_IE_TYPE_IMSI = 1, + GTPC_IE_TYPE_CAUSE = 2, + GTPC_IE_TYPE_RECOVERY = 3, //4 to 50 RESERVED_FOR_S101_INTERFACE -const uint8_t GTPC_IE_TYPE_STN_SR = 51 + GTPC_IE_TYPE_STN_SR = 51, //52 to 70 RESERVED_FOR_SV_INTERFACE -const uint8_t GTPC_IE_TYPE_APN = 71; -const uint8_t GTPC_IE_TYPE_AMBR = 72; -const uint8_t GTPC_IE_TYPE_EBI = 73; -const uint8_t GTPC_IE_TYPE_IP_ADDRESS = 74; -const uint8_t GTPC_IE_TYPE_MEI = 75; -const uint8_t GTPC_IE_TYPE_MSISDN = 76; -const uint8_t GTPC_IE_TYPE_INDICATION = 77; -const uint8_t GTPC_IE_TYPE_PCO = 78; -const uint8_t GTPC_IE_TYPE_PDN_ADDRESS_ALLOCATION = 79; -const uint8_t GTPC_IE_TYPE_BEARER_QOS = 80; -const uint8_t GTPC_IE_TYPE_FLOW_QOS = 81; -const uint8_t GTPC_IE_TYPE_RAT_TYPE = 82; -const uint8_t GTPC_IE_TYPE_SERVING_NETWORK = 83; -const uint8_t GTPC_IE_TYPE_BEARER_TFT = 84; -const uint8_t GTPC_IE_TYPE_TAD = 85; -const uint8_t GTPC_IE_TYPE_ULI = 86; -const uint8_t GTPC_IE_TYPE_F_TEID = 87; -const uint8_t GTPC_IE_TYPE_TMSI = 88; -const uint8_t GTPC_IE_TYPE_GLOBAL_CN_ID = 89; -const uint8_t GTPC_IE_TYPE_S103_PDN_DATA_FORWARDING_INFO = 90; -const uint8_t GTPC_IE_TYPE_S1_U_DATA_FORWARDING_INFO = 91; -const uint8_t GTPC_IE_TYPE_DELAY_VALUE = 92; -const uint8_t GTPC_IE_TYPE_BEARER_CONTEXT = 93; -const uint8_t GTPC_IE_TYPE_CHARGING_ID = 94; -const uint8_t GTPC_IE_TYPE_CHARGING_CHARACTERISTICS = 95; -const uint8_t GTPC_IE_TYPE_TRACE_INFORMATION = 96; -const uint8_t GTPC_IE_TYPE_BEARER_FLAGS = 97; -const uint8_t GTPC_IE_TYPE_RESERVED = 98; -const uint8_t GTPC_IE_TYPE_PDN_TYPE = 99; -const uint8_t GTPC_IE_TYPE_PROCEDURE_TRANSACTION_ID = 100; -const uint8_t GTPC_IE_TYPE_DRX_PARAMETER = 101; -const uint8_t GTPC_IE_TYPE_RESERVED = 102; -const uint8_t GTPC_IE_TYPE_MM_CONTEXT_GSM_KEY_AND_TRIPLETS = 103; -const uint8_t GTPC_IE_TYPE_MM_CONTEXT_UMTS_KEY_USED_CIPHER_AND_QUINTUPLETS = 104; -const uint8_t GTPC_IE_TYPE_MM_CONTEXT_GSM_KEY_USED_CIPHER_AND_QUINTUPLETS = 105; -const uint8_t GTPC_IE_TYPE_MM_CONTEXT_UMTS_KEY_AND_QUINTUPLETS = 106; -const uint8_t GTPC_IE_TYPE_MM_CONTEXT_EPS_SECURITY_CONTEXT_QUADRUPLETS_AND_QUINTUPLETS = 107; -const uint8_t GTPC_IE_TYPE_MM_CONTEXT_UMTS_KEY_QUADRUPLETS_AND_QUINTUPLETS = 108; -const uint8_t GTPC_IE_TYPE_PDN_CONNECTION = 109; -const uint8_t GTPC_IE_TYPE_PDU_NUMBERS = 110; -const uint8_t GTPC_IE_TYPE_P_TMSI = 111; -const uint8_t GTPC_IE_TYPE_P_TMSI_SIGNATURE = 112; -const uint8_t GTPC_IE_TYPE_HOP_COUNTER = 113; -const uint8_t GTPC_IE_TYPE_UE_TIME_ZONE = 114 -const uint8_t GTPC_IE_TYPE_TRACE_REFERENCE = 115; -const uint8_t GTPC_IE_TYPE_COMPLETE_REQUEST_MESSAGE = 116; -const uint8_t GTPC_IE_TYPE_GUTI = 117; -const uint8_t GTPC_IE_TYPE_F_CONTAINER = 118; -const uint8_t GTPC_IE_TYPE_F_CAUSE = 119; -const uint8_t GTPC_IE_TYPE_SELECTED_PLMN_ID = 120; -const uint8_t GTPC_IE_TYPE_TARGET_IDENTIFICATION = 121; -const uint8_t GTPC_IE_TYPE_RESERVED = 122; -const uint8_t GTPC_IE_TYPE_PACKET_FLOW_ID = 123; -const uint8_t GTPC_IE_TYPE_RAB_CONTEXT = 124; -const uint8_t GTPC_IE_TYPE_SOURCE_RNC_PDCP_CONTEXT_INFO = 125; -const uint8_t GTPC_IE_TYPE_UDP_SOURCE_PORT_NUMBER = 126; -const uint8_t GTPC_IE_TYPE_APN_RESTRICTION = 127; -const uint8_t GTPC_IE_TYPE_SELECTION_MODE = 128; -const uint8_t GTPC_IE_TYPE_SOURCE_IDENTIFICATION = 129; + GTPC_IE_TYPE_APN = 71, + GTPC_IE_TYPE_AMBR = 72, + GTPC_IE_TYPE_EBI = 73, + GTPC_IE_TYPE_IP_ADDRESS = 74, + GTPC_IE_TYPE_MEI = 75, + GTPC_IE_TYPE_MSISDN = 76, + GTPC_IE_TYPE_INDICATION = 77, + GTPC_IE_TYPE_PCO = 78, + GTPC_IE_TYPE_PDN_ADDRESS_ALLOCATION = 79, + GTPC_IE_TYPE_BEARER_QOS = 80, + GTPC_IE_TYPE_FLOW_QOS = 81, + GTPC_IE_TYPE_RAT_TYPE = 82, + GTPC_IE_TYPE_SERVING_NETWORK = 83, + GTPC_IE_TYPE_BEARER_TFT = 84, + GTPC_IE_TYPE_TAD = 85, + GTPC_IE_TYPE_ULI = 86, + GTPC_IE_TYPE_F_TEID = 87, + GTPC_IE_TYPE_TMSI = 88, + GTPC_IE_TYPE_GLOBAL_CN_ID = 89, + GTPC_IE_TYPE_S103_PDN_DATA_FORWARDING_INFO = 90, + GTPC_IE_TYPE_S1_U_DATA_FORWARDING_INFO = 91, + GTPC_IE_TYPE_DELAY_VALUE = 92, + GTPC_IE_TYPE_BEARER_CONTEXT = 93, + GTPC_IE_TYPE_CHARGING_ID = 94, + GTPC_IE_TYPE_CHARGING_CHARACTERISTICS = 95, + GTPC_IE_TYPE_TRACE_INFORMATION = 96, + GTPC_IE_TYPE_BEARER_FLAGS = 97, +//98 Reserved + GTPC_IE_TYPE_PDN_TYPE = 99, + GTPC_IE_TYPE_PROCEDURE_TRANSACTION_ID = 100, + GTPC_IE_TYPE_DRX_PARAMETER = 101, +//102 Reserved + GTPC_IE_TYPE_MM_CONTEXT_GSM_KEY_AND_TRIPLETS = 103, + GTPC_IE_TYPE_MM_CONTEXT_UMTS_KEY_USED_CIPHER_AND_QUINTUPLETS = 104, + GTPC_IE_TYPE_MM_CONTEXT_GSM_KEY_USED_CIPHER_AND_QUINTUPLETS = 105, + GTPC_IE_TYPE_MM_CONTEXT_UMTS_KEY_AND_QUINTUPLETS = 106, + GTPC_IE_TYPE_MM_CONTEXT_EPS_SECURITY_CONTEXT_QUADRUPLETS_AND_QUINTUPLETS = 107, + GTPC_IE_TYPE_MM_CONTEXT_UMTS_KEY_QUADRUPLETS_AND_QUINTUPLETS = 108, + GTPC_IE_TYPE_PDN_CONNECTION = 109, + GTPC_IE_TYPE_PDU_NUMBERS = 110, + GTPC_IE_TYPE_P_TMSI = 111, + GTPC_IE_TYPE_P_TMSI_SIGNATURE = 112, + GTPC_IE_TYPE_HOP_COUNTER = 113, + GTPC_IE_TYPE_UE_TIME_ZONE = 114, + GTPC_IE_TYPE_TRACE_REFERENCE = 115, + GTPC_IE_TYPE_COMPLETE_REQUEST_MESSAGE = 116, + GTPC_IE_TYPE_GUTI = 117, + GTPC_IE_TYPE_F_CONTAINER = 118, + GTPC_IE_TYPE_F_CAUSE = 119, + GTPC_IE_TYPE_SELECTED_PLMN_ID = 120, + GTPC_IE_TYPE_TARGET_IDENTIFICATION = 121, +//122 Reserved + GTPC_IE_TYPE_PACKET_FLOW_ID = 123, + GTPC_IE_TYPE_RAB_CONTEXT = 124, + GTPC_IE_TYPE_SOURCE_RNC_PDCP_CONTEXT_INFO = 125, + GTPC_IE_TYPE_UDP_SOURCE_PORT_NUMBER = 126, + GTPC_IE_TYPE_APN_RESTRICTION = 127, + GTPC_IE_TYPE_SELECTION_MODE = 128, + GTPC_IE_TYPE_SOURCE_IDENTIFICATION = 129, //130 RESERVED -const uint8_t GTPC_IE_TYPE_CHANGE_REPORTING_ACTION = 131; -const uint8_t GTPC_IE_TYPE_FQ_CSID = 132; -const uint8_t GTPC_IE_TYPE_CHANNEL_NEEDED = 133; -const uint8_t GTPC_IE_TYPE_EMLPP_PRIORITY = 134; -const uint8_t GTPC_IE_TYPE_NODE_TYPE = 135; -const uint8_t GTPC_IE_TYPE_FQDN = 136; -const uint8_t GTPC_IE_TYPE_TI = 137; -const uint8_t GTPC_IE_TYPE_MBMS_SESSION_DURATION = 138; -const uint8_t GTPC_IE_TYPE_MBMS_SERVICE_AREA = 139; -const uint8_t GTPC_IE_TYPE_MBMS_SESSION_IDENTIFIER = 140; -const uint8_t GTPC_IE_TYPE_MBMS_FLOW_IDENTIFIER = 141; -const uint8_t GTPC_IE_TYPE_MBMS_IP_MULTICAST_DISTRIBUTION = 142; -const uint8_t GTPC_IE_TYPE_MBMS_DISTRIBUTION_ACKNOWLEDGE = 143; -const uint8_t GTPC_IE_TYPE_RFSP_INDEX = 144; -const uint8_t GTPC_IE_TYPE_UCI = 145; -const uint8_t GTPC_IE_TYPE_CSG_INFORMATION_REPORTING_ACTION = 146; -const uint8_t GTPC_IE_TYPE_CSG_ID = 147; -const uint8_t GTPC_IE_TYPE_CMI = 148; -const uint8_t GTPC_IE_TYPE_SERVICE_INDICATOR = 149; -const uint8_t GTPC_IE_TYPE_DETACH_TYPE = 150; -const uint8_t GTPC_IE_TYPE_LDN = 151; -const uint8_t GTPC_IE_TYPE_NODE_FEATURES = 152; -const uint8_t GTPC_IE_TYPE_MBMS_TIME_TO_DATA_TRANSFER = 153; -const uint8_t GTPC_IE_TYPE_THROTTLING =154; -const uint8_t GTPC_IE_TYPE_ARP = 155; -const uint8_t GTPC_IE_TYPE_EPC_TIMER = 156; -const uint8_t GTPC_IE_TYPE_SIGNALLING_PRIORITY_INDICATION = 157; -const uint8_t GTPC_IE_TYPE_TMGI = 158; -const uint8_t GTPC_IE_TYPE_ADDITIONAL_MM_CONTEXT_FOR_SRVCC = 159; -const uint8_t GTPC_IE_TYPE_ADDITIONAL_FLAGS_FOR_SRVCC = 160; + GTPC_IE_TYPE_CHANGE_REPORTING_ACTION = 131, + GTPC_IE_TYPE_FQ_CSID = 132, + GTPC_IE_TYPE_CHANNEL_NEEDED = 133, + GTPC_IE_TYPE_EMLPP_PRIORITY = 134, + GTPC_IE_TYPE_NODE_TYPE = 135, + GTPC_IE_TYPE_FQDN = 136, + GTPC_IE_TYPE_TI = 137, + GTPC_IE_TYPE_MBMS_SESSION_DURATION = 138, + GTPC_IE_TYPE_MBMS_SERVICE_AREA = 139, + GTPC_IE_TYPE_MBMS_SESSION_IDENTIFIER = 140, + GTPC_IE_TYPE_MBMS_FLOW_IDENTIFIER = 141, + GTPC_IE_TYPE_MBMS_IP_MULTICAST_DISTRIBUTION = 142, + GTPC_IE_TYPE_MBMS_DISTRIBUTION_ACKNOWLEDGE = 143, + GTPC_IE_TYPE_RFSP_INDEX = 144, + GTPC_IE_TYPE_UCI = 145, + GTPC_IE_TYPE_CSG_INFORMATION_REPORTING_ACTION = 146, + GTPC_IE_TYPE_CSG_ID = 147, + GTPC_IE_TYPE_CMI = 148, + GTPC_IE_TYPE_SERVICE_INDICATOR = 149, + GTPC_IE_TYPE_DETACH_TYPE = 150, + GTPC_IE_TYPE_LDN = 151, + GTPC_IE_TYPE_NODE_FEATURES = 152, + GTPC_IE_TYPE_MBMS_TIME_TO_DATA_TRANSFER = 153, + GTPC_IE_TYPE_THROTTLING =154, + GTPC_IE_TYPE_ARP = 155, + GTPC_IE_TYPE_EPC_TIMER = 156, + GTPC_IE_TYPE_SIGNALLING_PRIORITY_INDICATION = 157, + GTPC_IE_TYPE_TMGI = 158, + GTPC_IE_TYPE_ADDITIONAL_MM_CONTEXT_FOR_SRVCC = 159, + GTPC_IE_TYPE_ADDITIONAL_FLAGS_FOR_SRVCC = 160, //161 RESERVED -const uint8_t GTPC_IE_TYPE_MDT_CONFIGURATION = 162; -const uint8_t GTPC_IE_TYPE_APCO = 163; + GTPC_IE_TYPE_MDT_CONFIGURATION = 162, + GTPC_IE_TYPE_APCO = 163, //164 RESERVED -const uint8_t GTPC_IE_TYPE_CHANGE_TO_REPORT_FLAGS = 165; + GTPC_IE_TYPE_CHANGE_TO_REPORT_FLAGS = 165, //168 TO 254 SPARE. FOR FUTURE USE. -const uint8_t GTPC_IE_TYPE_PRIVATE_EXTENSION = 255; - + GTPC_IE_TYPE_PRIVATE_EXTENSION = 255 +}; /**************************************************************** * * GTP-C IMSI IE - * Ref: TS 29.274 v10.14.0 Table 8.3-1 + * Ref: TS 29.274 v10.14.0 Figure 8.3-1 * ****************************************************************/ /* -The IMSI should be kept as a uint64_t. -The responsibility to convert from uint64_t to BCD coded is on -the pack_imsi_ie function -*/ -pack_imsi_ie(uint64_t imsi, **ptr); + * The IMSI should be kept as an uint64_t. + * The responsibility to convert from uint64_t to BCD coded is on + * the pack_imsi_ie function + */ + +/**************************************************************************** + * + * GTP-C Cause IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.4-1 and Table 8.4-1 + * + ***************************************************************************/ +enum gtpc_cause_value +{ + //Reserved + LOCAL_DETACH = 2, + COMPLETE_DETACH = 3, + RAT_CHANGED_FROM_3GPP_TO_NON_3GPP = 4, + ISR_DEACTIVATION = 5, + ERROR_INDICATION_RECEIVED_FROM_RNC_ENODEB_S4_SGSN = 6, + IMSI_DETACH_ONLY = 7, + REACTIVATION_REQUESTED = 8, + PDN_RECONNECTION_TO_THIS_APN_DISALLOWED = 9, + ACCESS_CHANGED_FROM_NON_3GPP_TO_3GPP = 10, + PDN_CONNECTION_INACTIVITY_TIMER_EXPIRES = 11 + //Spare. This value range shall be used by Cause values in an initial/request message. + +}; + +struct gtpc_cause_ie +{ + enum gtpc_cause_value cause_value; + bool pce; + bool bce; + bool cs; + enum gtpc_ie_type offending_ie_type; + uint16_t length_of_offending_ie; + uint8_t offending_ie_instance; +}; + +/**************************************************************************** + * + * GTP-C Recovery IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.5-1 + * + ***************************************************************************/ +/* + * The Recovery (Restart Counter) IE should be kept as an uint8_t. + */ + +/**************************************************************************** + * + * GTP-C Access Point Name IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.6-1 + * + ***************************************************************************/ +/* + * APN IE should be kept as an null terminated string. + * This string will be kept in a char[MAX_APN_LENGTH] buffer. + */ +#define MAX_APN_LENGTH 1024 + +/**************************************************************************** + * + * GTP-C Aggregate Maximum bit-rate IE + * Ref: 3GPP TS 29.274 v10.14.0 Table 8.7-1 + * + ***************************************************************************/ +struct gtpc_ambr_ie +{ + uint32_t apn_ambr_uplink; + uint32_t apn_ambr_downlink; +}; + +/**************************************************************************** + * + * GTP-C EPS Bearer ID address IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.8-1 + * + ***************************************************************************/ +/* + * The EPS Bearer ID (EBI) IE should be kept as an uint8_t. + */ + +/**************************************************************************** + * + * GTP-C IP address IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.9-1 + * + ***************************************************************************/ +/* + * IP addresses should the sockaddr_storage struct, which can hold IPv4 + * and IPv6 addresses. + */ + +//TODO +//TODO IEs between 8.10 and 8.17 missing +//TODO + +/**************************************************************************** + * + * GTP-C RAT Type IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.17-1 + * + ***************************************************************************/ + +enum gtpc_rat_type +{ + UTRAN = 1, + GERAN, + WLAN, + GAN, + HSPA_EVOLUTION, + EUTRAN, + Virtual +}; + +//TODO +//TODO IEs between 8.17 and 8.22 missing +//TODO + +/**************************************************************************** + * + * GTP-C Fully Qualified Tunnel End-point Identifier (F-TEID) IE + * Ref: 3GPP TS 29.274 v10.14.0 Figure 8.22-1 + * + ***************************************************************************/ +enum gtpc_interface_type +{ + S1_U_ENODEB_GTP_U_INTERFACE, + S1_U_SGW_GTP_U_INTERFACE, + S12_RNC_GTP_U_INTERFACE, + S12_SGW_GTP_U_INTERFACE, + S5_S8_SGW_GTP_U_INTERFACE, + S5_S8_PGW_GTP_U_INTERFACE, + S5_S8_SGW_GTP_C_INTERFACE, + S5_S8_PGW_GTP_C_INTERFACE, + S5_S8_SGW_PMIPV6_INTERFACE, //(the 32 bit GRE key is encoded in 32 bit TEID field and since alternate CoA is not used the control plane and user plane addresses are the same for PMIPv6) + S5_S8_PGW_PMIPV6_INTERFACE, //(the 32 bit GRE key is encoded in 32 bit TEID field and the control plane and user plane addresses are the same for PMIPv6) + S11_MME_GTP_C_INTERFACE, + S11_S4_SGW_GTP_C_INTERFACE, + S10_MME_GTP_C_INTERFACE, + S3_MME_GTP_C_INTERFACE, + S3_SGSN_GTP_C_INTERFACE, + S4_SGSN_GTP_U_INTERFACE, + S4_SGW_GTP_U_INTERFACE, + S4_SGSN_GTP_C_INTERFACE, + S16_SGSN_GTP_C_INTERFACE, + ENODEB_GTP_U_INTERFACE_FOR_DL_DATA_FORWARDING, + ENODEB_GTP_U_INTERFACE_FOR_UL_DATA_FORWARDING, + RNC_GTP_U_INTERFACE_FOR_DATA_FORWARDING, + SGSN_GTP_U_INTERFACE_FOR_DATA_FORWARDING, + SGW_GTP_U_INTERFACE_FOR_DL_DATA_FORWARDING, + SM_MBMS_GW_GTP_C_INTERFACE, + SN_MBMS_GW_GTP_C_INTERFACE, + SM_MME_GTP_C_INTERFACE, + SN_SGSN_GTP_C_INTERFACE, + SGW_GTP_U_INTERFACE_FOR_UL_DATA_FORWARDING, + SN_SGSN_GTP_U_INTERFACE, + S2B_EPDG_GTP_C_INTERFACE, + S2B_U_EPDG_GTP_U_INTERFACE, + S2B_PGW_GTP_C_INTERFACE, + S2B_U_PGW_GTP_U_INTERFACE +}; + +struct gtpc_f_teid_ie +{ + bool v4_present; + bool v6_present; + enum gtpc_interface_type interface_type; + uint32_t teid; + struct in_addr ipv4; + struct in6_addr ipv6; +}; + +#endif //GTPC_IES_H diff --git a/lib/include/srslte/asn1/gtpc_msg.h b/lib/include/srslte/asn1/gtpc_msg.h new file mode 100644 index 000000000..ccb2c7ae4 --- /dev/null +++ b/lib/include/srslte/asn1/gtpc_msg.h @@ -0,0 +1,223 @@ +/* \section COPYRIGHT + * + * Copyright 2013-2017 Software Radio Systems Limited + * + * \section LICENSE + * + * This file is part of srsLTE. + * + * srsUE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * srsUE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * A copy of the GNU Affero General Public License can be found in + * the LICENSE file in the top-level directory of this distribution + * and at http://www.gnu.org/licenses/. + * + */ +#ifndef GTPC_V2_MSG_H +#define GTPC_V2_MSG_H + +#include "srslte/asn1/gtpc_ies.h" + +namespace srslte{ + +/**************************************************************** + * + * GTP-C Message Types + * Ref: TS 29.274 v10.14.0 Table 6.1-1 + * + ****************************************************************/ +const uint8_t GTPC_MSG_TYPE_RESERVED = 0; +const uint8_t GTPC_MSG_TYPE_ECHO_REQUEST = 1; +const uint8_t GTPC_MSG_TYPE_ECHO_RESPONSE = 2; +const uint8_t GTPC_MSG_TYPE_VERSION_SUPPORT = 3; +//4-24 Reserved for S101 +//25-31 Reserved for Sv interface +//SGSN/MME/ePDG to PGW (S4/S11, S5/S8, S2b) +const uint8_t GTPC_MSG_TYPE_CREATE_SESSION_REQUEST = 32; +const uint8_t GTPC_MSG_TYPE_CREATE_SESSION_RESPONSE = 33; +const uint8_t GTPC_MSG_TYPE_DELETE_SESSION_REQUEST = 36; +const uint8_t GTPC_MSG_TYPE_DELETE_SESSION_RESPONSE = 37; +//SGSN/MME to PGW (S4/S11, S5/S8) +const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_REQUEST = 34; +const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_RESPONSE = 35; +const uint8_t GTPC_MSG_TYPE_CHANGE_NOTIFICATION_REQUEST = 38; +const uint8_t GTPC_MSG_TYPE_CHANGE_NOTIFICATION_RESPONSE = 39; +//40 - 63 for future use +const uint8_t GTPC_MSG_TYPE_RESUME_NOTIFICATION = 164; +const uint8_t GTPC_MSG_TYPE_RESUME_ACKNOWLEDGE = 165; +//Messages without explicit response +const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_COMMAND = 64; //(MME/SGSN/ePDG to PGW – S11/S4, S5/S8, S2b) +const uint8_t GTPC_MSG_TYPE_MODIFY_BEARER_FAILURE_INDICATION = 65; //(PGW to MME/SGSN/ePDG – S5/S8, S11/S4, S2b) +const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_COMMAND = 66; //(MME/SGSN to PGW – S11/S4, S5/S8) +const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_FAILURE_INDICATION = 67; //(PGW to MME/SGSN – S5/S8, S11/S4)) +const uint8_t GTPC_MSG_TYPE_BEARER_RESOURCE_COMMAND = 68; //(MME/SGSN to PGW – S11/S4, S5/S8) +const uint8_t GTPC_MSG_TYPE_BEARER_RESOURCE_FAILURE_INDICATION = 69; //(PGW to MME/SGSN – S5/S8, S11/S4) +const uint8_t GTPC_MSG_TYPE_DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION = 70; //(SGSN/MME to SGW – S4/S11) +const uint8_t GTPC_MSG_TYPE_TRACE_SESSION_ACTIVATION = 71; //(MME/SGSN/ePDG to PGW – S11/S4, S5/S8, S2b) +const uint8_t GTPC_MSG_TYPE_TRACE_SESSION_DEACTIVATION = 72; //(MME/SGSN/ePDG to PGW – S11/S4, S5/S8, S2b) +const uint8_t GTPC_MSG_TYPE_STOP_PAGING_INDICATION = 73; //(SGW to MME/SGSN – S11/S4) +//74-94 For future use +//P-GW to SGSN/MME/ePDG +const uint8_t GTPC_MSG_TYPE_CREATE_BEARER_REQUEST = 95; +const uint8_t GTPC_MSG_TYPE_CREATE_BEARER_RESPONSE = 96; +const uint8_t GTPC_MSG_TYPE_UPDATE_BEARER_REQUEST = 97; +const uint8_t GTPC_MSG_TYPE_UPDATE_BEARER_RESPONSE = 98; +const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_REQUEST = 99; +const uint8_t GTPC_MSG_TYPE_DELETE_BEARER_RESPONSE = 100; +//PGW to MME, MME to PGW, SGW to PGW, SGW to MME, PGW to ePDG, ePDG to PGW (S5/S8, S11, S2b) +const uint8_t GTPC_MSG_TYPE_DELETE_PDN_CONNECTION_SET_REQUEST = 101; +const uint8_t GTPC_MSG_TYPE_DELETE_PDN_CONNECTION_SET_RESPONSE = 102; +//103-127 For future use +//MME to MME, SGSN to MME, MME to SGSN, SGSN to SGSN (S3/S10/S16) +const uint8_t GTPC_MSG_TYPE_IDENTIFICATION_REQUEST = 128; +const uint8_t GTPC_MSG_TYPE_IDENTIFICATION_RESPONSE = 129; +const uint8_t GTPC_MSG_TYPE_CONTEXT_REQUEST = 130; +const uint8_t GTPC_MSG_TYPE_CONTEXT_RESPONSE = 131; +const uint8_t GTPC_MSG_TYPE_CONTEXT_ACKNOWLEDGE = 132; +const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_REQUEST = 133; +const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_RESPONSE = 134; +const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_COMPLETE_NOTIFICATION = 135; +const uint8_t GTPC_MSG_TYPE_FORWARD_RELOCATION_COMPLETE_ACKNOWLEDGE = 136; +const uint8_t GTPC_MSG_TYPE_FORWARD_ACCESS_CONTEXT_NOTIFICATION = 137; +const uint8_t GTPC_MSG_TYPE_FORWARD_ACCESS_CONTEXT_ACKNOWLEDGE = 138; +const uint8_t GTPC_MSG_TYPE_RELOCATION_CANCEL_REQUEST = 139; +const uint8_t GTPC_MSG_TYPE_RELOCATION_CANCEL_RESPONSE = 140; +const uint8_t GTPC_MSG_TYPE_CONFIGURATION_TRANSFER_TUNNEL = 141; +//142 - 148 For future use +const uint8_t GTPC_MSG_TYPE_RAN_INFORMATION_RELAY = 152; +//SGSN to MME, MME to SGSN (S3) +const uint8_t GTPC_MSG_TYPE_DETACH_NOTIFICATION = 149; +const uint8_t GTPC_MSG_TYPE_DETACH_ACKNOWLEDGE = 150; +const uint8_t GTPC_MSG_TYPE_CS_PAGING_INDICATION = 151; +const uint8_t GTPC_MSG_TYPE_ALERT_MME_NOTIFICATION = 153; +const uint8_t GTPC_MSG_TYPE_ALERT_MME_ACKNOWLEDGE = 154; +const uint8_t GTPC_MSG_TYPE_UE_ACTIVITY_NOTIFICATION = 155; +const uint8_t GTPC_MSG_TYPE_UE_ACTIVITY_ACKNOWLEDGE = 156; +//157 - 159 For future use +//GSN/MME to SGW, SGSN to MME (S4/S11/S3) SGSN to SGSN (S16), SGW to PGW (S5/S8) +const uint8_t GTPC_MSG_TYPE_SUSPEND_NOTIFICATION = 162; +const uint8_t GTPC_MSG_TYPE_SUSPEND_ACKNOWLEDGE = 163; +//SGSN/MME to SGW (S4/S11) const uint8_t GTPC_IE_TYPE_ +const uint8_t GTPC_MSG_TYPE_CREATE_FORWARDING_TUNNEL_REQUEST = 160; +const uint8_t GTPC_MSG_TYPE_CREATE_FORWARDING_TUNNEL_RESPONSE = 161; +const uint8_t GTPC_MSG_TYPE_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST = 166; +const uint8_t GTPC_MSG_TYPE_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE = 167; +const uint8_t GTPC_MSG_TYPE_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST = 168; +const uint8_t GTPC_MSG_TYPE_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE = 169; +const uint8_t GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_REQUEST = 170; +const uint8_t GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_RESPONSE = 171; +//172 - 175 For future use +//SGW to SGSN/MME (S4/S11) +const uint8_t GTPC_MSG_TYPE_DOWNLINK_DATA_NOTIFICATION = 176; +const uint8_t GTPC_MSG_TYPE_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE = 177; +const uint8_t GTPC_MSG_TYPE_PGW_RESTART_NOTIFICATION = 179; +const uint8_t GTPC_MSG_TYPE_PGW_RESTART_NOTIFICATION_ACKNOWLEDGE = 180; +//SGW to SGSN (S4) +//178 Reserved. Allocated in earlier version of the specification. +//181 -189 For future use +//SGW to PGW, PGW to SGW (S5/S8) +const uint8_t GTPC_MSG_TYPE_UPDATE_PDN_CONNECTION_SET_REQUEST = 200; +const uint8_t GTPC_MSG_TYPE_UPDATE_PDN_CONNECTION_SET_RESPONSE = 201; +//For future use +//MME to SGW (S11) +const uint8_t GTPC_MSG_TYPE_MODIFY_ACCESS_BEARERS_REQUEST = 211; +const uint8_t GTPC_MSG_TYPE_MODIFY_ACCESS_BEARERS_RESPONSE = 212; +//For future use +//MBMS GW to MME/SGSN (Sm/Sn) +const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_START_REQUEST = 231; +const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_START_RESPONSE = 232; +const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_UPDATE_REQUEST = 233; +const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_UPDATE_RESPONSE = 234; +const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_STOP_REQUEST = 235; +const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_STOP_RESPONSE = 236; +//For future use +//Other +//240 - 255 For future use + +/**************************************************************************** + * + * GTP-C v2 Create Session Request + * Ref: 3GPP TS 29.274 v10.14.0 Table 7.2.1-1 + * + ***************************************************************************/ + +typedef struct gtpc_create_session_request +{ + bool imsi_present; + uint64_t imsi; // C + //bool msidn_present; + //uint64_t msisdn; // C + //bool mei_present; + //uint64_t mei; // C/CO + //bool user_location_info_present; + //struct gtpc_user_location_info_ie uli; // C/CO + //bool serving_network_present; + //struct gtpc_serving_network_ie serving_network; // C/CO + + enum gtpc_rat_type rat_type; // M + //bool indication_flags_present; + //struct indication_flags_ indication_flags; // C + + struct gtpc_f_teid_ie sender_f_teid; // M + bool pgw_addr_present; + struct gtpc_f_teid_ie pgw_addr; // C + + char[MAX_APN_LENGTH] apn; // M + //bool selection_mode_present; + //enum selection_mode_ selection_mode; // C/CO + //bool pdn_type_present; + //enum gtpc_pdn_type pdn_type; // C + //bool pdn_addr_alloc_present; + //struct pdn_addr_alloc_ pdn_addr_alloc; // C/CO + //bool max_apn_restriction_present; + //enum apn_restriction_ max_apn_restriction; // C + //bool apn_ambr_present; + //struct ambr_ apn_ambr; // C + //bool linked_eps_bearer_id_present; + //uint8_t linked_eps_bearer_id; // C + //bool pco_present; + //uint8_t pco; // C + + struct gtpc_bearer_context_ie bearer_context_created; // M + //bool bearer_context_deleted_present; + //struct bearer_context_ bearer_context_deleted; // C + //bool trace_information_present; + //struct trace_infromation_ trace_information; // C + //bool recovery_present + //uint8_t recovery; // C + //bool mme_fq_csid_present; + //struct fq_csid_ mme_fq_csid; // C + //bool sgw_fq_csid_present; + //struct fq_csid_ sgw_fq_csid; // C + //bool epdg_fq_csid_present; + //struct fq_csid_ epdg_fq_csid; // C + //bool ue_time_zone_present; + //struct ue_time_zone_ ue_time_zone; // CO + //bool uci_present; + //struct uci_ uci; // CO + //bool charging_caracteristics_present; + //enum charging_characteristics_ charging_caracteristics; // O + //bool mme_ldn_present; + //uint8_t mme_ldn[LDN_MAX_SIZE]; // O + //bool sgw_ldn_present; + //uint8_t sgw_ldn[LDN_MAX_SIZE]; // O + //bool epgd_ldn_present; + //uint8_t epdg_ldn[LDN_MAX_SIZE]; // O + //bool signaling_priority_indication; + //enum signalling_priority_indication_ spi; // CO + //bool acpo_present; + //uint8_t apco; // CO + //bool ext; // O +} gtpc_create_session_request_t; + + +}; //namespace +#endif //GTPC_V2_MSG_H diff --git a/srsepc/src/mme/mme_gtpc.cc b/srsepc/src/mme/mme_gtpc.cc index 413e4e50f..aafcf367b 100644 --- a/srsepc/src/mme/mme_gtpc.cc +++ b/srsepc/src/mme/mme_gtpc.cc @@ -84,7 +84,7 @@ mme_gtpc::send_create_session_request(uint64_t imsi, struct create_session_respo //Setup GTP-C Create Session Request IEs // Control TEID allocated \\ cs_req->sender_f_teid.tied = get_new_ctrl_teid(); - cs_req->sender_f_teid.ip = m_mme_gtpc_ip; + cs_req->sender_f_teid.ipv4 = m_mme_gtpc_ip; // APN \\ memcpy(cs_req->apn, "internet", sizeof("internet")); // RAT Type \\