-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
i use tcpdump to get a tcp package,and then save a cap file,
but i use gopacket parsing this cap file,following error occurs:
"Packet decoding error: Unable to decode LinkType 20"
my code:
handle, err = pcap.OpenOffline(capFile)
packetSource := gopacket.NewPacketSource(handle, handle.LinkType())
//go print_counter()
for packet := range packetSource.Packets() {
fmt.Println(packet) //Packet decoding error: Unable to decode LinkType 20
printPacketInfo(packet)
}
... ...
tcpLayer := packet.Layer(layers.LayerTypeTCP) //Causes an error here ,is null
Metadata
Metadata
Assignees
Labels
No labels