dhcp6to4_ipc.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (C) 2015-2016 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 DHCP6TO4_IPC_H
  7. #define DHCP6TO4_IPC_H
  8. /// @file dhcp6to4_ipc.h Defines the Dhcp6to4Ipc class.
  9. /// This file defines the class Kea uses to act as the DHCPv6 server
  10. /// side of DHCPv4-over-DHCPv6 communication between servers.
  11. ///
  12. #include <dhcpsrv/dhcp4o6_ipc.h>
  13. #include <boost/shared_ptr.hpp>
  14. namespace isc {
  15. namespace dhcp {
  16. /// @brief Handles DHCPv4-over-DHCPv6 IPC on the DHCPv6 server side
  17. class Dhcp6to4Ipc : public Dhcp4o6IpcBase {
  18. protected:
  19. /// @brief Constructor
  20. ///
  21. /// Default constructor
  22. Dhcp6to4Ipc();
  23. /// @brief Destructor.
  24. virtual ~Dhcp6to4Ipc() { }
  25. public:
  26. /// @brief Returns pointer to the sole instance of Dhcp6to4Ipc
  27. ///
  28. /// Dhcp6to4Ipc is a singleton class
  29. ///
  30. /// @return the only existing instance of DHCP4o6 IPC
  31. static Dhcp6to4Ipc& instance();
  32. /// @brief Open communication socket
  33. ///
  34. /// Call base open method and sets the handler/callback when needed
  35. virtual void open();
  36. /// @brief On receive handler
  37. ///
  38. /// The handler sends the DHCPv6 packet back to the remote address
  39. static void handler();
  40. };
  41. } // namespace isc
  42. } // namespace dhcp
  43. #endif