update it

This commit is contained in:
Sukchan Lee 2017-03-15 16:07:52 +09:00
parent 46b835be5e
commit df28836695
7 changed files with 360 additions and 7 deletions

View File

@ -26,7 +26,7 @@
/*******************************************************************************
* This file had been created by gtpv2c_tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2017-03-15 15:49:36.583058 by acetcom
* Created on: 2017-03-15 16:07:47.447096 by acetcom
* from 29274-d80.docx
******************************************************************************/

View File

@ -26,7 +26,7 @@
/*******************************************************************************
* This file had been created by gtpv2c_tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2017-03-15 15:49:36.572393 by acetcom
* Created on: 2017-03-15 16:07:47.424634 by acetcom
* from 29274-d80.docx
******************************************************************************/
@ -368,6 +368,61 @@ extern tlv_desc_t gtpv2c_desc_load_control_information_0;
extern tlv_desc_t gtpv2c_desc_remote_ue_context_0;
extern tlv_desc_t gtpv2c_desc_scef_pdn_connection_0;
/* Message Descriptor */
extern tlv_desc_t gtpv2c_desc_echo_request;
extern tlv_desc_t gtpv2c_desc_echo_response;
extern tlv_desc_t gtpv2c_desc_version_not_supported_indication;
extern tlv_desc_t gtpv2c_desc_create_session_request;
extern tlv_desc_t gtpv2c_desc_create_session_response;
extern tlv_desc_t gtpv2c_desc_modify_bearer_request;
extern tlv_desc_t gtpv2c_desc_modify_bearer_response;
extern tlv_desc_t gtpv2c_desc_delete_session_request;
extern tlv_desc_t gtpv2c_desc_delete_session_response;
extern tlv_desc_t gtpv2c_desc_change_notification_request;
extern tlv_desc_t gtpv2c_desc_change_notification_response;
extern tlv_desc_t gtpv2c_desc_remote_ue_report_notification;
extern tlv_desc_t gtpv2c_desc_remote_ue_report_acknowledge;
extern tlv_desc_t gtpv2c_desc_modify_bearer_command;
extern tlv_desc_t gtpv2c_desc_modify_bearer_failure_indication;
extern tlv_desc_t gtpv2c_desc_delete_bearer_command;
extern tlv_desc_t gtpv2c_desc_delete_bearer_failure_indication;
extern tlv_desc_t gtpv2c_desc_bearer_resource_command;
extern tlv_desc_t gtpv2c_desc_bearer_resource_failure_indication;
extern tlv_desc_t gtpv2c_desc_downlink_data_notification_failure_indication;
extern tlv_desc_t gtpv2c_desc_trace_session_activation;
extern tlv_desc_t gtpv2c_desc_trace_session_deactivation;
extern tlv_desc_t gtpv2c_desc_stop_paging_indication;
extern tlv_desc_t gtpv2c_desc_create_bearer_request;
extern tlv_desc_t gtpv2c_desc_create_bearer_response;
extern tlv_desc_t gtpv2c_desc_update_bearer_request;
extern tlv_desc_t gtpv2c_desc_update_bearer_response;
extern tlv_desc_t gtpv2c_desc_delete_bearer_request;
extern tlv_desc_t gtpv2c_desc_delete_bearer_response;
extern tlv_desc_t gtpv2c_desc_delete_pdn_connection_set_request;
extern tlv_desc_t gtpv2c_desc_delete_pdn_connection_set_response;
extern tlv_desc_t gtpv2c_desc_pgw_downlink_triggering_notification;
extern tlv_desc_t gtpv2c_desc_pgw_downlink_triggering_acknowledge;
extern tlv_desc_t gtpv2c_desc_create_forwarding_tunnel_request;
extern tlv_desc_t gtpv2c_desc_create_forwarding_tunnel_response;
extern tlv_desc_t gtpv2c_desc_suspend_notification;
extern tlv_desc_t gtpv2c_desc_suspend_acknowledge;
extern tlv_desc_t gtpv2c_desc_resume_notification;
extern tlv_desc_t gtpv2c_desc_resume_acknowledge;
extern tlv_desc_t gtpv2c_desc_create_indirect_data_forwarding_tunnel_request;
extern tlv_desc_t gtpv2c_desc_create_indirect_data_forwarding_tunnel_response;
extern tlv_desc_t gtpv2c_desc_delete_indirect_data_forwarding_tunnel_request;
extern tlv_desc_t gtpv2c_desc_delete_indirect_data_forwarding_tunnel_response;
extern tlv_desc_t gtpv2c_desc_release_access_bearers_request;
extern tlv_desc_t gtpv2c_desc_release_access_bearers_response;
extern tlv_desc_t gtpv2c_desc_downlink_data_notification;
extern tlv_desc_t gtpv2c_desc_downlink_data_notification_acknowledge;
extern tlv_desc_t gtpv2c_desc_pgw_restart_notification;
extern tlv_desc_t gtpv2c_desc_pgw_restart_notification_acknowledge;
extern tlv_desc_t gtpv2c_desc_update_pdn_connection_set_request;
extern tlv_desc_t gtpv2c_desc_update_pdn_connection_set_response;
extern tlv_desc_t gtpv2c_desc_modify_access_bearers_request;
extern tlv_desc_t gtpv2c_desc_modify_access_bearers_response;
/* Structure for Infomration Element */
typedef tlv_octet_t gtpv2c_imsi_t;
typedef tlv_octet_t gtpv2c_cause_t;
@ -548,6 +603,281 @@ typedef struct _gtpv2c_scef_pdn_connection_t {
gtpv2c_node_identifier_t scef_id;
} gtpv2c_scef_pdn_connection_t;
/* Structure for Message */
typedef struct _gtpv2c_echo_request_t {
tlv_header_t h;
gtpv2c_recovery_t recovery;
gtpv2c_node_features_t sending_node_features;
} gtpv2c_echo_request_t;
typedef struct _gtpv2c_echo_response_t {
tlv_header_t h;
gtpv2c_recovery_t recovery;
gtpv2c_node_features_t sending_node_features;
} gtpv2c_echo_response_t;
typedef struct _gtpv2c_version_not_supported_indication_t {
tlv_header_t h;
} gtpv2c_version_not_supported_indication_t;
typedef struct _gtpv2c_create_session_request_t {
tlv_header_t h;
gtpv2c_imsi_t imsi;
gtpv2c_msisdn_t msisdn;
gtpv2c_mei_t me_identity;
gtpv2c_uli_t user_location_information;
gtpv2c_serving_network_t serving_network;
gtpv2c_rat_type_t rat_type;
gtpv2c_indication_t indication_flags;
gtpv2c_f_teid_t sender_f_teid_for_control_plane;
gtpv2c_f_teid_t pgw_s5_s8_address_for_control_plane_or_pmip;
gtpv2c_apn_t access_point_name;
gtpv2c_selection_mode_t selection_mode;
gtpv2c_pdn_type_t pdn_type;
gtpv2c_paa_t pdn_address_allocation;
gtpv2c_apn_restriction_t maximum_apn_restriction;
gtpv2c_ambr_t aggregate_maximum_bit_rate;
gtpv2c_ebi_t linked_eps_bearer_id;
gtpv2c_twmi_t trusted_wlan_mode_indication;
gtpv2c_pco_t protocol_configuration_options;
gtpv2c_bearer_context_t bearer_contexts_to_be_created;
gtpv2c_bearer_context_t bearer_contexts_to_be_removed;
gtpv2c_trace_information_t trace_information;
gtpv2c_recovery_t recovery;
gtpv2c_fq_csid_t mme_fq_csid;
gtpv2c_fq_csid_t sgw_fq_csid;
gtpv2c_fq_csid_t epdg_fq_csid;
gtpv2c_fq_csid_t twan_fq_csid;
gtpv2c_ue_time_zone_t ue_time_zone;
gtpv2c_uci_t user_csg_information;
gtpv2c_charging_characteristics_t charging_characteristics;
gtpv2c_ldn_t mme_s4_sgsn_ldn;
gtpv2c_ldn_t sgw_ldn;
gtpv2c_ldn_t epdg_ldn;
gtpv2c_ldn_t twan_ldn;
gtpv2c_signalling_priority_indication_t signalling_priority_indication;
gtpv2c_ip_address_t ue_local_ip_address;
gtpv2c_port_number_t ue_udp_port;
gtpv2c_apco_t additional_protocol_configuration_options;
gtpv2c_ip_address_t hnb_local_ip_address;
gtpv2c_port_number_t hnb_udp_port;
gtpv2c_ip_address_t mme_s4_sgsn_identifier;
gtpv2c_twan_identifier_t twan_identifier;
gtpv2c_ip_address_t epdg_ip_address;
gtpv2c_cn_operator_selection_entity_t cn_operator_selection_entity;
gtpv2c_presence_reporting_area_information_t presence_reporting_area_information;
gtpv2c_overload_control_information_t mme_s4_sgsn_s_overload_control_information;
gtpv2c_overload_control_information_t sgw_s_overload_control_information;
gtpv2c_overload_control_information_t twan_epdg_s_overload_control_information;
gtpv2c_millisecond_time_stamp_t origination_time_stamp;
gtpv2c_integer_number_t maximum_wait_time;
gtpv2c_twan_identifier_t wlan_location_information;
gtpv2c_twan_identifier_timestamp_t wlan_location_timestamp;
gtpv2c_f_container_t nbifom_container;
gtpv2c_remote_ue_context_t remote_ue_context_connected;
gtpv2c_node_identifier_t _aaa_server_identifier;
gtpv2c_epco_t extended_protocol_configuration_options;
gtpv2c_serving_plmn_rate_control_t serving_plmn_rate_control;
gtpv2c_counter_t mo_exception_data_counter;
gtpv2c_port_number_t ue_tcp_port;
} gtpv2c_create_session_request_t;
typedef struct _gtpv2c_create_session_response_t {
tlv_header_t h;
} gtpv2c_create_session_response_t;
typedef struct _gtpv2c_modify_bearer_request_t {
tlv_header_t h;
} gtpv2c_modify_bearer_request_t;
typedef struct _gtpv2c_modify_bearer_response_t {
tlv_header_t h;
} gtpv2c_modify_bearer_response_t;
typedef struct _gtpv2c_delete_session_request_t {
tlv_header_t h;
} gtpv2c_delete_session_request_t;
typedef struct _gtpv2c_delete_session_response_t {
tlv_header_t h;
} gtpv2c_delete_session_response_t;
typedef struct _gtpv2c_change_notification_request_t {
tlv_header_t h;
} gtpv2c_change_notification_request_t;
typedef struct _gtpv2c_change_notification_response_t {
tlv_header_t h;
} gtpv2c_change_notification_response_t;
typedef struct _gtpv2c_remote_ue_report_notification_t {
tlv_header_t h;
} gtpv2c_remote_ue_report_notification_t;
typedef struct _gtpv2c_remote_ue_report_acknowledge_t {
tlv_header_t h;
} gtpv2c_remote_ue_report_acknowledge_t;
typedef struct _gtpv2c_modify_bearer_command_t {
tlv_header_t h;
} gtpv2c_modify_bearer_command_t;
typedef struct _gtpv2c_modify_bearer_failure_indication_t {
tlv_header_t h;
} gtpv2c_modify_bearer_failure_indication_t;
typedef struct _gtpv2c_delete_bearer_command_t {
tlv_header_t h;
} gtpv2c_delete_bearer_command_t;
typedef struct _gtpv2c_delete_bearer_failure_indication_t {
tlv_header_t h;
} gtpv2c_delete_bearer_failure_indication_t;
typedef struct _gtpv2c_bearer_resource_command_t {
tlv_header_t h;
} gtpv2c_bearer_resource_command_t;
typedef struct _gtpv2c_bearer_resource_failure_indication_t {
tlv_header_t h;
} gtpv2c_bearer_resource_failure_indication_t;
typedef struct _gtpv2c_downlink_data_notification_failure_indication_t {
tlv_header_t h;
} gtpv2c_downlink_data_notification_failure_indication_t;
typedef struct _gtpv2c_trace_session_activation_t {
tlv_header_t h;
} gtpv2c_trace_session_activation_t;
typedef struct _gtpv2c_trace_session_deactivation_t {
tlv_header_t h;
} gtpv2c_trace_session_deactivation_t;
typedef struct _gtpv2c_stop_paging_indication_t {
tlv_header_t h;
} gtpv2c_stop_paging_indication_t;
typedef struct _gtpv2c_create_bearer_request_t {
tlv_header_t h;
} gtpv2c_create_bearer_request_t;
typedef struct _gtpv2c_create_bearer_response_t {
tlv_header_t h;
} gtpv2c_create_bearer_response_t;
typedef struct _gtpv2c_update_bearer_request_t {
tlv_header_t h;
} gtpv2c_update_bearer_request_t;
typedef struct _gtpv2c_update_bearer_response_t {
tlv_header_t h;
} gtpv2c_update_bearer_response_t;
typedef struct _gtpv2c_delete_bearer_request_t {
tlv_header_t h;
} gtpv2c_delete_bearer_request_t;
typedef struct _gtpv2c_delete_bearer_response_t {
tlv_header_t h;
} gtpv2c_delete_bearer_response_t;
typedef struct _gtpv2c_delete_pdn_connection_set_request_t {
tlv_header_t h;
} gtpv2c_delete_pdn_connection_set_request_t;
typedef struct _gtpv2c_delete_pdn_connection_set_response_t {
tlv_header_t h;
} gtpv2c_delete_pdn_connection_set_response_t;
typedef struct _gtpv2c_pgw_downlink_triggering_notification_t {
tlv_header_t h;
} gtpv2c_pgw_downlink_triggering_notification_t;
typedef struct _gtpv2c_pgw_downlink_triggering_acknowledge_t {
tlv_header_t h;
} gtpv2c_pgw_downlink_triggering_acknowledge_t;
typedef struct _gtpv2c_create_forwarding_tunnel_request_t {
tlv_header_t h;
} gtpv2c_create_forwarding_tunnel_request_t;
typedef struct _gtpv2c_create_forwarding_tunnel_response_t {
tlv_header_t h;
} gtpv2c_create_forwarding_tunnel_response_t;
typedef struct _gtpv2c_suspend_notification_t {
tlv_header_t h;
} gtpv2c_suspend_notification_t;
typedef struct _gtpv2c_suspend_acknowledge_t {
tlv_header_t h;
} gtpv2c_suspend_acknowledge_t;
typedef struct _gtpv2c_resume_notification_t {
tlv_header_t h;
} gtpv2c_resume_notification_t;
typedef struct _gtpv2c_resume_acknowledge_t {
tlv_header_t h;
} gtpv2c_resume_acknowledge_t;
typedef struct _gtpv2c_create_indirect_data_forwarding_tunnel_request_t {
tlv_header_t h;
} gtpv2c_create_indirect_data_forwarding_tunnel_request_t;
typedef struct _gtpv2c_create_indirect_data_forwarding_tunnel_response_t {
tlv_header_t h;
} gtpv2c_create_indirect_data_forwarding_tunnel_response_t;
typedef struct _gtpv2c_delete_indirect_data_forwarding_tunnel_request_t {
tlv_header_t h;
} gtpv2c_delete_indirect_data_forwarding_tunnel_request_t;
typedef struct _gtpv2c_delete_indirect_data_forwarding_tunnel_response_t {
tlv_header_t h;
} gtpv2c_delete_indirect_data_forwarding_tunnel_response_t;
typedef struct _gtpv2c_release_access_bearers_request_t {
tlv_header_t h;
} gtpv2c_release_access_bearers_request_t;
typedef struct _gtpv2c_release_access_bearers_response_t {
tlv_header_t h;
} gtpv2c_release_access_bearers_response_t;
typedef struct _gtpv2c_downlink_data_notification_t {
tlv_header_t h;
} gtpv2c_downlink_data_notification_t;
typedef struct _gtpv2c_downlink_data_notification_acknowledge_t {
tlv_header_t h;
} gtpv2c_downlink_data_notification_acknowledge_t;
typedef struct _gtpv2c_pgw_restart_notification_t {
tlv_header_t h;
} gtpv2c_pgw_restart_notification_t;
typedef struct _gtpv2c_pgw_restart_notification_acknowledge_t {
tlv_header_t h;
} gtpv2c_pgw_restart_notification_acknowledge_t;
typedef struct _gtpv2c_update_pdn_connection_set_request_t {
tlv_header_t h;
} gtpv2c_update_pdn_connection_set_request_t;
typedef struct _gtpv2c_update_pdn_connection_set_response_t {
tlv_header_t h;
} gtpv2c_update_pdn_connection_set_response_t;
typedef struct _gtpv2c_modify_access_bearers_request_t {
tlv_header_t h;
} gtpv2c_modify_access_bearers_request_t;
typedef struct _gtpv2c_modify_access_bearers_response_t {
tlv_header_t h;
} gtpv2c_modify_access_bearers_response_t;
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -1 +0,0 @@
msg_list[key]["ies"] = ies

