Changeset 6f34090 for swig/python


Ignore:
Timestamp:
09/21/04 15:18:19 (17 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
f2794ea
Parents:
77ba31d
Message:

updated for new api

Location:
swig/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • swig/python/check.py

    r77ba31d r6f34090  
    1010packet = libtrace.Packet()
    1111
     12count = 0
    1213while 1:
    1314        trace.trace_read_packet(packet)
    1415        if not packet:
    1516                break
    16         #ippacket = packet.trace_get_ip()
    17         #if not ippacket:
    18 #               continue
     17        ippacket = packet.trace_get_ip()
     18        if not ippacket:
     19                continue
    1920
    20         print packet.size
    21         #print ippacket.ip_src,'->',ippacket.ip_dst
     21        count += 1
     22        if count % 10000 == 0:
     23                print count
     24        #print packet.size
     25#       print ippacket.ip_src,'->',ippacket.ip_dst
    2226
  • swig/python/libtrace.py

    r77ba31d r6f34090  
    8585    __swig_getmethods__["ip_dst"] = _libtrace.libtrace_ip_ip_dst_get
    8686    if _newclass:ip_dst = property(_libtrace.libtrace_ip_ip_dst_get)
    87     def __del__(self, destroy=_libtrace.delete_libtrace_ip):
    88         try:
    89             if self.thisown: destroy(self)
    90         except: pass
    9187
    9288class libtrace_ipPtr(libtrace_ip):
     
    150146    __swig_getmethods__["ack_seq"] = _libtrace.libtrace_tcp_ack_seq_get
    151147    if _newclass:ack_seq = property(_libtrace.libtrace_tcp_ack_seq_get)
    152     def __del__(self, destroy=_libtrace.delete_libtrace_tcp):
    153         try:
    154             if self.thisown: destroy(self)
    155         except: pass
    156148
    157149class libtrace_tcpPtr(libtrace_tcp):
     
    178170    __swig_getmethods__["check"] = _libtrace.libtrace_udp_check_get
    179171    if _newclass:check = property(_libtrace.libtrace_udp_check_get)
    180     def __del__(self, destroy=_libtrace.delete_libtrace_udp):
    181         try:
    182             if self.thisown: destroy(self)
    183         except: pass
    184172
    185173class libtrace_udpPtr(libtrace_udp):
     
    209197    __swig_getmethods__["un"] = _libtrace.libtrace_icmp_un_get
    210198    if _newclass:un = property(_libtrace.libtrace_icmp_un_get)
    211     def __del__(self, destroy=_libtrace.delete_libtrace_icmp):
    212         try:
    213             if self.thisown: destroy(self)
    214         except: pass
    215199
    216200class libtrace_icmpPtr(libtrace_icmp):
     
    295279    def __repr__(self):
    296280        return "<C libtrace_packet_t instance at %s>" % (self.this,)
    297     __swig_setmethods__["trace"] = _libtrace.Packet_trace_set
    298     __swig_getmethods__["trace"] = _libtrace.Packet_trace_get
    299     if _newclass:trace = property(_libtrace.Packet_trace_get, _libtrace.Packet_trace_set)
    300     __swig_setmethods__["buffer"] = _libtrace.Packet_buffer_set
    301     __swig_getmethods__["buffer"] = _libtrace.Packet_buffer_get
    302     if _newclass:buffer = property(_libtrace.Packet_buffer_get, _libtrace.Packet_buffer_set)
    303     __swig_setmethods__["size"] = _libtrace.Packet_size_set
    304     __swig_getmethods__["size"] = _libtrace.Packet_size_get
    305     if _newclass:size = property(_libtrace.Packet_size_get, _libtrace.Packet_size_set)
    306     __swig_setmethods__["status"] = _libtrace.Packet_status_set
    307     __swig_getmethods__["status"] = _libtrace.Packet_status_get
    308     if _newclass:status = property(_libtrace.Packet_status_get, _libtrace.Packet_status_set)
    309281    def __init__(self, *args):
    310282        _swig_setattr(self, Packet, 'this', _libtrace.new_Packet(*args))
Note: See TracChangeset for help on using the changeset viewer.