When the packet length is greater than the IP expected length, the padding data at the end of the frame will be trimmed.

This commit is contained in:
luwenpeng
2024-05-24 19:10:33 +08:00
parent 94fc1af6bd
commit 54385ed08b
6 changed files with 264 additions and 45 deletions

View File

@@ -6,7 +6,7 @@ static void packet_handler(u_char *user, const struct pcap_pkthdr *h, const u_ch
{
struct packet pkt;
packet_parse(&pkt, (const char *)bytes, h->caplen);
packet_print(&pkt);
packet_print_table(&pkt);
}
static void usage(char *cmd)