Changes between Version 22 and Version 23 of DhcpHooks


Ignore:
Timestamp:
Jun 21, 2013, 3:02:41 PM (4 years ago)
Author:
tomek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DhcpHooks

    v22 v23  
    4848=== 4.1 DHCPv6 ===
    4949
    50 Hook point name: '''pkt6_received'''
    51 
    52 Arguments: name: '''pkt6''', type: '''Pkt6Ptr''', direction: [in/out]
     50Hook point name: '''pkt6_receive'''
     51
     52Arguments:
     53  * name: '''pkt6''', type: '''Pkt6Ptr''', direction: [in/out]
    5354
    5455Description: this callout is executed when incoming DHCPv6 packet is received and its content is parsed. The sole argument - pkt6 - contains a pointer to Pkt6 class that contains all informations regarding incoming packet, including its source and destination addresses, interface over which it was received, list of all options present within and relay information. See Pkt6 class definition for details. All fields of the Pkt6 class can be modified at this time, except data_ (which contains incoming packet as raw buffer, but that information was already parsed, so it doesn't make sense to modify it at this time). If any callout sets skip flag, the server will drop the packet and will not do anything with it, except logging a drop reason as a callout action.
    5556
     57Hook point name: '''subnet6_select'''
     58
     59Arguments:
     60 * name: '''pkt6''', type: '''Pkt6Ptr''', direction [in/out]
     61 * name: '''subnet6''', type: '''Subnet6Ptr''', direction [in/out]
     62 * name: '''subnet6collection''', type: '''const Subnet6Collection&''', direction [in]
     63
     64Description: this callout is executed when a subnet is being selected for incoming packet. All parameters, addresses and prefixes will be assigned from that subnet. Callout can select a different subnet if it wishes so. The list of all subnets currently configured is provided as 'subnet6collection'. The list itself must not be modified. If any callout installed on 'subnet6_select' sets a flag skip, then the server will not select any subnet. Packet processing will continue, but it will be severely limited (i.e. only global options will be assigned).
     65
     66Hook point name: '''lease6_select'''
     67
     68Arguments:
     69 * name: '''subnet6''', type: '''Subnet6Ptr''', direction: [in]
     70 * name: '''fake_allocation''', type: '''bool''', direction: [in]
     71 * name: '''lease6''', type: '''Lease6Ptr''', direction: [in/out]
     72
     73Description: this callout is executed after the server engine has selected a lease for client's request, and before the lease has been inserted into the database. Any modifications made to the Lease6 object will be directly inserted into database. Make sure that any modifications the callout does are sanity checked as server will use that data as is. Server processes lease requests for SOLICIT and REQUEST in a very similar way. The only major difference is that for SOLICIT the lease is just selected to be offered, but it is not inserted into database. You can distinguish between SOLICIT and REQUEST by checking value of fake_allocation flag: true means that the lease won't be interested into database (SOLICIT), false means that it will (REQUEST).
     74
    5675Hook point name: '''pkt6_send'''
    5776
    58 Arguments: name: '''pkt6''', type: '''Pkt6Ptr''', direction: [in/out]
     77Arguments:
     78 * name: '''pkt6''', type: '''Pkt6Ptr''', direction: [in/out]
    5979
    6080Description: this callout is executed when server's response DHCP is about to be send back to clients. The sole argument - pkt6 - contains a pointer to Pkt6 class that contains packet, with set source and destination addresses, interface over which it will be send, list of all options and relay information. See Pkt6 class definition for details. All fields of the Pkt6 class can be modified at this time, except bufferOut_ (packet will be constructed there after pkt6_send callouts are complete), so any changes to that field will be overwritten. If any callout sets skip flag, the server will drop the packet and will not do anything with it, except logging a drop reason as a callout action.
    6181
    62 Hook point name: '''lease6_select'''
    63 
    64 Arguments: name: '''subnet6''', type: '''Subnet6Ptr''', direction: [in]
    65 
    66 Arguments: name: '''fake_allocation''', type: '''bool''', direction: [in]
    67 
    68 Arguments: name: '''lease6''', type: '''Lease6Ptr''', direction: [in/out]
    69 
    70 Description: this callout is executed after the server engine has selected a lease for client's request, and before the lease has been inserted into the database. Any modifications made to the Lease6 object will be directly inserted into database. Make sure that any modifications the callout does are sanity checked as server will use that data as is. Server processes lease requests for SOLICIT and REQUEST in a very similar way. The only major difference is that for SOLICIT the lease is just selected to be offered, but it is not inserted into database. You can distinguish between SOLICIT and REQUEST by checking value of fake_allocation flag: true means that the lease won't be interested into database (SOLICIT), false means that it will (REQUEST).
     82----
    7183
    7284The text below contains previous proposal. It will be converted to the new Bind10HooksFramework format as the respective hook points are implemented.