Changeset 1270
- Timestamp:
- 06/09/07 11:53:07 (1 year ago)
- Files:
-
- trunk/tools/tracereport/error_report.c (modified) (1 diff)
- trunk/tools/tracereport/nlp_report.c (modified) (1 diff)
- trunk/tools/tracertstats/tracertstats.c (modified) (1 diff)
- trunk/tools/tracestats/tracestats.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tools/tracereport/error_report.c
r1214 r1270 15 15 struct libtrace_ip *ip = trace_get_ip(packet); 16 16 struct libtrace_tcp *tcp = trace_get_tcp(packet); 17 void *link = trace_get_ link(packet);17 void *link = trace_get_packet_buffer(packet,NULL,NULL); 18 18 if (!link) { 19 19 ++rx_errors; trunk/tools/tracereport/nlp_report.c
r1221 r1270 11 11 void nlp_per_packet(struct libtrace_packet_t *packet) 12 12 { 13 char *link=(char *)trace_get_link(packet);14 uint16_t type;13 uint16_t ethertype; 14 void *link; 15 15 libtrace_direction_t dir = trace_get_direction(packet); 16 17 link = trace_get_layer3(packet,ðertype,NULL); 16 18 17 19 if (!link) 18 20 return; 19 type = htons(*(uint16_t*)(link+12));20 21 21 22 if (dir != TRACE_DIR_INCOMING && dir != TRACE_DIR_OUTGOING) 22 23 dir = TRACE_DIR_OTHER; 23 24 24 nlp_stat[dir][ type].count++;25 nlp_stat[dir][ type].bytes+=trace_get_wire_length(packet);25 nlp_stat[dir][ethertype].count++; 26 nlp_stat[dir][ethertype].bytes+=trace_get_wire_length(packet); 26 27 } 27 28 trunk/tools/tracertstats/tracertstats.c
r1131 r1270 140 140 erf_hdr = (dag_record_t *)packet->header; 141 141 142 if (trace_get_ link(packet) == NULL) {142 if (trace_get_packet_buffer(packet,NULL,NULL) == NULL) { 143 143 continue; 144 144 } trunk/tools/tracestats/tracestats.c
r1253 r1270 61 61 struct libtrace_t *trace; 62 62 63 volatile staticint done=0;63 static volatile int done=0; 64 64 65 65 static void cleanup_signal(int signal)
