Changeset d56089a


Ignore:
Timestamp:
12/15/05 14:16:33 (15 years ago)
Author:
Shane Alcock <salcock@…>
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:
9c87732
Parents:
b8bb4c5
Message:

Updated examples and tools to use new function names

Files:
21 edited

Legend:

Unmodified
Added
Removed
  • examples/capture/capture.c

    r3840760 rd56089a  
    9898        struct sigaction sigact;
    9999        dag_record_t *erfptr = 0;
    100         struct libtrace_packet_t *packet = trace_packet_create();
     100        struct libtrace_packet_t *packet = trace_create_packet();
    101101
    102102        struct itimerval itv;
  • examples/count/tracestats.c

    r3840760 rd56089a  
    6868void run_trace(char *uri)
    6969{
    70         struct libtrace_packet_t *packet = trace_packet_create();
     70        struct libtrace_packet_t *packet = trace_create_packet();
    7171        int i;
    7272        uint64_t count = 0;
  • examples/erfsplit/erfsplit.c

    r3840760 rd56089a  
    7575        time_t ts = 0;
    7676        uint64_t number = 0;
    77         struct libtrace_packet_t *packet = trace_packet_create();
     77        struct libtrace_packet_t *packet = trace_create_packet();
    7878        parse_cmdline(argc,argv);
    7979
  • examples/event/rate-tracetime.c

    r3840760 rd56089a  
    100100        int psize = 0;
    101101        struct libtrace_ip *ipptr = 0;
    102         struct libtrace_packet_t *packet = trace_packet_create();
     102        struct libtrace_packet_t *packet = trace_create_packet();
    103103        uint32_t last_second = 0;
    104104        double ts = 0.0;
  • examples/event/rate.c

    r3840760 rd56089a  
    105105        struct sigaction sigact;
    106106        struct libtrace_ip *ipptr = 0;
    107         struct libtrace_packet_t *packet = trace_packet_create();
     107        struct libtrace_packet_t *packet = trace_create_packet();
    108108
    109109        struct itimerval itv;
  • examples/munge/munge.c

    r3840760 rd56089a  
    177177        struct libtrace_filter_t *filter = NULL;
    178178        struct libtrace_t *trace = 0;
    179         struct libtrace_packet_t *packet = trace_packet_create();
     179        struct libtrace_packet_t *packet = trace_create_packet();
    180180        struct libtrace_out_t *writer = 0;
    181181        bool enc_source = false;
     
    260260                // no output specified, output in same format to stdout
    261261                asprintf(&output,"%s:-","erf");
    262                 writer = trace_output_create(output);
     262                writer = trace_create_output(output);
    263263        } else {
    264                 writer = trace_output_create(argv[optind +1]);
     264                writer = trace_create_output(argv[optind +1]);
    265265        }
    266266        if (!writer) {
    267                 trace_perror("trace_output_create");
     267                trace_perror("trace_create_output");
    268268                return 1;
    269269        }
  • examples/pcap2erf/pcap2erf.c

    r3840760 rd56089a  
    7272   
    7373    struct pcap_pkthdr *header;
    74     struct libtrace_packet_t *packet = trace_packet_create();
     74    struct libtrace_packet_t *packet = trace_create_packet();
    7575    unsigned long seconds, subseconds;
    7676    unsigned short rlen, lctr, wlen, offset, pad;
  • examples/protocol/protocol.c

    r3840760 rd56089a  
    9898
    9999        struct libtrace_ip *ipptr = 0;
    100         struct libtrace_packet_t *packet = trace_packet_create();
     100        struct libtrace_packet_t *packet = trace_create_packet();
    101101       
    102102        int psize;
  • examples/rate/rate-dir.c

    r3840760 rd56089a  
    117117        int direction = 0;
    118118        struct libtrace_ip *ipptr = 0;
    119         struct libtrace_packet_t *packet = trace_packet_create();
     119        struct libtrace_packet_t *packet = trace_create_packet();
    120120       
    121121        uint32_t last_second = 0;
  • examples/rate/rate.c

    r3840760 rd56089a  
    9595        int psize = 0;
    9696        struct libtrace_ip *ipptr = 0;
    97         struct libtrace_packet_t *packet = trace_packet_create();
     97        struct libtrace_packet_t *packet = trace_create_packet();
    9898
    9999        uint32_t last_second = 0;
  • examples/rxtest/rxtest.c

    r3840760 rd56089a  
    5353int main(int argc, char **argv) {
    5454
    55         struct libtrace_packet_t *packet = trace_packet_create();
     55        struct libtrace_packet_t *packet = trace_create_packet();
    5656        dag_record_t *erfptr;
    5757       
  • examples/sample/sample.c

    r3840760 rd56089a  
    6464        int psize = 0;
    6565        struct libtrace_ip *ipptr = 0;
    66         struct libtrace_packet_t *packet = trace_packet_create();
     66        struct libtrace_packet_t *packet = trace_create_packet();
    6767        struct libtrace_filter_t *filter = 0;
    6868
  • examples/tracedump/tracedump.c

    r3840760 rd56089a  
    3535int main(int argc, char *argv[]) {
    3636
    37         struct libtrace_packet_t *packet = trace_packet_create();
     37        struct libtrace_packet_t *packet = trace_create_packet();
    3838        struct libtrace_t *trace;
    3939
  • examples/tracemark/tracemark.c

    r3840760 rd56089a  
    5858void run_trace(char *uri)
    5959{
    60         struct libtrace_packet_t *packet = trace_packet_create();
     60        struct libtrace_packet_t *packet = trace_create_packet();
    6161        uint64_t count = 0;
    6262        uint64_t bytes = 0;
  • tools/traceanon/traceanon.c

    r3840760 rd56089a  
    100100        char *key = NULL;
    101101        struct libtrace_t *trace = 0;
    102         struct libtrace_packet_t *packet = trace_packet_create();
     102        struct libtrace_packet_t *packet = trace_create_packet();
    103103        struct libtrace_out_t *writer = 0;
    104104        bool enc_source = false;
     
    165165                // no output specified, output in same format to stdout
    166166                asprintf(&output,"%s:-","erf");
    167                 writer = trace_output_create(output);
     167                writer = trace_create_output(output);
    168168        } else {
    169                 writer = trace_output_create(argv[optind +1]);
     169                writer = trace_create_output(argv[optind +1]);
    170170        }
    171171        if (!writer) {
    172                 trace_perror("trace_output_create");
     172                trace_perror("trace_create_output");
    173173                return 1;
    174174        }
  • tools/tracedump/tracedump.cc

    r3840760 rd56089a  
    2020{
    2121        struct libtrace_t *trace = NULL;
    22         struct libtrace_packet_t *packet = trace_packet_create();
     22        struct libtrace_packet_t *packet = trace_create_packet();
    2323        struct libtrace_filter_t *filter=NULL;
    2424        uint64_t count=0;
  • tools/tracemerge/tracemerge.c

    r3840760 rd56089a  
    5050                usage(argv[0]);
    5151
    52         output=trace_output_create(argv[optind]);
     52        output=trace_create_output(argv[optind]);
    5353        if (!output) {
    5454                fprintf(stderr,"Unable to open output file %s\n",argv[optind]);
     
    6363                struct libtrace_packet_t *p;
    6464                f=trace_create(argv[i+optind]);
    65                 p=trace_packet_create();
     65                p=trace_create_packet();
    6666                input[i]=f;
    6767                packet[i]=p;
     
    111111               
    112112        }
    113         trace_output_destroy(output);
     113        trace_destroy_output(output);
    114114
    115115        return 0;
  • tools/tracereport/tracereport.c

    r3840760 rd56089a  
    6161void run_trace(char *uri)
    6262{
    63         struct libtrace_packet_t *packet = trace_packet_create();
     63        struct libtrace_packet_t *packet = trace_create_packet();
    6464
    6565        fprintf(stderr,"%s:\n",uri);
  • tools/tracertstats/tracertstats.c

    r95db152 rd56089a  
    9191void run_trace(char *uri)
    9292{
    93         struct libtrace_packet_t *packet = trace_packet_create();
     93        struct libtrace_packet_t *packet = trace_create_packet();
    9494        int i;
    9595        uint64_t count = 0;
  • tools/tracesplit/tracesplit.c

    r3840760 rd56089a  
    4444        struct libtrace_out_t *output = NULL;
    4545        struct libtrace_t *input;
    46         struct libtrace_packet_t *packet = trace_packet_create();
     46        struct libtrace_packet_t *packet = trace_create_packet();
    4747        uint64_t count=UINT64_MAX;
    4848        uint64_t bytes=UINT64_MAX;
     
    129129
    130130                if (output && trace_get_seconds(packet)>firsttime+interval) {
    131                         trace_output_destroy(output);
     131                        trace_destroy_output(output);
    132132                        output=NULL;
    133133                        firsttime+=interval;
     
    136136                pktcount++;
    137137                if (output && pktcount%count==0) {
    138                         trace_output_destroy(output);
     138                        trace_destroy_output(output);
    139139                        output=NULL;
    140140                }
     
    142142                totbytes+=trace_get_capture_length(packet);
    143143                if (output && totbytes-totbyteslast>=bytes) {
    144                         trace_output_destroy(output);
     144                        trace_destroy_output(output);
    145145                        output=NULL;
    146146                        totbyteslast=totbytes;
     
    163163                                buffer=strdupcati(buffer,++filenum);
    164164                        }
    165                         output=trace_output_create(buffer);
     165                        output=trace_create_output(buffer);
    166166                        free(buffer);
    167167                }
     
    171171
    172172        if (!output)
    173                 trace_output_destroy(output);
     173                trace_destroy_output(output);
    174174
    175175        return 0;
  • tools/tracestats/tracestats.c

    r3840760 rd56089a  
    6868void run_trace(char *uri)
    6969{
    70         struct libtrace_packet_t *packet = trace_packet_create();
     70        struct libtrace_packet_t *packet = trace_create_packet();
    7171        int i;
    7272        uint64_t count = 0;
Note: See TracChangeset for help on using the changeset viewer.