Skip to content

Commit

Permalink
pxpcap: Fix wire size / cap size mixup
Browse files Browse the repository at this point in the history
These were reversed.  Fixed.
  • Loading branch information
MurphyMc committed Apr 12, 2013
1 parent 53b0114 commit 7b95125
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pox/lib/pxpcap/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
It's not great, but does the job for now.
"""

#TODO:
# Swap names for _sec and _time?
# Add usec to the datetime one?

from datetime import datetime
from struct import unpack_from

Expand Down Expand Up @@ -69,7 +73,7 @@ def _proc_global_header (self):

def _proc_header (self):
if len(self._buf) < 16: return
self._sec_raw,self._usec,self._wire_size,self._cap_size \
self._sec_raw,self._usec,self._cap_size, self._wire_size \
= self._unpack("LLLL", self._buf[:16])
self._buf = self._buf[16:]
self._proc = self._proc_packet
Expand Down

0 comments on commit 7b95125

Please sign in to comment.