Register a few more file extensions as belonging to Wireshark.
[metze/wireshark/wip.git] / wiretap / file_access.c
index ac383ccc16de7e0d0d134b79eaf4030efb704f38..f138376428b358d5ffc30e05459dddebdeae85bb 100644 (file)
@@ -307,6 +307,17 @@ wtap_get_all_file_extensions_list(void)
  * type to interpret it as, if the file name has no extension, the
  * extension isn't sufficient to determine the appropriate file type,
  * or the extension is wrong.
+ *
+ * NOTE: when adding file formats to this list you may also want to add them
+ * to the following files so that the various desktop environments will
+ * know that Wireshark can open the file:
+ *     1) wireshark-mime-package.xml (for freedesktop.org environments)
+ *     2) packaging/macosx/Info.plist.in (for OS X)
+ *     3) packaging/nsis/AdditionalTasksPage.ini, packaging/nsis/common.nsh,
+ *        and packaging/wix/ComponentGroups.wxi (for Windows)
+ *
+ * If your file format has an expected extension (e.g., ".pcap") then you
+ * should probably also add it to file_type_extensions_base[] (in this file).
  */
 static struct open_info open_info_base[] = {
        { "Wireshark/tcpdump/... - pcap",           OPEN_INFO_MAGIC,     libpcap_open,             "pcap",     NULL, NULL },
@@ -335,7 +346,7 @@ static struct open_info open_info_base[] = {
        /* Gammu DCT3 trace must come before MIME files as it's XML based*/
        { "Gammu DCT3 trace",                       OPEN_INFO_MAGIC,     dct3trace_open,           NULL,       NULL, NULL },
        { "MIME Files Format",                      OPEN_INFO_MAGIC,     mime_file_open,           NULL,       NULL, NULL },
-       { "Micropross mplog",                       OPEN_INFO_MAGIC,     mplog_open,             "mplog",      NULL, NULL },
+       { "Micropross mplog",                       OPEN_INFO_MAGIC,     mplog_open,               "mplog",    NULL, NULL },
        { "Novell LANalyzer",                       OPEN_INFO_HEURISTIC, lanalyzer_open,           "tr1",      NULL, NULL },
        /*
         * PacketLogger must come before MPEG, because its files
@@ -388,7 +399,7 @@ static struct open_info open_info_base[] = {
 
 /* this is only used to build the dynamic array on load, do NOT use this
  * for anything else, because the size of the actual array will change if
- *  Lua scripts register a new file reader.
+ * Lua scripts register a new file reader.
  */
 #define N_OPEN_INFO_ROUTINES  ((sizeof open_info_base / sizeof open_info_base[0]))
 
@@ -2193,7 +2204,8 @@ wtap_dump_init_dumper(int file_type_subtype, int encap, int snaplen, gboolean co
                descr_mand->time_units_per_second = 1000000; /* default microsecond resolution */
                descr_mand->link_type = wtap_wtap_encap_to_pcap_encap(encap);
                descr_mand->snap_len = snaplen;
-               wtap_optionblock_set_option_string(descr, OPT_IDB_NAME, "Unknown/not available in original file format(libpcap)");
+               wtap_optionblock_set_option_string(descr, OPT_IDB_NAME, "Unknown/not available in original file format(libpcap)",
+                                                                                                               strlen("Unknown/not available in original file format(libpcap)"));
 
                descr_mand->num_stat_entries = 0;          /* Number of ISB:s */
                descr_mand->interface_statistics = NULL;