source: swig/python/check.py @ 6f34090

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 6f34090 was 6f34090, checked in by Daniel Lawson <dlawson@…>, 17 years ago

updated for new api

  • Property mode set to 100755
File size: 390 bytes
Line 
1#!/usr/bin/python
2import libtrace
3import sys
4
5trace = libtrace.Trace(sys.argv[1])
6
7print "trace=",trace
8
9
10packet = libtrace.Packet()
11
12count = 0
13while 1:
14        trace.trace_read_packet(packet)
15        if not packet:
16                break
17        ippacket = packet.trace_get_ip()
18        if not ippacket:
19                continue
20
21        count += 1
22        if count % 10000 == 0:
23                print count
24        #print packet.size
25#       print ippacket.ip_src,'->',ippacket.ip_dst
26
Note: See TracBrowser for help on using the repository browser.