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 * 18dd7e2610SBrian Somers * $Id: auth.h,v 1.10.2.8 1998/04/24 19:15:56 brian Exp $ 191ae349f5Scvs2svn * 201ae349f5Scvs2svn * TODO: 211ae349f5Scvs2svn */ 221ae349f5Scvs2svn 2363b73463SBrian Somers struct physical; 242764b86aSBrian Somers struct bundle; 2563b73463SBrian Somers 261ae349f5Scvs2svn struct authinfo { 27e2ebb036SBrian Somers void (*ChallengeFunc)(struct authinfo *, int, struct physical *); 281ae349f5Scvs2svn struct pppTimer authtimer; 291ae349f5Scvs2svn int retry; 301ae349f5Scvs2svn int id; 3163b73463SBrian Somers struct physical *physical; 32cd9647a1SBrian Somers struct { 33cd9647a1SBrian Somers u_int fsmretry; 34cd9647a1SBrian Somers } cfg; 351ae349f5Scvs2svn }; 361ae349f5Scvs2svn 37455aabc3SBrian Somers extern const char *Auth2Nam(u_short); 38dd7e2610SBrian Somers 39dd7e2610SBrian Somers extern void auth_Init(struct authinfo *); 40dd7e2610SBrian Somers extern void auth_StopTimer(struct authinfo *); 41dd7e2610SBrian Somers extern void auth_StartChallenge(struct authinfo *, struct physical *, 42dd7e2610SBrian Somers void (*fn)(struct authinfo *, int, 43dd7e2610SBrian Somers struct physical *)); 44dd7e2610SBrian Somers extern int auth_Validate(struct bundle *, const char *, const char *, 45643f4904SBrian Somers struct physical *); 46dd7e2610SBrian Somers extern char *auth_GetSecret(struct bundle *, const char *, int, 47643f4904SBrian Somers struct physical *); 48dd7e2610SBrian Somers extern int auth_Select(struct bundle *, const char *, struct physical *); 49