I have a packet capture captured through a special switch that appends timestamps just before FCS. These are generally referred as "trailer timestamps".
However, after doing so, the FCS
at the end of the packet is not updated. Hence, when i load the packet capture into wireshark, all the packets are reported as having incorrect frame check sequence.
Is there a utility like editcap
etc.. that i can use to remove, say, last x
bytes of each packet from a pcap
?
Yes,
editcap
can remove the lastx
bytes of each packet. From theeditcap
man page:Example: Remove the last 4 bytes of each packet
Of course doing this will then result in each packet being indicated with:
... which is of course a misleading message as the Ethertype isn't truncated, just the Ethernet frame as the FCS has been removed in this case. Nonetheless, this is a rather harmless indication and so this solution may fit your needs.
Alternatively, you could more simply just disable Ethernet checksum validation. Do this via
Edit -> Preferences -> Protocols -> Ethernet -> Validate the Ethernet checksum if possible:deslect -> OK
.