| version 1.1.1.1, 2013/07/22 08:44:29 | version 1.1.1.2.2.1, 2023/09/27 11:08:01 | 
| Line 9 | Line 9 | 
 | #define _RADSRV_H_ | #define _RADSRV_H_ | 
 |  |  | 
 | #include "defs.h" | #include "defs.h" | 
 |  |  | 
 |  | #ifdef USE_RADIUS | 
 | #include <radlib.h> | #include <radlib.h> | 
 |  |  | 
 | /* | /* | 
 | * DEFINITIONS | * DEFINITIONS | 
 | */ | */ | 
 |  |  | 
| #define RADSRV_MAX_SERVERS    10 | #define RADSRV_MAX_SERVERS      10 | 
 |  |  | 
| /* Configuration options */ | /* Configuration options */ | 
| enum { | enum { | 
| RADSRV_DISCONNECT,  /* enable Disconnect-Request */ | RADSRV_DISCONNECT,              /* enable Disconnect-Request */ | 
| RADSRV_COA          /* enable CoA-Request */ | RADSRV_COA                      /* enable CoA-Request */ | 
| }; | }; | 
 |  |  | 
| /* Configuration for a radius server */ | /* Configuration for a radius server */ | 
| struct radiusclient_conf { | struct radiusclient_conf { | 
| char        *hostname; | char   *hostname; | 
| char        *sharedsecret; | char   *sharedsecret; | 
| struct      radiusclient_conf *next; | struct radiusclient_conf *next; | 
| }; | }; | 
 |  |  | 
| struct radsrv { | struct radsrv { | 
| struct optinfo      options; | struct optinfo options; | 
| struct u_addr       addr; | struct u_addr addr; | 
| in_port_t           port; | in_port_t port; | 
| int                 fd; | int     fd; | 
| struct rad_handle   *handle; | struct rad_handle *handle; | 
| struct radiusclient_conf *clients; | struct radiusclient_conf *clients; | 
| EventRef            event;          /* connect-event */ | EventRef event;                  /* connect-event */ | 
| }; | }; | 
 |  |  | 
| typedef struct radsrv *Radsrv; | typedef struct radsrv *Radsrv; | 
 |  |  | 
 | /* | /* | 
 | * VARIABLES | * VARIABLES | 
 | */ | */ | 
 |  |  | 
| extern const struct cmdtab RadsrvSetCmds[]; | extern const struct cmdtab RadsrvSetCmds[]; | 
 |  |  | 
 | /* | /* | 
 | * FUNCTIONS | * FUNCTIONS | 
 | */ | */ | 
 |  |  | 
| extern int    RadsrvInit(Radsrv c); | extern int RadsrvInit(Radsrv c); | 
| extern int    RadsrvOpen(Radsrv c); | extern int RadsrvOpen(Radsrv c); | 
| extern int    RadsrvClose(Radsrv c); | extern int RadsrvClose(Radsrv c); | 
| extern int    RadsrvStat(Context ctx, int ac, char *av[], void *arg); | extern int RadsrvStat(Context ctx, int ac, const char *const av[], const void *arg); | 
 |  |  | 
 |  | #endif /* USE_RADIUS */ | 
 | #endif | #endif | 
 |  |  |