Changeset 89b6069 for examples


Ignore:
Timestamp:
03/08/13 14:40:38 (8 years ago)
Author:
Shane Alcock <salcock@…>
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
Message:
  • Removed useless output from the new demo code
Location:
examples/tutorial
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • examples/tutorial/getpayloaddemo.c

    raf27241 r89b6069  
    1212#include <getopt.h>
    1313#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;
    1914
    2015static void per_packet(libtrace_packet_t *packet)
     
    177172        }
    178173
    179         /* Print the stats for the final reporting period that was probably
    180          * 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 
    185174        libtrace_cleanup(trace, packet);
    186175        return 0;
  • examples/tutorial/gettransportdemo.c

    raf27241 r89b6069  
    1010#include <getopt.h>
    1111#include <arpa/inet.h>
    12 
    13 uint64_t packet_count = 0;
    14 uint64_t capture_count = 0;
    15 uint64_t wire_count = 0;
    16 uint32_t next_report = 0;
    1712
    1813static void per_packet(libtrace_packet_t *packet)
     
    127122        }
    128123
    129         /* Print the stats for the final reporting period that was probably
    130          * not complete when the trace finished */
    131         printf("%u\t", next_report);
    132         printf("%.2f\t\t", ((double)wire_count) / packet_count);
    133         printf("%.2f\n", ((double)capture_count) / packet_count);
    134 
    135124        libtrace_cleanup(trace, packet);
    136125        return 0;
Note: See TracChangeset for help on using the changeset viewer.