-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For all packets, getProtocol() returns 'pcap' #100
Comments
Hi, Your code looks fine but I wonder if it is because I don't recognize the link layer. From the screen shot, seems like "null/loopback". You could step debug through the code to see if this is properly recognized or not but I'll take a look at some later point (not quite sure when so if you're in a rush, do the step debugging part) |
I'll try to take a crack at it tonight. Can you give me any tips on where to start looking/stepping? |
just put a break point at the |
It's throwing a FramingException on line 123 of PCapPacketImpl. Going to see if I can go a bit deeper. |
Yep, in EthernetFramer on line 86 it's returning null, because the the bytes don't match any of the values in the EtherType enum. Then EtherFramer.getEtherType(), line 72, throws an UnknownEtherType exception which is caught in EtherFramer.frame() and results in throwing a FramingException. |
The unrecognized byte values are all 64, 17 so a type value of 16401. |
Ethertypes for libpcap; https://github.com/the-tcpdump-group/libpcap/blob/master/ethertype.h and tcpdump; https://github.com/the-tcpdump-group/tcpdump/blob/master/ethertype.h don't list anything for ethertype 0x4011. And yet tcpdump seems to recognize the types. |
I am having the same 'problem' but it turns out that is because the protocol - IEEE802_11 - is not supported - it's a PCAP file from a WLAN capture. I wouldn't mind trying to tackle this and write the underlying code to be able to parse these types of frames. Since the "Protocols in frame" is given as Feedback greatly appreciated, bit strapped for time at the moment, but do you think this is do-able and is there anything I should bear in mind when tackling this? |
Hi, this could be some kind of stupid mistake on my part, I'm fairly new to pcap stuff, so I hesitate to file an issue, but as far as I can tell I'm doing everything correctly.
I used Wireshark (Version 2.6.4 (v2.6.4-0-g29d48ec8)) to capture some UDP packets and saved them as "Wireshark/tcpdump/... - pcap". When I tried to read them using pkts, all of the packets return 'pcap' from getProtocol(). Loading them in tcpdump shows them as UDP packets.
Code, sample pcap file, and some screenshots, attached below.
AppPkts2.java.txt
jmavsim_px4_commander_startup2.pcap.gz
The text was updated successfully, but these errors were encountered: