3fdb882643c4a0406b42a19269eca4d29861faa8
10 int __plugin_api_version
= 1;
11 struct pluginfuncs
*p
;
13 int plugin_radius_response(struct param_radius_response
*data
)
15 if (strcmp(data
->key
, "intercept") == 0)
18 data
->s
->snoop_ip
= 0;
19 data
->s
->snoop_port
= 0;
20 if ((x
= strchr(data
->value
, ':')))
23 if (*data
->value
) data
->s
->snoop_ip
= inet_addr(data
->value
);
24 if (data
->s
->snoop_ip
== INADDR_NONE
) data
->s
->snoop_ip
= 0;
25 if (*x
) data
->s
->snoop_port
= atoi(x
);
26 p
->_log(3, 0, 0, 0, " Intercepting user to %s:%d\n",
27 p
->inet_toa(data
->s
->snoop_ip
), data
->s
->snoop_port
);
31 p
->_log(3, 0, 0, 0, " Not Intercepting user (reply string should be snoop=ip:port)\n");
37 int plugin_init(struct pluginfuncs
*funcs
)
39 return ((p
= funcs
)) ? 1 : 0;