28855e1c0658486f3fc2db2d7939e5cca4b3ad4a
4 #define PLUGIN_API_VERSION 1
5 #define MAX_PLUGIN_TYPES 30
7 #define PLUGIN_PRE_AUTH 1
8 #define PLUGIN_POST_AUTH 2
9 #define PLUGIN_PACKET_RX 3
10 #define PLUGIN_PACKET_TX 4
11 #define PLUGIN_TIMER 5
12 #define PLUGIN_CONFIG 6
13 #define PLUGIN_NEW_SESSION 7
14 #define PLUGIN_KILL_SESSION 8
15 #define PLUGIN_CONTROL 9
16 #define PLUGIN_RADIUS_RESPONSE 10
18 #define PLUGIN_RET_ERROR 0
19 #define PLUGIN_RET_OK 1
20 #define PLUGIN_RET_STOP 2
24 void (*_log
)(int level
, ipt address
, sessionidt s
, tunnelidt t
, const char *format
, ...);
25 void (*_log_hex
)(int level
, ipt address
, sessionidt s
, tunnelidt t
, const char *title
, const char *data
, int maxsize
);
26 char *(*inet_toa
)(unsigned long addr
);
27 sessionidt (*get_session_by_username
)(char *username
);
28 sessiont
*(*get_session_by_id
)(sessionidt s
);
29 sessionidt (*get_id_by_session
)(sessiont
*s
);
30 void (*sessionkill
)(sessionidt s
, char *reason
);
31 u8 (*radiusnew
)(sessionidt s
);
32 void (*radiussend
)(u8 r
, u8 state
);
45 struct param_post_auth
54 struct param_packet_rx
62 struct param_packet_tx
85 unsigned int source_ip
;
86 unsigned short source_port
;
96 struct param_new_session
102 struct param_kill_session
108 struct param_radius_response