}
};
+// This test verifies that the PktFilterInet6 class reports its capability
+// to create SOCKET_RECEIVED events.
+TEST_F(PktFilterInet6Test, isSocketReceivedTimeSupported) {
+ // Create object under test.
+ PktFilterInet6 pkt_filter;
+#ifdef SO_TIMESTAMP
+ EXPECT_TRUE(pkt_filter.isSocketReceivedTimeSupported());
+#else
+ EXPECT_FALSE(pkt_filter.isSocketReceivedTimeSupported());
+#endif
+}
+
// This test verifies that the INET6 datagram socket is correctly opened and
// bound to the appropriate address and port.
TEST_F(PktFilterInet6Test, openSocket) {
EXPECT_FALSE(pkt_filter.isDirectResponseSupported());
}
+// This test verifies that the PktFilterInet class reports its capability
+// to create SOCKET_RECEIVED events.
+TEST_F(PktFilterInetTest, isSocketReceivedTimeSupported) {
+ // Create object under test.
+ PktFilterInet pkt_filter;
+#ifdef SO_TIMESTAMP
+ EXPECT_TRUE(pkt_filter.isSocketReceivedTimeSupported());
+#else
+ EXPECT_FALSE(pkt_filter.isSocketReceivedTimeSupported());
+#endif
+}
+
// This test verifies that the INET datagram socket is correctly opened and
// bound to the appropriate address and port.
TEST_F(PktFilterInetTest, openSocket) {
EXPECT_TRUE(pkt_filter.isDirectResponseSupported());
}
+// This test verifies that the PktFilterLPF class reports its capability
+// to create SOCKET_RECEIVED events.
+TEST_F(PktFilterLPFTest, isSocketReceivedTimeSupported) {
+ // Create object under test.
+ PktFilterLPF pkt_filter;
+#ifdef SO_TIMESTAMP
+ EXPECT_TRUE(pkt_filter.isSocketReceivedTimeSupported());
+#else
+ EXPECT_FALSE(pkt_filter.isSocketReceivedTimeSupported());
+#endif
+}
+
// All tests below require root privileges to execute successfully. If they
// are run as non-root they will be skipped via SKIP_IF(notRoot()).