Mercurial > stress-tester
changeset 1286:356c10f8b486
PcapSessionEventSource uses packet.code
author | Devel 2 |
---|---|
date | Fri, 10 Jul 2020 09:47:58 +0200 |
parents | 1c53cc761dcd |
children | c04b5c168a9c |
files | stress-tester/src/main/java/com/passus/st/source/PcapSessionEventSource.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/source/PcapSessionEventSource.java Fri Jul 10 08:38:17 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/source/PcapSessionEventSource.java Fri Jul 10 09:47:58 2020 +0200 @@ -438,8 +438,8 @@ if (frameDecoder.decode(frame) != FrameDecoder.RES_ERROR) { Packet packet = frameDecoder.getResult(); if (packet != null) { - if (Ethernet.NAME.equals(packet.getName())) { - Ip4 ip = (Ip4) packet.findDown(Ip4.NAME); + if (packet.getCode() == Ethernet.CODE) { + Ip4 ip = (Ip4) packet.findDown(Ip4.CODE); if (ip != null) { long timestamp = ip.getFrame().getTimestamp(); timestamp += loopCorrection;