Guilherme Maciel Ferreira [Wed, 14 Mar 2012 00:22:02 +0000]
Use the "host.source-network-interface" only if the global "default-source-network-interface" is empty.
Guilherme Maciel Ferreira [Wed, 14 Mar 2012 00:03:03 +0000]
Test: updating the test cases with the new network interface options.
Guilherme Maciel Ferreira [Tue, 13 Mar 2012 23:57:21 +0000]
Documentation: updating the Readme with the new network interface options.
Guilherme Maciel Ferreira [Tue, 13 Mar 2012 23:54:49 +0000]
Renamed the global "source-network-interface" to "default-source-network-interface".
Guilherme Maciel Ferreira [Tue, 13 Mar 2012 23:36:55 +0000]
Added the host.source-network-interface configuration option.
Guilherme Maciel Ferreira [Thu, 23 Feb 2012 02:45:00 +0000]
Fix: cast to integer because some compilers do not provide automatic conversion.
Guilherme Maciel Ferreira [Thu, 23 Feb 2012 02:27:32 +0000]
Removing the const qualifier to link with Boost.
- Older versions of GCC does not link with different constness.
Guilherme Maciel Ferreira [Thu, 23 Feb 2012 09:54:32 +0000]
Small formatting.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 18:15:05 +0000]
Changes introduced in the test branch.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 03:24:38 +0000]
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 03:21:40 +0000]
Fix: suppress the warning about dereferencing type-punned pointer that break strict-aliasing rules.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:48:44 +0000]
Not implemented. The classes config/Host and dns/HostAddress serve to
different purposes, it is better to keep them separated.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:35:56 +0000]
Not implemented. The checksum calculations are different in ICMP and TCP.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:34:03 +0000]
Not done and not important, as no bottleneck is noticeable.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:24:17 +0000]
Not implemented according to the message:
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
To: guilherme.maciel.ferreira@gmail.com
Subject: Re: DNS library
Date: Mon, 12 Dec 2011 11:12:55 +0100
Hi Guilherme,
On Friday, 9. December 2011 19:24:49 you wrote:
> What do you think is the best approach to include the DNS library in
> the pingcheck? Once it is just headers, do you think I must make the
> DNS library install its header somewhere and search them in the
> pingcheck build process, or do you know a better approach?
I'd say we keep the current approach with the in-tree files: pingcheck is
currently the only project at Intra2net that relies on boost::net::dns.
So building is easier with less external dependencies.
The situation will change as soon as another project uses it, too.
Cheers,
Thomas
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:23:03 +0000]
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:21:54 +0000]
Implemented in 'config' branch.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:20:55 +0000]
Implemented in 'test' branch.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:19:10 +0000]
Implemented in ipv6 branch.
Guilherme Maciel Ferreira [Tue, 21 Feb 2012 01:15:42 +0000]
Guilherme Maciel Ferreira [Mon, 20 Feb 2012 18:54:26 +0000]
Merge branch 'test'
Conflicts:
src/config/configurationreader.cpp
src/config/configurationreader.h
src/host/messagepayload.cpp
src/link/linkstatus.h
src/main.cpp
src/tcp/tcpheader.cpp
Guilherme Maciel Ferreira [Mon, 20 Feb 2012 18:11:17 +0000]
The log level can be configured in the command line, through --log-level=<level> option.
Guilherme Maciel Ferreira [Mon, 20 Feb 2012 18:03:22 +0000]
Fix: using libi2ncommon LogLevel.
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 22:35:16 +0000]
Bring aboard log level configuration.
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 21:05:23 +0000]
Bring aboard log level parsing function.
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 20:56:14 +0000]
Changed protocol_string_map's storage class from external to internal.
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.
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".
Guilherme Maciel Ferreira [Sun, 19 Feb 2012 18:02:04 +0000]
Added index suffix to the parameters names.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 14:21:18 +0000]
Documentation for TCP header.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 02:46:14 +0000]
Test: bring aboard TcpHeader test case.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 01:12:13 +0000]
Removed unused parameter.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 01:06:25 +0000]
Added functions prototypes to suppress some warnings.
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.
Guilherme Maciel Ferreira [Sat, 18 Feb 2012 00:14:39 +0000]
Added stack protection warning and optimization to avoid stack overflows.
Guilherme Maciel Ferreira [Mon, 13 Feb 2012 00:28:47 +0000]
Test: bring aboard LinkStatus test case.
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 23:29:48 +0000]
Fix: fixed previous test case namespace.
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 23:23:54 +0000]
Test: bring aboard PingProtocol test case.
Guilherme Maciel Ferreira [Mon, 6 Feb 2012 02:13:22 +0000]
Test: bring aboard ConfigurationOptions test case.
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.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 23:14:54 +0000]
Fix: misspelled class name.
- The correct is HostsDownLimitOption instead of HostDownLimitOption.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 00:33:32 +0000]
Documentation: added --daemon option.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 00:32:15 +0000]
Test: added --daemon option to ConfigurationCommandLine test case.
Guilherme Maciel Ferreira [Thu, 2 Feb 2012 00:31:01 +0000]
Test: bring aboard ConfigurationFile test case.
Guilherme Maciel Ferreira [Wed, 1 Feb 2012 01:42:14 +0000]
Small documentation fixes.
Guilherme Maciel Ferreira [Wed, 1 Feb 2012 01:15:44 +0000]
Test: bring aboard ConfigurationCommandLine test case.
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.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 19:07:52 +0000]
Removed parameter to shut the warning up.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 19:04:28 +0000]
Added function prototypes to shut the warnings up.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 18:51:49 +0000]
Created an intermediate variable to shut the warning up.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 18:35:47 +0000]
Small documentation fix.
Guilherme Maciel Ferreira [Sat, 28 Jan 2012 18:34:49 +0000]
Increased warning level.
Guilherme Maciel Ferreira [Thu, 26 Jan 2012 09:43:04 +0000]
Using LinkStatusItem type as an alias to the boost::shared_ptr<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
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
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
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.
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.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 21:54:48 +0000]
Standardized variables names with a common suffix.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 10:21:06 +0000]
Test: bring aboard HostStatusAnalyzer test case.
Guilherme Maciel Ferreira [Fri, 20 Jan 2012 10:15:53 +0000]
Test: bring aboard the LinkStatusAnalyzer mock required by HostStatusAnalyzer.
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.
Guilherme Maciel Ferreira [Mon, 16 Jan 2012 09:19:10 +0000]
Test: bring aboard Icmpv6Header test case.
Guilherme Maciel Ferreira [Tue, 10 Jan 2012 09:18:33 +0000]
Test: bring aboard Icmpv4Header test case.
Guilherme Maciel Ferreira [Sun, 8 Jan 2012 15:57:51 +0000]
Test: bring aboard Ipv6Header test case.
Guilherme Maciel Ferreira [Sun, 8 Jan 2012 14:43:11 +0000]
Test: removed hard-coded MessagePayload size.
Guilherme Maciel Ferreira [Sun, 8 Jan 2012 14:41:03 +0000]
Test: bring aboard Ipv4Header test case.
Guilherme Maciel Ferreira [Sat, 7 Jan 2012 16:20:58 +0000]
Fix: added missing statements in the makefile and split the sources variable.
Guilherme Maciel Ferreira [Fri, 6 Jan 2012 10:19:51 +0000]
Test: finished MessagePayload test case.
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.
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.
Guilherme Maciel Ferreira [Thu, 5 Jan 2012 22:27:17 +0000]
Fix: set assert lower limit equal to zero.
Guilherme Maciel Ferreira [Thu, 5 Jan 2012 22:25:18 +0000]
Documentation: small fixes.
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:58:27 +0000]
PC-Lint warnings fixed:
- Info 713: Loss of precision (arg. no. 1) (unsigned char to char).
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:57:46 +0000]
PC-Lint warnings fixed:
- Warning 603: Symbol 'address' (line x) not initialized;
- Info 766: Header file 'limits' not used in module 'src\ip\ipv6header.cpp'.
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:54:33 +0000]
PC-Lint warnings fixed:
- Info 732: Loss of sign (initialization) (int to unsigned int).
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:53:30 +0000]
PC-Lint warnings fixed:
- Info 713: Loss of precision (initialization) (unsigned int to int)
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:52:26 +0000]
PC-Lint warnings fixed:
- Warning 568: non-negative quantity is never less than zero.
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:49:52 +0000]
PC-Lint warnings fixed:
- Info 731: Boolean argument to equal/not equal;
- Info 866: Unusual use of '?' in argument to sizeof;
- Info 751: local typedef 'boost_static_assert_typedef_x' (line x) not referenced.
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:48:44 +0000]
PC-Lint warnings fixed:
- Info 713: Loss of precision (arg. no. 1) (unsigned int to int);
- Info 701: Shift left of signed quantity (int).
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 09:47:02 +0000]
PC-Lint warnings fixed:
- Warning 1551: Function may throw exception '...' in destructor 'NetworkInterfaceList::~NetworkInterfaceList(void)';
- Info 1775: catch block does not catch any declared exception.
Guilherme Maciel Ferreira [Tue, 3 Jan 2012 02:19:51 +0000]
Bring aboard test framework.
Guilherme Maciel Ferreira [Sat, 31 Dec 2011 22:49:07 +0000]
Changed notify message to error message.
Guilherme Maciel Ferreira [Fri, 30 Dec 2011 02:31:37 +0000]
Make explicit that the address from ICMPv6 can not be retrieved.
Guilherme Maciel Ferreira [Sat, 24 Dec 2011 14:06:41 +0000]
Fix: handling packets with options length equal to zero.
Guilherme Maciel Ferreira [Sat, 24 Dec 2011 13:52:00 +0000]
Fix: the TCP's ttl was being printed as a char instead of as a integer.
Guilherme Maciel Ferreira [Sat, 24 Dec 2011 13:22:30 +0000]
PC-Lint warnings fixed:
- Info 737: Loss of sign in promotion from int to unsigned int;
- Info 713: Loss of precision (arg. no. 2) (unsigned int to int) in 'is.read( ..., PayloadSizeInBytes )' and 'os.write( ..., PayloadSizeInBytes )'.
Guilherme Maciel Ferreira [Sat, 24 Dec 2011 12:42:43 +0000]
PC-Lint warnings fixed:
- Info 1736: Redundant access specifier (private);
Guilherme Maciel Ferreira [Thu, 22 Dec 2011 10:11:39 +0000]
PC-Lint warnings fixed:
- Warning 1551: Function may throw exception '...' in destructor 'NetworkInterfaceList::~NetworkInterfaceList(void)';
- Info 774: Boolean within 'if' always evaluates to True.
Guilherme Maciel Ferreira [Thu, 22 Dec 2011 09:42:24 +0000]
PC-Lint warnings fixed:
- Info 1786: Implicit conversion to Boolean (return) (int to bool);
- Info 1705: static class members may be accessed by the scoping operator;
- Info 713: Loss of precision (arg. no. 2) (unsigned int to int);
- Info 737: Loss of sign in promotion from int to unsigned int in statement 'size -= sizeof(word_array[ 0 ])';
- Info 713: Loss of precision (assignment) (unsigned int to int) in statement 'size -= sizeof(word_array[ 0 ])';
- Info 1773: Attempt to cast away const (or volatile) in statement 'cksum += *(uint8_t*) word_array';
- Replaced all C-style casts by C++ style casts.
Guilherme Maciel Ferreira [Wed, 21 Dec 2011 10:09:19 +0000]
PC-Lint warnings fixed:
- Info 1705: static class members may be accessed by the scoping operator;
- Info 732: Loss of sign (arg. no. 1) (int to unsigned int) in 'byte = Payload[ header_byte_index ]';
- Warning 534: Ignoring return value of function 'MessagePayload::read(...)'.
Guilherme Maciel Ferreira [Wed, 21 Dec 2011 09:56:43 +0000]
PC-Lint warnings fixed:
- Info 766: Header file 'limits' not used in module;
- Warning 534: Ignoring return value of functions 'MessagePayload::read(...)' and 'std::basic_istream<char>::read(char *, int)';
- Info 737: Loss of sign in promotion from int to unsigned int;
- Info 713: Loss of precision (initialization) (unsigned int to int);
- Info 732: Loss of sign (arg. no. 2) (int to unsigned int) in 'header.Payload.append( options_data.get(), options_length )'.
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 10:12:52 +0000]
PC-Lint warnings fixed:
- Info 734: Loss of precision (arg. no. 1) (9 bits to 8 bits) in src\icmp\icmppacketfactory.cpp:170;
- Info 788: enum constant 'Icmpv6Type::Icmpv6Type_First' not used within defaulted switch;
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 10:02:37 +0000]
Made copy constructor private to disable object copies.
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 09:53:25 +0000]
PC-Lint warnings fixed:
- Warning 574: Signed-unsigned mix with relational;
- Info 737: Loss of sign in promotion from int to unsigned int;
- Warning 534: Ignoring return value of function 'IcmpPacket/TcpSegment::write(std::basic_ostream<char> &) const';
- Info 731: Boolean argument to equal/not equal;
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 09:38:53 +0000]
PC-Lint warnings fixed:
- Warning 574: Signed-unsigned mix with relational;
- Info 737: Loss of sign in promotion from int to unsigned int;
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 09:17:20 +0000]
Changed 'ttl' field from signed to unsigned, avoiding loss of precision.
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 09:08:30 +0000]
PC-Lint warnings fixed:
- Info 713: Loss of precision (initialization) (unsigned int to int) of 'resolved_ip_count' and 'current_ttl';
- Info 1762: Member function 'DnsResolver::fill_answers_list(...)' could be made const;
- Info 1762: Member function 'DnsResolver::fill_resolved_ip_list(...)' could be made const;
- Warning 578: Declaration of symbol 'ip' hides symbol 'boost::asio::ip';
- Warning 613: Possible use of null pointer 'a_rr' in left argument to operator '->';
Guilherme Maciel Ferreira [Tue, 20 Dec 2011 08:55:59 +0000]
PC-Lint warnings fixed:
- Warning 1529: Symbol 'Class::operator=(const Class &)' not first checking for assignment to this
Guilherme Maciel Ferreira [Mon, 19 Dec 2011 10:02:43 +0000]
PC-Lint warnings fixed:
- Info 732: Loss of sign (arg. no. 1) (int to unsigned int)