4 #define PLUGIN_API_VERSION 7
5 #define MAX_PLUGIN_TYPES 30
15 PLUGIN_RADIUS_RESPONSE
,
17 PLUGIN_RADIUS_ACCOUNT
,
19 PLUGIN_NEW_SESSION_MASTER
,
22 #define PLUGIN_RET_ERROR 0
23 #define PLUGIN_RET_OK 1
24 #define PLUGIN_RET_STOP 2
25 #define PLUGIN_RET_NOTMASTER 3
29 void (*log
)(int level
, sessionidt s
, tunnelidt t
, const char *format
, ...);
30 void (*log_hex
)(int level
, const char *title
, const uint8_t *data
, int maxsize
);
31 char *(*fmtaddr
)(in_addr_t addr
, int n
);
32 sessionidt (*get_session_by_username
)(char *username
);
33 sessiont
*(*get_session_by_id
)(sessionidt s
);
34 sessionidt (*get_id_by_session
)(sessiont
*s
);
35 uint16_t (*radiusnew
)(sessionidt s
);
36 void (*radiussend
)(uint16_t r
, uint8_t state
);
37 void *(*getconfig
)(char *key
, enum config_typet type
);
38 void (*sessionshutdown
)(sessionidt s
, char const *reason
, int result
, int error
, int term_cause
);
39 void (*sessionkill
)(sessionidt s
, char *reason
);
40 void (*throttle
)(sessionidt s
, int rate_in
, int rate_out
);
41 int (*session_changed
)(int sid
);
54 struct param_post_auth
68 struct param_new_session
74 struct param_kill_session
90 struct param_radius_response
98 struct param_radius_reset
104 struct param_radius_account
111 #endif /* __PLUGIN_H__ */