Changeset 77ba31d for swig/libtrace.i


Ignore:
Timestamp:
09/21/04 13:45:44 (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:
6f34090
Parents:
2980487
Message:

poink

File:
1 edited

Legend:

Unmodified
Added
Removed
  • swig/libtrace.i

    r2980487 r77ba31d  
    153153
    154154%rename (Packet) libtrace_packet_t;
    155 struct libtrace_packet_t {};
     155struct libtrace_packet_t
     156{
     157        struct libtrace_t *trace;
     158        char *buffer;
     159        size_t size;
     160        uint8_t status;
     161};
    156162
    157163%extend libtrace_packet_t {
    158164        libtrace_packet_t() {
    159                 struct libtrace_packet_t *packet = malloc(sizeof(struct 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);
    160168                return packet;
    161169                }
    162         ~libtrace_packet_t() {free(self);}
     170        ~libtrace_packet_t() { free(self->buffer); free(self);}
    163171        struct libtrace_ip *trace_get_ip() {
    164172                return trace_get_ip(self);
Note: See TracChangeset for help on using the changeset viewer.