source: swig/python/check.py @ 4e194bc

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@…>, 17 years ago

adding python binding stuff

  • Property mode set to 100755
File size: 281 bytes
Line 
1#!/usr/bin/python
2import libtrace
3import sys
4
5trace = libtrace.Trace(sys.argv[1])
6
7print "trace=",trace
8
9packet = trace.read_packet()
10
11print "packet=",packet
12
13while 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.