summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/radius.h
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-02-06 02:54:47 +0000
committerbrian <brian@FreeBSD.org>1999-02-06 02:54:47 +0000
commit4435d086fa4374c8a6b2091bf4acccf59f7db3d0 (patch)
treed1336bbacc5640555b58b1ebfb93986ba3586343 /usr.sbin/ppp/radius.h
parentbd140b22548c2a839c934b79c6dab11f47d412d3 (diff)
downloadFreeBSD-src-4435d086fa4374c8a6b2091bf4acccf59f7db3d0.zip
FreeBSD-src-4435d086fa4374c8a6b2091bf4acccf59f7db3d0.tar.gz
Decouple pap & chap output routines from the corresponding
input routines and take advantage of the new init/continue interface in libradius. This allows a timely response on other links in an MP setup while RADIUS requests are in progress as well as the ability to handle other data from the peer in parallel. It should also make the future addition of PAM support trivial. While I'm in there, validate pap & chap header IDs if ``idcheck'' is enabled (the default) for other FSM packet types. NOTE: This involved integrating the generation of chap challenges and the validation of chap responses (and commenting what's going on in those routines). I currently have no way of testing ppps ability to respond to M$Chap CHALLENGEs correctly, so if someone could do the honours, it'd be much appreciated (it *looks* ok!). Sponsored by: Internet Business Solutions Ltd., Switzerland
Diffstat (limited to 'usr.sbin/ppp/radius.h')
-rw-r--r--usr.sbin/ppp/radius.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/ppp/radius.h b/usr.sbin/ppp/radius.h
index 0b02f21..37cf7b8 100644
--- a/usr.sbin/ppp/radius.h
+++ b/usr.sbin/ppp/radius.h
@@ -23,10 +23,17 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id:$
+ * $Id: radius.h,v 1.1 1999/01/28 01:56:34 brian Exp $
*/
struct radius {
+ struct descriptor desc; /* We're a sort of (selectable) descriptor */
+ struct {
+ int fd; /* We're selecting on this */
+ struct rad_handle *rad; /* Using this to talk to our lib */
+ struct pppTimer timer; /* for this long */
+ struct authinfo *auth; /* Tell this about success/failure */
+ } cx;
unsigned valid : 1; /* Is this structure valid ? */
unsigned vj : 1; /* FRAMED Compression */
struct in_addr ip; /* FRAMED IP */
@@ -38,11 +45,14 @@ struct radius {
} cfg;
};
+#define descriptor2radius(d) \
+ ((d)->type == RADIUS_DESCRIPTOR ? (struct radius *)(d) : NULL)
+
struct bundle;
extern void radius_Init(struct radius *);
extern void radius_Destroy(struct radius *);
extern void radius_Show(struct radius *, struct prompt *);
-extern int radius_Authenticate(struct radius *, struct bundle *, const char *,
- const char *, const char *);
+extern void radius_Authenticate(struct radius *, struct authinfo *,
+ const char *, const char *, const char *);
OpenPOWER on IntegriCloud