Changeset 51c83a4


Ignore:
Timestamp:
04/30/06 18:19:33 (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:
c042b5c
Parents:
201625b
Message:

Use better link type detection based on the hardware type rather than the
protocol it uses (duh, why didn't I do this before?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r201625b r51c83a4  
    259259static libtrace_linktype_t linuxnative_get_link_type(const struct libtrace_packet_t *packet) {
    260260        int linktype=htons((((struct libtrace_linuxnative_header*)(packet->buffer))
    261                                 ->hdr.sll_protocol));
     261                                ->hdr.sll_hatype));
    262262        switch (linktype) {
    263                 case ETH_P_IP:
    264                 case ETH_P_IPV6:
    265                 case ETH_P_ARP:
     263                case ARPHRD_ETHER:
    266264                        return TRACE_TYPE_ETH;
    267265                default: /* shrug, beyond me! */
Note: See TracChangeset for help on using the changeset viewer.