From c08bc448e064469a549d123ac11c1fcaa40873eb Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Fri, 4 Mar 2011 17:22:51 +0100 Subject: [PATCH] More information in the Readme file --- Readme | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 88 insertions(+), 9 deletions(-) diff --git a/Readme b/Readme index cfedf2f..72000fb 100644 --- a/Readme +++ b/Readme @@ -1,19 +1,98 @@ +1. Introduction +======================================= +This application provides means to check the availability of remote hosts +through pings to them. + + +1.1. Rationale +--------------------------------------- +The application uses ICMP echo requests messages to verify if a given host +is available or not. + +The host's address can be an IP or a DNS. + + +1.2. How to use +--------------------------------------- +There are many ways to invoke the application, the simplest is just type: + ./libpingcheck +which uses the configuration values from the configuration file (describled in +section 4.Configuration file). + -Code Conventions +1.3. Resources +--------------------------------------- +Further information about the problem domain can be found in the following +resources: +- http://tools.ietf.org/html/rfc792 +- http://en.wikipedia.org/wiki/Ping +- http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol + + + +2. Code Conventions ======================================= This section describes the code conventions that must be followed when maintain this code. -Data Types +2.1. Data Types +--------------------------------------- +This section is a guideline about the type you MUST use when declaring +variables and constants. These types were chose to provide portability and +improve code reradability. + +- Use the std::string to represent array of characters. + +- Use int32_t, int16_t and int8_t (or their unsigned couter parts) - instead of + int, short and char, respectively - when the variable or constant MUST have a + specific size (e.g. like in the protocol headers). This documents that the + variable has the given number of bits. This states clear the intent of the + original programmer and avoids improper modifications. + +- Use int or uint for regular integer numbers that do not require any specific + size. + +- Use std::size_t for integers that represent sizes of vectors, objects or + buffers. Thus leaving the size difinition to the platform. + + +2.2. Coding Style --------------------------------------- +The coding style used in this program is in accordance with the Intra2net, +which can be found in the following source: + +- http://intranet/support_wiki/doku.php?id=entwicklung:codingstyle + + +2.3. Versioning +--------------------------------------- +Version is built as follows: + major.minor[-[a|b|rc]] +where: +- major represents big changes in application functionality. +- minor means small changes of bug fixes. +- a, b and rc stand for Alpha, Beta and Release Candidate respectivelly. Though + they are optional and not required in public release. + + -Use std::string to represent array of characters. +3. Source Code +======================================= +In this section is presented an overview of the source code and key design +decisions. + + +3.1. Main directories +--------------------------------------- +The sources are spread over these distincts directories: +- src: contains the main application. +- test: where is located the unit tests. +- conf: keeps default and example configuration files. + + + +4. Configuration file +======================================= -Use int32_t, int16_t and int8_t (and their unsigned couter parts) instead of -int, short and char, respectively, when the variable or constant MUST have a -specific size (e.g. like in the protocol headers). This documents that the -variable have the given number of bits. -Use std::size_t for regular integer numbers that do not require any specific -size. Thus leaving the size difinition to the platform. \ No newline at end of file -- 1.7.1