aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2006-06-22 00:07:46 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2006-06-22 00:07:46 +0000
commita41dc5d8746fedbca83d48255b4e1357a6a3c93b (patch)
tree6d7591d36c3bf2f8914af20eb1e77e11b025cb58 /epan/dissectors
parent67f84666c15e66b1a1f8cfe10ec5a82d7408a2f7 (diff)
downloadwireshark-a41dc5d8746fedbca83d48255b4e1357a6a3c93b.tar.gz
wireshark-a41dc5d8746fedbca83d48255b4e1357a6a3c93b.tar.bz2
wireshark-a41dc5d8746fedbca83d48255b4e1357a6a3c93b.zip
Initial fix for bug 974. It does implement RSP header decoding, it lacks RSP trailer decoding. ASF 2.0 messages added to ASF decoder .
svn path=/trunk/; revision=18539
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-asf.c11
-rw-r--r--epan/dissectors/packet-rmcp.c81
2 files changed, 84 insertions, 8 deletions
diff --git a/epan/dissectors/packet-asf.c b/epan/dissectors/packet-asf.c
index ec01becd1e..be0b8553c6 100644
--- a/epan/dissectors/packet-asf.c
+++ b/epan/dissectors/packet-asf.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
#endif
#include <glib.h>
@@ -36,8 +36,8 @@
/*
* See
- *
* http://www.dmtf.org/standards/standard_alert.php
+ * http://www.dmtf.org/standards/documents/ASF/DSP0136.pdf
*/
#define RMCP_CLASS_ASF 0x06
@@ -59,9 +59,16 @@ static const value_string asf_type_vals[] = {
{ 0x40, "Presence Pong" },
{ 0x41, "Capabilities Response" },
{ 0x42, "System State Response" },
+ { 0x43, "Open Session Response" },
+ { 0x44, "Close Session Response" },
{ 0x80, "Presence Ping" },
{ 0x81, "Capabilities Request" },
{ 0x82, "System State Request" },
+ { 0x83, "Open Session Request" },
+ { 0x84, "Close Session Request" },
+ { 0xC0, "RAKP Message 1" },
+ { 0xC1, "RAKP Message 2" },
+ { 0xC2, "RAKP Message 3" },
{ 0x00, NULL }
};
diff --git a/epan/dissectors/packet-rmcp.c b/epan/dissectors/packet-rmcp.c
index 25490c22cc..69bb81a126 100644
--- a/epan/dissectors/packet-rmcp.c
+++ b/epan/dissectors/packet-rmcp.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
#endif
#include <glib.h>
@@ -36,9 +36,8 @@
/*
* See
- *
* http://www.dmtf.org/standards/standard_alert.php
- *
+ * http://www.dmtf.org/standards/documents/ASF/DSP0136.pdf
* (the ASF specification includes RMCP)
*/
@@ -48,9 +47,19 @@ static int hf_rmcp_sequence = -1;
static int hf_rmcp_class = -1;
static int hf_rmcp_type = -1;
+static int proto_rsp = -1;
+static int hf_rsp_session_id = -1;
+static int hf_rsp_sequence = -1;
+static int hf_rsp_pad = -1;
+static int hf_rsp_pad_length = -1;
+static int hf_rsp_next_header = -1;
+static int hf_rsp_integrity_data = -1;
+
static gint ett_rmcp = -1;
static gint ett_rmcp_typeclass = -1;
+static gint ett_rsp = -1;
+
static dissector_handle_t data_handle;
static dissector_table_t rmcp_dissector_table;
@@ -143,6 +152,35 @@ dissect_rmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return tvb_length(tvb);
}
+static int
+dissect_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ proto_tree *rsp_tree = NULL, *field_tree;
+ proto_item *ti, *tf;
+ tvbuff_t *next_tvb;
+ int offset = 0;
+
+ if (tree) {
+ ti = proto_tree_add_protocol_format(tree, proto_rsp, tvb, offset, 8,
+ "RMCP Security-extension Protocol");
+ rsp_tree = proto_item_add_subtree(ti, ett_rsp);
+
+ proto_tree_add_item(rsp_tree, hf_rsp_session_id, tvb, offset, 4, FALSE);
+ offset += 4;
+ proto_tree_add_item(rsp_tree, hf_rsp_sequence, tvb, offset, 4, FALSE);
+ offset += 4;
+ }
+
+ /* XXX determination of RCMP message length needs to
+ * be done according to 3.2.3.3.3 of the specification.
+ * This is only valid for session ID equals 0
+ */
+ next_tvb = tvb_new_subset(tvb, 8, -1, -1);
+ dissect_rmcp(next_tvb, pinfo, tree);
+
+ return tvb_length(tvb);
+}
+
void
proto_register_rmcp(void)
{
@@ -164,11 +202,11 @@ proto_register_rmcp(void)
"Message Type", "rmcp.type",
FT_UINT8, BASE_HEX,
VALS(rmcp_type_vals), RMCP_TYPE_MASK,
- "RMCP Message Type", HFILL }},
+ "RMCP Message Type", HFILL }}
};
static gint *ett[] = {
&ett_rmcp,
- &ett_rmcp_typeclass,
+ &ett_rmcp_typeclass
};
proto_rmcp = proto_register_protocol(
@@ -182,6 +220,29 @@ proto_register_rmcp(void)
}
void
+proto_register_rsp(void)
+{
+ static hf_register_info hf[] = {
+ { &hf_rsp_session_id, {
+ "Session ID", "rsp.session_id",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "RSP session ID", HFILL }},
+ { &hf_rsp_sequence, {
+ "Sequence", "rsp.sequence",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "RSP sequence", HFILL }},
+ };
+ static gint *ett[] = {
+ &ett_rsp
+ };
+
+ proto_rsp = proto_register_protocol(
+ "RMCP Security-extensions Protocol", "RSP", "rsp");
+ proto_register_field_array(proto_rsp, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
proto_reg_handoff_rmcp(void)
{
dissector_handle_t rmcp_handle;
@@ -190,5 +251,13 @@ proto_reg_handoff_rmcp(void)
rmcp_handle = new_create_dissector_handle(dissect_rmcp, proto_rmcp);
dissector_add("udp.port", UDP_PORT_RMCP, rmcp_handle);
- dissector_add("udp.port", UDP_PORT_RMCP_SECURE, rmcp_handle);
+}
+
+void
+proto_reg_handoff_rsp(void)
+{
+ dissector_handle_t rsp_handle;
+
+ rsp_handle = new_create_dissector_handle(dissect_rsp, proto_rsp);
+ dissector_add("udp.port", UDP_PORT_RMCP_SECURE, rsp_handle);
}