srv_config.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. // Copyright (C) 2014-2017 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. #ifndef DHCPSRV_CONFIG_H
  7. #define DHCPSRV_CONFIG_H
  8. #include <cc/cfg_to_element.h>
  9. #include <dhcpsrv/cfg_db_access.h>
  10. #include <dhcpsrv/cfg_duid.h>
  11. #include <dhcpsrv/cfg_expiration.h>
  12. #include <dhcpsrv/cfg_host_operations.h>
  13. #include <dhcpsrv/cfg_hosts.h>
  14. #include <dhcpsrv/cfg_iface.h>
  15. #include <dhcpsrv/cfg_option.h>
  16. #include <dhcpsrv/cfg_option_def.h>
  17. #include <dhcpsrv/cfg_rsoo.h>
  18. #include <dhcpsrv/cfg_subnets4.h>
  19. #include <dhcpsrv/cfg_subnets6.h>
  20. #include <dhcpsrv/cfg_mac_source.h>
  21. #include <dhcpsrv/client_class_def.h>
  22. #include <dhcpsrv/d2_client_cfg.h>
  23. #include <dhcpsrv/logging_info.h>
  24. #include <hooks/hooks_config.h>
  25. #include <cc/data.h>
  26. #include <boost/shared_ptr.hpp>
  27. #include <vector>
  28. #include <stdint.h>
  29. namespace isc {
  30. namespace dhcp {
  31. class CfgMgr;
  32. /// @brief Specifies current DHCP configuration
  33. ///
  34. /// @todo Migrate all other configuration parameters from cfgmgr.h here
  35. class SrvConfig : public isc::data::CfgToElement {
  36. public:
  37. /// @name Constants for selection of parameters returned by @c getConfigSummary
  38. ///
  39. //@{
  40. /// Nothing selected
  41. static const uint32_t CFGSEL_NONE = 0x00000000;
  42. /// Number of IPv4 subnets
  43. static const uint32_t CFGSEL_SUBNET4 = 0x00000001;
  44. /// Number of IPv6 subnets
  45. static const uint32_t CFGSEL_SUBNET6 = 0x00000002;
  46. /// Number of enabled ifaces
  47. static const uint32_t CFGSEL_IFACE4 = 0x00000004;
  48. /// Number of v6 ifaces
  49. static const uint32_t CFGSEL_IFACE6 = 0x00000008;
  50. /// DDNS enabled/disabled
  51. static const uint32_t CFGSEL_DDNS = 0x00000010;
  52. /// Number of all subnets
  53. static const uint32_t CFGSEL_SUBNET = 0x00000003;
  54. /// IPv4 related config
  55. static const uint32_t CFGSEL_ALL4 = 0x00000015;
  56. /// IPv6 related config
  57. static const uint32_t CFGSEL_ALL6 = 0x0000001A;
  58. /// Whole config
  59. static const uint32_t CFGSEL_ALL = 0xFFFFFFFF;
  60. //@}
  61. /// @brief Default constructor.
  62. ///
  63. /// This constructor sets configuration sequence number to 0.
  64. SrvConfig();
  65. /// @brief Constructor.
  66. ///
  67. /// Sets arbitrary configuration sequence number.
  68. SrvConfig(const uint32_t sequence);
  69. /// @brief Returns summary of the configuration in the textual format.
  70. ///
  71. /// This method returns the brief text describing the current configuration.
  72. /// It may be used for logging purposes, e.g. when the new configuration is
  73. /// committed to notify a user about the changes in configuration.
  74. ///
  75. /// @todo Currently this method uses @c CfgMgr accessors to get the
  76. /// configuration parameters. Once these parameters are migrated from the
  77. /// @c CfgMgr this method will have to be modified accordingly.
  78. ///
  79. /// @todo Implement reporting a summary of interfaces being used for
  80. /// receiving and sending DHCP messages. This will be implemented with
  81. /// ticket #3512.
  82. ///
  83. /// @param selection Is a bitfield which describes the parts of the
  84. /// configuration to be returned.
  85. ///
  86. /// @return Summary of the configuration in the textual format.
  87. std::string getConfigSummary(const uint32_t selection) const;
  88. /// @brief Returns configuration sequence number.
  89. uint32_t getSequence() const {
  90. return (sequence_);
  91. }
  92. /// @brief Compares configuration sequence with other sequence.
  93. ///
  94. /// This method compares sequence numbers of two configurations for
  95. /// equality. The sequence numbers are meant to be unique, so if
  96. /// they are equal it means that they point to the same configuration.
  97. ///
  98. /// @param other Configuration which sequence number should be
  99. /// compared with the sequence number of this configuration.
  100. ///
  101. /// @return true if sequence numbers are equal.
  102. bool sequenceEquals(const SrvConfig& other);
  103. /// @name Modifiers and accesors for the configuration objects.
  104. ///
  105. /// @warning References to the objects returned by accessors are only
  106. /// valid during the lifetime of the @c SrvConfig object which
  107. /// returned them.
  108. ///
  109. //@{
  110. /// @brief Returns logging specific configuration.
  111. const LoggingInfoStorage& getLoggingInfo() const {
  112. return (logging_info_);
  113. }
  114. /// @brief Sets logging specific configuration.
  115. ///
  116. /// @param logging_info New logging configuration.
  117. void addLoggingInfo(const LoggingInfo& logging_info) {
  118. logging_info_.push_back(logging_info);
  119. }
  120. /// @brief Returns non-const pointer to interface configuration.
  121. ///
  122. /// This function returns a non-const pointer to the interface
  123. /// configuration.
  124. ///
  125. /// @return Object representing configuration of interfaces.
  126. CfgIfacePtr getCfgIface() {
  127. return (cfg_iface_);
  128. }
  129. /// @brief Returns const pointer to interface configuration.
  130. ///
  131. /// This function returns a const pointer to the interface
  132. /// configuration.
  133. ///
  134. /// @return Object representing configuration of interfaces.
  135. ConstCfgIfacePtr getCfgIface() const {
  136. return (cfg_iface_);
  137. }
  138. /// @brief Return pointer to non-const object representing user-defined
  139. /// option definitions.
  140. ///
  141. /// This function returns a pointer to the object which represents the
  142. /// user defined option definitions grouped by option space name.
  143. ///
  144. /// @return Pointer to an object holding option definitions.
  145. CfgOptionDefPtr getCfgOptionDef() {
  146. return (cfg_option_def_);
  147. }
  148. /// @brief Returns pointer to the const object representing user-defined
  149. /// option definitions.
  150. ///
  151. /// This function returns a pointer to the object which represents the
  152. /// user defined option definitions grouped by option space name.
  153. ///
  154. /// @return Pointer to an object holding option definitions.
  155. ConstCfgOptionDefPtr getCfgOptionDef() const {
  156. return (cfg_option_def_);
  157. }
  158. /// @brief Returns pointer to the non-const object holding options.
  159. ///
  160. /// This method returns a pointer to the object which holds instances
  161. /// of the options to be returned to the clients belonging to any subnet.
  162. ///
  163. /// @return Pointer to the object holding options.
  164. CfgOptionPtr getCfgOption() {
  165. return (cfg_option_);
  166. }
  167. /// @brief Returns pointer to the const object holding options.
  168. ///
  169. /// This method returns a pointer to the object which holds instances
  170. /// of the options to be returned to the clients belonging to any subnet.
  171. ///
  172. /// @return Pointer to the object holding options.
  173. const ConstCfgOptionPtr getCfgOption() const {
  174. return (cfg_option_);
  175. }
  176. /// @brief Returns pointer to non-const object holding subnets configuration
  177. /// for DHCPv4.
  178. ///
  179. /// @return Pointer to the object holding subnets configuration for DHCPv4.
  180. CfgSubnets4Ptr getCfgSubnets4() {
  181. return (cfg_subnets4_);
  182. }
  183. /// @brief Returns pointer to const object holding subnets configuration for
  184. /// DHCPv4.
  185. ///
  186. /// @return Pointer to the object holding subnets configuration for DHCPv4.
  187. ConstCfgSubnets4Ptr getCfgSubnets4() const {
  188. return (cfg_subnets4_);
  189. }
  190. /// @brief Returns pointer to non-const object holding subnets configuration
  191. /// for DHCPv6.
  192. ///
  193. /// @return Pointer to the object holding subnets configuration for DHCPv6.
  194. CfgSubnets6Ptr getCfgSubnets6() {
  195. return (cfg_subnets6_);
  196. }
  197. /// @brief Returns pointer to const object holding subnets configuration for
  198. /// DHCPv6.
  199. ///
  200. /// @return Pointer to the object holding subnets configuration for DHCPv6.
  201. ConstCfgSubnets6Ptr getCfgSubnets6() const {
  202. return (cfg_subnets6_);
  203. }
  204. /// @brief Returns pointer to the non-const objects representing host
  205. /// reservations for different IPv4 and IPv6 subnets.
  206. ///
  207. /// @return Pointer to the non-const object holding host reservations.
  208. CfgHostsPtr getCfgHosts() {
  209. return (cfg_hosts_);
  210. }
  211. /// @brief Returns pointer to the const objects representing host
  212. /// reservations for different IPv4 and IPv6 subnets.
  213. ///
  214. /// @return Pointer to the const object holding host reservations.
  215. ConstCfgHostsPtr getCfgHosts() const {
  216. return (cfg_hosts_);
  217. }
  218. /// @brief Returns pointer to the non-const object representing
  219. /// set of RSOO-enabled options.
  220. ///
  221. /// @return Pointer to the non-const object holding RSOO-enabled
  222. /// options.
  223. CfgRSOOPtr getCfgRSOO() {
  224. return (cfg_rsoo_);
  225. }
  226. /// @brief Returns pointer to the const object representing set
  227. /// of RSOO-enabled options.
  228. ///
  229. /// @return Pointer to the const object holding RSOO-enabled
  230. /// options.
  231. ConstCfgRSOOPtr getCfgRSOO() const {
  232. return (cfg_rsoo_);
  233. }
  234. /// @brief Returns pointer to the object holding configuration pertaining
  235. /// to processing expired leases.
  236. CfgExpirationPtr getCfgExpiration() {
  237. return (cfg_expiration_);
  238. }
  239. /// @brief Returns pointer to the const object holding configuration
  240. /// pertaining to processing expired leases.
  241. ConstCfgExpirationPtr getCfgExpiration() const {
  242. return (cfg_expiration_);
  243. }
  244. /// @brief Returns pointer to the object holding configuration of the
  245. /// server identifier.
  246. CfgDUIDPtr getCfgDUID() {
  247. return (cfg_duid_);
  248. }
  249. /// @brief Returns const pointer to the object holding configuration
  250. /// of the server identifier.
  251. ConstCfgDUIDPtr getCfgDUID() const {
  252. return (cfg_duid_);
  253. }
  254. /// @brief Returns pointer to the object holding configuration of the
  255. /// lease and host database connection parameters.
  256. CfgDbAccessPtr getCfgDbAccess() {
  257. return (cfg_db_access_);
  258. }
  259. /// @brief Returns const pointer to the object holding configuration of
  260. /// the lease and host database connection parameters.
  261. ConstCfgDbAccessPtr getCfgDbAccess() const {
  262. return (cfg_db_access_);
  263. }
  264. /// @brief Returns pointer to the object holding general configuration
  265. /// for host reservations in DHCPv4.
  266. CfgHostOperationsPtr getCfgHostOperations4() {
  267. return (cfg_host_operations4_);
  268. }
  269. /// @brief Returns const pointer to the object holding general
  270. /// configuration for host reservations in DHCPv4
  271. ConstCfgHostOperationsPtr getCfgHostOperations4() const {
  272. return (cfg_host_operations4_);
  273. }
  274. /// @brief Returns pointer to the object holding general configuration
  275. /// for host reservations in DHCPv6.
  276. CfgHostOperationsPtr getCfgHostOperations6() {
  277. return (cfg_host_operations6_);
  278. }
  279. /// @brief Returns const pointer to the object holding general
  280. /// configuration for host reservations in DHCPv6
  281. ConstCfgHostOperationsPtr getCfgHostOperations6() const {
  282. return (cfg_host_operations6_);
  283. }
  284. //@}
  285. /// @brief Returns non-const reference to an array that stores
  286. /// MAC/hardware address sources.
  287. ///
  288. /// @return non-const reference to MAC/hardware address sources
  289. CfgMACSource& getMACSources() {
  290. return (cfg_mac_source_);
  291. }
  292. /// @brief Returns const reference to an array that stores
  293. /// MAC/hardware address sources.
  294. ///
  295. /// @return const reference to MAC/hardware address sources
  296. const CfgMACSource& getMACSources() const {
  297. return (cfg_mac_source_);
  298. }
  299. /// @brief Returns information about control socket
  300. /// @return pointer to the Element that holds control-socket map
  301. const isc::data::ConstElementPtr getControlSocketInfo() const {
  302. return (control_socket_);
  303. }
  304. /// @brief Sets information about the control socket
  305. /// @param control_socket Element that holds control-socket map
  306. void setControlSocketInfo(const isc::data::ConstElementPtr& control_socket) {
  307. control_socket_ = control_socket;
  308. }
  309. /// @brief Returns pointer to the dictionary of global client
  310. /// class definitions
  311. ClientClassDictionaryPtr getClientClassDictionary() {
  312. return (class_dictionary_);
  313. }
  314. /// @brief Returns pointer to const dictionary of global client
  315. /// class definitions
  316. const ClientClassDictionaryPtr getClientClassDictionary() const {
  317. return (class_dictionary_);
  318. }
  319. /// @brief Sets the client class dictionary
  320. /// @param dictionary pointer to the new class dictionary
  321. void setClientClassDictionary(const ClientClassDictionaryPtr& dictionary) {
  322. class_dictionary_ = dictionary;
  323. }
  324. /// @brief Returns non-const reference to configured hooks libraries.
  325. ///
  326. /// @return non-const reference to configured hooks libraries.
  327. isc::hooks::HooksConfig& getHooksConfig() {
  328. return (hooks_config_);
  329. }
  330. /// @brief Returns const reference to configured hooks libraries.
  331. ///
  332. /// @return const reference to configured hooks libraries.
  333. const isc::hooks::HooksConfig& getHooksConfig() const {
  334. return (hooks_config_);
  335. }
  336. /// @brief Copies the current configuration to a new configuration.
  337. ///
  338. /// This method copies the parameters stored in the configuration to
  339. /// an object passed as parameter. The configuration sequence is not
  340. /// copied.
  341. ///
  342. /// @warning Some of the configuration objects are not copied at
  343. /// this point, e.g. subnets. This is because they contain quite complex
  344. /// data structures and they make use of pointers, so in many cases
  345. /// the default copy constructors can't be used. Implementing this
  346. /// requires quite a lot of time so this is left as is for now.
  347. /// The lack of ability to copy the entire configuration makes
  348. /// revert function of the @c CfgMgr unsuable.
  349. ///
  350. /// @param [out] new_config An object to which the configuration will
  351. /// be copied.
  352. void copy(SrvConfig& new_config) const;
  353. /// @brief Apply logging configuration to log4cplus.
  354. void applyLoggingCfg() const;
  355. /// @name Methods and operators used to compare configurations.
  356. ///
  357. //@{
  358. ///
  359. /// @brief Compares two objects for equality.
  360. ///
  361. /// It ignores the configuration sequence number when checking for
  362. /// equality of objects.
  363. ///
  364. /// @param other An object to be compared with this object.
  365. ///
  366. /// @return true if two objects are equal, false otherwise.
  367. bool equals(const SrvConfig& other) const;
  368. /// @brief Compares two objects for inequality.
  369. ///
  370. /// It ignores the configuration sequence number when checking for
  371. /// inequality of objects.
  372. ///
  373. /// @param other An object to be compared with this object.
  374. ///
  375. /// @return true if two objects are not equal, false otherwise.
  376. bool nequals(const SrvConfig& other) const {
  377. return (!equals(other));
  378. }
  379. /// @brief Equality operator.
  380. ///
  381. /// It ignores the configuration sequence number when checking for
  382. /// equality of objects.
  383. ///
  384. /// @param other An object to be compared with this object.
  385. ///
  386. /// @return true if two objects are equal, false otherwise.
  387. bool operator==(const SrvConfig& other) const {
  388. return (equals(other));
  389. }
  390. /// @param other An object to be compared with this object.
  391. ///
  392. /// It ignores the configuration sequence number when checking for
  393. /// inequality of objects.
  394. ///
  395. /// @param other An object to be compared with this object.
  396. ///
  397. /// @return true if two objects are not equal, false otherwise.
  398. bool operator!=(const SrvConfig& other) const {
  399. return (nequals(other));
  400. }
  401. //@}
  402. /// @brief Updates statistics.
  403. ///
  404. /// This method calls appropriate methods in child objects that update
  405. /// related statistics. See @ref CfgSubnets4::updateStatistics and
  406. /// @ref CfgSubnets6::updateStatistics for details.
  407. void updateStatistics();
  408. /// @brief Removes statistics.
  409. ///
  410. /// This method calls appropriate methods in child objects that remove
  411. /// related statistics. See @ref CfgSubnets4::removeStatistics and
  412. /// @ref CfgSubnets6::removeStatistics for details.
  413. void removeStatistics();
  414. /// @brief Sets decline probation-period
  415. ///
  416. /// Probation-period is the timer, expressed, in seconds, that specifies how
  417. /// long a lease is unavailable after reported as declined.
  418. ///
  419. /// @param decline_timer number of seconds after declined lease is restored
  420. void setDeclinePeriod(const uint32_t decline_timer) {
  421. decline_timer_ = decline_timer;
  422. }
  423. /// @brief Returns probation-period
  424. ///
  425. /// See @ref setDeclinePeriod for brief discussion.
  426. /// @return value of probation-period, expressed in seconds
  427. uint32_t getDeclinePeriod() const {
  428. return (decline_timer_);
  429. }
  430. /// @brief Sets whether server should send back client-id in DHCPv4
  431. ///
  432. /// This is a compatibility flag. The default (true) is compliant with
  433. /// RFC6842. False is for backward compatibility.
  434. ///
  435. /// @param echo should the client-id be sent or not
  436. void setEchoClientId(const bool echo) {
  437. echo_v4_client_id_ = echo;
  438. }
  439. /// @brief Returns whether server should send back client-id in DHCPv4.
  440. /// @return true if client-id should be returned, false otherwise.
  441. bool getEchoClientId() const {
  442. return (echo_v4_client_id_);
  443. }
  444. /// @brief Sets DHCP4o6 IPC port
  445. ///
  446. /// DHCPv4-over-DHCPv6 uses a UDP socket for interserver communication,
  447. /// this socket is bound and connected to this port and port + 1
  448. ///
  449. /// @param port port and port + 1 to use
  450. void setDhcp4o6Port(uint16_t port) {
  451. /// @todo: Port is supposed to be uint16_t, not uint32_t
  452. dhcp4o6_port_ = port;
  453. }
  454. /// @brief Returns DHCP4o6 IPC port
  455. ///
  456. /// See @ref setDhcp4o6Port for brief discussion.
  457. /// @return value of DHCP4o6 IPC port
  458. uint16_t getDhcp4o6Port() {
  459. return (dhcp4o6_port_);
  460. }
  461. /// @brief Returns pointer to the D2 client configuration
  462. D2ClientConfigPtr getD2ClientConfig() {
  463. return (d2_client_config_);
  464. }
  465. /// @brief Returns pointer to const D2 client configuration
  466. const D2ClientConfigPtr getD2ClientConfig() const {
  467. return (d2_client_config_);
  468. }
  469. /// @brief Sets the D2 client configuration
  470. /// @param d2_client_config pointer to the new D2 client configuration
  471. void setD2ClientConfig(const D2ClientConfigPtr& d2_client_config) {
  472. d2_client_config_ = d2_client_config;
  473. }
  474. /// @brief Unparse a configuration object
  475. ///
  476. /// @return a pointer to unparsed configuration
  477. virtual isc::data::ElementPtr toElement() const;
  478. private:
  479. /// @brief Sequence number identifying the configuration.
  480. uint32_t sequence_;
  481. /// @brief Logging specific information.
  482. LoggingInfoStorage logging_info_;
  483. /// @brief Interface configuration.
  484. ///
  485. /// Used to select interfaces on which the DHCP server will listen to
  486. /// queries.
  487. CfgIfacePtr cfg_iface_;
  488. /// @brief Pointer to option definitions configuration.
  489. ///
  490. /// This object holds the user-defined option definitions grouped
  491. /// by option space name.
  492. CfgOptionDefPtr cfg_option_def_;
  493. /// @brief Pointer to options (data) configuration.
  494. ///
  495. /// This object holds the instances of the options to be sent to clients
  496. /// connected to any subnet.
  497. CfgOptionPtr cfg_option_;
  498. /// @brief Pointer to subnets configuration for IPv4.
  499. CfgSubnets4Ptr cfg_subnets4_;
  500. /// @brief Pointer to subnets configuration for IPv6.
  501. CfgSubnets6Ptr cfg_subnets6_;
  502. /// @brief Pointer to the configuration for hosts reservation.
  503. ///
  504. /// This object holds a list of @c Host objects representing host
  505. /// reservations for different IPv4 and IPv6 subnets.
  506. CfgHostsPtr cfg_hosts_;
  507. /// @brief A list of configured MAC sources.
  508. CfgMACSource cfg_mac_source_;
  509. /// @brief Pointer to the configuration for RSOO-enabled options.
  510. ///
  511. /// This object holds a set of RSOO-enabled options. See
  512. /// RFC 6422 for the definition of the RSOO-enabled option.
  513. CfgRSOOPtr cfg_rsoo_;
  514. /// @brief Pointer to the configuration pertaining to processing of
  515. /// expired leases.
  516. CfgExpirationPtr cfg_expiration_;
  517. /// @brief Pointer to the configuration of the server identifier.
  518. CfgDUIDPtr cfg_duid_;
  519. /// @brief Pointer to the configuration of the lease and host database
  520. /// connection parameters.
  521. CfgDbAccessPtr cfg_db_access_;
  522. /// @brief Pointer to the general configuration for host reservations in
  523. /// DHCPv4.
  524. CfgHostOperationsPtr cfg_host_operations4_;
  525. /// @brief Pointer to the general configuration for host reservations in
  526. /// DHCPv6.
  527. CfgHostOperationsPtr cfg_host_operations6_;
  528. /// @brief Pointer to the control-socket information
  529. isc::data::ConstElementPtr control_socket_;
  530. /// @brief Pointer to the dictionary of global client class definitions
  531. ClientClassDictionaryPtr class_dictionary_;
  532. /// @brief Configured hooks libraries.
  533. isc::hooks::HooksConfig hooks_config_;
  534. /// @brief Decline Period time
  535. ///
  536. /// This timer specifies decline probation period, the time after a declined
  537. /// lease is recovered back to available state. Expressed in seconds.
  538. uint32_t decline_timer_;
  539. /// @brief Indicates whether v4 server should send back client-id
  540. bool echo_v4_client_id_;
  541. /// @brief DHCP4o6 IPC port
  542. ///
  543. /// DHCPv4-over-DHCPv6 uses a UDP socket for interserver communication,
  544. /// this socket is bound and connected to this port and port + 1
  545. uint16_t dhcp4o6_port_;
  546. D2ClientConfigPtr d2_client_config_;
  547. };
  548. /// @name Pointers to the @c SrvConfig object.
  549. ///
  550. //@{
  551. /// @brief Non-const pointer to the @c SrvConfig.
  552. typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
  553. /// @brief Const pointer to the @c SrvConfig.
  554. typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
  555. //@}
  556. } // namespace isc::dhcp
  557. } // namespace isc
  558. #endif // DHCPSRV_CONFIG_H