Changeset fbc4342


Ignore:
Timestamp:
09/06/07 11:53:07 (14 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:
e3a9eb5
Parents:
9bc4689
Message:

Port tools over to using the new api's

Location:
tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/error_report.c

    r466aed6 rfbc4342  
    1515        struct libtrace_ip *ip = trace_get_ip(packet);
    1616        struct libtrace_tcp *tcp = trace_get_tcp(packet);
    17         void *link = trace_get_link(packet);
     17        void *link = trace_get_packet_buffer(packet,NULL,NULL);
    1818        if (!link) {
    1919                ++rx_errors;
  • tools/tracereport/nlp_report.c

    r40f19df rfbc4342  
    1111void nlp_per_packet(struct libtrace_packet_t *packet)
    1212{
    13         char *link=(char *)trace_get_link(packet);
    14         uint16_t type;
     13        uint16_t ethertype;
     14        void *link;
    1515        libtrace_direction_t dir = trace_get_direction(packet);
     16
     17        link = trace_get_layer3(packet,&ethertype,NULL);
    1618       
    1719        if (!link)
    1820                return;
    19         type = htons(*(uint16_t*)(link+12));
    2021
    2122        if (dir != TRACE_DIR_INCOMING && dir != TRACE_DIR_OUTGOING)
    2223                dir = TRACE_DIR_OTHER;
    2324       
    24         nlp_stat[dir][type].count++;
    25         nlp_stat[dir][type].bytes+=trace_get_wire_length(packet);
     25        nlp_stat[dir][ethertype].count++;
     26        nlp_stat[dir][ethertype].bytes+=trace_get_wire_length(packet);
    2627}
    2728
  • tools/tracertstats/tracertstats.c

    rd5a27e8 rfbc4342  
    140140                erf_hdr = (dag_record_t *)packet->header;
    141141               
    142                 if (trace_get_link(packet) == NULL) {
     142                if (trace_get_packet_buffer(packet,NULL,NULL) == NULL) {
    143143                        continue;
    144144                }
  • tools/tracestats/tracestats.c

    r2cf30f6 rfbc4342  
    6161struct libtrace_t *trace;
    6262
    63 volatile static int done=0;
     63static volatile int done=0;
    6464
    6565static void cleanup_signal(int signal)
Note: See TracChangeset for help on using the changeset viewer.