Hi team, I am a Netscreen Firewall user, I tried doing a snoop detail on tunnel interface, however couldn't open it in wireshark.
Though the snoop on ethernet interface opens pretty fine. Could you please look into it and see if any slight code change is required to incorporate this as well. Thanks in advance Regards Srb asked 13 Sep '12, 22:45 Sarab edited 16 Sep '12, 14:02 Jim Aragon |
2 Answers:
Unfortunately it is not real easy to add support for snoop output for a tunnel. First of all, the function that checks whether a valid packet header is found needs to find the packet length. It scans one line at the moment, so for this output it needs to start parsing multiple lines to find the packet length. But the biggest difference between this output and output of other interface types is that there is no link layer, it is only the IP header and IP payload. Currently there is no linklayer type for just raw IP (as far as I know off). At least it is not supported in the "Frame" dissector. This means that either:
Option 2 is easier to implement, but more of a dirty hack in my opinion, as you show a link layer in Wireshark that is not really in the packet. answered 14 Sep '12, 00:35 SYN-bit ♦♦ |
Since you have the raw packet bytes here (from IP up) you could edit those into a format that text2pcap and File|Import... can take. Without having a go at it, it only needs to get an offset at the start of each line. answered 16 Sep '12, 04:15 Jaap ♦ Hi Jaap, I tried using text2pcap using raw data, that converts it to pcap however the file doesn't show the details then. e.g in the data paart it doesnt show OSPF details. (16 Sep '12, 18:58) Sarab |
WTAP_ENCAP_RAW_IP
in Wiretap; that's what, for example, the pcap link-layer header typeLINKTYPE_RAW
, as per the link-layer header types list at tcpdump.org, maps to.OK, I should have done my research first :-)
Looking a bit more thorough through the code, there is already support for WTAP_ENCAP_RAW_IP in epan/dissectors/packet-raw.c.
So actually adding support for netscreen snoop output for tunnel interfaces would involve changing wiretap/netscreen.c to:
That should not be too hard, but unfortunately my time is limited at the moment. I'll see if I can find some time the coming weeks.
Thanks everyone ....
@ Syn-bit : Please do update this thread once this is done and later I can update the Juniper forum so that everyone is aware that the support for tunnel interface snoop is there on wireshark :)
Hi Syn-Bit, Did you get chance to update the code regarding this issue ?
Thanks Sarab