aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ymsg.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2010-05-16 10:28:14 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2010-05-16 10:28:14 +0000
commit39e687a79faf5883b31da235ff4346240526e2ae (patch)
tree0ca1d8cb933fafe042d9d65f902402cecadf32e6 /epan/dissectors/packet-ymsg.c
parent342d436705e5efc668b5b2fd80c26668bff5f223 (diff)
From Robert Lickenbrock:
Wireshark does not extract the vendor identifier (i.e. the 7th and 8th bytes) from the header of YMSG packets. The current implementations skips over these bytes during dissection, presumably because they were believed to be padding. svn path=/trunk/; revision=32830
Diffstat (limited to 'epan/dissectors/packet-ymsg.c')
-rw-r--r--epan/dissectors/packet-ymsg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c
index e29585267b..f8168528c6 100644
--- a/epan/dissectors/packet-ymsg.c
+++ b/epan/dissectors/packet-ymsg.c
@@ -36,6 +36,7 @@
static int proto_ymsg = -1;
static int hf_ymsg_version = -1;
+static int hf_ymsg_vendor = -1;
static int hf_ymsg_len = -1;
static int hf_ymsg_service = -1;
static int hf_ymsg_status = -1;
@@ -209,7 +210,8 @@ enum ypacket_status {
struct yahoo_rawpacket
{
char ymsg[4]; /* Packet identification string (YMSG) */
- unsigned char version[4]; /* 4 bytes, little endian? */
+ unsigned char version[2]; /* 2 bytes, little endian */
+ unsigned char vendor[2]; /* 2 bytes, little endian */
unsigned char len[2]; /* length - little endian */
unsigned char service[2]; /* service - little endian */
unsigned char status[4]; /* Status - online, away etc.*/
@@ -405,7 +407,9 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ymsg_tree, hf_ymsg_version, tvb, offset, 2, FALSE);
offset += 2;
- offset += 2; /* XXX - padding? */
+ /* Vendor ID */
+ proto_tree_add_item(ymsg_tree, hf_ymsg_vendor, tvb, offset, 2, FALSE);
+ offset += 2;
/* Length */
content_len = tvb_get_ntohs(tvb, offset);
@@ -493,6 +497,9 @@ proto_register_ymsg(void)
{ &hf_ymsg_version, {
"Version", "ymsg.version", FT_UINT16, BASE_DEC,
NULL, 0, "Packet version identifier", HFILL }},
+ { &hf_ymsg_vendor, {
+ "Vendor ID", "ymsg.vendor", FT_UINT16, BASE_DEC,
+ NULL, 0, "Vendor identifier", HFILL }},
{ &hf_ymsg_len, {
"Packet Length", "ymsg.len", FT_UINT16, BASE_DEC,
NULL, 0, NULL, HFILL }},