Ignore:
Timestamp:
04/14/10 15:26:28 (11 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:
a17c329
Parents:
81c2da8
Message:

Split compression type out from fileflags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    r962aad3 rb5af22c  
    8888struct pcapfile_format_data_out_t {
    8989        iow_t *file;
     90        int compress_type;
    9091        int level;
    9192        int flag;
     
    128129
    129130        DATAOUT(libtrace)->file=NULL;
     131        DATAOUT(libtrace)->compress_type=TRACE_OPTION_COMPRESSTYPE_NONE;
    130132        DATAOUT(libtrace)->level=0;
    131133        DATAOUT(libtrace)->flag=O_CREAT|O_WRONLY;
     
    266268                        DATAOUT(libtrace)->level = *(int*)value;
    267269                        return 0;
     270                case TRACE_OPTION_OUTPUT_COMPRESSTYPE:
     271                        DATAOUT(libtrace)->compress_type = *(int*)value;
     272                        return 0;
    268273                case TRACE_OPTION_OUTPUT_FILEFLAGS:
    269274                        DATAOUT(libtrace)->flag = *(int*)value;
     
    412417
    413418                DATAOUT(out)->file=trace_open_file_out(out,
     419                                DATAOUT(out)->compress_type,
    414420                                DATAOUT(out)->level,
    415421                                DATAOUT(out)->flag);
Note: See TracChangeset for help on using the changeset viewer.