pingcheck
10 years agoadded option to print raw message data in text form for debugging
Christian Herdtweck [Wed, 18 Mar 2015 14:57:22 +0000]
added option to print raw message data in text form for debugging

10 years agoadded code to parse ICMP type TimeExceeded
Christian Herdtweck [Wed, 18 Mar 2015 10:46:13 +0000]
added code to parse ICMP type TimeExceeded

* format is identical to DestinationUnreachable and other ICMP replies
  --> created a common half-abstract base class IcmpData_PingFailReply
* added a match_time_exceeded to IcmpPacket which is called by IcmpPinger

10 years agoin case of unknown ICMP reply type, consume data instead of returning failure in...
Christian Herdtweck [Wed, 18 Mar 2015 10:45:07 +0000]
in case of unknown ICMP reply type, consume data instead of returning failure in IcmpPacket::read

10 years agoadded ip source and destination address to IpHeader::to_string
Christian Herdtweck [Wed, 18 Mar 2015 10:38:22 +0000]
added ip source and destination address to IpHeader::to_string

10 years agoincreased version to 0.3 since have now new ICMP packet structure and
Christian Herdtweck [Fri, 13 Mar 2015 14:18:52 +0000]
increased version to 0.3 since have now new ICMP packet structure and
packet feeder tool and will create new tar from this

10 years agoadded a simple text output (to_string) for DestinationUnreachable ICMP data
Christian Herdtweck [Fri, 13 Mar 2015 14:15:17 +0000]
added a simple text output (to_string) for DestinationUnreachable ICMP data

10 years agoadded a count of good/bad packets to feed_packet_data tool
Christian Herdtweck [Fri, 13 Mar 2015 14:13:03 +0000]
added a count of good/bad packets to feed_packet_data tool

10 years agoadded rule to create feed_packet tool to CMakeLists.txt
Christian Herdtweck [Fri, 13 Mar 2015 13:32:15 +0000]
added rule to create feed_packet tool to CMakeLists.txt

10 years agocheck if file is really open after opening; changed return codes and log levels
Christian Herdtweck [Thu, 5 Mar 2015 10:15:38 +0000]
check if file is really open after opening; changed return codes and log levels

10 years agogot the tool feed_packet_data to compile and run and do reasonable stuff
Christian Herdtweck [Wed, 4 Mar 2015 16:29:07 +0000]
got the tool feed_packet_data to compile and run and do reasonable stuff

10 years agoadded a dump_option to IcmpPacketFactory creation function; better error message...
Christian Herdtweck [Wed, 4 Mar 2015 16:28:20 +0000]
added a dump_option to IcmpPacketFactory creation function; better error message if temp file creation fails

10 years agostarted creating a utility program in new folder tools that feeds packet data directl...
Christian Herdtweck [Fri, 27 Feb 2015 17:06:37 +0000]
started creating a utility program in new folder tools that feeds packet data directly into ICMP/TCP factories

10 years agomoved remaining implementations in ipv6header.h to cpp; avoid conversion warnings
Christian Herdtweck [Fri, 13 Mar 2015 10:49:26 +0000]
moved remaining implementations in ipv6header.h to cpp; avoid conversion warnings

10 years agogive credit to Christopher Kohlhoff (boost asio) and Guilherme Ferreira
Christian Herdtweck [Fri, 13 Mar 2015 09:09:36 +0000]
give credit to Christopher Kohlhoff (boost asio) and Guilherme Ferreira

10 years agoconsequently moved all implementation from h to cpp files
Christian Herdtweck [Fri, 13 Mar 2015 09:02:19 +0000]
consequently moved all implementation from h to cpp files

10 years agofixed bug in reading of checksum (which was found using the unittests -- great thing!)
Christian Herdtweck [Thu, 12 Mar 2015 17:02:30 +0000]
fixed bug in reading of checksum (which was found using the unittests -- great thing!)

10 years agoupdated icmp unittests
Christian Herdtweck [Thu, 12 Mar 2015 16:44:45 +0000]
updated icmp unittests

