pingcheck
13 years agoUsing encode1() and decode1() from MessagePayload class.
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 18:41:28 +0000]
Using encode1() and decode1() from MessagePayload class.
- This methods also allow to toggle the bit, the previous implementation allowed
  only to turn the bits on, but not turn them off.

13 years agoImplemented encode and decode methods for just 1 bit.
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 18:19:55 +0000]
Implemented encode and decode methods for just 1 bit.
- In order to hide statements like "Payload[13] | bit ? 0x08 : 0x0" and "Payload[13] & 0x04".

13 years agoAdded index suffix to the parameters names.
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 18:02:04 +0000]
Added index suffix to the parameters names.

13 years agoDocumentation for TCP header.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 14:21:18 +0000]
Documentation for TCP header.

13 years agoTest: bring aboard TcpHeader test case.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 02:46:14 +0000]
Test: bring aboard TcpHeader test case.

13 years agoRemoved unused parameter.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 01:12:13 +0000]
Removed unused parameter.

13 years agoAdded functions prototypes to suppress some warnings.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 01:06:25 +0000]
Added functions prototypes to suppress some warnings.

13 years agoFix: const-fied the argv parameter in order to suppress the string to char* conversio...
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 00:38:01 +0000]
Fix: const-fied the argv parameter in order to suppress the string to char* conversion warning.
- This also protects the string from modification.

13 years agoAdded stack protection warning and optimization to avoid stack overflows.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 00:14:39 +0000]
Added stack protection warning and optimization to avoid stack overflows.

13 years agoTest: bring aboard LinkStatus test case.
Guilherme Maciel Ferreira [Mon, 13 Feb 2012 00:28:47 +0000]
Test: bring aboard LinkStatus test case.

13 years agoFix: fixed previous test case namespace.
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 23:29:48 +0000]
Fix: fixed previous test case namespace.

13 years agoTest: bring aboard PingProtocol test case.
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 23:23:54 +0000]
Test: bring aboard PingProtocol test case.

13 years agoTest: bring aboard ConfigurationOptions test case.
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 02:13:22 +0000]
Test: bring aboard ConfigurationOptions test case.

13 years agoFix: not all letter in the protocol_string_map key were uppercase, which caused
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 02:04:35 +0000]
Fix: not all letter in the protocol_string_map key were uppercase, which caused
the protocol_uppercase_string to do not index properly.

13 years agoFix: misspelled class name.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 23:14:54 +0000]
Fix: misspelled class name.
- The correct is HostsDownLimitOption instead of HostDownLimitOption.

13 years agoDocumentation: added --daemon option.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 00:33:32 +0000]
Documentation: added --daemon option.

13 years agoTest: added --daemon option to ConfigurationCommandLine test case.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 00:32:15 +0000]
Test: added --daemon option to ConfigurationCommandLine test case.

13 years agoTest: bring aboard ConfigurationFile test case.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 00:31:01 +0000]
Test: bring aboard ConfigurationFile test case.

13 years agoSmall documentation fixes.
Guilherme Maciel Ferreira [Wed, 1 Feb 2012 01:42:14 +0000]
Small documentation fixes.

13 years agoTest: bring aboard ConfigurationCommandLine test case.
Guilherme Maciel Ferreira [Wed, 1 Feb 2012 01:15:44 +0000]
Test: bring aboard ConfigurationCommandLine test case.

13 years agoFix: solved stack smashing when creating StatusNotifierCommand.
Guilherme Maciel Ferreira [Sun, 29 Jan 2012 16:45:40 +0000]
Fix: solved stack smashing when creating StatusNotifierCommand.
- The StatusNotifierCommand member is a smart pointer instead of an object.
- Stack smashing is a protection from GCC to avoid segmentation faults from
  buffer overruns. Use -fno-stack-protector to disable it.
- This workaround protects some std::string strings from optimizations, which
  cause destructors to be called onto invalid std::string objects. Not sure
  whether is it a bug from gcc or in the pingcheck.

13 years agoRemoved parameter to shut the warning up.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 19:07:52 +0000]
Removed parameter to shut the warning up.

13 years agoAdded function prototypes to shut the warnings up.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 19:04:28 +0000]
Added function prototypes to shut the warnings up.

13 years agoCreated an intermediate variable to shut the warning up.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 18:51:49 +0000]
Created an intermediate variable to shut the warning up.

