Changeset 1239
- Timestamp:
- 06/27/07 16:32:30 (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
lib/format_legacy.c (modified) (1 diff)
-
tools/tracereport/misc_report.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/format_legacy.c
r1163 r1239 178 178 static int legacyeth_get_wire_length(const libtrace_packet_t *packet) { 179 179 legacy_ether_t *leth = (legacy_ether_t *)packet->header; 180 return ntohs(leth->wlen);180 return leth->wlen; 181 181 } 182 182 -
trunk/tools/tracereport/misc_report.c
r1214 r1239 14 14 static uint64_t packets = 0; 15 15 16 static uint64_t capture_bytes = 0; 17 16 18 void misc_per_packet(struct libtrace_packet_t *packet) 17 19 { … … 23 25 has_starttime = has_endtime = true; 24 26 ++packets; 27 capture_bytes += trace_get_capture_length(packet) + trace_get_framing_length(packet); 25 28 } 26 29 … … 82 85 fprintf(out, "Average packet rate: %.02f packets/sec\n", 83 86 packets/(endtime-starttime)); 87 fprintf(out, "Uncompressed trace size: %" PRIu64 "\n", capture_bytes); 84 88 }
Note: See TracChangeset
for help on using the changeset viewer.
