* [PATCH 0/2] two small patches for CEPH wireshark plugin
@ 2013-01-24 17:21 Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 1/2] wireshark: fix guint64 print format handling Danny Al-Gaaf
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Danny Al-Gaaf @ 2013-01-24 17:21 UTC (permalink / raw)
To: ceph-devel; +Cc: Danny Al-Gaaf, Sage Weil
Danny Al-Gaaf (2):
wireshark: fix guint64 print format handling
wireshark: fix indention
wireshark/ceph/packet-ceph.c | 46 ++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
--
1.8.1.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] wireshark: fix guint64 print format handling
2013-01-24 17:21 [PATCH 0/2] two small patches for CEPH wireshark plugin Danny Al-Gaaf
@ 2013-01-24 17:21 ` Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 2/2] wireshark: fix indention Danny Al-Gaaf
2013-01-24 18:31 ` [PATCH 0/2] two small patches for CEPH wireshark plugin Sage Weil
2 siblings, 0 replies; 7+ messages in thread
From: Danny Al-Gaaf @ 2013-01-24 17:21 UTC (permalink / raw)
To: ceph-devel; +Cc: Danny Al-Gaaf, Sage Weil
Use G_GUINT64_FORMAT to handle print format of guint64 correctly.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
---
wireshark/ceph/packet-ceph.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/wireshark/ceph/packet-ceph.c b/wireshark/ceph/packet-ceph.c
index 08826fb..84bfdd1 100644
--- a/wireshark/ceph/packet-ceph.c
+++ b/wireshark/ceph/packet-ceph.c
@@ -914,7 +914,7 @@ static guint32 dissect_ceph_auth_reply(tvbuff_t *tvb, proto_tree *tree, guint32
PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"protocol: %d",protocol);
PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"result: %d",result);
- PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letoh64,"global_id: %lu", global_id);
+ PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letoh64,"global_id: %" G_GUINT64_FORMAT, global_id);
PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"payload_len: %d",payload_len);
str_len = tvb_get_letohl(tvb,offset+payload_len);
@@ -950,7 +950,7 @@ static guint32 dissect_ceph_mdsmap_node(tvbuff_t *tvb, proto_tree *tree, guint32
ceph_sub_item = proto_tree_add_item(tree, hf_ceph_mdsnode, tvb, offset, -1, TRUE );
ceph_mdsnode_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph);
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"Global ID: %ld",global_id);
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"Global ID: %" G_GUINT64_FORMAT, global_id);
infoversion = *tvb_get_ptr(tvb,offset,sizeof(infoversion));
offset++;
offset+=sizeof(guint64);
@@ -961,7 +961,7 @@ static guint32 dissect_ceph_mdsmap_node(tvbuff_t *tvb, proto_tree *tree, guint32
PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"mds: %d",field);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"inc: %d",field);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"state: %d",field);
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"state seq: %ld",field64);
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"state seq: %" G_GUINT64_FORMAT, field64);
offset = dissect_ceph_entity_addr(tvb, ceph_mdsnode_tree, offset);
cephtime = (struct ceph_timespec *) tvb_get_ptr(tvb, offset, sizeof(struct ceph_timespec));
time = cephtime->tv_sec;
@@ -1031,7 +1031,7 @@ static guint32 dissect_ceph_mds_map(tvbuff_t *tvb, proto_tree *tree, guint32 off
PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_root: %i",plop);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_session_timeout: %i",plop);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_session_autoclose: %i",plop);
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letoh64,"m_maxfile_size: %ld",max_filesize);
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letoh64,"m_maxfile_size: %" G_GUINT64_FORMAT, max_filesize);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_max_mds: %i",plop);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"n: %i",len);
--
1.8.1.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] wireshark: fix indention
2013-01-24 17:21 [PATCH 0/2] two small patches for CEPH wireshark plugin Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 1/2] wireshark: fix guint64 print format handling Danny Al-Gaaf
@ 2013-01-24 17:21 ` Danny Al-Gaaf
2013-01-24 18:31 ` [PATCH 0/2] two small patches for CEPH wireshark plugin Sage Weil
2 siblings, 0 replies; 7+ messages in thread
From: Danny Al-Gaaf @ 2013-01-24 17:21 UTC (permalink / raw)
To: ceph-devel; +Cc: Danny Al-Gaaf, Sage Weil
Fix indention.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
---
wireshark/ceph/packet-ceph.c | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/wireshark/ceph/packet-ceph.c b/wireshark/ceph/packet-ceph.c
index 84bfdd1..5d2c702 100644
--- a/wireshark/ceph/packet-ceph.c
+++ b/wireshark/ceph/packet-ceph.c
@@ -906,19 +906,19 @@ static guint32 dissect_ceph_auth_reply(tvbuff_t *tvb, proto_tree *tree, guint32
guint64 global_id;
proto_item *ceph_sub_item = NULL;
proto_item *ceph_item = proto_tree_get_parent(tree);
- proto_tree *ceph_auth_reply_tree;
+ proto_tree *ceph_auth_reply_tree;
- ceph_auth_reply_tree = proto_item_add_subtree(ceph_item, ett_ceph);
+ ceph_auth_reply_tree = proto_item_add_subtree(ceph_item, ett_ceph);
ceph_sub_item = proto_tree_add_item( tree, hf_ceph_auth_reply, tvb, offset, 16, TRUE );
- ceph_auth_reply_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph);
+ ceph_auth_reply_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph);
- PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"protocol: %d",protocol);
- PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"result: %d",result);
- PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letoh64,"global_id: %" G_GUINT64_FORMAT, global_id);
- PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"payload_len: %d",payload_len);
+ PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"protocol: %d",protocol);
+ PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"result: %d",result);
+ PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letoh64,"global_id: %" G_GUINT64_FORMAT, global_id);
+ PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"payload_len: %d",payload_len);
- str_len = tvb_get_letohl(tvb,offset+payload_len);
- proto_tree_add_text(ceph_auth_reply_tree, tvb, offset+payload_len, str_len,"%s",tvb_get_const_stringz(tvb,offset,&str_len));
+ str_len = tvb_get_letohl(tvb,offset+payload_len);
+ proto_tree_add_text(ceph_auth_reply_tree, tvb, offset+payload_len, str_len,"%s",tvb_get_const_stringz(tvb,offset,&str_len));
return offset;
}
@@ -930,11 +930,11 @@ static guint32 dissect_ceph_pgpools(tvbuff_t *tvb, proto_tree *tree, guint32 off
ceph_pgpools_tree = proto_item_add_subtree(ceph_item, ett_ceph);
ceph_sub_item = proto_tree_add_item(tree, hf_ceph_pgpools, tvb, offset, -1, TRUE );
ceph_pgpools_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph);
- PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl," %d pool(s)",n);
- for ( i = 0; i<n; i++){
- PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl,"data_pg_pool: %d",pool);
- PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl,"cas_pg_pool: %d",pool);
- }
+ PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl," %d pool(s)",n);
+ for ( i = 0; i<n; i++){
+ PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl,"data_pg_pool: %d",pool);
+ PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl,"cas_pg_pool: %d",pool);
+ }
return offset;
}
static guint32 dissect_ceph_mdsmap_node(tvbuff_t *tvb, proto_tree *tree, guint32 offset){
@@ -954,14 +954,14 @@ static guint32 dissect_ceph_mdsmap_node(tvbuff_t *tvb, proto_tree *tree, guint32
infoversion = *tvb_get_ptr(tvb,offset,sizeof(infoversion));
offset++;
offset+=sizeof(guint64);
- proto_tree_add_text(ceph_mdsnode_tree, tvb, offset, sizeof(infoversion), "version: %d", infoversion);
+ proto_tree_add_text(ceph_mdsnode_tree, tvb, offset, sizeof(infoversion), "version: %d", infoversion);
PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"Name length: %d",field);
- proto_tree_add_text(ceph_mdsnode_tree, tvb, offset, field,"MDS name: %s",tvb_get_const_stringz(tvb,offset,&field));
- offset+=field-1;
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"mds: %d",field);
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"inc: %d",field);
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"state: %d",field);
- PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"state seq: %" G_GUINT64_FORMAT, field64);
+ proto_tree_add_text(ceph_mdsnode_tree, tvb, offset, field,"MDS name: %s",tvb_get_const_stringz(tvb,offset,&field));
+ offset+=field-1;
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"mds: %d",field);
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"inc: %d",field);
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"state: %d",field);
+ PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letoh64,"state seq: %" G_GUINT64_FORMAT, field64);
offset = dissect_ceph_entity_addr(tvb, ceph_mdsnode_tree, offset);
cephtime = (struct ceph_timespec *) tvb_get_ptr(tvb, offset, sizeof(struct ceph_timespec));
time = cephtime->tv_sec;
--
1.8.1.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] two small patches for CEPH wireshark plugin
2013-01-24 17:21 [PATCH 0/2] two small patches for CEPH wireshark plugin Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 1/2] wireshark: fix guint64 print format handling Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 2/2] wireshark: fix indention Danny Al-Gaaf
@ 2013-01-24 18:31 ` Sage Weil
2013-01-24 20:49 ` Danny Al-Gaaf
2 siblings, 1 reply; 7+ messages in thread
From: Sage Weil @ 2013-01-24 18:31 UTC (permalink / raw)
To: Danny Al-Gaaf; +Cc: ceph-devel, Danny Al-Gaaf
Hi Danny!
On Thu, 24 Jan 2013, Danny Al-Gaaf wrote:
> Danny Al-Gaaf (2):
> wireshark: fix guint64 print format handling
> wireshark: fix indention
>
> wireshark/ceph/packet-ceph.c | 46 ++++++++++++++++++++++----------------------
> 1 file changed, 23 insertions(+), 23 deletions(-)
Since you brought up wireshark...
We would LOVE LOVE LOVE it if this plugin could get upstream into
wireshark. IIRC, the problem (last time we checked, ages ago) was that
there were strict coding guidelines for that project that weren't
followed. I'm not sure if that is still the case, or even if that is
accurate.
It would be great if someone on this list who is looking for a way to
contribute could take the lead on trying to make this happen... :-)
sage
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] two small patches for CEPH wireshark plugin
2013-01-24 18:31 ` [PATCH 0/2] two small patches for CEPH wireshark plugin Sage Weil
@ 2013-01-24 20:49 ` Danny Al-Gaaf
2013-01-24 20:57 ` Sage Weil
2013-01-29 4:35 ` David Zafman
0 siblings, 2 replies; 7+ messages in thread
From: Danny Al-Gaaf @ 2013-01-24 20:49 UTC (permalink / raw)
To: ceph-devel; +Cc: Sage Weil
Am 24.01.2013 19:31, schrieb Sage Weil:
> Hi Danny!
[...]
> Since you brought up wireshark...
>
> We would LOVE LOVE LOVE it if this plugin could get upstream into
> wireshark.
Yes, this would be great.
> IIRC, the problem (last time we checked, ages ago) was that
> there were strict coding guidelines for that project that weren't
> followed. I'm not sure if that is still the case, or even if that is
> accurate.
>
> It would be great if someone on this list who is looking for a way to
> contribute could take the lead on trying to make this happen... :-)
I'll take a look at it maybe ... if I find some free time for it.
What about the patches? Can we apply them to the ceph git tree until we
have another solution for the wireshark code?
Danny
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] two small patches for CEPH wireshark plugin
2013-01-24 20:49 ` Danny Al-Gaaf
@ 2013-01-24 20:57 ` Sage Weil
2013-01-29 4:35 ` David Zafman
1 sibling, 0 replies; 7+ messages in thread
From: Sage Weil @ 2013-01-24 20:57 UTC (permalink / raw)
To: Danny Al-Gaaf; +Cc: ceph-devel
On Thu, 24 Jan 2013, Danny Al-Gaaf wrote:
> Am 24.01.2013 19:31, schrieb Sage Weil:
> > Hi Danny!
> [...]
> > Since you brought up wireshark...
> >
> > We would LOVE LOVE LOVE it if this plugin could get upstream into
> > wireshark.
>
> Yes, this would be great.
>
> > IIRC, the problem (last time we checked, ages ago) was that
> > there were strict coding guidelines for that project that weren't
> > followed. I'm not sure if that is still the case, or even if that is
> > accurate.
> >
> > It would be great if someone on this list who is looking for a way to
> > contribute could take the lead on trying to make this happen... :-)
>
> I'll take a look at it maybe ... if I find some free time for it.
>
> What about the patches? Can we apply them to the ceph git tree until we
> have another solution for the wireshark code?
Already in master. Thanks!
sage
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] two small patches for CEPH wireshark plugin
2013-01-24 20:49 ` Danny Al-Gaaf
2013-01-24 20:57 ` Sage Weil
@ 2013-01-29 4:35 ` David Zafman
1 sibling, 0 replies; 7+ messages in thread
From: David Zafman @ 2013-01-29 4:35 UTC (permalink / raw)
To: Danny Al-Gaaf; +Cc: ceph-devel, Sage Weil
You could look at the wip-wireshark-zafman branch. I rebased it and force pushed it. It has changes to the wireshark.patch and a minor change I needed to get it to build. I'm surprised the recent checkin didn't include the change to packet-ceph.c which I needed to get it to build.
David Zafman
Senior Developer
david.zafman@inktank.com
On Jan 24, 2013, at 12:49 PM, Danny Al-Gaaf <danny.al-gaaf@bisect.de> wrote:
> Am 24.01.2013 19:31, schrieb Sage Weil:
>> Hi Danny!
> [...]
>> Since you brought up wireshark...
>>
>> We would LOVE LOVE LOVE it if this plugin could get upstream into
>> wireshark.
>
> Yes, this would be great.
>
>> IIRC, the problem (last time we checked, ages ago) was that
>> there were strict coding guidelines for that project that weren't
>> followed. I'm not sure if that is still the case, or even if that is
>> accurate.
>>
>> It would be great if someone on this list who is looking for a way to
>> contribute could take the lead on trying to make this happen... :-)
>
> I'll take a look at it maybe ... if I find some free time for it.
>
> What about the patches? Can we apply them to the ceph git tree until we
> have another solution for the wireshark code?
>
> Danny
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-01-29 4:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24 17:21 [PATCH 0/2] two small patches for CEPH wireshark plugin Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 1/2] wireshark: fix guint64 print format handling Danny Al-Gaaf
2013-01-24 17:21 ` [PATCH 2/2] wireshark: fix indention Danny Al-Gaaf
2013-01-24 18:31 ` [PATCH 0/2] two small patches for CEPH wireshark plugin Sage Weil
2013-01-24 20:49 ` Danny Al-Gaaf
2013-01-24 20:57 ` Sage Weil
2013-01-29 4:35 ` David Zafman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.