13 years agoSmall documentation fix.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 18:35:47 +0000]
Small documentation fix.

13 years agoIncreased warning level.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 18:34:49 +0000]
Increased warning level.

13 years agoUsing LinkStatusItem type as an alias to the boost::shared_ptr<LinkStatus>.
Guilherme Maciel Ferreira [Thu, 26 Jan 2012 09:43:04 +0000]
Using LinkStatusItem type as an alias to the boost::shared_ptr<LinkStatus>.

13 years agoRenamed LinkStatusAnalyzer to LinkStatus.
Guilherme Maciel Ferreira [Thu, 26 Jan 2012 00:39:46 +0000]
Renamed LinkStatusAnalyzer to LinkStatus.
    - This is a stronger noun name;
    - See "The Gravitational Pull of Functional Decomposition" at
      http://www.eetimes.com/design/embedded/4006522/Using-object-oriented-methods-to-achieve-C--s-promise-Part-3

13 years agoRenamed HostStatusAnalyzer to HostStatus.
Guilherme Maciel Ferreira [Wed, 25 Jan 2012 23:11:58 +0000]
Renamed HostStatusAnalyzer to HostStatus.
- This is a stronger noun name;
- See "The Gravitational Pull of Functional Decomposition" at
  http://www.eetimes.com/design/embedded/4006522/Using-object-oriented-methods-to-achieve-C--s-promise-Part-3

13 years agoMerge branch 'config' into test
Guilherme Maciel Ferreira [Wed, 25 Jan 2012 22:17:22 +0000]
Merge branch 'config' into test

Conflicts:
TODO
src/host/hoststatusanalyzer.h
src/icmp/icmppacket.h
src/main.cpp

13 years agoTest: keep mock class definition within header to reduce the amount of files, once...
Guilherme Maciel Ferreira [Sat, 21 Jan 2012 13:22:58 +0000]
Test: keep mock class definition within header to reduce the amount of files, once the mock implementation is empty.

13 years agoTest: split test cases in N binaries.
Guilherme Maciel Ferreira [Sat, 21 Jan 2012 10:23:34 +0000]
Test: split test cases in N binaries.
Each test in its own binary:
- Allow linking of mock objects without conflicts with the original definition,
  which is linked in another executable;
- Provide list of tests and hints on which test failed, instead of a bloated
  binary, which gives no hint about.

13 years agoStandardized variables names with a common suffix.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 21:54:48 +0000]
Standardized variables names with a common suffix.

13 years agoTest: bring aboard HostStatusAnalyzer test case.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 10:21:06 +0000]
Test: bring aboard HostStatusAnalyzer test case.

13 years agoTest: bring aboard the LinkStatusAnalyzer mock required by HostStatusAnalyzer.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 10:15:53 +0000]
Test: bring aboard the LinkStatusAnalyzer mock required by HostStatusAnalyzer.

13 years agoFix: The ping_fail_absolute_limit calculation was incorrect.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 10:09:26 +0000]
Fix: The ping_fail_absolute_limit calculation was incorrect.
- The intend of this variable is to provide the maximum number failed
  pings taking in consideration the amount of IP resolved for the host.

13 years agoTest: bring aboard Icmpv6Header test case.
Guilherme Maciel Ferreira [Mon, 16 Jan 2012 09:19:10 +0000]
Test: bring aboard Icmpv6Header test case.

13 years agoTest: bring aboard Icmpv4Header test case.
Guilherme Maciel Ferreira [Tue, 10 Jan 2012 09:18:33 +0000]
Test: bring aboard Icmpv4Header test case.

13 years agoTest: bring aboard Ipv6Header test case.
Guilherme Maciel Ferreira [Sun, 8 Jan 2012 15:57:51 +0000]
Test: bring aboard Ipv6Header test case.

13 years agoTest: removed hard-coded MessagePayload size.
Guilherme Maciel Ferreira [Sun, 8 Jan 2012 14:43:11 +0000]
Test: removed hard-coded MessagePayload size.

13 years agoTest: bring aboard Ipv4Header test case.
Guilherme Maciel Ferreira [Sun, 8 Jan 2012 14:41:03 +0000]
Test: bring aboard Ipv4Header test case.

