Changeset 62b3c4e for tools/traceanon/traceanon_parallel.c
- Timestamp:
- 03/05/15 15:44:30 (6 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
- ab3fa18
- Parents:
- b023181
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/traceanon/traceanon_parallel.c
r0ec8a7c r62b3c4e 208 208 struct libtrace_out_t *writer = 0; 209 209 210 static void write_out(libtrace_t *trace, libtrace_result_t *result, UNUSED libtrace_message_t *mesg) { 210 static void write_out(libtrace_t *trace UNUSED, int mesg, 211 libtrace_generic_t data, 212 libtrace_thread_t *sender UNUSED) { 211 213 static uint64_t packet_count = 0; // TESTING PURPOSES, this is not going to work with a live format 212 214 213 if (result) { 214 if (result->type == RESULT_PACKET) { 215 libtrace_packet_t *packet = (libtrace_packet_t*) libtrace_result_get_value(result).pkt; 216 assert(libtrace_result_get_key(result) == packet_count++); 215 switch (mesg) { 216 case MESSAGE_RESULT: 217 if (data.res->type == RESULT_PACKET) { 218 libtrace_packet_t *packet = (libtrace_packet_t*) libtrace_result_get_value(data.res).pkt; 219 assert(libtrace_result_get_key(data.res) == packet_count++); 217 220 if (trace_write_packet(writer,packet)==-1) { 218 221 trace_perror_output(writer,"writer"); … … 222 225 223 226 } else { 224 assert( result->type == RESULT_TICK);227 assert(data.res->type == RESULT_TICK); 225 228 // Ignore it 226 229 }
Note: See TracChangeset
for help on using the changeset viewer.