Changeset 225cb94


Ignore:
Timestamp:
03/14/05 21:15:56 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
53991fa
Parents:
f2a1657
Message:

fix get_link() to return NULL if the ERF rxerror flag is set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r3a3aa23 r225cb94  
    802802void *trace_get_link(const struct libtrace_packet_t *packet) {
    803803        void *ethptr = 0;
    804        
     804        dag_record_t *erfptr = 0;
    805805        struct wag_event_t *event = (struct wag_event_t *)packet->buffer;
    806806        struct wag_data_event_t *data_event;
     
    811811                case DAG:
    812812                case RTCLIENT:
     813                        erfptr = (dag_record_t *)packet->buffer;
     814                        if (erfptr->flags.rxerror == 1) {
     815                                return NULL;
     816                        }
    813817                        if (trace_get_link_type(packet)==TRACE_TYPE_ETH)
    814818                                ethptr = ((uint8_t *)packet->buffer +
     
    836840                       
    837841                default:
    838                         fprintf(stderr,"Dunno this trace format\n");
     842                        fprintf(stderr,"Don't know this trace format\n");
    839843                        assert(0);
    840844        }
Note: See TracChangeset for help on using the changeset viewer.