Changeset 85a0d42 for lib/format_pcap.c


Ignore:
Timestamp:
03/17/06 13:23:00 (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:
72cc9cc
Parents:
752709f
Message:

Fix up output, better reporting of output errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    r7ac9705 r85a0d42  
    298298                fflush((FILE *)OUTPUT.trace.dump);
    299299        }
    300         if (libtrace->format == &pcap ||
    301                         libtrace->format == &pcapint) {
    302                
     300        if (packet->trace->format == &pcap ||
     301                        packet->trace->format == &pcapint) {
    303302                pcap_dump((u_char*)OUTPUT.trace.dump,(struct pcap_pkthdr *)packet->header,packet->payload);
    304303        } else {
     
    311310                pcap_pkt_hdr.caplen = trace_get_capture_length(packet);
    312311                pcap_pkt_hdr.len = trace_get_wire_length(packet);
     312
     313                assert(pcap_pkt_hdr.caplen<65536);
     314                assert(pcap_pkt_hdr.len<65536);
    313315
    314316                pcap_dump((u_char*)OUTPUT.trace.dump, &pcap_pkt_hdr, packet->payload);
Note: See TracChangeset for help on using the changeset viewer.