summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gadu-gadu.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-gadu-gadu.c')
-rw-r--r--epan/dissectors/packet-gadu-gadu.c246
1 files changed, 123 insertions, 123 deletions
diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c
index c073f9c9..33968d41 100644
--- a/epan/dissectors/packet-gadu-gadu.c
+++ b/epan/dissectors/packet-gadu-gadu.c
@@ -22,75 +22,75 @@ void proto_reg_handoff_gadu_gadu(void);
#define TCP_PORT_GADU_GADU 8074 /* assigned by IANA */
/* desegmentation of Gadu-Gadu over TCP */
-static gboolean gadu_gadu_desegment = TRUE;
+static bool gadu_gadu_desegment = true;
static dissector_handle_t gadu_gadu_handle;
-static int proto_gadu_gadu = -1;
-
-static int hf_dcc_filename = -1;
-static int hf_dcc_id = -1;
-static int hf_dcc_type = -1;
-static int hf_dcc_uin_from = -1;
-static int hf_dcc_uin_to = -1;
-static int hf_gadu_gadu_contact_type = -1;
-static int hf_gadu_gadu_contact_uin = -1;
-static int hf_gadu_gadu_contact_uin_str = -1;
-static int hf_gadu_gadu_data = -1;
-static int hf_gadu_gadu_header_length = -1;
-static int hf_gadu_gadu_header_type_recv = -1;
-static int hf_gadu_gadu_header_type_send = -1;
-static int hf_gadu_gadu_login80_lang = -1;
-static int hf_gadu_gadu_login_hash = -1;
-static int hf_gadu_gadu_login_hash_type = -1;
-static int hf_gadu_gadu_login_local_ip = -1;
-static int hf_gadu_gadu_login_local_port = -1;
-static int hf_gadu_gadu_login_protocol = -1;
-static int hf_gadu_gadu_login_status = -1;
-static int hf_gadu_gadu_login_uin = -1;
-static int hf_gadu_gadu_login_version = -1;
-static int hf_gadu_gadu_msg80_offset_attr = -1;
-static int hf_gadu_gadu_msg80_offset_plain = -1;
-static int hf_gadu_gadu_msg_ack_recipient = -1;
-static int hf_gadu_gadu_msg_ack_seq = -1;
-static int hf_gadu_gadu_msg_ack_status = -1;
-static int hf_gadu_gadu_msg_class = -1;
-static int hf_gadu_gadu_msg_recipient = -1;
-static int hf_gadu_gadu_msg_sender = -1;
-static int hf_gadu_gadu_msg_seq = -1;
-static int hf_gadu_gadu_msg_text = -1;
-static int hf_gadu_gadu_msg_time = -1;
-static int hf_gadu_gadu_msg_uin = -1;
-static int hf_gadu_gadu_new_status_desc = -1;
-static int hf_gadu_gadu_new_status_status = -1;
-static int hf_gadu_gadu_pubdir_reply_seq = -1;
-static int hf_gadu_gadu_pubdir_reply_str = -1;
-static int hf_gadu_gadu_pubdir_reply_type = -1;
-static int hf_gadu_gadu_pubdir_request_seq = -1;
-static int hf_gadu_gadu_pubdir_request_str = -1;
-static int hf_gadu_gadu_pubdir_request_type = -1;
-static int hf_gadu_gadu_status_descr = -1;
-static int hf_gadu_gadu_status_img_size = -1;
-static int hf_gadu_gadu_status_ip = -1;
-static int hf_gadu_gadu_status_port = -1;
-static int hf_gadu_gadu_status_status = -1;
-static int hf_gadu_gadu_status_uin = -1;
-static int hf_gadu_gadu_status_version = -1;
-static int hf_gadu_gadu_typing_notify_type = -1;
-static int hf_gadu_gadu_typing_notify_uin = -1;
-static int hf_gadu_gadu_userdata_attr_name = -1;
-static int hf_gadu_gadu_userdata_attr_type = -1;
-static int hf_gadu_gadu_userdata_attr_value = -1;
-static int hf_gadu_gadu_userdata_uin = -1;
-static int hf_gadu_gadu_userlist = -1;
-static int hf_gadu_gadu_userlist_format = -1;
-static int hf_gadu_gadu_userlist_reply_type = -1;
-static int hf_gadu_gadu_userlist_request_type = -1;
-static int hf_gadu_gadu_userlist_version = -1;
-static int hf_gadu_gadu_welcome_seed = -1;
-
-static int ett_gadu_gadu = -1;
-static int ett_gadu_gadu_contact = -1;
+static int proto_gadu_gadu;
+
+static int hf_dcc_filename;
+static int hf_dcc_id;
+static int hf_dcc_type;
+static int hf_dcc_uin_from;
+static int hf_dcc_uin_to;
+static int hf_gadu_gadu_contact_type;
+static int hf_gadu_gadu_contact_uin;
+static int hf_gadu_gadu_contact_uin_str;
+static int hf_gadu_gadu_data;
+static int hf_gadu_gadu_header_length;
+static int hf_gadu_gadu_header_type_recv;
+static int hf_gadu_gadu_header_type_send;
+static int hf_gadu_gadu_login80_lang;
+static int hf_gadu_gadu_login_hash;
+static int hf_gadu_gadu_login_hash_type;
+static int hf_gadu_gadu_login_local_ip;
+static int hf_gadu_gadu_login_local_port;
+static int hf_gadu_gadu_login_protocol;
+static int hf_gadu_gadu_login_status;
+static int hf_gadu_gadu_login_uin;
+static int hf_gadu_gadu_login_version;
+static int hf_gadu_gadu_msg80_offset_attr;
+static int hf_gadu_gadu_msg80_offset_plain;
+static int hf_gadu_gadu_msg_ack_recipient;
+static int hf_gadu_gadu_msg_ack_seq;
+static int hf_gadu_gadu_msg_ack_status;
+static int hf_gadu_gadu_msg_class;
+static int hf_gadu_gadu_msg_recipient;
+static int hf_gadu_gadu_msg_sender;
+static int hf_gadu_gadu_msg_seq;
+static int hf_gadu_gadu_msg_text;
+static int hf_gadu_gadu_msg_time;
+static int hf_gadu_gadu_msg_uin;
+static int hf_gadu_gadu_new_status_desc;
+static int hf_gadu_gadu_new_status_status;
+static int hf_gadu_gadu_pubdir_reply_seq;
+static int hf_gadu_gadu_pubdir_reply_str;
+static int hf_gadu_gadu_pubdir_reply_type;
+static int hf_gadu_gadu_pubdir_request_seq;
+static int hf_gadu_gadu_pubdir_request_str;
+static int hf_gadu_gadu_pubdir_request_type;
+static int hf_gadu_gadu_status_descr;
+static int hf_gadu_gadu_status_img_size;
+static int hf_gadu_gadu_status_ip;
+static int hf_gadu_gadu_status_port;
+static int hf_gadu_gadu_status_status;
+static int hf_gadu_gadu_status_uin;
+static int hf_gadu_gadu_status_version;
+static int hf_gadu_gadu_typing_notify_type;
+static int hf_gadu_gadu_typing_notify_uin;
+static int hf_gadu_gadu_userdata_attr_name;
+static int hf_gadu_gadu_userdata_attr_type;
+static int hf_gadu_gadu_userdata_attr_value;
+static int hf_gadu_gadu_userdata_uin;
+static int hf_gadu_gadu_userlist;
+static int hf_gadu_gadu_userlist_format;
+static int hf_gadu_gadu_userlist_reply_type;
+static int hf_gadu_gadu_userlist_request_type;
+static int hf_gadu_gadu_userlist_version;
+static int hf_gadu_gadu_welcome_seed;
+
+static int ett_gadu_gadu;
+static int ett_gadu_gadu_contact;
#define GG_ERA_OMNIX_MASK 0x04000000
#define GG_HAS_AUDIO_MASK 0x40000000
@@ -384,11 +384,11 @@ static const value_string gadu_gadu_pubdir_type_vals[] = {
static dissector_handle_t xml_handle;
struct gadu_gadu_conv_data {
- guint32 uin; /* uin from login packet */
+ uint32_t uin; /* uin from login packet */
};
static struct gadu_gadu_conv_data *
-gadu_gadu_create_conversation(packet_info *pinfo, guint32 uin)
+gadu_gadu_create_conversation(packet_info *pinfo, uint32_t uin)
{
conversation_t *conv;
struct gadu_gadu_conv_data *gg_conv;
@@ -416,7 +416,7 @@ gadu_gadu_get_conversation_data(packet_info *pinfo)
return NULL;
}
-static gboolean
+static bool
gadu_gadu_status_has_descr(int status)
{
return
@@ -430,11 +430,11 @@ gadu_gadu_status_has_descr(int status)
/* like tvb_strsize() but return maximum length instead of throwing exception */
static int
-gadu_gadu_strsize(tvbuff_t *tvb, const gint abs_offset)
+gadu_gadu_strsize(tvbuff_t *tvb, const int abs_offset)
{
int nul_offset;
- nul_offset = tvb_find_guint8(tvb, abs_offset, -1, 0);
+ nul_offset = tvb_find_uint8(tvb, abs_offset, -1, 0);
if (nul_offset == -1)
nul_offset = tvb_captured_length(tvb) - 1;
@@ -456,7 +456,7 @@ dissect_gadu_gadu_uint32_string_utf8(tvbuff_t *tvb, int hfindex, proto_tree *tre
{
const int org_offset = offset;
- guint32 len;
+ uint32_t len;
len = tvb_get_letohl(tvb, offset);
offset += 4;
@@ -491,13 +491,13 @@ dissect_gadu_gadu_disconnect_ack(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tr
}
static void *
-_tvb_memcpy_reverse(tvbuff_t *tvb, void *target, gint offset, size_t length)
+_tvb_memcpy_reverse(tvbuff_t *tvb, void *target, int offset, size_t length)
{
- guint8 *t = (guint8 *) target;
+ uint8_t *t = (uint8_t *) target;
while (length > 0) {
length--;
- t[length] = tvb_get_guint8(tvb, offset);
+ t[length] = tvb_get_uint8(tvb, offset);
offset++;
}
return target;
@@ -508,7 +508,7 @@ dissect_gadu_gadu_login_protocol(tvbuff_t *tvb, proto_tree *tree, int offset)
{
proto_item *ti;
- guint32 protocol;
+ uint32_t protocol;
protocol = tvb_get_letohl(tvb, offset) & 0xff;
proto_tree_add_item(tree, hf_gadu_gadu_login_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -524,8 +524,8 @@ dissect_gadu_gadu_login(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
{
proto_item *ti;
- guint32 uin;
- guint8 hash[4];
+ uint32_t uin;
+ uint8_t hash[4];
col_set_str(pinfo->cinfo, COL_INFO, "Login request (< 6.0)");
@@ -560,12 +560,12 @@ dissect_gadu_gadu_login(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
static int
dissect_gadu_gadu_login_hash(tvbuff_t *tvb, proto_tree *tree, int offset)
{
- guint8 hash_type;
+ uint8_t hash_type;
- guint8 hash[4];
+ uint8_t hash[4];
int i;
- hash_type = tvb_get_guint8(tvb, offset);
+ hash_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_login_hash_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -575,7 +575,7 @@ dissect_gadu_gadu_login_hash(tvbuff_t *tvb, proto_tree *tree, int offset)
_tvb_memcpy_reverse(tvb, hash, offset, 4);
proto_tree_add_bytes_format_value(tree, hf_gadu_gadu_login_hash, tvb, offset, 4, hash, "0x%.8x", tvb_get_letohl(tvb, offset));
for (i = 4; i < 64; i++) {
- if (tvb_get_guint8(tvb, offset+i)) {
+ if (tvb_get_uint8(tvb, offset+i)) {
proto_tree_add_item(tree, hf_gadu_gadu_data, tvb, offset + 4, 64-4, ENC_NA);
break;
}
@@ -585,7 +585,7 @@ dissect_gadu_gadu_login_hash(tvbuff_t *tvb, proto_tree *tree, int offset)
case GG_LOGIN_HASH_SHA1:
proto_tree_add_item(tree, hf_gadu_gadu_login_hash, tvb, offset, 20, ENC_NA);
for (i = 20; i < 64; i++) {
- if (tvb_get_guint8(tvb, offset+i)) {
+ if (tvb_get_uint8(tvb, offset+i)) {
proto_tree_add_item(tree, hf_gadu_gadu_data, tvb, offset + 20, 64-20, ENC_NA);
break;
}
@@ -604,7 +604,7 @@ dissect_gadu_gadu_login_hash(tvbuff_t *tvb, proto_tree *tree, int offset)
static int
dissect_gadu_gadu_login70(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint32 uin;
+ uint32_t uin;
col_set_str(pinfo->cinfo, COL_INFO, "Login request (7.0)");
@@ -638,7 +638,7 @@ dissect_gadu_gadu_login70(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
static int
dissect_gadu_gadu_login80(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint32 uin;
+ uint32_t uin;
col_set_str(pinfo->cinfo, COL_INFO, "Login request (8.0)");
@@ -706,7 +706,7 @@ dissect_gadu_gadu_login80_failed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
static int
dissect_gadu_gadu_user_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint32 users_num;
+ uint32_t users_num;
col_set_str(pinfo->cinfo, COL_INFO, "Contact details");
@@ -718,7 +718,7 @@ dissect_gadu_gadu_user_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 4;
while (users_num--) {
- guint32 attr_num;
+ uint32_t attr_num;
proto_tree_add_item(tree, hf_gadu_gadu_userdata_uin, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
@@ -727,13 +727,13 @@ dissect_gadu_gadu_user_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 4;
while (attr_num--) {
- guint32 name_size, val_size;
+ uint32_t name_size, val_size;
char *name, *val;
/* name */
name_size = tvb_get_letohl(tvb, offset);
offset += 4;
- name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, name_size, ENC_ASCII | ENC_NA);
+ name = tvb_get_string_enc(pinfo->pool, tvb, offset, name_size, ENC_ASCII | ENC_NA);
proto_tree_add_string(tree, hf_gadu_gadu_userdata_attr_name, tvb, offset - 4, 4 + name_size, name);
offset += name_size;
/* type */
@@ -743,7 +743,7 @@ dissect_gadu_gadu_user_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
val_size = tvb_get_letohl(tvb, offset);
offset += 4;
- val = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, val_size, ENC_ASCII | ENC_NA);
+ val = tvb_get_string_enc(pinfo->pool, tvb, offset, val_size, ENC_ASCII | ENC_NA);
proto_tree_add_string(tree, hf_gadu_gadu_userdata_attr_value, tvb, offset - 4, 4 + val_size, val);
offset += val_size;
}
@@ -966,8 +966,8 @@ dissect_gadu_gadu_recv_msg_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
static int
dissect_gadu_gadu_status60(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint32 uin;
- guint8 status;
+ uint32_t uin;
+ uint8_t status;
col_set_str(pinfo->cinfo, COL_INFO, "Receive status (6.0)");
@@ -975,7 +975,7 @@ dissect_gadu_gadu_status60(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(tree, hf_gadu_gadu_status_uin, tvb, offset, 4, uin);
offset += 4;
- status = tvb_get_guint8(tvb, offset);
+ status = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_status_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -1003,8 +1003,8 @@ dissect_gadu_gadu_status60(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static int
dissect_gadu_gadu_status77(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint32 uin;
- guint8 status;
+ uint32_t uin;
+ uint8_t status;
col_set_str(pinfo->cinfo, COL_INFO, "Receive status (7.7)");
@@ -1012,7 +1012,7 @@ dissect_gadu_gadu_status77(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(tree, hf_gadu_gadu_status_uin, tvb, offset, 4, uin);
offset += 4;
- status = tvb_get_guint8(tvb, offset);
+ status = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_status_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -1087,7 +1087,7 @@ dissect_gadu_gadu_notify_reply80(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tr
static int
dissect_gadu_gadu_new_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint32 status;
+ uint32_t status;
col_set_str(pinfo->cinfo, COL_INFO, "New status (< 8.0)");
@@ -1142,17 +1142,17 @@ dissect_gadu_gadu_add_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
static int
-dissect_gadu_gadu_notify105_common(tvbuff_t *tvb, proto_tree *tree, int offset, char **puin)
+dissect_gadu_gadu_notify105_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, char **puin)
{
- guint16 uin_len;
+ uint16_t uin_len;
char *uin;
proto_tree_add_item(tree, hf_gadu_gadu_data, tvb, offset, 1, ENC_NA); /* unknown 00 */
offset += 1;
- uin_len = tvb_get_guint8(tvb, offset);
+ uin_len = tvb_get_uint8(tvb, offset);
offset += 1;
- uin = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, uin_len, ENC_ASCII | ENC_NA);
+ uin = tvb_get_string_enc(pinfo->pool, tvb, offset, uin_len, ENC_ASCII | ENC_NA);
proto_tree_add_string(tree, hf_gadu_gadu_contact_uin_str, tvb, offset - 1, 1 + uin_len, uin);
offset += uin_len;
if (puin)
@@ -1169,7 +1169,7 @@ dissect_gadu_gadu_add_notify105(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
{
col_set_str(pinfo->cinfo, COL_INFO, "Notify list add (10.5)");
- return dissect_gadu_gadu_notify105_common(tvb, tree, offset, NULL);
+ return dissect_gadu_gadu_notify105_common(tvb, pinfo, tree, offset, NULL);
}
static int
@@ -1191,7 +1191,7 @@ dissect_gadu_gadu_remove_notify105(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
col_set_str(pinfo->cinfo, COL_INFO, "Notify list remove (10.5)");
- return dissect_gadu_gadu_notify105_common(tvb, tree, offset, NULL);
+ return dissect_gadu_gadu_notify105_common(tvb, pinfo, tree, offset, NULL);
}
static int
@@ -1200,7 +1200,7 @@ dissect_gadu_gadu_notify_common(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
proto_tree *contact_tree;
while (tvb_reported_length_remaining(tvb, offset) >= 4+1) {
- guint32 uin = tvb_get_letohl(tvb, offset);
+ uint32_t uin = tvb_get_letohl(tvb, offset);
contact_tree = proto_tree_add_subtree_format(tree, tvb, offset, 5,
ett_gadu_gadu_contact, NULL, "Contact: %u", uin);
@@ -1246,7 +1246,7 @@ dissect_gadu_gadu_notify105(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
contact_tree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_gadu_gadu_contact, &ti, "Contact: ");
- offset = dissect_gadu_gadu_notify105_common(tvb, contact_tree, offset, &uin);
+ offset = dissect_gadu_gadu_notify105_common(tvb, pinfo, contact_tree, offset, &uin);
proto_item_append_text(ti, "%s", uin);
proto_item_set_len(ti, offset - org_offset);
@@ -1285,7 +1285,7 @@ dissect_gadu_gadu_userlist_xml_compressed(tvbuff_t *tvb, packet_info *pinfo, pro
if (remain <= 0)
return offset;
- if ((uncomp_tvb = tvb_child_uncompress(tvb, tvb, offset, remain))) {
+ if ((uncomp_tvb = tvb_child_uncompress_zlib(tvb, tvb, offset, remain))) {
proto_tree_add_bytes_format_value(tree, hf_gadu_gadu_userlist, tvb, offset, remain, NULL, "%s", "[Decompression succeeded]");
add_new_data_source(pinfo, uncomp_tvb, "Uncompressed userlist");
@@ -1303,12 +1303,12 @@ dissect_gadu_gadu_userlist_xml_compressed(tvbuff_t *tvb, packet_info *pinfo, pro
static int
dissect_gadu_gadu_userlist_request80(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint8 type;
+ uint8_t type;
proto_item *ti;
col_set_str(pinfo->cinfo, COL_INFO, "Userlist request (8.0)");
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_userlist_request_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -1327,18 +1327,18 @@ dissect_gadu_gadu_userlist_request80(tvbuff_t *tvb, packet_info *pinfo, proto_tr
static int
dissect_gadu_gadu_userlist_request100(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint8 type, format;
+ uint8_t type, format;
col_set_str(pinfo->cinfo, COL_INFO, "Userlist request (10.0)");
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_userlist_request_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_gadu_gadu_userlist_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- format = tvb_get_guint8(tvb, offset);
+ format = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_userlist_format, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -1358,11 +1358,11 @@ dissect_gadu_gadu_userlist_request100(tvbuff_t *tvb, packet_info *pinfo, proto_t
static int
dissect_gadu_gadu_userlist_reply80(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint8 type;
+ uint8_t type;
col_set_str(pinfo->cinfo, COL_INFO, "Userlist reply (8.0)");
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_userlist_reply_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -1378,18 +1378,18 @@ dissect_gadu_gadu_userlist_reply80(tvbuff_t *tvb, packet_info *pinfo, proto_tree
static int
dissect_gadu_gadu_userlist_reply100(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- guint8 type, format;
+ uint8_t type, format;
col_set_str(pinfo->cinfo, COL_INFO, "Userlist reply (10.0)");
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_userlist_reply_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_gadu_gadu_userlist_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- format = tvb_get_guint8(tvb, offset);
+ format = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_gadu_gadu_userlist_format, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -1496,7 +1496,7 @@ dissect_gadu_gadu_pubdir50_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
offset += 4;
/* XXX, link request sequence with reply sequence */
- while ((pos = tvb_find_guint8(tvb, offset, -1, '\0')) > 0) {
+ while ((pos = tvb_find_uint8(tvb, offset, -1, '\0')) > 0) {
/* XXX, display it better, field=value */
proto_tree_add_item(tree, hf_gadu_gadu_pubdir_request_str, tvb, offset, (pos - offset) + 1, ENC_NA | ENC_WINDOWS_1250);
offset = pos + 1;
@@ -1519,7 +1519,7 @@ dissect_gadu_gadu_pubdir50_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
offset += 4;
/* XXX, link reply sequence with request sequence */
- while ((pos = tvb_find_guint8(tvb, offset, -1, '\0')) > 0) {
+ while ((pos = tvb_find_uint8(tvb, offset, -1, '\0')) > 0) {
/* XXX, display it better, field=value */
proto_tree_add_item(tree, hf_gadu_gadu_pubdir_reply_str, tvb, offset, (pos - offset) + 1, ENC_NA | ENC_WINDOWS_1250);
offset = pos + 1;
@@ -1550,7 +1550,7 @@ dissect_gadu_gadu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_tree *gadu_gadu_tree = NULL;
int offset = 0;
- guint32 pkt_type;
+ uint32_t pkt_type;
col_clear(pinfo->cinfo, COL_INFO); /* XXX, remove, add separator when multiple PDU */
@@ -1820,11 +1820,11 @@ dissect_gadu_gadu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
return tvb_captured_length(tvb);
}
-static guint
+static unsigned
get_gadu_gadu_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
int offset, void *data _U_)
{
- guint32 len = tvb_get_letohl(tvb, offset + 4);
+ uint32_t len = tvb_get_letohl(tvb, offset + 4);
return len + 8;
}
@@ -2121,7 +2121,7 @@ proto_register_gadu_gadu(void)
NULL, HFILL }
},
{ &hf_gadu_gadu_pubdir_reply_str,
- { "Reply string", "gadu-gadu.pubdir.request_str",
+ { "Reply string", "gadu-gadu.pubdir.reply_str",
FT_STRINGZ, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
@@ -2152,7 +2152,7 @@ proto_register_gadu_gadu(void)
},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_gadu_gadu,
&ett_gadu_gadu_contact
};