Changeset 6399a90 for lib


Ignore:
Timestamp:
09/05/07 16:34:10 (14 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:
ed7e106
Parents:
a5908d2
Message:

Remove wag.h dependences

Location:
lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lib/format_rt.c

    r2fbcb26 r6399a90  
    8888        libtrace_t *dummy_erf;
    8989        libtrace_t *dummy_pcap;
    90         libtrace_t *dummy_wag;
    9190        libtrace_t *dummy_linux;
    9291};
     
    198197        RT_INFO->dummy_erf = NULL;
    199198        RT_INFO->dummy_pcap = NULL;
    200         RT_INFO->dummy_wag = NULL;
    201199        RT_INFO->dummy_linux = NULL;
    202200        RT_INFO->pkt_buffer = NULL;
     
    274272        if (RT_INFO->dummy_pcap)
    275273                trace_destroy_dead(RT_INFO->dummy_pcap);
    276 
    277         if (RT_INFO->dummy_wag)
    278                 trace_destroy_dead(RT_INFO->dummy_wag);
    279274
    280275        if (RT_INFO->dummy_linux)
     
    391386                        packet->trace = RT_INFO->dummy_erf;
    392387                        break;
    393                 case TRACE_RT_DATA_WAG:
    394                         if (!RT_INFO->dummy_wag) {
    395                                 RT_INFO->dummy_wag = trace_create_dead("wtf:-");
    396                         }
    397                         packet->trace = RT_INFO->dummy_wag;
    398                         break;
    399388                case TRACE_RT_DATA_LINUX_NATIVE:
    400389                        if (!RT_INFO->dummy_linux) {
  • lib/libtrace.h.in

    r9185dcfd r6399a90  
    679679 *  - rtclient:hostname (deprecated)
    680680 *  - rtclient:hostname:port (deprecated)
    681  *  - wag:/dev/wagcard
    682  *  - wtf:-
    683  *  - wtf:/path/to/wtf/file
    684681 *
    685682 *  If an error occured when attempting to open the trace file, an error
  • lib/libtrace_int.h

    r52656ed r6399a90  
    103103#endif
    104104
    105 #include "wag.h"
    106105#include "daglegacy.h"
    107106       
     
    457456void pcapfile_constructor(void);
    458457void rt_constructor(void);
    459 void wag_constructor(void);
    460458void duck_constructor(void);
    461459void atmhdr_constructor(void);
  • lib/protocols.c

    r1708aa8 r6399a90  
    55#include "libtrace.h"
    66#include "libtrace_int.h"
    7 #include "wag.h"
    87#include <assert.h>
    98#include <stdio.h>
     
    118117{
    119118        libtrace_80211_t *wifi;
    120         libtrace_802_11_payload_t *eth;
     119        uint16_t *eth; /* ethertype */
    121120        int8_t extra = 0; /* how many QoS bytes to skip */
    122121       
     
    143142                return NULL;
    144143
    145         eth=(libtrace_802_11_payload_t *)((char*)wifi+sizeof(*wifi)+extra);
     144        eth=(uint16_t *)((char*)wifi+sizeof(*wifi)+extra);
    146145       
    147         if (eth->type == 0xaaaa)
     146        if (*eth == 0xaaaa)
    148147                /* Payload contains an 802.2 LLC/SNAP frame */
    149148                return trace_get_payload_from_llcsnap((void *)eth, type, remaining);
    150149                       
    151150        /* Otherwise we assume an Ethernet II frame */
    152         if (type) *type=ntohs(eth->type);
     151        if (type) *type=ntohs(*eth);
    153152        if (remaining) *remaining = *remaining - sizeof(libtrace_80211_t) - extra - sizeof(*eth);
    154153       
  • lib/trace.c

    ra5908d2 r6399a90  
    277277 *  rtclient:hostname
    278278 *  rtclient:hostname:port
    279  *  wag:-
    280  *  wag:/path/to/wag/file
    281  *  wag:/path/to/wag/file.gz
    282  *  wag:/path/to/wag/socket
    283279 *
    284280 * If an error occured when attempting to open a trace, NULL is returned
Note: See TracChangeset for help on using the changeset viewer.