Changeset 8e580c5 for libpacketdump


Ignore:
Timestamp:
05/06/10 14:59:13 (11 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:
f01e6a8
Parents:
28318a4
Message:

use trace_get_payload_from_meta() as it's exported.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/link_6.c

    rc7062df r8e580c5  
    1111#include "libtrace_int.h"
    1212
    13 DLLEXPORT void decode(int link_type UNUSED,const char *pkt,unsigned len)
     13DLLEXPORT void decode(int link_type ,const char *pkt,unsigned len)
    1414{
    1515        libtrace_sll_header_t *sll = (libtrace_sll_header_t *) pkt;
    16         uint16_t type;
    17        
     16        libtrace_linktype_t linktype = link_type;
     17        void *ret;     
     18
    1819        if (len < sizeof(*sll)) {
    1920                printf(" Linux SLL: Truncated (len = %u)\n", len);
     
    4041       
    4142        /* Do we recognise the hardware address type? */
    42         type = arphrd_type_to_libtrace(ntohs(sll->hatype));
    43         if (type != 65535) {
    44                 decode_next(pkt + sizeof(*sll), len - sizeof(*sll), "link", type);
     43        ret=trace_get_payload_from_meta(pkt, &linktype, &len);
     44        /*type = arphrd_type_to_libtrace(ntohs(sll->hatype)); */
     45        if (linktype != 65535) {
     46                decode_next(ret, len, "link", linktype);
     47                /*decode_next(pkt + sizeof(*sll), len - sizeof(*sll), "link", type);*/
    4548                return;
    4649        }
Note: See TracChangeset for help on using the changeset viewer.