Changeset be22b51


Ignore:
Timestamp:
03/26/07 11:25:01 (14 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:
f0c639b
Parents:
dbdc23f
Message:

Other libtrace programs don't like meta-data so added a new trace_type that would allow them to ignore it without having to do anything special

Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r4a207b8 rbe22b51  
    238238       TRACE_TYPE_80211_RADIO = 15,  /**< Radiotap + 802.11 */
    239239       TRACE_TYPE_LLCSNAP = 16,      /**< Raw LLC/SNAP */
    240        TRACE_TYPE_PPP = 17           /**< PPP frames */
     240       TRACE_TYPE_PPP = 17,          /**< PPP frames */
     241       TRACE_TYPE_METADATA = 18         /**< WDCAP-style meta-data */
    241242       
    242243} libtrace_linktype_t;
  • lib/linktypes.c

    r4a207b8 rbe22b51  
    8787                case TRACE_TYPE_AAL5:
    8888                case TRACE_TYPE_HDLC_POS:
     89                case TRACE_TYPE_METADATA:
    8990                        break;
    9091        }
     
    133134                case TRACE_TYPE_PPP:
    134135                case TRACE_TYPE_POS:
     136                case TRACE_TYPE_METADATA:
    135137                        break;
    136138        }
  • lib/protocols.c

    r4a207b8 rbe22b51  
    320320                case TRACE_TYPE_DUCK:
    321321                        return NULL; /* duck packets have no payload! */
     322                case TRACE_TYPE_METADATA:
     323                        return NULL; /* The payload is in these packets does
     324                                        not correspond to a genuine link-layer
     325                                        */
    322326                default:
    323327                        break;
     
    732736                case TRACE_TYPE_ATM:
    733737                case TRACE_TYPE_DUCK:
     738                case TRACE_TYPE_METADATA:
    734739                        return NULL;
    735740                default:
     
    767772                case TRACE_TYPE_PFLOG:
    768773                case TRACE_TYPE_DUCK:
     774                case TRACE_TYPE_METADATA:
    769775                        /* No MAC address */
    770776                        return NULL;
Note: See TracChangeset for help on using the changeset viewer.