4 #define PLUGIN_API_VERSION 6
5 #define MAX_PLUGIN_TYPES 30
17 PLUGIN_RADIUS_RESPONSE
,
20 PLUGIN_NEW_SESSION_MASTER
,
23 #define PLUGIN_RET_ERROR 0
24 #define PLUGIN_RET_OK 1
25 #define PLUGIN_RET_STOP 2
26 #define PLUGIN_RET_NOTMASTER 3
30 void (*log
)(int level
, sessionidt s
, tunnelidt t
, const char *format
, ...);
31 void (*log_hex
)(int level
, const char *title
, const uint8_t *data
, int maxsize
);
32 char *(*fmtaddr
)(in_addr_t addr
, int n
);
33 sessionidt (*get_session_by_username
)(char *username
);
34 sessiont
*(*get_session_by_id
)(sessionidt s
);
35 sessionidt (*get_id_by_session
)(sessiont
*s
);
36 uint16_t (*radiusnew
)(sessionidt s
);
37 void (*radiussend
)(uint16_t r
, uint8_t state
);
38 void *(*getconfig
)(char *key
, enum config_typet type
);
39 void (*sessionshutdown
)(sessionidt s
, char *reason
, int result
, int error
);
40 void (*sessionkill
)(sessionidt s
, char *reason
);
41 void (*throttle
)(sessionidt s
, int rate_in
, int rate_out
);
42 int (*session_changed
)(int sid
);
55 struct param_post_auth
64 struct param_packet_rx
72 struct param_packet_tx
95 struct param_new_session
101 struct param_kill_session
107 struct param_radius_response
115 struct param_radius_reset
121 #endif /* __PLUGIN_H__ */