From b8ce02e6fb43dedb8d1a480a154cc7cca0c5c353 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 21 Feb 2021 09:46:59 -0800 Subject: [PATCH] editcap: Fixup our help output. Make sure list_capture_types prints to the designated stream so that tools/update-tools-help.py works correctly for `editcap -F`. --- docbook/wsug_src/editcap-F.txt | 36 ++++++++++++++++++++++++++++++++++ editcap.c | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/docbook/wsug_src/editcap-F.txt b/docbook/wsug_src/editcap-F.txt index 1ae0dab2e35..96310118d8b 100644 --- a/docbook/wsug_src/editcap-F.txt +++ b/docbook/wsug_src/editcap-F.txt @@ -1 +1,37 @@ editcap: The available capture file types for the "-F" flag are: + pcap - Wireshark/tcpdump/... - pcap + pcapng - Wireshark/... - pcapng + 5views - InfoVista 5View capture + btsnoop - Symbian OS btsnoop + commview - TamoSoft CommView + dct2000 - Catapult DCT2000 trace (.out format) + eyesdn - EyeSDN USB S0/E1 ISDN trace format + k12text - K12 text file + lanalyzer - Novell LANalyzer + logcat - Android Logcat Binary format + logcat-brief - Android Logcat Brief text format + logcat-long - Android Logcat Long text format + logcat-process - Android Logcat Process text format + logcat-tag - Android Logcat Tag text format + logcat-thread - Android Logcat Thread text format + logcat-threadtime - Android Logcat Threadtime text format + logcat-time - Android Logcat Time text format + modpcap - Modified tcpdump - pcap + netmon1 - Microsoft NetMon 1.x + netmon2 - Microsoft NetMon 2.x + nettl - HP-UX nettl trace + ngsniffer - Sniffer (DOS) + ngwsniffer_1_1 - NetXray, Sniffer (Windows) 1.1 + ngwsniffer_2_0 - Sniffer (Windows) 2.00x + niobserver - Network Instruments Observer + nokiapcap - Nokia tcpdump - pcap + nsecpcap - Wireshark/tcpdump/... - nanosecond pcap + nstrace10 - NetScaler Trace (Version 1.0) + nstrace20 - NetScaler Trace (Version 2.0) + nstrace30 - NetScaler Trace (Version 3.0) + nstrace35 - NetScaler Trace (Version 3.5) + rf5 - Tektronix K12xx 32-bit .rf5 format + rh6_1pcap - RedHat 6.1 tcpdump - pcap + snoop - Sun snoop + suse6_3pcap - SuSE 6.3 tcpdump - pcap + visual - Visual Networks traffic capture diff --git a/editcap.c b/editcap.c index 0fc4c150018..86712f5073c 100644 --- a/editcap.c +++ b/editcap.c @@ -894,7 +894,7 @@ list_capture_types(FILE *stream) { writable_type_subtypes = wtap_get_writable_file_types_subtypes(FT_SORT_BY_NAME); for (guint i = 0; i < writable_type_subtypes->len; i++) { int ft = g_array_index(writable_type_subtypes, int, i); - fprintf(stderr, " %s - %s\n", wtap_file_type_subtype_name(ft), + fprintf(stream, " %s - %s\n", wtap_file_type_subtype_name(ft), wtap_file_type_subtype_description(ft)); } g_array_free(writable_type_subtypes, TRUE);