aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-oicq.c
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2006-07-10 05:05:01 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2006-07-10 05:05:01 +0000
commit06c13b19d1a1bec9a24c96f80b243a17d9bd36d0 (patch)
treeac759f3d6de3885ea76ab3a52ffcd3b577986d75 /epan/dissectors/packet-oicq.c
parentd55ec3bd66327a4ebcc18a13c36acc8183d86592 (diff)
from DuBingyao
patch for the OICQ dissector to identify unknown command svn path=/trunk/; revision=18696
Diffstat (limited to 'epan/dissectors/packet-oicq.c')
-rw-r--r--epan/dissectors/packet-oicq.c56
1 files changed, 42 insertions, 14 deletions
diff --git a/epan/dissectors/packet-oicq.c b/epan/dissectors/packet-oicq.c
index 56d34e9044..4b21e6aee6 100644
--- a/epan/dissectors/packet-oicq.c
+++ b/epan/dissectors/packet-oicq.c
@@ -43,6 +43,8 @@
Protocol Flag: 8bit unsigned
Sender Flag: 16bit unsigned
Command Number: 16bit unsigned
+ Sequence Number: 16bit unsigned
+ OICQ Number: 32bit unsigned
Data: Variable Length data
*
@@ -54,8 +56,10 @@
static int proto_oicq = -1;
static int hf_oicq_flag = -1;
-static int hf_oicq_sender = -1;
+static int hf_oicq_version = -1;
static int hf_oicq_command = -1;
+static int hf_oicq_seq = -1;
+static int hf_oicq_qqid = -1;
static int hf_oicq_data = -1;
@@ -65,12 +69,7 @@ static const value_string oicq_flag_vals[] = {
{ 0x02, "Oicq packet" },
{ 0, NULL }
};
-static const value_string oicq_sender_vals[] = {
- { 0x0100, "Sender is server" },
- { 0x0e1b, "Sender is client" },
- { 0x0000, "Initiazation message sent by server" },
- { 0, NULL }
-};
+
static const value_string oicq_command_vals[] = {
{ 0x0001, "Log out" },
{ 0x0002, "Heart Message" },
@@ -84,15 +83,31 @@ static const value_string oicq_command_vals[] = {
{ 0x0012, "Confirmation of receiving message from server" },
{ 0x0016, "Send message" },
{ 0x0017, "Receive message" },
+ { 0x0018, "Retrieve information" },
{ 0x001a, "Reserved " },
- { 0x001c, "Unkonwn command" },
+ { 0x001c, "Delete Me" },
+ { 0x001d, "Request KEY" },
+ { 0x0021, "Cell Phone" },
{ 0x0022, "Log in" },
{ 0x0026, "Get friend list" },
{ 0x0027, "Get friend online" },
+ { 0x0029, "Cell PHONE" },
{ 0x0030, "Operation on group" },
+ { 0x0031, "Log in test" },
+ { 0x003c, "Group name operation" },
+ { 0x003d, "Upload group friend" },
+ { 0x003e, "MEMO Operation" },
+ { 0x0058, "Download group friend" },
+ { 0x005c, "Get level" },
+ { 0x0062, "Request login" },
+ { 0x0065, "Request extra information" },
+ { 0x0067, "Signature operation" },
+ { 0x0080, "Receive system message" },
{ 0x0081, "Get statur of friend" },
+ { 0x00b5, "Get friend's statur of group" },
{ 0, NULL }
};
+
/* dissect_oicq - dissects oicq packet data
* tvb - tvbuff for packet data (IN)
* pinfo - packet info
@@ -122,13 +137,20 @@ dissect_oicq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(oicq_tree, hf_oicq_flag, tvb, offset, 1, FALSE);
offset += 1;
-
- proto_tree_add_item(oicq_tree, hf_oicq_sender, tvb, offset, 2, FALSE);
+
+ proto_tree_add_item(oicq_tree, hf_oicq_version, tvb, offset, 2, FALSE);
offset += 2;
proto_tree_add_item(oicq_tree, hf_oicq_command, tvb, offset, 2, FALSE);
offset += 2;
+
+ proto_tree_add_item(oicq_tree, hf_oicq_seq, tvb, offset, 2, FALSE);
+ offset += 2;
+
+ proto_tree_add_item(oicq_tree, hf_oicq_qqid, tvb, offset, 4, FALSE);
+ offset += 4;
+
proto_tree_add_item(oicq_tree, hf_oicq_data, tvb, offset, -1, FALSE);
@@ -142,12 +164,18 @@ proto_register_oicq(void)
{ &hf_oicq_flag, {
"Flag", "oicq.flag", FT_UINT8, BASE_HEX,
VALS(oicq_flag_vals), 0, "Protocol Flag", HFILL }},
- { &hf_oicq_sender, {
- "Sender", "oicq.sender", FT_UINT16, BASE_DEC,
- VALS(oicq_sender_vals), 0, "Sender", HFILL }},
+ { &hf_oicq_version, {
+ "Version", "oicq.version", FT_UINT16, BASE_HEX,
+ NULL, 0, "Version-zz", HFILL }},
{ &hf_oicq_command, {
"Command", "oicq.command", FT_UINT16, BASE_DEC,
VALS(oicq_command_vals), 0, "Command", HFILL }},
+ { &hf_oicq_seq, {
+ "Sequence", "oicq.seq", FT_UINT16, BASE_DEC,
+ NULL, 0, "Sequence", HFILL }},
+ { &hf_oicq_qqid, {
+ "Data(OICQ Number,if sender is client)", "oicq.qqid", FT_UINT32, BASE_DEC,
+ NULL, 0, "", HFILL }},
{ &hf_oicq_data, {
"Data", "oicq.data", FT_STRING, 0,
NULL, 0, "Data", HFILL }},
@@ -156,7 +184,7 @@ proto_register_oicq(void)
&ett_oicq,
};
- proto_oicq = proto_register_protocol("OICQ - IM software, which is popular in China", "OICQ",
+ proto_oicq = proto_register_protocol("OICQ - IM software, popular in China", "OICQ",
"oicq");
proto_register_field_array(proto_oicq, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));