Skip to content

Commit

Permalink
pcapwriter: workaround for greather-than-32-bit timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
peremen committed May 30, 2024
1 parent 8b73bd4 commit 6f397e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scat/writers/pcapwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __enter__(self):

def write_pkt(self, sock_content, port, radio_id=0, ts=datetime.datetime.now()):
pcap_hdr = struct.pack('<LLLL',
int(ts.timestamp()),
int(ts.timestamp()) % 4294967296,
ts.microsecond,
len(sock_content) + 8 + 20 + 14,
len(sock_content) + 8 + 20 + 14,
Expand Down

0 comments on commit 6f397e4

Please sign in to comment.