summaryrefslogtreecommitdiffstats
path: root/plugins/check_radius.d/config.h
blob: b27d31e7f64dfbd877f4ec726c551257a6208745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once

#include "../../config.h"
#include <stddef.h>
#if defined(HAVE_LIBRADCLI)
#	include <radcli/radcli.h>
#elif defined(HAVE_LIBFREERADIUS_CLIENT)
#	include <freeradius-client.h>
#elif defined(HAVE_LIBRADIUSCLIENT_NG)
#	include <radiusclient-ng.h>
#else
#	include <radiusclient.h>
#endif

typedef struct {
	char *server;
	char *username;
	char *password;
	char *config_file;
	char *nas_id;
	char *nas_ip_address;
	int retries;
	unsigned short port;

	char *expect;
} check_radius_config;

check_radius_config check_radius_config_init() {
	check_radius_config tmp = {
		.server = NULL,
		.username = NULL,
		.password = NULL,
		.config_file = NULL,
		.nas_id = NULL,
		.nas_ip_address = NULL,
		.retries = 1,
		.port = PW_AUTH_UDP_PORT,

		.expect = NULL,
	};
	return tmp;
}