Ignore:
Timestamp:
04/27/07 23:01:31 (14 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:
cbce651
Parents:
466aed6
Message:

More warnings squashed, tracesplit_dir now reports the count of packets that
weren't written to the output traces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracesplit/tracesplit_dir.c

    r171cc28 r63b9bd4  
    11#include "libtrace.h"
    22#include <stdio.h>
     3#include <inttypes.h>
    34
     5static uint64_t ignored = 0;
    46
    57static struct libtrace_out_t *create_output(char *uri) {
    68        struct libtrace_out_t *output = NULL;
    7         libtrace_err_t trace_err;
    89        output = trace_create_output(uri);
    910        if (trace_is_err_output(output)) {
     
    5455
    5556                switch(trace_get_direction(packet)) {
    56                         case 0:
     57                        case TRACE_DIR_INCOMING:
    5758                                if (!out_write) {
    5859                                        out_write = create_output(argv[3]);
     
    6566                                }
    6667                                break;
    67                         case 1:
     68                        case TRACE_DIR_OUTGOING:
    6869                                if (!in_write) {
    6970                                        in_write = create_output(argv[2]);
     
    7677                                }
    7778                                break;
     79                        default:
     80                                ignored++;
    7881                }
    7982
     
    8588        trace_destroy(input);
    8689        trace_destroy_packet(packet);
     90
     91        if (ignored)
     92                fprintf(stderr,"warning: Ignored %" PRIu64 " packets with unknown directions\n",
     93                                ignored);
    8794       
    8895        return 0;
Note: See TracChangeset for help on using the changeset viewer.