diff options
author | Thomas Markwalder <tmark@isc.org> | 2024-02-16 15:29:25 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2024-02-16 15:29:25 +0100 |
commit | e235c2149ce6137be7b08ca082ef33e5630f1f04 (patch) | |
tree | 0ed7f9a504c821d1843d265ea59e2b9e2533f6dd /src | |
parent | [#3230] Addressed review comments (diff) | |
download | kea-e235c2149ce6137be7b08ca082ef33e5630f1f04.tar.xz kea-e235c2149ce6137be7b08ca082ef33e5630f1f04.zip |
[#3230] Move isSocketReceivedSuppported()
Move isSocketReceivedSuppported() impls out of headers and into
cc files so we're sure SO_TIMESTAMP is known.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/dhcp/pkt_filter_inet.cc | 9 | ||||
-rw-r--r-- | src/lib/dhcp/pkt_filter_inet.h | 8 | ||||
-rw-r--r-- | src/lib/dhcp/pkt_filter_inet6.cc | 9 | ||||
-rw-r--r-- | src/lib/dhcp/pkt_filter_inet6.h | 8 | ||||
-rw-r--r-- | src/lib/dhcp/pkt_filter_lpf.cc | 9 | ||||
-rw-r--r-- | src/lib/dhcp/pkt_filter_lpf.h | 8 |
6 files changed, 30 insertions, 21 deletions
diff --git a/src/lib/dhcp/pkt_filter_inet.cc b/src/lib/dhcp/pkt_filter_inet.cc index ac21c2821b..6f46e2ea03 100644 --- a/src/lib/dhcp/pkt_filter_inet.cc +++ b/src/lib/dhcp/pkt_filter_inet.cc @@ -19,6 +19,15 @@ namespace dhcp { const size_t PktFilterInet::CONTROL_BUF_LEN = 512; +bool +PktFilterInet::isSocketReceivedTimeSupported() const { +#ifdef SO_TIMESTAMP + return (true); +#else + return (false); +#endif +} + SocketInfo PktFilterInet::openSocket(Iface& iface, const isc::asiolink::IOAddress& addr, diff --git a/src/lib/dhcp/pkt_filter_inet.h b/src/lib/dhcp/pkt_filter_inet.h index 0af2b132bb..fca5834b1a 100644 --- a/src/lib/dhcp/pkt_filter_inet.h +++ b/src/lib/dhcp/pkt_filter_inet.h @@ -37,13 +37,7 @@ public: /// a SOCKET_RECEIVED event in its event stack. /// /// @return True if SO_TIMESTAMP is defined. - virtual bool isSocketReceivedTimeSupported() const { -#ifdef SO_TIMESTAMP - return (true); -#else - return (false); -#endif - } + virtual bool isSocketReceivedTimeSupported() const; /// @brief Open primary and fallback socket. /// diff --git a/src/lib/dhcp/pkt_filter_inet6.cc b/src/lib/dhcp/pkt_filter_inet6.cc index af8987b80b..917e9b6382 100644 --- a/src/lib/dhcp/pkt_filter_inet6.cc +++ b/src/lib/dhcp/pkt_filter_inet6.cc @@ -22,6 +22,15 @@ namespace dhcp { const size_t PktFilterInet6::CONTROL_BUF_LEN = 512; +bool +PktFilterInet6::isSocketReceivedTimeSupported() const { +#ifdef SO_TIMESTAMP + return (true); +#else + return (false); +#endif +} + SocketInfo PktFilterInet6::openSocket(const Iface& iface, const isc::asiolink::IOAddress& addr, diff --git a/src/lib/dhcp/pkt_filter_inet6.h b/src/lib/dhcp/pkt_filter_inet6.h index 96fb072661..19bc72c959 100644 --- a/src/lib/dhcp/pkt_filter_inet6.h +++ b/src/lib/dhcp/pkt_filter_inet6.h @@ -26,13 +26,7 @@ public: /// a SOCKET_RECEIVED event in its event stack. /// /// @return True if SO_TIMESTAMP is defined. - virtual bool isSocketReceivedTimeSupported() const { -#ifdef SO_TIMESTAMP - return (true); -#else - return (false); -#endif - } + virtual bool isSocketReceivedTimeSupported() const; /// @brief Opens a socket. /// diff --git a/src/lib/dhcp/pkt_filter_lpf.cc b/src/lib/dhcp/pkt_filter_lpf.cc index a7acc12571..82160f1317 100644 --- a/src/lib/dhcp/pkt_filter_lpf.cc +++ b/src/lib/dhcp/pkt_filter_lpf.cc @@ -128,6 +128,15 @@ using namespace isc::util; namespace isc { namespace dhcp { +bool +PktFilterLPF::isSocketReceivedTimeSupported() const { +#ifdef SO_TIMESTAMP + return (true); +#else + return (false); +#endif +} + SocketInfo PktFilterLPF::openSocket(Iface& iface, const isc::asiolink::IOAddress& addr, diff --git a/src/lib/dhcp/pkt_filter_lpf.h b/src/lib/dhcp/pkt_filter_lpf.h index 5cb9822bcc..4bf788415b 100644 --- a/src/lib/dhcp/pkt_filter_lpf.h +++ b/src/lib/dhcp/pkt_filter_lpf.h @@ -38,13 +38,7 @@ public: /// a SOCKET_RECEIVED event in its event stack. /// /// @return True if SO_TIMESTAMP is defined. - virtual bool isSocketReceivedTimeSupported() const { -#ifdef SO_TIMESTAMP - return (true); -#else - return (false); -#endif - } + virtual bool isSocketReceivedTimeSupported() const; /// @brief Open primary and fallback socket. /// |