1 /* 2 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 3 * 4 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 5 * 6 * Redistribution and use in source and binary forms are permitted 7 * provided that the above copyright notice and this paragraph are 8 * duplicated in all such forms and that any documentation, 9 * advertising materials, and other materials related to such 10 * distribution and use acknowledge that the software was developed 11 * by the Internet Initiative Japan. The name of the 12 * IIJ may not be used to endorse or promote products derived 13 * from this software without specific prior written permission. 14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 * 18 * $Id: auth.h,v 1.11 1998/05/21 21:44:03 brian Exp $ 19 * 20 * TODO: 21 */ 22 23 struct physical; 24 struct bundle; 25 26 struct authinfo { 27 void (*ChallengeFunc)(struct authinfo *, int, struct physical *); 28 struct pppTimer authtimer; 29 int retry; 30 int id; 31 struct physical *physical; 32 struct { 33 u_int fsmretry; 34 } cfg; 35 }; 36 37 extern const char *Auth2Nam(u_short); 38 39 extern void auth_Init(struct authinfo *); 40 extern void auth_StopTimer(struct authinfo *); 41 extern void auth_StartChallenge(struct authinfo *, struct physical *, 42 void (*fn)(struct authinfo *, int, 43 struct physical *)); 44 extern int auth_Validate(struct bundle *, const char *, const char *, 45 struct physical *); 46 extern char *auth_GetSecret(struct bundle *, const char *, int, 47 struct physical *); 48 extern int auth_SetPhoneList(const char *, char *, int); 49 extern int auth_Select(struct bundle *, const char *); 50