[Ocfs2-tools-devel] [PATCH 1/1] wireshark-ocfs2: add dlm_deref_lockres support
Jeff Liu
jeff.liu at oracle.com
Thu Jul 2 07:15:33 PDT 2009
this patch add dlm_deref_lockres handler in dissector. the message was dissectored as:
ocfs2
Magic: Request (0xfa55)
Len: 72
Type: Deref Lockres (507)
Pad: 0x0000
Sys Status: DLM_NORMAL (0)
Status: 0
Key: 0x2b592523
Num: 603
Payload1: 000000000000011F4D303030303030303030303030303030
Payload2: 303031303166313432383931306136000000000000000000
Payload3: 000000000000000000000000000000000000000000000000
Node Index: 1
Namelen: 31
Name: M00000000000000000101f1428910a6
Signed-off-by: Jeff Liu <jeff.liu at oracle.com>
---
epan/dissectors/packet-ocfs2.c | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/epan/dissectors/packet-ocfs2.c b/epan/dissectors/packet-ocfs2.c
index bd2d2b7..17380ba 100644
--- a/epan/dissectors/packet-ocfs2.c
+++ b/epan/dissectors/packet-ocfs2.c
@@ -82,6 +82,7 @@ static gint ett_dlm_lock_request = -1;
static gint ett_dlm_recovery_data_done = -1;
static gint ett_dlm_begin_recovery = -1;
static gint ett_dlm_finalize_recovery = -1;
+static gint ett_dlm_deref_lockres = -1;
static int proto_ocfs2 = -1;
static int hf_msg_magic = -1;
@@ -266,7 +267,7 @@ enum {
DLM_CONVERT_LOCK_MSG,
DLM_PROXY_AST_MSG,
DLM_UNLOCK_LOCK_MSG,
- DLM_UNUSED_MSG2,
+ DLM_DEREF_LOCKRES_MSG,
DLM_MIGRATE_REQUEST_MSG,
DLM_MIG_LOCKRES_MSG,
DLM_QUERY_JOIN_MSG,
@@ -289,7 +290,7 @@ static const value_string dlm_magic[] = {
{ DLM_CONVERT_LOCK_MSG, "Convert Lock" },
{ DLM_PROXY_AST_MSG, "Proxy AST" },
{ DLM_UNLOCK_LOCK_MSG, "Unlock Lock" },
- { DLM_UNUSED_MSG2, "Unused 2" },
+ { DLM_DEREF_LOCKRES_MSG, "Deref Lockres" },
{ DLM_MIGRATE_REQUEST_MSG,"Migrate Request" },
{ DLM_MIG_LOCKRES_MSG, "Migrate Lockres" },
{ DLM_QUERY_JOIN_MSG, "Query Join" },
@@ -713,6 +714,14 @@ struct dlm_unlock_lock
guint8 name[O2NM_MAX_NAME_LEN];
gint8 lvb[0]; // DLM_LVB_LEN
};
+struct dlm_deref_lockres {
+ guint32 pad1;
+ guint16 pad2;
+ guint8 node_idx;
+ guint8 namelen;
+
+ guint8 name[O2NM_MAX_NAME_LEN];
+};
struct dlm_proxy_ast
{
guint64 cookie;
@@ -860,6 +869,19 @@ static struct dlm_msg_struct_def dlm_struct_defs[] = {
LVB_REMAIN_BYTES_LEN, dlm_lvb_handler},
{ DLM_MSG_STRUCT_DEF_END } }
},
+{ "dlm_deref_lockres", "DLM Deref Lockres", DLM_DEREF_LOCKRES_MSG,
+ &ett_dlm_deref_lockres, {
+ { "node_idx", &hf_dlm_node_idx,
+ FIELD_OFFSET_AND_SIZE(struct dlm_deref_lockres, node_idx),
+ dlm_node_idx_handler},
+ { "namelen", &hf_dlm_namelen,
+ FIELD_OFFSET_AND_SIZE(struct dlm_deref_lockres, namelen),
+ dlm_namelen_handler},
+ { "name", &hf_dlm_name,
+ FIELD_OFFSET_AND_SIZE(struct dlm_deref_lockres, name),
+ dlm_name_handler},
+ { DLM_MSG_STRUCT_DEF_END } }
+},
{ "dlm_lock_request", "DLM Lock Request (recovery)", DLM_LOCK_REQUEST_MSG, &ett_dlm_lock_request, {
{ "node_idx", &hf_dlm_node_idx, FIELD_OFFSET_AND_SIZE(struct dlm_lock_request,node_idx), dlm_node_idx_handler},
{ "dead_node", &hf_dlm_dead_node, FIELD_OFFSET_AND_SIZE(struct dlm_lock_request,dead_node), dlm_node_idx_handler},
@@ -1312,6 +1334,7 @@ void proto_register_ocfs2(void)
&ett_dlm_convert_lock,
&ett_dlm_proxy_ast,
&ett_dlm_unlock_lock,
+ &ett_dlm_deref_lockres,
&ett_dlm_migrate_request,
&ett_dlm_migrate_lockres,
&ett_dlm_query_join,
--
1.5.4.3
More information about the Ocfs2-tools-devel
mailing list