Thanks, so that's the same as
struct file_type_subtype_info {
    /* the file type name */
    /* should be NULL for all "pseudo" types that are only internally used and 
not read/writeable */
    const char *name;

shouldn't hurt to put those clarifications in the file :-))

From: wireshark-dev-boun...@wireshark.org 
[mailto:wireshark-dev-boun...@wireshark.org] On Behalf Of Pascal Quantin
Sent: den 6 mars 2014 15:57
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] FW: [Wireshark-commits] master 579e7e1: Wireshark: 
Add option to choose format type of capture file

Hi Anders,

name is the string that appears in the file open dialog, allowing you to know 
which format you are selecting.
Cheers,
Pascal.

2014-03-06 15:53 GMT+01:00 Anders Broman 
<anders.bro...@ericsson.com<mailto:anders.bro...@ericsson.com>>:
Hi,
This change broke a custom wiretap plugin I have which used 
wtap_register_magic_number_open_routine() which now is #if 0:ed out.
I gather I should now use wtap_register_open_info() with
const struct open_info

Unfortunately there isn't a good description of the content of the struct:
struct open_info {
    const char *name;                                              /**< ? */
    int type;                                                               
/**< One of OPEN_INFO_MAGIC or OPEN_INFO_HEURISTIC */
    wtap_open_routine_t open_routine;                 /**< Callback */
    const char *extensions;                                     /**<  "I'm 
guessing" the default file extension, used to save this type should be NULL if 
no default extension is known */
};

What should "*name" be?

Regards
Anders



-----Original Message-----
From: 
wireshark-commits-boun...@wireshark.org<mailto:wireshark-commits-boun...@wireshark.org>
 
[mailto:wireshark-commits-boun...@wireshark.org<mailto:wireshark-commits-boun...@wireshark.org>]
 On Behalf Of Wireshark code review
Sent: den 25 februari 2014 18:43
To: wireshark-comm...@wireshark.org<mailto:wireshark-comm...@wireshark.org>
Subject: [Wireshark-commits] master 579e7e1: Wireshark: Add option to choose 
format type of capture file

URL: 
https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=579e7e19ce8e5f1a6e16b75f130ad4b001157ca5
Submitter: Evan Huus (eapa...@gmail.com<mailto:eapa...@gmail.com>)
Changed: branch: master
Repository: wireshark

Commits:

579e7e1 by Michal Labedzki 
(michal.labed...@tieto.com<mailto:michal.labed...@tieto.com>):

    Wireshark: Add option to choose format type of capture file

    The best heuristic can fail, so add possibility to manually choose
    capture file format type, so not correctly recognize file format can be
    loaded in Wireshark.

    On the other side now it is possible to open capture file
    as file format to be dissected.

    Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a
    Reviewed-on: https://code.wireshark.org/review/16
    Reviewed-by: Michal Labedzki 
<michal.labed...@tieto.com<mailto:michal.labed...@tieto.com>>
    Reviewed-by: Hadriel Kaplan <hadri...@yahoo.com<mailto:hadri...@yahoo.com>>
    Reviewed-by: Evan Huus <eapa...@gmail.com<mailto:eapa...@gmail.com>>
    Tested-by: Evan Huus <eapa...@gmail.com<mailto:eapa...@gmail.com>>


Actions performed:

    from  b6aae8d   Change libsmi url and Lua version in macosx-setup.sh
    adds  579e7e1   Wireshark: Add option to choose format type of capture file


Summary of changes:
 capinfos.c                    |    3 +-
 capture.c                     |    4 +-
 capture_info.c                |    2 +-
 captype.c                     |    3 +-
 editcap.c                     |    3 +-
 file.c                        |   10 +-
 file.h                        |    3 +-
 reordercap.c                  |    4 +-
 tfshark.c                     |    8 +-
 tshark.c                      |   10 +-
 ui/gtk/capture_file_dlg.c     |   31 ++++-
 ui/gtk/drag_and_drop.c        |    4 +-
 ui/gtk/file_import_dlg.c      |    2 +-
 ui/gtk/fileset_dlg.c          |    2 +-
 ui/gtk/funnel_stat.c          |    2 +-
 ui/gtk/main.c                 |    4 +-
 ui/gtk/main_menubar.c         |    4 +-
 ui/qt/capture_file_dialog.cpp |   18 ++-
 ui/qt/capture_file_dialog.h   |    5 +-
 ui/qt/main.cpp                |    2 +
 ui/qt/main_window.cpp         |    2 +-
 ui/qt/main_window_slots.cpp   |    5 +-
 ui/tap_export_pdu.c           |    2 +-
 ui/win32/file_dlg_win32.c     |    2 +-
 wiretap/file_access.c         |  272 +++++++++++++++++++----------------------
 wiretap/merge.c               |    2 +-
 wiretap/wtap.h                |   23 +++-
 27 files changed, 242 insertions(+), 190 deletions(-) 
___________________________________________________________________________
Sent via:    Wireshark-commits mailing list 
<wireshark-comm...@wireshark.org<mailto:wireshark-comm...@wireshark.org>>
Archives:    http://www.wireshark.org/lists/wireshark-commits
Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
             
mailto:wireshark-commits-requ...@wireshark.org<mailto:wireshark-commits-requ...@wireshark.org>?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list 
<wireshark-dev@wireshark.org<mailto:wireshark-dev@wireshark.org>>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             
mailto:wireshark-dev-requ...@wireshark.org<mailto:wireshark-dev-requ...@wireshark.org>?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to