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@…>, 18 years ago
|
updated for new api
|
-
Property mode set to
100755
|
File size:
390 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | import libtrace |
---|
3 | import sys |
---|
4 | |
---|
5 | trace = libtrace.Trace(sys.argv[1]) |
---|
6 | |
---|
7 | print "trace=",trace |
---|
8 | |
---|
9 | |
---|
10 | packet = libtrace.Packet() |
---|
11 | |
---|
12 | count = 0 |
---|
13 | while 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.