]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3230] Move isSocketReceivedSuppported()
authorThomas Markwalder <tmark@isc.org>
Fri, 16 Feb 2024 14:29:25 +0000 (09:29 -0500)
committerThomas Markwalder <tmark@isc.org>
Fri, 16 Feb 2024 14:29:25 +0000 (09:29 -0500)
Move isSocketReceivedSuppported() impls out of headers and into
cc files so we're sure SO_TIMESTAMP is known.

src/lib/dhcp/pkt_filter_inet.cc
src/lib/dhcp/pkt_filter_inet.h
src/lib/dhcp/pkt_filter_inet6.cc
src/lib/dhcp/pkt_filter_inet6.h
src/lib/dhcp/pkt_filter_lpf.cc
src/lib/dhcp/pkt_filter_lpf.h

index ac21c2821bbd5c90341a095140a0c3d1f91bb020..6f46e2ea03e160e49a01b4a8c95e79f00982a989 100644 (file)
@@ -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,
index 0af2b132bbb323b3f9bdba52e4c83931db03ffc6..fca5834b1a8efb12d0b7088061390c3bdb7c0837 100644 (file)
@@ -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.
     ///
index af8987b80bee85300ed832d11a531972f158d033..917e9b6382d9fe0690396aade5c9ed859a08dbec 100644 (file)
@@ -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,
index 96fb0726616065ce90181ad81e92c48e5742ea2a..19bc72c9594424362f5856fc320c61321d834be1 100644 (file)
@@ -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.
     ///
index a7acc12571dd1ac7c13ff645abc5de328ea7b2d5..82160f1317a802982702531684041e6b20cb6d10 100644 (file)
@@ -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,
index 5cb9822bccb4ffe2a828d26d1c3c4e2df1bf1284..4bf788415be950b30834e65e026f0015921fcef7 100644 (file)
@@ -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.
     ///