Changeset 89b6069 for examples/tutorial/getpayloaddemo.c
- Timestamp:
- 03/08/13 14:40:38 (8 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:
- c49459b
- Parents:
- ec0b927
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/tutorial/getpayloaddemo.c
raf27241 r89b6069 12 12 #include <getopt.h> 13 13 #include <arpa/inet.h> 14 15 uint64_t packet_count = 0;16 uint64_t capture_count = 0;17 uint64_t wire_count = 0;18 uint32_t next_report = 0;19 14 20 15 static void per_packet(libtrace_packet_t *packet) … … 177 172 } 178 173 179 /* Print the stats for the final reporting period that was probably180 * not complete when the trace finished */181 printf("%u\t", next_report);182 printf("%.2f\t\t", ((double)wire_count) / packet_count);183 printf("%.2f\n", ((double)capture_count) / packet_count);184 185 174 libtrace_cleanup(trace, packet); 186 175 return 0;
Note: See TracChangeset
for help on using the changeset viewer.