Ignore:
Timestamp:
10/25/06 15:50:55 (7 years ago)
Author:
perry
Message:

Add trace conversion support for pcapfile:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_pcapfile.c

    r1050 r1063  
    263263        int numbytes; 
    264264        int ret; 
     265 
     266        /* If this packet cannot be converted to a pcap linktype then 
     267         * pop off the top header until it can be converted 
     268         */ 
     269        while (libtrace_to_pcap_dlt(trace_get_link_type(packet))==~0) { 
     270                if (!demote_packet(packet)) { 
     271                        trace_set_err_out(out,  
     272                                TRACE_ERR_NO_CONVERSION, 
     273                                "pcap does not support this format"); 
     274                        return -1; 
     275                } 
     276        } 
     277 
    265278 
    266279        /* Now we know the link type write out a header if we've not done 
Note: See TracChangeset for help on using the changeset viewer.