[jboss-jira] [JBoss JIRA] Commented: (JGRP-324) Wireshark plugin for JGroups
Richard Achmatowicz (JIRA)
jira-events at lists.jboss.org
Tue Nov 4 18:55:21 EST 2008
[ https://jira.jboss.org/jira/browse/JGRP-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12436910#action_12436910 ]
Richard Achmatowicz commented on JGRP-324:
------------------------------------------
One comment, one question:
1. Comment:
At present, the JGroups wireshark dissector (and every other dissector i've looked at) is written in this way:
while (still more data in buffer)
{
- read some expected data item from the payload buffer and deserialize if necessary (using knowledge of the format of the data)
- display the data on the user interface
- advance the offset into the buffer by the length of the data read
}
I structured the code for the above loop into a set of functions, so it really looks like this:
while(still more data in buffer)
{
- read and display TP header
- get number of messages in bundle
- for each (message in bundle) {
- read and display message header
- read and display message payload
- get number of headers attached to message
for each (header in message) {
- read and display header
}
}
}
So, I have a lot of functions to carry out this work (2500 lines of C), from reading Digests and ViewIDs to deserializing class info based on magic numbers.
And each function which involves reading from the payload buffer includes assumptions about the format of the payload buffer and its contents.
So, knowledge of the wireformat is at present buried and scattered all over the code.
One approach to handle different versions would be to scatter version checks throughout the single copy of the dissector (as in the old C code which runs
on different platforms). Another approach would be to have a dissector for each version, but there is so much common code.....and every time we added
a new chunk of code to the dissector, we would have to add it for each version. So, its unclear to me how to proceed with handling different versions
at present.
Another thought is to have wireformat specifications for each version, specifying the order in which data appears, the type, the display names, and so on, and base
the dissector to work off that wireformat. But i'm not sure if that would be any better than including version information within the dissector itself (as in the old
C style approach).
2. Question
How many times has the wireformat changed, for which versions, and for which reasons? (i.e. what part of the format has changed)?
Maybe if we look at the changes that have taken place (and might take place), a solution will present itself?
> Wireshark plugin for JGroups
> ----------------------------
>
> Key: JGRP-324
> URL: https://jira.jboss.org/jira/browse/JGRP-324
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Richard Achmatowicz
> Priority: Minor
> Fix For: 2.x
>
>
> Write a C implementation of a Wireshark plugin which understands the JGroups wire format and displays information about the JGroups messages (e.g. sender, receiver, headers) in ethereal.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list