Those aren't capture options, they're the options we must process early.
The only one of those options that has anything to do with packet capture is -i, and all we do there is check for an argument of "-"; the rest are either 1) options that affect your preference settings (-C to select the profile, -P to set the personal file directory path); 2) options that just print something to the standard output or error and exit, before firing up the GUI; 3) extension command line options (-X). Change-Id: Iba9b8b14fe468e2ca9d4c67e1a9b8103603678d9 Reviewed-on: https://code.wireshark.org/review/16019 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
147b3d5149
commit
42985f4f17
|
@ -192,7 +192,7 @@ static const struct option long_options[] = {
|
|||
};
|
||||
static const char optstring[] = OPTSTRING;
|
||||
|
||||
void commandline_capture_options(int argc, char *argv[], commandline_capture_param_info_t* param_info)
|
||||
void commandline_early_options(int argc, char *argv[], commandline_capture_param_info_t* param_info)
|
||||
{
|
||||
int opt;
|
||||
#ifdef HAVE_LIBPCAP
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef struct commandline_capture_param_info
|
|||
#endif
|
||||
} commandline_capture_param_info_t;
|
||||
|
||||
extern void commandline_capture_options(int argc, char *argv[], commandline_capture_param_info_t* param_info);
|
||||
extern void commandline_early_options(int argc, char *argv[], commandline_capture_param_info_t* param_info);
|
||||
|
||||
/* Command-line options that don't have direct API calls to handle the data */
|
||||
typedef struct commandline_param_info
|
||||
|
|
|
@ -2203,7 +2203,7 @@ main(int argc, char *argv[])
|
|||
rf_path, g_strerror(rf_open_errno));
|
||||
}
|
||||
|
||||
commandline_capture_options(argc, argv, &capture_param_info);
|
||||
commandline_early_options(argc, argv, &capture_param_info);
|
||||
|
||||
/* Init the "Open file" dialog directory */
|
||||
/* (do this after the path settings are processed) */
|
||||
|
|
|
@ -453,7 +453,7 @@ int main(int argc, char *argv[])
|
|||
g_free(rf_path);
|
||||
}
|
||||
|
||||
commandline_capture_options(argc, ws_argv, &capture_param_info);
|
||||
commandline_early_options(argc, ws_argv, &capture_param_info);
|
||||
|
||||
#ifdef _WIN32
|
||||
reset_library_path();
|
||||
|
|
Loading…
Reference in New Issue