From 5c8b3711459cc9276cff686a91f13e1c5103a5de Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 11 Jan 2011 00:00:37 +0100 Subject: annotate which field of a PDU references which IE definition --- osmo_codegen.g | 6 ++- proto_desc/gsm_l3/cc_ie.dsl | 6 --- proto_desc/gsm_l3/cc_msg.dsl | 94 ++++++++++++++++++++--------------------- proto_desc/gsm_l3/common_ie.dsl | 4 +- proto_desc/gsm_l3/mm_ie.dsl | 4 +- proto_desc/gsm_l3/mm_msg.dsl | 36 ++++++++-------- 6 files changed, 73 insertions(+), 77 deletions(-) diff --git a/osmo_codegen.g b/osmo_codegen.g index 7560400..5cec3e7 100644 --- a/osmo_codegen.g +++ b/osmo_codegen.g @@ -55,8 +55,12 @@ pdu_field_size : NUMERIC ('-' NUMERIC)? ; pdu_field_opts - : ('uplink_only' | 'downlink_only') + : pdu_up_downlink | pdu_opt_ie ; +pdu_up_downlink + : 'uplink_only' | 'downlink_only'; +pdu_opt_ie + : 'ie' ID; pdu_field_type : ( diff --git a/proto_desc/gsm_l3/cc_ie.dsl b/proto_desc/gsm_l3/cc_ie.dsl index 916c3b3..25d58f9 100644 --- a/proto_desc/gsm_l3/cc_ie.dsl +++ b/proto_desc/gsm_l3/cc_ie.dsl @@ -1,7 +1,6 @@ # 10.5.4.4 Auxiliary states ie_spec cc_auxiliary_states - content_len 1 byte mpty_aux_state 2 bits hold_aux_state 2 bits spare 3 bits val 0 @@ -13,7 +12,6 @@ end_ie_spec # 10.5.4.5a CC capabilities ie_spec cc_capabilities - content_len 1 byte dtmf 1 bit pcp 1 bit enicm 1 bit @@ -66,7 +64,6 @@ ie_alias cc_calling_party_subaddr cc_called_party_subaddr # 10.5.4.11 Cause ie_spec cc_cause - content_len 1 byte location 4 bit spare 1 bit val 0 coding_standard 2 bit @@ -92,7 +89,6 @@ ie_alias cc_connected_party_subaddr cc_called_party_subaddr # 10.5.4.16 Higher layer compatibility ie_spec cc_high_layer_compat - content_len 1 byte pres_method 2 bit interpretation 3 bit ext1 1 bit val 1 @@ -109,7 +105,6 @@ end_ie_spec # 10.5.4.21 Progress ind ie_spec cc_progress_ind - content_len 1 byte location 3 bit spare 1 bit val 0 coding_standard 2 bit @@ -131,7 +126,6 @@ ie_alias cc_redir_party_subaddr cc_calling_party_subaddr # 10.5.4.24 SS Version ind: no need # 10.5.4.25 User-user ie_spec cc_user_user - content_len 1 byte pdisc 1 byte info * byte end_ie_spec diff --git a/proto_desc/gsm_l3/cc_msg.dsl b/proto_desc/gsm_l3/cc_msg.dsl index 1d9770d..f1da570 100644 --- a/proto_desc/gsm_l3/cc_msg.dsl +++ b/proto_desc/gsm_l3/cc_msg.dsl @@ -8,8 +8,8 @@ pdu_spec cc_alerting trans_id mand V4l msg_type mand V 1 val 0x01 facility opt TLV 2-255 tag 0x1c - progress_ind opt TLV 4 tag 0x1e - user_user opt TLV 3-131 tag 0x7e + progress_ind opt TLV 4 tag 0x1e ie cc_progress_ind + user_user opt TLV 3-131 tag 0x7e ie cc_user_user ss_version opt TLV 2-3 tag 0x7f uplink_only end_pdu_spec @@ -21,8 +21,8 @@ pdu_spec cc_call_confirmed repeat_ind cond TV4 tag 0xd0 bearer_capability1 opt TLV 3-16 tag 0x04 bearer_capability2 opt TLV 3-16 tag 0x04 - cause opt TLV 4-32 tag 0x08 - cc_capabilities opt TLV 4 tag 0x15 + cause opt TLV 4-32 tag 0x08 ie cc_cause + cc_capabilities opt TLV 4 tag 0x15 ie cc_capabilities stream_id opt TLV 3 tag 0x2d supported_codecs opt TLV 5-255 tag 0x40 end_pdu_spec @@ -36,7 +36,7 @@ pdu_spec cc_call_proceeding bearer_capability1 opt TLV 3-16 tag 0x04 bearer_capability2 opt TLV 3-16 tag 0x04 facility opt TLV 2-255 tag 0x1c - progress_ind opt TLV 4 tag 0x1e + progress_ind opt TLV 4 tag 0x1e ie cc_progress_ind priority_granted opt TV4 tag 0x80 net_cc_capabilities opt TLV 3 tag 0x2f end_pdu_spec @@ -48,7 +48,7 @@ pdu_spec cc_congestion_ctrl msg_type mand V 1 val 0x39 congestion_level mand V4u spare mand V4l - cause opt TLV 4-32 tag 0x08 + cause opt TLV 4-32 tag 0x08 ie cc_cause end_pdu_spec # 9.3.5 Connect @@ -57,10 +57,10 @@ pdu_spec cc_connect trans_id mand V4l msg_type mand V 1 val 0x07 facility opt TLV 2-255 tag 0x1c - progress_ind opt TLV 4 tag 0x1e - connected_nr opt TLV 3-14 tag 0x4c downlink_only - connected_subaddr opt TLV 2-23 tag 0x4d - user_user opt TLV 3-131 tag 0x7e + progress_ind opt TLV 4 tag 0x1e ie cc_progress_ind + connected_nr opt TLV 3-14 tag 0x4c downlink_only ie cc_connected_party_bcd_number + connected_subaddr opt TLV 2-23 tag 0x4d ie cc_connected_party_subaddr + user_user opt TLV 3-131 tag 0x7e ie cc_user_user ss_version opt TLV 2-3 tag 0x7f uplink_only stream_id opt TLV 3 tag 0x2d uplink_only end_pdu_spec @@ -77,10 +77,10 @@ pdu_spec cc_disconnect proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x25 - cause mand LV 3-31 + cause mand LV 3-31 ie cc_cause facility opt TLV 2-255 tag 0x1c - progress_ind opt TLV 4 tag 0x1e downlink_only - user_user opt TLV 3-131 tag 0x7e + progress_ind opt TLV 4 tag 0x1e downlink_only ie progress_ind + user_user opt TLV 3-131 tag 0x7e ie user_user allowed_actions opt TLV 3 tag 0x7b downlink_only ss_version opt TLV 2-3 tag 0x7f uplink_only end_pdu_spec @@ -124,7 +124,7 @@ pdu_spec cc_hold_rej proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x1a - cause mand LV 3-31 + cause mand LV 3-31 ie cc_cause end_pdu_spec # 9.3.13 Modify @@ -133,8 +133,8 @@ pdu_spec cc_modify trans_id mand V4l msg_type mand V 1 val 0x17 bearer_capability mand LV 2-15 - low_layer_comp opt TLV 2-18 tag 0x7c - high_layer_comp opt TLV 2-5 tag 0x7d + low_layer_comp opt TLV 2-18 tag 0x7c ie cc_low_layer_compat + high_layer_comp opt TLV 2-5 tag 0x7d ie cc_high_layer_compat rev_call_setup_dir opt T tag 0xa3 net_in_serv_up_ind opt T tag 0xa4 end_pdu_spec @@ -144,8 +144,8 @@ pdu_spec cc_modify_compl proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x1f - low_layer_comp opt TLV 2-18 tag 0x7c - high_layer_comp opt TLV 2-5 tag 0x7d + low_layer_comp opt TLV 2-18 tag 0x7c ie cc_low_layer_compat + high_layer_comp opt TLV 2-5 tag 0x7d ie cc_high_layer_compat rev_call_setup_dir opt T tag 0xa3 end_pdu_spec @@ -155,9 +155,9 @@ pdu_spec cc_modify_rej trans_id mand V4l msg_type mand V 1 val 0x13 bearer_capability mand LV 2-15 - cause mand LV 3-31 - low_layer_comp opt TLV 2-18 tag 0x7c - high_layer_comp opt TLV 2-5 tag 0x7d + cause mand LV 3-31 ie cc_cause + low_layer_comp opt TLV 2-18 tag 0x7c ie cc_low_layer_compat + high_layer_comp opt TLV 2-5 tag 0x7d ie cc_high_layer_compat end_pdu_spec # 9.3.16 Notify @@ -173,8 +173,8 @@ pdu_spec cc_progress proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x03 - progress_ind mand LV 3 - user_user opt TLV 3-131 tag 0x7e + progress_ind mand LV 3 ie cc_progress_ind + user_user opt TLV 3-131 tag 0x7e ie cc_user_user end_pdu_spec # 9.3.17a CC-Establishment @@ -193,7 +193,7 @@ pdu_spec cc_establishment_conf repeat_ind cond TV4 tag 0xd0 bearer_capability1 mand TLV 3-10 tag 0x04 bearer_capability2 opt TLV 3-10 tag 0x04 - cause opt TLV 4-32 tag 0x08 + cause opt TLV 4-32 tag 0x08 ie cc_cause supported_codecs opt TLV 5-255 tag 0x40 end_pdu_spec @@ -202,10 +202,10 @@ pdu_spec cc_release proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x2d - cause opt TLV 4-32 tag 0x08 - second_cause opt TLV 4-32 tag 0x08 + cause opt TLV 4-32 tag 0x08 ie cc_cause + second_cause opt TLV 4-32 tag 0x08 ie cc_cause facility opt TLV 2-255 tag 0x1c - user_user opt TLV 3-131 tag 0x7e + user_user opt TLV 3-131 tag 0x7e ie cc_user_user ss_version opt TLV 2-3 tag 0x7f uplink_only end_pdu_spec @@ -225,7 +225,7 @@ pdu_spec cc_release_compl msg_type mand V 1 val 0x2a cause opt TLV 4-32 tag 0x08 facility opt TLV 2-255 tag 0x1c - user_user opt TLV 3-131 tag 0x7e + user_user opt TLV 3-131 tag 0x7e ie cc_user_user ss_version opt TLV 2-3 tag 0x7f uplink_only end_pdu_spec @@ -248,7 +248,7 @@ pdu_spec cc_retrieve_rej proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x1e - cause mand LV 3-31 + cause mand LV 3-31 ie cc_cause end_pdu_spec # 9.3.23 Setup @@ -260,21 +260,21 @@ pdu_spec cc_setup bearer_capability1 opt TLV 3-16 tag 0x04 bearer_capability2 opt TLV 3-16 tag 0x04 facility opt TLV 2-255 tag 0x1c - progress_ind opt TLV 4 tag 0x1e downlink_only + progress_ind opt TLV 4 tag 0x1e downlink_only ie cc_progress_ind signal opt TV 2 tag 0x34 downlink_only - calling_party_bcd opt TLV 2-14 tag 0x5c downlink_only - calling_party_subaddr opt TLV 2-23 tag 0x5d - called_party_bcd opt TLV 3-19 tag 0x5e - called_party_subaddr opt TLV 2-23 tag 0x6d - redir_party_bcd opt TLV 3-19 tag 0x74 downlink_only - redir_party_subaddr opt TLV 2-23 tag 0x75 downlink_only + calling_party_bcd opt TLV 2-14 tag 0x5c downlink_only ie cc_calling_party_bcd_number + calling_party_subaddr opt TLV 2-23 tag 0x5d ie cc_calling_party_subaddr + called_party_bcd opt TLV 3-19 tag 0x5e ie cc_called_party_bcd_number + called_party_subaddr opt TLV 2-23 tag 0x6d ie cc_called_party_subaddr + redir_party_bcd opt TLV 3-19 tag 0x74 downlink_only ie cc_redir_party_bcd_number + redir_party_subaddr opt TLV 2-23 tag 0x75 downlink_only ie cc_redir_party_subaddr llc_repeat_ind cond TV4 tag 0xd0 - low_layer_compat1 opt TLV 2-18 tag 0x7c - low_layer_compat2 opt TLV 2-18 tag 0x7c + low_layer_compat1 opt TLV 2-18 tag 0x7c ie cc_low_layer_compat + low_layer_compat2 opt TLV 2-18 tag 0x7c ie cc_low_layer_compat hlc_repeat_ind cond TV4 tag 0xd0 - high_layer_compat1 opt TLV 2-5 tag 0x7d - high_layer_compat2 opt TLV 2-5 tag 0x7d - user_user opt TLV 3-35 tag 0x7e + high_layer_compat1 opt TLV 2-5 tag 0x7d ie cc_high_layer_compat + high_layer_compat2 opt TLV 2-5 tag 0x7d ie cc_high_layer_compat + user_user opt TLV 3-35 tag 0x7e ie cc_user_user ss_version opt TLV 2-3 tag 0x7f uplink_only clir_suppression cond T tag 0xa1 uplink_only clir_invocation cond T tag 0xa2 uplink_only @@ -296,7 +296,7 @@ pdu_spec cc_start_cc proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x09 - cc_capa opt TLV 4 tag 0x15 + cc_capa opt TLV 4 tag 0x15 ie cc_capabilities end_pdu_spec # 9.3.24 Start DTMF @@ -320,7 +320,7 @@ pdu_spec cc_start_dtmf_ack proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x37 - cause mand LV 3-31 + cause mand LV 3-31 ie cc_cause end_pdu_spec # 9.3.27 Status @@ -328,9 +328,9 @@ pdu_spec cc_status proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x3d - cause mand LV 3-31 - call_state mand V 1 - auxiliary_states opt TLV 3 tag 0x24 + cause mand LV 3-31 ie cc_cause + call_state mand V 1 ie cc_call_state + auxiliary_states opt TLV 3 tag 0x24 ie cc_auxiliary_state end_pdu_spec # 9.3.28 Status enquiry @@ -359,6 +359,6 @@ pdu_spec cc_user_info proto_disc mand V4u val 3 trans_id mand V4l msg_type mand V 1 val 0x10 - user_user mand LV 2-130 + user_user mand LV 2-130 ie cc_user_user more_data opt T tag 0xa0 end_pdu_spec diff --git a/proto_desc/gsm_l3/common_ie.dsl b/proto_desc/gsm_l3/common_ie.dsl index ac3cdfa..b1dbcda 100644 --- a/proto_desc/gsm_l3/common_ie.dsl +++ b/proto_desc/gsm_l3/common_ie.dsl @@ -5,7 +5,7 @@ ie_spec cell_identity end_ie_spec # 10.5.1.3 Location Area ID -ie_spec la_id +ie_spec location_area_id mcc 3 bcd mnc 3 bcd lac 16 bit big @@ -13,7 +13,6 @@ end_ie_spec # 10.5.1.4 Mobile ID ie_spec mobile_id - content_len 8 bit type 3 bit odd_even_ind 1 bit identity_digit * bcd @@ -30,7 +29,6 @@ end_ie_spec # 10.5.1.6 MS Classmark 2 ie_spec ms_classmark2 - content_len 8 bit rf_pwr_capa 3 bit a51 1 bit es_ind 1 bit diff --git a/proto_desc/gsm_l3/mm_ie.dsl b/proto_desc/gsm_l3/mm_ie.dsl index 1bc62af..6ad4d1e 100644 --- a/proto_desc/gsm_l3/mm_ie.dsl +++ b/proto_desc/gsm_l3/mm_ie.dsl @@ -9,7 +9,7 @@ # 10.5.3.5 Location updating type: no need (TV4) # 10.5.3.5a Network Name -ie_spec network_name +ie_spec mm_network_name num_spare_bits 3 bit add_ci 1 bit coding_scheme 3 bit @@ -21,7 +21,7 @@ end_ie_spec # 10.5.3.7 Follow on proceed: no need (single byte) # 10.5.3.8 Time Zone: no need (single byte) # 10.6.3.9 Time Zone and Time -ie_spec nitz +ie_spec mm_nitz year 2 bcd month 2 bcd day 2 bcd diff --git a/proto_desc/gsm_l3/mm_msg.dsl b/proto_desc/gsm_l3/mm_msg.dsl index abd7009..e06444c 100644 --- a/proto_desc/gsm_l3/mm_msg.dsl +++ b/proto_desc/gsm_l3/mm_msg.dsl @@ -45,10 +45,10 @@ pdu_spec cm_reest_req msg_type mand V 1 val 0x28 cksn mand V4u spare mand V4l - classmark2 mand LV 4 - mobile_id mand LV 2-9 + classmark2 mand LV 4 ie ms_classmark2 + mobile_id mand LV 2-9 ie mobile_id # this IE is conditional on mobile_id being of type TMSI - location_area_id cond TV 6 tag 0x13 + location_area_id cond TV 6 tag 0x13 ie location_area_id end_pdu_spec # 9.2.5 CM service accept @@ -96,8 +96,8 @@ pdu_spec cm_service_req msg_type mand V 1 val 0x24 cm_serv_type mand V4u cksn mand V4l - classmark2 mand LV 4 - mobile_id mand LV 2-9 + classmark2 mand LV 4 ie ms_classmark2 + mobile_id mand LV 2-9 ie mobile_id mm_priority mand TV4 tag 0x80 end_pdu_spec @@ -115,7 +115,7 @@ pdu_spec mm_identity_resp proto_disc mand V4u val 5 skip_ind mand V4l msg_type mand V 1 val 0x19 - mobile_id mand LV 2-10 + mobile_id mand LV 2-10 ie mobile_id end_pdu_spec # 9.2.12 IMSI detach indication @@ -123,8 +123,8 @@ pdu_spec mm_imsi_det_ind proto_disc mand V4u val 5 skip_ind mand V4l msg_type mand V 1 val 0x01 - classmark1 mand V 1 - mobile_id mand LV 2-9 + classmark1 mand V 1 ie ms_classmark1 + mobile_id mand LV 2-9 ie mobile_id end_pdu_spec # 9.2.13 Location updating accept @@ -132,8 +132,8 @@ pdu_spec mm_loc_upd_acc proto_disc mand V4u val 5 skip_ind mand V4l msg_type mand V 1 val 0x02 - location_area_id mand V 5 - mobile_id opt TLV 310 tag 0x17 + location_area_id mand V 5 ie location_area_id + mobile_id opt TLV 310 tag 0x17 ie mobile_id follow_on_proceed opt T tag 0xa1 cts_permission opt T tag 0xa2 equivalent_plmns opt TLV 5-47 tag 0x4a @@ -155,9 +155,9 @@ pdu_spec mm_loc_upd_req msg_type mand V 1 val 0x08 loc_upd_type mand V4u cksn mand V4l - location_area_id mand V 5 - classmark1 mand V 1 - mobile_id mand LV 2-9 + location_area_id mand V 5 ie location_area_id + classmark1 mand V 1 ie ms_classmark1 + mobile_id mand LV 2-9 ie mobile_id umts_classmark2 opt TLV 5 tag 0x33 end_pdu_spec @@ -166,10 +166,10 @@ pdu_spec mm_info proto_disc mand V4u val 5 skip_ind mand V4l msg_type mand V 1 val 0x32 - mm_net_name_full opt TLV 3-255 tag 0x43 - mm_net_name_short opt TLV 3-255 tag 0x45 + mm_net_name_full opt TLV 3-255 tag 0x43 ie mm_network_name + mm_net_name_short opt TLV 3-255 tag 0x45 ie mm_network_name mm_time_zone opt TV 2 tag 0x46 - mm_nitz opt TV 8 tag 0x47 + mm_nitz opt TV 8 tag 0x47 ie mm_nitz lsa_id opt TLV 2-5 tag 0x48 daylight_saving_time opt TLV 3 tag 0x49 end_pdu_spec @@ -187,8 +187,8 @@ pdu_spec mm_tmsi_reall_cmd proto_disc mand V4u val 5 skip_ind mand V4l msg_type mand V 1 val 0x1a - location_are_id mand V 5 - mobile_id mand LV 2-9 + location_are_id mand V 5 ie location_area_id + mobile_id mand LV 2-9 ie mobile_id end_pdu_spec # 9.2.18 TMSI reallocation complete -- cgit v1.2.3