diff options
Diffstat (limited to 'epan/dissectors/packet-tnef.c')
-rw-r--r-- | epan/dissectors/packet-tnef.c | 198 |
1 files changed, 99 insertions, 99 deletions
diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c index 4464c4e5..120a2bf9 100644 --- a/epan/dissectors/packet-tnef.c +++ b/epan/dissectors/packet-tnef.c @@ -74,84 +74,84 @@ void proto_register_tnef(void); void proto_reg_handoff_tnef(void); -static int proto_tnef = -1; - -static int hf_tnef_signature = -1; -static int hf_tnef_key = -1; -static int hf_tnef_attribute = -1; -static int hf_tnef_attribute_lvl = -1; -static int hf_tnef_attribute_tag = -1; -static int hf_tnef_attribute_tag_type = -1; -static int hf_tnef_attribute_tag_id = -1; -static int hf_tnef_attribute_length = -1; -static int hf_tnef_attribute_value = -1; -static int hf_tnef_attribute_string = -1; -static int hf_tnef_attribute_date = -1; -static int hf_tnef_attribute_display_name = -1; -static int hf_tnef_attribute_email_address = -1; -static int hf_tnef_attribute_checksum = -1; -static int hf_tnef_mapi_props = -1; -static int hf_tnef_oem_codepage = -1; -static int hf_tnef_version = -1; -static int hf_tnef_message_class = -1; -static int hf_tnef_original_message_class = -1; -static int hf_tnef_priority = -1; -static int hf_tnef_mapi_props_count = -1; - -static int hf_tnef_property = -1; -static int hf_tnef_property_tag = -1; -static int hf_tnef_property_tag_type = -1; -static int hf_tnef_property_tag_id = -1; -static int hf_tnef_property_tag_set = -1; -static int hf_tnef_property_tag_kind = -1; -static int hf_tnef_property_tag_name_id = -1; -static int hf_tnef_property_tag_name_length = -1; -static int hf_tnef_property_tag_name_string = -1; -static int hf_tnef_property_padding = -1; -static int hf_tnef_padding = -1; - -static int hf_tnef_values_count = -1; -static int hf_tnef_value_length = -1; - -static int hf_tnef_attribute_date_year = -1; -static int hf_tnef_attribute_date_month = -1; -static int hf_tnef_attribute_date_day = -1; -static int hf_tnef_attribute_date_hour = -1; -static int hf_tnef_attribute_date_minute = -1; -static int hf_tnef_attribute_date_second = -1; -static int hf_tnef_attribute_date_day_of_week = -1; - -static int hf_tnef_PropValue_i = -1; -static int hf_tnef_PropValue_l = -1; -static int hf_tnef_PropValue_b = -1; -static int hf_tnef_PropValue_lpszA = -1; -static int hf_tnef_PropValue_lpszW = -1; -static int hf_tnef_PropValue_lpguid = -1; -static int hf_tnef_PropValue_bin = -1; -static int hf_tnef_PropValue_ft = -1; -static int hf_tnef_PropValue_err = -1; -static int hf_tnef_PropValue_MVi = -1; -static int hf_tnef_PropValue_MVl = -1; -static int hf_tnef_PropValue_MVszA = -1; -static int hf_tnef_PropValue_MVbin = -1; -static int hf_tnef_PropValue_MVguid = -1; -static int hf_tnef_PropValue_MVszW = -1; -static int hf_tnef_PropValue_MVft = -1; -static int hf_tnef_PropValue_null = -1; -static int hf_tnef_PropValue_object = -1; - -static int ett_tnef = -1; -static int ett_tnef_attribute = -1; -static int ett_tnef_attribute_tag = -1; -static int ett_tnef_mapi_props = -1; -static int ett_tnef_property = -1; -static int ett_tnef_property_tag = -1; -static int ett_tnef_counted_items = -1; -static int ett_tnef_attribute_date = -1; -static int ett_tnef_attribute_address = -1; - -static expert_field ei_tnef_expect_single_item = EI_INIT; -static expert_field ei_tnef_incorrect_signature = EI_INIT; +static int proto_tnef; + +static int hf_tnef_signature; +static int hf_tnef_key; +static int hf_tnef_attribute; +static int hf_tnef_attribute_lvl; +static int hf_tnef_attribute_tag; +static int hf_tnef_attribute_tag_type; +static int hf_tnef_attribute_tag_id; +static int hf_tnef_attribute_length; +static int hf_tnef_attribute_value; +static int hf_tnef_attribute_string; +static int hf_tnef_attribute_date; +static int hf_tnef_attribute_display_name; +static int hf_tnef_attribute_email_address; +static int hf_tnef_attribute_checksum; +static int hf_tnef_mapi_props; +static int hf_tnef_oem_codepage; +static int hf_tnef_version; +static int hf_tnef_message_class; +static int hf_tnef_original_message_class; +static int hf_tnef_priority; +static int hf_tnef_mapi_props_count; + +static int hf_tnef_property; +static int hf_tnef_property_tag; +static int hf_tnef_property_tag_type; +static int hf_tnef_property_tag_id; +static int hf_tnef_property_tag_set; +static int hf_tnef_property_tag_kind; +static int hf_tnef_property_tag_name_id; +static int hf_tnef_property_tag_name_length; +static int hf_tnef_property_tag_name_string; +static int hf_tnef_property_padding; +static int hf_tnef_padding; + +static int hf_tnef_values_count; +static int hf_tnef_value_length; + +static int hf_tnef_attribute_date_year; +static int hf_tnef_attribute_date_month; +static int hf_tnef_attribute_date_day; +static int hf_tnef_attribute_date_hour; +static int hf_tnef_attribute_date_minute; +static int hf_tnef_attribute_date_second; +static int hf_tnef_attribute_date_day_of_week; + +static int hf_tnef_PropValue_i; +static int hf_tnef_PropValue_l; +static int hf_tnef_PropValue_b; +static int hf_tnef_PropValue_lpszA; +static int hf_tnef_PropValue_lpszW; +static int hf_tnef_PropValue_lpguid; +static int hf_tnef_PropValue_bin; +static int hf_tnef_PropValue_ft; +static int hf_tnef_PropValue_err; +static int hf_tnef_PropValue_MVi; +static int hf_tnef_PropValue_MVl; +static int hf_tnef_PropValue_MVszA; +static int hf_tnef_PropValue_MVbin; +static int hf_tnef_PropValue_MVguid; +static int hf_tnef_PropValue_MVszW; +static int hf_tnef_PropValue_MVft; +static int hf_tnef_PropValue_null; +static int hf_tnef_PropValue_object; + +static int ett_tnef; +static int ett_tnef_attribute; +static int ett_tnef_attribute_tag; +static int ett_tnef_mapi_props; +static int ett_tnef_property; +static int ett_tnef_property_tag; +static int ett_tnef_counted_items; +static int ett_tnef_attribute_date; +static int ett_tnef_attribute_address; + +static expert_field ei_tnef_expect_single_item; +static expert_field ei_tnef_incorrect_signature; static dissector_handle_t tnef_handle; @@ -230,10 +230,10 @@ static const value_string tnef_Attribute_vals[] = { { 0, NULL } }; -static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id, packet_info *pinfo, proto_tree *tree, gboolean single, guint encoding) +static int dissect_counted_values(tvbuff_t *tvb, int offset, int hf_id, packet_info *pinfo, proto_tree *tree, bool single, unsigned encoding) { proto_item *item; - guint32 length, count, i; + uint32_t length, count, i; count = tvb_get_letohl(tvb, offset); proto_tree_add_item(tree, hf_tnef_values_count, tvb, offset, 4, ENC_LITTLE_ENDIAN); @@ -264,9 +264,9 @@ static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id, packe return offset; } -static gint dissect_counted_address(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree) +static int dissect_counted_address(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - guint16 length; + uint16_t length; length = tvb_get_letohs(tvb, offset); proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -288,7 +288,7 @@ static gint dissect_counted_address(tvbuff_t *tvb, gint offset, packet_info *pin static void dissect_DTR(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { - gint offset; + int offset; offset = 0; @@ -315,15 +315,15 @@ static void dissect_DTR(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) } -static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint oem_encoding) +static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned oem_encoding) { proto_item *item, *prop_item; proto_tree *prop_tree, *tag_tree; - guint32 /*count,*/ tag, tag_kind, tag_length; - guint16 padding; - gint offset, start_offset; + uint32_t /*count,*/ tag, tag_kind, tag_length; + uint16_t padding; + int offset, start_offset; - guint8 drep[] = {0x10 /* LE */, /* DCE_RPC_DREP_FP_IEEE */ 0 }; + uint8_t drep[] = {0x10 /* LE */, /* DCE_RPC_DREP_FP_IEEE */ 0 }; static dcerpc_info di; static dcerpc_call_value call_data; @@ -363,7 +363,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre offset += 2; if(tag & 0x80000000) { - const guint8* name_string = NULL; + const uint8_t* name_string = NULL; /* it is a named property */ proto_tree_add_item(tag_tree, hf_tnef_property_tag_set, tvb, offset, 16, ENC_LITTLE_ENDIAN); @@ -411,13 +411,13 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre offset = PIDL_dissect_uint16(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_b, 0); break; case PT_STRING8: - offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_lpszA, pinfo, prop_tree, TRUE, oem_encoding); + offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_lpszA, pinfo, prop_tree, true, oem_encoding); break; case PT_BINARY: - offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_bin, pinfo, prop_tree, TRUE, ENC_NA); + offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_bin, pinfo, prop_tree, true, ENC_NA); break; case PT_UNICODE: - offset = dissect_counted_values (tvb, offset, hf_tnef_PropValue_lpszW, pinfo, prop_tree, TRUE, ENC_UTF_16|ENC_LITTLE_ENDIAN); + offset = dissect_counted_values (tvb, offset, hf_tnef_PropValue_lpszW, pinfo, prop_tree, true, ENC_UTF_16|ENC_LITTLE_ENDIAN); break; case PT_CLSID: offset = nspi_dissect_struct_MAPIUID(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_lpguid, 0); @@ -476,11 +476,11 @@ static int dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi { proto_item *attr_item, *item; proto_tree *attr_tree, *tag_tree, *props_tree, *addr_tree, *date_tree; - guint32 tag, length, signature; - gint offset, start_offset; + uint32_t tag, length, signature; + int offset, start_offset; tvbuff_t *next_tvb; - guint64 oem_code_page; - guint oem_encoding = ENC_ASCII|ENC_NA; + uint64_t oem_code_page; + unsigned oem_encoding = ENC_ASCII|ENC_NA; if(tree){ item = proto_tree_add_item(tree, proto_tnef, tvb, 0, -1, ENC_NA); @@ -602,7 +602,7 @@ static int dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi break; case ATP_STRING: { - const guint8* atp; + const uint8_t* atp; proto_tree_add_item_ret_string(attr_tree, hf_tnef_attribute_string, tvb, offset, length, oem_encoding, pinfo->pool, &atp); proto_item_append_text(attr_item, " %s", atp); } @@ -614,7 +614,7 @@ static int dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi } /* check for overflow */ - if (offset + length > (guint32)offset) { + if (offset + length > (uint32_t)offset) { offset += length; } @@ -802,7 +802,7 @@ proto_register_tnef(void) { &hf_tnef_PropValue_object, { "Object", "tnef.PropValue.object", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_tnef, &ett_tnef_attribute, &ett_tnef_attribute_tag, |