diff options
author | Bill Meier <wmeier@newsguy.com> | 2015-08-09 12:20:54 -0400 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2015-08-09 16:30:05 +0000 |
commit | c5af152628f84cfddfa3d872d8be5b58d9a0ae03 (patch) | |
tree | bc0337c7da51eb15f30951497138e1bdebdad32d /epan/dissectors/packet-atn-cm.c | |
parent | dbf314a4ab3e005bc9650d69f47fb44aa446fb58 (diff) |
Trivial: Convert 'tabs' indentation to '4 space' indentation
Change-Id: If71dd8a04050ce11e37ad88ee862419313c06639
Reviewed-on: https://code.wireshark.org/review/9946
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-atn-cm.c')
-rw-r--r-- | epan/dissectors/packet-atn-cm.c | 315 |
1 files changed, 154 insertions, 161 deletions
diff --git a/epan/dissectors/packet-atn-cm.c b/epan/dissectors/packet-atn-cm.c index 9a6f714479..00924be4d5 100644 --- a/epan/dissectors/packet-atn-cm.c +++ b/epan/dissectors/packet-atn-cm.c @@ -6,12 +6,6 @@ /* Input file: packet-atn-cm-template.c */ #line 1 "../../asn1/atn-cm/packet-atn-cm-template.c" -/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: t - * vi: set shiftwidth=2 tabstop=2 noexpandtab: - * :indentSize=2:tabSize=2:noTabs=false: - */ - - /* packet-atn-cm.c * By Mathias Guettler <guettler@web.de> * Copyright 2013 @@ -110,7 +104,7 @@ static int hf_atn_cm_hours = -1; /* Timehours */ static int hf_atn_cm_minutes = -1; /* Timeminutes */ /*--- End of included file: packet-atn-cm-hf.c ---*/ -#line 61 "../../asn1/atn-cm/packet-atn-cm-template.c" +#line 55 "../../asn1/atn-cm/packet-atn-cm-template.c" /*--- Included file: packet-atn-cm-ett.c ---*/ @@ -132,7 +126,7 @@ static gint ett_atn_cm_ShortTsap = -1; static gint ett_atn_cm_Time = -1; /*--- End of included file: packet-atn-cm-ett.c ---*/ -#line 63 "../../asn1/atn-cm/packet-atn-cm-template.c" +#line 57 "../../asn1/atn-cm/packet-atn-cm-template.c" static gint ett_atn_cm = -1; @@ -635,135 +629,135 @@ static int dissect_CMGroundMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_ /*--- End of included file: packet-atn-cm-fn.c ---*/ -#line 66 "../../asn1/atn-cm/packet-atn-cm-template.c" +#line 60 "../../asn1/atn-cm/packet-atn-cm-template.c" static int proto_atn_cm = -1; static int dissect_atn_cm( - tvbuff_t *tvb, - packet_info *pinfo, - proto_tree *tree, - void *data _U_) + tvbuff_t *tvb, + packet_info *pinfo, + proto_tree *tree, + void *data _U_) { - int type; - proto_tree *sub_tree; - - sub_tree = proto_tree_add_subtree( - tree, tvb, 0, -1, ett_atn_cm, NULL, ATN_CM_PROTO); - - /* ti = proto_tree_add_item(tree, proto_atn_cm, tvb, 0, 0 , ENC_NA); */ - /* sub_tree = proto_item_add_subtree(ti, ett_atn_cm_pdu); */ - - /* determine whether it is uplink or downlink */ - type = check_heur_msg_type(pinfo); - - switch(type){ - case um: - dissect_CMGroundMessage_PDU( - tvb, - pinfo, - sub_tree, NULL); - break; - case dm: - dissect_CMAircraftMessage_PDU( - tvb, - pinfo, - sub_tree, NULL); - break; - default: - break; - } - return tvb_reported_length_remaining(tvb, 0); + int type; + proto_tree *sub_tree; + + sub_tree = proto_tree_add_subtree( + tree, tvb, 0, -1, ett_atn_cm, NULL, ATN_CM_PROTO); + + /* ti = proto_tree_add_item(tree, proto_atn_cm, tvb, 0, 0 , ENC_NA); */ + /* sub_tree = proto_item_add_subtree(ti, ett_atn_cm_pdu); */ + + /* determine whether it is uplink or downlink */ + type = check_heur_msg_type(pinfo); + + switch(type){ + case um: + dissect_CMGroundMessage_PDU( + tvb, + pinfo, + sub_tree, NULL); + break; + case dm: + dissect_CMAircraftMessage_PDU( + tvb, + pinfo, + sub_tree, NULL); + break; + default: + break; + } + return tvb_reported_length_remaining(tvb, 0); } static gboolean dissect_atn_cm_heur( - tvbuff_t *tvb, - packet_info *pinfo, - proto_tree *tree, - void *data _U_) + tvbuff_t *tvb, + packet_info *pinfo, + proto_tree *tree, + void *data _U_) { - atn_conversation_t *atn_cv = NULL; - volatile gboolean is_atn_cm = FALSE; - int type; - - /* determine whether it is uplink or downlink */ - type = check_heur_msg_type(pinfo); - - /* heuristically decode message */ - switch(type){ - case um: - TRY { - dissect_CMGroundMessage_PDU( - tvb, - pinfo, - NULL, NULL); - /* no exception thrown: looks like it is a CM PDU */ - is_atn_cm = TRUE; } - CATCH_ALL { - is_atn_cm = FALSE; } - ENDTRY; - break; - case dm: - TRY { - dissect_CMAircraftMessage_PDU( - tvb, - pinfo, - NULL, NULL); - /* no exception thrown: looks like it is a CM PDU */ - is_atn_cm = TRUE;} - CATCH_ALL { - is_atn_cm = FALSE; } - ENDTRY; - break; - default: - break; - } - - if (is_atn_cm == TRUE) { - /* note: */ - /* all subsequent PDU's belonging to this conversation are considered CM */ - /* if the first CM PDU has been decoded succesfully */ - /* (This is done in "atn-ulcs" by using "call_dissector_with_data()") */ - - /* DT: dstref present, srcref is always zero */ - if((pinfo->clnp_dstref) && - (!pinfo->clnp_srcref)){ - - atn_cv = find_atn_conversation( - &pinfo->dst, - pinfo->clnp_dstref, - &pinfo->src ); - } - /* CR: srcref present, dstref is always zero */ - if((!pinfo->clnp_dstref) && - (pinfo->clnp_srcref)){ - - atn_cv = find_atn_conversation( - &pinfo->src, - pinfo->clnp_srcref, - &pinfo->dst ); - - } - /* CC: srcref and dstref present */ - if((pinfo->clnp_dstref) && - (pinfo->clnp_srcref)){ - atn_cv = find_atn_conversation( - &pinfo->src, - pinfo->clnp_srcref, - &pinfo->dst ); - } - if(atn_cv){ - atn_cv->ae_qualifier = cma; - } - dissect_atn_cm( - tvb, - pinfo, - tree, - NULL); - } - - return is_atn_cm; + atn_conversation_t *atn_cv = NULL; + volatile gboolean is_atn_cm = FALSE; + int type; + + /* determine whether it is uplink or downlink */ + type = check_heur_msg_type(pinfo); + + /* heuristically decode message */ + switch(type){ + case um: + TRY { + dissect_CMGroundMessage_PDU( + tvb, + pinfo, + NULL, NULL); + /* no exception thrown: looks like it is a CM PDU */ + is_atn_cm = TRUE; } + CATCH_ALL { + is_atn_cm = FALSE; } + ENDTRY; + break; + case dm: + TRY { + dissect_CMAircraftMessage_PDU( + tvb, + pinfo, + NULL, NULL); + /* no exception thrown: looks like it is a CM PDU */ + is_atn_cm = TRUE;} + CATCH_ALL { + is_atn_cm = FALSE; } + ENDTRY; + break; + default: + break; + } + + if (is_atn_cm == TRUE) { + /* note: */ + /* all subsequent PDU's belonging to this conversation are considered CM */ + /* if the first CM PDU has been decoded succesfully */ + /* (This is done in "atn-ulcs" by using "call_dissector_with_data()") */ + + /* DT: dstref present, srcref is always zero */ + if((pinfo->clnp_dstref) && + (!pinfo->clnp_srcref)){ + + atn_cv = find_atn_conversation( + &pinfo->dst, + pinfo->clnp_dstref, + &pinfo->src ); + } + /* CR: srcref present, dstref is always zero */ + if((!pinfo->clnp_dstref) && + (pinfo->clnp_srcref)){ + + atn_cv = find_atn_conversation( + &pinfo->src, + pinfo->clnp_srcref, + &pinfo->dst ); + + } + /* CC: srcref and dstref present */ + if((pinfo->clnp_dstref) && + (pinfo->clnp_srcref)){ + atn_cv = find_atn_conversation( + &pinfo->src, + pinfo->clnp_srcref, + &pinfo->dst ); + } + if(atn_cv){ + atn_cv->ae_qualifier = cma; + } + dissect_atn_cm( + tvb, + pinfo, + tree, + NULL); + } + + return is_atn_cm; } @@ -935,9 +929,9 @@ void proto_register_atn_cm (void) "Timeminutes", HFILL }}, /*--- End of included file: packet-atn-cm-hfarr.c ---*/ -#line 201 "../../asn1/atn-cm/packet-atn-cm-template.c" +#line 195 "../../asn1/atn-cm/packet-atn-cm-template.c" }; - static gint *ett[] = { + static gint *ett[] = { /*--- Included file: packet-atn-cm-ettarr.c ---*/ #line 1 "../../asn1/atn-cm/packet-atn-cm-ettarr.c" @@ -958,52 +952,51 @@ void proto_register_atn_cm (void) &ett_atn_cm_Time, /*--- End of included file: packet-atn-cm-ettarr.c ---*/ -#line 204 "../../asn1/atn-cm/packet-atn-cm-template.c" - &ett_atn_cm - }; +#line 198 "../../asn1/atn-cm/packet-atn-cm-template.c" + &ett_atn_cm + }; - /* register CM application */ - proto_atn_cm = proto_register_protocol( - ATN_CM_PROTO , - "ATN-CM", - "atn-cm"); + /* register CM application */ + proto_atn_cm = proto_register_protocol( + ATN_CM_PROTO , + "ATN-CM", + "atn-cm"); - proto_register_field_array( - proto_atn_cm, - hf_atn_cm, - array_length(hf_atn_cm)); + proto_register_field_array( + proto_atn_cm, + hf_atn_cm, + array_length(hf_atn_cm)); - proto_register_subtree_array( - ett, - array_length(ett)); + proto_register_subtree_array( + ett, + array_length(ett)); - new_register_dissector( - "atn-cm", - dissect_atn_cm, - proto_atn_cm); + new_register_dissector( + "atn-cm", + dissect_atn_cm, + proto_atn_cm); } void proto_reg_handoff_atn_cm(void) { - /* add session dissector to subdissector list*/ - heur_dissector_add( - "atn-ulcs", - dissect_atn_cm_heur, - "ATN-CM over ATN-ULCS", - "atn-cm-ulcs", - proto_atn_cm, HEURISTIC_ENABLE); + /* add session dissector to subdissector list*/ + heur_dissector_add( + "atn-ulcs", + dissect_atn_cm_heur, + "ATN-CM over ATN-ULCS", + "atn-cm-ulcs", + proto_atn_cm, HEURISTIC_ENABLE); } /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * * Local variables: - * c-basic-offset: 2 - * tab-width: 2 - * indent-tabs-mode: t + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil * End: * - * vi: set shiftwidth=2 tabstop=2 noexpandtab: - * :indentSize=2:tabSize=2:noTabs=false: + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: */ - |