Changeset 1c1e4a2 for lib/linktypes.c


Ignore:
Timestamp:
08/21/06 22:53:24 (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:
cde66c3
Parents:
3a169d7
Message:

Use LIBTRACE_SLL_* macros for linux_sll direction information
Don't return an undefined value at the end of demote_packet()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/linktypes.c

    r404210e r1c1e4a2  
    116116                                        +trace_get_framing_length(packet));
    117117
    118                                 hdr->pkttype=0; /* "outgoing" */
     118                                hdr->pkttype=TRACE_SLL_OUTGOING;
    119119                                if (pcap_dlt_to_libtrace(rt_to_pcap_dlt(packet->type))==TRACE_TYPE_ETH)
    120120                                        hdr->hatype = ARPHRD_ETHER;
     
    126126                                        &hdr->protocol,
    127127                                        NULL);
     128                                /* Linux SLL appears to have the protocol
     129                                 * field in /host/ byte order.
     130                                 */
     131                                hdr->protocol=ntohs(hdr->protocol);
    128132                                break;
    129133                        default:
     
    184188                        return false;
    185189        }
     190        return true;
    186191}
Note: See TracChangeset for help on using the changeset viewer.