13 years agoFix: added missing statements in the makefile and split the sources variable.
Guilherme Maciel Ferreira [Sat, 7 Jan 2012 16:20:58 +0000]
Fix: added missing statements in the makefile and split the sources variable.

13 years agoTest: finished MessagePayload test case.
Guilherme Maciel Ferreira [Fri, 6 Jan 2012 10:19:51 +0000]
Test: finished MessagePayload test case.

13 years agoFix: now the old_payload_data is a buffer to the original Payload data instead of...
Guilherme Maciel Ferreira [Fri, 6 Jan 2012 10:09:09 +0000]
Fix: now the old_payload_data is a buffer to the original Payload data instead of a pointer to it.
- This is required because the Payload.reset() deletes the data pointed by the old_payload_data,
so it became invalid and was breaking the append() method.

13 years agoImproved: changed copy's arguments format to improve readability.
Guilherme Maciel Ferreira [Fri, 6 Jan 2012 09:28:46 +0000]
Improved: changed copy's arguments format to improve readability.
- Changed from pointer arithmetic to array indexes.

13 years agoFix: set assert lower limit equal to zero.
Guilherme Maciel Ferreira [Thu, 5 Jan 2012 22:27:17 +0000]
Fix: set assert lower limit equal to zero.

13 years agoDocumentation: small fixes.
Guilherme Maciel Ferreira [Thu, 5 Jan 2012 22:25:18 +0000]
Documentation: small fixes.

13 years agoBring aboard test framework.
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 02:19:51 +0000]
Bring aboard test framework.

13 years agoChanges introduced in the ipv6 branch. v1.2
Guilherme Maciel Ferreira [Sun, 11 Dec 2011 22:51:20 +0000]
Changes introduced in the ipv6 branch.

13 years agoMessage to require sudo access to open raw sockets.
Guilherme Maciel Ferreira [Sat, 10 Dec 2011 13:56:45 +0000]
Message to require sudo access to open raw sockets.

13 years agoThe IP version used to transport TCP segments can be choosen, IPv4 or IPv6.
Guilherme Maciel Ferreira [Mon, 21 Nov 2011 22:58:45 +0000]
The IP version used to transport TCP segments can be choosen, IPv4 or IPv6.

13 years agoChanged old-style C casts by C++ style casts.
Guilherme Maciel Ferreira [Mon, 21 Nov 2011 22:49:51 +0000]
Changed old-style C casts by C++ style casts.

13 years agoTCP checksum for IPv6
Guilherme Maciel Ferreira [Mon, 21 Nov 2011 22:45:18 +0000]
TCP checksum for IPv6

13 years agoDocumentation for TCP Segment Factory.
Guilherme Maciel Ferreira [Sun, 20 Nov 2011 19:18:30 +0000]
Documentation for TCP Segment Factory.

13 years agoSmall documentation change in IP header classes: specifying the unit.
Guilherme Maciel Ferreira [Sat, 19 Nov 2011 16:59:57 +0000]
Small documentation change in IP header classes: specifying the unit.

13 years agoTODO: move DNS library to its own project.
Guilherme Maciel Ferreira [Sat, 19 Nov 2011 16:58:21 +0000]
TODO: move DNS library to its own project.

13 years agoSome grammatical corrections.
Guilherme Maciel Ferreira [Sat, 19 Nov 2011 13:15:58 +0000]
Some grammatical corrections.

13 years agoFixed include guards name
Guilherme Maciel Ferreira [Sat, 19 Nov 2011 13:05:02 +0000]
Fixed include guards name

13 years agoBring aboard ChangeLog file.
Guilherme Maciel Ferreira [Sat, 19 Nov 2011 13:01:08 +0000]
Bring aboard ChangeLog file.

13 years agoDocumentation for ICMP Packet Factory.
Guilherme Maciel Ferreira [Sat, 19 Nov 2011 12:04:40 +0000]
Documentation for ICMP Packet Factory.

13 years agoJust hardening the code with asserts.
Guilherme Maciel Ferreira [Fri, 18 Nov 2011 02:09:55 +0000]
Just hardening the code with asserts.

13 years agoBug: the match() method cannot consider the source address from IP header,
Guilherme Maciel Ferreira [Fri, 18 Nov 2011 02:05:59 +0000]
Bug: the match() method cannot consider the source address from IP header,
once the IPHeader object is not initialized in the read() method.
We must figure out why the IPv6 data does not come in the istream like IPv4 data.

