Changeset 811


Ignore:
Timestamp:
05/23/06 13:21:02 (7 years ago)
Author:
perry
Message:

Move to being IPv{4,6} independant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/tracereport/protocol_report.c

    r501 r811  
    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.