Changeset 5eeba76
- Timestamp:
- 05/04/06 17:05:13 (15 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:
- bc4c11e
- Parents:
- 48a20e3
- Files:
-
- 1 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/event/Makefile
r7e9d51c r5eeba76 1 1 2 PREFIX=/usr/local 2 PREFIX=/usr/local/ 3 3 CC=gcc 4 4 … … 9 9 LDLIBS = -ltrace 10 10 11 BINS = rate rate-tracetime11 BINS = event_example 12 12 .PHONY: all clean distclean install depend 13 13 -
lib/format_erf.c
r431548c5 r5eeba76 530 530 packet->buffer = malloc(LIBTRACE_PACKET_BUFSIZE); 531 531 packet->buf_control = TRACE_CTRL_PACKET; 532 } 533 532 if (!packet->buffer) { 533 trace_set_err(libtrace, errno, 534 "Cannot allocate memory"); 535 return -1; 536 } 537 } 538 539 540 534 541 packet->header = packet->buffer; 535 542 packet->type = RT_DATA_ERF; -
lib/format_helper.c
rb333d68 r5eeba76 140 140 /* TODO: finalise packet */ 141 141 *packet = *trace->event.packet; 142 trace ->event.packet = NULL;142 trace_destroy_packet(&trace->event.packet); 143 143 144 144 event.type = TRACE_EVENT_PACKET; -
lib/format_pcapfile.c
re6d963c r5eeba76 216 216 } 217 217 218 static int8_t pcapfile_get_direction(const libtrace_packet_t *packet)219 { 220 int8_t direction = -1;218 static libtrace_direction_t pcapfile_get_direction(const libtrace_packet_t *packet) 219 { 220 libtrace_direction_t direction = -1; 221 221 switch(pcapfile_get_link_type(packet)) { 222 222 case TRACE_TYPE_LINUX_SLL: … … 242 242 */ 243 243 if (ntohs(sll->pkttype == 0)) { 244 direction = 1;244 direction = TRACE_DIR_INCOMING; 245 245 } else { 246 direction = 0;246 direction = TRACE_DIR_OUTGOING; 247 247 } 248 248 break; … … 262 262 if (ntohs(pflog->dir==0)) { 263 263 264 direction = 1;264 direction = TRACE_DIR_INCOMING; 265 265 } 266 266 else { 267 direction = 0;267 direction = TRACE_DIR_OUTGOING; 268 268 } 269 269 break;
Note: See TracChangeset
for help on using the changeset viewer.