4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since 2d96bf2 was
d5e7d91,
checked in by Daniel Lawson <dlawson@…>, 18 years ago
|
changes in check.py
|
-
Property mode set to
100755
|
File size:
571 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 | |
---|
14 | filter = libtrace.Filter("tcp") |
---|
15 | |
---|
16 | while 1: |
---|
17 | trace.trace_read_packet(packet) |
---|
18 | if not packet: |
---|
19 | break |
---|
20 | |
---|
21 | ippacket = packet.trace_get_ip() |
---|
22 | if not ippacket: |
---|
23 | continue |
---|
24 | |
---|
25 | count += 1 |
---|
26 | if count % 10000 == 0: |
---|
27 | print count |
---|
28 | |
---|
29 | #tcppacket = packet.trace_get_tcp() |
---|
30 | #if not tcppacket: |
---|
31 | # continue |
---|
32 | |
---|
33 | #if not packet.trace_bpf_filter(filter): |
---|
34 | # continue |
---|
35 | |
---|
36 | #print ippacket.ip_src,':',tcppacket.source,'->',ippacket.ip_dst,':',tcppacket.dest |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.