BIND 10 #2233: Option Definition Design - V6 Options

BIND 10 Development do-not-reply at isc.org
Thu Oct 4 16:25:19 UTC 2012


#2233: Option Definition Design - V6 Options
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  marcin
  stephen                            |                Status:  reviewing
                       Type:  task   |             Milestone:  Sprint-
                   Priority:         |  DHCP-20121004
  medium                             |            Resolution:
                  Component:         |             Sensitive:  0
  dhcpconf                           |           Sub-Project:  DHCP
                   Keywords:         |  Estimated Difficulty:  0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by marcin):

 I updated the list of tasks with more comprehensive description and added
 some that had been omitted earlier. This may be useful to create tickets
 for the following sprints.

 Note: I am going to respond to the review in the next turn.

 ----

 '''Basic OptionDefinition class implementation without suboptions'''
 OptionDefinition class represents the option definition for single option
 instance. In particular, it holds data type (or data types) conveyed by
 the particular option. The data type may be any of predefined option
 types, e.g. uint8, uint16 etc, or it can be record of multiple different
 data types. Setting option type to 'record' allows to specify data types
 carried by the record. It is also possible to provide array indicator
 which specifies that there are multiple 'single values' or multiple
 'records' within the option. When OptionDefinition instance is created it
 returns the most appropriate 'factory' function to create the option for
 the specified definition. The 'factory' function uses raw buffer as an
 input to create the instance ot the option.
 The 'basic' implementation does not provide 'encapsulation' capabilities.

 '''Custom Option implementation'''
 If the specified user option definition does not match any standard
 'factory' function the CustomOption instance is returned. CustomOption is
 derived from Option class and it provides generic approch to access option
 data fields - using array index, field name within the record etc.

 '''Custom namespaces (including vendor spaces)'''
 Custom namespaces play important role when it comes to specification of
 vendor options or options that encapsulate other options. In DHCPv4 the
 pool of available option codes is limited because option code value is
 uint8. For this reason option codes may be not unique and supplementary
 information is needed to identify the particular option - namespace. Since
 namespaces can group options it becomes conevnient to use namespace name
 in the OptionDefinition to point out that the particular option
 encapsulates multiple other options (belonging to the namespace). We need
 a way to specify namespaces through the Configuration Manager. This task
 assumes creation of Namespace class that holds namespace attributes.

 '''Namespace encapsulation by Option'''
 This task involves creating a "link" between OptionDefinition and
 available namespaces. In other words, we need to extend the
 OptionDefinition implementation to store the namespace(s) the particular
 option belongs to.

 '''Extensions to option lookup mechanism'''
 We need a way to search for the option factory function, option definition
 and option value using not only option code but combination of option code
 and namespace.

 '''Extend "Subnet" with OptionCollection structure'''
 Options may be configured with different values for different subnets.
 Tomek has already implemented the support for subnet configuration and
 created corresponding Subnet object. We need to extend the Subnet class
 with OptionCollection structure that will store instances of options that
 have been configured. This task should be quick but we need to make sure
 that it is possible to search for the particular option within this data
 structure using either option code or namespace it belongs to.

 '''Setting option definitions from Configuration Manager'''
 We need to create/extend the .spec file that will hold the data structure
 to define the option definitions. Also, we need to extend the
 configuration parser to read the data and create instances of option
 definitions.

 '''Setting option values from from Configuration Manager'''
 We need to create/extend the .spec file to store option values in it.
 Also, we need to read option values from the configuration data base.
 Based on this, we need to create Option instances for each option for
 which data has been specified and put this in the OptionCollection data
 structure (in Subnet object).

 '''Setting Namespaces from the Configuration Manager.'''
 We need to provide the way to create new namespace using Configuration
 Manager.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2233#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list