Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dpkt.pcap.Writer bug #26

Closed
GoogleCodeExporter opened this issue May 5, 2015 · 1 comment
Closed

dpkt.pcap.Writer bug #26

GoogleCodeExporter opened this issue May 5, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. use dpkt.pcap.Reader to read a pcap file
2. use dpkt.pcap.Writer to write it in a new file

What is the expected output? What do you see instead?
The expected output is a positive microsecond number instead a negative
number is stored. 

What version of the product are you using? On what operating system?
Latest stable version of dpkt, on Ubuntu 9.04

Please provide any additional information below.
Small issue. It can be easily fixed by interchanging the two numbers. 
Instead of 
pcap.py:81:tv_usec=int((int(ts) - float(ts)) * 1000000.0),
use        tv_usec=int((float(ts) - int(ts)) * 1000000.0);

Original issue reported on code.google.com by rayvince...@gmail.com on 15 Oct 2009 at 11:37

@GoogleCodeExporter
Copy link
Author

This was fixed a while back in r25:

http://code.google.com/p/dpkt/source/detail?r=26&path=/trunk/dpkt/pcap.py

I'd recommend using SVN until we cut a new release.

Original comment by jon.ober...@gmail.com on 24 Mar 2010 at 3:00

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant