diff options
Diffstat (limited to 'plugins/check_radius.d/config.h')
| -rw-r--r-- | plugins/check_radius.d/config.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/plugins/check_radius.d/config.h b/plugins/check_radius.d/config.h new file mode 100644 index 00000000..656bf98e --- /dev/null +++ b/plugins/check_radius.d/config.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../config.h" | ||
| 4 | #include "output.h" | ||
| 5 | #include <stddef.h> | ||
| 6 | #if defined(HAVE_LIBRADCLI) | ||
| 7 | # include <radcli/radcli.h> | ||
| 8 | #elif defined(HAVE_LIBFREERADIUS_CLIENT) | ||
| 9 | # include <freeradius-client.h> | ||
| 10 | #elif defined(HAVE_LIBRADIUSCLIENT_NG) | ||
| 11 | # include <radiusclient-ng.h> | ||
| 12 | #else | ||
| 13 | # include <radiusclient.h> | ||
| 14 | #endif | ||
| 15 | |||
| 16 | typedef struct { | ||
| 17 | char *server; | ||
| 18 | char *username; | ||
| 19 | char *password; | ||
| 20 | char *config_file; | ||
| 21 | char *nas_id; | ||
| 22 | char *nas_ip_address; | ||
| 23 | int retries; | ||
| 24 | unsigned short port; | ||
| 25 | |||
| 26 | char *expect; | ||
| 27 | |||
| 28 | bool output_format_is_set; | ||
| 29 | mp_output_format output_format; | ||
| 30 | } check_radius_config; | ||
| 31 | |||
| 32 | check_radius_config check_radius_config_init() { | ||
| 33 | check_radius_config tmp = { | ||
| 34 | .server = NULL, | ||
| 35 | .username = NULL, | ||
| 36 | .password = NULL, | ||
| 37 | .config_file = NULL, | ||
| 38 | .nas_id = NULL, | ||
| 39 | .nas_ip_address = NULL, | ||
| 40 | .retries = 1, | ||
| 41 | .port = PW_AUTH_UDP_PORT, | ||
| 42 | |||
| 43 | .expect = NULL, | ||
| 44 | |||
| 45 | .output_format_is_set = false, | ||
| 46 | }; | ||
| 47 | return tmp; | ||
| 48 | } | ||
