Skip to content

Commit

Permalink
[#3230] addressed review
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan Becheriu committed Feb 16, 2024
1 parent c54c572 commit 1a0f209
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/lib/dhcp/pkt_filter_inet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const size_t PktFilterInet::CONTROL_BUF_LEN = 512;
bool
PktFilterInet::isSocketReceivedTimeSupported() const {
#ifdef SO_TIMESTAMP
return (true);
return (true);
#else
return (false);
return (false);
#endif
}
}

SocketInfo
PktFilterInet::openSocket(Iface& iface,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/dhcp/pkt_filter_inet6.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const size_t PktFilterInet6::CONTROL_BUF_LEN = 512;
bool
PktFilterInet6::isSocketReceivedTimeSupported() const {
#ifdef SO_TIMESTAMP
return (true);
return (true);
#else
return (false);
return (false);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/dhcp/pkt_filter_lpf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ namespace dhcp {
bool
PktFilterLPF::isSocketReceivedTimeSupported() const {
#ifdef SO_TIMESTAMP
return (true);
return (true);
#else
return (false);
return (false);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/dhcp/tests/pkt_filter6_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class PktFilter6Test : public ::testing::Test {
/// @brief Checks that a received message has the appropriate events
/// in it's event stack.
///
/// @param rcvd_msg An instance of the message to be tested.
/// @param so_time_supported If true the event stack should have with
/// @param msg An instance of the message to be tested.
/// @param so_time_supported If true the event stack should have
/// a SOCKET_RECEIVED event followed by a BUFFER_READ event, if false
/// it should have only the latter.
void testReceivedPktEvents(const PktPtr& msg, bool so_time_supported) const;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ TEST_F(PktFilterBPFTest, receive) {
testRcvdMessageAddressPort(rcvd_pkt);

// Verify that the packet event stack is as expected.
testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
}

// This test verifies that if the packet is received over the raw
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ TEST_F(PktFilterInet6Test, receive) {
testRcvdMessage(rcvd_pkt);

// Verify that the packet event stack is as expected.
testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
}

} // anonymous namespace
2 changes: 1 addition & 1 deletion src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ TEST_F(PktFilterInetTest, receive) {
testRcvdMessageAddressPort(rcvd_pkt);

// Verify that the packet event stack is as expected.
testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
}

} // anonymous namespace
2 changes: 1 addition & 1 deletion src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ TEST_F(PktFilterLPFTest, receive) {
testRcvdMessageAddressPort(rcvd_pkt);

// Verify that the packet event stack is as expected.
testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported());
}

// This test verifies that if the packet is received over the raw
Expand Down
4 changes: 2 additions & 2 deletions src/lib/dhcp/tests/pkt_filter_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class PktFilterTest : public ::testing::Test {
/// @brief Checks that a received message has the appropriate events
/// in it's event stack.
///
/// @param rcvd_msg An instance of the message to be tested.
/// @param so_time_supported If true the event stack should have with
/// @param msg An instance of the message to be tested.
/// @param so_time_supported If true the event stack should have
/// a SOCKET_RECEIVED event followed by a BUFFER_READ event, if false
/// it should have only the latter.
void testReceivedPktEvents(const PktPtr& msg, bool so_time_supported) const;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/dhcp/testutils/pkt_filter_test_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ PktFilterTestStub::isDirectResponseSupported() const {
bool
PktFilterTestStub::isSocketReceivedTimeSupported() const {
#ifdef SO_TIMESTAMP
return(true);
return (true);
#else
return(false);
return (false);
#endif
}

Expand Down

0 comments on commit 1a0f209

Please sign in to comment.