0.4.00.4.10.4.2stable
|
Last change
on this file since 1eef1ee was
1eef1ee,
checked in by Michael Medin <michael@…>, 8 years ago
|
|
*OBS* This might no longer work! (expect updated code in the next few days if things are broken)
- Fundamental API changes (due to NRPE compatibility)
- HandleCommand? has changed
- Inject has changed
- Most API calls have new "return codes" (typedef:ed INT to allow for return code compiler checks)
- A lot of the old return codes have changed
- Preliminary NRPE support (can parse and execute incoming requests, cant return data yet, and no encryption)
- New SimpleSocket? in include/ will be used as base class for Listeners
- A lot of rewrite to the NSC API
|
-
Property mode set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | #pragma once |
|---|
| 2 | |
|---|
| 3 | namespace NSCAPI { |
|---|
| 4 | |
|---|
| 5 | typedef enum { |
|---|
| 6 | returnCRIT = 2, |
|---|
| 7 | returnOK = 0, |
|---|
| 8 | returnWARN = 1, |
|---|
| 9 | returnUNKNOWN = 4, |
|---|
| 10 | returnInvalidBufferLen = -2, |
|---|
| 11 | returnIgnored = -1 |
|---|
| 12 | } nagiosReturn; |
|---|
| 13 | |
|---|
| 14 | typedef enum { |
|---|
| 15 | istrue = 1, |
|---|
| 16 | isfalse = 0 |
|---|
| 17 | } boolReturn; |
|---|
| 18 | |
|---|
| 19 | typedef enum { |
|---|
| 20 | isSuccess = 1, |
|---|
| 21 | hasFailed = 0, |
|---|
| 22 | isInvalidBufferLen = -2 |
|---|
| 23 | } errorReturn; |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | // Various Nagios codes |
|---|
| 28 | /* |
|---|
| 29 | const int returnCRIT = 2; |
|---|
| 30 | const int returnOK = 0; |
|---|
| 31 | const int returnWARN = 1; |
|---|
| 32 | const int returnUNKNOWN = 4; |
|---|
| 33 | */ |
|---|
| 34 | // Various NSCP extensions |
|---|
| 35 | |
|---|
| 36 | // const int returnInvalidBufferLen = -2; // The return buffer was to small (might wanna call again with a larger one) |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | // typedef int returnCodes; |
|---|
| 40 | |
|---|
| 41 | // Various function Return codes |
|---|
| 42 | // const int isSuccess = 1; // Everything went fine |
|---|
| 43 | // const int hasFailed = 0; // EVerything went to hell :) |
|---|
| 44 | // const int isTrue = 1; // Should be interpreted as "true" |
|---|
| 45 | // const int isFalse = 0; // Should be interpreted as "false" |
|---|
| 46 | // const int isError = -1; // Should be interpreted as "ERROR" |
|---|
| 47 | // const int handled = 2; // The command was handled by this module |
|---|
| 48 | |
|---|
| 49 | // Various message Types |
|---|
| 50 | const int log = 0; // Log message |
|---|
| 51 | const int error = -1; // Error (non critical) |
|---|
| 52 | const int critical = -10; // Critical error |
|---|
| 53 | const int warning = 1; // Warning |
|---|
| 54 | const int debug = 666; // Debug message |
|---|
| 55 | |
|---|
| 56 | typedef int messageTypes; // Message type |
|---|
| 57 | }; |
|---|
Note: See
TracBrowser
for help on using the repository browser.