Changeset 0eef5d4


Ignore:
Timestamp:
05/29/06 14:33:24 (15 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:
c2cb712
Parents:
853603a
Message:

Upgrade the skeletons to the new API

Location:
examples/skeleton
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • examples/skeleton/Makefile

    r7533845 r0eef5d4  
    66
    77clean:
    8         rm -f trivial complete *.o
     8        rm -f trivial complete event output *.o
  • examples/skeleton/complete.c

    r48a20e3 r0eef5d4  
    4646                switch (c) {
    4747                        case 'f':
    48                                 filter=trace_bpf_setfilter(optarg);
     48                                filter=trace_create_filter(optarg);
    4949                                break;
    5050                        case 's':
     
    104104                }
    105105
     106                trace_destroy_packet(packet);
     107
    106108                if (trace_is_err(trace)) {
    107109                        trace_perror(trace,"Reading packets");
  • examples/skeleton/event.c

    r7533845 r0eef5d4  
    108108        int psize = 0;
    109109        char *uri = 0;
    110         uint32_t last_second = 0;
    111         double ts = 0.0;
    112         int pkt_count = 0;
    113         int byte_count = 0;
    114110       
    115111        if (argc >= 2) {
     
    146142        free(uri);
    147143        trace_destroy(trace);
    148         trace_destroy_packet(&packet);
     144        trace_destroy_packet(packet);
    149145        return 0;
    150146
  • examples/skeleton/output.c

    r7533845 r0eef5d4  
    7373                        trace_destroy(trace);
    7474                        trace_destroy_output(output);
    75                         trace_destroy_packet(&packet);
     75                        trace_destroy_packet(packet);
    7676                        return 1;
    7777                }
     
    8484                trace_destroy(trace);
    8585                trace_destroy_output(output);
    86                 trace_destroy_packet(&packet);
     86                trace_destroy_packet(packet);
    8787                return 1;
    8888        }
     
    9090        trace_destroy(trace);
    9191        trace_destroy_output(output);
    92         trace_destroy_packet(&packet);
     92        trace_destroy_packet(packet);
    9393       
    9494        return 0;
  • examples/skeleton/trivial.c

    r48a20e3 r0eef5d4  
    4545        }
    4646
     47        trace_destroy_packet(packet);
     48
    4749        if (trace_is_err(trace)) {
    4850                trace_perror(trace,"Reading packets");
Note: See TracChangeset for help on using the changeset viewer.