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

animation module fails with KeyError: 'twh-delay' #15

Open
mbaldessari opened this issue Nov 10, 2013 · 0 comments
Open

animation module fails with KeyError: 'twh-delay' #15

mbaldessari opened this issue Nov 10, 2013 · 0 comments

Comments

@mbaldessari
Copy link
Contributor

./captcp.py animation test.pcap -f 13.1 --output-dir foo
# captcp 2010-2013 Hagen Paul Pfeifer (c)             
# http://research.protocollabs.com/captcp/            
# connection: 13 (local flow: 1, remote flow: 2)      
Traceback (most recent call last):                    
  File "./captcp.py", line 5210, in <module>          
    sys.exit(captcp.run())                            
  File "./captcp.py", line 5191, in run               
    pcap_parser.run()                                 
  File "./captcp.py", line 562, in run                
    self.callback(dt, packet.data)                    
  File "./captcp.py", line 4360, in process_packet    
    self.process_local_side(ts, packet, tpi)          
  File "./captcp.py", line 4302, in process_local_side                   
    (td, len(packet) / 2, self.rtt_data["twh-delay"] / self.acceleration))
KeyError: 'twh-delay'                                         
hgn pushed a commit that referenced this issue Nov 13, 2013
… no SYN packets

Using 'animation' with a flow that has no SYN packets gives the
following backtrace:
Traceback (most recent call last):
  File "./captcp.py", line 5210, in <module>
    sys.exit(captcp.run())
  File "./captcp.py", line 5191, in run
    pcap_parser.run()
  File "./captcp.py", line 562, in run
    self.callback(dt, packet.data)
  File "./captcp.py", line 4360, in process_packet
    self.process_local_side(ts, packet, tpi)
  File "./captcp.py", line 4302, in process_local_side
    (td, len(packet) / 2, self.rtt_data["twh-delay"] /
self.acceleration))
KeyError: 'twh-delay'

Error out properly in such conditions.
Slightly simplify calc_rtt while we're at it

Fixes Issue #15 - #15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant