Kea  1.5.0
dhcp4_srv.h
Go to the documentation of this file.
1 // Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef DHCPV4_SRV_H
8 #define DHCPV4_SRV_H
9 
10 #include <asiolink/io_service.h>
11 #include <dhcp/dhcp4.h>
12 #include <dhcp/pkt4.h>
13 #include <dhcp/option.h>
14 #include <dhcp/option_string.h>
16 #include <dhcp/option_custom.h>
17 #include <dhcp_ddns/ncr_msg.h>
18 #include <dhcpsrv/alloc_engine.h>
19 #include <dhcpsrv/cfg_option.h>
21 #include <dhcpsrv/d2_client_mgr.h>
22 #include <dhcpsrv/network_state.h>
23 #include <dhcpsrv/subnet.h>
24 #include <hooks/callout_handle.h>
25 #include <process/daemon.h>
26 
27 #include <boost/noncopyable.hpp>
28 
29 #include <functional>
30 #include <iostream>
31 #include <queue>
32 
33 // Undefine the macro OPTIONAL which is defined in some operating
34 // systems but conflicts with a member of the RequirementLevel enum in
35 // the server class.
36 
37 #ifdef OPTIONAL
38 #undef OPTIONAL
39 #endif
40 
41 namespace isc {
42 namespace dhcp {
43 
64 public:
77  Dhcpv4Exchange(const AllocEnginePtr& alloc_engine, const Pkt4Ptr& query,
78  const Subnet4Ptr& subnet);
79 
86  void initResponse();
87 
91  void initResponse4o6();
92 
94  Pkt4Ptr getQuery() const {
95  return (query_);
96  }
97 
102  return (resp_);
103  }
104 
106  void deleteResponse() {
107  resp_.reset();
108  }
109 
112  return (context_);
113  }
114 
117  return (cfg_option_list_);
118  }
119 
122  return (cfg_option_list_);
123  }
124 
128 
131 
132 private:
133 
143  void copyDefaultFields();
144 
154  void copyDefaultOptions();
155 
162  void setHostIdentifiers();
163 
165  AllocEnginePtr alloc_engine_;
167  Pkt4Ptr query_;
169  Pkt4Ptr resp_;
175  CfgOptionList cfg_option_list_;
176 };
177 
179 typedef boost::shared_ptr<Dhcpv4Exchange> Dhcpv4ExchangePtr;
180 
181 
194 class Dhcpv4Srv : public process::Daemon {
195 private:
196 
198  asiolink::IOServicePtr io_service_;
199 
200 public:
201 
203  typedef enum {
206  OPTIONAL
208 
226  Dhcpv4Srv(uint16_t port = DHCP4_SERVER_PORT,
227  const bool use_bcast = true,
228  const bool direct_response_desired = true);
229 
231  virtual ~Dhcpv4Srv();
232 
235  return (io_service_);
236  }
237 
240  return (network_state_);
241  }
242 
245  static std::string getVersion(bool extended);
246 
253  bool run();
254 
260  void run_one();
261 
270  void processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp,
271  bool allow_packet_park = true);
272 
273 
275  void shutdown();
276 
280 
281  uint16_t getPort() const {
289  return (port_);
290  }
291 
296  bool useBroadcast() const {
297  return (use_bcast_);
298  }
300 
306  void startD2();
307 
313  void stopD2();
314 
329  virtual void d2ClientErrorHandler(const dhcp_ddns::
330  NameChangeSender::Result result,
332 
334  void discardPackets();
335 
336 protected:
337 
344 
345  bool accept(const Pkt4Ptr& query) const;
366 
394  bool acceptDirectRequest(const Pkt4Ptr& query) const;
395 
414  bool acceptMessageType(const Pkt4Ptr& query) const;
415 
429  bool acceptServerId(const Pkt4Ptr& pkt) const;
431 
440  static void sanityCheck(const Pkt4Ptr& query, RequirementLevel serverid);
441 
451  Pkt4Ptr processDiscover(Pkt4Ptr& discover);
452 
468 
477  void processRelease(Pkt4Ptr& release, AllocEngine::ClientContext4Ptr& context);
478 
488  void processDecline(Pkt4Ptr& decline, AllocEngine::ClientContext4Ptr& context);
489 
495  Pkt4Ptr processInform(Pkt4Ptr& inform);
496 
504 
513 
525 
540  void assignLease(Dhcpv4Exchange& ex);
541 
554 
566  void setFixedFields(Dhcpv4Exchange& ex);
567 
606 
613  static const std::string VENDOR_CLASS_PREFIX;
614 
615 private:
626  void processClientFqdnOption(Dhcpv4Exchange& ex);
627 
659  void processHostnameOption(Dhcpv4Exchange& ex);
660 
674  void declineLease(const Lease4Ptr& lease, const Pkt4Ptr& decline,
676 
677 protected:
678 
693  void createNameChangeRequests(const Lease4Ptr& lease,
694  const Lease4Ptr& old_lease);
695 
704  void renewLease(const Pkt4Ptr& renew, Pkt4Ptr& reply);
705 
724  static void appendServerID(Dhcpv4Exchange& ex);
725 
730  static uint16_t checkRelayPort(const Dhcpv4Exchange& ex);
731 
765  static void adjustIfaceData(Dhcpv4Exchange& ex);
766 
785  static void adjustRemoteAddr(Dhcpv4Exchange& ex);
786 
793  static std::string srvidToString(const OptionPtr& opt);
794 
807  bool& drop,
808  bool sanity_only = false) const;
809 
822  bool& drop,
823  bool sanity_only = false) const;
824 
827  volatile bool shutdown_;
828 
833  virtual Pkt4Ptr receivePacket(int timeout);
834 
839  virtual void sendPacket(const Pkt4Ptr& pkt);
840 
851  void classifyPacket(const Pkt4Ptr& pkt);
852 
853 public:
854 
865  static void evaluateClasses(const Pkt4Ptr& pkt, bool depend_on_known);
866 
867 protected:
868 
880 
890  void deferredUnpack(Pkt4Ptr& query);
891 
897  void processPacketPktSend(hooks::CalloutHandlePtr& callout_handle,
898  Pkt4Ptr& query, Pkt4Ptr& rsp);
899 
905  Pkt4Ptr& rsp);
906 
911  boost::shared_ptr<AllocEngine> alloc_engine_;
912 
913 private:
914 
921  void classifyByVendor(const Pkt4Ptr& pkt);
922 
928  static OptionPtr getNetmaskOption(const Subnet4Ptr& subnet);
929 
930  uint16_t port_;
931  bool use_bcast_;
932 
933 protected:
934 
938 
939 public:
941 
944  static void processStatsReceived(const Pkt4Ptr& query);
945 
948  static void processStatsSent(const Pkt4Ptr& response);
949 
952  static int getHookIndexBuffer4Receive();
953 
956  static int getHookIndexPkt4Receive();
957 
960  static int getHookIndexSubnet4Select();
961 
964  static int getHookIndexLease4Release();
965 
968  static int getHookIndexPkt4Send();
969 
972  static int getHookIndexBuffer4Send();
973 
976  static int getHookIndexLease4Decline();
977 };
978 
979 }; // namespace isc::dhcp
980 }; // namespace isc
981 
982 #endif // DHCP4_SRV_H
ncr_msg.h
This file provides the classes needed to embody, compose, and decompose DNS update requests that are ...
isc::dhcp::Dhcpv4Srv::deferredUnpack
void deferredUnpack(Pkt4Ptr &query)
Perform deferred option unpacking.
Definition: dhcp4_srv.cc:3406
isc::dhcp::NetworkStatePtr
boost::shared_ptr< NetworkState > NetworkStatePtr
Pointer to the NetworkState object.
Definition: network_state.h:156
isc::dhcp::Dhcpv4Srv::useBroadcast
bool useBroadcast() const
Return bool value indicating that broadcast flags should be set on sockets.
Definition: dhcp4_srv.h:296
isc::dhcp::Dhcpv4Srv::evaluateClasses
static void evaluateClasses(const Pkt4Ptr &pkt, bool depend_on_known)
Evaluate classes.
Definition: dhcp4_srv.cc:3266
isc::dhcp::Dhcpv4Srv::getHookIndexPkt4Receive
static int getHookIndexPkt4Receive()
Returns the index for "pkt4_receive" hook point.
Definition: dhcp4_srv.cc:3607
isc::dhcp::Dhcpv4Srv::getHookIndexLease4Decline
static int getHookIndexLease4Decline()
Returns the index for "lease4_decline" hook point.
Definition: dhcp4_srv.cc:3627
alloc_engine.h
isc::dhcp::Dhcpv4Srv::VENDOR_CLASS_PREFIX
static const std::string VENDOR_CLASS_PREFIX
this is a prefix added to the content of vendor-class option
Definition: dhcp4_srv.h:613
pkt4.h
isc::dhcp::Dhcpv4Srv::FORBIDDEN
@ FORBIDDEN
Definition: dhcp4_srv.h:204
isc::dhcp::Dhcpv4Srv::processPacket
void processPacket(Pkt4Ptr &query, Pkt4Ptr &rsp, bool allow_packet_park=true)
Process a single incoming DHCPv4 packet.
Definition: dhcp4_srv.cc:844
isc::dhcp::Dhcpv4Srv::processRelease
void processRelease(Pkt4Ptr &release, AllocEngine::ClientContext4Ptr &context)
Processes incoming DHCPRELEASE messages.
Definition: dhcp4_srv.cc:2669
isc::dhcp::Dhcpv4Srv::getHookIndexPkt4Send
static int getHookIndexPkt4Send()
Returns the index for "pkt4_send" hook point.
Definition: dhcp4_srv.cc:3619
isc::dhcp::Dhcpv4Srv::processDiscover
Pkt4Ptr processDiscover(Pkt4Ptr &discover)
Processes incoming DISCOVER and returns response.
Definition: dhcp4_srv.cc:2548
isc::dhcp::Lease4Ptr
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition: lease.h:245
isc::dhcp::Dhcpv4Srv::getVersion
static std::string getVersion(bool extended)
returns Kea version on stdout and exit.
Definition: dhcp4_srv.cc:3501
isc::hooks::CalloutHandlePtr
boost::shared_ptr< CalloutHandle > CalloutHandlePtr
A shared pointer to a CalloutHandle object.
Definition: callout_handle.h:416
isc::dhcp::Dhcpv4Srv::selectSubnet
isc::dhcp::Subnet4Ptr selectSubnet(const Pkt4Ptr &query, bool &drop, bool sanity_only=false) const
Selects a subnet for a given client's packet.
Definition: dhcp4_srv.cc:517
isc::dhcp::Dhcpv4Srv::appendServerID
static void appendServerID(Dhcpv4Exchange &ex)
Adds server identifier option to the server's response.
Definition: dhcp4_srv.cc:1283
isc::dhcp::Dhcpv4Srv::sanityCheck
static void sanityCheck(const Pkt4Ptr &query, RequirementLevel serverid)
Verifies if specified packet meets RFC requirements.
Definition: dhcp4_srv.cc:3202
isc::dhcp::Dhcpv4Srv::processInform
Pkt4Ptr processInform(Pkt4Ptr &inform)
Processes incoming DHCPINFORM messages.
Definition: dhcp4_srv.cc:2934
isc::dhcp::Dhcpv4Srv::selectSubnet4o6
isc::dhcp::Subnet4Ptr selectSubnet4o6(const Pkt4Ptr &query, bool &drop, bool sanity_only=false) const
Selects a subnet for a given client's DHCP4o6 packet.
Definition: dhcp4_srv.cc:603
isc::dhcp::Dhcpv4Exchange::getResponse
Pkt4Ptr getResponse() const
Returns the pointer to the server's response.
Definition: dhcp4_srv.h:101
isc::dhcp::Dhcpv4Srv::receivePacket
virtual Pkt4Ptr receivePacket(int timeout)
dummy wrapper around IfaceMgr::receive4
Definition: dhcp4_srv.cc:721
isc::dhcp_ddns::NameChangeRequestPtr
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition: ncr_msg.h:212
isc::dhcp::Dhcpv4Srv::getIOService
asiolink::IOServicePtr & getIOService()
Returns pointer to the IO service used by the server.
Definition: dhcp4_srv.h:234
isc::dhcp::Dhcpv4ExchangePtr
boost::shared_ptr< Dhcpv4Exchange > Dhcpv4ExchangePtr
Type representing the pointer to the Dhcpv4Exchange.
Definition: dhcp4_srv.h:179
isc::dhcp::Dhcpv4Exchange::deleteResponse
void deleteResponse()
Removes the response message by resetting the pointer to NULL.
Definition: dhcp4_srv.h:106
isc::dhcp::Dhcpv4Srv::appendRequestedOptions
void appendRequestedOptions(Dhcpv4Exchange &ex)
Appends options requested by client.
Definition: dhcp4_srv.cc:1381
option_string.h
isc::dhcp::Dhcpv4Exchange::setReservedMessageFields
void setReservedMessageFields()
Sets reserved values of siaddr, sname and file in the server's response.
Definition: dhcp4_srv.cc:420
isc::dhcp::Dhcpv4Srv::getHookIndexLease4Release
static int getHookIndexLease4Release()
Returns the index for "lease4_release" hook point.
Definition: dhcp4_srv.cc:3615
isc::process::Daemon
Base class for all services.
Definition: daemon.h:49
isc::dhcp::Dhcpv4Srv::acceptDirectRequest
bool acceptDirectRequest(const Pkt4Ptr &query) const
Check if a message sent by directly connected client should be accepted or discarded.
Definition: dhcp4_srv.cc:3011
isc::dhcp::Dhcpv4Srv::sendPacket
virtual void sendPacket(const Pkt4Ptr &pkt)
dummy wrapper around IfaceMgr::send()
Definition: dhcp4_srv.cc:726
isc::dhcp::Dhcpv4Srv::alloc_engine_
boost::shared_ptr< AllocEngine > alloc_engine_
Allocation Engine.
Definition: dhcp4_srv.h:911
isc::dhcp::Dhcpv4Exchange::initResponse4o6
void initResponse4o6()
Initializes the DHCPv6 part of the response message.
Definition: dhcp4_srv.cc:219
isc::dhcp::Dhcpv4Srv::processDecline
void processDecline(Pkt4Ptr &decline, AllocEngine::ClientContext4Ptr &context)
Process incoming DHCPDECLINE messages.
Definition: dhcp4_srv.cc:2784
isc::dhcp::Dhcpv4Srv::Dhcpv4Srv
Dhcpv4Srv(uint16_t port=DHCP4_SERVER_PORT, const bool use_bcast=true, const bool direct_response_desired=true)
Default constructor.
Definition: dhcp4_srv.cc:444
d2_client_mgr.h
io_service.h
isc::dhcp::Dhcpv4Srv::processPacketBufferSend
void processPacketBufferSend(hooks::CalloutHandlePtr &callout_handle, Pkt4Ptr &rsp)
Executes buffer4_send callout and sends the response.
Definition: dhcp4_srv.cc:1190
isc::dhcp::Dhcpv4Srv::getHookIndexSubnet4Select
static int getHookIndexSubnet4Select()
Returns the index for "subnet4_select" hook point.
Definition: dhcp4_srv.cc:3611
dhcp4.h
isc::dhcp::Dhcpv4Srv::~Dhcpv4Srv
virtual ~Dhcpv4Srv()
Destructor. Used during DHCPv4 service shutdown.
Definition: dhcp4_srv.cc:482
isc::dhcp::Dhcpv4Srv::appendBasicOptions
void appendBasicOptions(Dhcpv4Exchange &ex)
Append basic options if they are not present.
Definition: dhcp4_srv.cc:1540
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::dhcp::Pkt4Ptr
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition: pkt4.h:546
isc::dhcp::Dhcpv4Srv::getPort
uint16_t getPort() const
Get UDP port on which server should listen.
Definition: dhcp4_srv.h:288
isc::dhcp::Dhcpv4Exchange::getCfgOptionList
CfgOptionList & getCfgOptionList()
Returns the configured option list (non-const version)
Definition: dhcp4_srv.h:116
isc::dhcp::Dhcpv4Srv::shutdown
void shutdown()
Instructs the server to shut down.
Definition: dhcp4_srv.cc:511
isc::dhcp::Dhcpv4Srv::processStatsSent
static void processStatsSent(const Pkt4Ptr &response)
Updates statistics for transmitted packets.
Definition: dhcp4_srv.cc:3577
isc::dhcp::Dhcpv4Srv::run
bool run()
Main server processing loop.
Definition: dhcp4_srv.cc:731
isc::dhcp::AllocEngine::ClientContext4Ptr
boost::shared_ptr< ClientContext4 > ClientContext4Ptr
Pointer to the ClientContext4.
Definition: alloc_engine.h:1246
isc::dhcp::Dhcpv4Srv::processPacketPktSend
void processPacketPktSend(hooks::CalloutHandlePtr &callout_handle, Pkt4Ptr &query, Pkt4Ptr &rsp)
Executes pkt4_send callout.
Definition: dhcp4_srv.cc:1132
isc::dhcp::Dhcpv4Srv::MANDATORY
@ MANDATORY
Definition: dhcp4_srv.h:205
subnet.h
cfg_option.h
isc::dhcp::Subnet4Ptr
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:464
isc::dhcp::Dhcpv4Srv::d2ClientErrorHandler
virtual void d2ClientErrorHandler(const dhcp_ddns::NameChangeSender::Result result, dhcp_ddns::NameChangeRequestPtr &ncr)
Implements the error handler for DHCP_DDNS IO errors.
Definition: dhcp4_srv.cc:3486
isc::dhcp::Dhcpv4Srv::getHookIndexBuffer4Receive
static int getHookIndexBuffer4Receive()
Returns the index for "buffer4_receive" hook point.
Definition: dhcp4_srv.cc:3603
isc::dhcp::Dhcpv4Srv::checkRelayPort
static uint16_t checkRelayPort(const Dhcpv4Exchange &ex)
Check if the relay port RAI sub-option was set in the query.
Definition: dhcp4_srv.cc:2254
isc::dhcp::Dhcpv4Srv::acceptServerId
bool acceptServerId(const Pkt4Ptr &pkt) const
Verifies if the server id belongs to our server.
Definition: dhcp4_srv.cc:3105
isc::dhcp::Dhcpv4Srv::buildCfgOptionList
void buildCfgOptionList(Dhcpv4Exchange &ex)
Build the configured option list.
Definition: dhcp4_srv.cc:1308
isc::dhcp::Dhcpv4Exchange
DHCPv4 message exchange.
Definition: dhcp4_srv.h:63
isc::dhcp::Dhcpv4Exchange::initResponse
void initResponse()
Initializes the instance of the response message.
Definition: dhcp4_srv.cc:193
isc::dhcp::Dhcpv4Exchange::getCfgOptionList
const CfgOptionList & getCfgOptionList() const
Returns the configured option list (const version)
Definition: dhcp4_srv.h:121
isc::dhcp::Dhcpv4Srv::classifyPacket
void classifyPacket(const Pkt4Ptr &pkt)
Assigns incoming packet to zero or more classes.
Definition: dhcp4_srv.cc:3255
isc::dhcp::Dhcpv4Srv::adjustIfaceData
static void adjustIfaceData(Dhcpv4Exchange &ex)
Set IP/UDP and interface parameters for the DHCPv4 response.
Definition: dhcp4_srv.cc:2267
isc::dhcp::Dhcpv4Srv::acceptMessageType
bool acceptMessageType(const Pkt4Ptr &query) const
Check if received message type is valid for the server to process.
Definition: dhcp4_srv.cc:3049
isc::dhcp::AllocEnginePtr
boost::shared_ptr< AllocEngine > AllocEnginePtr
A pointer to the AllocEngine object.
Definition: alloc_engine.h:1611
isc::dhcp::Dhcpv4Exchange::Dhcpv4Exchange
Dhcpv4Exchange(const AllocEnginePtr &alloc_engine, const Pkt4Ptr &query, const Subnet4Ptr &subnet)
Constructor.
Definition: dhcp4_srv.cc:123
isc::dhcp::Dhcpv4Exchange::getQuery
Pkt4Ptr getQuery() const
Returns the pointer to the query from the client.
Definition: dhcp4_srv.h:94
isc::dhcp::Dhcpv4Srv::getHookIndexBuffer4Send
static int getHookIndexBuffer4Send()
Returns the index for "buffer4_send" hook point.
Definition: dhcp4_srv.cc:3623
callout_handle_store.h
isc::dhcp::Dhcpv4Srv::processClientName
void processClientName(Dhcpv4Exchange &ex)
Processes Client FQDN and Hostname Options sent by a client.
Definition: dhcp4_srv.cc:1586
isc::dhcp::Dhcpv4Srv::assignLease
void assignLease(Dhcpv4Exchange &ex)
Assigns a lease and appends corresponding options.
Definition: dhcp4_srv.cc:1864
isc::dhcp::Dhcpv4Exchange::setReservedClientClasses
void setReservedClientClasses()
Assigns classes retrieved from host reservation database.
Definition: dhcp4_srv.cc:409
isc::dhcp::Dhcpv4Srv::OPTIONAL
@ OPTIONAL
Definition: dhcp4_srv.h:206
isc::dhcp::Dhcpv4Srv::renewLease
void renewLease(const Pkt4Ptr &renew, Pkt4Ptr &reply)
Attempts to renew received addresses.
isc::dhcp::Dhcpv4Srv::run_one
void run_one()
Main server processing step.
Definition: dhcp4_srv.cc:753
isc::dhcp::Dhcpv4Srv::processStatsReceived
static void processStatsReceived(const Pkt4Ptr &query)
Class methods for DHCPv4-over-DHCPv6 handler.
Definition: dhcp4_srv.cc:3528
isc::dhcp::Dhcpv4Srv::stopD2
void stopD2()
Stops DHCP_DDNS client IO if DDNS updates are enabled.
Definition: dhcp4_srv.cc:3477
isc::dhcp::Dhcpv4Srv::declineLease
void declineLease(const Lease4Ptr &lease, const Pkt4Ptr &decline, AllocEngine::ClientContext4Ptr &context)
Marks lease as declined.
Definition: dhcp4_srv.cc:2858
network_state.h
isc::dhcp::Dhcpv4Srv::network_state_
NetworkStatePtr network_state_
Holds information about disabled DHCP service and/or disabled subnet/network scopes.
Definition: dhcp4_srv.h:937
isc::dhcp::OptionPtr
boost::shared_ptr< Option > OptionPtr
Definition: option.h:37
isc::dhcp::Dhcpv4Srv
DHCPv4 server service.
Definition: dhcp4_srv.h:194
isc::dhcp::Dhcpv4Srv::classifyByVendor
void classifyByVendor(const Pkt4Ptr &pkt)
Assign class using vendor-class-identifier option.
Definition: dhcp4_srv.cc:3243
isc::dhcp::Dhcpv4Exchange::getContext
AllocEngine::ClientContext4Ptr getContext() const
Returns the copy of the context for the Allocation engine.
Definition: dhcp4_srv.h:111
isc::dhcp::Dhcpv4Srv::createNameChangeRequests
void createNameChangeRequests(const Lease4Ptr &lease, const Lease4Ptr &old_lease)
Creates NameChangeRequests which correspond to the lease which has been acquired.
Definition: dhcp4_srv.cc:1844
isc::dhcp::Dhcpv4Srv::shutdown_
volatile bool shutdown_
indicates if shutdown is in progress.
Definition: dhcp4_srv.h:827
isc::dhcp::Dhcpv4Srv::srvidToString
static std::string srvidToString(const OptionPtr &opt)
converts server-id to text Converts content of server-id option to a text representation,...
Definition: dhcp4_srv.cc:1263
callout_handle.h
isc::dhcp::Dhcpv4Srv::accept
bool accept(const Pkt4Ptr &query) const
Checks whether received message should be processed or discarded.
Definition: dhcp4_srv.cc:2983
isc::dhcp::Dhcpv4Srv::RequirementLevel
RequirementLevel
defines if certain option may, must or must not appear
Definition: dhcp4_srv.h:203
isc::dhcp::Dhcpv4Srv::processRequest
Pkt4Ptr processRequest(Pkt4Ptr &request, AllocEngine::ClientContext4Ptr &context)
Processes incoming REQUEST and returns REPLY response.
Definition: dhcp4_srv.cc:2607
option.h
isc::dhcp::Dhcpv4Srv::setFixedFields
void setFixedFields(Dhcpv4Exchange &ex)
Sets fixed fields of the outgoing packet.
Definition: dhcp4_srv.cc:2445
isc::dhcp::Dhcpv4Srv::discardPackets
void discardPackets()
Discard all in-progress packets.
Definition: dhcp4_srv.cc:3631
isc::dhcp::Dhcpv4Srv::startD2
void startD2()
Starts DHCP_DDNS client IO if DDNS updates are enabled.
Definition: dhcp4_srv.cc:3465
option_custom.h
isc::dhcp::Dhcpv4Srv::adjustRemoteAddr
static void adjustRemoteAddr(Dhcpv4Exchange &ex)
Sets remote addresses for outgoing packet.
Definition: dhcp4_srv.cc:2348
option4_client_fqdn.h
isc::dhcp::Dhcpv4Srv::getNetworkState
NetworkStatePtr & getNetworkState()
Returns pointer to the network state used by the server.
Definition: dhcp4_srv.h:239
daemon.h
isc::dhcp::CfgOptionList
std::list< ConstCfgOptionPtr > CfgOptionList
Const pointer list.
Definition: cfg_option.h:503
isc::dhcp::Dhcpv4Srv::requiredClassify
void requiredClassify(Dhcpv4Exchange &ex)
Assigns incoming packet to zero or more classes (required pass).
Definition: dhcp4_srv.cc:3314
isc::dhcp::Dhcpv4Srv::appendRequestedVendorOptions
void appendRequestedVendorOptions(Dhcpv4Exchange &ex)
Appends requested vendor options as requested by client.
Definition: dhcp4_srv.cc:1452