Ignore:
Timestamp:
09/06/07 15:35:51 (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:
52cc59f
Parents:
e3a9eb5
Message:

Migrate libpacketdump to the new API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/libpacketdump.cc

    r9c6005f r0aae8f4  
    8282{
    8383        time_t sec = (time_t)trace_get_seconds(packet);
    84         char *link=(char *)trace_get_link(packet);
     84        libtrace_linktype_t linktype;
     85        uint32_t length;
     86        char *link=(char *)trace_get_packet_buffer(packet,&linktype,&length);
    8587
    8688        printf("\n%s",ctime(&sec));
    8789        printf(" Capture: Packet Length: %i/%i Direction Value: %i\n",
    88                         (int)trace_get_capture_length(packet),
     90                        (int)length,
    8991                        (int)trace_get_wire_length(packet),
    9092                        (int)trace_get_direction(packet));
     
    9294                printf(" [No link layer available]\n");
    9395        else
    94                 decode_next(link,trace_get_capture_length(packet), "link",
    95                         trace_get_link_type(packet));
     96                decode_next(link,length, "link",
     97                        linktype);
    9698}
    9799
Note: See TracChangeset for help on using the changeset viewer.