summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.d/check_curl_helpers.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-09-12 16:37:24 +0200
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-09-12 16:37:24 +0200
commit44b2a25a6b9fb0791ec7150100a4d51e5f129611 (patch)
tree4fb13f9effac32bf156cc6eaefe22f6deea6d7ea /plugins/check_curl.d/check_curl_helpers.h
parentaaff3aa9da27ff7666d2a776d524c784b76eb3d7 (diff)
downloadmonitoring-plugins-44b2a25a6b9fb0791ec7150100a4d51e5f129611.tar.gz
check_curl: implement new output mechanism
Diffstat (limited to 'plugins/check_curl.d/check_curl_helpers.h')
-rw-r--r--plugins/check_curl.d/check_curl_helpers.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/plugins/check_curl.d/check_curl_helpers.h b/plugins/check_curl.d/check_curl_helpers.h
index 0f43ab90..87e45a9d 100644
--- a/plugins/check_curl.d/check_curl_helpers.h
+++ b/plugins/check_curl.d/check_curl_helpers.h
@@ -1,7 +1,11 @@
1#include "./config.h" 1#include "./config.h"
2#include <curl/curl.h> 2#include <curl/curl.h>
3#include "../picohttpparser/picohttpparser.h" 3#include "../picohttpparser/picohttpparser.h"
4// #include "curl/easy.h" 4#include "output.h"
5
6#if defined(HAVE_SSL) && defined(USE_OPENSSL)
7# include <openssl/opensslv.h>
8#endif
5 9
6/* for buffers for header and body */ 10/* for buffers for header and body */
7typedef struct { 11typedef struct {
@@ -99,8 +103,8 @@ int curlhelp_parse_statusline(const char * /*buf*/, curlhelp_statusline * /*stat
99void curlhelp_free_statusline(curlhelp_statusline * /*status_line*/); 103void curlhelp_free_statusline(curlhelp_statusline * /*status_line*/);
100 104
101char *get_header_value(const struct phr_header *headers, size_t nof_headers, const char *header); 105char *get_header_value(const struct phr_header *headers, size_t nof_headers, const char *header);
102mp_state_enum check_document_dates(const curlhelp_write_curlbuf * /*header_buf*/, 106mp_subcheck check_document_dates(const curlhelp_write_curlbuf * /*header_buf*/,
103 const char msg[static DEFAULT_BUFFER_SIZE], int /*maximum_age*/); 107 int /*maximum_age*/);
104size_t get_content_length(const curlhelp_write_curlbuf *header_buf, 108size_t get_content_length(const curlhelp_write_curlbuf *header_buf,
105 const curlhelp_write_curlbuf *body_buf); 109 const curlhelp_write_curlbuf *body_buf);
106int lookup_host(const char *host, char *buf, size_t buflen, sa_family_t addr_family); 110int lookup_host(const char *host, char *buf, size_t buflen, sa_family_t addr_family);
@@ -114,12 +118,7 @@ void cleanup(check_curl_global_state global_state);
114bool expected_statuscode(const char *reply, const char *statuscodes); 118bool expected_statuscode(const char *reply, const char *statuscodes);
115char *string_statuscode(int major, int minor); 119char *string_statuscode(int major, int minor);
116 120
117char *perfd_time(double elapsed_time, thresholds * /*thlds*/, long /*socket_timeout*/);
118char *perfd_time_connect(double elapsed_time_connect, long /*socket_timeout*/);
119char *perfd_time_ssl(double elapsed_time_ssl, long /*socket_timeout*/);
120char *perfd_time_firstbyte(double elapsed_time_firstbyte, long /*socket_timeout*/);
121char *perfd_time_headers(double elapsed_time_headers, long /*socket_timeout*/);
122char *perfd_time_transfer(double elapsed_time_transfer, long /*socket_timeout*/);
123char *perfd_size(size_t page_len, int /*min_page_len*/);
124
125void test_file(char *path); 121void test_file(char *path);
122mp_subcheck check_curl_certificate_checks(CURL *curl, X509 *cert, int warn_days_till_exp,
123 int crit_days_till_exp);
124char *fmt_url(check_curl_working_state workingState);