Changeset 66caf4b for tools/tracemerge


Ignore:
Timestamp:
06/29/06 20:58:23 (15 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
47de0aa
Parents:
b01455c
Message:

Updated the various tools to have improved usage() functions, and to support calling libtrace's trace_help() function via a -H / --libtrace-help cmdline arg. At the moment trace_help() will print out a list of the format modules and the URI schemes they support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracemerge/tracemerge.c

    r162d976 r66caf4b  
    88void usage(char *argv0)
    99{
    10         fprintf(stderr,"Usage: %s [ -i | --set-interface ] [ -u | --unique-packets ] outputuri traceuri...\n",argv0);
    11         fprintf(stderr,"\n");
    12         fprintf(stderr,"Merges traces together, with -i each trace gets it's own direction/interface,\n without traces keep whatever direction/interface they have set\n");
     10        fprintf(stderr,"Usage:\n"
     11        "%s flags outputuri traceuri [traceuri...]\n"
     12        "-i --set-interface     Each trace is allocated an interface. Default leaves this flag as read from the original traces, if appropriate\n"
     13        "-u --unique-packets    Discard duplicate packets\n"
     14        "-H --libtrace-help     Print libtrace runtime documentation\n"
     15        ,argv0);
    1316        exit(1);
    1417}
     
    3134                        { "set-interface",      0, 0, 'i' },
    3235                        { "unique-packets",     0, 0, 'u' },
    33                         { NULL,                 0, 0, 0 },
     36                        { "libtrace-help",      0, 0, 'H' },
     37                        { NULL,                 0, 0, 0   },
    3438                };
    3539
    36                 int c=getopt_long(argc, argv, "iu",
     40                int c=getopt_long(argc, argv, "iuH",
    3741                                long_options, &option_index);
    3842
     
    4347                        case 'i': set_interface=true; break;
    4448                        case 'u': unique_packets=true; break;
     49                        case 'H':
     50                                  trace_help();
     51                                  exit(1);
     52                                  break;
    4553                        default:
    4654                                fprintf(stderr,"unknown option: %c\n",c);
Note: See TracChangeset for help on using the changeset viewer.