• Guy Harris's avatar
    Redo the block options APIs. · 1f8999bb
    Guy Harris authored
    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/16444Reviewed-by: 's avatarGuy Harris <guy@alum.mit.edu>
    1f8999bb
summary.c 7.6 KB