View File

@ -1,3 +1,4 @@
ies = []
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "M", "instance" : "0", "comment" : ""})
ies.append({ "ie_type" : "Node Features", "ie_value" : "Sending Node Features", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be sent towards a peer node on any GTPv2 interface if the sending node supports at least one feature on this interface or if the sending node supports at least one feature and does not know the interface type towards the peer node. This IE may be present otherwise. "})
msg_list[key]["ies"] = ies

4
lib/gtp/support/cache/gtpv2c_msg_2.py vendored Normal file
View File

@ -0,0 +1,4 @@
ies = []
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "M", "instance" : "0", "comment" : ""})
ies.append({ "ie_type" : "Node Features", "ie_value" : "Sending Node Features", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be sent towards a peer node on any GTPv2 interface if the sending node supports at least one feature on this interface or if the sending node supports at least one feature and does not know the interface type towards the peer node. This IE may be present otherwise."})
msg_list[key]["ies"] = ies

View File

@ -1,3 +1,4 @@
ies = []
ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "C", "instance" : "0", "comment" : "The IMSI shall be included in the message on the S4/S11 interface, and on S5/S8 interface if provided by the MME/SGSN, except for the case:- If the UE is emergency attached and the UE is UICCless.The IMSI shall be included in the message on the S4/S11 interface, and on S5/S8 interface if provided by the MME/SGSN, but not used as an identifierif UE is emergency attached but IMSI is not authenticated.The IMSI shall be included in the message on the S2a/S2b interface."})
ies.append({ "ie_type" : "MSISDN", "ie_value" : "MSISDN", "presence" : "C", "instance" : "0", "comment" : "For an E-UTRAN Initial Attach and a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN the IE shall be included when used on the S11 interface, if provided in the subscription data from the HSS.For a PDP Context Activation procedure and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN the IE shall be included when used on the S4 interface, if provided in the subscription data from the HSS. The IE shall be included for the case of a UE Requested PDN Connectivity, if the MME has it stored for that UE. It shall be included when used on the S5/S8 interfaces if provided by the MME/SGSN. The ePDG shall include this IE on the S2b interface during an Attach with GTP on S2b , UE initiated Connectivity to Additional PDN with GTP on S2b and a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, Initial Attach for emergency session (GTP on S2b), if provided by the HSS/AAA. The TWAN shall include this IE on the S2a interface during an Initial Attach in WLAN on GTP S2a, UE initiated Connectivity to Additional PDN with GTP on S2a and a Handover to TWAN with GTP on S2a, if provided by the HSS/AAA."})
ies.append({ "ie_type" : "MEI", "ie_value" : "ME Identity", "presence" : "C", "instance" : "0", "comment" : "The MME/SGSN shall include the ME Identity (MEI) IE on the S11/S4 interface:- If the UE is emergency attached and the UE is UICCless- If the UE is emergency attached and the IMSI is not authenticatedFor all other cases the MME/SGSN shall include the ME Identity (MEI) IE on the S11/S4 interface if it is available."})
@ -20,6 +21,7 @@ ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be c
type_list["Bearer Context"]["max_instance"] = "1"
ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be removed", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on the S4/S11 interfaces for the TAU/RAU/Handover cases where any of the bearers existing before the TAU/RAU/Handover procedure will be deactivated as consequence of the TAU/RAU/Handover procedure.For each of those bearers, an IE with the same type and instance value shall be included.See NOTE 6 and NOTE 7."})
ies.append({ "ie_type" : "Trace Information", "ie_value" : "Trace Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if an SGW trace is activated, and/or on the S5/S8 and S2a/2b interfaces if a PGW trace is activated. See 3GPP TS 32.422 [18]."})
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S S2a/2b interfaces if contacting the peer node for the first time."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface and shall be forwarded by an SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."})
type_list["FQ-CSID"]["max_instance"] = "1"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall included by the SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."})

