Ignore:
Timestamp:
03/26/15 11:44:45 (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:
f50515e
Parents:
e99c493
Message:

Various fixes to the linux format to support compiling on BSD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux_ring.c

    r6b98325 r9d89626  
    6363#include "format_linux_common.h"
    6464
     65/* Get the start of the captured data. I'm not sure if tp_mac (link layer) is
     66 * always guaranteed. If it's not there then just use tp_net.
     67 */
     68#define TP_TRACE_START(mac, net, hdrend) \
     69        ((mac) > (hdrend) && (mac) < (net) ? (mac) : (net))
     70
    6571#ifdef HAVE_NETPACKET_PACKET_H
    6672/* Get current frame in the ring buffer*/
     
    6975         (stream->rxring_offset *                               \
    7076          stream->req.tp_frame_size))
    71 #endif
    72 
    73 /* Get the start of the captured data. I'm not sure if tp_mac (link layer) is
    74  * always guaranteed. If it's not there then just use tp_net.
    75  */
    76 #define TP_TRACE_START(mac, net, hdrend) \
    77         ((mac) > (hdrend) && (mac) < (net) ? (mac) : (net))
     77
    7878/* Cached page size, the page size shouldn't be changing */
    7979static int pagesize = 0;
     
    351351        return 0;
    352352}
     353#endif /* HAVE_NETPACKET_PACKET_H */
    353354
    354355static libtrace_linktype_t
     
    454455        return 0;
    455456}
     457
     458#ifdef HAVE_NETPACKET_PACKET_H
    456459#define LIBTRACE_MIN(a,b) ((a)<(b) ? (a) : (b))
    457460inline static int linuxring_read_stream(libtrace_t *libtrace,
     
    700703
    701704}
    702 
    703 #ifdef HAVE_NETPACKET_PACKET_H
    704705
    705706static void linuxring_help(void)
     
    765766        NULL                            /* get thread stats */
    766767};
    767 #else
     768#else /* HAVE_NETPACKET_PACKET_H */
    768769
    769770static void linuxring_help(void)
     
    816817        NON_PARALLEL(true)
    817818};
    818 #endif
     819#endif /* HAVE_NETPACKET_PACKET_H */
    819820
    820821/* TODO: Figure out how to give this format preference over the linux native
Note: See TracChangeset for help on using the changeset viewer.