Changeset 77ba31d for swig/libtrace.i
- Timestamp:
- 09/21/04 13:45:44 (17 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
swig/libtrace.i
r2980487 r77ba31d 153 153 154 154 %rename (Packet) libtrace_packet_t; 155 struct 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 }; 156 162 157 163 %extend libtrace_packet_t { 158 164 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); 160 168 return packet; 161 169 } 162 ~libtrace_packet_t() { free(self);}170 ~libtrace_packet_t() { free(self->buffer); free(self);} 163 171 struct libtrace_ip *trace_get_ip() { 164 172 return trace_get_ip(self);
Note: See TracChangeset
for help on using the changeset viewer.