Changeset a6c77b0


Ignore:
Timestamp:
07/22/14 02:37:12 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
17c5749, cd8efa6
Parents:
53eb1aa
Message:

Stop the pcap format appearing to accept setting directions which it doesn't support instead return an error.
This also removes the overhead of promoting the packet to include an additional header with this data in this case.
Note pcap supports IN/OUT just not OTHER and UNKNOWN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    rf7bcbfb ra6c77b0  
    578578static libtrace_direction_t pcap_set_direction(libtrace_packet_t *packet,
    579579                libtrace_direction_t dir) {
    580        
     580
     581        /* We only support tagging with IN or OUT return error for any others */
     582        if(!(dir == TRACE_DIR_OUTGOING || dir == TRACE_DIR_INCOMING))
     583                return -1;
     584
    581585        /* PCAP doesn't have a direction field in the header, so we need to
    582586         * promote to Linux SLL to tag it properly */
Note: See TracChangeset for help on using the changeset viewer.