Changeset 760


Ignore:
Timestamp:
04/29/06 15:09:44 (7 years ago)
Author:
perry
Message:

minor tidyup's looking for "unknown linktype -1" bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_linux.c

    r737 r760  
    258258 
    259259static libtrace_linktype_t linuxnative_get_link_type(const struct libtrace_packet_t *packet) { 
    260         switch (htons((((struct libtrace_linuxnative_header*)(packet->buffer))->hdr.sll_protocol))) { 
     260        int linktype=htons((((struct libtrace_linuxnative_header*)(packet->buffer)) 
     261                                ->hdr.sll_protocol)) 
     262        switch (linktype) { 
    261263                case ETH_P_IP: 
    262264                case ETH_P_IPV6: 
     
    264266                        return TRACE_TYPE_ETH; 
    265267                default: /* shrug, beyond me! */ 
    266                         printf("unknown type %x\n",(((struct libtrace_linuxnative_header*)(packet->buffer))->hdr.sll_protocol)); 
     268                        printf("unknown type %x\n",linktype); 
    267269                        return -1; 
    268270        } 
Note: See TracChangeset for help on using the changeset viewer.