const int argc,
char *argv[],
variables_map &vm
-)
+) const
{
try
{
const int argc,
char *argv[],
boost::program_options::variables_map &vm
- );
+ ) const;
bool process_configuration_file(
boost::program_options::variables_map &vm
);
* @return @c true if the last IPs resolved for the host have expired, thus
* requiring another query for up-to-date IPs.
*/
-bool DnsResolver::expired_resolved_ip()
+bool DnsResolver::expired_resolved_ip() const
{
const int threshold = 10; // TODO configurable
- BOOST_FOREACH( HostAddress host_address, ResolvedHostAddressList )
+ BOOST_FOREACH( const HostAddress &host_address, ResolvedHostAddressList )
{
int ttl = host_address.get_ttl().get_updated_value();
if ( ttl <= threshold )
bool resolve();
int get_resolved_ip_count() const;
std::string get_next_ip();
- bool expired_resolved_ip();
+ bool expired_resolved_ip() const;
private:
bool handle_ip_address();
{
LinkAnalyzer->notify_host_up( HostAddress );
}
-
-}
+} //lint !e1762
void HostStatusAnalyzer::reset_ping_counters()
{
Payload[ left_byte ] = static_cast<uint8_t>( value >> 8 );
Payload[ right_byte ] = static_cast<uint8_t>( value & 0xFF );
-}
+} //lint !e1762
/**
* @brief Retrieve 32 bits from the payload buffer.
Payload[ ++current_byte ] = static_cast<uint8_t>( value & 0xFF );
BOOST_ASSERT( current_byte == last_byte );
-}
+} //lint !e1762
/**
* @brief Read/Extract all the data from the input stream @a is and stores it
{
}
-PingInterval::operator PingIntervalType()
+PingInterval::operator PingIntervalType() const
{
BOOST_ASSERT( 0 < Interval );
PingInterval( PingIntervalType interval );
~PingInterval();
- operator PingIntervalType();
+ operator PingIntervalType() const;
void back_to_original();
void speed_up();
void Icmpv4Header::set_type( const Icmpv4Type type )
{
get_icmp_message_format()->set_type_v4( type );
-}
+} //lint !e1762
uint8_t Icmpv4Header::get_code() const
{
void Icmpv4Header::set_code( const uint8_t code )
{
get_icmp_message_format()->set_code( code );
-}
+} //lint !e1762
uint16_t Icmpv4Header::get_checksum() const
{
void Icmpv4Header::set_checksum( const uint16_t checksum )
{
get_icmp_message_format()->set_checksum( checksum );
-}
+} //lint !e1762
uint16_t Icmpv4Header::get_identifier() const
{
void Icmpv4Header::set_identifier( const uint16_t identifier )
{
get_icmp_message_format()->set_identifier( identifier );
-}
+} //lint !e1762
uint16_t Icmpv4Header::get_sequence_number() const
{
void Icmpv4Header::set_sequence_number( const uint16_t sequence_number )
{
get_icmp_message_format()->set_sequence_number( sequence_number );
-}
+} //lint !e1762
shared_ptr<IcmpMessage> Icmpv4Header::get_icmp_message_format() const
{
void Icmpv6Header::set_type( const Icmpv6Type type )
{
get_icmp_message_format()->set_type_v6( type );
-}
+} //lint !e1762
uint8_t Icmpv6Header::get_code() const
{
void Icmpv6Header::set_code( const uint8_t code )
{
get_icmp_message_format()->set_code( code );
-}
+} //lint !e1762
uint16_t Icmpv6Header::get_checksum() const
{
void Icmpv6Header::set_checksum( const uint16_t checksum )
{
get_icmp_message_format()->set_checksum( checksum );
-}
+} //lint !e1762
uint16_t Icmpv6Header::get_identifier() const
{
void Icmpv6Header::set_identifier( const uint16_t identifier )
{
get_icmp_message_format()->set_identifier( identifier );
-}
+} //lint !e1762
uint16_t Icmpv6Header::get_sequence_number() const
{
void Icmpv6Header::set_sequence_number( const uint16_t sequence_number )
{
get_icmp_message_format()->set_sequence_number( sequence_number );
-}
+} //lint !e1762
shared_ptr<IcmpMessage> Icmpv6Header::get_icmp_message_format() const
{
return header.Payload.write( os );
}
-uint16_t TcpHeader::calculate_checksum( const uint16_t *word_array, int size )
+uint16_t TcpHeader::calculate_checksum( const uint16_t *word_array, int size ) const
{
unsigned long cksum = 0;
while ( size > 1 )
);
private:
- uint16_t calculate_checksum( const uint16_t *word_array, int size );
+ uint16_t calculate_checksum( const uint16_t *word_array, int size ) const;
MessagePayload Payload;
};
start_receive();
}
-address TcpPinger::get_source_address()
+address TcpPinger::get_source_address() const
{
return NetInterface.get_address( Protocol );
}
);
private:
- boost::asio::ip::address get_source_address();
+ boost::asio::ip::address get_source_address() const;
boost::asio::ip::address get_destination_address() const;
uint16_t get_source_port() const;