Changeset f7bcbfb for lib/libtrace.h.in


Ignore:
Timestamp:
02/21/14 10:38:06 (7 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:
a31777e
Parents:
86bec15
Message:

Fixed warnings that cropped up when building with clang

  • Added proper "unknown" or "error" values to some libtrace enums. This removes the need for the hideous ==~0U checks that we used to do to check for errors and should be a bit more robust.
  • Fixed potential strncat bugs in one of the libpacketdump decoders.
  • Changed some null-ops in ior-peek as our current method was triggering warnings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    rc04929c rf7bcbfb  
    249249 */
    250250typedef enum {
     251        /* Special value used to indicate a failure to convert to libtrace
     252         * DLT */
     253        TRACE_DLT_ERROR = -1,
     254       
    251255        /** pcap documents this as having the Address Family value in host byte order as the
    252256          * framing.  Ugly? Yes.
     
    279283/** Enumeration of link layer types supported by libtrace */
    280284typedef enum {
     285       TRACE_TYPE_UNKNOWN = -1,         /**< Unable to determine link type */
    281286    /* TRACE_TYPE_LEGACY = 0            Obsolete */
    282287       TRACE_TYPE_HDLC_POS = 1,         /**< HDLC over POS */
     
    487492        TRACE_DIR_OUTGOING = 0,         /**< Packets originating "inside" */
    488493        TRACE_DIR_INCOMING = 1,         /**< Packets originating "outside" */
    489         TRACE_DIR_OTHER    = 2          /**< Packets with an unknown direction, or one that's unknown */
     494        TRACE_DIR_OTHER    = 2,         /**< Packets with an unknown direction, or one that's unknown */
     495        TRACE_DIR_UNKNOWN = -1,         /**< No direction information available */
    490496} libtrace_direction_t;
    491497
Note: See TracChangeset for help on using the changeset viewer.