Changeset 6f34090 for swig


Ignore:
Timestamp:
09/21/04 15:18:19 (16 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
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • swig/Makefile

    r77ba31d r6f34090  
    1 CFLAGS=-g -Wall -I/usr/include/python2.1 -I../include -I /usr/lib/perl/5.8.4/CORE/
     1CFLAGS=-g -Wall -I/usr/include/python2.1 -I../include -I /usr/lib/perl/5.6.1/CORE/
    22LDDIRS=-L../lib
    33LDLIBS=-ltrace -lpcap -lz
  • swig/libtrace.i

    r77ba31d r6f34090  
    44#include "libtrace.h"
    55%}
     6%include "carrays.i"
     7%include "cmalloc.i"
    68
    79%nodefault;
     
    1416};
    1517
    16 %rename (libtrace_ip) IP;
    1718struct libtrace_ip
    1819  {
     
    3334    const uint16_t ip_off;              /**< fragment offset field */
    3435    // Needs ntoha
     36    %newobject ip_src;
     37    %newobject ip_dst;
    3538    const char *const ip_src;
    3639    const char *const ip_dst;
     
    3841  };
    3942
    40 %extend libtrace_ip {
    41         ~libtrace_ip() { free(self); }
    42 }
     43
     44
    4345
    4446%{
     
    9092};
    9193
    92 %extend libtrace_tcp {
    93         ~libtrace_tcp() { free(self); }
    94 }
    95 
    9694%{
    9795 MAKE_NTOHS(libtrace_tcp,source)
     
    115113  }
    116114};
    117 
    118 %extend libtrace_udp {
    119         ~libtrace_udp() { free(self); }
    120 }
    121115
    122116%{
     
    148142};
    149143
    150 %extend libtrace_icmp {
    151         ~libtrace_icmp() { free(self); }
    152 }
    153 
    154144%rename (Packet) libtrace_packet_t;
    155 struct libtrace_packet_t
    156 {
    157         struct libtrace_t *trace;
    158         char *buffer;
    159         size_t size;
    160         uint8_t status;
    161 };
     145struct libtrace_packet_t {};
    162146
    163147%extend libtrace_packet_t {
    164148        libtrace_packet_t() {
    165                 struct libtrace_packet_t *packet = 0;
    166                 packet = malloc(sizeof(struct libtrace_packet_t));
    167                 packet->buffer = malloc(sizeof(char) * 65536);
     149                struct libtrace_packet_t *packet = malloc(sizeof(struct libtrace_packet_t));
    168150                return packet;
    169151                }
    170         ~libtrace_packet_t() { free(self->buffer); free(self);}
     152        ~libtrace_packet_t() { free(self);}
    171153        struct libtrace_ip *trace_get_ip() {
    172154                return trace_get_ip(self);
  • swig/libtrace_wrap.c

    r77ba31d r6f34090  
    691691#define  SWIGTYPE_p_libtrace_icmp_un_frag swig_types[5]
    692692#define  SWIGTYPE_p_libtrace_t swig_types[6]
    693 #define  SWIGTYPE_p_size_t swig_types[7]
    694 #define  SWIGTYPE_p_libtrace_udp swig_types[8]
    695 #define  SWIGTYPE_p_libtrace_tcp swig_types[9]
    696 #define  SWIGTYPE_p_libtrace_icmp_un swig_types[10]
    697 static swig_type_info *swig_types[12];
     693#define  SWIGTYPE_p_libtrace_udp swig_types[7]
     694#define  SWIGTYPE_p_libtrace_tcp swig_types[8]
     695#define  SWIGTYPE_p_libtrace_icmp_un swig_types[9]
     696static swig_type_info *swig_types[11];
    698697
    699698/* -------- TYPES TABLE (END) -------- */
     
    710709#include "libtrace.h"
    711710
    712 void delete_libtrace_ip(struct libtrace_ip *self){ free(self); }
     711
     712#include <stdlib.h>
     713
    713714
    714715#define MAKE_NTOHS(class,member) \
     
    733734            }
    734735
    735 void delete_libtrace_tcp(struct libtrace_tcp *self){ free(self); }
    736736
    737737 MAKE_NTOHS(libtrace_tcp,source)
     
    744744 MAKE_NTOHL(libtrace_tcp,ack_seq)
    745745
    746 void delete_libtrace_udp(struct libtrace_udp *self){ free(self); }
    747746
    748747 MAKE_NTOHS(libtrace_udp,source)
     
    765764
    766765
    767 void delete_libtrace_icmp(struct libtrace_icmp *self){ free(self); }
    768766
    769767typedef struct {
     
    781779
    782780struct libtrace_packet_t *new_libtrace_packet_t(){
    783                 struct libtrace_packet_t *packet = 0;
    784                 packet = malloc(sizeof(struct libtrace_packet_t));
    785                 packet->buffer = malloc(sizeof(char) * 65536);
     781                struct libtrace_packet_t *packet = malloc(sizeof(struct libtrace_packet_t));
    786782                return packet;
    787783                }
    788 void delete_libtrace_packet_t(struct libtrace_packet_t *self){ free(self->buffer); free(self);}
     784void delete_libtrace_packet_t(struct libtrace_packet_t *self){ free(self);}
    789785struct libtrace_ip *libtrace_packet_t_trace_get_ip(struct libtrace_packet_t *self){
    790786                return trace_get_ip(self);
     
    11151111   
    11161112    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
     1113    free(result);
    11171114    return resultobj;
    11181115    fail:
     
    11321129   
    11331130    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    1134     return resultobj;
    1135     fail:
    1136     return NULL;
    1137 }
    1138 
    1139 
    1140 static PyObject *_wrap_delete_libtrace_ip(PyObject *self, PyObject *args) {
    1141     PyObject *resultobj;
    1142     struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    1143     PyObject * obj0 = 0 ;
    1144    
    1145     if(!PyArg_ParseTuple(args,(char *)"O:delete_libtrace_ip",&obj0)) goto fail;
    1146     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    1147     delete_libtrace_ip(arg1);
    1148    
    1149     Py_INCREF(Py_None); resultobj = Py_None;
     1131    free(result);
    11501132    return resultobj;
    11511133    fail:
     
    16131595
    16141596
    1615 static PyObject *_wrap_delete_libtrace_tcp(PyObject *self, PyObject *args) {
    1616     PyObject *resultobj;
    1617     struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    1618     PyObject * obj0 = 0 ;
    1619    
    1620     if(!PyArg_ParseTuple(args,(char *)"O:delete_libtrace_tcp",&obj0)) goto fail;
    1621     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    1622     delete_libtrace_tcp(arg1);
    1623    
    1624     Py_INCREF(Py_None); resultobj = Py_None;
    1625     return resultobj;
    1626     fail:
    1627     return NULL;
    1628 }
    1629 
    1630 
    16311597static PyObject * libtrace_tcp_swigregister(PyObject *self, PyObject *args) {
    16321598    PyObject *obj;
     
    17041670
    17051671
    1706 static PyObject *_wrap_delete_libtrace_udp(PyObject *self, PyObject *args) {
    1707     PyObject *resultobj;
    1708     struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ;
    1709     PyObject * obj0 = 0 ;
    1710    
    1711     if(!PyArg_ParseTuple(args,(char *)"O:delete_libtrace_udp",&obj0)) goto fail;
    1712     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_udp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    1713     delete_libtrace_udp(arg1);
    1714    
    1715     Py_INCREF(Py_None); resultobj = Py_None;
    1716     return resultobj;
    1717     fail:
    1718     return NULL;
    1719 }
    1720 
    1721 
    17221672static PyObject * libtrace_udp_swigregister(PyObject *self, PyObject *args) {
    17231673    PyObject *obj;
     
    18551805
    18561806
    1857 static PyObject *_wrap_delete_libtrace_icmp(PyObject *self, PyObject *args) {
    1858     PyObject *resultobj;
    1859     struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    1860     PyObject * obj0 = 0 ;
    1861    
    1862     if(!PyArg_ParseTuple(args,(char *)"O:delete_libtrace_icmp",&obj0)) goto fail;
    1863     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    1864     delete_libtrace_icmp(arg1);
    1865    
    1866     Py_INCREF(Py_None); resultobj = Py_None;
    1867     return resultobj;
    1868     fail:
    1869     return NULL;
    1870 }
    1871 
    1872 
    18731807static PyObject * libtrace_icmp_swigregister(PyObject *self, PyObject *args) {
    18741808    PyObject *obj;
     
    21182052    return Py_BuildValue((char *)"");
    21192053}
    2120 static PyObject *_wrap_Packet_trace_set(PyObject *self, PyObject *args) {
    2121     PyObject *resultobj;
    2122     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2123     struct libtrace_t *arg2 = (struct libtrace_t *) 0 ;
    2124     PyObject * obj0 = 0 ;
    2125     PyObject * obj1 = 0 ;
    2126    
    2127     if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_set",&obj0,&obj1)) goto fail;
    2128     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2129     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_libtrace_t,SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN )) == -1) SWIG_fail;
    2130     if (arg1) (arg1)->trace = arg2;
    2131    
    2132     Py_INCREF(Py_None); resultobj = Py_None;
    2133     return resultobj;
    2134     fail:
    2135     return NULL;
    2136 }
    2137 
    2138 
    2139 static PyObject *_wrap_Packet_trace_get(PyObject *self, PyObject *args) {
    2140     PyObject *resultobj;
    2141     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2142     struct libtrace_t *result;
    2143     PyObject * obj0 = 0 ;
    2144    
    2145     if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get",&obj0)) goto fail;
    2146     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2147     result = (struct libtrace_t *) ((arg1)->trace);
    2148    
    2149     resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_t, 0);
    2150     return resultobj;
    2151     fail:
    2152     return NULL;
    2153 }
    2154 
    2155 
    2156 static PyObject *_wrap_Packet_buffer_set(PyObject *self, PyObject *args) {
    2157     PyObject *resultobj;
    2158     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2159     char *arg2 ;
    2160     PyObject * obj0 = 0 ;
    2161    
    2162     if(!PyArg_ParseTuple(args,(char *)"Os:Packet_buffer_set",&obj0,&arg2)) goto fail;
    2163     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2164     {
    2165         if (arg1->buffer) free((char*)arg1->buffer);
    2166         if (arg2) {
    2167             arg1->buffer = (char *) malloc(strlen(arg2)+1);
    2168             strcpy((char*)arg1->buffer,arg2);
    2169         } else {
    2170             arg1->buffer = 0;
    2171         }
    2172     }
    2173     Py_INCREF(Py_None); resultobj = Py_None;
    2174     return resultobj;
    2175     fail:
    2176     return NULL;
    2177 }
    2178 
    2179 
    2180 static PyObject *_wrap_Packet_buffer_get(PyObject *self, PyObject *args) {
    2181     PyObject *resultobj;
    2182     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2183     char *result;
    2184     PyObject * obj0 = 0 ;
    2185    
    2186     if(!PyArg_ParseTuple(args,(char *)"O:Packet_buffer_get",&obj0)) goto fail;
    2187     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2188     result = (char *) ((arg1)->buffer);
    2189    
    2190     resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    2191     return resultobj;
    2192     fail:
    2193     return NULL;
    2194 }
    2195 
    2196 
    2197 static PyObject *_wrap_Packet_size_set(PyObject *self, PyObject *args) {
    2198     PyObject *resultobj;
    2199     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2200     size_t arg2 ;
    2201     PyObject * obj0 = 0 ;
    2202     PyObject * obj1 = 0 ;
    2203    
    2204     if(!PyArg_ParseTuple(args,(char *)"OO:Packet_size_set",&obj0,&obj1)) goto fail;
    2205     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2206     arg2 = (size_t) PyInt_AsLong(obj1);
    2207     if (PyErr_Occurred()) SWIG_fail;
    2208     if (arg1) (arg1)->size = arg2;
    2209    
    2210     Py_INCREF(Py_None); resultobj = Py_None;
    2211     return resultobj;
    2212     fail:
    2213     return NULL;
    2214 }
    2215 
    2216 
    2217 static PyObject *_wrap_Packet_size_get(PyObject *self, PyObject *args) {
    2218     PyObject *resultobj;
    2219     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2220     size_t result;
    2221     PyObject * obj0 = 0 ;
    2222    
    2223     if(!PyArg_ParseTuple(args,(char *)"O:Packet_size_get",&obj0)) goto fail;
    2224     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2225     result =  ((arg1)->size);
    2226    
    2227     resultobj = PyInt_FromLong((long)result);
    2228     return resultobj;
    2229     fail:
    2230     return NULL;
    2231 }
    2232 
    2233 
    2234 static PyObject *_wrap_Packet_status_set(PyObject *self, PyObject *args) {
    2235     PyObject *resultobj;
    2236     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2237     uint8_t arg2 ;
    2238     PyObject * obj0 = 0 ;
    2239     PyObject * obj1 = 0 ;
    2240    
    2241     if(!PyArg_ParseTuple(args,(char *)"OO:Packet_status_set",&obj0,&obj1)) goto fail;
    2242     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2243     arg2 = (uint8_t) PyInt_AsLong(obj1);
    2244     if (PyErr_Occurred()) SWIG_fail;
    2245     if (arg1) (arg1)->status = arg2;
    2246    
    2247     Py_INCREF(Py_None); resultobj = Py_None;
    2248     return resultobj;
    2249     fail:
    2250     return NULL;
    2251 }
    2252 
    2253 
    2254 static PyObject *_wrap_Packet_status_get(PyObject *self, PyObject *args) {
    2255     PyObject *resultobj;
    2256     struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2257     uint8_t result;
    2258     PyObject * obj0 = 0 ;
    2259    
    2260     if(!PyArg_ParseTuple(args,(char *)"O:Packet_status_get",&obj0)) goto fail;
    2261     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    2262     result = (uint8_t) ((arg1)->status);
    2263    
    2264     resultobj = PyInt_FromLong((long)result);
    2265     return resultobj;
    2266     fail:
    2267     return NULL;
    2268 }
    2269 
    2270 
    22712054static PyObject *_wrap_new_Packet(PyObject *self, PyObject *args) {
    22722055    PyObject *resultobj;
     
    24692252         { (char *)"libtrace_ip_ip_src_get", _wrap_libtrace_ip_ip_src_get, METH_VARARGS },
    24702253         { (char *)"libtrace_ip_ip_dst_get", _wrap_libtrace_ip_ip_dst_get, METH_VARARGS },
    2471          { (char *)"delete_libtrace_ip", _wrap_delete_libtrace_ip, METH_VARARGS },
    24722254         { (char *)"libtrace_ip_swigregister", libtrace_ip_swigregister, METH_VARARGS },
    24732255         { (char *)"libtrace_tcp_res1_set", _wrap_libtrace_tcp_res1_set, METH_VARARGS },
     
    24962278         { (char *)"libtrace_tcp_seq_get", _wrap_libtrace_tcp_seq_get, METH_VARARGS },
    24972279         { (char *)"libtrace_tcp_ack_seq_get", _wrap_libtrace_tcp_ack_seq_get, METH_VARARGS },
    2498          { (char *)"delete_libtrace_tcp", _wrap_delete_libtrace_tcp, METH_VARARGS },
    24992280         { (char *)"libtrace_tcp_swigregister", libtrace_tcp_swigregister, METH_VARARGS },
    25002281         { (char *)"libtrace_udp_source_get", _wrap_libtrace_udp_source_get, METH_VARARGS },
     
    25022283         { (char *)"libtrace_udp_len_get", _wrap_libtrace_udp_len_get, METH_VARARGS },
    25032284         { (char *)"libtrace_udp_check_get", _wrap_libtrace_udp_check_get, METH_VARARGS },
    2504          { (char *)"delete_libtrace_udp", _wrap_delete_libtrace_udp, METH_VARARGS },
    25052285         { (char *)"libtrace_udp_swigregister", libtrace_udp_swigregister, METH_VARARGS },
    25062286         { (char *)"libtrace_icmp_type_set", _wrap_libtrace_icmp_type_set, METH_VARARGS },
     
    25112291         { (char *)"libtrace_icmp_checksum_get", _wrap_libtrace_icmp_checksum_get, METH_VARARGS },
    25122292         { (char *)"libtrace_icmp_un_get", _wrap_libtrace_icmp_un_get, METH_VARARGS },
    2513          { (char *)"delete_libtrace_icmp", _wrap_delete_libtrace_icmp, METH_VARARGS },
    25142293         { (char *)"libtrace_icmp_swigregister", libtrace_icmp_swigregister, METH_VARARGS },
    25152294         { (char *)"libtrace_icmp_un_gateway_set", _wrap_libtrace_icmp_un_gateway_set, METH_VARARGS },
     
    25282307         { (char *)"libtrace_icmp_un_echo_sequence_get", _wrap_libtrace_icmp_un_echo_sequence_get, METH_VARARGS },
    25292308         { (char *)"libtrace_icmp_un_echo_swigregister", libtrace_icmp_un_echo_swigregister, METH_VARARGS },
    2530          { (char *)"Packet_trace_set", _wrap_Packet_trace_set, METH_VARARGS },
    2531          { (char *)"Packet_trace_get", _wrap_Packet_trace_get, METH_VARARGS },
    2532          { (char *)"Packet_buffer_set", _wrap_Packet_buffer_set, METH_VARARGS },
    2533          { (char *)"Packet_buffer_get", _wrap_Packet_buffer_get, METH_VARARGS },
    2534          { (char *)"Packet_size_set", _wrap_Packet_size_set, METH_VARARGS },
    2535          { (char *)"Packet_size_get", _wrap_Packet_size_get, METH_VARARGS },
    2536          { (char *)"Packet_status_set", _wrap_Packet_status_set, METH_VARARGS },
    2537          { (char *)"Packet_status_get", _wrap_Packet_status_get, METH_VARARGS },
    25382309         { (char *)"new_Packet", _wrap_new_Packet, METH_VARARGS },
    25392310         { (char *)"delete_Packet", _wrap_delete_Packet, METH_VARARGS },
     
    25612332static swig_type_info _swigt__p_libtrace_icmp_un_frag[] = {{"_p_libtrace_icmp_un_frag", 0, "libtrace_icmp_un_frag *", 0},{"_p_libtrace_icmp_un_frag"},{0}};
    25622333static swig_type_info _swigt__p_libtrace_t[] = {{"_p_libtrace_t", 0, "libtrace_t *", 0},{"_p_libtrace_t"},{0}};
    2563 static swig_type_info _swigt__p_size_t[] = {{"_p_size_t", 0, "size_t *", 0},{"_p_size_t"},{0}};
    25642334static swig_type_info _swigt__p_libtrace_udp[] = {{"_p_libtrace_udp", 0, "struct libtrace_udp *", 0},{"_p_libtrace_udp"},{0}};
    25652335static swig_type_info _swigt__p_libtrace_tcp[] = {{"_p_libtrace_tcp", 0, "struct libtrace_tcp *", 0},{"_p_libtrace_tcp"},{0}};
     
    25742344_swigt__p_libtrace_icmp_un_frag,
    25752345_swigt__p_libtrace_t,
    2576 _swigt__p_size_t,
    25772346_swigt__p_libtrace_udp,
    25782347_swigt__p_libtrace_tcp,
  • 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.