37 |
#include <stdlib.h> |
#include <stdlib.h> |
38 |
|
|
39 |
#include "ssl.h" |
#include "ssl.h" |
40 |
|
#include "socket.h" |
41 |
|
|
42 |
#define VERSION PACKAGE_VERSION |
#define VERSION PACKAGE_VERSION |
43 |
#define MONITRC "monitrc" |
#define MONITRC "monitrc" |
247 |
char *pathname; /**< Pathname, in case of an UNIX socket */ |
char *pathname; /**< Pathname, in case of an UNIX socket */ |
248 |
char *address; /**< Human readable destination of the socket */ |
char *address; /**< Human readable destination of the socket */ |
249 |
|
|
250 |
ssl_connection * ssl; |
struct { |
251 |
char *certmd5; |
int use_ssl; /**< TRUE if this port requires SSL for connection */ |
252 |
|
int version; /**< The SSL version to use for connection */ |
253 |
|
char *certmd5; /**< The expected md5 sum of the server's certificate */ |
254 |
|
} SSL; |
255 |
/**< Object used for testing a port's service */ |
/**< Object used for testing a port's service */ |
256 |
struct myprotocol { |
struct myprotocol { |
257 |
const char *name; /**< Protocol name */ |
const char *name; /**< Protocol name */ |
258 |
int(*check)(struct myport *); /**< Service verification function */ |
int(*check)(Socket_T); /**< Service verification function */ |
259 |
} *protocol; |
} *protocol; |
260 |
|
|
261 |
/** For internal use */ |
/** For internal use */ |
290 |
char *from; /**< The mail from address */ |
char *from; /**< The mail from address */ |
291 |
char *subject; /**< The mail subject */ |
char *subject; /**< The mail subject */ |
292 |
char *message; /**< The mail message */ |
char *message; /**< The mail message */ |
293 |
const char *opt_message; /**< An optional message used in alerts */ |
char *opt_message; /**< An optional message used in alerts */ |
294 |
unsigned int events; /*< Events for which this mail object should be sent */ |
unsigned int events; /*< Events for which this mail object should be sent */ |
295 |
|
|
296 |
/** For internal use */ |
/** For internal use */ |
457 |
char *ltrim(char *); |
char *ltrim(char *); |
458 |
char *rtrim(char *); |
char *rtrim(char *); |
459 |
char *trim_quotes(char *); |
char *trim_quotes(char *); |
460 |
|
char *replace_string(char **, const char *, const char *); |
461 |
|
int count_words(char *, const char *); |
462 |
int starts_with(char *,char *); |
int starts_with(char *,char *); |
463 |
void handle_string_escapes(char *); |
void handle_string_escapes(char *); |
464 |
void chomp(char *); |
void chomp(char *); |