191 |
int nas_index; /* Next available NAS index */ |
int nas_index; /* Next available NAS index */ |
192 |
Auth_server_stat auth; |
Auth_server_stat auth; |
193 |
Acct_server_stat acct; |
Acct_server_stat acct; |
194 |
struct nas_stat *nas_head, *nas_tail; |
/* struct nas_stat naslist[nas_count]; |
195 |
struct port_stat *port_head, *port_tail; |
struct port_stat portlist[port_count]; */ |
196 |
} Server_stat; |
} Server_stat; |
197 |
|
|
198 |
#define stat_inc(m,a,c) \ |
#define stat_inc(m,a,c) \ |
199 |
do {\ |
do if (server_stat) {\ |
200 |
NAS *nas;\ |
NAS *nas;\ |
201 |
server_stat . m . c ++;\ |
server_stat -> m . c ++;\ |
202 |
if ((nas = nas_lookup_ip(a)) != NULL && nas->app_data)\ |
if ((nas = nas_lookup_ip(a)) != NULL && nas->app_data)\ |
203 |
((struct nas_stat*)nas->app_data)-> m . c ++;\ |
((struct nas_stat*)nas->app_data)-> m . c ++;\ |
204 |
} while (0) |
} while (0) |
209 |
struct snmp_pdu *pdu; |
struct snmp_pdu *pdu; |
210 |
char *community; |
char *community; |
211 |
int access; |
int access; |
212 |
struct sockaddr_in sa; |
struct sockaddr_in addr; |
|
int fd; |
|
213 |
} SNMP_REQ; |
} SNMP_REQ; |
214 |
|
|
215 |
#else |
#else |
291 |
#ifdef USE_SNMP |
#ifdef USE_SNMP |
292 |
extern int snmp_port; |
extern int snmp_port; |
293 |
extern char *server_id; |
extern char *server_id; |
294 |
extern Server_stat server_stat; |
extern Server_stat *server_stat; |
295 |
extern struct cfg_stmt snmp_stmt[]; |
extern struct cfg_stmt snmp_stmt[]; |
296 |
#endif |
#endif |
297 |
extern int auth_comp_flag; |
extern int auth_comp_flag; |
333 |
void request_init_queue(); |
void request_init_queue(); |
334 |
void *request_scan_list(int type, list_iterator_t itr, void *closure); |
void *request_scan_list(int type, list_iterator_t itr, void *closure); |
335 |
void request_set_status(pid_t pid, int status); |
void request_set_status(pid_t pid, int status); |
336 |
|
int request_stat_list(QUEUE_STAT stat); |
337 |
|
|
338 |
/* radiusd.c */ |
/* radiusd.c */ |
339 |
int udp_input_handler(int fd, void *data); |
int udp_input_handler(int fd, void *data); |
340 |
int udp_input_close(int fd, void *data); |
int udp_input_close(int fd, void *data); |
341 |
int udp_input_cmp(const void *a, const void *b); |
int udp_input_cmp(const void *a, const void *b); |
342 |
|
|
343 |
|
int udp_open(int type, UINT4 ipaddr, int port, int nonblock); |
344 |
|
|
345 |
void radiusd_pidfile_write(char *name); |
void radiusd_pidfile_write(char *name); |
346 |
pid_t radiusd_pidfile_read(char *name); |
pid_t radiusd_pidfile_read(char *name); |
347 |
void radiusd_pidfile_remove(char *name); |
void radiusd_pidfile_remove(char *name); |
354 |
void radiusd_exit(); |
void radiusd_exit(); |
355 |
void radiusd_reconfigure(); |
void radiusd_reconfigure(); |
356 |
int radiusd_master(); |
int radiusd_master(); |
357 |
|
void radiusd_set_preconfig_hook(void (*f)(void *, void *), void *p, int once); |
358 |
|
void radiusd_set_postconfig_hook(void (*f)(void *, void *), void *p, int once); |
359 |
|
|
360 |
|
|
361 |
/* exec.c */ |
/* exec.c */ |
362 |
int radius_exec_program(char *, RADIUS_REQ *, VALUE_PAIR **, int, char **); |
int radius_exec_program(char *, RADIUS_REQ *, VALUE_PAIR **, int, char **); |
410 |
void radius_req_update(void *req_ptr, void *data_ptr); |
void radius_req_update(void *req_ptr, void *data_ptr); |
411 |
int radius_respond(REQUEST *req); |
int radius_respond(REQUEST *req); |
412 |
|
|
413 |
|
/* shmem.c */ |
414 |
|
int shmem_alloc(size_t size); |
415 |
|
void shmem_free(); |
416 |
|
void *shmem_get(size_t size, int zero); |
417 |
|
|
418 |
|
|
419 |
|
|
420 |
|
|
421 |
|
|
422 |
/*FIXME*/ |
/*FIXME*/ |
423 |
/* acct.c */ |
/* acct.c */ |
424 |
int rad_accounting(RADIUS_REQ *, int, int); |
int rad_accounting(RADIUS_REQ *, int, int); |
527 |
#endif |
#endif |
528 |
|
|
529 |
/* snmpserver.c */ |
/* snmpserver.c */ |
530 |
struct sockaddr_in; |
int snmp_req_decode(struct sockaddr_in *sa, |
531 |
struct snmp_req * rad_snmp_respond(u_char *buf, int len, |
void *input, size_t inputsize, void **output); |
532 |
struct sockaddr_in *sa); |
int snmp_req_cmp(void *ap, void *bp); |
533 |
int snmp_req_cmp(struct snmp_req *a, struct snmp_req *b); |
void snmp_req_free(void *ptr); |
534 |
void snmp_req_free(struct snmp_req *req); |
void snmp_req_drop(int type, void *data, void *orig_data, |
|
void snmp_req_drop(int type, struct snmp_req *req, struct snmp_req *orig_req, |
|
535 |
int fd, char *status_str); |
int fd, char *status_str); |
536 |
int snmp_answer(struct snmp_req *req, int fd); |
int snmp_req_respond(REQUEST *request); |
537 |
|
|
538 |
/* radutil.c */ |
/* radutil.c */ |
539 |
char *radius_xlate(struct obstack *obp, char *str, |
char *radius_xlate(struct obstack *obp, char *str, |