I need to have braces for abbreviated field names. For example, let's say I have an array of structures like the following:
When I dissect the people structure, I'd like to be able to use the following filters in wireshark:
When I declare the hf_register_info, If I use brackets for the abbreviated names, Wireshark crashes. The documentation README.dissector only talks about spaces:
asked 23 Feb '16, 10:16 _michel |
2 Answers:
Wireshark does not allow that character in field abbreviations. If you're running Wireshark from the command line (on UNIX-like systems; I think on Windows you need to enable console or something) you'd see Wireshark's complaint which would look like:
The doc you quoted is incomplete: the allowed characters are alphanumerics, '-', '_', and '." (see the proto.c source). I'll try to push a change to fix that. answered 23 Feb '16, 13:21 JeffMorriss ♦ |
The right way to do that would be to have Wireshark support the notion of a field being an array; you might want to submit an enhancement request on the Wireshark Bugzilla . answered 23 Feb '16, 15:10 Guy Harris ♦♦ Well, before going that route, is there really a need to know that people.person[1].height has a particular value? Typically in this type of scenario Wireshark would have one field: people.person.height. But it would have multiple instances of that field in a given PDU (in your case, up to 10 of them). IOW, do you need to be able to use a filter that says that person #1 has height of X (as opposed to a filter that asks if any person has a height of X)? (23 Feb '16, 16:44) JeffMorriss ♦ can you give an example of the filter "that asks if any person has a height of X" ? (23 Feb '16, 23:47) _michel
(24 Feb '16, 00:04) Guy Harris ♦♦ oh ok, ... but nope :D I'm interested in being able to filter each field individually. I am also interested in plotting specific numeric fields against time (or against another field), but I guess it's not available right now. I think this could be a great feature. Imagine that you are monitoring a (or many) motors controller and this/these controller/s send periodically/or not a timestamp and rotation speed over the network. Wouldn't be great to have graphs for this ? But well, this is another subject. (24 Feb '16, 01:06) _michel For completeness (I know it's obvious but...) today this is done by creating 10 filters per object (person): (25 Feb '16, 16:11) JeffMorriss ♦ |
Submitted the documentation change.
OK, I'm quite new to Wireshark so I trusted the documentation with my life ! :D
Don't do that. :-) If you're going to trust something with your life, use the source, Luke. :-)