10 years agomoved some implementations from h to cpp files because of linker trouble
Christian Herdtweck [Thu, 12 Mar 2015 16:44:08 +0000]
moved some implementations from h to cpp files because of linker trouble

10 years agonow working again: creating echo requests and parsing replies
Christian Herdtweck [Thu, 12 Mar 2015 14:51:58 +0000]
now working again: creating echo requests and parsing replies

also:
* created a to_string method for easier output
* in constructors of IP headers set version right away
* compare that version to the one received in IcmpPacket::read

10 years agore-ordered class for IcmpPacket
Christian Herdtweck [Thu, 12 Mar 2015 10:04:43 +0000]
re-ordered class for IcmpPacket

old: IcmpPacket has and IpvXHeader, an IcmpvXHeader which varies according to ICMP message type and also contains part of Icmp message data, and an IcmpData which is a string;
new: IcmpPacket has an IpHeader, an IcmpHeader which represents only the common first 4 byte of ICMP v4/v6, and IcmpData which is either a IcmpEchoData for echo request/reply or a IcmpDestinationUnreachableData

tried to abstract away as much as possible (for a lay programmer like me) the difference between v4 and v6

This code now compiles, need to see whether it does anything usefull

Tests not compiled/run yet

10 years agoadded encode_string to MessagePayload; removed checksum and icmpchecksum since functi...
Christian Herdtweck [Thu, 12 Mar 2015 09:55:24 +0000]
added encode_string to MessagePayload; removed checksum and icmpchecksum since functionality moved into MessagePayload, IcmpHeader and IcmpData

10 years agocreated abstract base class IpHeader of Ipv4Header and Ipv6Header
Christian Herdtweck [Thu, 12 Mar 2015 09:53:22 +0000]
created abstract base class IpHeader of Ipv4Header and Ipv6Header

10 years agoadded debug option enforcing dump of ICMP packets even if not broken
Christian Herdtweck [Thu, 26 Feb 2015 15:48:08 +0000]
added debug option enforcing dump of ICMP packets even if not broken

10 years agofixed bug: dumping packets leaked char array (dump file name) on heap
Christian Herdtweck [Wed, 25 Feb 2015 15:00:21 +0000]
fixed bug: dumping packets leaked char array (dump file name) on heap

10 years agodumping now into a .pcap file with nicer filename, so can analyze with wireshark
Christian Herdtweck [Wed, 25 Feb 2015 14:34:16 +0000]
dumping now into a .pcap file with nicer filename, so can analyze with wireshark

10 years agodumping package data works
Christian Herdtweck [Wed, 25 Feb 2015 12:54:08 +0000]
dumping package data works

10 years agostarted copying icmp data before parsing it and dumping it into temp files if parsing...
Christian Herdtweck [Fri, 20 Feb 2015 17:36:50 +0000]
started copying icmp data before parsing it and dumping it into temp files if parsing fails

does compile but causes problems in data parsing

10 years agomake check for end of loop in icmppacketdistributor more understandable (|= --> =)
Christian Herdtweck [Thu, 19 Feb 2015 08:32:44 +0000]
make check for end of loop in icmppacketdistributor more understandable (|= --> =)

10 years agoCheck weak_ptr before using it
Thomas Jarosch [Wed, 11 Feb 2015 16:55:28 +0000]
Check weak_ptr before using it

10 years agoNo need for intermediate weak_ptr
Thomas Jarosch [Wed, 11 Feb 2015 16:48:16 +0000]
No need for intermediate weak_ptr

10 years agoUse const reference for smart_ptr in BOOST_FOREACH
Thomas Jarosch [Wed, 11 Feb 2015 16:47:08 +0000]
Use const reference for smart_ptr in BOOST_FOREACH

10 years agoMove graph documentation to doc/
Thomas Jarosch [Wed, 11 Feb 2015 16:23:45 +0000]
Move graph documentation to doc/

10 years agofix bug that caused crash for broken packets; change order of vars to avoid compiler...
Christian Herdtweck [Wed, 11 Feb 2015 15:59:22 +0000]
fix bug that caused crash for broken packets; change order of vars to avoid compiler warnings; minor change in debug output

