Patch for reading PCAP files writed on device with different endianess#17
Patch for reading PCAP files writed on device with different endianess#17Finikssky wants to merge 1 commit intojemcek:masterfrom
Conversation
|
do you have an examle of such a pcap file, that I could make some tests with the patch? |
|
https://yadi.sk/d/EvIc_dzMrOaXLg - simple arp request in BE
I create arp_req_le.pcap with packETH on my PC, than i send this pcap from BE device and dump it with tcpdump on device. We can see if we open BE pcap on LE PC - packETH say that there is incorrect format, and if we open LE pcap on BE device - too. Patch fix it by check request header and convert it in host endianess. |
If pcap file was harvested on device with different endianess (like MIPS BE router), reading pcap header was incorrect. This patch fix it.