Ignore:
Timestamp:
11/03/05 02:49:40 (16 years ago)
Author:
Perry Lorier <perry@…>
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:
2a34193
Parents:
5a67294
Message:

Added:

  • error reports
  • flow reports
  • per port reports
  • direction report
  • moved everything to use the container library
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/error_report.c

    rd3ff1fb r49ce177  
    77static uint64_t rx_errors = 0;
    88static uint64_t ip_errors = 0;
     9static uint64_t tcp_errors = 0;
    910
    1011void error_per_packet(struct libtrace_packet_t *packet)
    1112{
    1213        struct libtrace_ip *ip = trace_get_ip(packet);
     14        struct libtrace_tcp *tcp = trace_get_tcp(packet);
    1315        void *link = trace_get_link(packet);
    1416        if (!link) {
     
    1921                        ++ip_errors;
    2022        }
    21 
     23        if (tcp) {
     24                if (ntohs(tcp->check)!=0)
     25                        ++tcp_errors;
     26        }
    2227}
    2328
     
    2732        printf("RX Errors: %" PRIu64 "\n",rx_errors);
    2833        printf("IP Checksum errors: %" PRIu64 "\n",ip_errors);
     34        //printf("TCP Checksum errors: %" PRIu64 "\n",tcp_errors);
    2935}
Note: See TracChangeset for help on using the changeset viewer.