diff options
Diffstat (limited to 'epan/dissectors/packet-skype.c')
-rw-r--r-- | epan/dissectors/packet-skype.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/epan/dissectors/packet-skype.c b/epan/dissectors/packet-skype.c index 7acd4f4a..cdcffd12 100644 --- a/epan/dissectors/packet-skype.c +++ b/epan/dissectors/packet-skype.c @@ -40,49 +40,49 @@ static dissector_handle_t skype_handle; /* Things we may want to remember for a whole conversation */ typedef struct _skype_udp_conv_info_t { - guint32 global_src_ip; - guint32 global_dst_ip; + uint32_t global_src_ip; + uint32_t global_dst_ip; } skype_udp_conv_info_t; /* protocol handles */ -static int proto_skype = -1; +static int proto_skype; /* ett handles */ -static int ett_skype = -1; +static int ett_skype; #define SKYPE_SOM_UNK_MASK 0xF0 #define SKYPE_SOM_TYPE_MASK 0x0F /* hf elements */ /* Start of Message */ -static int hf_skype_som_id = -1; -static int hf_skype_som_unk = -1; -static int hf_skype_som_type = -1; +static int hf_skype_som_id; +static int hf_skype_som_unk; +static int hf_skype_som_type; /* Message body */ /* Unknown_0 */ -static int hf_skype_unknown_0_unk1 = -1; +static int hf_skype_unknown_0_unk1; /* Payload */ -static int hf_skype_payload_iv = -1; -static int hf_skype_payload_crc = -1; -static int hf_skype_payload_enc_data = -1; +static int hf_skype_payload_iv; +static int hf_skype_payload_crc; +static int hf_skype_payload_enc_data; /* Resend */ -static int hf_skype_ffr_num = -1; -static int hf_skype_ffr_unk1 = -1; -static int hf_skype_ffr_iv = -1; -static int hf_skype_ffr_crc = -1; -static int hf_skype_ffr_enc_data = -1; +static int hf_skype_ffr_num; +static int hf_skype_ffr_unk1; +static int hf_skype_ffr_iv; +static int hf_skype_ffr_crc; +static int hf_skype_ffr_enc_data; /* Nat info */ -static int hf_skype_natinfo_srcip = -1; -static int hf_skype_natinfo_dstip = -1; +static int hf_skype_natinfo_srcip; +static int hf_skype_natinfo_dstip; /* Nat request */ -static int hf_skype_natrequest_srcip = -1; -static int hf_skype_natrequest_dstip = -1; +static int hf_skype_natrequest_srcip; +static int hf_skype_natrequest_dstip; /* Audio */ -static int hf_skype_audio_unk1 = -1; +static int hf_skype_audio_unk1; /* Unknown_f */ -static int hf_skype_unknown_f_unk1 = -1; +static int hf_skype_unknown_f_unk1; /* Unknown packet type */ -static int hf_skype_unknown_packet = -1; +static int hf_skype_unknown_packet; #define PROTO_SHORT_NAME "SKYPE" @@ -117,9 +117,9 @@ dissect_skype_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti; proto_tree *skype_tree = NULL; - guint32 offset = 0; - guint32 packet_length; - guint8 packet_type; + uint32_t offset = 0; + uint32_t packet_length; + uint8_t packet_type; /* XXX: Just until we know how to decode skype over tcp */ packet_type = 255; @@ -154,9 +154,9 @@ dissect_skype_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti; proto_tree *skype_tree = NULL; - guint32 offset = 0; - guint32 packet_length; - guint8 packet_type, packet_unk; + uint32_t offset = 0; + uint32_t packet_length; + uint8_t packet_type, packet_unk; conversation_t *conversation = NULL; skype_udp_conv_info_t *skype_udp_info; @@ -176,8 +176,8 @@ dissect_skype_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* at this point the conversation data is ready */ - packet_type = tvb_get_guint8(tvb, 2) & SKYPE_SOM_TYPE_MASK; - packet_unk = (tvb_get_guint8(tvb, 2) & SKYPE_SOM_UNK_MASK) >> 4; + packet_type = tvb_get_uint8(tvb, 2) & SKYPE_SOM_TYPE_MASK; + packet_unk = (tvb_get_uint8(tvb, 2) & SKYPE_SOM_UNK_MASK) >> 4; packet_length = tvb_captured_length(tvb); @@ -279,13 +279,13 @@ dissect_skype_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return offset; } -static gboolean +static bool test_skype_udp(tvbuff_t *tvb) { /* Minimum of 3 bytes, check for valid message type */ if (tvb_captured_length(tvb) > 3) { - guint8 type = tvb_get_guint8(tvb, 2) & 0xF; + uint8_t type = tvb_get_uint8(tvb, 2) & 0xF; if ( type == 0 || /* FIXME: Extend this by minimum or exact length per message type */ type == 2 || @@ -296,21 +296,21 @@ test_skype_udp(tvbuff_t *tvb) type == 0xf ) { - return TRUE; + return true; } } - return FALSE; + return false; } -static gboolean +static bool dissect_skype_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if ( !test_skype_udp(tvb) ) { - return FALSE; + return false; } dissect_skype_udp(tvb, pinfo, tree); - return TRUE; + return true; } static int @@ -421,7 +421,7 @@ proto_register_skype(void) 0x0, NULL, HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_skype, }; |