#include <epan/disabled_protos.h>
#include <epan/prefs.h>
#include <epan/column.h>
+#include <epan/decode_as.h>
#include <epan/print.h>
#include <epan/addr_resolv.h>
#ifdef HAVE_LIBPCAP
/* Scan for plugins. This does *not* call their registration routines;
that's done later. */
- scan_plugins();
+ scan_plugins(REPORT_LOAD_FAILURE);
/* Register all libwiretap plugin modules. */
register_all_wiretap_modules();
by stats_tree_stat.c and need to registered before that */
#ifdef HAVE_PLUGINS
register_all_plugin_tap_listeners();
+#endif
+#ifdef HAVE_EXTCAP
+ extcap_register_preferences();
#endif
register_all_tap_listeners();
conversation_table_set_gui_info(init_iousers);
XXX - we do this here, for now, to support "-G" with no arguments.
If none of our build or other processes uses "-G" with no arguments,
we can just process it with the other arguments. */
-fprintf(stderr, "Checking for -G\n");
if (argc >= 2 && strcmp(argv[1], "-G") == 0) {
-fprintf(stderr, "-G detected\n");
proto_initialize_all_prefixes();
-fprintf(stderr, "proto_initialize_all_prefixes() returned\n");
if (argc == 2)
-{
-fprintf(stderr, "calling proto_registrar_dump_fields()\n");
proto_registrar_dump_fields();
-fprintf(stderr, "proto_registrar_dump_fields() returned\n");
-}
else {
if (strcmp(argv[2], "column-formats") == 0)
column_dump_column_formats();
return 1;
}
}
-fprintf(stderr, "About to return\n");
return 0;
}
* cruft getting in the way. Makes the results of running
* $ ./tools/valgrind-wireshark -n
* much more useful. */
+ epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
- epan_cleanup();
return 0;
case 'O': /* Only output these protocols */
/* already processed; just ignore it now */
if (!dfilter_compile(rfilter, &rfcode, &err_msg)) {
cmdarg_err("%s", err_msg);
g_free(err_msg);
+ epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
- epan_cleanup();
#ifdef HAVE_PCAP_OPEN_DEAD
{
pcap_t *pc;
if (!dfilter_compile(dfilter, &dfcode, &err_msg)) {
cmdarg_err("%s", err_msg);
g_free(err_msg);
+ epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
- epan_cleanup();
#ifdef HAVE_PCAP_OPEN_DEAD
{
pcap_t *pc;
* We're reading a capture file.
*/
if (cf_open(&cfile, cf_name, in_file_type, FALSE, &err) != CF_OK) {
+ epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
- epan_cleanup();
return 2;
}
draw_tap_listeners(TRUE);
funnel_dump_all_text_windows();
epan_free(cfile.epan);
+ epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
- epan_cleanup();
output_fields_free(output_fields);
output_fields = NULL;
switch (col_item->col_fmt) {
case COL_NUMBER:
column_len = col_len = strlen(col_item->col_data);
- if (column_len < 3)
- column_len = 3;
+ if (column_len < 5)
+ column_len = 5;
line_bufp = get_line_buf(buf_offset + column_len);
put_spaces_string(line_bufp + buf_offset, col_item->col_data, col_len, column_len);
break;