Changeset b4c3f61


Ignore:
Timestamp:
12/04/12 15:52:01 (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:
a464de7
Parents:
528eb6e
Message:
  • Removed erroneous '_' in all the #ifdefs I just added to format_linux.c :/
  • Removed silly testing output from format_linux.c
  • Simplified queue increment in the ring output code so that it doesn't produce warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r528eb6e rb4c3f61  
    6060#endif
    6161
    62 #ifdef HAVE_NETPACKET_PACKET_H_
     62#ifdef HAVE_NETPACKET_PACKET_H
    6363
    6464#include <sys/socket.h>
     
    129129
    130130
    131 #endif /* HAVE_NETPACKET_PACKET_H_ */
     131#endif /* HAVE_NETPACKET_PACKET_H */
    132132
    133133struct tpacket_stats {
     
    272272
    273273
    274 #ifdef HAVE_NETPACKET_PACKET_H_
     274#ifdef HAVE_NETPACKET_PACKET_H
    275275
    276276/*
     
    780780        return -1;
    781781}
    782 #endif /* HAVE_NETPACKET_PACKET_H_ */
     782#endif /* HAVE_NETPACKET_PACKET_H */
    783783
    784784static int linuxnative_prepare_packet(libtrace_t *libtrace UNUSED,
     
    852852#define CMSG_BUF_SIZE 128
    853853
    854 #ifdef HAVE_NETPACKET_PACKET_H_
     854#ifdef HAVE_NETPACKET_PACKET_H
    855855static int linuxnative_read_packet(libtrace_t *libtrace, libtrace_packet_t *packet)
    856856{
     
    10171017         */
    10181018        while (!(header->tp_status & TP_STATUS_USER)) {
    1019                 printf("I shouldn't run if event handler\n");
    10201019                pollset.fd = FORMAT(libtrace->format_data)->fd;
    10211020                pollset.events = POLLIN;
     
    11551154
    11561155        /* Notify kernel there are frames to send */
    1157         DATAOUT(trace)->queue = (++DATAOUT(trace)->queue) % TX_MAX_QUEUE;
     1156        DATAOUT(trace)->queue ++;
     1157        DATAOUT(trace)->queue %= TX_MAX_QUEUE;
    11581158        if(DATAOUT(trace)->queue == 0){
    11591159                sendto(DATAOUT(trace)->fd,
     
    11671167
    11681168}
    1169 #endif /* HAVE_NETPACKET_PACKET_H_ */
     1169#endif /* HAVE_NETPACKET_PACKET_H */
    11701170
    11711171static inline libtrace_linktype_t get_libtrace_link_type(uint16_t linktype){
     
    14001400        }
    14011401
    1402 #ifdef HAVE_NETPACKET_PACKET_H_
     1402#ifdef HAVE_NETPACKET_PACKET_H 
    14031403        if ((FORMAT(trace->format_data)->stats_valid & 1)
    14041404                        || FORMAT(trace->format_data)->stats_valid == 0) {
     
    14301430        }
    14311431       
    1432 #ifdef HAVE_NETPACKET_PACKET_H_
     1432#ifdef HAVE_NETPACKET_PACKET_H 
    14331433        if ((FORMAT(trace->format_data)->stats_valid & 2)
    14341434                        || (FORMAT(trace->format_data)->stats_valid==0)) {
     
    14481448}
    14491449
    1450 #ifdef HAVE_NETPACKET_PACKET_H_
     1450#ifdef HAVE_NETPACKET_PACKET_H
    14511451static void linuxnative_help(void) {
    14521452        printf("linuxnative format module: $Revision$\n");
Note: See TracChangeset for help on using the changeset viewer.