Changeset 78f750e for lib/format_erf.c


Ignore:
Timestamp:
11/01/05 11:09:37 (16 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:
9c61e13
Parents:
5c095c8
Message:

Added definition of rt protocol to libtrace.
Rtclients will now skip over packets that contain no useful message body
rt_protocol.h will be installed with other header files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rf04e489 r78f750e  
    3636#include "format_helper.h"
    3737#include "parse_cmd.h"
     38#include "rt_protocol.h"
    3839
    3940#ifdef HAVE_INTTYPES_H
     
    618619                // Read status byte
    619620                if (tracefifo_out_read(libtrace->fifo,
    620                                 &packet->status, sizeof(int)) == 0) {
     621                                &packet->status, sizeof(uint32_t)) == 0) {
    621622                        read_required = 1;
    622623                        continue;
    623624                }
    624                 tracefifo_out_update(libtrace->fifo,sizeof(int));
     625                tracefifo_out_update(libtrace->fifo,sizeof(uint32_t));
    625626
    626627                // read in the ERF header
     
    631632                        continue;
    632633                }
     634               
     635                if (packet->status >= S_MESSAGE_ONLY) {
     636                        // Need to skip this packet as it is a message packet
     637                        tracefifo_out_update(libtrace->fifo, dag_record_size);
     638                        tracefifo_ack_update(libtrace->fifo, dag_record_size + sizeof(uint32_t));
     639                        continue;
     640                }
     641               
    633642                size = ntohs(((dag_record_t *)buffer)->rlen);
    634643               
     
    644653                tracefifo_out_update(libtrace->fifo,size);
    645654
    646                 tracefifo_ack_update(libtrace->fifo,size + sizeof(int));
     655                tracefifo_ack_update(libtrace->fifo,size + sizeof(uint32_t));
    647656
    648657                packet->size = numbytes;
Note: See TracChangeset for help on using the changeset viewer.