10 years agoupdated TODO
Christian Herdtweck [Wed, 11 Feb 2015 14:13:08 +0000]
updated TODO

10 years agoremoved another debugging test and corrected one debuggin output
Christian Herdtweck [Wed, 11 Feb 2015 13:58:37 +0000]
removed another debugging test and corrected one debuggin output

10 years agocreated a graph to show how IcmpPinger, IcmpPacketDistributor and other important...
Christian Herdtweck [Thu, 5 Feb 2015 16:28:21 +0000]
created a graph to show how IcmpPinger, IcmpPacketDistributor and other important classes interact

created using yEd 3.12.2

10 years agogive up trying to define IcmpPacketDistributor in own files, just use icmppinger...
Christian Herdtweck [Thu, 5 Feb 2015 16:17:54 +0000]
give up trying to define IcmpPacketDistributor in own files, just use icmppinger.h / .cpp for it

The two classes depend on each other, so none compiles without the other
  if they are defined in separate files. In the same file, the compiler
  manages.

10 years agogot packetdistributor to work, but compiles/links only with packetdistributor inside...
Christian Herdtweck [Thu, 5 Feb 2015 15:22:14 +0000]
got packetdistributor to work, but compiles/links only with packetdistributor inside icmppinger.h/cpp

10 years agolimit line length of new files to 80 characters
Christian Herdtweck [Wed, 4 Feb 2015 11:02:11 +0000]
limit line length of new files to 80 characters

10 years agouse new file name (icmppaKetdistributor --> icmppacCKetdistributor) in includes and...
Christian Herdtweck [Wed, 4 Feb 2015 11:01:43 +0000]
use new file name (icmppaKetdistributor --> icmppacCKetdistributor) in includes and macros

10 years agoalso rename file in CMakeLists.txt
Christian Herdtweck [Mon, 26 Jan 2015 16:37:38 +0000]
also rename file in CMakeLists.txt

10 years agorename IcmpPaketDistributor files to IcmpPacketDistributor (k --> ck)
Christian Herdtweck [Mon, 26 Jan 2015 16:34:11 +0000]
rename IcmpPaketDistributor files to IcmpPacketDistributor (k --> ck)

10 years agostart removing socket use from IcmpPinger to only have IcmpPacketDistributor deal...
Christian Herdtweck [Mon, 26 Jan 2015 16:32:01 +0000]
start removing socket use from IcmpPinger to only have IcmpPacketDistributor deal with raw data

10 years agoclean up IcmpPaketDistributors after stopping pingers
Christian Herdtweck [Mon, 26 Jan 2015 14:20:26 +0000]
clean up IcmpPaketDistributors after stopping pingers

10 years agoPinger holds weak_ptr to self, Pingers created through static create functions; IcmpP...
Christian Herdtweck [Mon, 26 Jan 2015 14:17:32 +0000]
Pinger holds weak_ptr to self, Pingers created through static create functions; IcmpPinger::create registers with IcmpPaketDistributor

10 years agostarted to implement an icmp paket distributor; compiles and works at first, but...
Christian Herdtweck [Fri, 23 Jan 2015 17:07:37 +0000]
started to implement an icmp paket distributor; compiles and works at first, but gives segmentation fault at exit

10 years agoadded a test for pingcheck version to avoid trouble with IP parsing in 'older' pingch...
Christian Herdtweck [Thu, 22 Jan 2015 17:17:13 +0000]
added a test for pingcheck version to avoid trouble with IP parsing in 'older' pingcheckers

10 years agoanother amendment to signal handler: make signaled_flags_XY volatile sig_atomic_t...
Christian Herdtweck [Thu, 22 Jan 2015 16:43:36 +0000]
another amendment to signal handler: make signaled_flags_XY volatile sig_atomic_t (I was ignorant)

10 years agoadded saving of history and results and function to load and print stats about them
Christian Herdtweck [Thu, 22 Jan 2015 16:21:24 +0000]
added saving of history and results and function to load and print stats about them

10 years agoadded a little failsave test into tester; simplified logging of exceptions; recognize...
Christian Herdtweck [Thu, 22 Jan 2015 16:20:39 +0000]
added a little failsave test into tester; simplified logging of exceptions; recognize unexpected online states and warn; removed pre-logging Tester._print

