hgn/captcp — pull request #6 by fixje (2013-04-22 15:49:30+00:00)
Title: Fix to analyze IPv6 traffic (Unix only)

This fix provides a support for analyzing traces with IPv6 packets.
It will solve the problem for Unix platforms only, because
socket.inet_ntop is not available on other platforms acording to the
documentation.

This is what I got for a trace with IPv6 traffic only:
$ captcp statistic youtube-20130422-03-filtered.pcap
I experienced the following exception:
Traceback (most recent call last):
File "/usr/bin/captcp", line 4290, in
sys.exit(captcp.run())
File "/usr/bin/captcp", line 4261, in run
pcap_parser.run()
File "/usr/bin/captcp", line 552, in run
self.callback(dt, packet.data)
File "/usr/bin/captcp", line 826, in internal_pre_process_packet
self.cc.update(ts, packet)
File "/usr/bin/captcp", line 2459, in update
c = Connection(packet)
File "/usr/bin/captcp", line 2264, in __init__
TcpConn.__init__(self, packet)
File "/usr/bin/captcp", line 2155, in __init__
self.sip = Converter.dpkt_addr_to_string(ip.src)
File "/usr/bin/captcp", line 480, in dpkt_addr_to_string
iaddr = int(struct.unpack('I', addr)[0])
struct.error: unpack requires a string argument of length 4