Skip to content

Commit

Permalink
Added timestamps to the epbs
Browse files Browse the repository at this point in the history
  • Loading branch information
compscidr committed Sep 1, 2024
1 parent 68c519f commit 8c92588
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class PcapNgFilePacketDumper(
outputStreamWriter.write(packetBlock.toBytes())
outputStreamWriter.flush()
} else {
// todo: timestamp
val packetBlock = PcapNgEnhancedPacketBlock(conversionBuffer.array())
val timestamp = System.currentTimeMillis()
val packetBlock = PcapNgEnhancedPacketBlock(conversionBuffer.array(), timestamp = timestamp)
outputStreamWriter.write(packetBlock.toBytes())
outputStreamWriter.flush()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ class PcapNgTcpServerPacketDumper(
if (isSimple) {
PcapNgSimplePacketBlock(conversionBuffer.array())
} else {
// todo: timestamp
PcapNgEnhancedPacketBlock(conversionBuffer.array())
val timestamp = System.currentTimeMillis()
PcapNgEnhancedPacketBlock(conversionBuffer.array(), timestamp = timestamp)
}
buffer.position(startingPosition)
buffer.limit(originalLimit)
Expand Down

0 comments on commit 8c92588

Please sign in to comment.