diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-06-07 19:50:42 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-06-08 07:28:07 +0000 |
commit | 71b6be7f8759392c25eadedea33a96dfe3cccfba (patch) | |
tree | e866e6ab3a9100192b0554c4727885a967e1fd5b /epan/dissectors | |
parent | a942df9eb9d713871d29778da12fdef5dbfdf635 (diff) |
PER: fix indent (use tabs)
Change-Id: I123960f475550b5e3cab9e6eb7eaa6d896fae557
Reviewed-on: https://code.wireshark.org/review/8815
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-per.c | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index f1a523d13e..35b2e4028f 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -59,14 +59,14 @@ static int hf_per_octet_string_length = -1; static int hf_per_bit_string_length = -1; static int hf_per_normally_small_nonnegative_whole_number_length = -1; static int hf_per_const_int_len = -1; -static int hf_per_direct_reference = -1; /* T_direct_reference */ -static int hf_per_indirect_reference = -1; /* T_indirect_reference */ -static int hf_per_data_value_descriptor = -1; /* T_data_value_descriptor */ -static int hf_per_encoding = -1; /* External_encoding */ -static int hf_per_single_ASN1_type = -1; /* T_single_ASN1_type */ -static int hf_per_octet_aligned = -1; /* T_octet_aligned */ -static int hf_per_arbitrary = -1; /* T_arbitrary */ -static int hf_per_integer_length = -1; /* Show integer length if "show internal per fields" */ +static int hf_per_direct_reference = -1; /* T_direct_reference */ +static int hf_per_indirect_reference = -1; /* T_indirect_reference */ +static int hf_per_data_value_descriptor = -1; /* T_data_value_descriptor */ +static int hf_per_encoding = -1; /* External_encoding */ +static int hf_per_single_ASN1_type = -1; /* T_single_ASN1_type */ +static int hf_per_octet_aligned = -1; /* T_octet_aligned */ +static int hf_per_arbitrary = -1; /* T_arbitrary */ +static int hf_per_integer_length = -1; /* Show integer length if "show internal per fields" */ /* static int hf_per_debug_pos = -1; */ static gint ett_per_open_type = -1; @@ -84,7 +84,7 @@ static expert_field ei_per_encoding_error = EI_INIT; static expert_field ei_per_oid_not_implemented = EI_INIT; static expert_field ei_per_undecoded = EI_INIT; -static dissector_table_t per_oid_dissector_table = NULL; +static dissector_table_t per_oid_dissector_table = NULL; /* #define DEBUG_ENTRY(x) \ @@ -569,8 +569,7 @@ DEBUG_ENTRY("dissect_per_sequence_of"); /* XXX we don't do >64k length strings yet */ static guint32 -dissect_per_restricted_character_string_sorted(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, - gboolean has_extension _U_, guint16 lb _U_, guint16 ub, const char *alphabet, int alphabet_length, tvbuff_t **value_tvb) +dissect_per_restricted_character_string_sorted(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension _U_, guint16 lb _U_, guint16 ub, const char *alphabet, int alphabet_length, tvbuff_t **value_tvb) { guint32 length; gboolean byte_aligned, use_canonical_order; @@ -2552,36 +2551,36 @@ dissect_per_external_type(tvbuff_t *tvb _U_, guint32 offset, asn1_ctx_t *actx, p int call_per_oid_callback(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, asn1_ctx_t *actx, int hf_index) { - guint32 type_length, end_offset, start_offset; - tvbuff_t *val_tvb = NULL; + guint32 type_length, end_offset, start_offset; + tvbuff_t *val_tvb = NULL; int len = 0; start_offset = offset; - offset = dissect_per_length_determinant(tvb, offset, actx, tree, hf_per_open_type_length, &type_length); - if (actx->aligned) BYTE_ALIGN_OFFSET(offset); - end_offset = offset + type_length; + offset = dissect_per_length_determinant(tvb, offset, actx, tree, hf_per_open_type_length, &type_length); + if (actx->aligned) BYTE_ALIGN_OFFSET(offset); + end_offset = offset + type_length; - val_tvb = new_octet_aligned_subset(tvb, offset, actx, type_length); + val_tvb = new_octet_aligned_subset(tvb, offset, actx, type_length); - if (oid == NULL || - ((len = dissector_try_string(per_oid_dissector_table, oid, val_tvb, pinfo, tree, actx)) == 0)) - { - proto_tree_add_expert(tree, pinfo, &ei_per_oid_not_implemented, val_tvb, 0, -1); - dissect_per_open_type(tvb, start_offset, actx, tree, hf_index, NULL); - } + if (oid == NULL || + ((len = dissector_try_string(per_oid_dissector_table, oid, val_tvb, pinfo, tree, actx)) == 0)) + { + proto_tree_add_expert(tree, pinfo, &ei_per_oid_not_implemented, val_tvb, 0, -1); + dissect_per_open_type(tvb, start_offset, actx, tree, hf_index, NULL); + } - return end_offset; + return end_offset; } void new_register_per_oid_dissector(const char *oid, new_dissector_t dissector, int proto, const char *name) { - dissector_handle_t dissector_handle; + dissector_handle_t dissector_handle; - dissector_handle = new_create_dissector_handle(dissector, proto); - dissector_add_string("per.oid", oid, dissector_handle); - oid_add_from_string(name, oid); + dissector_handle = new_create_dissector_handle(dissector, proto); + dissector_add_string("per.oid", oid, dissector_handle); + oid_add_from_string(name, oid); } @@ -2702,10 +2701,10 @@ proto_register_per(void) { "per.sequence_extension_unknown", PI_UNDECODED, PI_NOTE, "unknown sequence extension", EXPFILL }}, { &ei_per_encoding_error, { "per.encoding_error", PI_MALFORMED, PI_WARN, "Encoding error", EXPFILL }}, - { &ei_per_oid_not_implemented, - { "per.error.oid_not_implemented", PI_UNDECODED, PI_WARN, "PER: Dissector for OID not implemented. Contact Wireshark developers if you want this supported", EXPFILL }}, - { &ei_per_undecoded, - { "per.error.undecoded", PI_UNDECODED, PI_WARN, "PER: Something unknown here", EXPFILL }}, + { &ei_per_oid_not_implemented, + { "per.error.oid_not_implemented", PI_UNDECODED, PI_WARN, "PER: Dissector for OID not implemented. Contact Wireshark developers if you want this supported", EXPFILL }}, + { &ei_per_undecoded, + { "per.error.undecoded", PI_UNDECODED, PI_WARN, "PER: Something unknown here", EXPFILL }}, }; module_t *per_module; @@ -2725,7 +2724,7 @@ proto_register_per(void) "Whether the dissector should put the internal PER data in the tree or if it should hide it", &display_internal_per_fields); - per_oid_dissector_table = register_dissector_table("per.oid", "PER OID Dissectors", FT_STRING, BASE_NONE); + per_oid_dissector_table = register_dissector_table("per.oid", "PER OID Dissectors", FT_STRING, BASE_NONE); } |