From 8fcdcb9c95e7436c4da02d39df048f4a1fbeca9c Mon Sep 17 00:00:00 2001 From: Hadriel Kaplan Date: Sun, 16 Aug 2015 12:37:11 -0400 Subject: Improve file merging for mergecap and wireshark Refactor the file merging code by removing the duplicate logic from mergecap.c and file.c's cf_merge_files(), into a new merge_files() function in merge.c. Also the following user-visible changes: * Removed the '-T' encap type option from mergecap, as it's illogical for mergecap and would complicate common merge code. * Input files with IDBs of different name, speed, tsprecision, etc., will produce an output PCAPNG file with separate IDBs, even if their encap types are the same. * Added a '-I' IDB merge mode option for mergecap, to control how IDBs are merged. * Changed Wireshark's drag-and-drop merging to use PCAPNG instead of PCAP. Bug: 8795 Bug: 7381 Change-Id: Icc30d217e093d6f40114422204afd2e332834f71 Reviewed-on: https://code.wireshark.org/review/10058 Petri-Dish: Hadriel Kaplan Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- wiretap/wtap.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'wiretap/wtap.h') diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 1f9b4e1e84..e3b4e5166d 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1734,6 +1734,18 @@ void wtap_write_shb_comment(wtap *wth, gchar *comment); WS_DLL_PUBLIC wtapng_iface_descriptions_t *wtap_file_get_idb_info(wtap *wth); +/** + * @brief Gets a debug string of an interface description. + * @details Returns a newly allocated string of debug information about + * the given interface descrption, useful for debugging. + * @note The returned pointer must be g_free'd. + * + * @param if_descr The interface description. + * @return A newly allocated gcahr array string, which must be g_free'd. + */ +WS_DLL_PUBLIC +gchar *wtap_get_debug_if_descr(const wtapng_if_descr_t *if_descr); + /** * @brief Gets new name resolution info for new file, based on existing info. * @details Creates a new wtapng_name_res_t name resolution info and only -- cgit v1.2.3