4 #define PLUGIN_API_VERSION 7
5 #define MAX_PLUGIN_TYPES 30
17 PLUGIN_RADIUS_RESPONSE
,
19 PLUGIN_RADIUS_ACCOUNT
,
21 PLUGIN_NEW_SESSION_MASTER
,
24 #define PLUGIN_RET_ERROR 0
25 #define PLUGIN_RET_OK 1
26 #define PLUGIN_RET_STOP 2
27 #define PLUGIN_RET_NOTMASTER 3
31 void (*log
)(int level
, sessionidt s
, tunnelidt t
, const char *format
, ...);
32 void (*log_hex
)(int level
, const char *title
, const uint8_t *data
, int maxsize
);
33 char *(*fmtaddr
)(in_addr_t addr
, int n
);
34 sessionidt (*get_session_by_username
)(char *username
);
35 sessiont
*(*get_session_by_id
)(sessionidt s
);
36 sessionidt (*get_id_by_session
)(sessiont
*s
);
37 uint16_t (*radiusnew
)(sessionidt s
);
38 void (*radiussend
)(uint16_t r
, uint8_t state
);
39 void *(*getconfig
)(char *key
, enum config_typet type
);
40 void (*sessionshutdown
)(sessionidt s
, char const *reason
, int result
, int error
, int term_cause
);
41 void (*sessionkill
)(sessionidt s
, char *reason
);
42 void (*throttle
)(sessionidt s
, int rate_in
, int rate_out
);
43 int (*session_changed
)(int sid
);
56 struct param_post_auth
65 struct param_packet_rx
73 struct param_packet_tx
96 struct param_new_session
102 struct param_kill_session
108 struct param_radius_response
116 struct param_radius_reset
122 struct param_radius_account
129 #endif /* __PLUGIN_H__ */