2 * Layer Two Tunnelling Protocol Daemon
3 * Copyright (C) 1998 Adtran, Inc.
4 * Copyright (C) 2002 Jeff McAdams
8 * This software is distributed under the terms
9 * of the GPL, which you should have received
10 * along with this source.
12 * Authorization, Accounting, and Access control
20 #define ADDR_HASH_SIZE 256
21 #define MD_SIG_SIZE 16
22 #define MAX_VECTOR_SIZE 1024
23 #define VECTOR_SIZE 16
26 #define STATE_CHALLENGED 1
27 #define STATE_COMPLETE 2
32 struct addr_ent
*next
;
37 struct MD5Context md5
;
38 unsigned char ss
; /* State we're sending in */
39 unsigned char secret
[MAXSTRLEN
]; /* The shared secret */
40 unsigned char *challenge
; /* The original challenge */
41 unsigned int chal_len
; /* The length of the original challenge */
42 unsigned char response
[MD_SIG_SIZE
]; /* What we expect as a respsonse */
43 unsigned char reply
[MD_SIG_SIZE
]; /* What the peer sent */
44 unsigned char *vector
;
45 unsigned int vector_len
;
46 int state
; /* What state is challenge in? */
49 extern struct lns
*get_lns (struct tunnel
*);
50 extern unsigned int get_addr (struct iprange
*);
51 extern void reserve_addr (unsigned int);
52 extern void unreserve_addr (unsigned int);
53 extern void init_addr ();
54 extern int handle_challenge (struct tunnel
*, struct challenge
*);
55 extern void mk_challenge (unsigned char *, int);