{
// get distributor
IcmpPacketDistributorItem distributor = IcmpPacketDistributor::get_distributor(
- icmp::v4(), source_network_interface, io_serv);
+ protocol, source_network_interface, io_serv);
// create pinger
IcmpPinger *ptr = new IcmpPinger(io_serv, protocol, echo_reply_timeout_in_sec, distributor);
// check if there is an instance for this protocol and interface
if ( Instances.count(identifier) == 0 )
{ // need to create an instance for this protocol and network interface
+ std::string protocol_str;
+ if (protocol == icmp::v4())
+ protocol_str = "ICMPv4";
+ else if (protocol == icmp::v6())
+ protocol_str = "ICMPv6";
+ else
+ protocol_str = "unknown protocol!";
+
GlobalLogger.info() << "Creating IcmpPacketDistributor for interface "
- << network_interface << std::endl;
+ << network_interface << " and protocol "
+ << protocol_str << std::endl;
IcmpPacketDistributorItem new_instance( new IcmpPacketDistributor(
protocol, network_interface, io_serv ) );
Instances[identifier] = new_instance;