BIND 10 #2974: Implement Hooks Framework (part 1) - all but library loading and unloading

BIND 10 Development do-not-reply at isc.org
Fri Jun 14 14:30:26 UTC 2013


#2974: Implement Hooks Framework (part 1) - all but library loading and unloading
-------------------------------------+-------------------------------------
            Reporter:  stephen       |                        Owner:
                Type:  task          |  stephen
            Priority:  medium        |                       Status:
           Component:  Unclassified  |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-DHCP-20130620
         Sub-Project:  DHCP          |                   Resolution:
Estimated Difficulty:  0             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by tomek):

 * owner:  tomek => stephen


Comment:

 Replying to [comment:11 stephen]:
 > '''Extra comment about !CalloutHandle class'''[[BR]]
 > > Final comment is about get/setArgument. We need getConstArgument() (to
 be used by library) and setConstArgument() (to be used by server only). If
 this can be achived with use of existing get/setArgument template, such
 capability should be demonstrated in tests (and later documented). That is
 needed to pass configuration parameters. For example in select_subnet hook
 point, I need to provide available subnets, so the callout can choose.
 However, the callout must not modify that configuration data (there's
 another interface for changing configuration data - bindctl and its
 restful api).
 > >
 > > Please note that tests done in !CalloutHandleTest.!PointerTypes are
 not sufficient. const Beta* x only makes the pointer constant, so it
 cannot be changed, however the object it points to can be changed. We need
 Beta* const x; (non-const pointer to a const object).
 >
 > You are incorrect in your pointer types:
 >
 > * <type>* ptr - variable pointer to variable data.
 > * const <type>* ptr - variable pointer to constant data.
 > * <type>* const ptr - constant pointer to variable data.
 > * const <type>* const ptr - constant pointer to constant data.
 >
 > (e.g. see http://duramecho.com/ComputerInformation/WhyHowCppConst.html
 or http://jriddell.org/const-in-cpp.html)
 Ok. I stand corrected.

 > Note that it doesn't make sense to copy a "const" object (as opposed to
 a pointer/reference to a const object) into the argument list. You are
 effectively passing it by value, and it is up to the user library what
 they do with it: to avoid the value being altered in the server, don't
 copy the value back from the argument list when the callout returns.
 We will pass const pointer to const object for performance reasons. We
 don't want to copy a complete list of subnets along with all options in
 each every time we call select_subnet callouts.

 > '''!ChangeLog'''[[BR]]
 > Suggested !ChangeLog entry:
 > {{{
 > 626.  [func]          stephen
 >       Added initial part of hooks framework (all but library loading).
 >       (Trac #2974, git xxx)
 > }}}
 Almost good, but I would remove the "(all but library loading)" part.
 Documentation, examples, library loading, library configuration is still
 missing.

 Uffff. I think we finally made it. It was a long review, but we covered a
 lot of ground there and made significant progress.

 The ticket is back with you. Please update the changelog and merge. I
 don't need to see this ticket again.

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


More information about the bind10-tickets mailing list