Ignore:
Timestamp:
04/27/07 11:52:15 (14 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:
bd4bec9
Parents:
1dc58e0
Message:

Updated some reports to output to files rather than stdout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/error_report.c

    ra1b899f re991529  
    2222         *
    2323         * If the packets were captured via wdcap's anonymisation module,
    24          * the checksum is set to 1 when it is correct and 0 if incorrect.
    25          *
    26          * Earlier versions of wdcap appear to set the checksum the other
    27          * way around.
     24         * the checksum is set to 0 when it is correct and 1 if incorrect.
    2825         *
    2926         * If a different capture method is used, there's a good chance the
     
    4239void error_report(void)
    4340{
    44         printf("# Errors:\n");
    45         printf("RX Errors: %" PRIu64 "\n",rx_errors);
    46         printf("IP Checksum errors: %" PRIu64 "\n",ip_errors);
     41        FILE *out = fopen("error.out", "w");
     42        if (!out) {
     43                perror("fopen");
     44                return;
     45        }
     46       
     47        fprintf(out, "RX Errors: %" PRIu64 "\n",rx_errors);
     48        fprintf(out, "IP Checksum errors: %" PRIu64 "\n",ip_errors);
    4749        /*printf("TCP Checksum errors: %" PRIu64 "\n",tcp_errors); */
     50
     51        fclose(out);
    4852}
Note: See TracChangeset for help on using the changeset viewer.