Changeset 3840760 for tools/traceanon


Ignore:
Timestamp:
11/28/05 10:15:22 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
08594b8
Parents:
14d8a63
Message:

updated the examples/ and tools/ directories to correctly use trace_packet_create() now.

fixed a typo in format_wag (shouldn't use pcap_get_framing_length for wag!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/traceanon/traceanon.c

    rca52edd r3840760  
    100100        char *key = NULL;
    101101        struct libtrace_t *trace = 0;
    102         struct libtrace_packet_t packet;
     102        struct libtrace_packet_t *packet = trace_packet_create();
    103103        struct libtrace_out_t *writer = 0;
    104104        bool enc_source = false;
     
    178178                struct libtrace_ip *ipptr;
    179179                int psize;
    180                 if ((psize = trace_read_packet(trace, &packet)) <= 0) {
     180                if ((psize = trace_read_packet(trace, packet)) <= 0) {
    181181                        break;
    182182                }
    183183
    184                 ipptr = trace_get_ip(&packet);
     184                ipptr = trace_get_ip(packet);
    185185
    186186                if (ipptr && (enc_source || enc_dest))
     
    189189                /* TODO: Encrypt IP's in ARP packets */
    190190
    191                 trace_write_packet(writer,&packet);
     191                trace_write_packet(writer,packet);
    192192        }
    193193        return 0;
Note: See TracChangeset for help on using the changeset viewer.