View File

@ -102,10 +102,10 @@ def usage():
print "-h Print this help and return"
def v_upper(v):
return re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v))).upper()
return re.sub('3GPP', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper())
def v_lower(v):
return re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v))).lower()
return re.sub('3gpp', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower())
def get_cells(cells):
instance = cells[4].text.encode('ascii', 'ignore')
@ -311,11 +311,10 @@ msg_list["Echo Request"]["table"] = 6
msg_list["Echo Response"]["table"] = 7
msg_list["Create Session Request"]["table"] = 8
ies = []
for key in msg_list.keys():
if "table" in msg_list[key].keys():
d_info("[" + key + "]")
cachefile = cachedir + "gtpv2c_ies-" + msg_list[key]["type"] + ".py"
cachefile = cachedir + "gtpv2c_msg_" + msg_list[key]["type"] + ".py"
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
execfile(cachefile)
print "Read from " + cachefile
@ -323,6 +322,8 @@ for key in msg_list.keys():
document = Document(filename)
f = open(cachefile, 'w')
ies = []
write_file(f, "ies = []\n")
table = document.tables[msg_list[key]["table"]]
for row in table.rows[1:]:
cells = get_cells(row.cells)
@ -383,6 +384,11 @@ for (k, v) in sorted_group_list:
write_file(f, "_" + str(instance) + ";\n")
write_file(f, "\n")
write_file(f, "/* Message Descriptor */\n")
for (k, v) in sorted_msg_list:
write_file(f, "extern tlv_desc_t gtpv2c_desc_" + v_lower(k) + ";\n")
write_file(f, "\n")
write_file(f, "/* Structure for Infomration Element */\n")
for (k, v) in sorted_type_list:
if k not in group_list.keys():
@ -409,6 +415,17 @@ for (k, v) in sorted_group_list:
write_file(f, "} gtpv2c_" + v_lower(k) + "_t;\n")
write_file(f, "\n")
write_file(f, "/* Structure for Message */\n")
for (k, v) in sorted_msg_list:
write_file(f, "typedef struct _gtpv2c_" + v_lower(k) + "_t {\n")
write_file(f, " tlv_header_t h;\n")
if "ies" in msg_list[k]:
for ies in msg_list[k]["ies"]:
write_file(f, " gtpv2c_" + v_lower(ies["ie_type"]) + "_t " + \
v_lower(ies["ie_value"]) + ";\n")
write_file(f, "} gtpv2c_" + v_lower(k) + "_t;\n")
write_file(f, "\n")
f.write("""#ifdef __cplusplus
}
#endif /* __cplusplus */