13 years agoIt is working, and can be configurated, the ICMP ping over IPv6
Guilherme Maciel Ferreira [Fri, 18 Nov 2011 02:00:21 +0000]
It is working, and can be configurated, the ICMP ping over IPv6

13 years agoSmall documentation change
Guilherme Maciel Ferreira [Tue, 15 Nov 2011 23:53:43 +0000]
Small documentation change

13 years agoSmall code change
Guilherme Maciel Ferreira [Tue, 15 Nov 2011 23:52:53 +0000]
Small code change

13 years agoDocumentation for IPv6 header.
Guilherme Maciel Ferreira [Tue, 15 Nov 2011 23:42:27 +0000]
Documentation for IPv6 header.

13 years agoTCP checksum source and destination addresses use Boost.Asio objects instead of primi...
Guilherme Maciel Ferreira [Tue, 15 Nov 2011 23:06:34 +0000]
TCP checksum source and destination addresses use Boost.Asio objects instead of primitive types

13 years agoTCP pinger IP version is chosen by the pinger factory
Guilherme Maciel Ferreira [Mon, 14 Nov 2011 00:10:30 +0000]
TCP pinger IP version is chosen by the pinger factory

13 years agoBring aboard TCP header class for IPv6
Guilherme Maciel Ferreira [Sat, 12 Nov 2011 19:38:22 +0000]
Bring aboard TCP header class for IPv6

13 years agoUpdated "Type of Service" field name to "Differentiated Services"
Guilherme Maciel Ferreira [Sat, 12 Nov 2011 18:43:02 +0000]
Updated "Type of Service" field name to "Differentiated Services"

13 years agoUsing Boost.Asio address objects instead of primitive integer types
Guilherme Maciel Ferreira [Sat, 12 Nov 2011 18:25:54 +0000]
Using Boost.Asio address objects instead of primitive integer types
- This allows switching to 128 bits IPv6 address

13 years agoSimplifying Network Interface class and using more Boost.Asio objects
Guilherme Maciel Ferreira [Sat, 12 Nov 2011 03:01:50 +0000]
Simplifying Network Interface class and using more Boost.Asio objects

13 years agoUsing Boost.Asio protocol type instead of the enumeration for TCP
Guilherme Maciel Ferreira [Sat, 12 Nov 2011 02:38:34 +0000]
Using Boost.Asio protocol type instead of the enumeration for TCP
- Also, changed the IP address to Boost type

13 years agoBring aboard a class that encapsulate the list of network interfaces.
Guilherme Maciel Ferreira [Sat, 12 Nov 2011 00:42:21 +0000]
Bring aboard a class that encapsulate the list of network interfaces.

13 years agoAdjusting some comments
Guilherme Maciel Ferreira [Thu, 10 Nov 2011 07:07:20 +0000]
Adjusting some comments

13 years agoNew method to get the network interface IP address
Guilherme Maciel Ferreira [Tue, 8 Nov 2011 10:02:12 +0000]
New method to get the network interface IP address
- Using Boost.Asio objects instead of a primitive data type (under development).

13 years agoUsing Boost.Asio protocol type instead of the enumeration and adding ICMPv6 ping
Guilherme Maciel Ferreira [Tue, 8 Nov 2011 09:45:39 +0000]
Using Boost.Asio protocol type instead of the enumeration and adding ICMPv6 ping

13 years agoDelegating the segment creation and printing to more specialized classes
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 21:58:40 +0000]
Delegating the segment creation and printing to more specialized classes

13 years agoEphemeral source port calculation moved to a method(), mirroring the destination...
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 21:47:24 +0000]
Ephemeral source port calculation moved to a method(), mirroring the destination port.

13 years agoRenamed variable, most significant noun first
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 21:38:10 +0000]
Renamed variable, most significant noun first

13 years agoThe IcmpPacket's write() method returns a boolean, mirroring the read() method.
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 21:35:25 +0000]
The IcmpPacket's write() method returns a boolean, mirroring the read() method.

13 years agoBring aboard TCP segment factory.
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 21:28:54 +0000]
Bring aboard TCP segment factory.
- This class handles the TCP segment creation for IPv4 and IPv6

13 years agoBring aboard TCP segment (IP and TCP headers)
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 20:11:12 +0000]
Bring aboard TCP segment (IP and TCP headers)
- This allows to polymorphically change IPv4 and IPv6

