Hello! Every time packet match program throws exception. For example, filter all icmp:
`public static void main(String[] args) {
WinDivert w = new WinDivert("icmp");
try {
w.open(); // packets will be captured from now on
int i = 0;
while (i<10) {
Packet packet = w.recv(); // read a single packet
System.out.println(packet);
w.send(packet); // re-inject the packet into the network stack
i++;
}
w.close(); // stop capturing packets
} catch (WinDivertException e) {
e.printStackTrace();
}
}`
WinDivertException{code=3, message='null'}
at com.github.ffalcinelli.jdivert.exceptions.WinDivertException.throwExceptionOnGetLastError(WinDivertException.java:57)
at com.github.ffalcinelli.jdivert.Packet.recalculateChecksum(Packet.java:359)
at com.github.ffalcinelli.jdivert.WinDivert.send(WinDivert.java:271)
at com.github.ffalcinelli.jdivert.WinDivert.send(WinDivert.java:234)
Always.
Run as admin.
Why I receive error on recalculateChecksum every time?
Hello! Every time packet match program throws exception. For example, filter all icmp: `public static void main(String[] args) { WinDivert w = new WinDivert("icmp");
First packet printed:
Packet {IPv4 {version=4, srcAddr=127.0.0.1, dstAddr=127.0.0.1, IHL=5, DSCP=0, ECN=0, length=60, ID=b7d3 RESERVED=false, DF=false, MF=false, fragOff=0 TTL=128 proto=ICMP, cksum=84eb}, ICMPv4 {type=8, code=0, cksum=4d4a, restOfHdr=00010011}, direction=OUTBOUND, iface=[0, 0], raw=4500003CB7D30000800184EB7F0000017F00000108004D4A000100116162636465666768696A6B6C6D6E6F7071727374757677616263646566676869}
And on w.send(packet) get an exception:
Always. Run as admin.
Why I receive error on recalculateChecksum every time?