dhcp6_dhcp4o6_ipc.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #ifndef DHCP6_DHCP4O6_IPC_H
  15. #define DHCP6_DHCP4O6_IPC_H
  16. /// @file dhcp6_dhcp4o6_ipc.h Defines the Dhcp4o6Ipc class.
  17. /// This file defines the class Kea uses to act as the DHCPv6 server
  18. /// side of DHCPv4-over-DHCPv6 communication between servers.
  19. ///
  20. #include <dhcpsrv/dhcp4o6_ipc.h>
  21. #include <boost/shared_ptr.hpp>
  22. namespace isc {
  23. namespace dhcp {
  24. /// @brief Handles DHCPv4-over-DHCPv6 IPC on the DHCPv6 server side
  25. class Dhcp4o6Ipc : public Dhcp4o6IpcBase {
  26. protected:
  27. /// @brief Constructor
  28. ///
  29. /// Default constructor
  30. Dhcp4o6Ipc();
  31. /// @brief Destructor.
  32. virtual ~Dhcp4o6Ipc() { }
  33. public:
  34. /// @brief Returns pointer to the sole instance of Dhcp4o6Ipc
  35. ///
  36. /// Dhcp4o6Ipc is a singleton class
  37. ///
  38. /// @return the only existing instance of DHCP4o6 IPC
  39. static Dhcp4o6Ipc& instance();
  40. /// @brief Open communication socket
  41. ///
  42. /// Call base open method and sets the handler/callback when needed
  43. virtual void open();
  44. /// @brief On receive handler
  45. ///
  46. /// The handler sends the DHCPv6 packet back to the remote address
  47. static void handler();
  48. };
  49. } // namespace isc
  50. } // namespace dhcp
  51. #endif