Annotation of embedaddon/mpd/src/radsrv.h, revision 1.1.1.2.2.1
1.1 misho 1:
2: /*
3: * radsrv.h
4: *
5: * Written by Alexander Motin <mav@FreeBSD.org>
6: */
7:
8: #ifndef _RADSRV_H_
9: #define _RADSRV_H_
10:
11: #include "defs.h"
1.1.1.2.2.1! misho 12:
! 13: #ifdef USE_RADIUS
1.1 misho 14: #include <radlib.h>
15:
16: /*
17: * DEFINITIONS
18: */
19:
1.1.1.2 misho 20: #define RADSRV_MAX_SERVERS 10
1.1 misho 21:
1.1.1.2 misho 22: /* Configuration options */
23: enum {
24: RADSRV_DISCONNECT, /* enable Disconnect-Request */
25: RADSRV_COA /* enable CoA-Request */
26: };
27:
28: /* Configuration for a radius server */
29: struct radiusclient_conf {
30: char *hostname;
31: char *sharedsecret;
32: struct radiusclient_conf *next;
33: };
34:
35: struct radsrv {
36: struct optinfo options;
37: struct u_addr addr;
38: in_port_t port;
39: int fd;
40: struct rad_handle *handle;
41: struct radiusclient_conf *clients;
42: EventRef event; /* connect-event */
43: };
1.1 misho 44:
1.1.1.2 misho 45: typedef struct radsrv *Radsrv;
1.1 misho 46:
47: /*
48: * VARIABLES
49: */
50:
1.1.1.2 misho 51: extern const struct cmdtab RadsrvSetCmds[];
1.1 misho 52:
53: /*
54: * FUNCTIONS
55: */
56:
1.1.1.2 misho 57: extern int RadsrvInit(Radsrv c);
58: extern int RadsrvOpen(Radsrv c);
59: extern int RadsrvClose(Radsrv c);
60: extern int RadsrvStat(Context ctx, int ac, const char *const av[], const void *arg);
1.1 misho 61:
1.1.1.2.2.1! misho 62: #endif /* USE_RADIUS */
1.1 misho 63: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>