version 1.1.1.3, 2016/11/01 09:56:12
|
version 1.1.1.4, 2021/03/17 00:39:23
|
Line 5
|
Line 5
|
* Written by Alexander Motin <mav@FreeBSD.org> |
* Written by Alexander Motin <mav@FreeBSD.org> |
*/ |
*/ |
|
|
|
#define RADSRV |
|
|
#include "ppp.h" |
#include "ppp.h" |
#include "radsrv.h" |
#include "radsrv.h" |
#include "util.h" |
#include "util.h" |
|
|
#include <stdint.h> |
#include <stdint.h> |
#include <radlib.h> |
#include <radlib.h> |
#include <radlib_vs.h> |
#include <radlib_vs.h> |
Line 33
|
Line 36
|
* INTERNAL FUNCTIONS |
* INTERNAL FUNCTIONS |
*/ |
*/ |
|
|
static int RadsrvSetCommand(Context ctx, int ac, char *av[], void *arg); | static int RadsrvSetCommand(Context ctx, int ac, const char *const av[], const void *arg); |
|
|
/* |
/* |
* GLOBAL VARIABLES |
* GLOBAL VARIABLES |
Line 52
|
Line 55
|
RadsrvSetCommand, NULL, 2, (void *) SET_ENABLE }, |
RadsrvSetCommand, NULL, 2, (void *) SET_ENABLE }, |
{ "disable [opt ...]", "Disable radsrv option" , |
{ "disable [opt ...]", "Disable radsrv option" , |
RadsrvSetCommand, NULL, 2, (void *) SET_DISABLE }, |
RadsrvSetCommand, NULL, 2, (void *) SET_DISABLE }, |
{ NULL }, | { NULL, NULL, NULL, NULL, 0, NULL }, |
}; |
}; |
|
|
|
|
Line 123 RadsrvEvent(int type, void *cookie)
|
Line 126 RadsrvEvent(int type, void *cookie)
|
struct acl *acl_limits[ACL_DIRS]; /* traffic limits based on mpd's filters */ |
struct acl *acl_limits[ACL_DIRS]; /* traffic limits based on mpd's filters */ |
char std_acct[ACL_DIRS][ACL_NAME_LEN]; /* Names of ACL returned in standard accounting */ |
char std_acct[ACL_DIRS][ACL_NAME_LEN]; /* Names of ACL returned in standard accounting */ |
|
|
|
(void)type; |
bzero(acl_filters, sizeof(acl_filters)); |
bzero(acl_filters, sizeof(acl_filters)); |
bzero(acl_limits, sizeof(acl_limits)); |
bzero(acl_limits, sizeof(acl_limits)); |
bzero(std_acct, sizeof(std_acct)); |
bzero(std_acct, sizeof(std_acct)); |
Line 725 RadsrvClose(Radsrv w)
|
Line 729 RadsrvClose(Radsrv w)
|
*/ |
*/ |
|
|
int |
int |
RadsrvStat(Context ctx, int ac, char *av[], void *arg) | RadsrvStat(Context ctx, int ac, const char *const av[], const void *arg) |
{ |
{ |
Radsrv w = &gRadsrv; |
Radsrv w = &gRadsrv; |
char addrstr[64]; |
char addrstr[64]; |
struct radiusclient_conf *client; |
struct radiusclient_conf *client; |
|
|
|
(void)ac; |
|
(void)av; |
|
(void)arg; |
|
|
Printf("Radsrv configuration:\r\n"); |
Printf("Radsrv configuration:\r\n"); |
Printf("\tState : %s\r\n", w->handle ? "OPENED" : "CLOSED"); |
Printf("\tState : %s\r\n", w->handle ? "OPENED" : "CLOSED"); |
Printf("\tSelf : %s %d\r\n", |
Printf("\tSelf : %s %d\r\n", |
Line 752 RadsrvStat(Context ctx, int ac, char *av[], void *arg)
|
Line 760 RadsrvStat(Context ctx, int ac, char *av[], void *arg)
|
*/ |
*/ |
|
|
static int |
static int |
RadsrvSetCommand(Context ctx, int ac, char *av[], void *arg) | RadsrvSetCommand(Context ctx, int ac, const char *const av[], const void *arg) |
{ |
{ |
Radsrv w = &gRadsrv; |
Radsrv w = &gRadsrv; |
int port, count; |
int port, count; |