Changeset a257602 for examples/protocol


Ignore:
Timestamp:
07/22/04 16:57:31 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
aa60a6b
Parents:
e9f521e
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/protocol/protocol.c

    rc837874 ra257602  
    9090int do_cksum = 0;
    9191int do_w_cksum = 0;
     92uint64_t rxerr = 0;
    9293static void usage();
    9394static void parse_cmdline(int argc, char **argv);
     
    9697
    9798        struct libtrace_ip *ipptr = 0;
     99        dag_record_t *erfptr = 0;
    98100       
    99         int status; // need to pass to rtclient_read_packet
     101        int status;
    100102        int psize;
    101103
    102104        parse_cmdline(argc,argv);
    103105
    104         // create an rtclient to hostname, on the default port
    105106        trace = create_trace(uri);
    106107        if (filterstring) {
     
    113114                        break;
    114115                }
     116                erfptr = (dag_record_t *)buffer;
     117               
     118                if (erfptr->flags.rxerror) {
     119                        rxerr ++;
     120                        continue;
     121                }
    115122                if (filter) {
    116123                        if (!libtrace_bpf_filter(trace, filter, buffer, 4096)) {
     
    132139        if (do_cksum || do_w_cksum) {
    133140                printf("Bad checksums seen: %llu\n",badchksum);
     141                printf("RX Errors seen: %llu\n",rxerr);
    134142        }
    135143        destroy_trace(trace);
Note: See TracChangeset for help on using the changeset viewer.