iface_mgr_bsd.cc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright (C) 2011, 2013 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. #include <config.h>
  15. #if defined(OS_BSD)
  16. #include <dhcp/iface_mgr.h>
  17. #include <exceptions/exceptions.h>
  18. using namespace std;
  19. using namespace isc;
  20. using namespace isc::asiolink;
  21. using namespace isc::dhcp;
  22. namespace isc {
  23. namespace dhcp {
  24. void
  25. IfaceMgr::detectIfaces() {
  26. /// @todo do the actual detection on BSDs. Currently just calling
  27. /// stub implementation.
  28. stubDetectIfaces();
  29. }
  30. bool
  31. IfaceMgr::isDirectResponseSupported() {
  32. return (false);
  33. }
  34. void IfaceMgr::os_send4(struct msghdr& /*m*/,
  35. boost::scoped_array<char>& /*control_buf*/,
  36. size_t /*control_buf_len*/,
  37. const Pkt4Ptr& /*pkt*/) {
  38. // @todo: Are there any specific actions required before sending IPv4 packet
  39. // on BSDs? See iface_mgr_linux.cc for working Linux implementation.
  40. }
  41. bool IfaceMgr::os_receive4(struct msghdr& /*m*/, Pkt4Ptr& /*pkt*/) {
  42. // @todo: Are there any specific actions required before receiving IPv4 packet
  43. // on BSDs? See iface_mgr_linux.cc for working Linux implementation.
  44. return (true); // pretend that we have everything set up for reception.
  45. }
  46. } // end of isc::dhcp namespace
  47. } // end of dhcp namespace
  48. #endif