chap.h revision 43693
139215Sgibbs/* 2107178Snjl * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 339215Sgibbs * 4107178Snjl * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 539215Sgibbs * 639215Sgibbs * Redistribution and use in source and binary forms are permitted 739215Sgibbs * provided that the above copyright notice and this paragraph are 839215Sgibbs * duplicated in all such forms and that any documentation, 939215Sgibbs * advertising materials, and other materials related to such 1039215Sgibbs * distribution and use acknowledge that the software was developed 1139215Sgibbs * by the Internet Initiative Japan. The name of the 1239215Sgibbs * IIJ may not be used to endorse or promote products derived 1339215Sgibbs * from this software without specific prior written permission. 1439215Sgibbs * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1539215Sgibbs * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1639215Sgibbs * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1739215Sgibbs * 1839215Sgibbs * $Id: chap.h,v 1.10 1998/05/21 21:44:27 brian Exp $ 1939215Sgibbs * 2039215Sgibbs * TODO: 2139215Sgibbs */ 2239215Sgibbs 2339215Sgibbsstruct mbuf; 2439215Sgibbsstruct physical; 2539215Sgibbs 2639215Sgibbs#define CHAP_CHALLENGE 1 2739215Sgibbs#define CHAP_RESPONSE 2 2850476Speter#define CHAP_SUCCESS 3 2939215Sgibbs#define CHAP_FAILURE 4 3039215Sgibbs 3139215Sgibbsstruct chap { 3244498Sgibbs struct authinfo auth; 33107178Snjl char challenge[CHAPCHALLENGELEN + AUTHLEN]; 3439215Sgibbs unsigned using_MSChap : 1; /* A combination of MD4 & DES */ 3544498Sgibbs}; 3639215Sgibbs 3739215Sgibbs#define auth2chap(a) ((struct chap *)(a)) 3839215Sgibbs 39107178Snjlextern void chap_Init(struct chap *, struct physical *); 4039215Sgibbsextern void chap_Input(struct physical *, struct mbuf *); 4139215Sgibbs