Skip to content

Commit

Permalink
Merge pull request #18 from compscidr/jason/timestamps
Browse files Browse the repository at this point in the history
Added timestamps to the epbs
  • Loading branch information
compscidr authored Sep 1, 2024
2 parents da0233f + 8c92588 commit 644ac09
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 644ac09

Please sign in to comment.