xref: /freebsd/usr.sbin/ppp/auth.h (revision 63b7346316afa0c20b6cf22506bcc53abc9f08f8)
11ae349f5Scvs2svn /*
21ae349f5Scvs2svn  *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
31ae349f5Scvs2svn  *
41ae349f5Scvs2svn  *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
51ae349f5Scvs2svn  *
61ae349f5Scvs2svn  * Redistribution and use in source and binary forms are permitted
71ae349f5Scvs2svn  * provided that the above copyright notice and this paragraph are
81ae349f5Scvs2svn  * duplicated in all such forms and that any documentation,
91ae349f5Scvs2svn  * advertising materials, and other materials related to such
101ae349f5Scvs2svn  * distribution and use acknowledge that the software was developed
111ae349f5Scvs2svn  * by the Internet Initiative Japan.  The name of the
121ae349f5Scvs2svn  * IIJ may not be used to endorse or promote products derived
131ae349f5Scvs2svn  * from this software without specific prior written permission.
141ae349f5Scvs2svn  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
151ae349f5Scvs2svn  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
161ae349f5Scvs2svn  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
171ae349f5Scvs2svn  *
1863b73463SBrian Somers  * $Id: auth.h,v 1.10 1997/11/22 03:37:24 brian Exp $
191ae349f5Scvs2svn  *
201ae349f5Scvs2svn  *	TODO:
211ae349f5Scvs2svn  */
221ae349f5Scvs2svn 
2363b73463SBrian Somers struct physical;
2463b73463SBrian Somers 
251ae349f5Scvs2svn typedef enum {
261ae349f5Scvs2svn   VALID,
271ae349f5Scvs2svn   INVALID,
281ae349f5Scvs2svn   NOT_FOUND
291ae349f5Scvs2svn } LOCAL_AUTH_VALID;
301ae349f5Scvs2svn 
311ae349f5Scvs2svn struct authinfo {
3263b73463SBrian Somers   void (*ChallengeFunc) (int, struct physical *);
331ae349f5Scvs2svn   struct pppTimer authtimer;
341ae349f5Scvs2svn   int retry;
351ae349f5Scvs2svn   int id;
3663b73463SBrian Somers   struct physical *physical;
371ae349f5Scvs2svn };
381ae349f5Scvs2svn 
391ae349f5Scvs2svn extern LOCAL_AUTH_VALID LocalAuthValidate(const char *, const char *, const char *);
401ae349f5Scvs2svn extern void StopAuthTimer(struct authinfo *);
4163b73463SBrian Somers extern void StartAuthChallenge(struct authinfo *, struct physical *);
421ae349f5Scvs2svn extern void LocalAuthInit(void);
4363b73463SBrian Somers extern int AuthValidate(const char *, const char *, const char *,
4463b73463SBrian Somers 						struct physical *);
4563b73463SBrian Somers extern char *AuthGetSecret(const char *, const char *, int, int,
4663b73463SBrian Somers 						   struct physical *);
47