Changeset fc2e63f for lib/format_linux.c


Ignore:
Timestamp:
04/29/06 15:09:44 (15 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:
201625b
Parents:
da22687
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r030aa3f rfc2e63f  
    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.