While displaying an interesting packet, it is often needed to filter all traffic on an IP address, but not only as source or destination as the right-click filtering permits in the main GUI window. Actually, I prepare a filter like Is there another way to create it from the main GUI window? [edit]: a Lua script permits to quickly build the filter, see below This question is marked "community wiki". asked 23 Nov '10, 10:42 S Peters edited 26 Nov '11, 14:16 |
5 Answers:
At last, I have written a Lua post-dissector that match my needs, adapted from the "trivial" pseudo-protocol seen in the Lua tutorial; it adds an "Endpoints" element to the tree, that permits to "Prepare" an ip.addr filter :
Here is the resulting tree element, seen in the middle pane:
answered 29 Nov ‘10, 11:01 S Peters edited 30 Nov ‘10, 04:46 |
They are just hidden; to make the pseudo-fields (
Then the field giving the
answered 04 Dec '11, 11:38 S Peters |
No, this is not possible from the GUI for the IP addresses. For ethernet addresses, it is possible, if you open the packet details and expnd the source or destination mac-address, the address will be listed again, this time without source or destination. You can now use "Apply as filter" and it will use eth.addr instead of eth.src or eth.dst. If you would find it useful to have this for IP addresses too, you might want to open up an enhancement request on https://bugs.wireshark.org answered 23 Nov '10, 11:16 SYN-bit ♦♦ And consider whether you'd want such a filter to EXCLUDE that traffic as well... (23 Nov '10, 18:54) lchappell ♦ |
Well, like Sake said, there isn't an "ip.addr" field in the packet to right-click on. Given that I'm a lousy tpyist, I'd probably rather pull the ip.addr== from a pre-made filter. The image below shows one of my display filter sets... (the IP address filter doesn't have the exclamation point at the beginning in the string). I'd rather click than type any day <g>. Oh sure, Wireshark complains a bit as the filter isn't completed, but I don't have to backspace or type in the beginning, so it works for me. BTW, I edited the order in Notepad (and added the separator and indents)... answered 23 Nov '10, 19:31 lchappell ♦ |
Too bad for the Gui, and the usage of filters isn't so easy as I hoped. Perhaps with some Lua scripts ? This one is really too simple, but seems to go in the right direction, without requiring too much clicks.
If I understand the concepts of Lua well, it could even be possible to register a new element to the right-click menu. I hope to find something about it soon, otherwise the enhancement request on the list will be the choice. answered 25 Nov ‘10, 10:59 S Peters edited 25 Nov ‘10, 10:59 |
I'm glad to see that this field has been included in the main GUI window! At least since version 1.6.3, which permits to select eg ip.src, ip.addr, ip.src_host or ip.host with one click, so that this question has found its answer.