4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since 4e194bc was
4e194bc,
checked in by Daniel Lawson <dlawson@…>, 18 years ago
|
adding python binding stuff
|
-
Property mode set to
100755
|
File size:
281 bytes
|
Rev | Line | |
---|
[4e194bc] | 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 | packet = trace.read_packet() |
---|
| 10 | |
---|
| 11 | print "packet=",packet |
---|
| 12 | |
---|
| 13 | while 1: |
---|
| 14 | packet = trace.read_packet() |
---|
| 15 | if not packet: |
---|
| 16 | break |
---|
| 17 | print packet.get_ip().ip_src,'->',packet.get_ip().ip_dst |
---|
| 18 | |
---|
Note: See
TracBrowser
for help on using the repository browser.