chap.h (44123) | chap.h (45907) |
---|---|
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 * | 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: chap.h,v 1.13 1999/02/18 00:52:12 brian Exp $ | 18 * $Id: chap.h,v 1.14 1999/02/18 19:45:06 brian Exp $ |
19 * 20 * TODO: 21 */ 22 23struct mbuf; 24struct physical; 25 26#define CHAP_CHALLENGE 1 --- 7 unchanged lines hidden (view full) --- 34 pid_t pid; 35 int fd; 36 struct { 37 char ptr[AUTHLEN * 2 + 3]; /* Allow for \r\n at the end (- NUL) */ 38 int len; 39 } buf; 40 } child; 41 struct authinfo auth; | 19 * 20 * TODO: 21 */ 22 23struct mbuf; 24struct physical; 25 26#define CHAP_CHALLENGE 1 --- 7 unchanged lines hidden (view full) --- 34 pid_t pid; 35 int fd; 36 struct { 37 char ptr[AUTHLEN * 2 + 3]; /* Allow for \r\n at the end (- NUL) */ 38 int len; 39 } buf; 40 } child; 41 struct authinfo auth; |
42 u_char challenge[CHAPCHALLENGELEN + AUTHLEN]; | 42 struct { 43 u_char local[CHAPCHALLENGELEN + AUTHLEN]; /* I invented this one */ 44 u_char peer[CHAPCHALLENGELEN + AUTHLEN]; /* Peer gave us this one */ 45 } challenge; |
43#ifdef HAVE_DES 44 unsigned NTRespSent : 1; /* Our last response */ 45 int peertries; 46#endif 47}; 48 49#define descriptor2chap(d) \ 50 ((d)->type == CHAP_DESCRIPTOR ? (struct chap *)(d) : NULL) 51#define auth2chap(a) (struct chap *)((char *)a - (int)&((struct chap *)0)->auth) 52 53extern void chap_Init(struct chap *, struct physical *); 54extern void chap_ReInit(struct chap *); 55extern void chap_Input(struct physical *, struct mbuf *); | 46#ifdef HAVE_DES 47 unsigned NTRespSent : 1; /* Our last response */ 48 int peertries; 49#endif 50}; 51 52#define descriptor2chap(d) \ 53 ((d)->type == CHAP_DESCRIPTOR ? (struct chap *)(d) : NULL) 54#define auth2chap(a) (struct chap *)((char *)a - (int)&((struct chap *)0)->auth) 55 56extern void chap_Init(struct chap *, struct physical *); 57extern void chap_ReInit(struct chap *); 58extern void chap_Input(struct physical *, struct mbuf *); |