10 years agohad forgotten to reset default pingcheck binary from testing to production
Christian Herdtweck [Thu, 22 Jan 2015 16:15:00 +0000]
had forgotten to reset default pingcheck binary from testing to production

10 years agoamendment to last commit: only makes sense if use different flags per signal type
Christian Herdtweck [Thu, 22 Jan 2015 14:27:57 +0000]
amendment to last commit: only makes sense if use different flags per signal type

10 years agoremoved logging from signal handler; create one handler per signal type
Christian Herdtweck [Thu, 22 Jan 2015 14:09:46 +0000]
removed logging from signal handler; create one handler per signal type

10 years agochanged return type of get_configuration in main: return configuration and bool flag
Christian Herdtweck [Thu, 22 Jan 2015 14:03:19 +0000]
changed return type of get_configuration in main: return configuration and bool flag

this way, always get a valid configuration object with default values and some values set
  even if parsing other options failed. Important for --version where usually fail to read
  config file but do not need it anyway

10 years agochanged treatment of --version arg; remember to print it in Configuration like -...
Christian Herdtweck [Thu, 22 Jan 2015 14:00:12 +0000]
changed treatment of --version arg; remember to print it in Configuration like --daemon option

10 years agocorrected type of TTL: is now uint32_t everywhere (except for uint8_t in Payload...
Christian Herdtweck [Thu, 22 Jan 2015 13:58:43 +0000]
corrected type of TTL: is now uint32_t everywhere (except for uint8_t in Payload data)

10 years agoremoved Readme.code because was neither up to date nor informative; updated TODO
Christian Herdtweck [Thu, 22 Jan 2015 09:12:47 +0000]
removed Readme.code because was neither up to date nor informative; updated TODO

10 years agoraised version number from 0.1 to 0.2
Christian Herdtweck [Thu, 22 Jan 2015 08:33:26 +0000]
raised version number from 0.1 to 0.2

10 years agoremember pings based on host, not IP; correct logging logic in main loop
Christian Herdtweck [Wed, 21 Jan 2015 17:04:06 +0000]
remember pings based on host, not IP; correct logging logic in main loop

for host-ip binding, needed to slightly change output from dnsresolver

10 years agotreat output as "left-over" only after terminatin process; limit number of lines
Christian Herdtweck [Wed, 21 Jan 2015 12:52:36 +0000]
treat output as "left-over" only after terminatin process; limit number of lines

10 years agoremoved assert that does not make sense and is often violated
Christian Herdtweck [Wed, 21 Jan 2015 12:51:16 +0000]
removed assert that does not make sense and is often violated

(IPs are not updated very often, so can easily happen that an IP's TTL was reached.
 It is easier to ignore these cases than to avoid them, IPs will with next test be updated.)

10 years agohad forgotten to disable testing setting in pingcheck main: limited the max number...
Christian Herdtweck [Wed, 21 Jan 2015 10:56:05 +0000]
had forgotten to disable testing setting in pingcheck main: limited the max number of exceptions ignore

10 years agodone with long_term_test.py
Christian Herdtweck [Wed, 21 Jan 2015 10:43:35 +0000]
done with long_term_test.py

* set timeout for ping reply -- very important variable!
* try to get more output when pingcheck process is stopped/dying
* added and commented out sigchld / child signal handler
* different logic how state changes are set
* use ConndState
* lots of other changes...

10 years agoimproved tell-connd state representation
Christian Herdtweck [Wed, 21 Jan 2015 10:37:48 +0000]
improved tell-connd state representation

* use constants for online states and subsystems
* add function to output complete state
* deal with exceptions from running binary

10 years agoRaised importance of log output in signal handler: info for most, notice for term...
Christian Herdtweck [Wed, 21 Jan 2015 10:33:29 +0000]
Raised importance of log output in signal handler: info for most, notice for term/kill

10 years agouse logging for all output, improve understanding of connd, improved process terminat...
Christian Herdtweck [Fri, 16 Jan 2015 17:01:13 +0000]
use logging for all output, improve understanding of connd, improved process termination, simplify code

10 years agosome minor doc change I had overlooked
Christian Herdtweck [Fri, 16 Jan 2015 08:58:09 +0000]
some minor doc change I had overlooked

10 years agoadded a test python script that goes online/offline and checks if pingers pinged...
Christian Herdtweck [Thu, 15 Jan 2015 17:37:20 +0000]
added a test python script that goes online/offline and checks if pingers pinged enough

10 years agorenamed IcmpPinger::handle_ping_done to handle_timeout; handle error_codes from timer...
Christian Herdtweck [Mon, 12 Jan 2015 15:54:44 +0000]
renamed IcmpPinger::handle_ping_done to handle_timeout; handle error_codes from timer async_wait

10 years agosome whitespace change I had forgotten
Christian Herdtweck [Mon, 12 Jan 2015 14:45:16 +0000]
some whitespace change I had forgotten

10 years agoadded case for unexpected signals in signal handler
Christian Herdtweck [Mon, 12 Jan 2015 14:44:52 +0000]
added case for unexpected signals in signal handler

10 years agomake error return codes from main unique again
Christian Herdtweck [Mon, 12 Jan 2015 14:44:15 +0000]
make error return codes from main unique again

10 years agointroduce a max number of exceptions ignored in io_service main loop
Christian Herdtweck [Mon, 12 Jan 2015 14:43:38 +0000]
introduce a max number of exceptions ignored in io_service main loop

mainly for testing and debugging

10 years agoproperly initialize variables remembering original signal handlers; re-set only if...
Christian Herdtweck [Mon, 12 Jan 2015 14:42:33 +0000]
properly initialize variables remembering original signal handlers; re-set only if were set

10 years agocontinue waiting for data if receive handler received an error code
Christian Herdtweck [Mon, 12 Jan 2015 14:41:04 +0000]
continue waiting for data if receive handler received an error code

2 reasons:
* in other error cases do the same
* there is a timer running in the background which will send the next ping after some time

10 years agodo not wait for IcmpEchoReply if sending of IcmpEchoRequest has failed completely
Christian Herdtweck [Mon, 12 Jan 2015 14:37:13 +0000]
do not wait for IcmpEchoReply if sending of IcmpEchoRequest has failed completely

10 years agoupdate docu messages for io_service
Christian Herdtweck [Mon, 12 Jan 2015 14:35:48 +0000]
update docu messages for io_service

10 years agoClean up output, whitespace,
Christian Herdtweck [Mon, 12 Jan 2015 14:33:48 +0000]
Clean up output, whitespace,

* there were several cases of GlobalLogger.error() << "Error: ..." which is redundant
* there was one instance of streaming to cerr instead of GlobalLogger.error
* remove trailing whitespace

10 years agominor change in logging: avoid duplicated "Error: "
Christian Herdtweck [Tue, 30 Dec 2014 17:14:41 +0000]
minor change in logging: avoid duplicated "Error: "

10 years agonew signal handling in main; removed all thread-related vars, use same IoServiceItem...
Christian Herdtweck [Tue, 30 Dec 2014 17:14:06 +0000]
new signal handling in main; removed all thread-related vars, use same IoServiceItem instead

10 years agotemp commit before leaving, started to change signal handling and use singel io_service
Christian Herdtweck [Tue, 23 Dec 2014 17:42:23 +0000]
temp commit before leaving, started to change signal handling and use singel io_service

10 years agohotfix for problem with 0-packages
Christian Herdtweck [Tue, 23 Dec 2014 13:29:42 +0000]
hotfix for problem with 0-packages

* added flag ReceiveHandlerInPlace to icmppinger
* to be sure, also check if reply was received already in handle_receive_icmp_packet
* in handle_receive_icmp_packet also check error code
* in icmp package read, print strings for failure codes
* prepend IP to pinger log output so can trace which thread did what

10 years agochanged logic of icmp package read/write and operator>> / operator<<
Christian Herdtweck [Mon, 15 Dec 2014 14:30:51 +0000]
changed logic of icmp package read/write and operator>> / operator<<

* read and write are implemented on their own, >> and << call them
  (not the other way round as before)
* read returns not only a bool but a more informative flag
* moved operator>> and << from Icmpv4/6packet to base class IcmpPacket
  since they are identical

10 years agofixed parsing of icmp data: only parses right amount of data
Christian Herdtweck [Wed, 10 Dec 2014 14:58:52 +0000]
fixed parsing of icmp data: only parses right amount of data

10 years agofixed possible reason for broken icmp packages: restricted read of icmp payload data...
Christian Herdtweck [Tue, 9 Dec 2014 17:52:00 +0000]
fixed possible reason for broken icmp packages: restricted read of icmp payload data; also moved def of buffer size from h to cpp

10 years agofixed possible reason for broken icmp packages: restricted read of icmp payload data...
Christian Herdtweck [Tue, 9 Dec 2014 17:50:58 +0000]
fixed possible reason for broken icmp packages: restricted read of icmp payload data; also moved def of buffer size from h to cpp

10 years agoreplace magic number 64k with constant SOCKET_BUFFER_SIZE
Christian Herdtweck [Tue, 9 Dec 2014 15:02:36 +0000]
replace magic number 64k with constant SOCKET_BUFFER_SIZE

10 years agoimproved logging output (once again)
Christian Herdtweck [Tue, 9 Dec 2014 15:01:09 +0000]
improved logging output (once again)

10 years agoadded a handler for failed BOOST_ASSERT-ions; add global try-catch in main to catch...
Christian Herdtweck [Tue, 9 Dec 2014 14:59:36 +0000]
added a handler for failed BOOST_ASSERT-ions; add global try-catch in main to catch exceptions

10 years agoadded missing std::, commit before last does not compile without it ... sorry!
Christian Herdtweck [Tue, 9 Dec 2014 08:20:46 +0000]
added missing std::, commit before last does not compile without it ...  sorry!

10 years agodebug-log-message when there is unused data in buffer, which is probably reason for...
Christian Herdtweck [Mon, 8 Dec 2014 09:45:00 +0000]
debug-log-message when there is unused data in buffer, which is probably reason for frequent broken packages

10 years agoadded global try-catch to main
Christian Herdtweck [Mon, 8 Dec 2014 09:44:31 +0000]
added global try-catch to main

10 years agomade text log output slightly more informative and correct
Christian Herdtweck [Mon, 17 Nov 2014 08:36:03 +0000]
made text log output slightly more informative and correct

10 years agoadded target "dist" to CMakeLists.txt, which uses "git archive" to build source tarball
Christian Herdtweck [Wed, 12 Nov 2014 14:36:20 +0000]
added target "dist" to CMakeLists.txt, which uses "git archive" to build source tarball

10 years agomore rigorous command line option checking; ensure parser errors are printed to stderr
Christian Herdtweck [Wed, 12 Nov 2014 13:27:17 +0000]
more rigorous command line option checking; ensure parser errors are printed to stderr

10 years agowarn in case of unrecognized command line options; added more info output concerning...
Christian Herdtweck [Wed, 12 Nov 2014 10:08:26 +0000]
warn in case of unrecognized command line options; added more info output concerning log output and level

10 years agohad forgotten to remove a (rather stupid) debug test line
Christian Herdtweck [Fri, 7 Nov 2014 16:38:29 +0000]
had forgotten to remove a (rather stupid) debug test line

10 years agoconverted 3 constants into configuration variables, removing corresponding TODOs...
Christian Herdtweck [Fri, 7 Nov 2014 15:52:49 +0000]
converted 3 constants into configuration variables, removing corresponding TODOs; minor change in variable orders to make compiler happier

10 years agomake abstract base classes boost::noncopyable to avoid warnings concerning copy-assig...
Christian Herdtweck [Thu, 6 Nov 2014 16:05:59 +0000]
make abstract base classes boost::noncopyable to avoid warnings concerning copy-assignment and -constructors

10 years agouse new function name of new log level string function from libi2ncommon; had overloo...
Christian Herdtweck [Thu, 6 Nov 2014 13:21:55 +0000]
use new function name of new log level string function from libi2ncommon; had overlooked one debugging output