Changeset 91db67b for lib/libtrace.h


Ignore:
Timestamp:
04/24/06 18:42:43 (16 years ago)
Author:
Perry Lorier <perry@…>
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:
cee9e34
Parents:
97c8d58
Message:

Clean up the various usages of TRACE_ERR_*, add TRACE_ERR_UNSUPPORTED and
shuffle which error was returned where. Document their new usages.

Closes: #13

Also, fix the 802.1q definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r12778c2 r91db67b  
    167167/** Enumeration of error codes */
    168168enum {
     169        /** No Error has occured.... yet. */
    169170        TRACE_ERR_NOERROR       = 0,
     171        /** The URI passed to trace_create() is unsupported, or badly formed */
    170172        TRACE_ERR_BAD_FORMAT    = -1,
    171         TRACE_ERR_NO_INIT       = -2,
    172         TRACE_ERR_NO_INIT_OUT   = -3,
    173         TRACE_ERR_URI_LONG      = -4,
    174         TRACE_ERR_URI_NOCOLON   = -5,
    175         TRACE_ERR_INIT_FAILED   = -6,
    176         TRACE_ERR_UNKNOWN_OPTION= -7,
    177         TRACE_ERR_NO_CONVERSION = -8,
    178         TRACE_ERR_BAD_PACKET    = -9,
    179         TRACE_ERR_OPTION_UNAVAIL= -10,
    180         TRACE_ERR_RECV_FAILED   = -11
     173        /** The trace failed to initialise */
     174        TRACE_ERR_INIT_FAILED   = -2,
     175        /** Unknown config option */
     176        TRACE_ERR_UNKNOWN_OPTION= -3,
     177        /** Option known, but unsupported by this format */
     178        TRACE_ERR_OPTION_UNAVAIL= -6,
     179        /** This output uri cannot write packets of this type */
     180        TRACE_ERR_NO_CONVERSION = -4,
     181        /** This packet is corrupt, or unusable for the action required */
     182        TRACE_ERR_BAD_PACKET    = -5,
     183        /** This feature is unsupported */
     184        TRACE_ERR_UNSUPPORTED   = -7
    181185};
    182186
     
    342346typedef struct libtrace_8021q
    343347{
    344   uint8_t  ether_dhost[6];      /**< destination eth addr */
    345   uint8_t  ether_shost[6];      /**< source ether addr    */
    346   uint16_t ether_type;          /**< packet type ID field , 0x8100 for VLAN */
    347348  unsigned int vlan_pri:3;       /**< vlan user priority */
    348349  unsigned int vlan_cfi:1;       /**< vlan format indicator,
Note: See TracChangeset for help on using the changeset viewer.