int
main(int argc, char **argv)
{
+ char *init_progfile_dir_error;
char *text;
char *gpf_path, *pf_path;
int gpf_open_errno, gpf_read_errno;
*/
get_credential_info();
+ /*
+ * Attempt to get the pathname of the executable file.
+ */
+ init_progfile_dir_error = init_progfile_dir(argv[0]);
+ if (init_progfile_dir_error != NULL) {
+ fprintf(stderr, "dftest: Can't get pathname of dftest program: %s.\n",
+ init_progfile_dir_error);
+ }
+
timestamp_set_type(TS_RELATIVE);
- /* register all dissectors; we must do this before checking for the
- "-g" flag, as the "-g" flag dumps a list of fields registered
- by the dissectors, and we must do it before we read the preferences,
- in case any dissectors register preferences. */
- epan_init(PLUGIN_DIR,register_all_protocols,
- register_all_protocol_handoffs,
+ /* Register all dissectors; we must do this before checking for the
+ "-g" flag, as the "-g" flag dumps a list of fields registered
+ by the dissectors, and we must do it before we read the preferences,
+ in case any dissectors register preferences. */
+ epan_init(register_all_protocols,
+ register_all_protocol_handoffs, NULL, NULL,
failure_message, open_failure_message, read_failure_message);
/* now register the preferences for any non-dissector modules.
/* Check for filter on command line */
if (argc <= 1) {
- fprintf(stderr, "Usage: dftest filter\n");
+ fprintf(stderr, "Usage: dftest <filter>\n");
exit(1);
}