Guilherme Maciel Ferreira [Thu, 23 Jun 2011 18:40:43 +0000]
Using inheritance to commute between pingers
Guilherme Maciel Ferreira [Thu, 23 Jun 2011 16:22:32 +0000]
Modified configuration file
Guilherme Maciel Ferreira [Mon, 6 Jun 2011 17:55:05 +0000]
Renamed encode/decode to encode16/decode16
- specify the number of bits it encodes/decodes
- planning support for encode/decode of 32 bits used by TCP header
Guilherme Maciel Ferreira [Fri, 3 Jun 2011 20:00:41 +0000]
Replaced the assert by a conditional
- because the amount of data received can differ from the amount we expect, but this cannot make the application to abort.
Guilherme Maciel Ferreira [Sun, 29 May 2011 20:37:24 +0000]
Bring aboard TCP pinger class
Guilherme Maciel Ferreira [Sun, 29 May 2011 15:21:29 +0000]
Moved the icmppinger from host to icmp folder
Guilherme Maciel Ferreira [Thu, 19 May 2011 23:49:54 +0000]
Included a precondition to DnsResolver::handle_ip_address()
Guilherme Maciel Ferreira [Thu, 19 May 2011 23:48:28 +0000]
Added a tip in the Readme
Guilherme Maciel Ferreira [Thu, 19 May 2011 23:46:50 +0000]
Renamed BoostPinger to IcmpPinger
- the TCP pinger will be another class to avoid overloading this one with TCP stuff
- the name looks better =)
Guilherme Maciel Ferreira [Fri, 13 May 2011 23:17:37 +0000]
Minimum version required of Boost is 1.44
Thomas Jarosch [Fri, 13 May 2011 09:36:56 +0000]
First public commit
Thomas Jarosch [Thu, 12 May 2011 08:39:07 +0000]
Don't package files from kdevelop
Thomas Jarosch [Thu, 12 May 2011 08:38:46 +0000]
Started PC-Lint settings file
Thomas Jarosch [Thu, 12 May 2011 08:37:10 +0000]
Improve packaging: Include correct license files
Thomas Jarosch [Thu, 12 May 2011 08:36:06 +0000]
Add GPLv2 + linking exception to the source
Thomas Jarosch [Thu, 12 May 2011 08:19:34 +0000]
Remove t2n call stuff
Thomas Jarosch [Thu, 12 May 2011 08:18:14 +0000]
Add boost license + proper copyright were needed
Thomas Jarosch [Wed, 11 May 2011 15:22:20 +0000]
Update TODO list
Thomas Jarosch [Wed, 11 May 2011 15:04:44 +0000]
Properly handle ICMP packet replies: The kernel sends us a copy of all incoming ICMP messages on every ICMP socket
Thomas Jarosch [Thu, 5 May 2011 07:36:44 +0000]
Turn RepliesCount into ReceivedReply flag
Thomas Jarosch [Thu, 5 May 2011 07:24:27 +0000]
Update TODO file
Guilherme Maciel Ferreira [Wed, 4 May 2011 16:26:27 +0000]
Added doxygen comments in the most important places.
Thomas Jarosch [Wed, 4 May 2011 16:10:38 +0000]
Turn BoostPinger into true async operation
Thomas Jarosch [Wed, 4 May 2011 15:01:15 +0000]
No rescheduling in BoostPinger
Guilherme Maciel Ferreira [Wed, 4 May 2011 13:29:20 +0000]
Implemented the feature:
- Make the link down interval also configurable. Today it is possible just to
configure the amount of time the link must to be up to notify. Do another
configuration to allow the time of link down.
Thomas Jarosch [Wed, 4 May 2011 13:40:14 +0000]
Two TODO entrys solved
Thomas Jarosch [Wed, 4 May 2011 13:39:50 +0000]
Reuse BoostPinger object
Thomas Jarosch [Wed, 4 May 2011 09:59:43 +0000]
Fix ping of IP addresses (don't do DNS lookup)
Guilherme Maciel Ferreira [Wed, 4 May 2011 09:41:06 +0000]
Solved the item:
- Perform a better treatment of missing configuration items, actually the
application just crashes.
All items that are strictly required have default values, or are checked against
valid values. The last item missing was nameserver, which has a default value now.
Guilherme Maciel Ferreira [Wed, 4 May 2011 08:50:49 +0000]
Alternative approach to solve:
- If one of the "[host]" in the configuration file omit the "interval" entry,
the application uses the next "[host]"'s "interval" entry, instead of a
default value. The problem is specific to the configuration read classes
that are not smart enough to verify which "[host]" have this entry and which
don't.
Example:
[host]
name=A
[host]
name=B
interval=1
[host]
name=C
interval=3
Thus, the tuples will be (A,1) , (B,3), (C,?), but A should have a default
value, instead of borrow B's value.
The approach consists of ensure the program only runs if there is an interval
for every single host.
Guilherme Maciel Ferreira [Wed, 4 May 2011 08:22:45 +0000]
Allowing unknown options and changed the default host down limit to 0
Thomas Jarosch [Tue, 3 May 2011 13:30:03 +0000]
Clean thread shutdown
Thomas Jarosch [Tue, 3 May 2011 12:55:40 +0000]
Remove boost signal handler: It's overdesigned for our use case and creates another thread just to wait for signals
Thomas Jarosch [Tue, 3 May 2011 12:53:35 +0000]
Handle signals in a thread safe way
Thomas Jarosch [Tue, 3 May 2011 11:37:37 +0000]
Convert signal handler library to unix line endings
Thomas Jarosch [Tue, 3 May 2011 09:56:41 +0000]
Create unique identifier for every ping
Guilherme Maciel Ferreira [Tue, 3 May 2011 09:06:06 +0000]
Moved the boost signal handler library
Guilherme Maciel Ferreira [Tue, 3 May 2011 09:04:44 +0000]
Updated TODO
Guilherme Maciel Ferreira [Tue, 3 May 2011 08:34:09 +0000]
The multi-threading approach solves the blocking
Guilherme Maciel Ferreira [Tue, 3 May 2011 08:26:30 +0000]
Merge branch 'pingcheck' of ssh://aqua.m.i2n/data/git/intranator/source into pingcheck
Guilherme Maciel Ferreira [Tue, 3 May 2011 08:12:34 +0000]
TODO changes
Guilherme Maciel Ferreira [Tue, 3 May 2011 08:10:15 +0000]
working signal handler
Thomas Jarosch [Tue, 3 May 2011 08:04:15 +0000]
Renamed project from libpingcheck to pingcheck
Thomas Jarosch [Tue, 3 May 2011 08:01:53 +0000]
Update TODO
Guilherme Maciel Ferreira [Mon, 2 May 2011 16:16:43 +0000]
Modularization of the main.cpp
- semantic order enforced by parameters
- less spaghetti code
- code more readable
- can be moved to a class more easily
Guilherme Maciel Ferreira [Mon, 2 May 2011 16:00:03 +0000]
Defining the LinkStatusAnalyzerItem
- to keep the standard
- to provide the same benefits as the other Item types
Guilherme Maciel Ferreira [Mon, 2 May 2011 15:58:01 +0000]
Defining the type PingSchedulerList as a vector of PingSchedulerItem
- to keep the standard
- same benefits as HostList
Guilherme Maciel Ferreira [Mon, 2 May 2011 15:56:16 +0000]
Defining the type HostList as a vector of HostItem
- provides a central point to change the container type
- makes the code more readable
- reduces the amount of code to read
Guilherme Maciel Ferreira [Mon, 2 May 2011 12:39:54 +0000]
Starts pinging immediately, instead of schedule to start "interval" seconds later
Guilherme Maciel Ferreira [Mon, 2 May 2011 12:17:11 +0000]
Renamed handle_timeout_echo_reply() to handle_timeout_icmp_packet()
- the name is more appropriate once the timeout is not triggered if any kind of ICMP packet arrive, not just echo reply
Guilherme Maciel Ferreira [Mon, 2 May 2011 11:00:47 +0000]
Using lock_guard to handle mutex locking/unlocking through RAII
Guilherme Maciel Ferreira [Mon, 2 May 2011 10:30:42 +0000]
The BoostPinger is more picky about received packets, because when running in
parallel with other BoostPingers, it could receive echo replies from any host,
leading to things like:
26 bytes from 209.85.149.104: icmp_seq=1 ttl=54 time=24 ms <-- pinger A received packet from host A
26 bytes from 209.85.149.104: icmp_seq=1 ttl=54 time=1999 ms <-- pinger B received packet from host A??
- Host up: www.postbank.de <-- what? You didn't receive any packet from the host you had ping
- Stick to the original ping interval: 10s
- Time elapsed since last ping: 12s <-- OK, pinger A parsed the packet from host A
- Stick to the original ping interval: 5s
- Time elapsed since last ping: 6s <-- WRONG, pinger B should not parse the packet from host A
Guilherme Maciel Ferreira [Mon, 2 May 2011 10:21:46 +0000]
Running the BoostPingers in parallel (multi-thread approach instead of assynchronous)
Guilherme Maciel Ferreira [Mon, 2 May 2011 09:58:57 +0000]
Removed fixed bugs
Guilherme Maciel Ferreira [Mon, 2 May 2011 07:37:37 +0000]
Added a mutex to avoid data race conditions in the shared link status object
Guilherme Maciel Ferreira [Fri, 29 Apr 2011 13:41:25 +0000]
Better comments
Thomas Jarosch [Fri, 29 Apr 2011 14:08:53 +0000]
Introduce connd pingcheck subsystem based upon NTP subsystem
fooo
Guilherme Maciel Ferreira [Fri, 29 Apr 2011 11:46:38 +0000]
Separated the endpoint creation in a method
Thomas Jarosch [Fri, 29 Apr 2011 09:31:52 +0000]
Build rpm package in parallel
Thomas Jarosch [Fri, 29 Apr 2011 09:30:29 +0000]
Make the status notifcation cmd optional. Also make the status parameter optional
Thomas Jarosch [Fri, 29 Apr 2011 09:29:52 +0000]
Switch log level to ::Info during development
Thomas Jarosch [Fri, 29 Apr 2011 09:20:18 +0000]
Don't bind the source interface if not specified
Thomas Jarosch [Fri, 29 Apr 2011 09:02:13 +0000]
Comment out -Werror as rpm will compile with -O2 - this results in warnings
Thomas Jarosch [Fri, 29 Apr 2011 09:01:51 +0000]
Iclude Intra2net commercial license for now
Guilherme Maciel Ferreira [Thu, 28 Apr 2011 14:24:01 +0000]
Included doxygen comments to member variables.
Guilherme Maciel Ferreira [Thu, 28 Apr 2011 12:29:04 +0000]
Log messages via I2n::Logger instead of cout/cerr.
Guilherme Maciel Ferreira [Thu, 28 Apr 2011 09:44:10 +0000]
Split Readme file.
- code conventions moved to Readme.code
Guilherme Maciel Ferreira [Thu, 28 Apr 2011 09:39:49 +0000]
PingInterval class changed from template to regular class to make it simple.
Guilherme Maciel Ferreira [Thu, 21 Apr 2011 09:29:37 +0000]
Fixed some issues issued by PC-lint
Guilherme Maciel Ferreira [Wed, 20 Apr 2011 13:13:06 +0000]
Improvement of ConfigurationReader
- renamed is_generic_options() to halt_on_generic_options(), which describes more precisely the semantic of this method
- moved halt_on_generic_options() to outside the parse_configuration_options()
- config-file processing moved from parse_configuration_options() to parse_generic_options(), because it is part of generic options
- the test "if ( vm.count(xxx) )" is no longer implicit compared to integer
Guilherme Maciel Ferreira [Wed, 20 Apr 2011 09:32:14 +0000]
Implemented feature: Program runs as daemon
Guilherme Maciel Ferreira [Tue, 19 Apr 2011 12:00:25 +0000]
The speed_up method could set the Interval to zero, which is a bug.
- also added asserts to harden the code and ensure the Interval will never become an invalid value.
Guilherme Maciel Ferreira [Tue, 19 Apr 2011 11:51:10 +0000]
Fixed bug: If one ping fails, the subsequent analysis report that the ping is down.
- The reason was that in HostStatusAnalyzer, analyze_ping_failed_count() was
called from within increase_ping_failed_count(), thus only when the ping
failed the ExceededPingFailedLimit was updated, to false. There were no path
where ExceededPingFailedLimit was updated to true.
Now, the analyze_ping_failed_count() is called everytime we call
update_ping_statistics(), which updates ExceededPingFailedLimit everytime.
Guilherme Maciel Ferreira [Tue, 19 Apr 2011 07:25:04 +0000]
Split the code of DnsResolver::resolve into more methods
Guilherme Maciel Ferreira [Mon, 18 Apr 2011 10:46:45 +0000]
Implemented feature: cache DNS requests info only until DNS reply is valid (TTL).
- created a class TimeToLive which is self updatable, and can get the ttl updated
- before each ping checks if the address is valid, if not, builds another IP list (which renews the ttl)
Guilherme Maciel Ferreira [Mon, 18 Apr 2011 07:32:46 +0000]
Fixed the type punning from boost::net::dns::message class
Guilherme Maciel Ferreira [Fri, 15 Apr 2011 13:44:51 +0000]
Removed one level of indirection provided by PingScheduler::handle_next_ping
Guilherme Maciel Ferreira [Fri, 15 Apr 2011 13:19:35 +0000]
Reading the nameserver form configuration file
Guilherme Maciel Ferreira [Fri, 15 Apr 2011 12:10:01 +0000]
Non-virtual destructors for classes that are unlikely to be base classes
Guilherme Maciel Ferreira [Fri, 15 Apr 2011 11:04:13 +0000]
Using the boost-net-dns library to resolve DNS host names
Guilherme Maciel Ferreira [Fri, 15 Apr 2011 11:02:18 +0000]
Commented the -O2 optmization level because it activates the -Wstrict-aliasing warning, which is issued by the boost-net-dns libraries.
Guilherme Maciel Ferreira [Wed, 13 Apr 2011 08:52:37 +0000]
Replaced post-fixed by pre-fixed increment
Guilherme Maciel Ferreira [Wed, 13 Apr 2011 08:48:29 +0000]
Increased the warning level
- included -pedantic, -Wshadow, -Wcast-qual and -Wconversion warnings
- fixed some warnings regarding lost of precision from conversions
- asserted that intermediate products from arithmetic operations fall within certain range
Guilherme Maciel Ferreira [Wed, 13 Apr 2011 08:28:00 +0000]
Using the std namespace within the souce file
Guilherme Maciel Ferreira [Tue, 12 Apr 2011 14:35:02 +0000]
Only the "using namespace std" is allowed, classes from other namespaces are included via "using"
- avoid conflicts with the boost DNS library classes
Guilherme Maciel Ferreira [Tue, 12 Apr 2011 12:10:07 +0000]
Renamed packages to more appropriate names
- ping to host, because it contains classes to deal with host
- notify to link, contains classes that deal with many hosts, on link basis
Guilherme Maciel Ferreira [Tue, 12 Apr 2011 08:43:25 +0000]
Encapsulated the encode, decode, read and write methods within the IcmpMessagePayload class
- simplify the message classes
Guilherme Maciel Ferreira [Mon, 11 Apr 2011 13:56:15 +0000]
Fixed more problems issued by PC-lint
- alternative initialization to avoid calling virtual methods from constructor
Guilherme Maciel Ferreira [Mon, 11 Apr 2011 13:51:42 +0000]
Fixed more problems issued by PC-lint (3 times now, bad programmer!)
Guilherme Maciel Ferreira [Fri, 8 Apr 2011 15:44:49 +0000]
Increment the replies count when receiving a destination unreachable, avoiding the request timeout message
Guilherme Maciel Ferreira [Fri, 8 Apr 2011 15:39:19 +0000]
Separate method to print the timeout of a echo request
Guilherme Maciel Ferreira [Fri, 8 Apr 2011 15:21:03 +0000]
Found an issue with sequence number
Guilherme Maciel Ferreira [Fri, 8 Apr 2011 14:34:53 +0000]
Pinger now handles ICMP Destination Unreachable messages
- handle_receive_echo_reply rename to handle_receive_icmp_packet, once it handles not just echo replies
- timer member variable has a more meaningful name
Guilherme Maciel Ferreira [Fri, 8 Apr 2011 13:25:27 +0000]
Refactoring the ICMP message parsing
- IcmpType enum separated from the IcmpHeader class, thus it has its own header without requiring to add the IcmpHeader's header file
- the IcmpHeader class delegates the parsing polymorphically to specialized IcmpMessage classes (i.e. allowing the parsing of Destination unreachable messages)
- IcmpHeader class does not requires the Payload member variable anymore, once it delegates the parsing to IcmpMessage classes
Guilherme Maciel Ferreira [Fri, 8 Apr 2011 11:35:29 +0000]
More meaningful name for timer objects.
Guilherme Maciel Ferreira [Thu, 7 Apr 2011 13:50:35 +0000]
Given more meaningful names to the variables
Guilherme Maciel Ferreira [Thu, 7 Apr 2011 10:57:01 +0000]
More wish list items
Guilherme Maciel Ferreira [Thu, 7 Apr 2011 10:54:37 +0000]
Implemented the requirement "Support selection of the source network interface, so we can change the source ip address when ping"
- unfortunately, I couldn't find a way to bind to an interface through Bosst Asio. So it was required to rely on native Unix Socket interface.
Guilherme Maciel Ferreira [Thu, 7 Apr 2011 10:47:17 +0000]
Reading the network interface from the configuration file.
Guilherme Maciel Ferreira [Tue, 5 Apr 2011 09:58:47 +0000]
Fixed more problems issued by PC-lint.