diff --git a/include/gtp_packet.hrl b/include/gtp_packet.hrl index 831c743..67415fe 100644 --- a/include/gtp_packet.hrl +++ b/include/gtp_packet.hrl @@ -4,46 +4,46 @@ %% Copyright 2015, Travelping GmbH --define('3GPP_RAT-TYPE_RESERVED', 0). --define('3GPP_RAT-TYPE_UTRAN', 1). --define('3GPP_RAT-TYPE_GERAN', 2). --define('3GPP_RAT-TYPE_WLAN', 3). --define('3GPP_RAT-TYPE_GAN', 4). --define('3GPP_RAT-TYPE_HSPA EVOLUTION', 5). --define('3GPP_RAT-TYPE_EUTRAN', 6). - --define('PCO-P-CSCF-IPv6-Address', 16#01). --define('PCO-IM-CN-Subsystem-Signaling-Flag', 16#02). --define('PCO-DNS-Server-IPv6-Address', 16#03). --define('PCO-Policy-Control-Rejection-Code', 16#04). --define('PCO-Bearer-Control-Mode', 16#05). --define('PCO-DSMIPv6-Home-Agent-Address', 16#07). --define('PCO-DSMIPv6-Home-Network-Prefix', 16#08). --define('PCO-DSMIPv6-IPv4-Home-Agent-Address', 16#09). --define('PCO-IP-Address-Allocation-Via-NAS-Signalling', 16#0A). --define('PCO-IPv4-Address-Allocation-Via-DHCPv4', 16#0B). --define('PCO-P-CSCF-IPv4-Address', 16#0C). --define('PCO-DNS-Server-IPv4-Address', 16#0D). --define('PCO-MSISDN', 16#0E). --define('PCO-IFOM-Support', 16#0F). --define('PCO-IPv4-Link-MTU', 16#10). --define('PCO-Local-Address-In-TFT-Indicator', 16#11). --define('PCO-P-CSCF-Re-Selection-Support', 16#12). --define('PCO-NBIFOM-Indicator', 16#13). --define('PCO-NBIFOM-Mode', 16#14). --define('PCO-Non-IP-Link-MTU', 16#15). --define('PCO-APN-Rate-Control', 16#16). +-define('3GPP_RAT-TYPE_RESERVED', 0). +-define('3GPP_RAT-TYPE_UTRAN', 1). +-define('3GPP_RAT-TYPE_GERAN', 2). +-define('3GPP_RAT-TYPE_WLAN', 3). +-define('3GPP_RAT-TYPE_GAN', 4). +-define('3GPP_RAT-TYPE_HSPA EVOLUTION', 5). +-define('3GPP_RAT-TYPE_EUTRAN', 6). + +-define('PCO-P-CSCF-IPv6-Address', 16#01). +-define('PCO-IM-CN-Subsystem-Signaling-Flag', 16#02). +-define('PCO-DNS-Server-IPv6-Address', 16#03). +-define('PCO-Policy-Control-Rejection-Code', 16#04). +-define('PCO-Bearer-Control-Mode', 16#05). +-define('PCO-DSMIPv6-Home-Agent-Address', 16#07). +-define('PCO-DSMIPv6-Home-Network-Prefix', 16#08). +-define('PCO-DSMIPv6-IPv4-Home-Agent-Address', 16#09). +-define('PCO-IP-Address-Allocation-Via-NAS-Signalling', 16#0A). +-define('PCO-IPv4-Address-Allocation-Via-DHCPv4', 16#0B). +-define('PCO-P-CSCF-IPv4-Address', 16#0C). +-define('PCO-DNS-Server-IPv4-Address', 16#0D). +-define('PCO-MSISDN', 16#0E). +-define('PCO-IFOM-Support', 16#0F). +-define('PCO-IPv4-Link-MTU', 16#10). +-define('PCO-Local-Address-In-TFT-Indicator', 16#11). +-define('PCO-P-CSCF-Re-Selection-Support', 16#12). +-define('PCO-NBIFOM-Indicator', 16#13). +-define('PCO-NBIFOM-Mode', 16#14). +-define('PCO-Non-IP-Link-MTU', 16#15). +-define('PCO-APN-Rate-Control', 16#16). -record(gtp, { - version :: 'undefined' | 'v1' | 'v2' | - 'prime_v0' | 'prime_v0s' | 'prime_v1' | 'prime_v2', - type :: atom(), - tei :: 0..16#ffffffff | undefined, - seq_no :: 0..16#ffffff | undefined, - n_pdu :: 0..16#ff | undefined, - ext_hdr = [] :: [term()], - ie :: [term()] | map() | binary() - }). + version :: 'undefined' | 'v1' | 'v2' | + 'prime_v0' | 'prime_v0s' | 'prime_v1' | 'prime_v2', + type :: atom(), + tei :: 0..16#ffffffff | undefined, + seq_no :: 0..16#ffffff | undefined, + n_pdu :: 0..16#ff | undefined, + ext_hdr = [] :: [term()], + ie :: [term()] | map() | binary() + }). -record(cgi, {plmn_id, lac, ci}). -record(sai, {plmn_id, lac, sac}). @@ -55,99 +55,99 @@ -record(ext_macro_enb, {plmn_id, id}). -record(routeing_area_identity, { - instance = 0, - identity - }). + instance = 0, + identity + }). -record(user_location_information, { - instance = 0, - location - }). + instance = 0, + location + }). -record(data_record_packet, { - instance = 0, - format, - application, - version, - records = [] - }). + instance = 0, + format, + application, + version, + records = [] + }). -record(v2_user_location_information, { - instance = 0, - cgi, - sai, - rai, - tai, - ecgi, - lai, - macro_enb, - ext_macro_enb - }). + instance = 0, + cgi, + sai, + rai, + tai, + ecgi, + lai, + macro_enb, + ext_macro_enb + }). -record(v2_fully_qualified_tunnel_endpoint_identifier, { - instance = 0, - interface_type, - key, - ipv4, - ipv6 - }). + instance = 0, + interface_type, + key, + ipv4, + ipv6 + }). -record(v2_fully_qualified_pdn_connection_set_identifier, { - instance = 0, - node_id_type = 0, - node_id, - csids = [] - }). + instance = 0, + node_id_type = 0, + node_id, + csids = [] + }). -record(v2_private_extension, { - instance = 0, - enterprise_id = 0, - value = <<>> - }). + instance = 0, + enterprise_id = 0, + value = <<>> + }). -record(v2_twan_identifier, { - instance = 0, - ssid = <<>>, - bssid, - civic_address, - plmn_id, - operator_name, - relay_identity_type, - relay_identity, - circuit_id - }). + instance = 0, + ssid = <<>>, + bssid, + civic_address, + plmn_id, + operator_name, + relay_identity_type, + relay_identity, + circuit_id + }). -record(v2_paging_and_service_information, { - instance = 0, - ebi = 0, - ppi - }). + instance = 0, + ebi = 0, + ppi + }). -record(v2_integer_number, { - instance = 0, - width = 0, - value = 0 - }). + instance = 0, + width = 0, + value = 0 + }). -record(v2_remote_user_id, { - instance = 0, - imsi = <<>>, - msisdn, - imei - }). + instance = 0, + imsi = <<>>, + msisdn, + imei + }). -record(v2_maximum_packet_loss_rate, { - instance = 0, - ul, - dl - }). + instance = 0, + ul, + dl + }). -record(v2_monitoring_event_extension_information, { - instance = 0, - scef_reference_id = 0, - scef_id = <<>>, - remaining_minimum_lrtp -}). + instance = 0, + scef_reference_id = 0, + scef_id = <<>>, + remaining_minimum_lrtp + }). %% -include("gtp_packet_v1_gen.hrl"). @@ -218,605 +218,605 @@ private_extension]). -record(cause, { - instance = 0, - value = request_imsi -}). + instance = 0, + value = request_imsi + }). -record(international_mobile_subscriber_identity, { - instance = 0, - imsi -}). + instance = 0, + imsi + }). -record(temporary_logical_link_identity, { - instance = 0, - tlli = <<0,0,0,0>> -}). + instance = 0, + tlli = <<0,0,0,0>> + }). -record(packet_tmsi, { - instance = 0, - p_tmsi = <<0,0,0,0>> -}). + instance = 0, + p_tmsi = <<0,0,0,0>> + }). -record(reordering_required, { - instance = 0, - required = no -}). + instance = 0, + required = no + }). -record(authentication_triplet, { - instance = 0, - rand = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, - sres = <<0,0,0,0>>, - kc = <<0,0,0,0,0,0,0,0>> -}). + instance = 0, + rand = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, + sres = <<0,0,0,0>>, + kc = <<0,0,0,0,0,0,0,0>> + }). -record(map_cause, { - instance = 0, - value = <<0>> -}). + instance = 0, + value = <<0>> + }). -record(p_tmsi_signature, { - instance = 0, - value = <<0,0,0>> -}). + instance = 0, + value = <<0,0,0>> + }). -record(ms_validated, { - instance = 0, - validated = no -}). + instance = 0, + validated = no + }). -record(recovery, { - instance = 0, - restart_counter = 0 -}). + instance = 0, + restart_counter = 0 + }). -record(selection_mode, { - instance = 0, - mode = 0 -}). + instance = 0, + mode = 0 + }). -record(tunnel_endpoint_identifier_data_i, { - instance = 0, - tei = 0 -}). + instance = 0, + tei = 0 + }). -record(tunnel_endpoint_identifier_control_plane, { - instance = 0, - tei = 0 -}). + instance = 0, + tei = 0 + }). -record(tunnel_endpoint_identifier_data_ii, { - instance = 0, - nsapi = 0, - tei = 0 -}). + instance = 0, + nsapi = 0, + tei = 0 + }). -record(teardown_ind, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(nsapi, { - instance = 0, - nsapi = 0 -}). + instance = 0, + nsapi = 0 + }). -record(ranap_cause, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(rab_context, { - instance = 0, - nsapi = 0, - dl_gtp_u_sequence_number = 0, - ul_gtp_u_sequence_number = 0, - dl_pdcp_sequence_number = 0, - ul_pdcp_sequence_number = 0 -}). + instance = 0, + nsapi = 0, + dl_gtp_u_sequence_number = 0, + ul_gtp_u_sequence_number = 0, + dl_pdcp_sequence_number = 0, + ul_pdcp_sequence_number = 0 + }). -record(radio_priority_sms, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(radio_priority, { - instance = 0, - nsapi = 0, - value = 0 -}). + instance = 0, + nsapi = 0, + value = 0 + }). -record(packet_flow_id, { - instance = 0, - nsapi = 0, - value = 0 -}). + instance = 0, + nsapi = 0, + value = 0 + }). -record(charging_characteristics, { - instance = 0, - value = <<0,0>> -}). + instance = 0, + value = <<0,0>> + }). -record(trace_reference, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(trace_type, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(ms_not_reachable_reason, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(packet_transfer_command, { - instance = 0, - command = send_data_record_packet -}). + instance = 0, + command = send_data_record_packet + }). -record(charging_id, { - instance = 0, - id = <<0,0,0,0>> -}). + instance = 0, + id = <<0,0,0,0>> + }). -record(end_user_address, { - instance = 0, - pdp_type_organization = 0, - pdp_type_number = 0, - pdp_address = <<>> -}). + instance = 0, + pdp_type_organization = 0, + pdp_type_number = 0, + pdp_address = <<>> + }). -record(mm_context_gsm, { - instance = 0, - cksn = 0, - no_of_vectors = 0, - used_cipher = 0, - kc = <<0,0,0,0,0,0,0,0>>, - tripple = [], - drx_parameter = <<0,0>>, - ms_network_capability_length = 0, - ms_network_capability = [], - container_length = 0, - container = [] -}). + instance = 0, + cksn = 0, + no_of_vectors = 0, + used_cipher = 0, + kc = <<0,0,0,0,0,0,0,0>>, + tripple = [], + drx_parameter = <<0,0>>, + ms_network_capability_length = 0, + ms_network_capability = [], + container_length = 0, + container = [] + }). -record(mm_context_umts, { - instance = 0, - ksi = 0, - no_of_vectors = 0, - ck = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, - ik = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, - quintuplet_length = 0, - quintuplet = [], - drx_parameter = <<0,0>>, - ms_network_capability_length = 0, - ms_network_capability = [], - container_length = 0, - container = [] -}). + instance = 0, + ksi = 0, + no_of_vectors = 0, + ck = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, + ik = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, + quintuplet_length = 0, + quintuplet = [], + drx_parameter = <<0,0>>, + ms_network_capability_length = 0, + ms_network_capability = [], + container_length = 0, + container = [] + }). -record(mm_context_gsm_and_umts, { - instance = 0, - cksn = 0, - no_of_vectors = 0, - used_cipher = 0, - kc = <<0,0,0,0,0,0,0,0>>, - quintuplet_length = 0, - quintuplet = [], - drx_parameter = <<0,0>>, - ms_network_capability_length = 0, - ms_network_capability = [], - container_length = 0, - container = [] -}). + instance = 0, + cksn = 0, + no_of_vectors = 0, + used_cipher = 0, + kc = <<0,0,0,0,0,0,0,0>>, + quintuplet_length = 0, + quintuplet = [], + drx_parameter = <<0,0>>, + ms_network_capability_length = 0, + ms_network_capability = [], + container_length = 0, + container = [] + }). -record(mm_context_umts_and_used_cipher, { - instance = 0, - ksi = 0, - no_of_vectors = 0, - used_cipher = 0, - ck = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, - ik = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, - quintuplet_length = 0, - quintuplet = [], - drx_parameter = <<0,0>>, - ms_network_capability_length = 0, - ms_network_capability = [], - container_length = 0, - container = [] -}). + instance = 0, + ksi = 0, + no_of_vectors = 0, + used_cipher = 0, + ck = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, + ik = <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, + quintuplet_length = 0, + quintuplet = [], + drx_parameter = <<0,0>>, + ms_network_capability_length = 0, + ms_network_capability = [], + container_length = 0, + container = [] + }). -record(pdp_context, { - instance = 0 -}). + instance = 0 + }). -record(access_point_name, { - instance = 0, - apn -}). + instance = 0, + apn + }). -record(protocol_configuration_options, { - instance = 0, - config -}). + instance = 0, + config + }). -record(gsn_address, { - instance = 0, - address = <<>> -}). + instance = 0, + address = <<>> + }). -record(ms_international_pstn_isdn_number, { - instance = 0, - msisdn -}). + instance = 0, + msisdn + }). -record(quality_of_service_profile, { - instance = 0, - priority = 0, - data = <<>> -}). + instance = 0, + priority = 0, + data = <<>> + }). -record(authentication_quintuplet, { - instance = 0 -}). + instance = 0 + }). -record(traffic_flow_template, { - instance = 0 -}). + instance = 0 + }). -record(target_identification, { - instance = 0 -}). + instance = 0 + }). -record(utran_transparent_container, { - instance = 0 -}). + instance = 0 + }). -record(rab_setup_information, { - instance = 0 -}). + instance = 0 + }). -record(extension_header_type_list, { - instance = 0 -}). + instance = 0 + }). -record(trigger_id, { - instance = 0 -}). + instance = 0 + }). -record(omc_identity, { - instance = 0 -}). + instance = 0 + }). -record(ran_transparent_container, { - instance = 0 -}). + instance = 0 + }). -record(pdp_context_prioritization, { - instance = 0 -}). + instance = 0 + }). -record(additional_rab_setup_information, { - instance = 0 -}). + instance = 0 + }). -record(sgsn_number, { - instance = 0 -}). + instance = 0 + }). -record(common_flags, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(apn_restriction, { - instance = 0, - restriction_type_value = 0 -}). + instance = 0, + restriction_type_value = 0 + }). -record(radio_priority_lcs, { - instance = 0 -}). + instance = 0 + }). -record(rat_type, { - instance = 0, - rat_type = 0 -}). + instance = 0, + rat_type = 0 + }). -record(ms_time_zone, { - instance = 0, - timezone = 0, - dst = 0 -}). + instance = 0, + timezone = 0, + dst = 0 + }). -record(imei, { - instance = 0, - imei -}). + instance = 0, + imei + }). -record(camel_charging_information_container, { - instance = 0 -}). + instance = 0 + }). -record(mbms_ue_context, { - instance = 0 -}). + instance = 0 + }). -record(temporary_mobile_group_identity, { - instance = 0 -}). + instance = 0 + }). -record(rim_routing_address, { - instance = 0 -}). + instance = 0 + }). -record(mbms_protocol_configuration_options, { - instance = 0 -}). + instance = 0 + }). -record(mbms_service_area, { - instance = 0 -}). + instance = 0 + }). -record(source_rnc_pdcp_context_info, { - instance = 0 -}). + instance = 0 + }). -record(additional_trace_info, { - instance = 0 -}). + instance = 0 + }). -record(hop_counter, { - instance = 0 -}). + instance = 0 + }). -record(selected_plmn_id, { - instance = 0 -}). + instance = 0 + }). -record(mbms_session_identifier, { - instance = 0 -}). + instance = 0 + }). -record(mbms_2g_3g_indicator, { - instance = 0 -}). + instance = 0 + }). -record(enhanced_nsapi, { - instance = 0 -}). + instance = 0 + }). -record(mbms_session_duration, { - instance = 0 -}). + instance = 0 + }). -record(additional_mbms_trace_info, { - instance = 0 -}). + instance = 0 + }). -record(mbms_session_repetition_number, { - instance = 0 -}). + instance = 0 + }). -record(mbms_time_to_data_transfer, { - instance = 0 -}). + instance = 0 + }). -record(bss_container, { - instance = 0 -}). + instance = 0 + }). -record(cell_identification, { - instance = 0 -}). + instance = 0 + }). -record(pdu_numbers, { - instance = 0 -}). + instance = 0 + }). -record(bssgp_cause, { - instance = 0 -}). + instance = 0 + }). -record(required_mbms_bearer_capabilities, { - instance = 0 -}). + instance = 0 + }). -record(rim_routing_address_discriminator, { - instance = 0 -}). + instance = 0 + }). -record(list_of_set_up_pfcs, { - instance = 0 -}). + instance = 0 + }). -record(ps_handover_xid_parameters, { - instance = 0 -}). + instance = 0 + }). -record(ms_info_change_reporting_action, { - instance = 0, - action = stop_reporting -}). + instance = 0, + action = stop_reporting + }). -record(direct_tunnel_flags, { - instance = 0 -}). + instance = 0 + }). -record(correlation_id, { - instance = 0 -}). + instance = 0 + }). -record(bearer_control_mode, { - instance = 0 -}). + instance = 0 + }). -record(mbms_flow_identifier, { - instance = 0 -}). + instance = 0 + }). -record(mbms_ip_multicast_distribution, { - instance = 0 -}). + instance = 0 + }). -record(mbms_distribution_acknowledgement, { - instance = 0 -}). + instance = 0 + }). -record(reliable_inter_rat_handover_info, { - instance = 0 -}). + instance = 0 + }). -record(rfsp_index, { - instance = 0 -}). + instance = 0 + }). -record(fully_qualified_domain_name, { - instance = 0, - fqdn -}). + instance = 0, + fqdn + }). -record(evolved_allocation_retention_priority_i, { - instance = 0, - pci = 0, - pl = 0, - pvi = 0 -}). + instance = 0, + pci = 0, + pl = 0, + pvi = 0 + }). -record(evolved_allocation_retention_priority_ii, { - instance = 0 -}). + instance = 0 + }). -record(extended_common_flags, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(user_csg_information, { - instance = 0 -}). + instance = 0 + }). -record(csg_information_reporting_action, { - instance = 0 -}). + instance = 0 + }). -record(csg_id, { - instance = 0 -}). + instance = 0 + }). -record(csg_membership_indication, { - instance = 0 -}). + instance = 0 + }). -record(aggregate_maximum_bit_rate, { - instance = 0, - uplink = 0, - downlink = 0 -}). + instance = 0, + uplink = 0, + downlink = 0 + }). -record(ue_network_capability, { - instance = 0 -}). + instance = 0 + }). -record(ue_ambr, { - instance = 0 -}). + instance = 0 + }). -record(apn_ambr_with_nsapi, { - instance = 0 -}). + instance = 0 + }). -record(ggsn_back_off_time, { - instance = 0 -}). + instance = 0 + }). -record(signalling_priority_indication, { - instance = 0 -}). + instance = 0 + }). -record(signalling_priority_indication_with_nsapi, { - instance = 0 -}). + instance = 0 + }). -record(higher_bitrates_than_16_mbps_flag, { - instance = 0 -}). + instance = 0 + }). -record(additional_mm_context_for_srvcc, { - instance = 0 -}). + instance = 0 + }). -record(additional_flags_for_srvcc, { - instance = 0 -}). + instance = 0 + }). -record(stn_sr, { - instance = 0 -}). + instance = 0 + }). -record(c_msisdn, { - instance = 0 -}). + instance = 0 + }). -record(extended_ranap_cause, { - instance = 0 -}). + instance = 0 + }). -record(enodeb_id, { - instance = 0 -}). + instance = 0 + }). -record(selection_mode_with_nsapi, { - instance = 0 -}). + instance = 0 + }). -record(uli_timestamp, { - instance = 0 -}). + instance = 0 + }). -record(local_home_network_id_with_nsapi, { - instance = 0 -}). + instance = 0 + }). -record(cn_operator_selection_entity, { - instance = 0 -}). + instance = 0 + }). -record(sequence_numbers_of_released_packets, { - instance = 0, - sequence_numbers -}). + instance = 0, + sequence_numbers + }). -record(sequence_numbers_of_cancelled_packets, { - instance = 0, - sequence_numbers -}). + instance = 0, + sequence_numbers + }). -record(charging_gateway_address, { - instance = 0, - address = <<>> -}). + instance = 0, + address = <<>> + }). -record(requests_responded, { - instance = 0, - sequence_numbers -}). + instance = 0, + sequence_numbers + }). -record(address_of_recommended_node, { - instance = 0, - address = <<>> -}). + instance = 0, + address = <<>> + }). -record(private_extension, { - instance = 0, - enterprise_id = 0, - value = <<>> -}). + instance = 0, + enterprise_id = 0, + value = <<>> + }). %% -include("gtp_packet_v2_gen.hrl"). @@ -904,706 +904,706 @@ v2_additional_rrm_policy_index,v2_private_extension]). -record(v2_international_mobile_subscriber_identity, { - instance = 0, - imsi -}). + instance = 0, + imsi + }). -record(v2_cause, { - instance = 0, - v2_cause = reserved, - pce = 0, - bce = 0, - cs = 0, - offending_ie -}). + instance = 0, + v2_cause = reserved, + pce = 0, + bce = 0, + cs = 0, + offending_ie + }). -record(v2_recovery, { - instance = 0, - restart_counter = 0 -}). + instance = 0, + restart_counter = 0 + }). -record(v2_stn_sr, { - instance = 0 -}). + instance = 0 + }). -record(v2_access_point_name, { - instance = 0, - apn -}). + instance = 0, + apn + }). -record(v2_aggregate_maximum_bit_rate, { - instance = 0, - uplink = 0, - downlink = 0 -}). + instance = 0, + uplink = 0, + downlink = 0 + }). -record(v2_eps_bearer_id, { - instance = 0, - eps_bearer_id = 0 -}). + instance = 0, + eps_bearer_id = 0 + }). -record(v2_ip_address, { - instance = 0, - ip = <<>> -}). + instance = 0, + ip = <<>> + }). -record(v2_mobile_equipment_identity, { - instance = 0, - mei -}). + instance = 0, + mei + }). -record(v2_msisdn, { - instance = 0, - msisdn -}). + instance = 0, + msisdn + }). -record(v2_indication, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(v2_protocol_configuration_options, { - instance = 0, - config -}). + instance = 0, + config + }). -record(v2_pdn_address_allocation, { - instance = 0, - type = ipv4, - address = <<>> -}). + instance = 0, + type = ipv4, + address = <<>> + }). -record(v2_bearer_level_quality_of_service, { - instance = 0, - pci = 0, - pl = 0, - pvi = 0, - label = 0, - maximum_bit_rate_for_uplink = 0, - maximum_bit_rate_for_downlink = 0, - guaranteed_bit_rate_for_uplink = 0, - guaranteed_bit_rate_for_downlink = 0 -}). + instance = 0, + pci = 0, + pl = 0, + pvi = 0, + label = 0, + maximum_bit_rate_for_uplink = 0, + maximum_bit_rate_for_downlink = 0, + guaranteed_bit_rate_for_uplink = 0, + guaranteed_bit_rate_for_downlink = 0 + }). -record(v2_flow_quality_of_service, { - instance = 0, - label = 0, - maximum_bit_rate_for_uplink = 0, - maximum_bit_rate_for_downlink = 0, - guaranteed_bit_rate_for_uplink = 0, - guaranteed_bit_rate_for_downlink = 0 -}). + instance = 0, + label = 0, + maximum_bit_rate_for_uplink = 0, + maximum_bit_rate_for_downlink = 0, + guaranteed_bit_rate_for_uplink = 0, + guaranteed_bit_rate_for_downlink = 0 + }). -record(v2_rat_type, { - instance = 0, - rat_type = 0 -}). + instance = 0, + rat_type = 0 + }). -record(v2_serving_network, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>} -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>} + }). -record(v2_eps_bearer_level_traffic_flow_template, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_traffic_aggregation_description, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_tmsi, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(v2_global_cn_id, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>}, - value = <<>> -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>}, + value = <<>> + }). -record(v2_s103_pdn_data_forwarding_info, { - instance = 0, - hsgw_address = <<>>, - gre_key = 0, - eps_bearer_id = [] -}). + instance = 0, + hsgw_address = <<>>, + gre_key = 0, + eps_bearer_id = [] + }). -record(v2_s1_u_data_forwarding_info, { - instance = 0, - service_gw_address = <<>>, - teid = 0 -}). + instance = 0, + service_gw_address = <<>>, + teid = 0 + }). -record(v2_delay_value, { - instance = 0, - delay = 0 -}). + instance = 0, + delay = 0 + }). -record(v2_bearer_context, { - instance = 0, - group -}). + instance = 0, + group + }). -record(v2_charging_id, { - instance = 0, - id = <<0,0,0,0>> -}). + instance = 0, + id = <<0,0,0,0>> + }). -record(v2_charging_characteristics, { - instance = 0, - value = <<0,0>> -}). + instance = 0, + value = <<0,0>> + }). -record(v2_trace_information, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>}, - trace_id = 0, - triggering_events = <<0,0,0,0,0,0,0,0,0>>, - list_of_ne_types = 0, - session_trace_depth = 0, - list_of_interfaces = <<0,0,0,0,0,0,0,0,0,0,0,0>>, - ip_address_of_trace_collection_entity = <<>> -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>}, + trace_id = 0, + triggering_events = <<0,0,0,0,0,0,0,0,0>>, + list_of_ne_types = 0, + session_trace_depth = 0, + list_of_interfaces = <<0,0,0,0,0,0,0,0,0,0,0,0>>, + ip_address_of_trace_collection_entity = <<>> + }). -record(v2_bearer_flags, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(v2_pdn_type, { - instance = 0, - pdn_type = ipv4 -}). + instance = 0, + pdn_type = ipv4 + }). -record(v2_procedure_transaction_id, { - instance = 0, - pti = 0 -}). + instance = 0, + pti = 0 + }). -record(v2_mm_context_1, { - instance = 0 -}). + instance = 0 + }). -record(v2_mm_context_2, { - instance = 0 -}). + instance = 0 + }). -record(v2_mm_context_3, { - instance = 0 -}). + instance = 0 + }). -record(v2_mm_context_4, { - instance = 0 -}). + instance = 0 + }). -record(v2_mm_context_5, { - instance = 0 -}). + instance = 0 + }). -record(v2_mm_context_6, { - instance = 0 -}). + instance = 0 + }). -record(v2_pdn_connection, { - instance = 0, - group -}). + instance = 0, + group + }). -record(v2_pdu_numbers, { - instance = 0, - nsapi = 0, - dl_gtp_u_sequence_number = 0, - ul_gtp_u_sequence_number = 0, - send_n_pdu_number = 0, - receive_n_pdu_number = 0 -}). + instance = 0, + nsapi = 0, + dl_gtp_u_sequence_number = 0, + ul_gtp_u_sequence_number = 0, + send_n_pdu_number = 0, + receive_n_pdu_number = 0 + }). -record(v2_p_tmsi, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_p_tmsi_signature, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_hop_counter, { - instance = 0, - hop_counter = 0 -}). + instance = 0, + hop_counter = 0 + }). -record(v2_ue_time_zone, { - instance = 0, - timezone = 0, - dst = 0 -}). + instance = 0, + timezone = 0, + dst = 0 + }). -record(v2_trace_reference, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>}, - id = 0 -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>}, + id = 0 + }). -record(v2_complete_request_message, { - instance = 0, - type = 0, - message = <<>> -}). + instance = 0, + type = 0, + message = <<>> + }). -record(v2_guti, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>}, - group_id = 0, - code = 0, - m_tmsi = <<>> -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>}, + group_id = 0, + code = 0, + m_tmsi = <<>> + }). -record(v2_f_container, { - instance = 0, - type = 0, - data = <<>> -}). + instance = 0, + type = 0, + data = <<>> + }). -record(v2_f_cause, { - instance = 0, - type = 0, - data = <<>> -}). + instance = 0, + type = 0, + data = <<>> + }). -record(v2_plmn_id, { - instance = 0, - id = <<0,0,0>> -}). + instance = 0, + id = <<0,0,0>> + }). -record(v2_target_identification, { - instance = 0, - type = 0, - data = <<>> -}). + instance = 0, + type = 0, + data = <<>> + }). -record(v2_packet_flow_id, { - instance = 0, - ebi = 0, - flow_id = <<>> -}). + instance = 0, + ebi = 0, + flow_id = <<>> + }). -record(v2_rab_context, { - instance = 0, - ulpsi = 0, - dlpsi = 0, - ulgsi = 0, - dlgsi = 0, - nsapi = 0, - dl_gtp_u_sequence_number = 0, - ul_gtp_u_sequence_number = 0, - dl_pdcp_number = 0, - ul_pdcp_number = 0 -}). + instance = 0, + ulpsi = 0, + dlpsi = 0, + ulgsi = 0, + dlgsi = 0, + nsapi = 0, + dl_gtp_u_sequence_number = 0, + ul_gtp_u_sequence_number = 0, + dl_pdcp_number = 0, + ul_pdcp_number = 0 + }). -record(v2_source_rnc_pdcp_context_info, { - instance = 0, - rrc_container = <<>> -}). + instance = 0, + rrc_container = <<>> + }). -record(v2_udp_source_port_number, { - instance = 0, - port = 0 -}). + instance = 0, + port = 0 + }). -record(v2_apn_restriction, { - instance = 0, - restriction_type_value = 0 -}). + instance = 0, + restriction_type_value = 0 + }). -record(v2_selection_mode, { - instance = 0, - mode = 0 -}). + instance = 0, + mode = 0 + }). -record(v2_source_identification, { - instance = 0, - target_cell_id = <<>>, - source_type = 0, - source_id = <<>> -}). + instance = 0, + target_cell_id = <<>>, + source_type = 0, + source_id = <<>> + }). -record(v2_change_reporting_action, { - instance = 0, - action = stop_reporting -}). + instance = 0, + action = stop_reporting + }). -record(v2_channel_needed, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_emlpp_priority, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_node_type, { - instance = 0, - node_type = 0 -}). + instance = 0, + node_type = 0 + }). -record(v2_fully_qualified_domain_name, { - instance = 0, - fqdn -}). + instance = 0, + fqdn + }). -record(v2_transaction_identifier, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_mbms_session_duration, { - instance = 0 -}). + instance = 0 + }). -record(v2_mbms_service_area, { - instance = 0 -}). + instance = 0 + }). -record(v2_mbms_session_identifier, { - instance = 0 -}). + instance = 0 + }). -record(v2_mbms_flow_identifier, { - instance = 0 -}). + instance = 0 + }). -record(v2_mbms_ip_multicast_distribution, { - instance = 0 -}). + instance = 0 + }). -record(v2_mbms_distribution_acknowledge, { - instance = 0 -}). + instance = 0 + }). -record(v2_rfsp_index, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(v2_user_csg_information, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>}, - csg_id = <<0,0,0,0:3>>, - access_mode = 0, - lcsg = false, - cmi = 0 -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>}, + csg_id = <<0,0,0,0:3>>, + access_mode = 0, + lcsg = false, + cmi = 0 + }). -record(v2_csg_information_reporting_action, { - instance = 0, - actions = #{} -}). + instance = 0, + actions = #{} + }). -record(v2_csg_id, { - instance = 0, - id = <<0,0,0,0:3>> -}). + instance = 0, + id = <<0,0,0,0:3>> + }). -record(v2_csg_membership_indication, { - instance = 0, - cmi = 0 -}). + instance = 0, + cmi = 0 + }). -record(v2_service_indicator, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(v2_detach_type, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(v2_local_distiguished_name, { - instance = 0, - value = <<>> -}). + instance = 0, + value = <<>> + }). -record(v2_node_features, { - instance = 0, - features = #{} -}). + instance = 0, + features = #{} + }). -record(v2_mbms_time_to_data_transfer, { - instance = 0 -}). + instance = 0 + }). -record(v2_throttling, { - instance = 0, - unit = 0, - value = 0, - factor = 0 -}). + instance = 0, + unit = 0, + value = 0, + factor = 0 + }). -record(v2_allocation_retention_priority, { - instance = 0, - pci = false, - pl = 0, - pvi = false -}). + instance = 0, + pci = false, + pl = 0, + pvi = false + }). -record(v2_epc_timer, { - instance = 0, - unit = 0, - value = 0 -}). + instance = 0, + unit = 0, + value = 0 + }). -record(v2_signalling_priority_indication, { - instance = 0, - indication = #{} -}). + instance = 0, + indication = #{} + }). -record(v2_temporary_mobile_group_identity, { - instance = 0 -}). + instance = 0 + }). -record(v2_additional_mm_context_for_srvcc, { - instance = 0, - classmark_2 = <<>>, - classmark_3 = <<>>, - codec_list = <<>> -}). + instance = 0, + classmark_2 = <<>>, + classmark_3 = <<>>, + codec_list = <<>> + }). -record(v2_additional_flags_for_srvcc, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(v2_mdt_configuration, { - instance = 0 -}). + instance = 0 + }). -record(v2_additional_protocol_configuration_options, { - instance = 0, - config -}). + instance = 0, + config + }). -record(v2_absolute_time_of_mbms_data_transfer, { - instance = 0 -}). + instance = 0 + }). -record(v2_henb_information_reporting_, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(v2_ipv4_configuration_parameters, { - instance = 0, - prefix_length = 0, - default_route = <<0,0,0,0>> -}). + instance = 0, + prefix_length = 0, + default_route = <<0,0,0,0>> + }). -record(v2_change_to_report_flags_, { - instance = 0, - flags = #{} -}). + instance = 0, + flags = #{} + }). -record(v2_action_indication, { - instance = 0, - indication = 0 -}). + instance = 0, + indication = 0 + }). -record(v2_uli_timestamp, { - instance = 0, - timestamp = 0 -}). + instance = 0, + timestamp = 0 + }). -record(v2_mbms_flags, { - instance = 0 -}). + instance = 0 + }). -record(v2_ran_nas_cause, { - instance = 0, - protocol = 0, - type = 0, - cause = <<>> -}). + instance = 0, + protocol = 0, + type = 0, + cause = <<>> + }). -record(v2_cn_operator_selection_entity, { - instance = 0, - entity = 0 -}). + instance = 0, + entity = 0 + }). -record(v2_trusted_wlan_mode_indication, { - instance = 0, - indication = #{} -}). + instance = 0, + indication = #{} + }). -record(v2_node_number, { - instance = 0, - number = <<>> -}). + instance = 0, + number = <<>> + }). -record(v2_node_identifier, { - instance = 0, - name = <<>>, - realm = <<>> -}). + instance = 0, + name = <<>>, + realm = <<>> + }). -record(v2_presence_reporting_area_action, { - instance = 0 -}). + instance = 0 + }). -record(v2_presence_reporting_area_information, { - instance = 0 -}). + instance = 0 + }). -record(v2_twan_identifier_timestamp, { - instance = 0, - timestamp = 0 -}). + instance = 0, + timestamp = 0 + }). -record(v2_overload_control_information, { - instance = 0, - group -}). + instance = 0, + group + }). -record(v2_load_control_information, { - instance = 0, - group -}). + instance = 0, + group + }). -record(v2_metric, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(v2_sequence_number, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). -record(v2_apn_and_relative_capacity, { - instance = 0, - capacity = 0, - apn = <<>> -}). + instance = 0, + capacity = 0, + apn = <<>> + }). -record(v2_wlan_offloadability_indication, { - instance = 0, - indication = #{} -}). + instance = 0, + indication = #{} + }). -record(v2_millisecond_time_stamp, { - instance = 0, - timestamp = 0 -}). + instance = 0, + timestamp = 0 + }). -record(v2_monitoring_event_information, { - instance = 0 -}). + instance = 0 + }). -record(v2_ecgi_list, { - instance = 0, - ecgis = [] -}). + instance = 0, + ecgis = [] + }). -record(v2_remote_ue_context, { - instance = 0, - group -}). + instance = 0, + group + }). -record(v2_remote_ue_ip_information, { - instance = 0, - ip = <<>> -}). + instance = 0, + ip = <<>> + }). -record(v2_ciot_optimizations_support_indication, { - instance = 0, - indication = #{} -}). + instance = 0, + indication = #{} + }). -record(v2_scef_pdn_connection, { - instance = 0, - group -}). + instance = 0, + group + }). -record(v2_header_compression_configuration, { - instance = 0, - rohc_profiles = 0, - max_cid = 0 -}). + instance = 0, + rohc_profiles = 0, + max_cid = 0 + }). -record(v2_extended_protocol_configuration_options, { - instance = 0, - config -}). + instance = 0, + config + }). -record(v2_serving_plmn_rate_control, { - instance = 0, - uplink = 0, - downlink = 0 -}). + instance = 0, + uplink = 0, + downlink = 0 + }). -record(v2_counter, { - instance = 0, - timestamp = 0, - counter = 0 -}). + instance = 0, + timestamp = 0, + counter = 0 + }). -record(v2_mapped_ue_usage_type, { - instance = 0, - usage_type = 0 -}). + instance = 0, + usage_type = 0 + }). -record(v2_secondary_rat_usage_data_report, { - instance = 0, - irsgw = false, - irpgw = false, - rat_type = 0, - ebi = 0, - start_time = 0, - end_time = 0, - dl = 0, - ul = 0 -}). + instance = 0, + irsgw = false, + irpgw = false, + rat_type = 0, + ebi = 0, + start_time = 0, + end_time = 0, + dl = 0, + ul = 0 + }). -record(v2_up_function_selection_indication_flags, { - instance = 0, - indication = #{} -}). + instance = 0, + indication = #{} + }). -record(v2_apn_rate_control_status, { - instance = 0, - number_of_uplink_packets_allowed = 0, - number_of_additional_exception_reports = 0, - number_of_downlink_packets_allowed = 0, - apn_rate_control_status_validity_time = 0 -}). + instance = 0, + number_of_uplink_packets_allowed = 0, + number_of_additional_exception_reports = 0, + number_of_downlink_packets_allowed = 0, + apn_rate_control_status_validity_time = 0 + }). -record(v2_extended_trace_information, { - instance = 0, - plmn_id = {<<"001">>, <<"001">>}, - trace_id = 0, - triggering_events = <<>>, - list_of_ne_types = <<>>, - session_trace_depth = 0, - list_of_interfaces = <<>>, - ip_address_of_trace_collection_entity = <<>> -}). + instance = 0, + plmn_id = {<<"001">>, <<"001">>}, + trace_id = 0, + triggering_events = <<>>, + list_of_ne_types = <<>>, + session_trace_depth = 0, + list_of_interfaces = <<>>, + ip_address_of_trace_collection_entity = <<>> + }). -record(v2_additional_rrm_policy_index, { - instance = 0, - value = 0 -}). + instance = 0, + value = 0 + }). diff --git a/priv/ie_gen_v1.erl b/priv/ie_gen_v1.erl index 4653aca..c471102 100755 --- a/priv/ie_gen_v1.erl +++ b/priv/ie_gen_v1.erl @@ -10,68 +10,68 @@ ies() -> [{1, "Cause", 1, [{"Value", 8, {enum, [{0, "Request IMSI"}, - {1, "Request IMEI"}, - {2, "Request IMSI and IMEI"}, - {3, "No identity needed"}, - {4, "Request MS Refuses"}, - {5, "Request MS is not GPRS Responding"}, - {6, "Reactivation Requested"}, - {7, "PDP address inactivity timer expires"}, - {8, "Network Failure"}, - {9, "QoS parameter mismatch"}, - {59, "GTPPrime System failure"}, - {60, "GTPPrime The transmit buffers are becoming full"}, - {61, "GTPPrime The receive buffers are becoming full"}, - {62, "GTPPrime Another node is about to go down"}, - {63, "GTPPrime This node is about to go down"}, - {128, "Request accepted"}, - {129, "New PDP type due to network preference"}, - {130, "New PDP type due to single address bearer only"}, - {177, "CDR Decoding Error"}, - {192, "Non-existent"}, - {193, "Invalid message format"}, - {194, "IMSI/IMEI not known"}, - {195, "MS is GPRS Detached"}, - {196, "Reject MS is not GPRS Responding"}, - {197, "Reject MS Refuses"}, - {198, "Version not supported"}, - {199, "No resources available"}, - {200, "Service not supported"}, - {201, "Mandatory IE incorrect"}, - {202, "Mandatory IE missing"}, - {203, "Optional IE incorrect"}, - {204, "System failure"}, - {205, "Roaming restriction"}, - {206, "P-TMSI Signature mismatch"}, - {207, "GPRS connection suspended"}, - {208, "Authentication failure"}, - {209, "User authentication failed"}, - {210, "Context not found"}, - {211, "All dynamic PDP addresses are occupied"}, - {212, "No memory is available"}, - {213, "Relocation failure"}, - {214, "Unknown mandatory extension header"}, - {215, "Semantic error in the TFT operation"}, - {216, "Syntactic error in the TFT operation"}, - {217, "Semantic errors in packet filter"}, - {218, "Syntactic errors in packet filter"}, - {219, "Missing or unknown APN"}, - {220, "Unknown PDP address or PDP type"}, - {221, "PDP context without TFT already activated"}, - {222, "APN access denied no subscription"}, - {223, "APN Restriction type incompatibility with currently active PDP Contexts"}, - {224, "MS MBMS Capabilities Insufficient"}, - {225, "Invalid Correlation-ID"}, - {226, "MBMS Bearer Context Superseded"}, - {227, "Bearer Control Mode violation"}, - {228, "Collision with network initiated request"}, - {229, "APN Congestion"}, - {230, "Bearer handling not supported"}, - {231, "Target access restricted for the subscriber"}, - {252, "Request related to possibly duplicated packets already fulfilled"}, - {253, "Request already fulfilled"}, - {254, "Sequence numbers of released/cancelled packets IE incorrect"}, - {255, "Request not fulfilled"}]}} + {1, "Request IMEI"}, + {2, "Request IMSI and IMEI"}, + {3, "No identity needed"}, + {4, "Request MS Refuses"}, + {5, "Request MS is not GPRS Responding"}, + {6, "Reactivation Requested"}, + {7, "PDP address inactivity timer expires"}, + {8, "Network Failure"}, + {9, "QoS parameter mismatch"}, + {59, "GTPPrime System failure"}, + {60, "GTPPrime The transmit buffers are becoming full"}, + {61, "GTPPrime The receive buffers are becoming full"}, + {62, "GTPPrime Another node is about to go down"}, + {63, "GTPPrime This node is about to go down"}, + {128, "Request accepted"}, + {129, "New PDP type due to network preference"}, + {130, "New PDP type due to single address bearer only"}, + {177, "CDR Decoding Error"}, + {192, "Non-existent"}, + {193, "Invalid message format"}, + {194, "IMSI/IMEI not known"}, + {195, "MS is GPRS Detached"}, + {196, "Reject MS is not GPRS Responding"}, + {197, "Reject MS Refuses"}, + {198, "Version not supported"}, + {199, "No resources available"}, + {200, "Service not supported"}, + {201, "Mandatory IE incorrect"}, + {202, "Mandatory IE missing"}, + {203, "Optional IE incorrect"}, + {204, "System failure"}, + {205, "Roaming restriction"}, + {206, "P-TMSI Signature mismatch"}, + {207, "GPRS connection suspended"}, + {208, "Authentication failure"}, + {209, "User authentication failed"}, + {210, "Context not found"}, + {211, "All dynamic PDP addresses are occupied"}, + {212, "No memory is available"}, + {213, "Relocation failure"}, + {214, "Unknown mandatory extension header"}, + {215, "Semantic error in the TFT operation"}, + {216, "Syntactic error in the TFT operation"}, + {217, "Semantic errors in packet filter"}, + {218, "Syntactic errors in packet filter"}, + {219, "Missing or unknown APN"}, + {220, "Unknown PDP address or PDP type"}, + {221, "PDP context without TFT already activated"}, + {222, "APN access denied no subscription"}, + {223, "APN Restriction type incompatibility with currently active PDP Contexts"}, + {224, "MS MBMS Capabilities Insufficient"}, + {225, "Invalid Correlation-ID"}, + {226, "MBMS Bearer Context Superseded"}, + {227, "Bearer Control Mode violation"}, + {228, "Collision with network initiated request"}, + {229, "APN Congestion"}, + {230, "Bearer handling not supported"}, + {231, "Target access restricted for the subscriber"}, + {252, "Request related to possibly duplicated packets already fulfilled"}, + {253, "Request already fulfilled"}, + {254, "Sequence numbers of released/cancelled packets IE incorrect"}, + {255, "Request not fulfilled"}]}} ]}, {2, "International Mobile Subscriber Identity", 8, [{"IMSI", 64, {type, imsi}}]}, @@ -143,9 +143,9 @@ ies() -> [{"Value", 8, integer}]}, {126, "Packet Transfer Command", 1, [{"Command", 8, {enum, [{1, "Send Data Record Packet"}, - {2, "Send possibly duplicated Data Record Packet"}, - {3, "Cancel Data Record Packet"}, - {4, "Release Data Record Packet"}]}}]}, + {2, "Send possibly duplicated Data Record Packet"}, + {3, "Cancel Data Record Packet"}, + {4, "Release Data Record Packet"}]}}]}, {127, "Charging ID", 4, [{id, 4, bytes}]}, {128, "End User Address", '_', @@ -261,13 +261,13 @@ ies() -> []}, {148, "Common Flags", '_', [{"Flags", {flags, ["Dual Address Bearer Flag", - "Upgrade QoS Supported", - "NRSN", - "No QoS negotiation", - "MBMS Counting Information", - "RAN Procedures Ready", - "MBMS Service Type", - "Prohibit Payload Compression"]}}]}, + "Upgrade QoS Supported", + "NRSN", + "No QoS negotiation", + "MBMS Counting Information", + "RAN Procedures Ready", + "MBMS Service Type", + "Prohibit Payload Compression"]}}]}, {149, "APN Restriction", '_', [{"Restriction Type Value", 8, integer}]}, {150, "Radio Priority LCS", '_', @@ -336,8 +336,8 @@ ies() -> []}, {181, "MS Info Change Reporting Action", '_', [{"Action", 8, {enum, [{0, "Stop Reporting"}, - {1, "Start Reporting CGI/SAI"}, - {2, "Start Reporting RAI"}]}}]}, + {1, "Start Reporting CGI/SAI"}, + {2, "Start Reporting RAI"}]}}]}, {182, "Direct Tunnel Flags", '_', []}, {183, "Correlation-ID", '_', @@ -357,7 +357,7 @@ ies() -> {190, "Fully Qualified Domain Name", '_', [{"FQDN", 0, {type, fqdn}}]}, {191, "Evolved Allocation/Retention Priority I", '_', - [{'_', 1}, + [{'_', 1}, {"PCI", 1, integer}, {"PL", 4, integer}, {'_', 1}, @@ -366,13 +366,13 @@ ies() -> []}, {193, "Extended Common Flags", '_', [{"Flags", {flags, ["UASI", - "BDWI", - "PCRI", - "VB", - "RetLoc", - "CPSR", - "CCRSI", - "Unauthenticated IMSI"]}}]}, + "BDWI", + "PCRI", + "VB", + "RetLoc", + "CPSR", + "CCRSI", + "Unauthenticated IMSI"]}}]}, {194, "User CSG Information", '_', []}, {195, "CSG Information Reporting Action", '_', @@ -599,7 +599,7 @@ gen_encoder_bin({Value, Size}) when is_integer(Value); is_atom(Value) -> gen_encoder_bin({Name, {flags, Flags0}}) -> Flags = [s2f(Flag) || Flag <- reorder_flags(Flags0)], [io_lib:format("(encode_min_int(8, encode_flags(M_~s, ~p), little))/binary", - [s2a(Name), Flags])]; + [s2a(Name), Flags])]; gen_encoder_bin({Name, Size, {enum, _Enum}}) -> [io_lib:format("(enum_~s(M_~s)):~w/integer", [s2a(Name), s2a(Name), Size])]; gen_encoder_bin({Name, boolean}) -> @@ -635,13 +635,13 @@ s2a(Name) when is_atom(Name) -> Name; s2a(Name) -> lists:map(fun(32) -> $_; - ($/) -> $_; - ($-) -> $_; - ($.) -> $_; - ($,) -> $_; - (C) -> C - end, - string:to_lower(Name)). + ($/) -> $_; + ($-) -> $_; + ($.) -> $_; + ($,) -> $_; + (C) -> C + end, + string:to_lower(Name)). s2f(Flags) when is_list(Flags) -> list_to_atom(Flags). @@ -655,12 +655,12 @@ collect(_Fun, [], Acc) -> lists:reverse(Acc); collect(Fun, [F|Fields], Acc) -> case Fun(F) of - [] -> - collect(Fun, Fields, Acc); - {stop, L} -> - lists:reverse(append(L, Acc)); - L -> - collect(Fun, Fields, append(L, Acc)) + [] -> + collect(Fun, Fields, Acc); + {stop, L} -> + lists:reverse(append(L, Acc)); + L -> + collect(Fun, Fields, append(L, Acc)) end. collect(Fun, Fields) -> @@ -713,10 +713,10 @@ collect_late_assign([], Acc) -> {lists:reverse(Acc), []}; collect_late_assign(Fields = [H | T], Acc) -> case gen_decoder_header_match(H) of - {stop, Match} -> - {lists:reverse([Match|Acc]), Fields}; - Match -> - collect_late_assign(T, [Match|Acc]) + {stop, Match} -> + {lists:reverse([Match|Acc]), Fields}; + Match -> + collect_late_assign(T, [Match|Acc]) end. reorder_flags([]) -> []; @@ -751,15 +751,15 @@ write_record(Name, FieldDefs) -> write_record({_Id, Name, Length, []}) when is_integer(Length) -> FieldDefs = - collect( - fun gen_record_def/1, [{"Instance", 0, integer}, - {"Content", Length, bytes}], []), + collect( + fun gen_record_def/1, [{"Instance", 0, integer}, + {"Content", Length, bytes}], []), write_record(Name, FieldDefs); write_record({_Id, Name, _Length, Fields}) when is_list(Fields) -> FieldDefs = - collect( - fun gen_record_def/1, [{"Instance", 0, integer} | Fields], []), + collect( + fun gen_record_def/1, [{"Instance", 0, integer} | Fields], []), write_record(Name, FieldDefs); write_record(_) -> []. @@ -771,23 +771,23 @@ write_decoder(FunName, {Id, Name, _Length, Fields}) Body = build_late_assign(Fields), RecIdent = indent(Name, 6), RecAssign = string:join(["instance = Instance" | - collect(fun gen_decoder_record_assign/1, Fields)], [",\n", RecIdent]), + collect(fun gen_decoder_record_assign/1, Fields)], [",\n", RecIdent]), io_lib:format("~s(<<~s>>, ~w, Instance) ->~n~s #~s{~s}", - [FunName, Match, Id, Body, s2a(Name), RecAssign]); + [FunName, Match, Id, Body, s2a(Name), RecAssign]); write_decoder(FunName, {Id, _Name, Helper}) when is_atom(Helper) -> io_lib:format("~s(<>, ~w, Instance) ->~n decode_~s(Data, Instance)", - [FunName, Id, Helper]); + [FunName, Id, Helper]); write_decoder(FunName, {Id, _Name, Length, Helper}) when is_integer(Length), is_atom(Helper) -> io_lib:format("~s(<>, ~w, Instance) ->~n decode_~s(Data, Instance)", - [FunName, Id, Helper]). + [FunName, Id, Helper]). write_rec_encoder(FunName, Id, Name, RecordAssigns, FieldAssigns) -> RecIdent = indent("encode_v1_element(#", 2), RecAssign = string:join(["instance = Instance" | RecordAssigns], [",\n", RecIdent]), FunHead = io_lib:format("encode_v1_element(#~s{~n~s~s}) ->~n", - [s2a(Name), RecIdent, RecAssign]), + [s2a(Name), RecIdent, RecAssign]), DecHead = io_lib:format(" ~s(~w, Instance, ", [FunName, Id]), BinIndent = indent(DecHead, 2), BinAssign = string:join(FieldAssigns, [",\n", BinIndent]), @@ -806,15 +806,15 @@ write_encoder(FunName, {Id, Name, _Length, Fields}) write_encoder(FunName, {Id, Name, Helper}) when is_atom(Helper) -> io_lib:format("encode_v1_element(#~s{instance = Instance} = IE) ->~n ~s(~w, Instance, encode_~s(IE))", - [s2a(Name), FunName, Id, Helper]); + [s2a(Name), FunName, Id, Helper]); write_encoder(FunName, {Id, Name, Length, Helper}) when is_integer(Length), is_atom(Helper) -> io_lib:format("encode_v1_element(#~s{instance = Instance} = IE) ->~n ~s(~w, Instance, encode_~s(IE))", - [s2a(Name), FunName, Id, Helper]). + [s2a(Name), FunName, Id, Helper]). main(_) -> MsgDescription = string:join([io_lib:format("msg_description(~s) -> <<\"~s\">>", [s2a(X), X]) || {_, X} <- msgs()] - ++ ["msg_description(X) -> io_lib:format(\"~p\", [X])"], ";\n") ++ ".\n", + ++ ["msg_description(X) -> io_lib:format(\"~p\", [X])"], ";\n") ++ ".\n", {FwdFuns, RevFuns} = gen_message_type(msgs(), {[], []}), ErrorFun = ["message_type_v1(Type) -> error(badarg, [Type])"], @@ -822,7 +822,7 @@ main(_) -> Records = string:join([write_record(X) || X <- ies()], "\n"), ExpRecs = io_lib:format("-define(GTP_V1_RECORDS, ~p).~n", - [[list_to_atom(s2a(element(2, ExpRec))) || ExpRec <- ies()]]), + [[list_to_atom(s2a(element(2, ExpRec))) || ExpRec <- ies()]]), HrlRecs = io_lib:format("~n~n~s~n~s~n", [ExpRecs, Records]), Enums = write_enums(ies()), @@ -831,27 +831,27 @@ main(_) -> Funs = string:join([write_decoder("decode_v1_element", X) || X <- ies()] ++ [CatchAnyDecoder], ";\n\n"), MainDecodeSwitch = ["decode_v1(<<>>, _PrevId, _PrevInst, IEs) ->\n IEs;\n", - [io_lib:format("decode_v1(<<~w, Data:~w/bytes, Next/binary>>, PrevId, PrevInst, IEs) ->~n" - " Instance = v1_instance(~w, PrevId, PrevInst),~n" - " IE = decode_v1_element(Data, ~w, Instance),~n" - " decode_v1(Next, ~w, Instance, put_ie(IE, IEs));~n", [Id, Length, Id, Id, Id]) || {Id, _, Length, _} <- ies(), Id < 128], - "decode_v1(<>, PrevId, PrevInst, IEs) when Id > 127 ->\n" - " <> = Rest,\n" - " Instance = v1_instance(Id, PrevId, PrevInst),\n" - " IE = decode_v1_element(Data, Id, Instance),\n" - " decode_v1(Next, Id, Instance, put_ie(IE, IEs));\n" - "decode_v1(<>, PrevId, PrevInst, IEs) ->\n" - " Instance = v1_instance(Id, PrevId, PrevInst),\n" - " IE = {Id, Instance, Rest},\n" - " decode_v1(<<>>, Id, Instance, put_ie(IE, IEs)).\n"], + [io_lib:format("decode_v1(<<~w, Data:~w/bytes, Next/binary>>, PrevId, PrevInst, IEs) ->~n" + " Instance = v1_instance(~w, PrevId, PrevInst),~n" + " IE = decode_v1_element(Data, ~w, Instance),~n" + " decode_v1(Next, ~w, Instance, put_ie(IE, IEs));~n", [Id, Length, Id, Id, Id]) || {Id, _, Length, _} <- ies(), Id < 128], + "decode_v1(<>, PrevId, PrevInst, IEs) when Id > 127 ->\n" + " <> = Rest,\n" + " Instance = v1_instance(Id, PrevId, PrevInst),\n" + " IE = decode_v1_element(Data, Id, Instance),\n" + " decode_v1(Next, Id, Instance, put_ie(IE, IEs));\n" + "decode_v1(<>, PrevId, PrevInst, IEs) ->\n" + " Instance = v1_instance(Id, PrevId, PrevInst),\n" + " IE = {Id, Instance, Rest},\n" + " decode_v1(<<>>, Id, Instance, put_ie(IE, IEs)).\n"], CatchAnyEncoder = "encode_v1_element({Tag, Instance, Value}) when is_integer(Tag), is_integer(Instance), is_binary(Value) ->\n encode_v1_element(Tag, Instance, Value)", EncFuns = string:join([write_encoder("encode_v1_element", X) || X <- ies()] - ++ [CatchAnyEncoder] , ";\n\n"), + ++ [CatchAnyEncoder] , ";\n\n"), ErlDecls = io_lib:format("~n~n~s~n~s~n~s~n~s.~n~n~s~n~n~s.~n~n", - [MsgDescription, MTypes, Enums, Funs, - MainDecodeSwitch, EncFuns]), + [MsgDescription, MTypes, Enums, Funs, + MainDecodeSwitch, EncFuns]), {ok, HrlF0} = file:read_file("include/gtp_packet.hrl"), [HrlHead, _, HrlV2] = binary:split(HrlF0, [?V1_TAG, ?V2_TAG], [global]), diff --git a/priv/ie_gen_v2.erl b/priv/ie_gen_v2.erl index 91b6730..e67aaf2 100755 --- a/priv/ie_gen_v2.erl +++ b/priv/ie_gen_v2.erl @@ -13,85 +13,85 @@ raw_ies() -> [{"IMSI", 0, {type, tbcd}}]}, {2, "v2 Cause", 5, [{"v2 Cause", 8, {enum, [{1, "Reserved"}, - {2, "Local Detach"}, - {3, "Complete Detach"}, - {4, "RAT changed from 3GPP to Non-3GPP"}, - {5, "ISR deactivation"}, - {6, "Error Indication received from RNC/eNodeB/S4-SGSN"}, - {7, "IMSI Detach Only"}, - {8, "Reactivation Requested"}, - {9, "PDN reconnection to this APN disallowed"}, - {10, "Access changed from Non-3GPP to 3GPP"}, - {11, "PDN connection inactivity timer expires"}, - {12, "PGW not responding"}, - {13, "Network Failure"}, - {14, "QoS parameter mismatch"}, - {16, "Request accepted"}, - {17, "Request accepted partially"}, - {18, "New PDN type due to network preference"}, - {19, "New PDN type due to single address bearer only"}, - {64, "Context Not Found"}, - {65, "Invalid Message Format"}, - {66, "Version not supported by next peer"}, - {67, "Invalid length"}, - {68, "Service not supported"}, - {69, "Mandatory IE incorrect"}, - {70, "Mandatory IE missing"}, - {72, "System failure"}, - {73, "No resources available"}, - {74, "Semantic error in the TFT operation"}, - {75, "Syntactic error in the TFT operation"}, - {76, "Semantic errors in packet filter"}, - {77, "Syntactic errors in packet filter"}, - {78, "Missing or unknown APN"}, - {80, "GRE key not found"}, - {81, "Relocation failure"}, - {82, "Denied in RAT"}, - {83, "Preferred PDN type not supported"}, - {84, "All dynamic addresses are occupied"}, - {85, "UE context without TFT already activated"}, - {86, "Protocol type not supported"}, - {87, "UE not responding"}, - {88, "UE refuses"}, - {89, "Service denied"}, - {90, "Unable to page UE"}, - {91, "No memory available"}, - {92, "User authentication failed"}, - {93, "APN access denied - no subscription"}, - {94, "Request rejected"}, - {95, "P-TMSI Signature mismatch"}, - {96, "IMSI/IMEI not known"}, - {97, "Semantic error in the TAD operation"}, - {98, "Syntactic error in the TAD operation"}, - {100, "Remote peer not responding"}, - {101, "Collision with network initiated request"}, - {102, "Unable to page UE due to Suspension"}, - {103, "Conditional IE missing"}, - {104, "APN Restriction type Incompatible with currently active PDN connection"}, - {105, "Invalid overall length of the triggered response message and a piggybacked initial message"}, - {106, "Data forwarding not supported"}, - {107, "Invalid reply from remote peer"}, - {108, "Fallback to GTPv1"}, - {109, "Invalid peer"}, - {110, "Temporarily rejected due to handover/TAU/RAU procedure in progress"}, - {111, "Modifications not limited to S1-U bearers"}, - {112, "Request rejected for a PMIPv6 reason"}, - {113, "APN Congestion"}, - {114, "Bearer handling not supported"}, - {115, "UE already re-attached"}, - {116, "Multiple PDN connections for a given APN not allowed"}, - {117, "Target access restricted for the subscriber"}, - {119, "MME/SGSN refuses due to VPLMN Policy"}, - {120, "GTP-C Entity Congestion"}, - {121, "Late Overlapping Request"}, - {122, "Timed out Request"}, - {123, "UE is temporarily not reachable due to power saving"}, - {124, "Relocation failure due to NAS message redirection"}, - {125, "UE not authorised by OCS or external AAA Server"}, - {126, "Multiple accesses to a PDN connection not allowed"}, - {127, "Request rejected due to UE capability"}, - {128, "S1-U Path Failure"}, - {129, "5GC not allowed"}]}}, + {2, "Local Detach"}, + {3, "Complete Detach"}, + {4, "RAT changed from 3GPP to Non-3GPP"}, + {5, "ISR deactivation"}, + {6, "Error Indication received from RNC/eNodeB/S4-SGSN"}, + {7, "IMSI Detach Only"}, + {8, "Reactivation Requested"}, + {9, "PDN reconnection to this APN disallowed"}, + {10, "Access changed from Non-3GPP to 3GPP"}, + {11, "PDN connection inactivity timer expires"}, + {12, "PGW not responding"}, + {13, "Network Failure"}, + {14, "QoS parameter mismatch"}, + {16, "Request accepted"}, + {17, "Request accepted partially"}, + {18, "New PDN type due to network preference"}, + {19, "New PDN type due to single address bearer only"}, + {64, "Context Not Found"}, + {65, "Invalid Message Format"}, + {66, "Version not supported by next peer"}, + {67, "Invalid length"}, + {68, "Service not supported"}, + {69, "Mandatory IE incorrect"}, + {70, "Mandatory IE missing"}, + {72, "System failure"}, + {73, "No resources available"}, + {74, "Semantic error in the TFT operation"}, + {75, "Syntactic error in the TFT operation"}, + {76, "Semantic errors in packet filter"}, + {77, "Syntactic errors in packet filter"}, + {78, "Missing or unknown APN"}, + {80, "GRE key not found"}, + {81, "Relocation failure"}, + {82, "Denied in RAT"}, + {83, "Preferred PDN type not supported"}, + {84, "All dynamic addresses are occupied"}, + {85, "UE context without TFT already activated"}, + {86, "Protocol type not supported"}, + {87, "UE not responding"}, + {88, "UE refuses"}, + {89, "Service denied"}, + {90, "Unable to page UE"}, + {91, "No memory available"}, + {92, "User authentication failed"}, + {93, "APN access denied - no subscription"}, + {94, "Request rejected"}, + {95, "P-TMSI Signature mismatch"}, + {96, "IMSI/IMEI not known"}, + {97, "Semantic error in the TAD operation"}, + {98, "Syntactic error in the TAD operation"}, + {100, "Remote peer not responding"}, + {101, "Collision with network initiated request"}, + {102, "Unable to page UE due to Suspension"}, + {103, "Conditional IE missing"}, + {104, "APN Restriction type Incompatible with currently active PDN connection"}, + {105, "Invalid overall length of the triggered response message and a piggybacked initial message"}, + {106, "Data forwarding not supported"}, + {107, "Invalid reply from remote peer"}, + {108, "Fallback to GTPv1"}, + {109, "Invalid peer"}, + {110, "Temporarily rejected due to handover/TAU/RAU procedure in progress"}, + {111, "Modifications not limited to S1-U bearers"}, + {112, "Request rejected for a PMIPv6 reason"}, + {113, "APN Congestion"}, + {114, "Bearer handling not supported"}, + {115, "UE already re-attached"}, + {116, "Multiple PDN connections for a given APN not allowed"}, + {117, "Target access restricted for the subscriber"}, + {119, "MME/SGSN refuses due to VPLMN Policy"}, + {120, "GTP-C Entity Congestion"}, + {121, "Late Overlapping Request"}, + {122, "Timed out Request"}, + {123, "UE is temporarily not reachable due to power saving"}, + {124, "Relocation failure due to NAS message redirection"}, + {125, "UE not authorised by OCS or external AAA Server"}, + {126, "Multiple accesses to a PDN connection not allowed"}, + {127, "Request rejected due to UE capability"}, + {128, "S1-U Path Failure"}, + {129, "5GC not allowed"}]}}, {'_', 5}, {"PCE", 1, integer}, {"BCE", 1, integer}, @@ -119,24 +119,24 @@ raw_ies() -> [{"MSISDN", 0, {type, tbcd}}]}, {77, "v2 Indication", [{"Flags", 16, - {flags, ['DAF', 'DTF', 'HI', 'DFI', 'OI', 'ISRSI', 'ISRAI', 'SGWCI', - 'SQCI', 'UIMSI', 'CFSI', 'CRSI', 'P', 'PT', 'SI', 'MSV', - 'RetLoc', 'PBIC', 'SRNI', 'S6AF', 'S4AF', 'MBMDT', 'ISRAU', 'CCRSI', - 'CPRAI', 'ARRL', 'PPOF', 'PPON/PPEI', 'PPSI', 'CSFBI', 'CLII', 'CPSR', - 'NSI', 'UASI', 'DTCI', 'BDWI', 'PSCI', 'PCRI', 'AOSI', 'AOPI', - 'ROAAI', 'EPCOSI', 'CPOPCI', 'PMTSMI', 'S11TF', 'PNSI', 'UNACCSI', 'WPMSI', - '5GSNN26', 'REPREFI', '5GSIWK', 'EEVRSI', 'LTEMUI', 'LTEMPI', 'ENBCRSI', 'TSPCMI', - 'CSRMFI', 'MTEDTN', 'MTEDTA', 'N5GNMI', '5GCNRS', '5GCNRI', '5SRHOI', 'ETHPDN', - '_', '_', '_', '_', 'SISSME', 'NSENBI', 'IPFUPF', 'EMCI']}}]}, + {flags, ['DAF', 'DTF', 'HI', 'DFI', 'OI', 'ISRSI', 'ISRAI', 'SGWCI', + 'SQCI', 'UIMSI', 'CFSI', 'CRSI', 'P', 'PT', 'SI', 'MSV', + 'RetLoc', 'PBIC', 'SRNI', 'S6AF', 'S4AF', 'MBMDT', 'ISRAU', 'CCRSI', + 'CPRAI', 'ARRL', 'PPOF', 'PPON/PPEI', 'PPSI', 'CSFBI', 'CLII', 'CPSR', + 'NSI', 'UASI', 'DTCI', 'BDWI', 'PSCI', 'PCRI', 'AOSI', 'AOPI', + 'ROAAI', 'EPCOSI', 'CPOPCI', 'PMTSMI', 'S11TF', 'PNSI', 'UNACCSI', 'WPMSI', + '5GSNN26', 'REPREFI', '5GSIWK', 'EEVRSI', 'LTEMUI', 'LTEMPI', 'ENBCRSI', 'TSPCMI', + 'CSRMFI', 'MTEDTN', 'MTEDTA', 'N5GNMI', '5GCNRS', '5GCNRI', '5SRHOI', 'ETHPDN', + '_', '_', '_', '_', 'SISSME', 'NSENBI', 'IPFUPF', 'EMCI']}}]}, {78, "v2 Protocol Configuration Options", [{"Config", protocol_config_opts}]}, {79, "v2 PDN Address Allocation", [{'_', 5}, {"Type", 3, {enum, [{1, "IPv4"}, - {2, "IPv6"}, - {3, "IPv4v6"}, - {4, "Non-IP"}, - {5, "Ethernet"}]}}, + {2, "IPv6"}, + {3, "IPv4v6"}, + {4, "Non-IP"}, + {5, "Ethernet"}]}}, {"Address", 0, binary}]}, {80, "v2 Bearer Level Quality of Service", [{'_', 1}, @@ -205,9 +205,9 @@ raw_ies() -> {99, "v2 PDN Type", [{'_', 4}, {"PDN Type", 4, {enum, [{1, "IPv4"}, - {2, "IPv6"}, - {3, "IPv4v6"}, - {4, "Non-IP"}]}}, + {2, "IPv6"}, + {3, "IPv4v6"}, + {4, "Non-IP"}]}}, {'_', 0}]}, {100, "v2 Procedure Transaction ID", [{"PTI", 8, integer}, @@ -296,15 +296,15 @@ raw_ies() -> {"Source Id", 0, binary}]}, {131, "v2 Change Reporting Action", [{"Action", 8, {enum, [{0, "Stop Reporting"}, - {1, "Start Reporting CGI/SAI"}, - {2, "Start Reporting RAI"}, - {3, "Start Reporting TAI"}, - {4, "Start Reporting ECGI"}, - {5, "Start Reporting CGI/SAI and RAI"}, - {6, "Start Reporting TAI and ECGI"}, - {7, "Start Reporting Macro eNodeB ID and Extended Macro eNodeB ID"}, - {8, "Start Reporting TAI, Macro eNodeB ID and Extended Macro eNodeB ID"} - ]}}, + {1, "Start Reporting CGI/SAI"}, + {2, "Start Reporting RAI"}, + {3, "Start Reporting TAI"}, + {4, "Start Reporting ECGI"}, + {5, "Start Reporting CGI/SAI and RAI"}, + {6, "Start Reporting TAI and ECGI"}, + {7, "Start Reporting Macro eNodeB ID and Extended Macro eNodeB ID"}, + {8, "Start Reporting TAI, Macro eNodeB ID and Extended Macro eNodeB ID"} + ]}}, {'_', 0}]}, {132, "v2 Fully Qualified PDN Connection Set Identifier", v2_fully_qualified_pdn_connection_set_identifier}, @@ -406,9 +406,9 @@ raw_ies() -> {"Type", 4, integer}, {"Cause", 0, binary}]}, {173, "v2 CN Operator Selection Entity", - [{'_', 6}, - {"Entity", 2, integer}, - {'_', 0}]}, + [{'_', 6}, + {"Entity", 2, integer}, + {'_', 0}]}, {174, "v2 Trusted WLAN Mode Indication", [{"Indication", 0, {flags, ['_', '_', '_', '_', '_', '_', 'MCM', 'SCM']}}]}, {175, "v2 Node Number", @@ -443,7 +443,7 @@ raw_ies() -> [{"Timestamp", 48, integer}, {'_', 0}]}, {189, "v2 Monitoring Event Information", []}, % WTF: flags encoded in the spare bits - % of the Instance field + % of the Instance field {190, "v2 ECGI List", [{"ECGIs", 16, {array, {7, bytes}}}, {'_', 0}]}, @@ -592,16 +592,16 @@ msgs() -> -type enum() :: any(). -type array_def() :: any(). -type field_type() :: - {flags, [flag()]} | - {enum, [enum()]} | - boolean | - integer | - bits | - bytes | - binary | - length_binary | - {array, array_def()} | - tuple(). + {flags, [flag()]} | + {enum, [enum()]} | + boolean | + integer | + bits | + bytes | + binary | + length_binary | + {array, array_def()} | + tuple(). -record(ie, {id, name, type, min_field_count, fields}). -record(field, {name, len, optional, type, spec}). @@ -613,34 +613,34 @@ msgs() -> ies() -> TypeFF = fun(Type, F) when is_atom(Type) -> F#field{type = Type}; - ({type, Type}, F) when is_atom(Type) -> F#field{type = helper, spec = Type}; - ({array, Size}, F) when is_integer(Size) -> F#field{type = array, spec = {1, byte}}; - ({Type, Spec}, F) when is_atom(Type) -> F#field{type = Type, spec = Spec} - end, + ({type, Type}, F) when is_atom(Type) -> F#field{type = helper, spec = Type}; + ({array, Size}, F) when is_integer(Size) -> F#field{type = array, spec = {1, byte}}; + ({Type, Spec}, F) when is_atom(Type) -> F#field{type = Type, spec = Spec} + end, FieldF = fun({Name, Len, Type}, Optional, F) when is_integer(Len) -> - [TypeFF(Type, #field{name = s2a(Name), len = Len, - optional = Optional}) | F]; - ({Name, Type}, Optional, F) when is_list(Name), is_atom(Type) -> - [#field{name = s2a(Name), len = 0, optional = Optional, - type = helper, spec = Type} | F]; - ({'_', Len}, Optional, F) when is_integer(Len) -> - [#field{len = Len, optional = Optional, type = '_'} | F] - end, + [TypeFF(Type, #field{name = s2a(Name), len = Len, + optional = Optional}) | F]; + ({Name, Type}, Optional, F) when is_list(Name), is_atom(Type) -> + [#field{name = s2a(Name), len = 0, optional = Optional, + type = helper, spec = Type} | F]; + ({'_', Len}, Optional, F) when is_integer(Len) -> + [#field{len = Len, optional = Optional, type = '_'} | F] + end, SpecF = fun(Fields, #ie{min_field_count = MinLen} = IE) when is_list(Fields) -> - {FieldDef, _} = - lists:foldl( - fun(Field, {F, Cnt}) -> - {FieldF(Field, Cnt >= MinLen, F), Cnt + 1} end, - {[], 0}, Fields), - IE#ie{fields = lists:reverse(FieldDef)}; - (Helper, IE) when is_atom(Helper) -> - IE#ie{type = Helper} - end, + {FieldDef, _} = + lists:foldl( + fun(Field, {F, Cnt}) -> + {FieldF(Field, Cnt >= MinLen, F), Cnt + 1} end, + {[], 0}, Fields), + IE#ie{fields = lists:reverse(FieldDef)}; + (Helper, IE) when is_atom(Helper) -> + IE#ie{type = Helper} + end, lists:map( fun ({Id, Name, Spec}) -> - SpecF(Spec, #ie{id = Id, name = s2a(Name)}); - ({Id, Name, MinLen, Spec}) -> - SpecF(Spec, #ie{id = Id, name = s2a(Name), min_field_count = MinLen}) + SpecF(Spec, #ie{id = Id, name = s2a(Name)}); + ({Id, Name, MinLen, Spec}) -> + SpecF(Spec, #ie{id = Id, name = s2a(Name), min_field_count = MinLen}) end, raw_ies()). %% gen_record_def({Value, _}) when is_integer(Value); is_atom(Value) -> @@ -714,7 +714,7 @@ gen_decoder_record_assign(#field{name = Name, spec = mccmnc}) -> [io_lib:format("plmn_id = {decode_mcc(M_~s), decode_mnc(M_~s)}", [Name, Name])]; gen_decoder_record_assign(#field{name = Name, type = flags, spec = Flags}) -> [io_lib:format("~s = decode_flags(M_~s, ~p)", - [Name, Name, Flags])]; + [Name, Name, Flags])]; gen_decoder_record_assign(#field{name = Name, type = enum}) -> [io_lib:format("~s = enum_v2_~s(M_~s)", [Name, Name, Name])]; @@ -754,12 +754,12 @@ gen_encoder_bin(#field{spec = mccmnc}) -> ["(encode_mccmnc(M_mcc, M_mnc))/binary"]; gen_encoder_bin(#field{name = Name, len = MinSize, type = flags, spec = Flags}) -> [io_lib:format("(encode_min_int(~p, encode_flags(M_~s, ~p), little))/binary", - [MinSize, Name, reorder_flags(Flags)])]; + [MinSize, Name, reorder_flags(Flags)])]; gen_encoder_bin(#field{name = Name, len = Size, type = enum}) -> [io_lib:format("(enum_v2_~s(M_~s)):~w/integer", [Name, Name, Size])]; gen_encoder_bin(#field{name = Name, len = Len, type = array, spec = {Size, Type}}) -> [io_lib:format("(length(M_~s)):~w/integer, (<< <> || X <- M_~s>>)/binary", - [Name, Len, Size, Type, Name])]; + [Name, Len, Size, Type, Name])]; gen_encoder_bin(#field{name = Name, len = Len, type = array}) -> [io_lib:format("(length(M_~s)):~w/integer, (<< <> || X <- M_~s>>)/binary", [Name, Len, Name])]; gen_encoder_bin(#field{name = Name, len = 0, type = helper, spec = TypeName}) -> @@ -789,13 +789,13 @@ s2a(Name) when is_atom(Name) -> Name; s2a(Name) -> S = lists:map(fun(32) -> $_; - ($/) -> $_; - ($-) -> $_; - ($.) -> $_; - ($,) -> $_; - (C) -> C - end, - string:to_lower(Name)), + ($/) -> $_; + ($-) -> $_; + ($.) -> $_; + ($,) -> $_; + (C) -> C + end, + string:to_lower(Name)), list_to_atom(S). to_string(S) when is_list(S) -> S; @@ -811,12 +811,12 @@ collect(_Fun, [], Acc) -> lists:reverse(Acc); collect(Fun, [F|Fields], Acc) -> case Fun(F) of - [] -> - collect(Fun, Fields, Acc); - {stop, L} -> - lists:reverse(append(L, Acc)); - L -> - collect(Fun, Fields, append(L, Acc)) + [] -> + collect(Fun, Fields, Acc); + {stop, L} -> + lists:reverse(append(L, Acc)); + L -> + collect(Fun, Fields, append(L, Acc)) end. collect(Fun, Fields) -> @@ -878,10 +878,10 @@ collect_late_assign([], Acc) -> {lists:reverse(Acc), []}; collect_late_assign(Fields = [H | T], Acc) -> case gen_decoder_header_match(H) of - {stop, Match} -> - {lists:reverse([Match|Acc]), Fields}; - Match -> - collect_late_assign(T, [Match|Acc]) + {stop, Match} -> + {lists:reverse([Match|Acc]), Fields}; + Match -> + collect_late_assign(T, [Match|Acc]) end. @@ -915,12 +915,12 @@ write_decoder(#ie{min_field_count = Min, fields = Fields} = IE, Fns) SubIE = IE#ie{min_field_count = undefined}, lists:foldl( fun (Len, FnsSub) -> - {H,T} = lists:split(Len, Fields), - case T of - [] -> FnsSub; - _ -> - write_decoder(SubIE#ie{fields = H ++ [?WildCard]}, FnsSub) - end + {H,T} = lists:split(Len, Fields), + case T of + [] -> FnsSub; + _ -> + write_decoder(SubIE#ie{fields = H ++ [?WildCard]}, FnsSub) + end end, Fns, lists:seq(Min, length(Fields))); write_decoder(#ie{id = Id, type = undefined, name = Name, fields = Fields}, Fns) -> @@ -929,14 +929,14 @@ write_decoder(#ie{id = Id, type = undefined, name = Name, fields = Fields}, Fns) Body = build_late_assign(Fields), RecIdent = indent(Name, 6), RecAssign = string:join(["instance = Instance" | - collect(fun gen_decoder_record_assign/1, Fields)], [",\n", RecIdent]), + collect(fun gen_decoder_record_assign/1, Fields)], [",\n", RecIdent]), F = io_lib:format("~s(<<~s>>, ~w, Instance) ->~n~s #~s{~s}", - [?DecoderFunName, Match, Id, Body, Name, RecAssign]), + [?DecoderFunName, Match, Id, Body, Name, RecAssign]), [F | Fns]; write_decoder(#ie{id = Id, type = Helper}, Fns) -> F = io_lib:format("~s(<>, ~w, Instance) ->~n decode_~s(Data, Instance)", - [?DecoderFunName, Id, Helper]), + [?DecoderFunName, Id, Helper]), [F | Fns]. write_encoder(#ie{min_field_count = Min, fields = Fields} = IE, Fns) @@ -944,20 +944,20 @@ write_encoder(#ie{min_field_count = Min, fields = Fields} = IE, Fns) SubIE = IE#ie{min_field_count = undefined}, lists:foldl( fun (Len, FnsSub) -> - {H,T} = lists:split(Len, Fields), - case T of - [] -> - write_encoder(SubIE#ie{fields = H}, FnsSub); - [#field{type = '_'}|_] -> FnsSub; - [M|_] -> - write_encoder(SubIE#ie{fields = H ++ [M#field{type = undefined}]}, FnsSub) - end + {H,T} = lists:split(Len, Fields), + case T of + [] -> + write_encoder(SubIE#ie{fields = H}, FnsSub); + [#field{type = '_'}|_] -> FnsSub; + [M|_] -> + write_encoder(SubIE#ie{fields = H ++ [M#field{type = undefined}]}, FnsSub) + end end, Fns, lists:seq(length(Fields), Min, -1)); write_encoder(#ie{id = Id, name = Name, type = undefined, fields = Fields}, Fns) -> RecIdent = indent("encode_v2_element(#", 2), RecAssign = string:join(["instance = Instance" | - collect(fun gen_encoder_record_assign/1, Fields)], [",\n", RecIdent]), + collect(fun gen_encoder_record_assign/1, Fields)], [",\n", RecIdent]), FunHead = io_lib:format("encode_v2_element(#~s{~n~s~s}) ->~n", [Name, RecIdent, RecAssign]), DecHead = io_lib:format(" ~s(~w, Instance, ", [?EncoderFunName, Id]), BinIndent = indent(DecHead, 2), @@ -966,14 +966,14 @@ write_encoder(#ie{id = Id, name = Name, type = undefined, fields = Fields}, Fns) [F | Fns]; write_encoder(#ie{id = Id, name = Name, type = Helper}, Fns) -> F = io_lib:format("encode_v2_element(#~s{instance = Instance} = IE) ->~n ~s(~w, Instance, encode_~s(IE))", - [Name, ?EncoderFunName, Id, Helper]), + [Name, ?EncoderFunName, Id, Helper]), [F | Fns]. main(_) -> IEs = ies(), MsgDescription = string:join([io_lib:format("msg_description_v2(~s) -> <<\"~s\">>", [s2a(X), X]) || {_, X} <- msgs()] - ++ ["msg_description_v2(X) -> io_lib:format(\"~p\", [X])"], ";\n") ++ ".\n", + ++ ["msg_description_v2(X) -> io_lib:format(\"~p\", [X])"], ";\n") ++ ".\n", {FwdFuns, RevFuns} = gen_message_type(msgs(), {[], []}), ErrorFun = ["message_type_v2(Type) -> error(badarg, [Type])"], @@ -981,7 +981,7 @@ main(_) -> Records = string:join([write_record(X) || X <- IEs], "\n"), ExpRecs = io_lib:format("-define(GTP_V2_RECORDS, ~p).~n", - [[ExpRecName || #ie{name = ExpRecName} <- IEs]]), + [[ExpRecName || #ie{name = ExpRecName} <- IEs]]), HrlRecs = io_lib:format("~n~n~s~n~s", [ExpRecs, Records]), Enums = write_enums(IEs), @@ -995,8 +995,8 @@ main(_) -> EncFuns = string:join(EncoderFns, ";\n\n"), ErlDecls = io_lib:format("~n~n~s~n~s~n~s~n~s.~n~n~s.~n", - [MsgDescription, MTypes, Enums, Funs, - EncFuns]), + [MsgDescription, MTypes, Enums, Funs, + EncFuns]), {ok, HrlF0} = file:read_file("include/gtp_packet.hrl"), [HrlHead, HrlV1, _] = binary:split(HrlF0, [?V1_TAG, ?V2_TAG], [global]), diff --git a/rebar.config b/rebar.config index addfda6..e74a429 100644 --- a/rebar.config +++ b/rebar.config @@ -1,42 +1,42 @@ -%-*-Erlang-*- +%%-*-Erlang-*- {erl_opts, [debug_info]}. {edoc_opts, [{preprocess, true}]}. {deps, [ - {cut, "1.0.3"}, - {ppplib, "1.0.0"}, - {parse_trans, {git, "https://github.com/uwiger/parse_trans.git", {branch, "master"}}} -]}. + {cut, "1.0.3"}, + {ppplib, "1.0.0"}, + {parse_trans, {git, "https://github.com/uwiger/parse_trans.git", {branch, "master"}}} + ]}. {minimum_otp_vsn, "24.3"}. -{plugins, [rebar3_hex]}. +{plugins, [rebar3_hex, rebar3_fmt]}. {profiles, [ - {test, - [{deps, - [{proper, {git, "https://github.com/proper-testing/proper.git", - {branch, "master"}}}]}, - {plugins, [{coveralls, {git, "https://github.com/RoadRunnr/coveralls-erl.git", {branch, "feature/git-info"}}}]} - ]}, - {pcap, - [{deps, - [{flower, {git, "git://github.com/travelping/flower.git", - {branch, "master"}}}, - {gen_socket, {git, "git://github.com/travelping/gen_socket.git", - {branch, "master"}}}, - {pcapng, {git, "git://github.com/travelping/pcapng.git", - {branch, "master"}}}, - {proper, {git, "https://github.com/proper-testing/proper.git", - {branch, "master"}}} - ]} - ]} - ]}. + {test, + [{deps, + [{proper, {git, "https://github.com/proper-testing/proper.git", + {branch, "master"}}}]}, + {plugins, [{coveralls, {git, "https://github.com/RoadRunnr/coveralls-erl.git", {branch, "feature/git-info"}}}]} + ]}, + {pcap, + [{deps, + [{flower, {git, "git://github.com/travelping/flower.git", + {branch, "master"}}}, + {gen_socket, {git, "git://github.com/travelping/gen_socket.git", + {branch, "master"}}}, + {pcapng, {git, "git://github.com/travelping/pcapng.git", + {branch, "master"}}}, + {proper, {git, "https://github.com/proper-testing/proper.git", + {branch, "master"}}} + ]} + ]} + ]}. %% xref checks to run {xref_checks, [undefined_function_calls, undefined_functions, - locals_not_used, deprecated_function_calls, - deprecated_funcqtions]}. + locals_not_used, deprecated_function_calls, + deprecated_functions]}. %% == Cover == %% Whether to enable coverage reporting. Default is `false' diff --git a/rebar.config.script b/rebar.config.script index ef18811..6cd04b4 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -6,7 +6,7 @@ case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of {coveralls_commit_sha, os:getenv("GITHUB_SHA")}, {coveralls_flag_name, os:getenv("COVERALLS_FLAG_NAME")} | CONFIG], case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request" - andalso string:tokens(os:getenv("GITHUB_REF"), "/") of + andalso string:tokens(os:getenv("GITHUB_REF"), "/") of [_, "pull", PRNO, _] -> [{coveralls_service_pull_request, PRNO} | CONFIG1]; _ -> diff --git a/src/gtp_packet.erl b/src/gtp_packet.erl index b90cdbe..0f8d155 100644 --- a/src/gtp_packet.erl +++ b/src/gtp_packet.erl @@ -11,16 +11,16 @@ -module(gtp_packet). -export([encode/1, encode_ies/1, - decode/1, decode/2, decode_ies/1, decode_ies/2, - msg_description/1, msg_description_v2/1, - pretty_print/1, ies_to_otel_attrs/1]). + decode/1, decode/2, decode_ies/1, decode_ies/2, + msg_description/1, msg_description_v2/1, + pretty_print/1, ies_to_otel_attrs/1]). -export([encode_plmn_id/1]). -export([decode_v2_user_location_information/2, decode_v1_rai/2]). -export([encode_v2_user_location_information/1, encode_v1_rai/1]). -compile([{parse_transform, cut}]). -compile({inline,[decode_tbcd/1, decode_fqdn/1, - decode_v2_grouped/1]}). + decode_v2_grouped/1]}). -include_lib("parse_trans/include/exprecs.hrl"). -include("gtp_packet.hrl"). @@ -70,7 +70,7 @@ decode_ies(Msg, _) -> encode(#gtp{version = v1, type = Type, tei = TEI, seq_no = SeqNo, - n_pdu = NPDU, ext_hdr = ExtHdr, ie = IEs}) -> + n_pdu = NPDU, ext_hdr = ExtHdr, ie = IEs}) -> Flags = encode_gtp_v1_hdr_flags(SeqNo, NPDU, ExtHdr), HdrOpt = encode_gtp_v1_opt_hdr(SeqNo, NPDU, ExtHdr), Data = encode_v1(Type, IEs), @@ -110,13 +110,13 @@ pretty_print(Record) -> pretty_print(Record, N) -> try '#info-'(Record, size) of - X when X - 1 =:= N -> - '#info-'(Record, fields); - _Other -> - no + X when X - 1 =:= N -> + '#info-'(Record, fields); + _Other -> + no catch - _:_ -> - no + _:_ -> + no end. ies_to_otel_attrs(#gtp{ie = IEs}) -> @@ -134,10 +134,10 @@ ies_to_otel_attr(Base0, V, OutP) when is_tuple(V) -> [Record, Instance | Fields] = tuple_to_list(V), Base = [Base0, $., atom_to_binary(Record, latin1), $., integer_to_binary(Instance)], case '#info-'(Record, fields) of - [_InstanceName, group] -> - ies_to_otel_attrs(Base, hd(Fields), OutP); - [_InstanceName|FNames] -> - ies_to_otel_attr(Base, FNames, Fields, OutP) + [_InstanceName, group] -> + ies_to_otel_attrs(Base, hd(Fields), OutP); + [_InstanceName|FNames] -> + ies_to_otel_attr(Base, FNames, Fields, OutP) end; ies_to_otel_attr(Base0, V, OutP) when is_list(V) -> lists:foldl( @@ -147,8 +147,8 @@ ies_to_otel_attr(_Base, [], [], OutP) -> OutP; ies_to_otel_attr(Base, [FName|FNames], [Field|Fields], OutP) -> ies_to_otel_attr(Base, FNames, Fields, - [{iolist_to_binary([Base, $., atom_to_binary(FName, latin1)]), - iolist_to_binary(pretty_print(Field))}|OutP]). + [{iolist_to_binary([Base, $., atom_to_binary(FName, latin1)]), + iolist_to_binary(pretty_print(Field))}|OutP]). %%==================================================================== %% Helpers @@ -156,45 +156,45 @@ ies_to_otel_attr(Base, [FName|FNames], [Field|Fields], OutP) -> %% GTP v1 decode_header(<<1:3, 1:1, _:1, E:1, S:1, PN:1, Type:8, Length:16, TEI:32/integer, - SeqNo0:16, NPDU0:8, ExtHdrType:8, Data0/binary>>) + SeqNo0:16, NPDU0:8, ExtHdrType:8, Data0/binary>>) when E == 1; S == 1; PN == 1 -> DataLen = Length - 4, <> = Data0, SeqNo = case S of - 1 -> SeqNo0; - _ -> undefined - end, + 1 -> SeqNo0; + _ -> undefined + end, NPDU = case PN of - 1 -> NPDU0; - _ -> undefined - end, + 1 -> NPDU0; + _ -> undefined + end, {IEs, ExtHdr} = case E of - 1 -> decode_exthdr(ExtHdrType, Data1, []); - _ -> {Data1, []} - end, + 1 -> decode_exthdr(ExtHdrType, Data1, []); + _ -> {Data1, []} + end, #gtp{version = v1, type = message_type_v1(Type), tei = TEI, seq_no = SeqNo, - n_pdu = NPDU, ext_hdr = ExtHdr, ie = IEs}; + n_pdu = NPDU, ext_hdr = ExtHdr, ie = IEs}; decode_header(<<1:3, 1:1, _:1, 0:1, 0:1, 0:1, Type:8, Length:16, TEI:32/integer, - IEs:Length/bytes, _Next/binary>>) -> + IEs:Length/bytes, _Next/binary>>) -> #gtp{version = v1, type = message_type_v1(Type), tei = TEI, ie = IEs}; %% GTP' (prime) decode_header(<<0:3, 0:1, _:3, 0:1, Type:8, Length:16, SeqNo:16, - _FlowLabel:16, _PDU:8, _Spare:3/bytes, _TID:64, - IEs:Length/bytes, _Next/binary>>) -> + _FlowLabel:16, _PDU:8, _Spare:3/bytes, _TID:64, + IEs:Length/bytes, _Next/binary>>) -> #gtp{version = prime_v0, type = message_type_v1(Type), seq_no = SeqNo, ie = IEs}; decode_header(<>) -> + IEs:Length/bytes, _Next/binary>>) -> #gtp{version = prime_version(Version), type = message_type_v1(Type), - seq_no = SeqNo, ie = IEs}; + seq_no = SeqNo, ie = IEs}; %% GTP v2 decode_header(<<2:3, 0:1, T:1, _Spare0:3, Type:8, Length:16, - Data:Length/bytes, _Next/binary>>) -> + Data:Length/bytes, _Next/binary>>) -> decode_v2_msg(Data, T, Type); decode_header(<<2:3, 1:1, T:1, _Spare0:3, Type:8, Length:16, - Data:Length/bytes, Next/binary>>) -> + Data:Length/bytes, Next/binary>>) -> {decode_v2_msg(Data, T, Type), decode_header(Next)}. decode_v2_msg(<>, 1, Type) -> @@ -236,8 +236,8 @@ pad_length(Width, Length) -> put_ie(IE, IEs) -> Key = {element(1, IE), element(2, IE)}, UpdateFun = fun(V) when is_list(V) -> [IE | V]; - (V) -> [IE, V] - end, + (V) -> [IE, V] + end, maps:update_with(Key, UpdateFun, IE, IEs). bool2int(false) -> 0; @@ -312,8 +312,8 @@ encode_min_int(0, Int, little) -> binary:encode_unsigned(Int, little); encode_min_int(Min, Int, little) -> case binary:encode_unsigned(Int, little) of - B when bit_size(B) >= Min -> B; - _ -> <> + B when bit_size(B) >= Min -> B; + _ -> <> end. decode_exthdr(0, Data, Hdrs) -> @@ -410,14 +410,14 @@ decode_v1_uli(<>, Instance) - PLMN = {decode_mcc(MCCMNC), decode_mnc(MCCMNC)}, ULI = #user_location_information{instance = Instance}, case Type of - 0 -> ULI#user_location_information{ - location = #cgi{plmn_id = PLMN, lac = LAC, ci = Info}}; - 1 -> ULI#user_location_information{ - location = #sai{plmn_id = PLMN, lac = LAC, sac = Info}}; - 2 -> ULI#user_location_information{ - location = #rai{plmn_id = PLMN, lac = LAC, rac = Info}}; - _ -> ULI#user_location_information{ - location = {Type, PLMN, LAC, Info}} + 0 -> ULI#user_location_information{ + location = #cgi{plmn_id = PLMN, lac = LAC, ci = Info}}; + 1 -> ULI#user_location_information{ + location = #sai{plmn_id = PLMN, lac = LAC, sac = Info}}; + 2 -> ULI#user_location_information{ + location = #rai{plmn_id = PLMN, lac = LAC, rac = Info}}; + _ -> ULI#user_location_information{ + location = {Type, PLMN, LAC, Info}} end. decode_fqdn(FQDN) -> @@ -444,7 +444,10 @@ decode_protocol_opts(<>, Protoc Opt = decode_protocol_ppp_opt(Id, Data), decode_protocol_opts(Next, Protocol, [Opt | Opts]); decode_protocol_opts(<>, Protocol, Opts) -> - decode_protocol_opts(Next, Protocol, [{Id, Data} | Opts]). + decode_protocol_opts(Next, Protocol, [{Id, Data} | Opts]); +decode_protocol_opts(<<_Id:16, Length:8, Data/binary>> = Raw, Protocol, Opts) + when Length > byte_size(Data) -> + decode_protocol_opts(<<>>, Protocol, [{raw, Raw} | Opts]). decode_array_of_seq_no(Array) -> [X || <> <= Array]. @@ -456,7 +459,7 @@ decode_data_records(<>, Cnt, Records) decode_data_records(Next, Cnt - 1, [Data | Records]). decode_data_record_packet(<>, Instance) -> + Version:8, Rest/binary>>, Instance) -> Records = decode_data_records(Rest, NumOfRecs, []), #data_record_packet{ instance = Instance, @@ -481,8 +484,8 @@ decode_flags(<<_:1, Next/bits>>, [_ | Flags], Acc) -> decode_flags(Next, Flags, Acc); decode_flags(Bin, [], Acc) -> case binary:decode_unsigned(Bin, little) of - 0 -> Acc; - Value -> [{undecoded, Value}|Acc] + 0 -> Acc; + Value -> [{undecoded, Value}|Acc] end. decode_flags(Bin, Flags) -> @@ -516,8 +519,8 @@ decode_v2_ext_macro_enb(<>) -> #ext_macro_enb{plmn_id = {decode_mcc(MCCMNC), decode_mnc(MCCMNC)}, id = Id}. decode_v2_user_location_information(<>, Instance) -> + FlagTAI:1, FlagRAI:1, FlagSAI:1, FlagCGI:1, + Rest0/binary>>, Instance) -> IE0 = #v2_user_location_information{instance = Instance}, {IE1, Rest1} = 'maybe'(Rest0, FlagCGI, bin(_, 7, fun decode_v2_cgi/1, #v2_user_location_information.cgi, _), IE0), @@ -527,37 +530,37 @@ decode_v2_user_location_information(<>, Instance) -> + Key:32, Rest0/binary>>, Instance) -> IE0 = #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = Instance, - interface_type = InterfaceType, - key = Key}, + instance = Instance, + interface_type = InterfaceType, + key = Key}, {IE1, Rest1} = maybe_bin(Rest0, FlagV4, 4, #v2_fully_qualified_tunnel_endpoint_identifier.ipv4, IE0), {IE2, _} = maybe_bin(Rest1, FlagV6, 16, #v2_fully_qualified_tunnel_endpoint_identifier.ipv6, IE1), IE2. decode_v2_fully_qualified_pdn_connection_set_identifier(<>, Instance) -> + NoOfCSIDS:4, + Rest0/binary>>, Instance) -> CSIDLen = NoOfCSIDS * 2, IE0 = #v2_fully_qualified_pdn_connection_set_identifier{ - instance = Instance, - node_id_type = NodeIdType}, + instance = Instance, + node_id_type = NodeIdType}, {NodeId, <>} = - case {NodeIdType, Rest0} of - {0, <>} -> - {NodeId0, Rest1}; - {1, <>} -> - {NodeId0, Rest1}; - {2, <>} -> - {{MCCMNC div 1000, MCCMNC rem 1000, NodeId0}, Rest1} - end, + case {NodeIdType, Rest0} of + {0, <>} -> + {NodeId0, Rest1}; + {1, <>} -> + {NodeId0, Rest1}; + {2, <>} -> + {{MCCMNC div 1000, MCCMNC rem 1000, NodeId0}, Rest1} + end, IE0#v2_fully_qualified_pdn_connection_set_identifier{ node_id = NodeId, csids = [CSID || <> <= CSIDs] @@ -574,8 +577,8 @@ decode_v2_private_extension(Value, EnterpriseId, Instance) -> }. decode_v2_twan_identifier(<<_:3, FlagLAII:1, FlagOPNAI:1, FlagPLMNI:1, - FlagCIVAI:1, FlagBSSIDI:1, SSIDLen:8, - Rest0/binary>>, Instance) -> + FlagCIVAI:1, FlagBSSIDI:1, SSIDLen:8, + Rest0/binary>>, Instance) -> IE0 = #v2_twan_identifier{instance = Instance}, {IE1, Rest1} = bin(Rest0, SSIDLen, #v2_twan_identifier.ssid, IE0), {IE2, Rest2} = 'maybe'(Rest1, FlagBSSIDI, bin(_, 6, #v2_twan_identifier.bssid, _), IE1), @@ -588,7 +591,7 @@ decode_v2_twan_identifier(<<_:3, FlagLAII:1, FlagOPNAI:1, FlagPLMNI:1, IE8. decode_v2_paging_and_service_information(<<_:4, EBI:4, _:7, FlagPPI:1, Rest0/binary>>, - Instance) -> + Instance) -> IE0 = #v2_paging_and_service_information{instance = Instance, ebi = EBI}, {IE1, Rest1} = 'maybe'(Rest0, FlagPPI, spare(_, 2, _), IE0), {IE2, _Rest} = 'maybe'(Rest1, FlagPPI, int(_, 6, #v2_paging_and_service_information.ppi, _), IE1), @@ -600,7 +603,7 @@ decode_v2_integer_number(Bin, Instance) -> value = binary:decode_unsigned(Bin)}. decode_v2_remote_user_id(<<_:6, FlagIMEI:1, FlagMSISDN:1, IMSILen:8, - Rest0/binary>>, Instance) -> + Rest0/binary>>, Instance) -> IE0 = #v2_remote_user_id{instance = Instance}, {IE1, Rest1} = bin(Rest0, IMSILen, #v2_remote_user_id.imsi, IE0), {IE2, Rest2} = 'maybe'(Rest1, FlagMSISDN, length_bin(_, 8, #v2_remote_user_id.msisdn, _), IE1), @@ -614,9 +617,9 @@ decode_v2_maximum_packet_loss_rate(<<_:6, FlagDL:1, FlagUL:1, Rest0/binary>>, In IE2. decode_v2_monitoring_event_extension_information(<<_:7, FlagLRTP:1, RefId:32, IdLen:8, - Rest0/binary>>, Instance) -> + Rest0/binary>>, Instance) -> IE0 = #v2_monitoring_event_extension_information{ - instance = Instance, scef_reference_id = RefId}, + instance = Instance, scef_reference_id = RefId}, {IE1, Rest1} = bin(Rest0, IdLen, #v2_monitoring_event_extension_information.scef_id, IE0), {IE2, _Rest} = 'maybe'(Rest1, FlagLRTP, int(_, 32, #v2_monitoring_event_extension_information.remaining_minimum_lrtp, _), IE1), IE2. @@ -703,9 +706,9 @@ encode_exthdr([], Bin) -> encode_exthdr([V|T], Bin) -> {HdrType, Data} = encode_exthdr_type(V), Hdr = case (pad_length(4, size(Data)) + 2) rem 4 of - 0 -> Data; - N -> <> - end, + 0 -> Data; + N -> <> + end, encode_exthdr(T, <>). encode_exthdr_type(mbms_support_indication) -> @@ -765,21 +768,21 @@ encode_imsi(IMSI) -> B. encode_v1_rai(#routeing_area_identity{ - identity = #rai{plmn_id = {MCC, MNC}, lac = LAC, rac = RAC}}) -> + identity = #rai{plmn_id = {MCC, MNC}, lac = LAC, rac = RAC}}) -> <<(encode_mccmnc(MCC, MNC))/binary, LAC:16, (RAC bsr 8):8>>. encode_v1_uli(#user_location_information{location = Location}) -> {Type, {MCC, MNC}, LAC, Info} = - case Location of - #cgi{plmn_id = PLMN, lac = LAC0, ci = CI} -> - {0, PLMN, LAC0, CI}; - #sai{plmn_id = PLMN, lac = LAC0, sac = SAC} -> - {1, PLMN, LAC0, SAC}; - #rai{plmn_id = PLMN, lac = LAC0, rac = RAC} -> - {2, PLMN, LAC0, RAC}; - {Type0, _, _, _, _} = V when is_integer(Type0) -> - V - end, + case Location of + #cgi{plmn_id = PLMN, lac = LAC0, ci = CI} -> + {0, PLMN, LAC0, CI}; + #sai{plmn_id = PLMN, lac = LAC0, sac = SAC} -> + {1, PLMN, LAC0, SAC}; + #rai{plmn_id = PLMN, lac = LAC0, rac = RAC} -> + {2, PLMN, LAC0, RAC}; + {Type0, _, _, _, _} = V when is_integer(Type0) -> + V + end, <>. encode_fqdn(FQDN) -> @@ -801,6 +804,8 @@ encode_protocol_config_opts({Protocol, Opts}) -> encode_protocol_opts(_Protocol, [], Opts) -> Opts; +encode_protocol_opts(Protocol, [{raw, Raw} | T], Opts) -> + encode_protocol_opts(Protocol, T, <>); encode_protocol_opts(Protocol, [{Id, Data} | T], Opts) when Id < 16#8000; Id >= 16#FF00 -> encode_protocol_opts(Protocol, T, <>); @@ -813,10 +818,10 @@ encode_array_of_seq_no(Array) -> << <> || X <- Array>>. encode_data_record_packet(#data_record_packet{ - format = Format, - application = App, - version = {Release, Version}, - records = Records}) -> + format = Format, + application = App, + version = {Release, Version}, + records = Records}) -> BinRecs = << <<(size(R)):16, R/binary>> || R <- Records >>, << (length(Records)):8, Format:8, App:4, Release:4, (Version + 1):8, BinRecs/binary >>. @@ -842,8 +847,8 @@ encode_v2_ext_macro_enb(#ext_macro_enb{plmn_id = {MCC, MNC}, id = Id}, IE) -> encode_v2_user_location_information( #v2_user_location_information{cgi = CGI, sai = SAI, rai = RAI, - tai = TAI, ecgi = ECGI, lai = LAI, - macro_enb = MeNB, ext_macro_enb = EMeNB}) -> + tai = TAI, ecgi = ECGI, lai = LAI, + macro_enb = MeNB, ext_macro_enb = EMeNB}) -> FlagCGI = is_record(CGI, cgi), FlagSAI = is_record(SAI, sai), FlagRAI = is_record(RAI, rai), @@ -854,7 +859,7 @@ encode_v2_user_location_information( FlagEMeNB = is_record(EMeNB, ext_macro_enb), IE0 = <<(bool2int(FlagEMeNB)):1, (bool2int(FlagMeNB)):1, (bool2int(FlagLAI)):1, (bool2int(FlagECGI)):1, - (bool2int(FlagTAI)):1, (bool2int(FlagRAI)):1, (bool2int(FlagSAI)):1, (bool2int(FlagCGI)):1>>, + (bool2int(FlagTAI)):1, (bool2int(FlagRAI)):1, (bool2int(FlagSAI)):1, (bool2int(FlagCGI)):1>>, IE1 = 'maybe'(FlagCGI, encode_v2_cgi(CGI, _), IE0), IE2 = 'maybe'(FlagSAI, encode_v2_sai(SAI, _), IE1), @@ -883,21 +888,21 @@ encode_v2_fully_qualified_pdn_connection_set_identifier( NoOfCSIDS = length(CSIDs), IE0 = <>, IE1 = case NodeIdType of - 0 -> <>; - 1 -> <>; - 2 -> {MCC, MNC, Id} = NodeId, - <> - end, + 0 -> <>; + 1 -> <>; + 2 -> {MCC, MNC, Id} = NodeId, + <> + end, <> || CSID <- CSIDs >>/binary>>. encode_v2_private_extension(EnterpriseId, Value) -> <>. encode_v2_private_extension( - #v2_private_extension{ - enterprise_id = EnterpriseId, - value = Value - }) -> + #v2_private_extension{ + enterprise_id = EnterpriseId, + value = Value + }) -> encode_v2_private_extension(EnterpriseId, Value). encode_v2_twan_identifier( @@ -911,15 +916,15 @@ encode_v2_twan_identifier( relay_identity = RelayIdentity, circuit_id = CircuitId}) -> FlagLAII = is_integer(RelayIdentityType) andalso - is_binary(RelayIdentity) andalso is_binary(CircuitId), + is_binary(RelayIdentity) andalso is_binary(CircuitId), FlagOPNAI = is_binary(OperatorName), FlagPLMNI = is_tuple(MCCMNC), FlagCIVAI = is_binary(CivicAddress), FlagBSSIDI = is_binary(BSSID), IE0 = <<0:3, (bool2int(FlagLAII)):1, (bool2int(FlagOPNAI)):1, - (bool2int(FlagPLMNI)):1, (bool2int(FlagCIVAI)):1, - (bool2int(FlagBSSIDI)):1>>, + (bool2int(FlagPLMNI)):1, (bool2int(FlagCIVAI)):1, + (bool2int(FlagBSSIDI)):1>>, IE1 = length_bin(SSID, 8, IE0), IE2 = 'maybe'(FlagBSSIDI, bin(BSSID, 6, _), IE1), IE3 = 'maybe'(FlagCIVAI, length_bin(CivicAddress, 8, _), IE2), @@ -1326,159 +1331,159 @@ enum_value(X) when is_integer(X) -> X. decode_v1_element(<>, 1, Instance) -> #cause{instance = Instance, - value = enum_value(M_value)}; + value = enum_value(M_value)}; decode_v1_element(<>, 2, Instance) -> #international_mobile_subscriber_identity{instance = Instance, - imsi = decode_imsi(M_imsi)}; + imsi = decode_imsi(M_imsi)}; decode_v1_element(<>, 3, Instance) -> decode_v1_rai(Data, Instance); decode_v1_element(<>, 4, Instance) -> #temporary_logical_link_identity{instance = Instance, - tlli = M_tlli}; + tlli = M_tlli}; decode_v1_element(<>, 5, Instance) -> #packet_tmsi{instance = Instance, - p_tmsi = M_p_tmsi}; + p_tmsi = M_p_tmsi}; decode_v1_element(<<_:7, - M_required:1/integer>>, 8, Instance) -> + M_required:1/integer>>, 8, Instance) -> #reordering_required{instance = Instance, - required = enum_required(M_required)}; + required = enum_required(M_required)}; decode_v1_element(<>, 9, Instance) -> + M_sres:4/bytes, + M_kc:8/bytes>>, 9, Instance) -> #authentication_triplet{instance = Instance, - rand = M_rand, - sres = M_sres, - kc = M_kc}; + rand = M_rand, + sres = M_sres, + kc = M_kc}; decode_v1_element(<>, 11, Instance) -> #map_cause{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<>, 12, Instance) -> #p_tmsi_signature{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<<_:7, - M_validated:1/integer>>, 13, Instance) -> + M_validated:1/integer>>, 13, Instance) -> #ms_validated{instance = Instance, - validated = enum_validated(M_validated)}; + validated = enum_validated(M_validated)}; decode_v1_element(<>, 14, Instance) -> #recovery{instance = Instance, - restart_counter = M_restart_counter}; + restart_counter = M_restart_counter}; decode_v1_element(<<_:6, - M_mode:2/integer>>, 15, Instance) -> + M_mode:2/integer>>, 15, Instance) -> #selection_mode{instance = Instance, - mode = M_mode}; + mode = M_mode}; decode_v1_element(<>, 16, Instance) -> #tunnel_endpoint_identifier_data_i{instance = Instance, - tei = M_tei}; + tei = M_tei}; decode_v1_element(<>, 17, Instance) -> #tunnel_endpoint_identifier_control_plane{instance = Instance, - tei = M_tei}; + tei = M_tei}; decode_v1_element(<<_:4, - M_nsapi:4/integer, - M_tei:32/integer>>, 18, Instance) -> + M_nsapi:4/integer, + M_tei:32/integer>>, 18, Instance) -> #tunnel_endpoint_identifier_data_ii{instance = Instance, - nsapi = M_nsapi, - tei = M_tei}; + nsapi = M_nsapi, + tei = M_tei}; decode_v1_element(<<_:7, - M_value:1/integer>>, 19, Instance) -> + M_value:1/integer>>, 19, Instance) -> #teardown_ind{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<<_:4, - M_nsapi:4/integer>>, 20, Instance) -> + M_nsapi:4/integer>>, 20, Instance) -> #nsapi{instance = Instance, - nsapi = M_nsapi}; + nsapi = M_nsapi}; decode_v1_element(<>, 21, Instance) -> #ranap_cause{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<<_:4, - M_nsapi:4/integer, - M_dl_gtp_u_sequence_number:16/integer, - M_ul_gtp_u_sequence_number:16/integer, - M_dl_pdcp_sequence_number:16/integer, - M_ul_pdcp_sequence_number:16/integer>>, 22, Instance) -> + M_nsapi:4/integer, + M_dl_gtp_u_sequence_number:16/integer, + M_ul_gtp_u_sequence_number:16/integer, + M_dl_pdcp_sequence_number:16/integer, + M_ul_pdcp_sequence_number:16/integer>>, 22, Instance) -> #rab_context{instance = Instance, - nsapi = M_nsapi, - dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, - ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, - dl_pdcp_sequence_number = M_dl_pdcp_sequence_number, - ul_pdcp_sequence_number = M_ul_pdcp_sequence_number}; + nsapi = M_nsapi, + dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, + ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, + dl_pdcp_sequence_number = M_dl_pdcp_sequence_number, + ul_pdcp_sequence_number = M_ul_pdcp_sequence_number}; decode_v1_element(<<_:5, - M_value:3/integer>>, 23, Instance) -> + M_value:3/integer>>, 23, Instance) -> #radio_priority_sms{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<>, 24, Instance) -> + _:1, + M_value:3/integer>>, 24, Instance) -> #radio_priority{instance = Instance, - nsapi = M_nsapi, - value = M_value}; + nsapi = M_nsapi, + value = M_value}; decode_v1_element(<<_:4, - M_nsapi:4/integer, - M_value:8/integer>>, 25, Instance) -> + M_nsapi:4/integer, + M_value:8/integer>>, 25, Instance) -> #packet_flow_id{instance = Instance, - nsapi = M_nsapi, - value = M_value}; + nsapi = M_nsapi, + value = M_value}; decode_v1_element(<>, 26, Instance) -> #charging_characteristics{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<>, 27, Instance) -> #trace_reference{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<>, 28, Instance) -> #trace_type{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<>, 29, Instance) -> #ms_not_reachable_reason{instance = Instance, - value = M_value}; + value = M_value}; decode_v1_element(<>, 126, Instance) -> #packet_transfer_command{instance = Instance, - command = enum_command(M_command)}; + command = enum_command(M_command)}; decode_v1_element(<>, 127, Instance) -> #charging_id{instance = Instance, - id = M_id}; + id = M_id}; decode_v1_element(<<_:4, - M_pdp_type_organization:4/integer, - M_pdp_type_number:8/integer, - M_pdp_address/binary>>, 128, Instance) -> + M_pdp_type_organization:4/integer, + M_pdp_type_number:8/integer, + M_pdp_address/binary>>, 128, Instance) -> #end_user_address{instance = Instance, - pdp_type_organization = M_pdp_type_organization, - pdp_type_number = M_pdp_type_number, - pdp_address = M_pdp_address}; + pdp_type_organization = M_pdp_type_organization, + pdp_type_number = M_pdp_type_number, + pdp_address = M_pdp_address}; decode_v1_element(<<_:4, - M_cksn:4/integer, - 1:2, - M_no_of_vectors:3/integer, - M_used_cipher:3/integer, - M_kc:8/bytes, - M_tripple_Rest/binary>>, 129, Instance) -> + M_cksn:4/integer, + 1:2, + M_no_of_vectors:3/integer, + M_used_cipher:3/integer, + M_kc:8/bytes, + M_tripple_Rest/binary>>, 129, Instance) -> M_tripple_size = M_no_of_vectors * 8, <> = M_container_Rest, #mm_context_gsm{instance = Instance, - cksn = M_cksn, - no_of_vectors = M_no_of_vectors, - used_cipher = M_used_cipher, - kc = M_kc, - tripple = [X || <> <= M_tripple], - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = [X || <> <= M_ms_network_capability], - container_length = M_container_length, - container = [X || <> <= M_container]}; + cksn = M_cksn, + no_of_vectors = M_no_of_vectors, + used_cipher = M_used_cipher, + kc = M_kc, + tripple = [X || <> <= M_tripple], + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = [X || <> <= M_ms_network_capability], + container_length = M_container_length, + container = [X || <> <= M_container]}; decode_v1_element(<<_:4, - M_ksi:4/integer, - 2:2, - M_no_of_vectors:3/integer, - _:3, - M_ck:16/bytes, - M_ik:16/bytes, - M_quintuplet_length:16/integer, - M_quintuplet_Rest/binary>>, 129, Instance) -> + M_ksi:4/integer, + 2:2, + M_no_of_vectors:3/integer, + _:3, + M_ck:16/bytes, + M_ik:16/bytes, + M_quintuplet_length:16/integer, + M_quintuplet_Rest/binary>>, 129, Instance) -> M_quintuplet_size = M_quintuplet_length * 1, <> = M_container_Rest, #mm_context_umts{instance = Instance, - ksi = M_ksi, - no_of_vectors = M_no_of_vectors, - ck = M_ck, - ik = M_ik, - quintuplet_length = M_quintuplet_length, - quintuplet = [X || <> <= M_quintuplet], - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = [X || <> <= M_ms_network_capability], - container_length = M_container_length, - container = [X || <> <= M_container]}; + ksi = M_ksi, + no_of_vectors = M_no_of_vectors, + ck = M_ck, + ik = M_ik, + quintuplet_length = M_quintuplet_length, + quintuplet = [X || <> <= M_quintuplet], + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = [X || <> <= M_ms_network_capability], + container_length = M_container_length, + container = [X || <> <= M_container]}; decode_v1_element(<<_:4, - M_cksn:4/integer, - 3:2, - M_no_of_vectors:3/integer, - M_used_cipher:3/integer, - M_kc:8/bytes, - M_quintuplet_length:16/integer, - M_quintuplet_Rest/binary>>, 129, Instance) -> + M_cksn:4/integer, + 3:2, + M_no_of_vectors:3/integer, + M_used_cipher:3/integer, + M_kc:8/bytes, + M_quintuplet_length:16/integer, + M_quintuplet_Rest/binary>>, 129, Instance) -> M_quintuplet_size = M_quintuplet_length * 1, <> = M_container_Rest, #mm_context_gsm_and_umts{instance = Instance, - cksn = M_cksn, - no_of_vectors = M_no_of_vectors, - used_cipher = M_used_cipher, - kc = M_kc, - quintuplet_length = M_quintuplet_length, - quintuplet = [X || <> <= M_quintuplet], - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = [X || <> <= M_ms_network_capability], - container_length = M_container_length, - container = [X || <> <= M_container]}; + cksn = M_cksn, + no_of_vectors = M_no_of_vectors, + used_cipher = M_used_cipher, + kc = M_kc, + quintuplet_length = M_quintuplet_length, + quintuplet = [X || <> <= M_quintuplet], + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = [X || <> <= M_ms_network_capability], + container_length = M_container_length, + container = [X || <> <= M_container]}; decode_v1_element(<<_:4, - M_ksi:4/integer, - 0:2, - M_no_of_vectors:3/integer, - M_used_cipher:3/integer, - M_ck:16/bytes, - M_ik:16/bytes, - M_quintuplet_length:16/integer, - M_quintuplet_Rest/binary>>, 129, Instance) -> + M_ksi:4/integer, + 0:2, + M_no_of_vectors:3/integer, + M_used_cipher:3/integer, + M_ck:16/bytes, + M_ik:16/bytes, + M_quintuplet_length:16/integer, + M_quintuplet_Rest/binary>>, 129, Instance) -> M_quintuplet_size = M_quintuplet_length * 1, <> = M_container_Rest, #mm_context_umts_and_used_cipher{instance = Instance, - ksi = M_ksi, - no_of_vectors = M_no_of_vectors, - used_cipher = M_used_cipher, - ck = M_ck, - ik = M_ik, - quintuplet_length = M_quintuplet_length, - quintuplet = [X || <> <= M_quintuplet], - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = [X || <> <= M_ms_network_capability], - container_length = M_container_length, - container = [X || <> <= M_container]}; + ksi = M_ksi, + no_of_vectors = M_no_of_vectors, + used_cipher = M_used_cipher, + ck = M_ck, + ik = M_ik, + quintuplet_length = M_quintuplet_length, + quintuplet = [X || <> <= M_quintuplet], + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = [X || <> <= M_ms_network_capability], + container_length = M_container_length, + container = [X || <> <= M_container]}; decode_v1_element(<<>>, 130, Instance) -> #pdp_context{instance = Instance}; decode_v1_element(<>, 131, Instance) -> #access_point_name{instance = Instance, - apn = decode_fqdn(M_apn)}; + apn = decode_fqdn(M_apn)}; decode_v1_element(<>, 132, Instance) -> #protocol_configuration_options{instance = Instance, - config = decode_protocol_config_opts(M_config)}; + config = decode_protocol_config_opts(M_config)}; decode_v1_element(<>, 133, Instance) -> #gsn_address{instance = Instance, - address = M_address}; + address = M_address}; decode_v1_element(<>, 134, Instance) -> #ms_international_pstn_isdn_number{instance = Instance, - msisdn = decode_isdn_address_string(M_msisdn)}; + msisdn = decode_isdn_address_string(M_msisdn)}; decode_v1_element(<>, 135, Instance) -> + M_data/binary>>, 135, Instance) -> #quality_of_service_profile{instance = Instance, - priority = M_priority, - data = M_data}; + priority = M_priority, + data = M_data}; decode_v1_element(<<>>, 136, Instance) -> #authentication_quintuplet{instance = Instance}; @@ -1668,40 +1673,40 @@ decode_v1_element(<<>>, 147, Instance) -> decode_v1_element(<>, 148, Instance) -> #common_flags{instance = Instance, - flags = decode_flags(M_flags, ['Dual Address Bearer Flag', - 'Upgrade QoS Supported','NRSN', - 'No QoS negotiation', - 'MBMS Counting Information', - 'RAN Procedures Ready','MBMS Service Type', - 'Prohibit Payload Compression'])}; + flags = decode_flags(M_flags, ['Dual Address Bearer Flag', + 'Upgrade QoS Supported','NRSN', + 'No QoS negotiation', + 'MBMS Counting Information', + 'RAN Procedures Ready','MBMS Service Type', + 'Prohibit Payload Compression'])}; decode_v1_element(<>, 149, Instance) -> #apn_restriction{instance = Instance, - restriction_type_value = M_restriction_type_value}; + restriction_type_value = M_restriction_type_value}; decode_v1_element(<<>>, 150, Instance) -> #radio_priority_lcs{instance = Instance}; decode_v1_element(<>, 151, Instance) -> + _/binary>>, 151, Instance) -> #rat_type{instance = Instance, - rat_type = M_rat_type}; + rat_type = M_rat_type}; decode_v1_element(<>, 152, Instance) -> decode_v1_uli(Data, Instance); decode_v1_element(<>, 153, Instance) -> + _:6, + M_dst:2/integer, + _/binary>>, 153, Instance) -> #ms_time_zone{instance = Instance, - timezone = M_timezone, - dst = M_dst}; + timezone = M_timezone, + dst = M_dst}; decode_v1_element(<>, 154, Instance) -> + _/binary>>, 154, Instance) -> #imei{instance = Instance, - imei = decode_tbcd(M_imei)}; + imei = decode_tbcd(M_imei)}; decode_v1_element(<<>>, 155, Instance) -> #camel_charging_information_container{instance = Instance}; @@ -1780,7 +1785,7 @@ decode_v1_element(<<>>, 180, Instance) -> decode_v1_element(<>, 181, Instance) -> #ms_info_change_reporting_action{instance = Instance, - action = enum_action(M_action)}; + action = enum_action(M_action)}; decode_v1_element(<<>>, 182, Instance) -> #direct_tunnel_flags{instance = Instance}; @@ -1808,25 +1813,25 @@ decode_v1_element(<<>>, 189, Instance) -> decode_v1_element(<>, 190, Instance) -> #fully_qualified_domain_name{instance = Instance, - fqdn = decode_fqdn(M_fqdn)}; + fqdn = decode_fqdn(M_fqdn)}; decode_v1_element(<<_:1, - M_pci:1/integer, - M_pl:4/integer, - _:1, - M_pvi:1/integer>>, 191, Instance) -> + M_pci:1/integer, + M_pl:4/integer, + _:1, + M_pvi:1/integer>>, 191, Instance) -> #evolved_allocation_retention_priority_i{instance = Instance, - pci = M_pci, - pl = M_pl, - pvi = M_pvi}; + pci = M_pci, + pl = M_pl, + pvi = M_pvi}; decode_v1_element(<<>>, 192, Instance) -> #evolved_allocation_retention_priority_ii{instance = Instance}; decode_v1_element(<>, 193, Instance) -> #extended_common_flags{instance = Instance, - flags = decode_flags(M_flags, ['UASI','BDWI','PCRI','VB','RetLoc','CPSR', - 'CCRSI','Unauthenticated IMSI'])}; + flags = decode_flags(M_flags, ['UASI','BDWI','PCRI','VB','RetLoc','CPSR', + 'CCRSI','Unauthenticated IMSI'])}; decode_v1_element(<<>>, 194, Instance) -> #user_csg_information{instance = Instance}; @@ -1841,10 +1846,10 @@ decode_v1_element(<<>>, 197, Instance) -> #csg_membership_indication{instance = Instance}; decode_v1_element(<>, 198, Instance) -> + M_downlink:32/integer>>, 198, Instance) -> #aggregate_maximum_bit_rate{instance = Instance, - uplink = M_uplink, - downlink = M_downlink}; + uplink = M_uplink, + downlink = M_downlink}; decode_v1_element(<<>>, 199, Instance) -> #ue_network_capability{instance = Instance}; @@ -1899,32 +1904,32 @@ decode_v1_element(<<>>, 216, Instance) -> decode_v1_element(<>, 249, Instance) -> #sequence_numbers_of_released_packets{instance = Instance, - sequence_numbers = decode_array_of_seq_no(M_sequence_numbers)}; + sequence_numbers = decode_array_of_seq_no(M_sequence_numbers)}; decode_v1_element(<>, 250, Instance) -> #sequence_numbers_of_cancelled_packets{instance = Instance, - sequence_numbers = decode_array_of_seq_no(M_sequence_numbers)}; + sequence_numbers = decode_array_of_seq_no(M_sequence_numbers)}; decode_v1_element(<>, 251, Instance) -> #charging_gateway_address{instance = Instance, - address = M_address}; + address = M_address}; decode_v1_element(<>, 252, Instance) -> decode_data_record_packet(Data, Instance); decode_v1_element(<>, 253, Instance) -> #requests_responded{instance = Instance, - sequence_numbers = decode_array_of_seq_no(M_sequence_numbers)}; + sequence_numbers = decode_array_of_seq_no(M_sequence_numbers)}; decode_v1_element(<>, 254, Instance) -> #address_of_recommended_node{instance = Instance, - address = M_address}; + address = M_address}; decode_v1_element(<>, 255, Instance) -> + M_value/binary>>, 255, Instance) -> #private_extension{instance = Instance, - enterprise_id = M_enterprise_id, - value = M_value}; + enterprise_id = M_enterprise_id, + value = M_value}; decode_v1_element(Value, Tag, Instance) -> {Tag, Instance, Value}. @@ -2055,699 +2060,699 @@ decode_v1(<>, PrevId, PrevInst, IEs) -> encode_v1_element(#cause{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(1, Instance, <<(enum_value(M_value)):8/integer>>); encode_v1_element(#international_mobile_subscriber_identity{ - instance = Instance, - imsi = M_imsi}) -> + instance = Instance, + imsi = M_imsi}) -> encode_v1_element(2, Instance, <<(encode_imsi(M_imsi)):64/bits>>); encode_v1_element(#routeing_area_identity{instance = Instance} = IE) -> encode_v1_element(3, Instance, encode_v1_rai(IE)); encode_v1_element(#temporary_logical_link_identity{ - instance = Instance, - tlli = M_tlli}) -> + instance = Instance, + tlli = M_tlli}) -> encode_v1_element(4, Instance, <>); encode_v1_element(#packet_tmsi{ - instance = Instance, - p_tmsi = M_p_tmsi}) -> + instance = Instance, + p_tmsi = M_p_tmsi}) -> encode_v1_element(5, Instance, <>); encode_v1_element(#reordering_required{ - instance = Instance, - required = M_required}) -> + instance = Instance, + required = M_required}) -> encode_v1_element(8, Instance, <<127:7, - (enum_required(M_required)):1/integer>>); + (enum_required(M_required)):1/integer>>); encode_v1_element(#authentication_triplet{ - instance = Instance, - rand = M_rand, - sres = M_sres, - kc = M_kc}) -> + instance = Instance, + rand = M_rand, + sres = M_sres, + kc = M_kc}) -> encode_v1_element(9, Instance, <>); + M_sres:4/bytes, + M_kc:8/bytes>>); encode_v1_element(#map_cause{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(11, Instance, <>); encode_v1_element(#p_tmsi_signature{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(12, Instance, <>); encode_v1_element(#ms_validated{ - instance = Instance, - validated = M_validated}) -> + instance = Instance, + validated = M_validated}) -> encode_v1_element(13, Instance, <<127:7, - (enum_validated(M_validated)):1/integer>>); + (enum_validated(M_validated)):1/integer>>); encode_v1_element(#recovery{ - instance = Instance, - restart_counter = M_restart_counter}) -> + instance = Instance, + restart_counter = M_restart_counter}) -> encode_v1_element(14, Instance, <>); encode_v1_element(#selection_mode{ - instance = Instance, - mode = M_mode}) -> + instance = Instance, + mode = M_mode}) -> encode_v1_element(15, Instance, <<63:6, - M_mode:2>>); + M_mode:2>>); encode_v1_element(#tunnel_endpoint_identifier_data_i{ - instance = Instance, - tei = M_tei}) -> + instance = Instance, + tei = M_tei}) -> encode_v1_element(16, Instance, <>); encode_v1_element(#tunnel_endpoint_identifier_control_plane{ - instance = Instance, - tei = M_tei}) -> + instance = Instance, + tei = M_tei}) -> encode_v1_element(17, Instance, <>); encode_v1_element(#tunnel_endpoint_identifier_data_ii{ - instance = Instance, - nsapi = M_nsapi, - tei = M_tei}) -> + instance = Instance, + nsapi = M_nsapi, + tei = M_tei}) -> encode_v1_element(18, Instance, <<0:4, - M_nsapi:4, - M_tei:32>>); + M_nsapi:4, + M_tei:32>>); encode_v1_element(#teardown_ind{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(19, Instance, <<127:7, - M_value:1>>); + M_value:1>>); encode_v1_element(#nsapi{ - instance = Instance, - nsapi = M_nsapi}) -> + instance = Instance, + nsapi = M_nsapi}) -> encode_v1_element(20, Instance, <<0:4, - M_nsapi:4>>); + M_nsapi:4>>); encode_v1_element(#ranap_cause{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(21, Instance, <>); encode_v1_element(#rab_context{ - instance = Instance, - nsapi = M_nsapi, - dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, - ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, - dl_pdcp_sequence_number = M_dl_pdcp_sequence_number, - ul_pdcp_sequence_number = M_ul_pdcp_sequence_number}) -> + instance = Instance, + nsapi = M_nsapi, + dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, + ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, + dl_pdcp_sequence_number = M_dl_pdcp_sequence_number, + ul_pdcp_sequence_number = M_ul_pdcp_sequence_number}) -> encode_v1_element(22, Instance, <<0:4, - M_nsapi:4, - M_dl_gtp_u_sequence_number:16, - M_ul_gtp_u_sequence_number:16, - M_dl_pdcp_sequence_number:16, - M_ul_pdcp_sequence_number:16>>); + M_nsapi:4, + M_dl_gtp_u_sequence_number:16, + M_ul_gtp_u_sequence_number:16, + M_dl_pdcp_sequence_number:16, + M_ul_pdcp_sequence_number:16>>); encode_v1_element(#radio_priority_sms{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(23, Instance, <<0:5, - M_value:3>>); + M_value:3>>); encode_v1_element(#radio_priority{ - instance = Instance, - nsapi = M_nsapi, - value = M_value}) -> + instance = Instance, + nsapi = M_nsapi, + value = M_value}) -> encode_v1_element(24, Instance, <>); + 0:1, + M_value:3>>); encode_v1_element(#packet_flow_id{ - instance = Instance, - nsapi = M_nsapi, - value = M_value}) -> + instance = Instance, + nsapi = M_nsapi, + value = M_value}) -> encode_v1_element(25, Instance, <<0:4, - M_nsapi:4, - M_value:8>>); + M_nsapi:4, + M_value:8>>); encode_v1_element(#charging_characteristics{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(26, Instance, <>); encode_v1_element(#trace_reference{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(27, Instance, <>); encode_v1_element(#trace_type{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(28, Instance, <>); encode_v1_element(#ms_not_reachable_reason{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v1_element(29, Instance, <>); encode_v1_element(#packet_transfer_command{ - instance = Instance, - command = M_command}) -> + instance = Instance, + command = M_command}) -> encode_v1_element(126, Instance, <<(enum_command(M_command)):8/integer>>); encode_v1_element(#charging_id{ - instance = Instance, - id = M_id}) -> + instance = Instance, + id = M_id}) -> encode_v1_element(127, Instance, <>); encode_v1_element(#end_user_address{ - instance = Instance, - pdp_type_organization = M_pdp_type_organization, - pdp_type_number = M_pdp_type_number, - pdp_address = M_pdp_address}) -> + instance = Instance, + pdp_type_organization = M_pdp_type_organization, + pdp_type_number = M_pdp_type_number, + pdp_address = M_pdp_address}) -> encode_v1_element(128, Instance, <<15:4, - M_pdp_type_organization:4, - M_pdp_type_number:8, - M_pdp_address/binary>>); + M_pdp_type_organization:4, + M_pdp_type_number:8, + M_pdp_address/binary>>); encode_v1_element(#mm_context_gsm{ - instance = Instance, - cksn = M_cksn, - no_of_vectors = M_no_of_vectors, - used_cipher = M_used_cipher, - kc = M_kc, - tripple = M_tripple, - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = M_ms_network_capability, - container_length = M_container_length, - container = M_container}) -> + instance = Instance, + cksn = M_cksn, + no_of_vectors = M_no_of_vectors, + used_cipher = M_used_cipher, + kc = M_kc, + tripple = M_tripple, + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = M_ms_network_capability, + container_length = M_container_length, + container = M_container}) -> encode_v1_element(129, Instance, <<15:4, - M_cksn:4, - 1:2, - M_no_of_vectors:3, - M_used_cipher:3, - M_kc:8/bytes, - (length(M_tripple)):8/integer, (<< <> || X <- M_tripple>>)/binary, - M_drx_parameter:2/bytes, - M_ms_network_capability_length:8, - (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, - M_container_length:16, - (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); + M_cksn:4, + 1:2, + M_no_of_vectors:3, + M_used_cipher:3, + M_kc:8/bytes, + (length(M_tripple)):8/integer, (<< <> || X <- M_tripple>>)/binary, + M_drx_parameter:2/bytes, + M_ms_network_capability_length:8, + (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, + M_container_length:16, + (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); encode_v1_element(#mm_context_umts{ - instance = Instance, - ksi = M_ksi, - no_of_vectors = M_no_of_vectors, - ck = M_ck, - ik = M_ik, - quintuplet_length = M_quintuplet_length, - quintuplet = M_quintuplet, - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = M_ms_network_capability, - container_length = M_container_length, - container = M_container}) -> + instance = Instance, + ksi = M_ksi, + no_of_vectors = M_no_of_vectors, + ck = M_ck, + ik = M_ik, + quintuplet_length = M_quintuplet_length, + quintuplet = M_quintuplet, + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = M_ms_network_capability, + container_length = M_container_length, + container = M_container}) -> encode_v1_element(129, Instance, <<15:4, - M_ksi:4, - 2:2, - M_no_of_vectors:3, - 7:3, - M_ck:16/bytes, - M_ik:16/bytes, - M_quintuplet_length:16, - (length(M_quintuplet)):1/integer, (<< <> || X <- M_quintuplet>>)/binary, - M_drx_parameter:2/bytes, - M_ms_network_capability_length:8, - (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, - M_container_length:16, - (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); + M_ksi:4, + 2:2, + M_no_of_vectors:3, + 7:3, + M_ck:16/bytes, + M_ik:16/bytes, + M_quintuplet_length:16, + (length(M_quintuplet)):1/integer, (<< <> || X <- M_quintuplet>>)/binary, + M_drx_parameter:2/bytes, + M_ms_network_capability_length:8, + (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, + M_container_length:16, + (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); encode_v1_element(#mm_context_gsm_and_umts{ - instance = Instance, - cksn = M_cksn, - no_of_vectors = M_no_of_vectors, - used_cipher = M_used_cipher, - kc = M_kc, - quintuplet_length = M_quintuplet_length, - quintuplet = M_quintuplet, - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = M_ms_network_capability, - container_length = M_container_length, - container = M_container}) -> + instance = Instance, + cksn = M_cksn, + no_of_vectors = M_no_of_vectors, + used_cipher = M_used_cipher, + kc = M_kc, + quintuplet_length = M_quintuplet_length, + quintuplet = M_quintuplet, + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = M_ms_network_capability, + container_length = M_container_length, + container = M_container}) -> encode_v1_element(129, Instance, <<15:4, - M_cksn:4, - 3:2, - M_no_of_vectors:3, - M_used_cipher:3, - M_kc:8/bytes, - M_quintuplet_length:16, - (length(M_quintuplet)):1/integer, (<< <> || X <- M_quintuplet>>)/binary, - M_drx_parameter:2/bytes, - M_ms_network_capability_length:8, - (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, - M_container_length:16, - (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); + M_cksn:4, + 3:2, + M_no_of_vectors:3, + M_used_cipher:3, + M_kc:8/bytes, + M_quintuplet_length:16, + (length(M_quintuplet)):1/integer, (<< <> || X <- M_quintuplet>>)/binary, + M_drx_parameter:2/bytes, + M_ms_network_capability_length:8, + (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, + M_container_length:16, + (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); encode_v1_element(#mm_context_umts_and_used_cipher{ - instance = Instance, - ksi = M_ksi, - no_of_vectors = M_no_of_vectors, - used_cipher = M_used_cipher, - ck = M_ck, - ik = M_ik, - quintuplet_length = M_quintuplet_length, - quintuplet = M_quintuplet, - drx_parameter = M_drx_parameter, - ms_network_capability_length = M_ms_network_capability_length, - ms_network_capability = M_ms_network_capability, - container_length = M_container_length, - container = M_container}) -> + instance = Instance, + ksi = M_ksi, + no_of_vectors = M_no_of_vectors, + used_cipher = M_used_cipher, + ck = M_ck, + ik = M_ik, + quintuplet_length = M_quintuplet_length, + quintuplet = M_quintuplet, + drx_parameter = M_drx_parameter, + ms_network_capability_length = M_ms_network_capability_length, + ms_network_capability = M_ms_network_capability, + container_length = M_container_length, + container = M_container}) -> encode_v1_element(129, Instance, <<15:4, - M_ksi:4, - 0:2, - M_no_of_vectors:3, - M_used_cipher:3, - M_ck:16/bytes, - M_ik:16/bytes, - M_quintuplet_length:16, - (length(M_quintuplet)):1/integer, (<< <> || X <- M_quintuplet>>)/binary, - M_drx_parameter:2/bytes, - M_ms_network_capability_length:8, - (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, - M_container_length:16, - (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); + M_ksi:4, + 0:2, + M_no_of_vectors:3, + M_used_cipher:3, + M_ck:16/bytes, + M_ik:16/bytes, + M_quintuplet_length:16, + (length(M_quintuplet)):1/integer, (<< <> || X <- M_quintuplet>>)/binary, + M_drx_parameter:2/bytes, + M_ms_network_capability_length:8, + (length(M_ms_network_capability)):1/integer, (<< <> || X <- M_ms_network_capability>>)/binary, + M_container_length:16, + (length(M_container)):1/integer, (<< <> || X <- M_container>>)/binary>>); encode_v1_element(#pdp_context{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(130, Instance, <<>>); encode_v1_element(#access_point_name{ - instance = Instance, - apn = M_apn}) -> + instance = Instance, + apn = M_apn}) -> encode_v1_element(131, Instance, <<(encode_fqdn(M_apn))/binary>>); encode_v1_element(#protocol_configuration_options{ - instance = Instance, - config = M_config}) -> + instance = Instance, + config = M_config}) -> encode_v1_element(132, Instance, <<(encode_protocol_config_opts(M_config))/binary>>); encode_v1_element(#gsn_address{ - instance = Instance, - address = M_address}) -> + instance = Instance, + address = M_address}) -> encode_v1_element(133, Instance, <>); encode_v1_element(#ms_international_pstn_isdn_number{ - instance = Instance, - msisdn = M_msisdn}) -> + instance = Instance, + msisdn = M_msisdn}) -> encode_v1_element(134, Instance, <<(encode_isdn_address_string(M_msisdn))/binary>>); encode_v1_element(#quality_of_service_profile{ - instance = Instance, - priority = M_priority, - data = M_data}) -> + instance = Instance, + priority = M_priority, + data = M_data}) -> encode_v1_element(135, Instance, <>); + M_data/binary>>); encode_v1_element(#authentication_quintuplet{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(136, Instance, <<>>); encode_v1_element(#traffic_flow_template{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(137, Instance, <<>>); encode_v1_element(#target_identification{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(138, Instance, <<>>); encode_v1_element(#utran_transparent_container{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(139, Instance, <<>>); encode_v1_element(#rab_setup_information{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(140, Instance, <<>>); encode_v1_element(#extension_header_type_list{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(141, Instance, <<>>); encode_v1_element(#trigger_id{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(142, Instance, <<>>); encode_v1_element(#omc_identity{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(143, Instance, <<>>); encode_v1_element(#ran_transparent_container{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(144, Instance, <<>>); encode_v1_element(#pdp_context_prioritization{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(145, Instance, <<>>); encode_v1_element(#additional_rab_setup_information{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(146, Instance, <<>>); encode_v1_element(#sgsn_number{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(147, Instance, <<>>); encode_v1_element(#common_flags{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v1_element(148, Instance, <<(encode_min_int(8, encode_flags(M_flags, ['Prohibit Payload Compression', - 'MBMS Service Type', - 'RAN Procedures Ready', - 'MBMS Counting Information', - 'No QoS negotiation','NRSN', - 'Upgrade QoS Supported', - 'Dual Address Bearer Flag']), little))/binary>>); + 'MBMS Service Type', + 'RAN Procedures Ready', + 'MBMS Counting Information', + 'No QoS negotiation','NRSN', + 'Upgrade QoS Supported', + 'Dual Address Bearer Flag']), little))/binary>>); encode_v1_element(#apn_restriction{ - instance = Instance, - restriction_type_value = M_restriction_type_value}) -> + instance = Instance, + restriction_type_value = M_restriction_type_value}) -> encode_v1_element(149, Instance, <>); encode_v1_element(#radio_priority_lcs{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(150, Instance, <<>>); encode_v1_element(#rat_type{ - instance = Instance, - rat_type = M_rat_type}) -> + instance = Instance, + rat_type = M_rat_type}) -> encode_v1_element(151, Instance, <>); encode_v1_element(#user_location_information{instance = Instance} = IE) -> encode_v1_element(152, Instance, encode_v1_uli(IE)); encode_v1_element(#ms_time_zone{ - instance = Instance, - timezone = M_timezone, - dst = M_dst}) -> + instance = Instance, + timezone = M_timezone, + dst = M_dst}) -> encode_v1_element(153, Instance, <>); + 0:6, + M_dst:2>>); encode_v1_element(#imei{ - instance = Instance, - imei = M_imei}) -> + instance = Instance, + imei = M_imei}) -> encode_v1_element(154, Instance, <<(encode_tbcd(M_imei)):64/bits>>); encode_v1_element(#camel_charging_information_container{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(155, Instance, <<>>); encode_v1_element(#mbms_ue_context{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(156, Instance, <<>>); encode_v1_element(#temporary_mobile_group_identity{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(157, Instance, <<>>); encode_v1_element(#rim_routing_address{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(158, Instance, <<>>); encode_v1_element(#mbms_protocol_configuration_options{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(159, Instance, <<>>); encode_v1_element(#mbms_service_area{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(160, Instance, <<>>); encode_v1_element(#source_rnc_pdcp_context_info{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(161, Instance, <<>>); encode_v1_element(#additional_trace_info{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(162, Instance, <<>>); encode_v1_element(#hop_counter{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(163, Instance, <<>>); encode_v1_element(#selected_plmn_id{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(164, Instance, <<>>); encode_v1_element(#mbms_session_identifier{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(165, Instance, <<>>); encode_v1_element(#mbms_2g_3g_indicator{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(166, Instance, <<>>); encode_v1_element(#enhanced_nsapi{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(167, Instance, <<>>); encode_v1_element(#mbms_session_duration{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(168, Instance, <<>>); encode_v1_element(#additional_mbms_trace_info{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(169, Instance, <<>>); encode_v1_element(#mbms_session_repetition_number{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(170, Instance, <<>>); encode_v1_element(#mbms_time_to_data_transfer{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(171, Instance, <<>>); encode_v1_element(#bss_container{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(173, Instance, <<>>); encode_v1_element(#cell_identification{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(174, Instance, <<>>); encode_v1_element(#pdu_numbers{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(175, Instance, <<>>); encode_v1_element(#bssgp_cause{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(176, Instance, <<>>); encode_v1_element(#required_mbms_bearer_capabilities{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(177, Instance, <<>>); encode_v1_element(#rim_routing_address_discriminator{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(178, Instance, <<>>); encode_v1_element(#list_of_set_up_pfcs{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(179, Instance, <<>>); encode_v1_element(#ps_handover_xid_parameters{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(180, Instance, <<>>); encode_v1_element(#ms_info_change_reporting_action{ - instance = Instance, - action = M_action}) -> + instance = Instance, + action = M_action}) -> encode_v1_element(181, Instance, <<(enum_action(M_action)):8/integer>>); encode_v1_element(#direct_tunnel_flags{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(182, Instance, <<>>); encode_v1_element(#correlation_id{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(183, Instance, <<>>); encode_v1_element(#bearer_control_mode{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(184, Instance, <<>>); encode_v1_element(#mbms_flow_identifier{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(185, Instance, <<>>); encode_v1_element(#mbms_ip_multicast_distribution{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(186, Instance, <<>>); encode_v1_element(#mbms_distribution_acknowledgement{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(187, Instance, <<>>); encode_v1_element(#reliable_inter_rat_handover_info{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(188, Instance, <<>>); encode_v1_element(#rfsp_index{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(189, Instance, <<>>); encode_v1_element(#fully_qualified_domain_name{ - instance = Instance, - fqdn = M_fqdn}) -> + instance = Instance, + fqdn = M_fqdn}) -> encode_v1_element(190, Instance, <<(encode_fqdn(M_fqdn))/binary>>); encode_v1_element(#evolved_allocation_retention_priority_i{ - instance = Instance, - pci = M_pci, - pl = M_pl, - pvi = M_pvi}) -> + instance = Instance, + pci = M_pci, + pl = M_pl, + pvi = M_pvi}) -> encode_v1_element(191, Instance, <<0:1, - M_pci:1, - M_pl:4, - 0:1, - M_pvi:1>>); + M_pci:1, + M_pl:4, + 0:1, + M_pvi:1>>); encode_v1_element(#evolved_allocation_retention_priority_ii{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(192, Instance, <<>>); encode_v1_element(#extended_common_flags{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v1_element(193, Instance, <<(encode_min_int(8, encode_flags(M_flags, ['Unauthenticated IMSI','CCRSI', - 'CPSR','RetLoc','VB','PCRI','BDWI', - 'UASI']), little))/binary>>); + 'CPSR','RetLoc','VB','PCRI','BDWI', + 'UASI']), little))/binary>>); encode_v1_element(#user_csg_information{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(194, Instance, <<>>); encode_v1_element(#csg_information_reporting_action{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(195, Instance, <<>>); encode_v1_element(#csg_id{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(196, Instance, <<>>); encode_v1_element(#csg_membership_indication{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(197, Instance, <<>>); encode_v1_element(#aggregate_maximum_bit_rate{ - instance = Instance, - uplink = M_uplink, - downlink = M_downlink}) -> + instance = Instance, + uplink = M_uplink, + downlink = M_downlink}) -> encode_v1_element(198, Instance, <>); + M_downlink:32>>); encode_v1_element(#ue_network_capability{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(199, Instance, <<>>); encode_v1_element(#ue_ambr{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(200, Instance, <<>>); encode_v1_element(#apn_ambr_with_nsapi{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(201, Instance, <<>>); encode_v1_element(#ggsn_back_off_time{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(202, Instance, <<>>); encode_v1_element(#signalling_priority_indication{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(203, Instance, <<>>); encode_v1_element(#signalling_priority_indication_with_nsapi{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(204, Instance, <<>>); encode_v1_element(#higher_bitrates_than_16_mbps_flag{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(205, Instance, <<>>); encode_v1_element(#additional_mm_context_for_srvcc{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(207, Instance, <<>>); encode_v1_element(#additional_flags_for_srvcc{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(208, Instance, <<>>); encode_v1_element(#stn_sr{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(209, Instance, <<>>); encode_v1_element(#c_msisdn{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(210, Instance, <<>>); encode_v1_element(#extended_ranap_cause{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(211, Instance, <<>>); encode_v1_element(#enodeb_id{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(212, Instance, <<>>); encode_v1_element(#selection_mode_with_nsapi{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(213, Instance, <<>>); encode_v1_element(#uli_timestamp{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(214, Instance, <<>>); encode_v1_element(#local_home_network_id_with_nsapi{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(215, Instance, <<>>); encode_v1_element(#cn_operator_selection_entity{ - instance = Instance}) -> + instance = Instance}) -> encode_v1_element(216, Instance, <<>>); encode_v1_element(#sequence_numbers_of_released_packets{ - instance = Instance, - sequence_numbers = M_sequence_numbers}) -> + instance = Instance, + sequence_numbers = M_sequence_numbers}) -> encode_v1_element(249, Instance, <<(encode_array_of_seq_no(M_sequence_numbers))/binary>>); encode_v1_element(#sequence_numbers_of_cancelled_packets{ - instance = Instance, - sequence_numbers = M_sequence_numbers}) -> + instance = Instance, + sequence_numbers = M_sequence_numbers}) -> encode_v1_element(250, Instance, <<(encode_array_of_seq_no(M_sequence_numbers))/binary>>); encode_v1_element(#charging_gateway_address{ - instance = Instance, - address = M_address}) -> + instance = Instance, + address = M_address}) -> encode_v1_element(251, Instance, <>); encode_v1_element(#data_record_packet{instance = Instance} = IE) -> encode_v1_element(252, Instance, encode_data_record_packet(IE)); encode_v1_element(#requests_responded{ - instance = Instance, - sequence_numbers = M_sequence_numbers}) -> + instance = Instance, + sequence_numbers = M_sequence_numbers}) -> encode_v1_element(253, Instance, <<(encode_array_of_seq_no(M_sequence_numbers))/binary>>); encode_v1_element(#address_of_recommended_node{ - instance = Instance, - address = M_address}) -> + instance = Instance, + address = M_address}) -> encode_v1_element(254, Instance, <>); encode_v1_element(#private_extension{ - instance = Instance, - enterprise_id = M_enterprise_id, - value = M_value}) -> + instance = Instance, + enterprise_id = M_enterprise_id, + value = M_value}) -> encode_v1_element(255, Instance, <>); + M_value/binary>>); encode_v1_element({Tag, Instance, Value}) when is_integer(Tag), is_integer(Instance), is_binary(Value) -> encode_v1_element(Tag, Instance, Value). @@ -3195,148 +3200,148 @@ enum_v2_v2_cause(X) when is_integer(X) -> X. decode_v2_element(<>, 1, Instance) -> #v2_international_mobile_subscriber_identity{instance = Instance, - imsi = decode_tbcd(M_imsi)}; + imsi = decode_tbcd(M_imsi)}; decode_v2_element(<>, 2, Instance) -> + _:5, + M_pce:1/integer, + M_bce:1/integer, + M_cs:1/integer, + M_offending_ie:4/bytes, + _/binary>>, 2, Instance) -> #v2_cause{instance = Instance, - v2_cause = enum_v2_v2_cause(M_v2_cause), - pce = M_pce, - bce = M_bce, - cs = M_cs, - offending_ie = M_offending_ie}; + v2_cause = enum_v2_v2_cause(M_v2_cause), + pce = M_pce, + bce = M_bce, + cs = M_cs, + offending_ie = M_offending_ie}; decode_v2_element(<>, 2, Instance) -> + _:5, + M_pce:1/integer, + M_bce:1/integer, + M_cs:1/integer, + _/binary>>, 2, Instance) -> #v2_cause{instance = Instance, - v2_cause = enum_v2_v2_cause(M_v2_cause), - pce = M_pce, - bce = M_bce, - cs = M_cs}; + v2_cause = enum_v2_v2_cause(M_v2_cause), + pce = M_pce, + bce = M_bce, + cs = M_cs}; decode_v2_element(<>, 3, Instance) -> + _/binary>>, 3, Instance) -> #v2_recovery{instance = Instance, - restart_counter = M_restart_counter}; + restart_counter = M_restart_counter}; decode_v2_element(<<>>, 51, Instance) -> #v2_stn_sr{instance = Instance}; decode_v2_element(<>, 71, Instance) -> #v2_access_point_name{instance = Instance, - apn = decode_fqdn(M_apn)}; + apn = decode_fqdn(M_apn)}; decode_v2_element(<>, 72, Instance) -> + M_downlink:32/integer>>, 72, Instance) -> #v2_aggregate_maximum_bit_rate{instance = Instance, - uplink = M_uplink, - downlink = M_downlink}; + uplink = M_uplink, + downlink = M_downlink}; decode_v2_element(<<_:4, - M_eps_bearer_id:4/integer, - _/binary>>, 73, Instance) -> + M_eps_bearer_id:4/integer, + _/binary>>, 73, Instance) -> #v2_eps_bearer_id{instance = Instance, - eps_bearer_id = M_eps_bearer_id}; + eps_bearer_id = M_eps_bearer_id}; decode_v2_element(<>, 74, Instance) -> #v2_ip_address{instance = Instance, - ip = M_ip}; + ip = M_ip}; decode_v2_element(<>, 75, Instance) -> #v2_mobile_equipment_identity{instance = Instance, - mei = decode_tbcd(M_mei)}; + mei = decode_tbcd(M_mei)}; decode_v2_element(<>, 76, Instance) -> #v2_msisdn{instance = Instance, - msisdn = decode_tbcd(M_msisdn)}; + msisdn = decode_tbcd(M_msisdn)}; decode_v2_element(<>, 77, Instance) -> #v2_indication{instance = Instance, - flags = decode_flags(M_flags, ['DAF','DTF','HI','DFI','OI','ISRSI','ISRAI', - 'SGWCI','SQCI','UIMSI','CFSI','CRSI','P','PT', - 'SI','MSV','RetLoc','PBIC','SRNI','S6AF', - 'S4AF','MBMDT','ISRAU','CCRSI','CPRAI','ARRL', - 'PPOF','PPON/PPEI','PPSI','CSFBI','CLII', - 'CPSR','NSI','UASI','DTCI','BDWI','PSCI', - 'PCRI','AOSI','AOPI','ROAAI','EPCOSI','CPOPCI', - 'PMTSMI','S11TF','PNSI','UNACCSI','WPMSI', - '5GSNN26','REPREFI','5GSIWK','EEVRSI','LTEMUI', - 'LTEMPI','ENBCRSI','TSPCMI','CSRMFI','MTEDTN', - 'MTEDTA','N5GNMI','5GCNRS','5GCNRI','5SRHOI', - 'ETHPDN','_','_','_','_','SISSME','NSENBI', - 'IPFUPF','EMCI'])}; + flags = decode_flags(M_flags, ['DAF','DTF','HI','DFI','OI','ISRSI','ISRAI', + 'SGWCI','SQCI','UIMSI','CFSI','CRSI','P','PT', + 'SI','MSV','RetLoc','PBIC','SRNI','S6AF', + 'S4AF','MBMDT','ISRAU','CCRSI','CPRAI','ARRL', + 'PPOF','PPON/PPEI','PPSI','CSFBI','CLII', + 'CPSR','NSI','UASI','DTCI','BDWI','PSCI', + 'PCRI','AOSI','AOPI','ROAAI','EPCOSI','CPOPCI', + 'PMTSMI','S11TF','PNSI','UNACCSI','WPMSI', + '5GSNN26','REPREFI','5GSIWK','EEVRSI','LTEMUI', + 'LTEMPI','ENBCRSI','TSPCMI','CSRMFI','MTEDTN', + 'MTEDTA','N5GNMI','5GCNRS','5GCNRI','5SRHOI', + 'ETHPDN','_','_','_','_','SISSME','NSENBI', + 'IPFUPF','EMCI'])}; decode_v2_element(<>, 78, Instance) -> #v2_protocol_configuration_options{instance = Instance, - config = decode_protocol_config_opts(M_config)}; + config = decode_protocol_config_opts(M_config)}; decode_v2_element(<<_:5, - M_type:3/integer, - M_address/binary>>, 79, Instance) -> + M_type:3/integer, + M_address/binary>>, 79, Instance) -> #v2_pdn_address_allocation{instance = Instance, - type = enum_v2_type(M_type), - address = M_address}; + type = enum_v2_type(M_type), + address = M_address}; decode_v2_element(<<_:1, - M_pci:1/integer, - M_pl:4/integer, - _:1, - M_pvi:1/integer, - M_label:8/integer, - M_maximum_bit_rate_for_uplink:40/integer, - M_maximum_bit_rate_for_downlink:40/integer, - M_guaranteed_bit_rate_for_uplink:40/integer, - M_guaranteed_bit_rate_for_downlink:40/integer, - _/binary>>, 80, Instance) -> + M_pci:1/integer, + M_pl:4/integer, + _:1, + M_pvi:1/integer, + M_label:8/integer, + M_maximum_bit_rate_for_uplink:40/integer, + M_maximum_bit_rate_for_downlink:40/integer, + M_guaranteed_bit_rate_for_uplink:40/integer, + M_guaranteed_bit_rate_for_downlink:40/integer, + _/binary>>, 80, Instance) -> #v2_bearer_level_quality_of_service{instance = Instance, - pci = M_pci, - pl = M_pl, - pvi = M_pvi, - label = M_label, - maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, - maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, - guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, - guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}; + pci = M_pci, + pl = M_pl, + pvi = M_pvi, + label = M_label, + maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, + maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, + guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, + guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}; decode_v2_element(<>, 81, Instance) -> + M_maximum_bit_rate_for_uplink:40/integer, + M_maximum_bit_rate_for_downlink:40/integer, + M_guaranteed_bit_rate_for_uplink:40/integer, + M_guaranteed_bit_rate_for_downlink:40/integer, + _/binary>>, 81, Instance) -> #v2_flow_quality_of_service{instance = Instance, - label = M_label, - maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, - maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, - guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, - guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}; + label = M_label, + maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, + maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, + guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, + guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}; decode_v2_element(<>, 82, Instance) -> + _/binary>>, 82, Instance) -> #v2_rat_type{instance = Instance, - rat_type = M_rat_type}; + rat_type = M_rat_type}; decode_v2_element(<>, 83, Instance) -> + _/binary>>, 83, Instance) -> #v2_serving_network{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}}; decode_v2_element(<>, 84, Instance) -> #v2_eps_bearer_level_traffic_flow_template{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 85, Instance) -> #v2_traffic_aggregation_description{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 86, Instance) -> decode_v2_user_location_information(Data, Instance); @@ -3346,79 +3351,79 @@ decode_v2_element(<>, 87, Instance) -> decode_v2_element(<>, 88, Instance) -> #v2_tmsi{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 89, Instance) -> + M_value/binary>>, 89, Instance) -> #v2_global_cn_id{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, - value = M_value}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, + value = M_value}; decode_v2_element(<>, 90, Instance) -> + M_gre_key:32/integer, + M_eps_bearer_id_len:8/integer, M_eps_bearer_id_Rest/binary>>, 90, Instance) -> M_eps_bearer_id_size = M_eps_bearer_id_len * 8, <> = M_eps_bearer_id_Rest, #v2_s103_pdn_data_forwarding_info{instance = Instance, - hsgw_address = M_hsgw_address, - gre_key = M_gre_key, - eps_bearer_id = [X || <> <= M_eps_bearer_id]}; + hsgw_address = M_hsgw_address, + gre_key = M_gre_key, + eps_bearer_id = [X || <> <= M_eps_bearer_id]}; decode_v2_element(<>, 91, Instance) -> + M_teid:32/integer>>, 91, Instance) -> #v2_s1_u_data_forwarding_info{instance = Instance, - service_gw_address = M_service_gw_address, - teid = M_teid}; + service_gw_address = M_service_gw_address, + teid = M_teid}; decode_v2_element(<>, 92, Instance) -> + _/binary>>, 92, Instance) -> #v2_delay_value{instance = Instance, - delay = M_delay}; + delay = M_delay}; decode_v2_element(<>, 93, Instance) -> #v2_bearer_context{instance = Instance, - group = decode_v2_grouped(M_group)}; + group = decode_v2_grouped(M_group)}; decode_v2_element(<>, 94, Instance) -> + _/binary>>, 94, Instance) -> #v2_charging_id{instance = Instance, - id = M_id}; + id = M_id}; decode_v2_element(<>, 95, Instance) -> + _/binary>>, 95, Instance) -> #v2_charging_characteristics{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 96, Instance) -> + M_trace_id:32/integer, + M_triggering_events:9/bytes, + M_list_of_ne_types:16/integer, + M_session_trace_depth:8/integer, + M_list_of_interfaces:12/bytes, + M_ip_address_of_trace_collection_entity/binary>>, 96, Instance) -> #v2_trace_information{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, - trace_id = M_trace_id, - triggering_events = M_triggering_events, - list_of_ne_types = M_list_of_ne_types, - session_trace_depth = M_session_trace_depth, - list_of_interfaces = M_list_of_interfaces, - ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, + trace_id = M_trace_id, + triggering_events = M_triggering_events, + list_of_ne_types = M_list_of_ne_types, + session_trace_depth = M_session_trace_depth, + list_of_interfaces = M_list_of_interfaces, + ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}; decode_v2_element(<>, 97, Instance) -> #v2_bearer_flags{instance = Instance, - flags = decode_flags(M_flags, ['_','_','_','_','ASI','Vind','VB','PCC'])}; + flags = decode_flags(M_flags, ['_','_','_','_','ASI','Vind','VB','PCC'])}; decode_v2_element(<<_:4, - M_pdn_type:4/integer, - _/binary>>, 99, Instance) -> + M_pdn_type:4/integer, + _/binary>>, 99, Instance) -> #v2_pdn_type{instance = Instance, - pdn_type = enum_v2_pdn_type(M_pdn_type)}; + pdn_type = enum_v2_pdn_type(M_pdn_type)}; decode_v2_element(<>, 100, Instance) -> + _/binary>>, 100, Instance) -> #v2_procedure_transaction_id{instance = Instance, - pti = M_pti}; + pti = M_pti}; decode_v2_element(<<>>, 103, Instance) -> #v2_mm_context_1{instance = Instance}; @@ -3440,172 +3445,172 @@ decode_v2_element(<<>>, 108, Instance) -> decode_v2_element(<>, 109, Instance) -> #v2_pdn_connection{instance = Instance, - group = decode_v2_grouped(M_group)}; + group = decode_v2_grouped(M_group)}; decode_v2_element(<<_:4, - M_nsapi:4/integer, - M_dl_gtp_u_sequence_number:16/integer, - M_ul_gtp_u_sequence_number:16/integer, - M_send_n_pdu_number:16/integer, - M_receive_n_pdu_number:16/integer, - _/binary>>, 110, Instance) -> + M_nsapi:4/integer, + M_dl_gtp_u_sequence_number:16/integer, + M_ul_gtp_u_sequence_number:16/integer, + M_send_n_pdu_number:16/integer, + M_receive_n_pdu_number:16/integer, + _/binary>>, 110, Instance) -> #v2_pdu_numbers{instance = Instance, - nsapi = M_nsapi, - dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, - ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, - send_n_pdu_number = M_send_n_pdu_number, - receive_n_pdu_number = M_receive_n_pdu_number}; + nsapi = M_nsapi, + dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, + ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, + send_n_pdu_number = M_send_n_pdu_number, + receive_n_pdu_number = M_receive_n_pdu_number}; decode_v2_element(<>, 111, Instance) -> #v2_p_tmsi{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 112, Instance) -> #v2_p_tmsi_signature{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 113, Instance) -> + _/binary>>, 113, Instance) -> #v2_hop_counter{instance = Instance, - hop_counter = M_hop_counter}; + hop_counter = M_hop_counter}; decode_v2_element(<>, 114, Instance) -> + _:6, + M_dst:2/integer, + _/binary>>, 114, Instance) -> #v2_ue_time_zone{instance = Instance, - timezone = M_timezone, - dst = M_dst}; + timezone = M_timezone, + dst = M_dst}; decode_v2_element(<>, 115, Instance) -> + M_id:24/integer>>, 115, Instance) -> #v2_trace_reference{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, - id = M_id}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, + id = M_id}; decode_v2_element(<>, 116, Instance) -> + M_message/binary>>, 116, Instance) -> #v2_complete_request_message{instance = Instance, - type = M_type, - message = M_message}; + type = M_type, + message = M_message}; decode_v2_element(<>, 117, Instance) -> + M_group_id:16/integer, + M_code:24/integer, + M_m_tmsi/binary>>, 117, Instance) -> #v2_guti{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, - group_id = M_group_id, - code = M_code, - m_tmsi = M_m_tmsi}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, + group_id = M_group_id, + code = M_code, + m_tmsi = M_m_tmsi}; decode_v2_element(<<_:4, - M_type:4/integer, - M_data/binary>>, 118, Instance) -> + M_type:4/integer, + M_data/binary>>, 118, Instance) -> #v2_f_container{instance = Instance, - type = M_type, - data = M_data}; + type = M_type, + data = M_data}; decode_v2_element(<<_:4, - M_type:4/integer, - M_data/binary>>, 119, Instance) -> + M_type:4/integer, + M_data/binary>>, 119, Instance) -> #v2_f_cause{instance = Instance, - type = M_type, - data = M_data}; + type = M_type, + data = M_data}; decode_v2_element(<>, 120, Instance) -> #v2_plmn_id{instance = Instance, - id = M_id}; + id = M_id}; decode_v2_element(<>, 121, Instance) -> + M_data/binary>>, 121, Instance) -> #v2_target_identification{instance = Instance, - type = M_type, - data = M_data}; + type = M_type, + data = M_data}; decode_v2_element(<<_:4, - M_ebi:4/integer, - M_flow_id/binary>>, 123, Instance) -> + M_ebi:4/integer, + M_flow_id/binary>>, 123, Instance) -> #v2_packet_flow_id{instance = Instance, - ebi = M_ebi, - flow_id = M_flow_id}; + ebi = M_ebi, + flow_id = M_flow_id}; decode_v2_element(<>, 124, Instance) -> + M_dlpsi:1/integer, + M_ulgsi:1/integer, + M_dlgsi:1/integer, + M_nsapi:4/integer, + M_dl_gtp_u_sequence_number:16/integer, + M_ul_gtp_u_sequence_number:16/integer, + M_dl_pdcp_number:16/integer, + M_ul_pdcp_number:16/integer>>, 124, Instance) -> #v2_rab_context{instance = Instance, - ulpsi = M_ulpsi, - dlpsi = M_dlpsi, - ulgsi = M_ulgsi, - dlgsi = M_dlgsi, - nsapi = M_nsapi, - dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, - ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, - dl_pdcp_number = M_dl_pdcp_number, - ul_pdcp_number = M_ul_pdcp_number}; + ulpsi = M_ulpsi, + dlpsi = M_dlpsi, + ulgsi = M_ulgsi, + dlgsi = M_dlgsi, + nsapi = M_nsapi, + dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, + ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, + dl_pdcp_number = M_dl_pdcp_number, + ul_pdcp_number = M_ul_pdcp_number}; decode_v2_element(<>, 125, Instance) -> #v2_source_rnc_pdcp_context_info{instance = Instance, - rrc_container = M_rrc_container}; + rrc_container = M_rrc_container}; decode_v2_element(<>, 126, Instance) -> + _/binary>>, 126, Instance) -> #v2_udp_source_port_number{instance = Instance, - port = M_port}; + port = M_port}; decode_v2_element(<>, 127, Instance) -> + _/binary>>, 127, Instance) -> #v2_apn_restriction{instance = Instance, - restriction_type_value = M_restriction_type_value}; + restriction_type_value = M_restriction_type_value}; decode_v2_element(<<_:6, - M_mode:2/integer, - _/binary>>, 128, Instance) -> + M_mode:2/integer, + _/binary>>, 128, Instance) -> #v2_selection_mode{instance = Instance, - mode = M_mode}; + mode = M_mode}; decode_v2_element(<>, 129, Instance) -> + M_source_type:8/integer, + M_source_id/binary>>, 129, Instance) -> #v2_source_identification{instance = Instance, - target_cell_id = M_target_cell_id, - source_type = M_source_type, - source_id = M_source_id}; + target_cell_id = M_target_cell_id, + source_type = M_source_type, + source_id = M_source_id}; decode_v2_element(<>, 131, Instance) -> + _/binary>>, 131, Instance) -> #v2_change_reporting_action{instance = Instance, - action = enum_v2_action(M_action)}; + action = enum_v2_action(M_action)}; decode_v2_element(<>, 132, Instance) -> decode_v2_fully_qualified_pdn_connection_set_identifier(Data, Instance); decode_v2_element(<>, 133, Instance) -> #v2_channel_needed{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 134, Instance) -> #v2_emlpp_priority{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 135, Instance) -> + _/binary>>, 135, Instance) -> #v2_node_type{instance = Instance, - node_type = M_node_type}; + node_type = M_node_type}; decode_v2_element(<>, 136, Instance) -> #v2_fully_qualified_domain_name{instance = Instance, - fqdn = decode_fqdn(M_fqdn)}; + fqdn = decode_fqdn(M_fqdn)}; decode_v2_element(<>, 137, Instance) -> #v2_transaction_identifier{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<<>>, 138, Instance) -> #v2_mbms_session_duration{instance = Instance}; @@ -3627,177 +3632,177 @@ decode_v2_element(<<>>, 143, Instance) -> decode_v2_element(<>, 144, Instance) -> #v2_rfsp_index{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 145, Instance) -> + _:5, + M_csg_id:27/bits, + M_access_mode:2/integer, + _:4, + M_lcsg:1/integer, + M_cmi:1/integer>>, 145, Instance) -> #v2_user_csg_information{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, - csg_id = M_csg_id, - access_mode = M_access_mode, - lcsg = int2bool(M_lcsg), - cmi = M_cmi}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, + csg_id = M_csg_id, + access_mode = M_access_mode, + lcsg = int2bool(M_lcsg), + cmi = M_cmi}; decode_v2_element(<>, 146, Instance) -> #v2_csg_information_reporting_action{instance = Instance, - actions = decode_flags(M_actions, ['_','_','_','_','_','UCIUHC','UCISHC', - 'UCICSG'])}; + actions = decode_flags(M_actions, ['_','_','_','_','_','UCIUHC','UCISHC', + 'UCICSG'])}; decode_v2_element(<<_:5, - M_id:27/bits, - _/binary>>, 147, Instance) -> + M_id:27/bits, + _/binary>>, 147, Instance) -> #v2_csg_id{instance = Instance, - id = M_id}; + id = M_id}; decode_v2_element(<<_:7, - M_cmi:1/integer, - _/binary>>, 148, Instance) -> + M_cmi:1/integer, + _/binary>>, 148, Instance) -> #v2_csg_membership_indication{instance = Instance, - cmi = M_cmi}; + cmi = M_cmi}; decode_v2_element(<>, 149, Instance) -> #v2_service_indicator{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 150, Instance) -> #v2_detach_type{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 151, Instance) -> #v2_local_distiguished_name{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 152, Instance) -> #v2_node_features{instance = Instance, - features = decode_flags(M_features, ['_','_','ETH','S1UN','CIOT','NTSR', - 'MABR','PRN'])}; + features = decode_flags(M_features, ['_','_','ETH','S1UN','CIOT','NTSR', + 'MABR','PRN'])}; decode_v2_element(<<>>, 153, Instance) -> #v2_mbms_time_to_data_transfer{instance = Instance}; decode_v2_element(<>, 154, Instance) -> + M_value:5/integer, + M_factor:8/integer, + _/binary>>, 154, Instance) -> #v2_throttling{instance = Instance, - unit = M_unit, - value = M_value, - factor = M_factor}; + unit = M_unit, + value = M_value, + factor = M_factor}; decode_v2_element(<<_:1, - M_pci:1/integer, - M_pl:4/integer, - _:1, - M_pvi:1/integer, - _/binary>>, 155, Instance) -> + M_pci:1/integer, + M_pl:4/integer, + _:1, + M_pvi:1/integer, + _/binary>>, 155, Instance) -> #v2_allocation_retention_priority{instance = Instance, - pci = int2bool(M_pci), - pl = M_pl, - pvi = int2bool(M_pvi)}; + pci = int2bool(M_pci), + pl = M_pl, + pvi = int2bool(M_pvi)}; decode_v2_element(<>, 156, Instance) -> + M_value:5/integer, + _/binary>>, 156, Instance) -> #v2_epc_timer{instance = Instance, - unit = M_unit, - value = M_value}; + unit = M_unit, + value = M_value}; decode_v2_element(<>, 157, Instance) -> #v2_signalling_priority_indication{instance = Instance, - indication = decode_flags(M_indication, ['_','_','_','_','_','_','_','LAPI'])}; + indication = decode_flags(M_indication, ['_','_','_','_','_','_','_','LAPI'])}; decode_v2_element(<<>>, 158, Instance) -> #v2_temporary_mobile_group_identity{instance = Instance}; decode_v2_element(<>, 159, Instance) -> + M_classmark_3_len:8/integer, M_classmark_3:M_classmark_3_len/bytes, + M_codec_list_len:8/integer, M_codec_list:M_codec_list_len/bytes, + _/binary>>, 159, Instance) -> #v2_additional_mm_context_for_srvcc{instance = Instance, - classmark_2 = M_classmark_2, - classmark_3 = M_classmark_3, - codec_list = M_codec_list}; + classmark_2 = M_classmark_2, + classmark_3 = M_classmark_3, + codec_list = M_codec_list}; decode_v2_element(<>, 160, Instance) -> #v2_additional_flags_for_srvcc{instance = Instance, - flags = decode_flags(M_flags, ['_','_','_','_','_','_','VF','ICS'])}; + flags = decode_flags(M_flags, ['_','_','_','_','_','_','VF','ICS'])}; decode_v2_element(<<>>, 162, Instance) -> #v2_mdt_configuration{instance = Instance}; decode_v2_element(<>, 163, Instance) -> #v2_additional_protocol_configuration_options{instance = Instance, - config = decode_protocol_config_opts(M_config)}; + config = decode_protocol_config_opts(M_config)}; decode_v2_element(<<>>, 164, Instance) -> #v2_absolute_time_of_mbms_data_transfer{instance = Instance}; decode_v2_element(<>, 165, Instance) -> #v2_henb_information_reporting_{instance = Instance, - flags = decode_flags(M_flags, ['_','_','_','_','_','_','_','FTI'])}; + flags = decode_flags(M_flags, ['_','_','_','_','_','_','_','FTI'])}; decode_v2_element(<>, 166, Instance) -> + M_default_route:4/bytes, + _/binary>>, 166, Instance) -> #v2_ipv4_configuration_parameters{instance = Instance, - prefix_length = M_prefix_length, - default_route = M_default_route}; + prefix_length = M_prefix_length, + default_route = M_default_route}; decode_v2_element(<>, 167, Instance) -> #v2_change_to_report_flags_{instance = Instance, - flags = decode_flags(M_flags, ['_','_','_','_','_','_','TZCR','SNCR'])}; + flags = decode_flags(M_flags, ['_','_','_','_','_','_','TZCR','SNCR'])}; decode_v2_element(<<_:5, - M_indication:3/integer, - _/binary>>, 168, Instance) -> + M_indication:3/integer, + _/binary>>, 168, Instance) -> #v2_action_indication{instance = Instance, - indication = M_indication}; + indication = M_indication}; decode_v2_element(<>, 169, Instance) -> decode_v2_twan_identifier(Data, Instance); decode_v2_element(<>, 170, Instance) -> + _/binary>>, 170, Instance) -> #v2_uli_timestamp{instance = Instance, - timestamp = M_timestamp}; + timestamp = M_timestamp}; decode_v2_element(<<>>, 171, Instance) -> #v2_mbms_flags{instance = Instance}; decode_v2_element(<>, 172, Instance) -> + M_type:4/integer, + M_cause/binary>>, 172, Instance) -> #v2_ran_nas_cause{instance = Instance, - protocol = M_protocol, - type = M_type, - cause = M_cause}; + protocol = M_protocol, + type = M_type, + cause = M_cause}; decode_v2_element(<<_:6, - M_entity:2/integer, - _/binary>>, 173, Instance) -> + M_entity:2/integer, + _/binary>>, 173, Instance) -> #v2_cn_operator_selection_entity{instance = Instance, - entity = M_entity}; + entity = M_entity}; decode_v2_element(<>, 174, Instance) -> #v2_trusted_wlan_mode_indication{instance = Instance, - indication = decode_flags(M_indication, ['_','_','_','_','_','_','MCM','SCM'])}; + indication = decode_flags(M_indication, ['_','_','_','_','_','_','MCM','SCM'])}; decode_v2_element(<>, 175, Instance) -> + _/binary>>, 175, Instance) -> #v2_node_number{instance = Instance, - number = M_number}; + number = M_number}; decode_v2_element(<>, 176, Instance) -> + M_realm_len:8/integer, M_realm:M_realm_len/bytes, + _/binary>>, 176, Instance) -> #v2_node_identifier{instance = Instance, - name = M_name, - realm = M_realm}; + name = M_name, + realm = M_realm}; decode_v2_element(<<>>, 177, Instance) -> #v2_presence_reporting_area_action{instance = Instance}; @@ -3806,37 +3811,37 @@ decode_v2_element(<<>>, 178, Instance) -> #v2_presence_reporting_area_information{instance = Instance}; decode_v2_element(<>, 179, Instance) -> + _/binary>>, 179, Instance) -> #v2_twan_identifier_timestamp{instance = Instance, - timestamp = M_timestamp}; + timestamp = M_timestamp}; decode_v2_element(<>, 180, Instance) -> #v2_overload_control_information{instance = Instance, - group = decode_v2_grouped(M_group)}; + group = decode_v2_grouped(M_group)}; decode_v2_element(<>, 181, Instance) -> #v2_load_control_information{instance = Instance, - group = decode_v2_grouped(M_group)}; + group = decode_v2_grouped(M_group)}; decode_v2_element(<>, 182, Instance) -> #v2_metric{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 183, Instance) -> #v2_sequence_number{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 184, Instance) -> + M_apn_len:8/integer, M_apn:M_apn_len/bytes, + _/binary>>, 184, Instance) -> #v2_apn_and_relative_capacity{instance = Instance, - capacity = M_capacity, - apn = M_apn}; + capacity = M_capacity, + apn = M_apn}; decode_v2_element(<>, 185, Instance) -> #v2_wlan_offloadability_indication{instance = Instance, - indication = decode_flags(M_indication, ['_','_','_','_','_','_','EUTRAN', - 'UTRAN'])}; + indication = decode_flags(M_indication, ['_','_','_','_','_','_','EUTRAN', + 'UTRAN'])}; decode_v2_element(<>, 186, Instance) -> decode_v2_paging_and_service_information(Data, Instance); @@ -3845,9 +3850,9 @@ decode_v2_element(<>, 187, Instance) -> decode_v2_integer_number(Data, Instance); decode_v2_element(<>, 188, Instance) -> + _/binary>>, 188, Instance) -> #v2_millisecond_time_stamp{instance = Instance, - timestamp = M_timestamp}; + timestamp = M_timestamp}; decode_v2_element(<<>>, 189, Instance) -> #v2_monitoring_event_information{instance = Instance}; @@ -3857,120 +3862,120 @@ decode_v2_element(<>, 190, Instance <> = M_ecgis_Rest, #v2_ecgi_list{instance = Instance, - ecgis = [X || <> <= M_ecgis]}; + ecgis = [X || <> <= M_ecgis]}; decode_v2_element(<>, 191, Instance) -> #v2_remote_ue_context{instance = Instance, - group = decode_v2_grouped(M_group)}; + group = decode_v2_grouped(M_group)}; decode_v2_element(<>, 192, Instance) -> decode_v2_remote_user_id(Data, Instance); decode_v2_element(<>, 193, Instance) -> #v2_remote_ue_ip_information{instance = Instance, - ip = M_ip}; + ip = M_ip}; decode_v2_element(<>, 194, Instance) -> #v2_ciot_optimizations_support_indication{instance = Instance, - indication = decode_flags(M_indication, ['_','_','_','_','IHCSI','AWOPDN', - 'SCNIPDN','SGNIPDN'])}; + indication = decode_flags(M_indication, ['_','_','_','_','IHCSI','AWOPDN', + 'SCNIPDN','SGNIPDN'])}; decode_v2_element(<>, 195, Instance) -> #v2_scef_pdn_connection{instance = Instance, - group = decode_v2_grouped(M_group)}; + group = decode_v2_grouped(M_group)}; decode_v2_element(<>, 196, Instance) -> + M_max_cid:16/integer, + _/binary>>, 196, Instance) -> #v2_header_compression_configuration{instance = Instance, - rohc_profiles = M_rohc_profiles, - max_cid = M_max_cid}; + rohc_profiles = M_rohc_profiles, + max_cid = M_max_cid}; decode_v2_element(<>, 197, Instance) -> #v2_extended_protocol_configuration_options{instance = Instance, - config = decode_protocol_config_opts(M_config)}; + config = decode_protocol_config_opts(M_config)}; decode_v2_element(<>, 198, Instance) -> + M_downlink:16/integer, + _/binary>>, 198, Instance) -> #v2_serving_plmn_rate_control{instance = Instance, - uplink = M_uplink, - downlink = M_downlink}; + uplink = M_uplink, + downlink = M_downlink}; decode_v2_element(<>, 199, Instance) -> + M_counter:8/integer, + _/binary>>, 199, Instance) -> #v2_counter{instance = Instance, - timestamp = M_timestamp, - counter = M_counter}; + timestamp = M_timestamp, + counter = M_counter}; decode_v2_element(<>, 200, Instance) -> + _/binary>>, 200, Instance) -> #v2_mapped_ue_usage_type{instance = Instance, - usage_type = M_usage_type}; + usage_type = M_usage_type}; decode_v2_element(<<_:6, - M_irsgw:1/integer, - M_irpgw:1/integer, - M_rat_type:8/integer, - _:4, - M_ebi:4/integer, - M_start_time:32/integer, - M_end_time:32/integer, - M_dl:64/integer, - M_ul:64/integer, - _/binary>>, 201, Instance) -> + M_irsgw:1/integer, + M_irpgw:1/integer, + M_rat_type:8/integer, + _:4, + M_ebi:4/integer, + M_start_time:32/integer, + M_end_time:32/integer, + M_dl:64/integer, + M_ul:64/integer, + _/binary>>, 201, Instance) -> #v2_secondary_rat_usage_data_report{instance = Instance, - irsgw = int2bool(M_irsgw), - irpgw = int2bool(M_irpgw), - rat_type = M_rat_type, - ebi = M_ebi, - start_time = M_start_time, - end_time = M_end_time, - dl = M_dl, - ul = M_ul}; + irsgw = int2bool(M_irsgw), + irpgw = int2bool(M_irpgw), + rat_type = M_rat_type, + ebi = M_ebi, + start_time = M_start_time, + end_time = M_end_time, + dl = M_dl, + ul = M_ul}; decode_v2_element(<>, 202, Instance) -> #v2_up_function_selection_indication_flags{instance = Instance, - indication = decode_flags(M_indication, ['_','_','_','_','_','_','_','DCNR'])}; + indication = decode_flags(M_indication, ['_','_','_','_','_','_','_','DCNR'])}; decode_v2_element(<>, 203, Instance) -> decode_v2_maximum_packet_loss_rate(Data, Instance); decode_v2_element(<>, 204, Instance) -> + M_number_of_additional_exception_reports:32/integer, + M_number_of_downlink_packets_allowed:32/integer, + M_apn_rate_control_status_validity_time:64/integer, + _/binary>>, 204, Instance) -> #v2_apn_rate_control_status{instance = Instance, - number_of_uplink_packets_allowed = M_number_of_uplink_packets_allowed, - number_of_additional_exception_reports = M_number_of_additional_exception_reports, - number_of_downlink_packets_allowed = M_number_of_downlink_packets_allowed, - apn_rate_control_status_validity_time = M_apn_rate_control_status_validity_time}; + number_of_uplink_packets_allowed = M_number_of_uplink_packets_allowed, + number_of_additional_exception_reports = M_number_of_additional_exception_reports, + number_of_downlink_packets_allowed = M_number_of_downlink_packets_allowed, + apn_rate_control_status_validity_time = M_apn_rate_control_status_validity_time}; decode_v2_element(<>, 205, Instance) -> + M_trace_id:32/integer, + M_triggering_events_len:8/integer, M_triggering_events:M_triggering_events_len/bytes, + M_list_of_ne_types_len:8/integer, M_list_of_ne_types:M_list_of_ne_types_len/bytes, + M_session_trace_depth:8/integer, + M_list_of_interfaces_len:8/integer, M_list_of_interfaces:M_list_of_interfaces_len/bytes, + M_ip_address_of_trace_collection_entity_len:8/integer, M_ip_address_of_trace_collection_entity:M_ip_address_of_trace_collection_entity_len/bytes, + _/binary>>, 205, Instance) -> #v2_extended_trace_information{instance = Instance, - plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, - trace_id = M_trace_id, - triggering_events = M_triggering_events, - list_of_ne_types = M_list_of_ne_types, - session_trace_depth = M_session_trace_depth, - list_of_interfaces = M_list_of_interfaces, - ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}; + plmn_id = {decode_mcc(M_plmn), decode_mnc(M_plmn)}, + trace_id = M_trace_id, + triggering_events = M_triggering_events, + list_of_ne_types = M_list_of_ne_types, + session_trace_depth = M_session_trace_depth, + list_of_interfaces = M_list_of_interfaces, + ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}; decode_v2_element(<>, 206, Instance) -> decode_v2_monitoring_event_extension_information(Data, Instance); decode_v2_element(<>, 207, Instance) -> #v2_additional_rrm_policy_index{instance = Instance, - value = M_value}; + value = M_value}; decode_v2_element(<>, 255, Instance) -> decode_v2_private_extension(Data, Instance); @@ -3979,166 +3984,166 @@ decode_v2_element(Value, Tag, Instance) -> {Tag, Instance, Value}. encode_v2_element(#v2_international_mobile_subscriber_identity{ - instance = Instance, - imsi = M_imsi}) -> + instance = Instance, + imsi = M_imsi}) -> encode_v2_element(1, Instance, <<(encode_tbcd(M_imsi))/binary>>); encode_v2_element(#v2_cause{ - instance = Instance, - v2_cause = M_v2_cause, - pce = M_pce, - bce = M_bce, - cs = M_cs, - offending_ie = undefined}) -> + instance = Instance, + v2_cause = M_v2_cause, + pce = M_pce, + bce = M_bce, + cs = M_cs, + offending_ie = undefined}) -> encode_v2_element(2, Instance, <<(enum_v2_v2_cause(M_v2_cause)):8/integer, - 0:5, - M_pce:1/integer, - M_bce:1/integer, - M_cs:1/integer>>); + 0:5, + M_pce:1/integer, + M_bce:1/integer, + M_cs:1/integer>>); encode_v2_element(#v2_cause{ - instance = Instance, - v2_cause = M_v2_cause, - pce = M_pce, - bce = M_bce, - cs = M_cs, - offending_ie = M_offending_ie}) -> + instance = Instance, + v2_cause = M_v2_cause, + pce = M_pce, + bce = M_bce, + cs = M_cs, + offending_ie = M_offending_ie}) -> encode_v2_element(2, Instance, <<(enum_v2_v2_cause(M_v2_cause)):8/integer, - 0:5, - M_pce:1/integer, - M_bce:1/integer, - M_cs:1/integer, - M_offending_ie:4/bytes>>); + 0:5, + M_pce:1/integer, + M_bce:1/integer, + M_cs:1/integer, + M_offending_ie:4/bytes>>); encode_v2_element(#v2_recovery{ - instance = Instance, - restart_counter = M_restart_counter}) -> + instance = Instance, + restart_counter = M_restart_counter}) -> encode_v2_element(3, Instance, <>); encode_v2_element(#v2_stn_sr{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(51, Instance, <<>>); encode_v2_element(#v2_access_point_name{ - instance = Instance, - apn = M_apn}) -> + instance = Instance, + apn = M_apn}) -> encode_v2_element(71, Instance, <<(encode_fqdn(M_apn))/binary>>); encode_v2_element(#v2_aggregate_maximum_bit_rate{ - instance = Instance, - uplink = M_uplink, - downlink = M_downlink}) -> + instance = Instance, + uplink = M_uplink, + downlink = M_downlink}) -> encode_v2_element(72, Instance, <>); + M_downlink:32/integer>>); encode_v2_element(#v2_eps_bearer_id{ - instance = Instance, - eps_bearer_id = M_eps_bearer_id}) -> + instance = Instance, + eps_bearer_id = M_eps_bearer_id}) -> encode_v2_element(73, Instance, <<0:4, - M_eps_bearer_id:4/integer>>); + M_eps_bearer_id:4/integer>>); encode_v2_element(#v2_ip_address{ - instance = Instance, - ip = M_ip}) -> + instance = Instance, + ip = M_ip}) -> encode_v2_element(74, Instance, <>); encode_v2_element(#v2_mobile_equipment_identity{ - instance = Instance, - mei = M_mei}) -> + instance = Instance, + mei = M_mei}) -> encode_v2_element(75, Instance, <<(encode_tbcd(M_mei))/binary>>); encode_v2_element(#v2_msisdn{ - instance = Instance, - msisdn = M_msisdn}) -> + instance = Instance, + msisdn = M_msisdn}) -> encode_v2_element(76, Instance, <<(encode_tbcd(M_msisdn))/binary>>); encode_v2_element(#v2_indication{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v2_element(77, Instance, <<(encode_min_int(16, encode_flags(M_flags, ['SGWCI','ISRAI','ISRSI','OI','DFI', - 'HI','DTF','DAF','MSV','SI','PT', - 'P','CRSI','CFSI','UIMSI','SQCI', - 'CCRSI','ISRAU','MBMDT','S4AF', - 'S6AF','SRNI','PBIC','RetLoc', - 'CPSR','CLII','CSFBI','PPSI', - 'PPON/PPEI','PPOF','ARRL','CPRAI', - 'AOPI','AOSI','PCRI','PSCI','BDWI', - 'DTCI','UASI','NSI','WPMSI', - 'UNACCSI','PNSI','S11TF','PMTSMI', - 'CPOPCI','EPCOSI','ROAAI','TSPCMI', - 'ENBCRSI','LTEMPI','LTEMUI', - 'EEVRSI','5GSIWK','REPREFI', - '5GSNN26','ETHPDN','5SRHOI', - '5GCNRI','5GCNRS','N5GNMI', - 'MTEDTA','MTEDTN','CSRMFI','EMCI', - 'IPFUPF','NSENBI','SISSME','_','_', - '_','_']), little))/binary>>); + 'HI','DTF','DAF','MSV','SI','PT', + 'P','CRSI','CFSI','UIMSI','SQCI', + 'CCRSI','ISRAU','MBMDT','S4AF', + 'S6AF','SRNI','PBIC','RetLoc', + 'CPSR','CLII','CSFBI','PPSI', + 'PPON/PPEI','PPOF','ARRL','CPRAI', + 'AOPI','AOSI','PCRI','PSCI','BDWI', + 'DTCI','UASI','NSI','WPMSI', + 'UNACCSI','PNSI','S11TF','PMTSMI', + 'CPOPCI','EPCOSI','ROAAI','TSPCMI', + 'ENBCRSI','LTEMPI','LTEMUI', + 'EEVRSI','5GSIWK','REPREFI', + '5GSNN26','ETHPDN','5SRHOI', + '5GCNRI','5GCNRS','N5GNMI', + 'MTEDTA','MTEDTN','CSRMFI','EMCI', + 'IPFUPF','NSENBI','SISSME','_','_', + '_','_']), little))/binary>>); encode_v2_element(#v2_protocol_configuration_options{ - instance = Instance, - config = M_config}) -> + instance = Instance, + config = M_config}) -> encode_v2_element(78, Instance, <<(encode_protocol_config_opts(M_config))/binary>>); encode_v2_element(#v2_pdn_address_allocation{ - instance = Instance, - type = M_type, - address = M_address}) -> + instance = Instance, + type = M_type, + address = M_address}) -> encode_v2_element(79, Instance, <<0:5, - (enum_v2_type(M_type)):3/integer, - M_address/binary>>); + (enum_v2_type(M_type)):3/integer, + M_address/binary>>); encode_v2_element(#v2_bearer_level_quality_of_service{ - instance = Instance, - pci = M_pci, - pl = M_pl, - pvi = M_pvi, - label = M_label, - maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, - maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, - guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, - guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}) -> + instance = Instance, + pci = M_pci, + pl = M_pl, + pvi = M_pvi, + label = M_label, + maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, + maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, + guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, + guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}) -> encode_v2_element(80, Instance, <<0:1, - M_pci:1/integer, - M_pl:4/integer, - 0:1, - M_pvi:1/integer, - M_label:8/integer, - M_maximum_bit_rate_for_uplink:40/integer, - M_maximum_bit_rate_for_downlink:40/integer, - M_guaranteed_bit_rate_for_uplink:40/integer, - M_guaranteed_bit_rate_for_downlink:40/integer>>); + M_pci:1/integer, + M_pl:4/integer, + 0:1, + M_pvi:1/integer, + M_label:8/integer, + M_maximum_bit_rate_for_uplink:40/integer, + M_maximum_bit_rate_for_downlink:40/integer, + M_guaranteed_bit_rate_for_uplink:40/integer, + M_guaranteed_bit_rate_for_downlink:40/integer>>); encode_v2_element(#v2_flow_quality_of_service{ - instance = Instance, - label = M_label, - maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, - maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, - guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, - guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}) -> + instance = Instance, + label = M_label, + maximum_bit_rate_for_uplink = M_maximum_bit_rate_for_uplink, + maximum_bit_rate_for_downlink = M_maximum_bit_rate_for_downlink, + guaranteed_bit_rate_for_uplink = M_guaranteed_bit_rate_for_uplink, + guaranteed_bit_rate_for_downlink = M_guaranteed_bit_rate_for_downlink}) -> encode_v2_element(81, Instance, <>); + M_maximum_bit_rate_for_uplink:40/integer, + M_maximum_bit_rate_for_downlink:40/integer, + M_guaranteed_bit_rate_for_uplink:40/integer, + M_guaranteed_bit_rate_for_downlink:40/integer>>); encode_v2_element(#v2_rat_type{ - instance = Instance, - rat_type = M_rat_type}) -> + instance = Instance, + rat_type = M_rat_type}) -> encode_v2_element(82, Instance, <>); encode_v2_element(#v2_serving_network{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}}) -> encode_v2_element(83, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary>>); encode_v2_element(#v2_eps_bearer_level_traffic_flow_template{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(84, Instance, <>); encode_v2_element(#v2_traffic_aggregation_description{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(85, Instance, <>); encode_v2_element(#v2_user_location_information{instance = Instance} = IE) -> @@ -4148,563 +4153,563 @@ encode_v2_element(#v2_fully_qualified_tunnel_endpoint_identifier{instance = Inst encode_v2_element(87, Instance, encode_v2_fully_qualified_tunnel_endpoint_identifier(IE)); encode_v2_element(#v2_tmsi{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(88, Instance, <>); encode_v2_element(#v2_global_cn_id{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}, - value = M_value}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}, + value = M_value}) -> encode_v2_element(89, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary, - M_value/binary>>); + M_value/binary>>); encode_v2_element(#v2_s103_pdn_data_forwarding_info{ - instance = Instance, - hsgw_address = M_hsgw_address, - gre_key = M_gre_key, - eps_bearer_id = M_eps_bearer_id}) -> + instance = Instance, + hsgw_address = M_hsgw_address, + gre_key = M_gre_key, + eps_bearer_id = M_eps_bearer_id}) -> encode_v2_element(90, Instance, <<(byte_size(M_hsgw_address)):8/integer, M_hsgw_address/binary, - M_gre_key:32/integer, - (length(M_eps_bearer_id)):8/integer, (<< <> || X <- M_eps_bearer_id>>)/binary>>); + M_gre_key:32/integer, + (length(M_eps_bearer_id)):8/integer, (<< <> || X <- M_eps_bearer_id>>)/binary>>); encode_v2_element(#v2_s1_u_data_forwarding_info{ - instance = Instance, - service_gw_address = M_service_gw_address, - teid = M_teid}) -> + instance = Instance, + service_gw_address = M_service_gw_address, + teid = M_teid}) -> encode_v2_element(91, Instance, <<(byte_size(M_service_gw_address)):8/integer, M_service_gw_address/binary, - M_teid:32/integer>>); + M_teid:32/integer>>); encode_v2_element(#v2_delay_value{ - instance = Instance, - delay = M_delay}) -> + instance = Instance, + delay = M_delay}) -> encode_v2_element(92, Instance, <>); encode_v2_element(#v2_bearer_context{ - instance = Instance, - group = M_group}) -> + instance = Instance, + group = M_group}) -> encode_v2_element(93, Instance, <<(encode_v2_grouped(M_group))/binary>>); encode_v2_element(#v2_charging_id{ - instance = Instance, - id = M_id}) -> + instance = Instance, + id = M_id}) -> encode_v2_element(94, Instance, <>); encode_v2_element(#v2_charging_characteristics{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(95, Instance, <>); encode_v2_element(#v2_trace_information{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}, - trace_id = M_trace_id, - triggering_events = M_triggering_events, - list_of_ne_types = M_list_of_ne_types, - session_trace_depth = M_session_trace_depth, - list_of_interfaces = M_list_of_interfaces, - ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}, + trace_id = M_trace_id, + triggering_events = M_triggering_events, + list_of_ne_types = M_list_of_ne_types, + session_trace_depth = M_session_trace_depth, + list_of_interfaces = M_list_of_interfaces, + ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}) -> encode_v2_element(96, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary, - M_trace_id:32/integer, - M_triggering_events:9/bytes, - M_list_of_ne_types:16/integer, - M_session_trace_depth:8/integer, - M_list_of_interfaces:12/bytes, - M_ip_address_of_trace_collection_entity/binary>>); + M_trace_id:32/integer, + M_triggering_events:9/bytes, + M_list_of_ne_types:16/integer, + M_session_trace_depth:8/integer, + M_list_of_interfaces:12/bytes, + M_ip_address_of_trace_collection_entity/binary>>); encode_v2_element(#v2_bearer_flags{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v2_element(97, Instance, <<(encode_min_int(0, encode_flags(M_flags, ['PCC','VB','Vind','ASI','_','_','_', - '_']), little))/binary>>); + '_']), little))/binary>>); encode_v2_element(#v2_pdn_type{ - instance = Instance, - pdn_type = M_pdn_type}) -> + instance = Instance, + pdn_type = M_pdn_type}) -> encode_v2_element(99, Instance, <<0:4, - (enum_v2_pdn_type(M_pdn_type)):4/integer>>); + (enum_v2_pdn_type(M_pdn_type)):4/integer>>); encode_v2_element(#v2_procedure_transaction_id{ - instance = Instance, - pti = M_pti}) -> + instance = Instance, + pti = M_pti}) -> encode_v2_element(100, Instance, <>); encode_v2_element(#v2_mm_context_1{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(103, Instance, <<>>); encode_v2_element(#v2_mm_context_2{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(104, Instance, <<>>); encode_v2_element(#v2_mm_context_3{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(105, Instance, <<>>); encode_v2_element(#v2_mm_context_4{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(106, Instance, <<>>); encode_v2_element(#v2_mm_context_5{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(107, Instance, <<>>); encode_v2_element(#v2_mm_context_6{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(108, Instance, <<>>); encode_v2_element(#v2_pdn_connection{ - instance = Instance, - group = M_group}) -> + instance = Instance, + group = M_group}) -> encode_v2_element(109, Instance, <<(encode_v2_grouped(M_group))/binary>>); encode_v2_element(#v2_pdu_numbers{ - instance = Instance, - nsapi = M_nsapi, - dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, - ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, - send_n_pdu_number = M_send_n_pdu_number, - receive_n_pdu_number = M_receive_n_pdu_number}) -> + instance = Instance, + nsapi = M_nsapi, + dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, + ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, + send_n_pdu_number = M_send_n_pdu_number, + receive_n_pdu_number = M_receive_n_pdu_number}) -> encode_v2_element(110, Instance, <<0:4, - M_nsapi:4/integer, - M_dl_gtp_u_sequence_number:16/integer, - M_ul_gtp_u_sequence_number:16/integer, - M_send_n_pdu_number:16/integer, - M_receive_n_pdu_number:16/integer>>); + M_nsapi:4/integer, + M_dl_gtp_u_sequence_number:16/integer, + M_ul_gtp_u_sequence_number:16/integer, + M_send_n_pdu_number:16/integer, + M_receive_n_pdu_number:16/integer>>); encode_v2_element(#v2_p_tmsi{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(111, Instance, <>); encode_v2_element(#v2_p_tmsi_signature{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(112, Instance, <>); encode_v2_element(#v2_hop_counter{ - instance = Instance, - hop_counter = M_hop_counter}) -> + instance = Instance, + hop_counter = M_hop_counter}) -> encode_v2_element(113, Instance, <>); encode_v2_element(#v2_ue_time_zone{ - instance = Instance, - timezone = M_timezone, - dst = M_dst}) -> + instance = Instance, + timezone = M_timezone, + dst = M_dst}) -> encode_v2_element(114, Instance, <>); + 0:6, + M_dst:2/integer>>); encode_v2_element(#v2_trace_reference{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}, - id = M_id}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}, + id = M_id}) -> encode_v2_element(115, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary, - M_id:24/integer>>); + M_id:24/integer>>); encode_v2_element(#v2_complete_request_message{ - instance = Instance, - type = M_type, - message = M_message}) -> + instance = Instance, + type = M_type, + message = M_message}) -> encode_v2_element(116, Instance, <>); + M_message/binary>>); encode_v2_element(#v2_guti{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}, - group_id = M_group_id, - code = M_code, - m_tmsi = M_m_tmsi}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}, + group_id = M_group_id, + code = M_code, + m_tmsi = M_m_tmsi}) -> encode_v2_element(117, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary, - M_group_id:16/integer, - M_code:24/integer, - M_m_tmsi/binary>>); + M_group_id:16/integer, + M_code:24/integer, + M_m_tmsi/binary>>); encode_v2_element(#v2_f_container{ - instance = Instance, - type = M_type, - data = M_data}) -> + instance = Instance, + type = M_type, + data = M_data}) -> encode_v2_element(118, Instance, <<0:4, - M_type:4/integer, - M_data/binary>>); + M_type:4/integer, + M_data/binary>>); encode_v2_element(#v2_f_cause{ - instance = Instance, - type = M_type, - data = M_data}) -> + instance = Instance, + type = M_type, + data = M_data}) -> encode_v2_element(119, Instance, <<0:4, - M_type:4/integer, - M_data/binary>>); + M_type:4/integer, + M_data/binary>>); encode_v2_element(#v2_plmn_id{ - instance = Instance, - id = M_id}) -> + instance = Instance, + id = M_id}) -> encode_v2_element(120, Instance, <>); encode_v2_element(#v2_target_identification{ - instance = Instance, - type = M_type, - data = M_data}) -> + instance = Instance, + type = M_type, + data = M_data}) -> encode_v2_element(121, Instance, <>); + M_data/binary>>); encode_v2_element(#v2_packet_flow_id{ - instance = Instance, - ebi = M_ebi, - flow_id = M_flow_id}) -> + instance = Instance, + ebi = M_ebi, + flow_id = M_flow_id}) -> encode_v2_element(123, Instance, <<0:4, - M_ebi:4/integer, - M_flow_id/binary>>); + M_ebi:4/integer, + M_flow_id/binary>>); encode_v2_element(#v2_rab_context{ - instance = Instance, - ulpsi = M_ulpsi, - dlpsi = M_dlpsi, - ulgsi = M_ulgsi, - dlgsi = M_dlgsi, - nsapi = M_nsapi, - dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, - ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, - dl_pdcp_number = M_dl_pdcp_number, - ul_pdcp_number = M_ul_pdcp_number}) -> + instance = Instance, + ulpsi = M_ulpsi, + dlpsi = M_dlpsi, + ulgsi = M_ulgsi, + dlgsi = M_dlgsi, + nsapi = M_nsapi, + dl_gtp_u_sequence_number = M_dl_gtp_u_sequence_number, + ul_gtp_u_sequence_number = M_ul_gtp_u_sequence_number, + dl_pdcp_number = M_dl_pdcp_number, + ul_pdcp_number = M_ul_pdcp_number}) -> encode_v2_element(124, Instance, <>); + M_dlpsi:1/integer, + M_ulgsi:1/integer, + M_dlgsi:1/integer, + M_nsapi:4/integer, + M_dl_gtp_u_sequence_number:16/integer, + M_ul_gtp_u_sequence_number:16/integer, + M_dl_pdcp_number:16/integer, + M_ul_pdcp_number:16/integer>>); encode_v2_element(#v2_source_rnc_pdcp_context_info{ - instance = Instance, - rrc_container = M_rrc_container}) -> + instance = Instance, + rrc_container = M_rrc_container}) -> encode_v2_element(125, Instance, <>); encode_v2_element(#v2_udp_source_port_number{ - instance = Instance, - port = M_port}) -> + instance = Instance, + port = M_port}) -> encode_v2_element(126, Instance, <>); encode_v2_element(#v2_apn_restriction{ - instance = Instance, - restriction_type_value = M_restriction_type_value}) -> + instance = Instance, + restriction_type_value = M_restriction_type_value}) -> encode_v2_element(127, Instance, <>); encode_v2_element(#v2_selection_mode{ - instance = Instance, - mode = M_mode}) -> + instance = Instance, + mode = M_mode}) -> encode_v2_element(128, Instance, <<0:6, - M_mode:2/integer>>); + M_mode:2/integer>>); encode_v2_element(#v2_source_identification{ - instance = Instance, - target_cell_id = M_target_cell_id, - source_type = M_source_type, - source_id = M_source_id}) -> + instance = Instance, + target_cell_id = M_target_cell_id, + source_type = M_source_type, + source_id = M_source_id}) -> encode_v2_element(129, Instance, <>); + M_source_type:8/integer, + M_source_id/binary>>); encode_v2_element(#v2_change_reporting_action{ - instance = Instance, - action = M_action}) -> + instance = Instance, + action = M_action}) -> encode_v2_element(131, Instance, <<(enum_v2_action(M_action)):8/integer>>); encode_v2_element(#v2_fully_qualified_pdn_connection_set_identifier{instance = Instance} = IE) -> encode_v2_element(132, Instance, encode_v2_fully_qualified_pdn_connection_set_identifier(IE)); encode_v2_element(#v2_channel_needed{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(133, Instance, <>); encode_v2_element(#v2_emlpp_priority{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(134, Instance, <>); encode_v2_element(#v2_node_type{ - instance = Instance, - node_type = M_node_type}) -> + instance = Instance, + node_type = M_node_type}) -> encode_v2_element(135, Instance, <>); encode_v2_element(#v2_fully_qualified_domain_name{ - instance = Instance, - fqdn = M_fqdn}) -> + instance = Instance, + fqdn = M_fqdn}) -> encode_v2_element(136, Instance, <<(encode_fqdn(M_fqdn))/binary>>); encode_v2_element(#v2_transaction_identifier{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(137, Instance, <>); encode_v2_element(#v2_mbms_session_duration{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(138, Instance, <<>>); encode_v2_element(#v2_mbms_service_area{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(139, Instance, <<>>); encode_v2_element(#v2_mbms_session_identifier{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(140, Instance, <<>>); encode_v2_element(#v2_mbms_flow_identifier{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(141, Instance, <<>>); encode_v2_element(#v2_mbms_ip_multicast_distribution{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(142, Instance, <<>>); encode_v2_element(#v2_mbms_distribution_acknowledge{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(143, Instance, <<>>); encode_v2_element(#v2_rfsp_index{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(144, Instance, <>); encode_v2_element(#v2_user_csg_information{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}, - csg_id = M_csg_id, - access_mode = M_access_mode, - lcsg = M_lcsg, - cmi = M_cmi}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}, + csg_id = M_csg_id, + access_mode = M_access_mode, + lcsg = M_lcsg, + cmi = M_cmi}) -> encode_v2_element(145, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary, - 0:5, - M_csg_id:27/bits, - M_access_mode:2/integer, - 0:4, - (bool2int(M_lcsg)):1/integer, - M_cmi:1/integer>>); + 0:5, + M_csg_id:27/bits, + M_access_mode:2/integer, + 0:4, + (bool2int(M_lcsg)):1/integer, + M_cmi:1/integer>>); encode_v2_element(#v2_csg_information_reporting_action{ - instance = Instance, - actions = M_actions}) -> + instance = Instance, + actions = M_actions}) -> encode_v2_element(146, Instance, <<(encode_min_int(0, encode_flags(M_actions, ['UCICSG','UCISHC','UCIUHC','_', - '_','_','_','_']), little))/binary>>); + '_','_','_','_']), little))/binary>>); encode_v2_element(#v2_csg_id{ - instance = Instance, - id = M_id}) -> + instance = Instance, + id = M_id}) -> encode_v2_element(147, Instance, <<0:5, - M_id:27/bits>>); + M_id:27/bits>>); encode_v2_element(#v2_csg_membership_indication{ - instance = Instance, - cmi = M_cmi}) -> + instance = Instance, + cmi = M_cmi}) -> encode_v2_element(148, Instance, <<0:7, - M_cmi:1/integer>>); + M_cmi:1/integer>>); encode_v2_element(#v2_service_indicator{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(149, Instance, <>); encode_v2_element(#v2_detach_type{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(150, Instance, <>); encode_v2_element(#v2_local_distiguished_name{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(151, Instance, <>); encode_v2_element(#v2_node_features{ - instance = Instance, - features = M_features}) -> + instance = Instance, + features = M_features}) -> encode_v2_element(152, Instance, <<(encode_min_int(0, encode_flags(M_features, ['PRN','MABR','NTSR','CIOT', - 'S1UN','ETH','_','_']), little))/binary>>); + 'S1UN','ETH','_','_']), little))/binary>>); encode_v2_element(#v2_mbms_time_to_data_transfer{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(153, Instance, <<>>); encode_v2_element(#v2_throttling{ - instance = Instance, - unit = M_unit, - value = M_value, - factor = M_factor}) -> + instance = Instance, + unit = M_unit, + value = M_value, + factor = M_factor}) -> encode_v2_element(154, Instance, <>); + M_value:5/integer, + M_factor:8/integer>>); encode_v2_element(#v2_allocation_retention_priority{ - instance = Instance, - pci = M_pci, - pl = M_pl, - pvi = M_pvi}) -> + instance = Instance, + pci = M_pci, + pl = M_pl, + pvi = M_pvi}) -> encode_v2_element(155, Instance, <<0:1, - (bool2int(M_pci)):1/integer, - M_pl:4/integer, - 0:1, - (bool2int(M_pvi)):1/integer>>); + (bool2int(M_pci)):1/integer, + M_pl:4/integer, + 0:1, + (bool2int(M_pvi)):1/integer>>); encode_v2_element(#v2_epc_timer{ - instance = Instance, - unit = M_unit, - value = M_value}) -> + instance = Instance, + unit = M_unit, + value = M_value}) -> encode_v2_element(156, Instance, <>); + M_value:5/integer>>); encode_v2_element(#v2_signalling_priority_indication{ - instance = Instance, - indication = M_indication}) -> + instance = Instance, + indication = M_indication}) -> encode_v2_element(157, Instance, <<(encode_min_int(0, encode_flags(M_indication, ['LAPI','_','_','_','_','_','_', - '_']), little))/binary>>); + '_']), little))/binary>>); encode_v2_element(#v2_temporary_mobile_group_identity{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(158, Instance, <<>>); encode_v2_element(#v2_additional_mm_context_for_srvcc{ - instance = Instance, - classmark_2 = M_classmark_2, - classmark_3 = M_classmark_3, - codec_list = M_codec_list}) -> + instance = Instance, + classmark_2 = M_classmark_2, + classmark_3 = M_classmark_3, + codec_list = M_codec_list}) -> encode_v2_element(159, Instance, <<(byte_size(M_classmark_2)):8/integer, M_classmark_2/binary, - (byte_size(M_classmark_3)):8/integer, M_classmark_3/binary, - (byte_size(M_codec_list)):8/integer, M_codec_list/binary>>); + (byte_size(M_classmark_3)):8/integer, M_classmark_3/binary, + (byte_size(M_codec_list)):8/integer, M_codec_list/binary>>); encode_v2_element(#v2_additional_flags_for_srvcc{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v2_element(160, Instance, <<(encode_min_int(0, encode_flags(M_flags, ['ICS','VF','_','_','_','_','_','_']), little))/binary>>); encode_v2_element(#v2_mdt_configuration{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(162, Instance, <<>>); encode_v2_element(#v2_additional_protocol_configuration_options{ - instance = Instance, - config = M_config}) -> + instance = Instance, + config = M_config}) -> encode_v2_element(163, Instance, <<(encode_protocol_config_opts(M_config))/binary>>); encode_v2_element(#v2_absolute_time_of_mbms_data_transfer{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(164, Instance, <<>>); encode_v2_element(#v2_henb_information_reporting_{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v2_element(165, Instance, <<(encode_min_int(0, encode_flags(M_flags, ['FTI','_','_','_','_','_','_','_']), little))/binary>>); encode_v2_element(#v2_ipv4_configuration_parameters{ - instance = Instance, - prefix_length = M_prefix_length, - default_route = M_default_route}) -> + instance = Instance, + prefix_length = M_prefix_length, + default_route = M_default_route}) -> encode_v2_element(166, Instance, <>); + M_default_route:4/bytes>>); encode_v2_element(#v2_change_to_report_flags_{ - instance = Instance, - flags = M_flags}) -> + instance = Instance, + flags = M_flags}) -> encode_v2_element(167, Instance, <<(encode_min_int(0, encode_flags(M_flags, ['SNCR','TZCR','_','_','_','_','_', - '_']), little))/binary>>); + '_']), little))/binary>>); encode_v2_element(#v2_action_indication{ - instance = Instance, - indication = M_indication}) -> + instance = Instance, + indication = M_indication}) -> encode_v2_element(168, Instance, <<0:5, - M_indication:3/integer>>); + M_indication:3/integer>>); encode_v2_element(#v2_twan_identifier{instance = Instance} = IE) -> encode_v2_element(169, Instance, encode_v2_twan_identifier(IE)); encode_v2_element(#v2_uli_timestamp{ - instance = Instance, - timestamp = M_timestamp}) -> + instance = Instance, + timestamp = M_timestamp}) -> encode_v2_element(170, Instance, <>); encode_v2_element(#v2_mbms_flags{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(171, Instance, <<>>); encode_v2_element(#v2_ran_nas_cause{ - instance = Instance, - protocol = M_protocol, - type = M_type, - cause = M_cause}) -> + instance = Instance, + protocol = M_protocol, + type = M_type, + cause = M_cause}) -> encode_v2_element(172, Instance, <>); + M_type:4/integer, + M_cause/binary>>); encode_v2_element(#v2_cn_operator_selection_entity{ - instance = Instance, - entity = M_entity}) -> + instance = Instance, + entity = M_entity}) -> encode_v2_element(173, Instance, <<0:6, - M_entity:2/integer>>); + M_entity:2/integer>>); encode_v2_element(#v2_trusted_wlan_mode_indication{ - instance = Instance, - indication = M_indication}) -> + instance = Instance, + indication = M_indication}) -> encode_v2_element(174, Instance, <<(encode_min_int(0, encode_flags(M_indication, ['SCM','MCM','_','_','_','_', - '_','_']), little))/binary>>); + '_','_']), little))/binary>>); encode_v2_element(#v2_node_number{ - instance = Instance, - number = M_number}) -> + instance = Instance, + number = M_number}) -> encode_v2_element(175, Instance, <<(byte_size(M_number)):8/integer, M_number/binary>>); encode_v2_element(#v2_node_identifier{ - instance = Instance, - name = M_name, - realm = M_realm}) -> + instance = Instance, + name = M_name, + realm = M_realm}) -> encode_v2_element(176, Instance, <<(byte_size(M_name)):8/integer, M_name/binary, - (byte_size(M_realm)):8/integer, M_realm/binary>>); + (byte_size(M_realm)):8/integer, M_realm/binary>>); encode_v2_element(#v2_presence_reporting_area_action{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(177, Instance, <<>>); encode_v2_element(#v2_presence_reporting_area_information{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(178, Instance, <<>>); encode_v2_element(#v2_twan_identifier_timestamp{ - instance = Instance, - timestamp = M_timestamp}) -> + instance = Instance, + timestamp = M_timestamp}) -> encode_v2_element(179, Instance, <>); encode_v2_element(#v2_overload_control_information{ - instance = Instance, - group = M_group}) -> + instance = Instance, + group = M_group}) -> encode_v2_element(180, Instance, <<(encode_v2_grouped(M_group))/binary>>); encode_v2_element(#v2_load_control_information{ - instance = Instance, - group = M_group}) -> + instance = Instance, + group = M_group}) -> encode_v2_element(181, Instance, <<(encode_v2_grouped(M_group))/binary>>); encode_v2_element(#v2_metric{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(182, Instance, <>); encode_v2_element(#v2_sequence_number{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(183, Instance, <>); encode_v2_element(#v2_apn_and_relative_capacity{ - instance = Instance, - capacity = M_capacity, - apn = M_apn}) -> + instance = Instance, + capacity = M_capacity, + apn = M_apn}) -> encode_v2_element(184, Instance, <>); + (byte_size(M_apn)):8/integer, M_apn/binary>>); encode_v2_element(#v2_wlan_offloadability_indication{ - instance = Instance, - indication = M_indication}) -> + instance = Instance, + indication = M_indication}) -> encode_v2_element(185, Instance, <<(encode_min_int(0, encode_flags(M_indication, ['UTRAN','EUTRAN','_','_','_', - '_','_','_']), little))/binary>>); + '_','_','_']), little))/binary>>); encode_v2_element(#v2_paging_and_service_information{instance = Instance} = IE) -> encode_v2_element(186, Instance, encode_v2_paging_and_service_information(IE)); @@ -4713,138 +4718,138 @@ encode_v2_element(#v2_integer_number{instance = Instance} = IE) -> encode_v2_element(187, Instance, encode_v2_integer_number(IE)); encode_v2_element(#v2_millisecond_time_stamp{ - instance = Instance, - timestamp = M_timestamp}) -> + instance = Instance, + timestamp = M_timestamp}) -> encode_v2_element(188, Instance, <>); encode_v2_element(#v2_monitoring_event_information{ - instance = Instance}) -> + instance = Instance}) -> encode_v2_element(189, Instance, <<>>); encode_v2_element(#v2_ecgi_list{ - instance = Instance, - ecgis = M_ecgis}) -> + instance = Instance, + ecgis = M_ecgis}) -> encode_v2_element(190, Instance, <<(length(M_ecgis)):16/integer, (<< <> || X <- M_ecgis>>)/binary>>); encode_v2_element(#v2_remote_ue_context{ - instance = Instance, - group = M_group}) -> + instance = Instance, + group = M_group}) -> encode_v2_element(191, Instance, <<(encode_v2_grouped(M_group))/binary>>); encode_v2_element(#v2_remote_user_id{instance = Instance} = IE) -> encode_v2_element(192, Instance, encode_v2_remote_user_id(IE)); encode_v2_element(#v2_remote_ue_ip_information{ - instance = Instance, - ip = M_ip}) -> + instance = Instance, + ip = M_ip}) -> encode_v2_element(193, Instance, <>); encode_v2_element(#v2_ciot_optimizations_support_indication{ - instance = Instance, - indication = M_indication}) -> + instance = Instance, + indication = M_indication}) -> encode_v2_element(194, Instance, <<(encode_min_int(0, encode_flags(M_indication, ['SGNIPDN','SCNIPDN','AWOPDN', - 'IHCSI','_','_','_','_']), little))/binary>>); + 'IHCSI','_','_','_','_']), little))/binary>>); encode_v2_element(#v2_scef_pdn_connection{ - instance = Instance, - group = M_group}) -> + instance = Instance, + group = M_group}) -> encode_v2_element(195, Instance, <<(encode_v2_grouped(M_group))/binary>>); encode_v2_element(#v2_header_compression_configuration{ - instance = Instance, - rohc_profiles = M_rohc_profiles, - max_cid = M_max_cid}) -> + instance = Instance, + rohc_profiles = M_rohc_profiles, + max_cid = M_max_cid}) -> encode_v2_element(196, Instance, <>); + M_max_cid:16/integer>>); encode_v2_element(#v2_extended_protocol_configuration_options{ - instance = Instance, - config = M_config}) -> + instance = Instance, + config = M_config}) -> encode_v2_element(197, Instance, <<(encode_protocol_config_opts(M_config))/binary>>); encode_v2_element(#v2_serving_plmn_rate_control{ - instance = Instance, - uplink = M_uplink, - downlink = M_downlink}) -> + instance = Instance, + uplink = M_uplink, + downlink = M_downlink}) -> encode_v2_element(198, Instance, <>); + M_downlink:16/integer>>); encode_v2_element(#v2_counter{ - instance = Instance, - timestamp = M_timestamp, - counter = M_counter}) -> + instance = Instance, + timestamp = M_timestamp, + counter = M_counter}) -> encode_v2_element(199, Instance, <>); + M_counter:8/integer>>); encode_v2_element(#v2_mapped_ue_usage_type{ - instance = Instance, - usage_type = M_usage_type}) -> + instance = Instance, + usage_type = M_usage_type}) -> encode_v2_element(200, Instance, <>); encode_v2_element(#v2_secondary_rat_usage_data_report{ - instance = Instance, - irsgw = M_irsgw, - irpgw = M_irpgw, - rat_type = M_rat_type, - ebi = M_ebi, - start_time = M_start_time, - end_time = M_end_time, - dl = M_dl, - ul = M_ul}) -> + instance = Instance, + irsgw = M_irsgw, + irpgw = M_irpgw, + rat_type = M_rat_type, + ebi = M_ebi, + start_time = M_start_time, + end_time = M_end_time, + dl = M_dl, + ul = M_ul}) -> encode_v2_element(201, Instance, <<0:6, - (bool2int(M_irsgw)):1/integer, - (bool2int(M_irpgw)):1/integer, - M_rat_type:8/integer, - 0:4, - M_ebi:4/integer, - M_start_time:32/integer, - M_end_time:32/integer, - M_dl:64/integer, - M_ul:64/integer>>); + (bool2int(M_irsgw)):1/integer, + (bool2int(M_irpgw)):1/integer, + M_rat_type:8/integer, + 0:4, + M_ebi:4/integer, + M_start_time:32/integer, + M_end_time:32/integer, + M_dl:64/integer, + M_ul:64/integer>>); encode_v2_element(#v2_up_function_selection_indication_flags{ - instance = Instance, - indication = M_indication}) -> + instance = Instance, + indication = M_indication}) -> encode_v2_element(202, Instance, <<(encode_min_int(0, encode_flags(M_indication, ['DCNR','_','_','_','_','_','_', - '_']), little))/binary>>); + '_']), little))/binary>>); encode_v2_element(#v2_maximum_packet_loss_rate{instance = Instance} = IE) -> encode_v2_element(203, Instance, encode_v2_maximum_packet_loss_rate(IE)); encode_v2_element(#v2_apn_rate_control_status{ - instance = Instance, - number_of_uplink_packets_allowed = M_number_of_uplink_packets_allowed, - number_of_additional_exception_reports = M_number_of_additional_exception_reports, - number_of_downlink_packets_allowed = M_number_of_downlink_packets_allowed, - apn_rate_control_status_validity_time = M_apn_rate_control_status_validity_time}) -> + instance = Instance, + number_of_uplink_packets_allowed = M_number_of_uplink_packets_allowed, + number_of_additional_exception_reports = M_number_of_additional_exception_reports, + number_of_downlink_packets_allowed = M_number_of_downlink_packets_allowed, + apn_rate_control_status_validity_time = M_apn_rate_control_status_validity_time}) -> encode_v2_element(204, Instance, <>); + M_number_of_additional_exception_reports:32/integer, + M_number_of_downlink_packets_allowed:32/integer, + M_apn_rate_control_status_validity_time:64/integer>>); encode_v2_element(#v2_extended_trace_information{ - instance = Instance, - plmn_id = {M_mcc, M_mnc}, - trace_id = M_trace_id, - triggering_events = M_triggering_events, - list_of_ne_types = M_list_of_ne_types, - session_trace_depth = M_session_trace_depth, - list_of_interfaces = M_list_of_interfaces, - ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}) -> + instance = Instance, + plmn_id = {M_mcc, M_mnc}, + trace_id = M_trace_id, + triggering_events = M_triggering_events, + list_of_ne_types = M_list_of_ne_types, + session_trace_depth = M_session_trace_depth, + list_of_interfaces = M_list_of_interfaces, + ip_address_of_trace_collection_entity = M_ip_address_of_trace_collection_entity}) -> encode_v2_element(205, Instance, <<(encode_mccmnc(M_mcc, M_mnc))/binary, - M_trace_id:32/integer, - (byte_size(M_triggering_events)):8/integer, M_triggering_events/binary, - (byte_size(M_list_of_ne_types)):8/integer, M_list_of_ne_types/binary, - M_session_trace_depth:8/integer, - (byte_size(M_list_of_interfaces)):8/integer, M_list_of_interfaces/binary, - (byte_size(M_ip_address_of_trace_collection_entity)):8/integer, M_ip_address_of_trace_collection_entity/binary>>); + M_trace_id:32/integer, + (byte_size(M_triggering_events)):8/integer, M_triggering_events/binary, + (byte_size(M_list_of_ne_types)):8/integer, M_list_of_ne_types/binary, + M_session_trace_depth:8/integer, + (byte_size(M_list_of_interfaces)):8/integer, M_list_of_interfaces/binary, + (byte_size(M_ip_address_of_trace_collection_entity)):8/integer, M_ip_address_of_trace_collection_entity/binary>>); encode_v2_element(#v2_monitoring_event_extension_information{instance = Instance} = IE) -> encode_v2_element(206, Instance, encode_v2_monitoring_event_extension_information(IE)); encode_v2_element(#v2_additional_rrm_policy_index{ - instance = Instance, - value = M_value}) -> + instance = Instance, + value = M_value}) -> encode_v2_element(207, Instance, <>); encode_v2_element(#v2_private_extension{instance = Instance} = IE) -> diff --git a/src/gtplib.app.src b/src/gtplib.app.src index 3e39ccc..c347b53 100644 --- a/src/gtplib.app.src +++ b/src/gtplib.app.src @@ -1,9 +1,9 @@ %% -*- erlang -*- {application, gtplib, [ - {vsn, semver}, - {description, "Erlang library for GTP-c v1 and v2"}, - {applications, [kernel, stdlib, ppplib]}, - {registered, []}, - {licenses, ["Mozilla Public License 2.0"]}, - {links, [{"Github", "https://github.com/travelping/gtplib"}]} -]}. + {vsn, semver}, + {description, "Erlang library for GTP-c v1 and v2"}, + {applications, [kernel, stdlib, ppplib]}, + {registered, []}, + {licenses, ["Mozilla Public License 2.0"]}, + {links, [{"Github", "https://github.com/travelping/gtplib"}]} + ]}. diff --git a/test/gtp_SUITE.erl b/test/gtp_SUITE.erl index 999abbd..0af1b9f 100644 --- a/test/gtp_SUITE.erl +++ b/test/gtp_SUITE.erl @@ -20,22 +20,22 @@ -include("../include/gtp_packet.hrl"). -define(equal(Expected, Actual), - (fun (Expected@@@, Expected@@@) -> true; - (Expected@@@, Actual@@@) -> - ct:pal("MISMATCH(~s:~b, ~s)~nExpected: ~p~nActual: ~p~n", - [?FILE, ?LINE, ??Actual, Expected@@@, Actual@@@]), - false - end)(Expected, Actual) orelse error(badmatch)). + (fun (Expected@@@, Expected@@@) -> true; + (Expected@@@, Actual@@@) -> + ct:pal("MISMATCH(~s:~b, ~s)~nExpected: ~p~nActual: ~p~n", + [?FILE, ?LINE, ??Actual, Expected@@@, Actual@@@]), + false + end)(Expected, Actual) orelse error(badmatch)). -define(match(Guard, Expr), - ((fun () -> - case (Expr) of - Guard -> ok; - V -> ct:pal("MISMATCH(~s:~b, ~s)~nExpected: ~p~nActual: ~p~n", - [?FILE, ?LINE, ??Expr, ??Guard, V]), - error(badmatch) - end - end)())). + ((fun () -> + case (Expr) of + Guard -> ok; + V -> ct:pal("MISMATCH(~s:~b, ~s)~nExpected: ~p~nActual: ~p~n", + [?FILE, ?LINE, ??Expr, ??Guard, V]), + error(badmatch) + end + end)())). %%%=================================================================== @@ -43,7 +43,7 @@ %%%=================================================================== suite() -> - [{timetrap,{seconds,30}}]. + [{timetrap,{seconds,30}}]. init_per_suite(Config) -> ct_property_test:init_per_suite(Config). @@ -52,17 +52,17 @@ end_per_suite(_Config) -> ok. all() -> - [test_v1_invalid_msg, - test_v2_invalid_msg, - encode_decode, - test_v1_ignore_spare_bits, - test_g_pdu, - test_v2_pco_vendor_ext, - v2_list, - partial_decode, - partial_encode, - flags_enc_dec, - msg_enc_dec]. + [test_v1_invalid_msg, + test_v2_invalid_msg, + encode_decode, + test_v1_ignore_spare_bits, + test_g_pdu, + test_v2_pco_vendor_ext, + v2_list, + partial_decode, + partial_encode, + flags_enc_dec, + msg_enc_dec]. %%%=================================================================== @@ -97,134 +97,142 @@ test_messages() -> hexstr2bin("3202000600000000440000000e2b")}, {{v1, create_pdp_context_request}, hexstr2bin("3210006300000000440100000242001111111111f10e110ffd10000000011100" - "00000114001a0800800002f12183000908696e7465726e657484001080c0230c" - "0101000c03504150035041508500047f0000018500047f000001860007916411" - "111111f1870004000b921f")}, + "00000114001a0800800002f12183000908696e7465726e657484001080c0230c" + "0101000c03504150035041508500047f0000018500047f000001860007916411" + "111111f1870004000b921f")}, {{v1, create_pdp_context_request_2}, hexstr2bin("321000a000000000846100000262111111111111f10372f410fffeff0ebf0ffd" - "1020008a781120008a781405800002f12183000c076578616d706c65036e6574" - "84001a8080211001000010810600000000830600000000000d00000500850004" - "7f0000018500047f0000018600099184111111111111f187000f021b921f7396" - "fefe742b1040006a00970001019800080172f41001370bbe99000200009a0008" - "5311111111111111")}, + "1020008a781120008a781405800002f12183000c076578616d706c65036e6574" + "84001a8080211001000010810600000000830600000000000d00000500850004" + "7f0000018500047f0000018600099184111111111111f187000f021b921f7396" + "fefe742b1040006a00970001019800080172f41001370bbe99000200009a0008" + "5311111111111111")}, {{v1, create_pdp_context_request_3}, hexstr2bin("321000a9000000008efb00000224111111111111f103030216fffeff0ffc1020" - "03b106112003b1061405800002f12183000908696e7465726e657484002680c0" - "230901010009035041500080211001010010810600000000830600000000000d" - "000010008500047f0000018500047f00000186000991abdc1e11111111f18700" - "0d0123911f7396fefe9305ffff009400012097000101980008010302162906a7" - "1799000200009a00085311111111111111")}, + "03b106112003b1061405800002f12183000908696e7465726e657484002680c0" + "230901010009035041500080211001010010810600000000830600000000000d" + "000010008500047f0000018500047f00000186000991abdc1e11111111f18700" + "0d0123911f7396fefe9305ffff009400012097000101980008010302162906a7" + "1799000200009a00085311111111111111")}, {{v1, create_pdp_context_response}, hexstr2bin("3211004e0000000144010000018008fe0e2b100000000111000000017f000000" - "01800006f1210a1c010284001480802110020000108106080808088306000000" - "00850004ac1410a8850004ac1410a9870004000b921f")}, + "01800006f1210a1c010284001480802110020000108106080808088306000000" + "00850004ac1410a8850004ac1410a9870004000b921f")}, {{v1, pco_rel97}, hexstr2bin("3215000A0003A8F4696E0000018084000100")}, + {{v1, broken_protocol_opts}, + hexstr2bin("3210009e000000009c3d00000225053590694975f40337f020fffeff0eb20ffc" + "1003591521110359151f1405800002f12183000403746e3184001d80c0230601" + "000006000080c7d7566a4e82b050d1cee3780ed5431c000085000442c9bffe85" + "000442c9bffe860008915689051092544787000f0213921f7396fefe742affff" + "008e0094000160970001019800080137f0204e30409a99000269009a00085389" + "758054936010")}, + {{v2, echo_request}, hexstr2bin("40010009006a50000300010073")}, {{v2, create_session_request}, hexstr2bin("482000f200000000001019000100080032111111111111f1030001000147001a" - "000764656661756c74066d6e63303031056d6363303104677072734800080000" - "000010000000104b00080053858260294009104c0006003411111111114e001d" - "008080211001000010810600000000830600000000000d00000a000010004f00" - "0500010000000052000100065300030062f21056000d001862f210119962f210" - "018ecb00570009008601ab0f467f0000015d002c004900010005500016006d09" - "0000000000000000000000000000000000000000570009028401ab0f467f0000" - "0163000100017200020080017f000100008000010000")}, + "000764656661756c74066d6e63303031056d6363303104677072734800080000" + "000010000000104b00080053858260294009104c0006003411111111114e001d" + "008080211001000010810600000000830600000000000d00000a000010004f00" + "0500010000000052000100065300030062f21056000d001862f210119962f210" + "018ecb00570009008601ab0f467f0000015d002c004900010005500016006d09" + "0000000000000000000000000000000000000000570009028401ab0f467f0000" + "0163000100017200020080017f000100008000010000")}, {{v2, create_session_request_2}, hexstr2bin("4820012000000000014c52000100080013111111111111f147000c0007657861" - "6d706c65036e6574480008000000bc00001a00bd4b0008000100020304040607" - "4c00080078111111111111f14d00050000180000004e00530080c2231e010000" - "1e100a3131310a3131310a3131310a3131316368616c6c656e6765c223150200" - "0015104a1597e4c971b22f8dbc2a8948151a9c80211001000010810600000000" - "830600000000000d00000a004f000500010000000052000100065300030032f4" - "5156000d001832f451200932f40107a1211457000900860010ecaa7f0000015d" - "002c004900010005500016004807000000000000000000000000000000000000" - "000057000902840010ecb27f00000163000100017200020040017f0001000080" - "00010000")}, + "6d706c65036e6574480008000000bc00001a00bd4b0008000100020304040607" + "4c00080078111111111111f14d00050000180000004e00530080c2231e010000" + "1e100a3131310a3131310a3131310a3131316368616c6c656e6765c223150200" + "0015104a1597e4c971b22f8dbc2a8948151a9c80211001000010810600000000" + "830600000000000d00000a004f000500010000000052000100065300030032f4" + "5156000d001832f451200932f40107a1211457000900860010ecaa7f0000015d" + "002c004900010005500016004807000000000000000000000000000000000000" + "000057000902840010ecb27f00000163000100017200020040017f0001000080" + "00010000")}, {{v2, create_session_response}, hexstr2bin("4821009301ab0f4600101900020002001000570009018701bc22dbd5a25bc34f" - "000500010a6e13337f000100004e001b0080802110030000108106d5a245aa83" - "06d5a24502000d04d5a245aa5d003a0049000100050200020010005700090285" - "01b822dbd5a25bc3500016006d09000000000000000000000000000000000000" - "00005e00040042bb0e3103000100024a0004000a7e9824")}, + "000500010a6e13337f000100004e001b0080802110030000108106d5a245aa83" + "06d5a24502000d04d5a245aa5d003a0049000100050200020010005700090285" + "01b822dbd5a25bc3500016006d09000000000000000000000000000000000000" + "00005e00040042bb0e3103000100024a0004000a7e9824")}, {{v2, update_bearer_request}, hexstr2bin("4861003f0010e58a014c53005d001f0049000100055000160048070000000000" - "000000000000000000000000000000480008000000bc0000094ed04d00040000" - "008000")} + "000000000000000000000000000000480008000000bc0000094ed04d00040000" + "008000")} ]. v1_ignore_spare_bits() -> hexstr2bin("3211004e0000000144010000018008000e2b100000000111000000017f000000" - "01800006f1210a1c010284001480802110020000108106080808088306000000" - "00850004ac1410a8850004ac1410a9870004000b921f"). + "01800006f1210a1c010284001480802110020000108106080808088306000000" + "00850004ac1410a8850004ac1410a9870004000b921f"). v2_pco_vendor_ext() -> IEs = - [#v2_access_point_name{ - apn = [<<"example">>,<<"net">>]}, - #v2_aggregate_maximum_bit_rate{ - uplink = 48128, - downlink = 1704125}, - #v2_apn_restriction{ - restriction_type_value = 0}, - #v2_bearer_context{ - group = [#v2_bearer_level_quality_of_service{ - pci = 1,pl = 10,pvi = 0,label = 8, - maximum_bit_rate_for_uplink = 0, - maximum_bit_rate_for_downlink = 0, - guaranteed_bit_rate_for_uplink = 0, - guaranteed_bit_rate_for_downlink = 0}, - #v2_eps_bearer_id{eps_bearer_id = 5}, - #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = 2, - interface_type = 4,key = 5379562,ipv4 = <<127,0,0,1>>, - ipv6 = undefined}]}, - #v2_fully_qualified_tunnel_endpoint_identifier{ - interface_type = 6,key = 5379554,ipv4 = <<127,0,0,1>>, - ipv6 = undefined}, - #v2_indication{ - flags = ['P','CRSI']}, - #v2_international_mobile_subscriber_identity{ - imsi = <<"111111111111111">>}, - #v2_mobile_equipment_identity{ - mei = <<1,0,2,3,4,4,6,7>>}, - #v2_msisdn{msisdn = <<"001011111111111">>}, - #v2_pdn_address_allocation{ - type = ipv4, address = <<0,0,0,0>>}, - #v2_pdn_type{pdn_type = ipv4}, - #v2_protocol_configuration_options{ - config = {0, - [{ipcp,'CP-Configure-Request',0, - [{ms_dns1,<<0,0,0,0>>},{ms_dns2,<<0,0,0,0>>}]}, - {13,<<>>}, - {65280,<<19,1,132>>}, - {12,<<>>}, - {10,<<>>}, - {16,<<>>}]}}, - #v2_rat_type{rat_type = 6}, - #v2_selection_mode{mode = 0}, - #v2_serving_network{ - plmn_id = {<<"302">>, <<"610">>}}, - #v2_ue_time_zone{timezone = 138,dst = 0}, - #v2_user_location_information{ - cgi = undefined, - sai = undefined, - rai = undefined, - tai = <<3,2,22,43,238>>, - ecgi = <<3,2,34,1,187,116,1>>, - lai = undefined}], + [#v2_access_point_name{ + apn = [<<"example">>,<<"net">>]}, + #v2_aggregate_maximum_bit_rate{ + uplink = 48128, + downlink = 1704125}, + #v2_apn_restriction{ + restriction_type_value = 0}, + #v2_bearer_context{ + group = [#v2_bearer_level_quality_of_service{ + pci = 1,pl = 10,pvi = 0,label = 8, + maximum_bit_rate_for_uplink = 0, + maximum_bit_rate_for_downlink = 0, + guaranteed_bit_rate_for_uplink = 0, + guaranteed_bit_rate_for_downlink = 0}, + #v2_eps_bearer_id{eps_bearer_id = 5}, + #v2_fully_qualified_tunnel_endpoint_identifier{ + instance = 2, + interface_type = 4,key = 5379562,ipv4 = <<127,0,0,1>>, + ipv6 = undefined}]}, + #v2_fully_qualified_tunnel_endpoint_identifier{ + interface_type = 6,key = 5379554,ipv4 = <<127,0,0,1>>, + ipv6 = undefined}, + #v2_indication{ + flags = ['P','CRSI']}, + #v2_international_mobile_subscriber_identity{ + imsi = <<"111111111111111">>}, + #v2_mobile_equipment_identity{ + mei = <<1,0,2,3,4,4,6,7>>}, + #v2_msisdn{msisdn = <<"001011111111111">>}, + #v2_pdn_address_allocation{ + type = ipv4, address = <<0,0,0,0>>}, + #v2_pdn_type{pdn_type = ipv4}, + #v2_protocol_configuration_options{ + config = {0, + [{ipcp,'CP-Configure-Request',0, + [{ms_dns1,<<0,0,0,0>>},{ms_dns2,<<0,0,0,0>>}]}, + {13,<<>>}, + {65280,<<19,1,132>>}, + {12,<<>>}, + {10,<<>>}, + {16,<<>>}]}}, + #v2_rat_type{rat_type = 6}, + #v2_selection_mode{mode = 0}, + #v2_serving_network{ + plmn_id = {<<"302">>, <<"610">>}}, + #v2_ue_time_zone{timezone = 138,dst = 0}, + #v2_user_location_information{ + cgi = undefined, + sai = undefined, + rai = undefined, + tai = <<3,2,22,43,238>>, + ecgi = <<3,2,34,1,187,116,1>>, + lai = undefined}], #gtp{version = v2, - type = create_session_request, - seq_no = 1, - tei = 0, - ie = IEs}. + type = create_session_request, + seq_no = 1, + tei = 0, + ie = IEs}. g_pdu() -> hexstr2bin("30ff00540000000c45000054fd1640003f0113cc0ab41003080808080800b437" - "247b000153e61a5900000000e7390b0000000000101112131415161718191a1b" - "1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637"). + "247b000153e61a5900000000e7390b0000000000101112131415161718191a1b" + "1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637"). get_msg(Version, Name) -> proplists:get_value({Version, Name}, test_messages()). @@ -235,10 +243,10 @@ msg_test({{Version, Name}, Msg}) -> ?match(#gtp{ie = IEs} when is_map(IEs), P), ct:pal("Decoded Msg: ~p", [P]), if Version =:= v1 -> - ?equal(Msg, gtp_packet:encode(P)); + ?equal(Msg, gtp_packet:encode(P)); Version =:= v2 -> - %% we don't rencode bit identical for v2 - ?equal(P, gtp_packet:decode(gtp_packet:encode(P))) + %% we don't rencode bit identical for v2 + ?equal(P, gtp_packet:decode(gtp_packet:encode(P))) end. test_v1_invalid_msg(_Config) -> @@ -276,52 +284,52 @@ test_v2_pco_vendor_ext(_Config) -> v2_list(_Config) -> IEs = - [ - #v2_bearer_context{ - instance = 0, - group = [#v2_bearer_level_quality_of_service{ - pci = 1,pl = 10,pvi = 0,label = 8, - maximum_bit_rate_for_uplink = 0, - maximum_bit_rate_for_downlink = 0, - guaranteed_bit_rate_for_uplink = 0, - guaranteed_bit_rate_for_downlink = 0}, - #v2_eps_bearer_id{eps_bearer_id = 5}, - #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = 2, - interface_type = 4,key = 1,ipv4 = <<127,0,0,1>>, - ipv6 = undefined}]}, - #v2_bearer_context{ - instance = 0, - group = [#v2_bearer_level_quality_of_service{ - pci = 1,pl = 10,pvi = 0,label = 8, - maximum_bit_rate_for_uplink = 0, - maximum_bit_rate_for_downlink = 0, - guaranteed_bit_rate_for_uplink = 0, - guaranteed_bit_rate_for_downlink = 0}, - #v2_eps_bearer_id{eps_bearer_id = 5}, - #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = 2, - interface_type = 4,key = 2,ipv4 = <<127,0,0,1>>, - ipv6 = undefined}]}, - #v2_bearer_context{ - instance = 0, - group = [#v2_bearer_level_quality_of_service{ - pci = 1,pl = 10,pvi = 0,label = 8, - maximum_bit_rate_for_uplink = 0, - maximum_bit_rate_for_downlink = 0, - guaranteed_bit_rate_for_uplink = 0, - guaranteed_bit_rate_for_downlink = 0}, - #v2_eps_bearer_id{eps_bearer_id = 5}, - #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = 2, - interface_type = 4,key = 3,ipv4 = <<127,0,0,1>>, - ipv6 = undefined}]} - ], + [ + #v2_bearer_context{ + instance = 0, + group = [#v2_bearer_level_quality_of_service{ + pci = 1,pl = 10,pvi = 0,label = 8, + maximum_bit_rate_for_uplink = 0, + maximum_bit_rate_for_downlink = 0, + guaranteed_bit_rate_for_uplink = 0, + guaranteed_bit_rate_for_downlink = 0}, + #v2_eps_bearer_id{eps_bearer_id = 5}, + #v2_fully_qualified_tunnel_endpoint_identifier{ + instance = 2, + interface_type = 4,key = 1,ipv4 = <<127,0,0,1>>, + ipv6 = undefined}]}, + #v2_bearer_context{ + instance = 0, + group = [#v2_bearer_level_quality_of_service{ + pci = 1,pl = 10,pvi = 0,label = 8, + maximum_bit_rate_for_uplink = 0, + maximum_bit_rate_for_downlink = 0, + guaranteed_bit_rate_for_uplink = 0, + guaranteed_bit_rate_for_downlink = 0}, + #v2_eps_bearer_id{eps_bearer_id = 5}, + #v2_fully_qualified_tunnel_endpoint_identifier{ + instance = 2, + interface_type = 4,key = 2,ipv4 = <<127,0,0,1>>, + ipv6 = undefined}]}, + #v2_bearer_context{ + instance = 0, + group = [#v2_bearer_level_quality_of_service{ + pci = 1,pl = 10,pvi = 0,label = 8, + maximum_bit_rate_for_uplink = 0, + maximum_bit_rate_for_downlink = 0, + guaranteed_bit_rate_for_uplink = 0, + guaranteed_bit_rate_for_downlink = 0}, + #v2_eps_bearer_id{eps_bearer_id = 5}, + #v2_fully_qualified_tunnel_endpoint_identifier{ + instance = 2, + interface_type = 4,key = 3,ipv4 = <<127,0,0,1>>, + ipv6 = undefined}]} + ], Msg = #gtp{version = v2, - type = create_session_request, - seq_no = 1, - tei = 0, - ie = IEs}, + type = create_session_request, + seq_no = 1, + tei = 0, + ie = IEs}, Bin = (catch gtp_packet:encode(Msg)), ?equal(true, is_binary(Bin)), @@ -379,58 +387,58 @@ flags_enc_dec(_Config) -> %% test minimum length of Indication IE Bin1 = <<72,1,0,14,0,0,0,0,0,0,0,0,77,0,2,0,128,0>>, Msg1 = #gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} => - #v2_indication{instance = 0,flags = #{'DAF' => []}}}}, + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} => + #v2_indication{instance = 0,flags = #{'DAF' => []}}}}, ?match(<<72,1,0,14,0,0,0,0,0,0,0,0,77,0,2,0,128,0>>, gtp_packet:encode(Msg1)), ?match(#gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} := - #v2_indication{instance = 0,flags = #{'DAF' := _}}}}, - gtp_packet:decode(Bin1)), + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} := + #v2_indication{instance = 0,flags = #{'DAF' := _}}}}, + gtp_packet:decode(Bin1)), Bin2 = <<72,1,0,14,0,0,0,0,0,0,0,0,77,0,2,0,0,8>>, Msg2 = #gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} => - #v2_indication{instance = 0,flags = #{'P' => []}}}}, + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} => + #v2_indication{instance = 0,flags = #{'P' => []}}}}, ?match(<<72,1,0,14,0,0,0,0,0,0,0,0,77,0,2,0,0,8>>, gtp_packet:encode(Msg2)), ?match(#gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} := - #v2_indication{instance = 0,flags = #{'P' := _}}}}, - gtp_packet:decode(Bin2)), + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} := + #v2_indication{instance = 0,flags = #{'P' := _}}}}, + gtp_packet:decode(Bin2)), %% unkown indication flag, make sure it passed through enc/dec Bin3 = <<72,1,0,23,0,0,0,0,0,0,0,0,77,0,11,0,0,0,0,0,0,0,0,0,0,0,8>>, Msg3 = #gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} => - #v2_indication{instance = 0,flags = #{undecoded => 2048}}}}, + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} => + #v2_indication{instance = 0,flags = #{undecoded => 2048}}}}, ?match(<<72,1,0,23,0,0,0,0,0,0,0,0,77,0,11,0,0,0,0,0,0,0,0,0,0,0,8>>, - gtp_packet:encode(Msg3)), + gtp_packet:encode(Msg3)), ?match(#gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} := - #v2_indication{instance = 0,flags = #{undecoded := 2048}}}}, - gtp_packet:decode(Bin3)), + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} := + #v2_indication{instance = 0,flags = #{undecoded := 2048}}}}, + gtp_packet:decode(Bin3)), Bin4 = <<72,1,0,21,0,0,0,0,0,0,0,0,77,0,9,0,0,0,0,0,0,0,0,0,1>>, Msg4 = #gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} => - #v2_indication{instance = 0,flags = #{'EMCI' => []}}}}, + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} => + #v2_indication{instance = 0,flags = #{'EMCI' => []}}}}, ?match(<<72,1,0,21,0,0,0,0,0,0,0,0,77,0,9,0,0,0,0,0,0,0,0,0,1>>, gtp_packet:encode(Msg4)), ?match(#gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} := - #v2_indication{instance = 0,flags = #{'EMCI' := _}}}}, - gtp_packet:decode(Bin4)), + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} := + #v2_indication{instance = 0,flags = #{'EMCI' := _}}}}, + gtp_packet:decode(Bin4)), %% support for obsolete list format for flags when encoding Msg5 = #gtp{version = v2,type = echo_request,tei = 0,seq_no = 0, - n_pdu = undefined,ext_hdr = [], - ie = #{{v2_indication,0} => - #v2_indication{instance = 0,flags = ['DAF']}}}, + n_pdu = undefined,ext_hdr = [], + ie = #{{v2_indication,0} => + #v2_indication{instance = 0,flags = ['DAF']}}}, ?match(Bin1, gtp_packet:encode(Msg5)), ok. diff --git a/test/property_test/gtplib_prop.erl b/test/property_test/gtplib_prop.erl index 5d54371..90ee99d 100644 --- a/test/property_test/gtplib_prop.erl +++ b/test/property_test/gtplib_prop.erl @@ -42,12 +42,12 @@ -endif. -define(equal(Expected, Actual), - (fun (Expected@@@, Expected@@@) -> true; - (Expected@@@, Actual@@@) -> - ct:pal("MISMATCH(~s:~b, ~s)~nExpected: ~p~nActual: ~p~n", - [?FILE, ?LINE, ??Actual, Expected@@@, Actual@@@]), - false - end)(Expected, Actual) orelse error(badmatch)). + (fun (Expected@@@, Expected@@@) -> true; + (Expected@@@, Actual@@@) -> + ct:pal("MISMATCH(~s:~b, ~s)~nExpected: ~p~nActual: ~p~n", + [?FILE, ?LINE, ??Actual, Expected@@@, Actual@@@]), + false + end)(Expected, Actual) orelse error(badmatch)). %%%=================================================================== %%% Tests @@ -57,11 +57,11 @@ %%-------------------------------------------------------------------- enc_dec_prop(_Config) -> numtests(1000, - ?FORALL(Msg, msg_gen(), - begin - ?equal(Msg, - gtp_packet:decode(gtp_packet:encode(Msg))) - end)). + ?FORALL(Msg, msg_gen(), + begin + ?equal(Msg, + gtp_packet:decode(gtp_packet:encode(Msg))) + end)). %%%=================================================================== %%% Generate PCAP with random (but valid GTP packets) @@ -78,18 +78,18 @@ make_udp(NwSrc, NwDst, TpSrc, TpDst, PayLoad) -> UDPLength = 8 + size(PayLoad), UDPCSum = flower_tools:ip_csum(<>), + 0:8, Proto:8, UDPLength:16, + TpSrc:16, TpDst:16, UDPLength:16, 0:16, + PayLoad/binary>>), UDP = <>, TotLen = 20 + size(UDP), HdrCSum = flower_tools:ip_csum(<<4:4, 5:4, 0:8, TotLen:16, - Id:16, 0:16, 64:8, Proto:8, - 0:16/integer, NwSrc:4/bytes-unit:8, NwDst:4/bytes-unit:8>>), + Id:16, 0:16, 64:8, Proto:8, + 0:16/integer, NwSrc:4/bytes-unit:8, NwDst:4/bytes-unit:8>>), IP = <<4:4, 5:4, 0:8, TotLen:16, - Id:16, 0:16, 64:8, Proto:8, - HdrCSum:16/integer, NwSrc:4/bytes-unit:8, NwDst:4/bytes-unit:8>>, + Id:16, 0:16, 64:8, Proto:8, + HdrCSum:16/integer, NwSrc:4/bytes-unit:8, NwDst:4/bytes-unit:8>>, list_to_binary([IP, UDP]). format_pcapng(Data) -> @@ -99,13 +99,13 @@ format_pcapng(Data) -> pcapng_shb() -> pcapng:encode({shb, {?PCAPNG_VERSION_MAJOR, ?PCAPNG_VERSION_MINOR}, - [{os, <<"CAROS">>}, {userappl, <<"CAPWAP">>}]}). + [{os, <<"CAROS">>}, {userappl, <<"CAPWAP">>}]}). pcapng_ifd(Name) -> pcapng:encode({ifd, ?LINKTYPE_RAW, 65535, - [{name, Name}, - {tsresol, <<6>>}, - {os, <<"CAROS">>}]}). + [{name, Name}, + {tsresol, <<6>>}, + {os, <<"CAROS">>}]}). pcap_msg(Msg, Io) -> Data = gtp_packet:encode(Msg), @@ -145,17 +145,17 @@ list_no_dupls(T) -> remove_duplicates([]) -> []; remove_duplicates([A|T]) -> case lists:member(A, T) of - true -> remove_duplicates(T); - false -> [A|remove_duplicates(T)] + true -> remove_duplicates(T); + false -> [A|remove_duplicates(T)] end. order_by_fun(Order, List) -> lists:foldr( fun(I, A) -> - case lists:member(I, List) of - true -> [I|A]; - false -> A - end + case lists:member(I, List) of + true -> [I|A]; + false -> A + end end, [], Order). order_by(Order, List) -> @@ -169,18 +169,18 @@ flag() -> dns_label() -> ?LET(I, int_range(1,64), - vector(I, - oneof( - lists:seq($a, $z) ++ lists:seq($0, $9) ++ [$-]))). + vector(I, + oneof( + lists:seq($a, $z) ++ lists:seq($0, $9) ++ [$-]))). dns_name_list() -> ?SUCHTHAT(N, - ?LET(I, int_range(1,7), vector(I, dns_label())), - length(lists:flatten(N)) < 100). + ?LET(I, int_range(1,7), vector(I, dns_label())), + length(lists:flatten(N)) < 100). dns_name() -> ?LET(L, dns_name_list(), - [list_to_binary(X) || X <- L]). + [list_to_binary(X) || X <- L]). mcc() -> ?LET(I, int_range(1,999), integer_to_binary(I)). @@ -244,7 +244,7 @@ uint16_array() -> binstr_number(Min, Max) -> ?LET(X, - ?LET(I, int_range(Min,Max), vector(I, integer($0, $9))), list_to_binary(X)). + ?LET(I, int_range(Min,Max), vector(I, integer($0, $9))), list_to_binary(X)). binary(Min, Max) -> ?LET(I, int_range(Min,Max), binary(I)). @@ -264,182 +264,182 @@ imeisv() -> msg_gen() -> oneof( [#gtp{ - version = v1, - type = v1_msg_type(), - tei = uint32(), - seq_no = uint16(), - ie = v1_ie() - }, + version = v1, + type = v1_msg_type(), + tei = uint32(), + seq_no = uint16(), + ie = v1_ie() + }, #gtp{ - version = v2, - type = v2_msg_type(), - tei = uint32(), - seq_no = uint16(), - ie = v2_ie() - }, + version = v2, + type = v2_msg_type(), + tei = uint32(), + seq_no = uint16(), + ie = v2_ie() + }, #gtp{ - version = oneof([prime_v0, prime_v0s, prime_v1, prime_v2]), - type = prime_msg_type(), - seq_no = uint16(), - ie = prime_ie() - } + version = oneof([prime_v0, prime_v0s, prime_v1, prime_v2]), + type = prime_msg_type(), + seq_no = uint16(), + ie = prime_ie() + } ]). v1_msg_type() -> oneof([ - echo_request, - echo_response, - version_not_supported, - create_pdp_context_request, - create_pdp_context_response, - update_pdp_context_request, - update_pdp_context_response, - delete_pdp_context_request, - delete_pdp_context_response, - initiate_pdp_context_activation_request, - initiate_pdp_context_activation_response, - error_indication, - pdu_notification_request, - pdu_notification_response, - pdu_notification_reject_request, - pdu_notification_reject_response, - supported_extension_headers_notification, - send_routeing_information_for_gprs_request, - send_routeing_information_for_gprs_response, - failure_report_request, - failure_report_response, - note_ms_gprs_present_request, - note_ms_gprs_present_response, - identification_request, - identification_response, - sgsn_context_request, - sgsn_context_response, - sgsn_context_acknowledge, - forward_relocation_request, - forward_relocation_response, - forward_relocation_complete, - relocation_cancel_request, - relocation_cancel_response, - forward_srns_context, - forward_relocation_complete_acknowledge, - forward_srns_context_acknowledge, - ran_information_relay, - mbms_notification_request, - mbms_notification_response, - mbms_notification_reject_request, - mbms_notification_reject_response, - create_mbms_context_request, - create_mbms_context_response, - update_mbms_context_request, - update_mbms_context_response, - delete_mbms_context_request, - delete_mbms_context_response, - mbms_registration_request, - mbms_registration_response, - mbms_de_registration_request, - mbms_de_registration_response, - mbms_session_start_request, - mbms_session_start_response, - mbms_session_stop_request, - mbms_session_stop_response, - mbms_session_update_request, - mbms_session_update_response, - ms_info_change_notification_request, - ms_info_change_notification_response - ]). + echo_request, + echo_response, + version_not_supported, + create_pdp_context_request, + create_pdp_context_response, + update_pdp_context_request, + update_pdp_context_response, + delete_pdp_context_request, + delete_pdp_context_response, + initiate_pdp_context_activation_request, + initiate_pdp_context_activation_response, + error_indication, + pdu_notification_request, + pdu_notification_response, + pdu_notification_reject_request, + pdu_notification_reject_response, + supported_extension_headers_notification, + send_routeing_information_for_gprs_request, + send_routeing_information_for_gprs_response, + failure_report_request, + failure_report_response, + note_ms_gprs_present_request, + note_ms_gprs_present_response, + identification_request, + identification_response, + sgsn_context_request, + sgsn_context_response, + sgsn_context_acknowledge, + forward_relocation_request, + forward_relocation_response, + forward_relocation_complete, + relocation_cancel_request, + relocation_cancel_response, + forward_srns_context, + forward_relocation_complete_acknowledge, + forward_srns_context_acknowledge, + ran_information_relay, + mbms_notification_request, + mbms_notification_response, + mbms_notification_reject_request, + mbms_notification_reject_response, + create_mbms_context_request, + create_mbms_context_response, + update_mbms_context_request, + update_mbms_context_response, + delete_mbms_context_request, + delete_mbms_context_response, + mbms_registration_request, + mbms_registration_response, + mbms_de_registration_request, + mbms_de_registration_response, + mbms_session_start_request, + mbms_session_start_response, + mbms_session_stop_request, + mbms_session_stop_response, + mbms_session_update_request, + mbms_session_update_response, + ms_info_change_notification_request, + ms_info_change_notification_response + ]). prime_msg_type() -> oneof([ - version_not_supported, - node_alive_request, - node_alive_response, - redirection_request, - redirection_response, - error_indication, - data_record_transfer_request, - data_record_transfer_response - ]). + version_not_supported, + node_alive_request, + node_alive_response, + redirection_request, + redirection_response, + error_indication, + data_record_transfer_request, + data_record_transfer_response + ]). v2_msg_type() -> oneof([ - echo_request, - echo_response, - version_not_supported, - create_session_request, - create_session_response, - delete_session_request, - delete_session_response, - modify_bearer_request, - modify_bearer_response, - change_notification_request, - change_notification_response, - modify_bearer_command, - modify_bearer_failure_indication, - delete_bearer_command, - delete_bearer_failure_indication, - bearer_resource_command, - bearer_resource_failure_indication, - downlink_data_notification_failure_indication, - trace_session_activation, - trace_session_deactivation, - stop_paging_indication, - create_bearer_request, - create_bearer_response, - update_bearer_request, - update_bearer_response, - delete_bearer_request, - delete_bearer_response, - delete_pdn_connection_set_request, - delete_pdn_connection_set_response, - pgw_downlink_triggering_notification, - pgw_downlink_triggering_acknowledge, - identification_request, - identification_response, - context_request, - context_response, - context_acknowledge, - forward_relocation_request, - forward_relocation_response, - forward_relocation_complete_notification, - forward_relocation_complete_acknowledge, - forward_access_context_notification, - forward_access_context_acknowledge, - relocation_cancel_request, - relocation_cancel_response, - configuration_transfer_tunnel, - detach_notification, - detach_acknowledge, - cs_paging_indication, - ran_information_relay, - alert_mme_notification, - alert_mme_acknowledge, - ue_activity_notification, - ue_activity_acknowledge, - isr_status_indication, - create_forwarding_tunnel_request, - create_forwarding_tunnel_response, - suspend_notification, - suspend_acknowledge, - resume_notification, - resume_acknowledge, - create_indirect_data_forwarding_tunnel_request, - create_indirect_data_forwarding_tunnel_response, - delete_indirect_data_forwarding_tunnel_request, - delete_indirect_data_forwarding_tunnel_response, - release_access_bearers_request, - release_access_bearers_response, - downlink_data_notification, - downlink_data_notification_acknowledge, - pgw_restart_notification, - pgw_restart_notification_acknowledge, - update_pdn_connection_set_request, - update_pdn_connection_set_response, - mbms_session_start_response, - mbms_session_update_request, - mbms_session_update_response, - mbms_session_stop_request, - mbms_session_stop_response - ]). + echo_request, + echo_response, + version_not_supported, + create_session_request, + create_session_response, + delete_session_request, + delete_session_response, + modify_bearer_request, + modify_bearer_response, + change_notification_request, + change_notification_response, + modify_bearer_command, + modify_bearer_failure_indication, + delete_bearer_command, + delete_bearer_failure_indication, + bearer_resource_command, + bearer_resource_failure_indication, + downlink_data_notification_failure_indication, + trace_session_activation, + trace_session_deactivation, + stop_paging_indication, + create_bearer_request, + create_bearer_response, + update_bearer_request, + update_bearer_response, + delete_bearer_request, + delete_bearer_response, + delete_pdn_connection_set_request, + delete_pdn_connection_set_response, + pgw_downlink_triggering_notification, + pgw_downlink_triggering_acknowledge, + identification_request, + identification_response, + context_request, + context_response, + context_acknowledge, + forward_relocation_request, + forward_relocation_response, + forward_relocation_complete_notification, + forward_relocation_complete_acknowledge, + forward_access_context_notification, + forward_access_context_acknowledge, + relocation_cancel_request, + relocation_cancel_response, + configuration_transfer_tunnel, + detach_notification, + detach_acknowledge, + cs_paging_indication, + ran_information_relay, + alert_mme_notification, + alert_mme_acknowledge, + ue_activity_notification, + ue_activity_acknowledge, + isr_status_indication, + create_forwarding_tunnel_request, + create_forwarding_tunnel_response, + suspend_notification, + suspend_acknowledge, + resume_notification, + resume_acknowledge, + create_indirect_data_forwarding_tunnel_request, + create_indirect_data_forwarding_tunnel_response, + delete_indirect_data_forwarding_tunnel_request, + delete_indirect_data_forwarding_tunnel_response, + release_access_bearers_request, + release_access_bearers_response, + downlink_data_notification, + downlink_data_notification_acknowledge, + pgw_restart_notification, + pgw_restart_notification_acknowledge, + update_pdn_connection_set_request, + update_pdn_connection_set_response, + mbms_session_start_response, + mbms_session_update_request, + mbms_session_update_response, + mbms_session_stop_request, + mbms_session_stop_response + ]). v1_simple_ie() -> oneof( @@ -784,70 +784,70 @@ gen_cause() -> #cause{ instance = instance(), value = - oneof( - [request_imsi, - request_imei, - request_imsi_and_imei, - no_identity_needed, - request_ms_refuses, - request_ms_is_not_gprs_responding, - reactivation_requested, - pdp_address_inactivity_timer_expires, - network_failure, - qos_parameter_mismatch, - gtpprime_system_failure, - gtpprime_the_transmit_buffers_are_becoming_full, - gtpprime_the_receive_buffers_are_becoming_full, - gtpprime_another_node_is_about_to_go_down, - gtpprime_this_node_is_about_to_go_down, - request_accepted, - new_pdp_type_due_to_network_preference, - new_pdp_type_due_to_single_address_bearer_only, - cdr_decoding_error, - non_existent, - invalid_message_format, - imsi_imei_not_known, - ms_is_gprs_detached, - reject_ms_is_not_gprs_responding, - reject_ms_refuses, - version_not_supported, - no_resources_available, - service_not_supported, - mandatory_ie_incorrect, - mandatory_ie_missing, - optional_ie_incorrect, - system_failure, - roaming_restriction, - p_tmsi_signature_mismatch, - gprs_connection_suspended, - authentication_failure, - user_authentication_failed, - context_not_found, - all_dynamic_pdp_addresses_are_occupied, - no_memory_is_available, - relocation_failure, - unknown_mandatory_extension_header, - semantic_error_in_the_tft_operation, - syntactic_error_in_the_tft_operation, - semantic_errors_in_packet_filter, - syntactic_errors_in_packet_filter, - missing_or_unknown_apn, - unknown_pdp_address_or_pdp_type, - pdp_context_without_tft_already_activated, - apn_access_denied_no_subscription, - apn_restriction_type_incompatibility_with_currently_active_pdp_contexts, - ms_mbms_capabilities_insufficient, - invalid_correlation_id, - mbms_bearer_context_superseded, - bearer_control_mode_violation, - collision_with_network_initiated_request, - apn_congestion, - bearer_handling_not_supported, - target_access_restricted_for_the_subscriber, - request_related_to_possibly_duplicated_packets_already_fulfilled, - request_already_fulfilled, - sequence_numbers_of_released_cancelled_packets_ie_incorrect, - request_not_fulfilled]) + oneof( + [request_imsi, + request_imei, + request_imsi_and_imei, + no_identity_needed, + request_ms_refuses, + request_ms_is_not_gprs_responding, + reactivation_requested, + pdp_address_inactivity_timer_expires, + network_failure, + qos_parameter_mismatch, + gtpprime_system_failure, + gtpprime_the_transmit_buffers_are_becoming_full, + gtpprime_the_receive_buffers_are_becoming_full, + gtpprime_another_node_is_about_to_go_down, + gtpprime_this_node_is_about_to_go_down, + request_accepted, + new_pdp_type_due_to_network_preference, + new_pdp_type_due_to_single_address_bearer_only, + cdr_decoding_error, + non_existent, + invalid_message_format, + imsi_imei_not_known, + ms_is_gprs_detached, + reject_ms_is_not_gprs_responding, + reject_ms_refuses, + version_not_supported, + no_resources_available, + service_not_supported, + mandatory_ie_incorrect, + mandatory_ie_missing, + optional_ie_incorrect, + system_failure, + roaming_restriction, + p_tmsi_signature_mismatch, + gprs_connection_suspended, + authentication_failure, + user_authentication_failed, + context_not_found, + all_dynamic_pdp_addresses_are_occupied, + no_memory_is_available, + relocation_failure, + unknown_mandatory_extension_header, + semantic_error_in_the_tft_operation, + syntactic_error_in_the_tft_operation, + semantic_errors_in_packet_filter, + syntactic_errors_in_packet_filter, + missing_or_unknown_apn, + unknown_pdp_address_or_pdp_type, + pdp_context_without_tft_already_activated, + apn_access_denied_no_subscription, + apn_restriction_type_incompatibility_with_currently_active_pdp_contexts, + ms_mbms_capabilities_insufficient, + invalid_correlation_id, + mbms_bearer_context_superseded, + bearer_control_mode_violation, + collision_with_network_initiated_request, + apn_congestion, + bearer_handling_not_supported, + target_access_restricted_for_the_subscriber, + request_related_to_possibly_duplicated_packets_already_fulfilled, + request_already_fulfilled, + sequence_numbers_of_released_cancelled_packets_ie_incorrect, + request_not_fulfilled]) }. gen_international_mobile_subscriber_identity() -> @@ -1008,9 +1008,9 @@ gen_packet_transfer_command() -> #packet_transfer_command{ instance = instance(), command = oneof([send_data_record_packet, - send_possibly_duplicated_data_record_packet, - cancel_data_record_packet, - release_data_record_packet]) + send_possibly_duplicated_data_record_packet, + cancel_data_record_packet, + release_data_record_packet]) }. gen_charging_id() -> @@ -1108,17 +1108,17 @@ gen_access_point_name() -> gen_random_list_of_pco() -> list(oneof( - [{ipcp,'CP-Configure-Request',0, - [{ms_dns1,<<0,0,0,0>>},{ms_dns2,<<0,0,0,0>>}]}, - {13, <<>>}, - {65280, <<19,1,132>>}, - {12, <<>>}, - {10, <<>>}, - {16, <<>>}, - {13, ip4_address()}, - {ipcp,'CP-Configure-Nak',0, - [{ms_dns1, ip4_address()},{ms_dns2, ip4_address()}]}, - {5,<<2>>}])). + [{ipcp,'CP-Configure-Request',0, + [{ms_dns1,<<0,0,0,0>>},{ms_dns2,<<0,0,0,0>>}]}, + {13, <<>>}, + {65280, <<19,1,132>>}, + {12, <<>>}, + {10, <<>>}, + {16, <<>>}, + {13, ip4_address()}, + {ipcp,'CP-Configure-Nak',0, + [{ms_dns1, ip4_address()},{ms_dns2, ip4_address()}]}, + {5,<<2>>}])). gen_protocol_configuration_options() -> #protocol_configuration_options{ @@ -1209,15 +1209,15 @@ gen_common_flags() -> #common_flags{ instance = instance(), flags = - flags( - ['Dual Address Bearer Flag', - 'Upgrade QoS Supported', - 'NRSN', - 'No QoS negotiation', - 'MBMS Counting Information', - 'RAN Procedures Ready', - 'MBMS Service Type', - 'Prohibit Payload Compression']) + flags( + ['Dual Address Bearer Flag', + 'Upgrade QoS Supported', + 'NRSN', + 'No QoS negotiation', + 'MBMS Counting Information', + 'RAN Procedures Ready', + 'MBMS Service Type', + 'Prohibit Payload Compression']) }. gen_apn_restriction() -> @@ -1445,7 +1445,7 @@ gen_extended_common_flags() -> #extended_common_flags{ instance = instance(), flags = - flags(['CCRSI', 'CPSR', 'RetLoc', 'VB', 'PCRI', 'BDWI', 'UASI']) + flags(['CCRSI', 'CPSR', 'RetLoc', 'VB', 'PCRI', 'BDWI', 'UASI']) }. gen_user_csg_information() -> @@ -1585,7 +1585,7 @@ gen_data_record_packet() -> application = int_range(1, 7), version = {int_range(0, 7), int_range(0,9)}, records = - ?LET(I, int_range(1,10), vector(I, binary())) + ?LET(I, int_range(1,10), vector(I, binary())) }. gen_requests_responded() -> @@ -1628,86 +1628,86 @@ gen_v2_cause() -> #v2_cause{ instance = instance(), v2_cause = - oneof([reserved, - local_detach, - complete_detach, - rat_changed_from_3gpp_to_non_3gpp, - isr_deactivation, - error_indication_received_from_rnc_enodeb_s4_sgsn, - imsi_detach_only, - reactivation_requested, - pdn_reconnection_to_this_apn_disallowed, - access_changed_from_non_3gpp_to_3gpp, - pdn_connection_inactivity_timer_expires, - pgw_not_responding, - network_failure, - qos_parameter_mismatch, - request_accepted, - request_accepted_partially, - new_pdn_type_due_to_network_preference, - new_pdn_type_due_to_single_address_bearer_only, - context_not_found, - invalid_message_format, - version_not_supported_by_next_peer, - invalid_length, - service_not_supported, - mandatory_ie_incorrect, - mandatory_ie_missing, - system_failure, - no_resources_available, - semantic_error_in_the_tft_operation, - syntactic_error_in_the_tft_operation, - semantic_errors_in_packet_filter, - syntactic_errors_in_packet_filter, - missing_or_unknown_apn, - gre_key_not_found, - relocation_failure, - denied_in_rat, - preferred_pdn_type_not_supported, - all_dynamic_addresses_are_occupied, - ue_context_without_tft_already_activated, - protocol_type_not_supported, - ue_not_responding, - ue_refuses, - service_denied, - unable_to_page_ue, - no_memory_available, - user_authentication_failed, - apn_access_denied___no_subscription, - request_rejected, - p_tmsi_signature_mismatch, - imsi_imei_not_known, - semantic_error_in_the_tad_operation, - syntactic_error_in_the_tad_operation, - remote_peer_not_responding, - collision_with_network_initiated_request, - unable_to_page_ue_due_to_suspension, - conditional_ie_missing, - apn_restriction_type_incompatible_with_currently_active_pdn_connection, - invalid_overall_length_of_the_triggered_response_message_and_a_piggybacked_initial_message, - data_forwarding_not_supported, - invalid_reply_from_remote_peer, - fallback_to_gtpv1, - invalid_peer, - temporarily_rejected_due_to_handover_tau_rau_procedure_in_progress, - modifications_not_limited_to_s1_u_bearers, - request_rejected_for_a_pmipv6_reason, - apn_congestion, - bearer_handling_not_supported, - ue_already_re_attached, - multiple_pdn_connections_for_a_given_apn_not_allowed, - target_access_restricted_for_the_subscriber, - mme_sgsn_refuses_due_to_vplmn_policy, - gtp_c_entity_congestion, - late_overlapping_request, - timed_out_request, - ue_is_temporarily_not_reachable_due_to_power_saving, - relocation_failure_due_to_nas_message_redirection, - ue_not_authorised_by_ocs_or_external_aaa_server, - multiple_accesses_to_a_pdn_connection_not_allowed, - request_rejected_due_to_ue_capability, - s1_u_path_failure, - '5gc_not_allowed']), + oneof([reserved, + local_detach, + complete_detach, + rat_changed_from_3gpp_to_non_3gpp, + isr_deactivation, + error_indication_received_from_rnc_enodeb_s4_sgsn, + imsi_detach_only, + reactivation_requested, + pdn_reconnection_to_this_apn_disallowed, + access_changed_from_non_3gpp_to_3gpp, + pdn_connection_inactivity_timer_expires, + pgw_not_responding, + network_failure, + qos_parameter_mismatch, + request_accepted, + request_accepted_partially, + new_pdn_type_due_to_network_preference, + new_pdn_type_due_to_single_address_bearer_only, + context_not_found, + invalid_message_format, + version_not_supported_by_next_peer, + invalid_length, + service_not_supported, + mandatory_ie_incorrect, + mandatory_ie_missing, + system_failure, + no_resources_available, + semantic_error_in_the_tft_operation, + syntactic_error_in_the_tft_operation, + semantic_errors_in_packet_filter, + syntactic_errors_in_packet_filter, + missing_or_unknown_apn, + gre_key_not_found, + relocation_failure, + denied_in_rat, + preferred_pdn_type_not_supported, + all_dynamic_addresses_are_occupied, + ue_context_without_tft_already_activated, + protocol_type_not_supported, + ue_not_responding, + ue_refuses, + service_denied, + unable_to_page_ue, + no_memory_available, + user_authentication_failed, + apn_access_denied___no_subscription, + request_rejected, + p_tmsi_signature_mismatch, + imsi_imei_not_known, + semantic_error_in_the_tad_operation, + syntactic_error_in_the_tad_operation, + remote_peer_not_responding, + collision_with_network_initiated_request, + unable_to_page_ue_due_to_suspension, + conditional_ie_missing, + apn_restriction_type_incompatible_with_currently_active_pdn_connection, + invalid_overall_length_of_the_triggered_response_message_and_a_piggybacked_initial_message, + data_forwarding_not_supported, + invalid_reply_from_remote_peer, + fallback_to_gtpv1, + invalid_peer, + temporarily_rejected_due_to_handover_tau_rau_procedure_in_progress, + modifications_not_limited_to_s1_u_bearers, + request_rejected_for_a_pmipv6_reason, + apn_congestion, + bearer_handling_not_supported, + ue_already_re_attached, + multiple_pdn_connections_for_a_given_apn_not_allowed, + target_access_restricted_for_the_subscriber, + mme_sgsn_refuses_due_to_vplmn_policy, + gtp_c_entity_congestion, + late_overlapping_request, + timed_out_request, + ue_is_temporarily_not_reachable_due_to_power_saving, + relocation_failure_due_to_nas_message_redirection, + ue_not_authorised_by_ocs_or_external_aaa_server, + multiple_accesses_to_a_pdn_connection_not_allowed, + request_rejected_due_to_ue_capability, + s1_u_path_failure, + '5gc_not_allowed']), pce = oneof([0,1]), bce = oneof([0,1]), cs = oneof([0,1]), @@ -1766,16 +1766,16 @@ gen_v2_indication() -> #v2_indication{ instance = instance(), flags = - flags( - ['DAF', 'DTF', 'HI', 'DFI', 'OI', 'ISRSI', 'ISRAI', 'SGWCI', - 'SQCI', 'UIMSI', 'CFSI', 'CRSI', 'P', 'PT', 'SI', 'MSV', - 'RetLoc', 'PBIC', 'SRNI', 'S6AF', 'S4AF', 'MBMDT', 'ISRAU', 'CCRSI', - 'CPRAI', 'ARRL', 'PPOF', 'PPON/PPEI', 'PPSI', 'CSFBI', 'CLII', 'CPSR', - 'NSI', 'UASI', 'DTCI', 'BDWI', 'PSCI', 'PCRI', 'AOSI', 'AOPI', - 'ROAAI', 'EPCOSI', 'CPOPCI', 'PMTSMI', 'S11TF', 'PNSI', 'UNACCSI', 'WPMSI', - '5GSNN26', 'REPREFI', '5GSIWK', 'EEVRSI', 'LTEMUI', 'LTEMPI', 'ENBCRSI', 'TSPCMI', - 'CSRMFI', 'MTEDTN', 'MTEDTA', 'N5GNMI', '5GCNRS', '5GCNRI', '5SRHOI', 'ETHPDN', - 'SISSME', 'NSENBI', 'IPFUPF', 'EMCI']) + flags( + ['DAF', 'DTF', 'HI', 'DFI', 'OI', 'ISRSI', 'ISRAI', 'SGWCI', + 'SQCI', 'UIMSI', 'CFSI', 'CRSI', 'P', 'PT', 'SI', 'MSV', + 'RetLoc', 'PBIC', 'SRNI', 'S6AF', 'S4AF', 'MBMDT', 'ISRAU', 'CCRSI', + 'CPRAI', 'ARRL', 'PPOF', 'PPON/PPEI', 'PPSI', 'CSFBI', 'CLII', 'CPSR', + 'NSI', 'UASI', 'DTCI', 'BDWI', 'PSCI', 'PCRI', 'AOSI', 'AOPI', + 'ROAAI', 'EPCOSI', 'CPOPCI', 'PMTSMI', 'S11TF', 'PNSI', 'UNACCSI', 'WPMSI', + '5GSNN26', 'REPREFI', '5GSIWK', 'EEVRSI', 'LTEMUI', 'LTEMPI', 'ENBCRSI', 'TSPCMI', + 'CSRMFI', 'MTEDTN', 'MTEDTA', 'N5GNMI', '5GCNRS', '5GCNRI', '5SRHOI', 'ETHPDN', + 'SISSME', 'NSENBI', 'IPFUPF', 'EMCI']) }. @@ -1789,20 +1789,20 @@ gen_v2_protocol_configuration_options() -> gen_v2_pdn_address_allocation() -> oneof( [#v2_pdn_address_allocation{ - instance = instance(), - type = 'ipv4', - address = ip4_address() - }, + instance = instance(), + type = 'ipv4', + address = ip4_address() + }, #v2_pdn_address_allocation{ - instance = instance(), - type = 'ipv6', - address = ip6_address() - }, + instance = instance(), + type = 'ipv6', + address = ip6_address() + }, #v2_pdn_address_allocation{ - instance = instance(), - type = 'ipv4v6', - address = ip46_address() - }]). + instance = instance(), + type = 'ipv4v6', + address = ip46_address() + }]). gen_v2_bearer_level_quality_of_service() -> #v2_bearer_level_quality_of_service{ @@ -1912,24 +1912,24 @@ gen_v2_user_location_information() -> gen_v2_fully_qualified_tunnel_endpoint_identifier() -> oneof( [#v2_fully_qualified_tunnel_endpoint_identifier{ - instance = instance(), - interface_type = int_range(0,16#3f), - key = uint32(), - ipv4 = ip4_address() - }, + instance = instance(), + interface_type = int_range(0,16#3f), + key = uint32(), + ipv4 = ip4_address() + }, #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = instance(), - interface_type = int_range(0,16#3f), - key = uint32(), - ipv6 = ip6_address() - }, + instance = instance(), + interface_type = int_range(0,16#3f), + key = uint32(), + ipv6 = ip6_address() + }, #v2_fully_qualified_tunnel_endpoint_identifier{ - instance = instance(), - interface_type = int_range(0,16#3f), - key = uint32(), - ipv4 = ip4_address(), - ipv6 = ip6_address() - }]). + instance = instance(), + interface_type = int_range(0,16#3f), + key = uint32(), + ipv4 = ip4_address(), + ipv6 = ip6_address() + }]). gen_v2_tmsi() -> #v2_tmsi{ @@ -1989,7 +1989,7 @@ gen_v2_trace_information() -> session_trace_depth = uint8(), list_of_interfaces = binary(12), ip_address_of_trace_collection_entity = - oneof([ip4_address(), ip6_address()]) + oneof([ip4_address(), ip6_address()]) }. gen_v2_bearer_flags() -> @@ -2188,36 +2188,36 @@ gen_v2_change_reporting_action() -> #v2_change_reporting_action{ instance = instance(), action = oneof([stop_reporting, - start_reporting_cgi_sai, - start_reporting_rai, - start_reporting_tai, - start_reporting_ecgi, - start_reporting_cgi_sai_and_rai, - start_reporting_tai_and_ecgi, - start_reporting_macro_enodeb_id_and_extended_macro_enodeb_id, - start_reporting_tai__macro_enodeb_id_and_extended_macro_enodeb_id]) + start_reporting_cgi_sai, + start_reporting_rai, + start_reporting_tai, + start_reporting_ecgi, + start_reporting_cgi_sai_and_rai, + start_reporting_tai_and_ecgi, + start_reporting_macro_enodeb_id_and_extended_macro_enodeb_id, + start_reporting_tai__macro_enodeb_id_and_extended_macro_enodeb_id]) }. gen_v2_fully_qualified_pdn_connection_set_identifier() -> oneof([ - #v2_fully_qualified_pdn_connection_set_identifier{ - instance = instance(), - node_id_type = 0, - node_id = ip4_address(), - csids = ?LET(I, uint4(), vector(I, uint16())) - }, - #v2_fully_qualified_pdn_connection_set_identifier{ - instance = instance(), - node_id_type = 1, - node_id = ip6_address(), - csids = ?LET(I, uint4(), vector(I, uint16())) - }, - #v2_fully_qualified_pdn_connection_set_identifier{ - instance = instance(), - node_id_type = 2, - node_id = {int_range(0,999), int_range(0,999), int_range(0,16#0fff)}, - csids = ?LET(I, uint4(), vector(I, uint16())) - }]). + #v2_fully_qualified_pdn_connection_set_identifier{ + instance = instance(), + node_id_type = 0, + node_id = ip4_address(), + csids = ?LET(I, uint4(), vector(I, uint16())) + }, + #v2_fully_qualified_pdn_connection_set_identifier{ + instance = instance(), + node_id_type = 1, + node_id = ip6_address(), + csids = ?LET(I, uint4(), vector(I, uint16())) + }, + #v2_fully_qualified_pdn_connection_set_identifier{ + instance = instance(), + node_id_type = 2, + node_id = {int_range(0,999), int_range(0,999), int_range(0,16#0fff)}, + csids = ?LET(I, uint4(), vector(I, uint16())) + }]). gen_v2_channel_needed() -> #v2_channel_needed{ @@ -2335,7 +2335,7 @@ gen_v2_node_features() -> #v2_node_features{ instance = instance(), features = - flags(['ETH', 'S1UN', 'CIOT', 'NTSR', 'MABR', 'PRN']) + flags(['ETH', 'S1UN', 'CIOT', 'NTSR', 'MABR', 'PRN']) }. gen_v2_mbms_time_to_data_transfer() -> @@ -2425,7 +2425,7 @@ gen_v2_change_to_report_flags_() -> #v2_change_to_report_flags_{ instance = instance(), flags = flags(['TZCR', 'SNCR']) - }. + }. gen_v2_action_indication() -> #v2_action_indication{ @@ -2436,27 +2436,27 @@ gen_v2_action_indication() -> gen_v2_twan_identifier() -> oneof( [#v2_twan_identifier{ - instance = instance(), - ssid = binary(), - bssid = oneof([undefined, binary(6)]), - civic_address = oneof([undefined, binary()]), - plmn_id = oneof([undefined, {mcc(), mnc()}]), - operator_name = oneof([undefined, binary()]), - relay_identity_type = undefined, - relay_identity = undefined, - circuit_id = undefined - }, + instance = instance(), + ssid = binary(), + bssid = oneof([undefined, binary(6)]), + civic_address = oneof([undefined, binary()]), + plmn_id = oneof([undefined, {mcc(), mnc()}]), + operator_name = oneof([undefined, binary()]), + relay_identity_type = undefined, + relay_identity = undefined, + circuit_id = undefined + }, #v2_twan_identifier{ - instance = instance(), - ssid = binary(), - bssid = oneof([undefined, binary(6)]), - civic_address = oneof([undefined, binary()]), - plmn_id = oneof([undefined, {mcc(), mnc()}]), - operator_name = oneof([undefined, binary()]), - relay_identity_type = uint8(), - relay_identity = binary(), - circuit_id = binary() - }]). + instance = instance(), + ssid = binary(), + bssid = oneof([undefined, binary(6)]), + civic_address = oneof([undefined, binary()]), + plmn_id = oneof([undefined, {mcc(), mnc()}]), + operator_name = oneof([undefined, binary()]), + relay_identity_type = uint8(), + relay_identity = binary(), + circuit_id = binary() + }]). gen_v2_uli_timestamp() -> #v2_uli_timestamp{ @@ -2475,7 +2475,7 @@ gen_v2_ran_nas_cause() -> protocol = uint4(), type = uint4(), cause = binary() - }. + }. gen_v2_cn_operator_selection_entity() -> #v2_cn_operator_selection_entity{