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