Changeset e90d5a8 for lib/trace.c


Ignore:
Timestamp:
03/06/12 10:18:59 (9 years ago)
Author:
Shane Alcock <salcock@…>
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:
fefd34b
Parents:
d8eb866
Message:
  • Added a couple of new error types: BAD_FILTER and RT_FAILURE, with the aim of trying to restrict the use of BAD_PACKET to cases where the packet is clearly corrupt or broken
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r66e6d16 re90d5a8  
    12051205        if (!linkptr) {
    12061206                trace_set_err(packet->trace,
    1207                                 TRACE_ERR_BAD_PACKET,"Packet has no payload");
     1207                                TRACE_ERR_BAD_FILTER,"Packet has no payload");
    12081208                return -1;
    12091209        }
     
    12131213                if (linktype==(libtrace_linktype_t)-1) {
    12141214                        trace_set_err(packet->trace,
    1215                                         TRACE_ERR_BAD_PACKET,
     1215                                        TRACE_ERR_BAD_FILTER,
    12161216                                        "Packet has an unknown linktype");
    12171217                        return -1;
    12181218                }
    12191219                if (libtrace_to_pcap_dlt(linktype) == ~1U) {
    1220                         trace_set_err(packet->trace,TRACE_ERR_BAD_PACKET,
     1220                        trace_set_err(packet->trace,TRACE_ERR_BAD_FILTER,
    12211221                                        "Unknown pcap equivalent linktype");
    12221222                        return -1;
     
    12291229                if (pcap_compile( pcap, &filter->filter, filter->filterstring,
    12301230                                        1, 0)) {
    1231                         trace_set_err(packet->trace,TRACE_ERR_BAD_PACKET,
     1231                        trace_set_err(packet->trace,TRACE_ERR_BAD_FILTER,
    12321232                                        "Unable to compile the filter \"%s\": %s",
    12331233                                        filter->filterstring,
Note: See TracChangeset for help on using the changeset viewer.