13 years agoDocumentation for IPv4 header.
Guilherme Maciel Ferreira [Sun, 6 Nov 2011 14:03:27 +0000]
Documentation for IPv4 header.

13 years agoHigh Integrity CPP Rule 3.3.14: Declare the copy assignment operator protected in...
Guilherme Maciel Ferreira [Sat, 5 Nov 2011 17:35:09 +0000]
High Integrity CPP Rule 3.3.14: Declare the copy assignment operator protected in an abstract class.

13 years agoHigh Integrity CPP Rule 3.3.16: Explicitly declare polymorphic member functions virtu...
Guilherme Maciel Ferreira [Sat, 5 Nov 2011 14:51:01 +0000]
High Integrity CPP Rule 3.3.16: Explicitly declare polymorphic member functions virtual in a derived class.

13 years agoHigh Integrity CPP Guideline 3.2.4: An abstract class shall have no public constructors.
Guilherme Maciel Ferreira [Sat, 5 Nov 2011 14:24:46 +0000]
High Integrity CPP Guideline 3.2.4: An abstract class shall have no public constructors.

13 years agoAvoid 'unused variable' warning when compiling a non-debug version.
Guilherme Maciel Ferreira [Sat, 5 Nov 2011 14:16:38 +0000]
Avoid 'unused variable' warning when compiling a non-debug version.

13 years agoDelegating the ICMP packet creation to a specialized class and using a polymorphic...
Guilherme Maciel Ferreira [Fri, 4 Nov 2011 03:08:00 +0000]
Delegating the ICMP packet creation to a specialized class and using a polymorphic packet type

13 years agoBring aboard ICMP packet factory.
Guilherme Maciel Ferreira [Fri, 4 Nov 2011 02:51:50 +0000]
Bring aboard ICMP packet factory.
- This class handles the packet creation for ICMPv4 and ICMPv6

13 years agoProviding read() and write() methods, once operators >> and << does work properly...
Guilherme Maciel Ferreira [Fri, 4 Nov 2011 02:08:39 +0000]
Providing read() and write() methods, once operators >> and << does work properly with smart pointers

13 years agoRenamed methods, changed verb 'is' to 'match'
Guilherme Maciel Ferreira [Thu, 3 Nov 2011 00:03:59 +0000]
Renamed methods, changed verb 'is' to 'match'

13 years agoThe packet's type check is performed by methods in IcmpPacket
Guilherme Maciel Ferreira [Wed, 2 Nov 2011 05:02:14 +0000]
The packet's type check is performed by methods in IcmpPacket
- Because ICMP v4 and v6 have different values to echo reply

13 years agoThe packet printing is polymorphically performed by the IcmpPackets instead of the...
Guilherme Maciel Ferreira [Wed, 2 Nov 2011 04:36:11 +0000]
The packet printing is polymorphically performed by the IcmpPackets instead of the IcmpPinger
- Due to different fields, the printing methods were moved to the packet classes

13 years agoChanged assert(false) to assert(!"message") as recommended by C++ Coding Standards...
Guilherme Maciel Ferreira [Wed, 26 Oct 2011 21:46:36 +0000]
Changed assert(false) to assert(!"message") as recommended by C++ Coding Standards, chapter 68.

13 years agoIncreased the assertion check required to construct a PingScheduler object
Guilherme Maciel Ferreira [Wed, 26 Oct 2011 21:36:34 +0000]
Increased the assertion check required to construct a PingScheduler object

13 years agoDNS resolver now detects IPv6 IPs too.
Guilherme Maciel Ferreira [Wed, 26 Oct 2011 21:30:22 +0000]
DNS resolver now detects IPv6 IPs too.
- Also changed the detection mechanism from C fashioned to C++ boost style

13 years agoAdded const qualifier to some parameters
Guilherme Maciel Ferreira [Wed, 26 Oct 2011 17:06:05 +0000]
Added const qualifier to some parameters

13 years agoBring aboard ICMPv6 packet class
Guilherme Maciel Ferreira [Tue, 25 Oct 2011 00:31:20 +0000]
Bring aboard ICMPv6 packet class

13 years agoBring aboard ICMPv6 header class
Guilherme Maciel Ferreira [Tue, 25 Oct 2011 00:15:01 +0000]
Bring aboard ICMPv6 header class