Wireshark-commits: [Wireshark-commits] master 1f8999b: Redo the block options APIs.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 14 Jul 2016 23:02:58 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1f8999bb96018446e48529e75e56bf17dd3c77cf
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

1f8999b by Guy Harris (guy@xxxxxxxxxxxx):

    Redo the block options APIs.
    
    A block can have zero or more instances of a given option.  We
    distinguish between "one instance only" options, where a block can have
    zero or one instance, and "multiple instances allowed" options, where a
    block can have zero or more instances.
    
    For "one instance only" options:
    
    	"add" routines add an instance if there isn't one already
    	and fail if there is;
    
    	"set" routines add an instance if there isn't one already
    	and change the value of the existing instance if there is one;
    
    	"set nth" routines fail;
    
    	"get" routines return the value of the instance if there is one
    	and fail if there isn't;
    
    	"get nth" routines fail.
    
    For "multiple instances allowed" options:
    
    	"add" routines add an instance;
    
    	"set" routines fail;
    
    	"set nth" routines set the value of the nth instance if there is
    	one and fail otherwise;
    
    	"get" routines fail;
    
    	"get nth" routines get the value if the nth instance if there is
    	one and fail otherwise.
    
    Rename "optionblock" to just "block"; it describes the contents of a
    block, including both mandatory items and options.
    
    Add some support for NRB options, including IPv4 and IPv6 option types.
    
    Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e
    Reviewed-on: https://code.wireshark.org/review/16444
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  42e72d5   More 2.1.1 → 2.1.2 changes
    adds  1f8999b   Redo the block options APIs.


Summary of changes:
 capinfos.c                               |   44 +-
 cfile.c                                  |   12 +-
 editcap.c                                |   14 +-
 epan/wslua/wslua.h                       |   39 +-
 epan/wslua/wslua_capture_info.c          |    4 +-
 file.c                                   |   49 +-
 reordercap.c                             |   12 +-
 summary.c                                |   39 +-
 tshark.c                                 |   20 +-
 ui/gtk/file_import_dlg.c                 |   24 +-
 ui/gtk/summary_dlg.c                     |   45 +-
 ui/qt/capture_file_properties_dialog.cpp |   23 +-
 ui/qt/resolved_addresses_dialog.cpp      |   17 +-
 ui/tap_export_pdu.c                      |   24 +-
 wiretap/erf.c                            |   99 ++-
 wiretap/file_access.c                    |   39 +-
 wiretap/lanalyzer.c                      |    2 +-
 wiretap/merge.c                          |  241 ++++--
 wiretap/nettrace_3gpp_32_423.c           |   26 +-
 wiretap/pcapng.c                         |  730 ++++++++++--------
 wiretap/wtap.c                           |  191 +++--
 wiretap/wtap.h                           |   59 +-
 wiretap/wtap_opttypes.c                  | 1238 ++++++++++++++++++++----------
 wiretap/wtap_opttypes.h                  |  294 +++++--
 24 files changed, 2043 insertions(+), 1242 deletions(-)