151 |
|
|
152 |
#include <radsnmp.h> |
#include <radsnmp.h> |
153 |
|
|
154 |
typedef struct community_list Community; |
typedef struct netdef NETDEF; |
155 |
struct community_list { |
struct netdef { |
156 |
Community *next; |
UINT4 ipaddr; /* IP address */ |
157 |
|
UINT4 netmask; |
158 |
|
}; |
159 |
|
|
160 |
|
typedef struct netname NETNAME; |
161 |
|
struct netname { |
162 |
|
char *name; |
163 |
|
LIST /* of NETDEF */ *netlist; |
164 |
|
}; |
165 |
|
|
166 |
|
typedef struct community Community; |
167 |
|
struct community { |
168 |
char *name; |
char *name; |
169 |
int access; |
int access; |
170 |
} ; |
} ; |
171 |
|
|
172 |
typedef struct access_control_list ACL; |
typedef struct access_control_list ACL; |
173 |
struct access_control_list { |
struct access_control_list { |
174 |
ACL *next; /* next ACL */ |
Community *community; /* community or NULL to deny access */ |
175 |
Community *community;/* community or NULL to deny access */ |
LIST /* of NETDEF */ *netlist; |
|
UINT4 ipaddr; /* IP address */ |
|
|
UINT4 netmask; |
|
176 |
}; |
}; |
177 |
|
|
178 |
struct radstat { |
struct radstat { |
500 |
void snmp_acct_server_reset(); |
void snmp_acct_server_reset(); |
501 |
void snmp_attach_nas_stat(NAS *nas); |
void snmp_attach_nas_stat(NAS *nas); |
502 |
void snmp_init_nas_stat(); |
void snmp_init_nas_stat(); |
|
int check_acl(UINT4 ipaddr, char *community); |
|
|
void snmp_free_acl(); |
|
|
void free_acl(ACL *); |
|
|
void snmp_add_acl(ACL *, Community *); |
|
|
Community * snmp_find_community(char *); |
|
|
void snmp_add_community(char *str, int access); |
|
|
void snmp_free_communities(); |
|
503 |
void snmp_sort_nas_stat(); |
void snmp_sort_nas_stat(); |
504 |
int snmp_stmt_begin(int finish, void *data, void *up_data); |
int snmp_stmt_begin(int finish, void *data, void *up_data); |
505 |
#endif |
#endif |