From: Guilherme Maciel Ferreira Date: Fri, 26 Aug 2011 03:40:15 +0000 (-0300) Subject: Merge branch 'tcpping' X-Git-Tag: v1.1^0 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=4ee032dbab0c982ed6ab884d0720da16bd11cc4b;p=pingcheck Merge branch 'tcpping' Conflicts: src/icmp/icmppinger.cpp --- 3fe5213a1e7e2fe743fc34765a40ea5420dfa982 diff --cc src/icmp/icmppinger.cpp index bec718d,2cdd223..4e45e58 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@@ -341,35 -361,3 +361,4 @@@ void IcmpPinger::set_ping_status( PingS { PingerStatus = ping_status; } + - /** - * Avoid the socket to drop to another network interface if the destination - * is unreachable through the binded interface. Packets are sent only from - * this interface. - * - * @param source_network_interface The network interface to bind the pinger. - * - * @return false if the bind failed. - */ - bool IcmpPinger::select_source_network_interface( - const string &source_network_interface - ) - { - BOOST_ASSERT( !source_network_interface.empty() ); - - int ret = ::setsockopt( - Socket.native(), - SOL_SOCKET, - SO_BINDTODEVICE, - source_network_interface.c_str(), - source_network_interface.size() - ); - if ( ret == -1 ) - { - GlobalLogger.error() << "Error: could not bind pinger to interface " - << source_network_interface << endl; - return false; - } - - return true; - }