 |
Kea
1.5.0
|
Go to the documentation of this file.
84 Dhcpv6Srv(uint16_t port = DHCP6_SERVER_PORT);
174 NameChangeSender::Result result,
390 boost::shared_ptr<Option6IA> ia);
488 boost::shared_ptr<Option6IA> ia,
506 boost::shared_ptr<Option6IA> ia,
837 boost::shared_ptr<Option6IA> ia_rsp);
928 void generateFqdn(
const Pkt6Ptr& answer);
932 static void processStatsReceived(
const Pkt6Ptr& query);
941 bool requestedInORO(
const Pkt6Ptr& query,
const uint16_t code)
const;
1000 #endif // DHCP6_SRV_H
This file provides the classes needed to embody, compose, and decompose DNS update requests that are ...
boost::shared_ptr< NetworkState > NetworkStatePtr
Pointer to the NetworkState object.
void processPacketPktSend(hooks::CalloutHandlePtr &callout_handle, Pkt6Ptr &query, Pkt6Ptr &rsp)
Executes pkt6_send callout.
void discardPackets()
Discards cached and parked packets Clears the call_handle store and packet parking lots of all packet...
virtual ~Dhcpv6Srv()
Destructor. Used during DHCPv6 service shutdown.
virtual Pkt6Ptr receivePacket(int timeout)
dummy wrapper around IfaceMgr::receive6
void processRSOO(const Pkt6Ptr &query, const Pkt6Ptr &rsp)
Processes Relay-supplied options, if present.
void initContext(const Pkt6Ptr &pkt, AllocEngine::ClientContext6 &ctx, bool &drop)
Initializes client context for specified packet.
void sanityCheckDUID(const OptionPtr &opt, const std::string &opt_name)
verifies if received DUID option (client-id or server-id) is sane
Pkt6Ptr processSolicit(AllocEngine::ClientContext6 &ctx)
Processes incoming Solicit and returns response.
static std::string duidToString(const OptionPtr &opt)
converts DUID to text Converts content of DUID option to a text representation, e....
This exception is thrown when DHCP server hits the error which should result in discarding the messag...
boost::shared_ptr< CalloutHandle > CalloutHandlePtr
A shared pointer to a CalloutHandle object.
boost::shared_ptr< DUID > DuidPtr
void run_one()
Main server processing step.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
static int getHookIndexBuffer6Send()
Returns the index of the buffer6_send hook.
void processDhcp4Query(const Pkt6Ptr &dhcp4_query)
Processes incoming DHCPv4-query message.
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
OptionPtr extendIA_PD(const Pkt6Ptr &query, AllocEngine::ClientContext6 &ctx, Option6IAPtr ia)
Extends lifetime of the prefix.
static HWAddrPtr getMAC(const Pkt6Ptr &pkt)
Attempts to get a MAC/hardware address using configured sources.
void evaluateClasses(const Pkt6Ptr &pkt, bool depend_on_known)
Evaluate classes.
void assignLeases(const Pkt6Ptr &question, Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx)
Assigns leases.
OptionPtr releaseIA_PD(const DuidPtr &duid, const Pkt6Ptr &query, int &general_status, boost::shared_ptr< Option6IA > ia, Lease6Ptr &old_lease)
Releases specific IA_PD option.
Base class for all services.
void shutdown()
Instructs the server to shut down.
void buildCfgOptionList(const Pkt6Ptr &question, AllocEngine::ClientContext6 &ctx, CfgOptionList &co_list)
Build the configured option list.
OptionPtr serverid_
Server DUID (to be sent in server-identifier option)
static uint16_t checkRelaySourcePort(const Pkt6Ptr &query)
Used for DHCPv4-over-DHCPv6 too.
bool declineLeases(const Pkt6Ptr &decline, Pkt6Ptr &reply, AllocEngine::ClientContext6 &ctx)
Attempts to decline all leases in specified Decline message.
This is a base class for exceptions thrown from the DNS library module.
OptionPtr releaseIA_NA(const DuidPtr &duid, const Pkt6Ptr &query, int &general_status, boost::shared_ptr< Option6IA > ia, Lease6Ptr &old_lease)
Releases specific IA_NA option.
Dhcpv6Srv(uint16_t port=DHCP6_SERVER_PORT)
Default constructor.
boost::shared_ptr< AllocEngine > alloc_engine_
Allocation Engine.
RequirementLevel
defines if certain option may, must or must not appear
void processPacket(Pkt6Ptr &query, Pkt6Ptr &rsp)
Process a single incoming DHCPv6 packet.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void appendDefaultOptions(const Pkt6Ptr &question, Pkt6Ptr &answer, const CfgOptionList &co_list)
Appends default options to server's answer.
boost::shared_ptr< HWAddr > HWAddrPtr
Shared pointer to a hardware address structure.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
OptionPtr assignIA_NA(const isc::dhcp::Pkt6Ptr &query, const isc::dhcp::Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx, Option6IAPtr ia)
Processes IA_NA option (and assigns addresses if necessary).
OptionPtr getServerID()
Returns server-identifier option.
void requiredClassify(const Pkt6Ptr &pkt, AllocEngine::ClientContext6 &ctx)
Assigns incoming packet to zero or more classes (required pass).
virtual void d2ClientErrorHandler(const dhcp_ddns::NameChangeSender::Result result, dhcp_ddns::NameChangeRequestPtr &ncr)
Implements the error handler for DHCP_DDNS IO errors.
static std::string getVersion(bool extended)
returns Kea version on stdout and exit.
OptionPtr assignIA_PD(const Pkt6Ptr &query, const isc::dhcp::Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx, boost::shared_ptr< Option6IA > ia)
Processes IA_PD option (and assigns prefixes if necessary).
bool sanityCheck(const Pkt6Ptr &pkt)
Verifies if specified packet meets RFC requirements.
void releaseLeases(const Pkt6Ptr &release, Pkt6Ptr &reply, AllocEngine::ClientContext6 &ctx)
Attempts to release received addresses.
void classifyByVendor(const Pkt6Ptr &pkt, std::string &classes)
Assign class using vendor-class-identifier option.
bool declineLease(const Pkt6Ptr &decline, const Lease6Ptr lease, boost::shared_ptr< Option6IA > ia_rsp)
Declines specific IPv6 lease.
void extendLeases(const Pkt6Ptr &query, Pkt6Ptr &reply, AllocEngine::ClientContext6 &ctx)
Attempts to extend the lifetime of IAs.
std::queue< isc::dhcp_ddns::NameChangeRequest > name_change_reqs_
Holds a list of isc::dhcp_ddns::NameChangeRequest objects, which are waiting for sending to kea-dhcp-...
Context information for the DHCPv6 leases allocation.
NetworkStatePtr network_state_
Holds information about disabled DHCP service and/or disabled subnet/network scopes.
void startD2()
Starts DHCP_DDNS client IO if DDNS updates are enabled.
static void processStatsSent(const Pkt6Ptr &response)
Updates statistics for transmitted packets.
static const std::string VENDOR_CLASS_PREFIX
this is a prefix added to the content of vendor-class option
bool run()
Main server processing loop.
static const size_t MIN_MAC_LEN
Minimum length of a MAC address to be used in DUID generation.
void appendRequestedOptions(const Pkt6Ptr &question, Pkt6Ptr &answer, const CfgOptionList &co_list)
Appends requested options to server's answer.
void appendRequestedVendorOptions(const Pkt6Ptr &question, Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx, const CfgOptionList &co_list)
Appends requested vendor options to server's answer.
virtual void sendPacket(const Pkt6Ptr &pkt)
dummy wrapper around IfaceMgr::send()
Pkt6Ptr processRebind(AllocEngine::ClientContext6 &ctx)
Processes incoming Rebind message.
void processPacketBufferSend(hooks::CalloutHandlePtr &callout_handle, Pkt6Ptr &rsp)
Executes buffer6_send callout and sends the response.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
asiolink::IOServicePtr & getIOService()
Returns pointer to the IO service used by the server.
Pkt6Ptr processConfirm(AllocEngine::ClientContext6 &ctx)
Processes incoming Confirm message and returns Reply.
void setStatusCode(boost::shared_ptr< Option6IA > &container, const OptionPtr &status)
A simple utility method that sets the status code.
volatile bool shutdown_
Indicates if shutdown is in progress.
Pkt6Ptr processDecline(AllocEngine::ClientContext6 &ctx)
Process incoming Decline message.
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
void setReservedClientClasses(const Pkt6Ptr &pkt, const AllocEngine::ClientContext6 &ctx)
Assigns classes retrieved from host reservation database.
DHCPv6DiscardMessageError(const char *file, size_t line, const char *what)
boost::shared_ptr< Option > OptionPtr
Pkt6Ptr processRenew(AllocEngine::ClientContext6 &ctx)
Processes incoming Renew message.
Pkt6Ptr processInfRequest(AllocEngine::ClientContext6 &ctx)
Processes incoming Information-request message.
Pkt6Ptr processRelease(AllocEngine::ClientContext6 &ctx)
Process incoming Release message.
OptionPtr declineIA(const Pkt6Ptr &decline, const DuidPtr &duid, int &general_status, boost::shared_ptr< Option6IA > ia, Lease6Collection &new_leases)
Declines leases in a single IA_NA option.
bool testUnicast(const Pkt6Ptr &pkt) const
Check if the message can be sent to unicast.
void copyClientOptions(const Pkt6Ptr &question, Pkt6Ptr &answer)
Copies required options from client message to server answer.
void classifyPacket(const Pkt6Ptr &pkt)
Assigns incoming packet to zero or more classes.
std::vector< Lease6Ptr > Lease6Collection
A collection of IPv6 leases.
Pkt6Ptr processRequest(AllocEngine::ClientContext6 &ctx)
Processes incoming Request and returns Reply response.
void processClientFqdn(const Pkt6Ptr &question, const Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx)
Processes Client FQDN Option.
void createNameChangeRequests(const Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx)
Creates a number of isc::dhcp_ddns::NameChangeRequest objects based on the DHCPv6 Client FQDN Option.
bool testServerID(const Pkt6Ptr &pkt)
Compare received server id with our server id.
OptionPtr extendIA_NA(const Pkt6Ptr &query, const Pkt6Ptr &answer, AllocEngine::ClientContext6 &ctx, Option6IAPtr ia)
Extends lifetime of the specific IA_NA option.
isc::dhcp::Subnet6Ptr selectSubnet(const Pkt6Ptr &question, bool &drop)
Selects a subnet for a given client's packet.
uint16_t getPort() const
Get UDP port on which server should listen.
boost::shared_ptr< Option6IA > Option6IAPtr
A pointer to the Option6IA object.
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
void stopD2()
Stops DHCP_DDNS client IO if DDNS updates are enabled.
NetworkStatePtr & getNetworkState()
Returns pointer to the network state used by the server.
std::list< ConstCfgOptionPtr > CfgOptionList
Const pointer list.