Permalink
Browse files

Add the -c switch to allow save_to_pcap to write to classic PCap

  • Loading branch information...
1 parent f987124 commit a40b63c51349402621dd870ff59ee38ef2a79737 @matthiasl committed Dec 16, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 c/save_to_pcap.c
View
@@ -821,15 +821,16 @@ process_arguments(char **argv,
char **hostname,
Channel_t channels[],
int *n_channels,
- char **base_filename)
+ char **base_filename,
+ enum PCap_format *format)
{
int current_arg;
while (argc > 1 && argv[1][0] == '-') {
switch (argv[1][1]) {
- case 'm': *monitoring = 1; break;
+ case 'c': *format = PCAP_CLASSIC; break;
- case 'v': *verbose = 1; break;
+ case 'm': *monitoring = 1; break;
case 'n':
if (argc < 3) {
@@ -841,6 +842,8 @@ process_arguments(char **argv,
}
break;
+ case 'v': *verbose = 1; break;
+
default: usage();
}
argc--;
@@ -896,7 +899,7 @@ main(int argc, char **argv)
process_arguments(argv, argc,
&monitoring, &verbose, &n_sus_per_file, &hostname,
- channels, &n_channels, &base_filename);
+ channels, &n_channels, &base_filename, &format);
result = gth_connect(&api, hostname, verbose);
if (result != 0) {

0 comments on commit a40b63c

Please sign in to comment.