Code improvements
[pingcheck] / Readme
CommitLineData
c08bc448
GMF
11. Introduction
2=======================================
3This application provides means to check the availability of remote hosts
4through pings to them.
5
6
71.1. Rationale
8---------------------------------------
9The application uses ICMP echo requests messages to verify if a given host
10is available or not.
11
12The host's address can be an IP or a DNS.
13
14
151.2. How to use
16---------------------------------------
17There are many ways to invoke the application, the simplest is just type:
18 ./libpingcheck
19which uses the configuration values from the configuration file (describled in
20section 4.Configuration file).
21
703f4d65 22
c08bc448
GMF
231.3. Resources
24---------------------------------------
25Further information about the problem domain can be found in the following
26resources:
27- http://tools.ietf.org/html/rfc792
28- http://en.wikipedia.org/wiki/Ping
29- http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol
30
31
32
332. Code Conventions
703f4d65
GMF
34=======================================
35This section describes the code conventions that must be followed when maintain
36this code.
37
38
c08bc448
GMF
392.1. Data Types
40---------------------------------------
41This section is a guideline about the type you MUST use when declaring
42variables and constants. These types were chose to provide portability and
43improve code reradability.
44
45- Use the std::string to represent array of characters.
46
47- Use int32_t, int16_t and int8_t (or their unsigned couter parts) - instead of
48 int, short and char, respectively - when the variable or constant MUST have a
49 specific size (e.g. like in the protocol headers). This documents that the
50 variable has the given number of bits. This states clear the intent of the
51 original programmer and avoids improper modifications.
52
53- Use int or uint for regular integer numbers that do not require any specific
54 size.
55
56- Use std::size_t for integers that represent sizes of vectors, objects or
57 buffers. Thus leaving the size difinition to the platform.
58
59
602.2. Coding Style
703f4d65 61---------------------------------------
c08bc448
GMF
62The coding style used in this program is in accordance with the Intra2net,
63which can be found in the following source:
64
65- http://intranet/support_wiki/doku.php?id=entwicklung:codingstyle
66
67
682.3. Versioning
69---------------------------------------
70Version is built as follows:
71 major.minor[-[a|b|rc]]
72where:
73- major represents big changes in application functionality.
74- minor means small changes of bug fixes.
75- a, b and rc stand for Alpha, Beta and Release Candidate respectivelly. Though
76 they are optional and not required in public release.
77
78
703f4d65 79
c08bc448
GMF
803. Source Code
81=======================================
82In this section is presented an overview of the source code and key design
83decisions.
84
85
863.1. Main directories
87---------------------------------------
88The sources are spread over these distincts directories:
89- src: contains the main application.
90- test: where is located the unit tests.
91- conf: keeps default and example configuration files.
92
93
94
954. Configuration file
96=======================================
703f4d65 97
703f4d65 98