Changeset 938dbd9


Ignore:
Timestamp:
05/23/06 13:21:02 (15 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:
0837e57
Parents:
73ef8ce
Message:

Move to being IPv{4,6} independant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/protocol_report.c

    re3b0188 r938dbd9  
    1111void protocol_per_packet(struct libtrace_packet_t *packet)
    1212{
    13         struct libtrace_ip *ip = trace_get_ip(packet);
    14         if (!ip)
     13        uint8_t proto;
     14        if (trace_get_transport(packet,&proto,NULL)==NULL)
    1515                return;
    16 
    17         prot_stat[ip->ip_p].count++;
    18         prot_stat[ip->ip_p].bytes+=trace_get_wire_length(packet);
     16               
     17        prot_stat[proto].count++;
     18        prot_stat[proto].bytes+=trace_get_wire_length(packet);
    1919}
    2020
Note: See TracChangeset for help on using the changeset viewer.