Skip to content

Commit

Permalink
Add todos for tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
goodhoko committed Sep 15, 2024
1 parent 3ee6686 commit f60a3b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/pcap_probe/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ fn main() -> Result<()> {
.open()
.expect("can open the device for capture");

// TODO: consider batching
while let Ok(cap) = capture.next_packet() {
let ts = Duration::new(
cap.header.ts.tv_sec.unsigned_abs(),
// One microsecond is 1000 nanoseconds.
cap.header.ts.tv_usec.unsigned_abs() * 1000,

Check failure on line 44 in crates/pcap_probe/src/main.rs

View workflow job for this annotation

GitHub Actions / Run Tests

mismatched types

Check failure on line 44 in crates/pcap_probe/src/main.rs

View workflow job for this annotation

GitHub Actions / Run Clippy

mismatched types
);

// TODO: use size of the packet to vary the event "strength"
let event = Event::with_timestamp(EventKind::TestTick, ts);

if let Err(err) = client.send(&Packet::from_event(event)) {
Expand Down

0 comments on commit f60a3b8

Please sign in to comment.