summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/radius_p.h
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2013-08-15 22:42:45 +0400
committerDmitry Kozlov <xeb@mail.ru>2013-08-15 22:42:45 +0400
commit1289f64ef117e7fd2986bd42766e8a173bf06c6d (patch)
treecec41930741781545c8227e87bcc8eb91c6a45a1 /accel-pppd/radius/radius_p.h
parent8406ea98f48b7e7c4c6f2067af768e5994fe70ca (diff)
downloadaccel-ppp-xebd-1289f64ef117e7fd2986bd42766e8a173bf06c6d.tar.gz
accel-ppp-xebd-1289f64ef117e7fd2986bd42766e8a173bf06c6d.zip
radius: implemented sending Account-Request with Acct-Status-Type=Accounting-On on startup and Acct-Status-Type=Accounting-Off on shutdown
Diffstat (limited to 'accel-pppd/radius/radius_p.h')
-rw-r--r--accel-pppd/radius/radius_p.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/accel-pppd/radius/radius_p.h b/accel-pppd/radius/radius_p.h
index 4a17202..29a971f 100644
--- a/accel-pppd/radius/radius_p.h
+++ b/accel-pppd/radius/radius_p.h
@@ -12,8 +12,7 @@
struct rad_server_t;
-struct radius_pd_t
-{
+struct radius_pd_t {
struct list_head entry;
struct ap_private pd;
struct ap_session *ses;
@@ -46,8 +45,7 @@ struct radius_pd_t
struct list_head plugin_list;
};
-struct rad_req_t
-{
+struct rad_req_t {
struct list_head entry;
struct triton_context_t ctx;
struct triton_md_handler_t hnd;
@@ -58,15 +56,19 @@ struct rad_req_t
struct radius_pd_t *rpd;
struct rad_server_t *serv;
+ struct triton_context_t *wait_ctx;
in_addr_t server_addr;
int server_port;
int type;
+
+ void (*log)(const char *fmt, ...);
};
-struct rad_server_t
-{
+struct rad_server_t {
struct list_head entry;
+ struct triton_context_t ctx;
+ struct triton_timer_t timer;
int id;
in_addr_t addr;
char *secret;
@@ -105,7 +107,10 @@ struct rad_server_t
struct stat_accm_t *stat_interim_query_1m;
struct stat_accm_t *stat_interim_query_5m;
+ int starting:1;
+ int acct_on:1;
int need_free:1;
+ int need_close:1;
};
#define RAD_SERV_AUTH 0
@@ -143,7 +148,7 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u
struct rad_req_t *rad_req_alloc2(struct radius_pd_t *rpd, int code, const char *username, in_addr_t addr, int port);
int rad_req_acct_fill(struct rad_req_t *);
void rad_req_free(struct rad_req_t *);
-int rad_req_send(struct rad_req_t *, int verbose);
+int rad_req_send(struct rad_req_t *req, void (*log)(const char *fmt, ...));
int rad_req_wait(struct rad_req_t *, int);
struct radius_pd_t *find_pd(struct ap_session *ses);