0

Is it possible to check if my PCAP file contain Bad CheckSum using PcapDotNet ? Of course i want to check IP, TCP and UDP layers. Currently i only can check if the packet is valid (the packet valid unless an invalid part was found: bad checksum, illegal field value, packet too short...) Also i can get the Checksum value (ushort value):

Packet packet;
ushort ipChecksum = packet.Ethernet.IpV4.HeaderChecksum;
ushort tcpChecksum = packet.Ethernet.IpV4.Tcp.Checksum;
ushort udpChecksum = packet.Ethernet.IpV4.Udp.Checksum;

is it possible to verify it's valid value ?

miki wess
  • 3
  • 6

1 Answers1

0

Quoting https://pcapdotnet.codeplex.com/discussions/576637:

IpV4Datagram has IsHeaderChecksumCorrect property.

IpDatagram (base class for IpV4Datagram and IpV6Datagram) has IsTransportChecksumCorrect, which checks either UDP or TCP checksums.

brickner
  • 6,595
  • 3
  • 41
  • 54