*/
#ifndef lint
-static char rcsid[] = "$Id: auth.c,v 1.6 1994/05/25 06:25:05 paulus Exp $";
+static char rcsid[] = "$Id: auth.c,v 1.7 1994/08/09 06:29:14 paulus Exp $";
#endif
#include <stdio.h>
#include "upap.h"
#include "chap.h"
#include "ipcp.h"
+#include "ccp.h"
#include "pathnames.h"
#ifdef sparc
/* Prototypes */
void check_access __ARGS((FILE *, char *));
+static void network_phase __ARGS((int));
static int login __ARGS((char *, char *, char **, int *));
static void logout __ARGS((void));
static int null_login __ARGS((int));
link_terminated(unit)
int unit;
{
+ if (phase == PHASE_DEAD)
+ return;
if (logged_in)
logout();
phase = PHASE_DEAD;
link_down(unit)
int unit;
{
+ ipcp_close(0);
+ ccp_close(0);
phase = PHASE_TERMINATE;
}
}
auth_pending[unit] = auth;
- if (!auth) {
- phase = PHASE_NETWORK;
- ipcp_open(unit);
- }
+ if (!auth)
+ network_phase(unit);
+}
+
+/*
+ * Proceed to the network phase.
+ */
+static void
+network_phase(unit)
+ int unit;
+{
+ phase = PHASE_NETWORK;
+ ipcp_open(unit);
+ ccp_open(unit);
}
/*
if ((auth_pending[unit] &= ~bit) == 0) {
phase = PHASE_NETWORK;
ipcp_open(unit);
+ ccp_open(unit);
}
}
* If there is no more authentication still being done,
* proceed to the network phase.
*/
- if ((auth_pending[unit] &= ~bit) == 0) {
- phase = PHASE_NETWORK;
- ipcp_open(unit);
- }
+ if ((auth_pending[unit] &= ~bit) == 0)
+ network_phase(unit);
}
*/
#ifndef lint
-static char rcsid[] = "$Id: lcp.c,v 1.10 1994/08/09 06:24:59 paulus Exp $";
+static char rcsid[] = "$Id: lcp.c,v 1.11 1994/08/09 06:29:14 paulus Exp $";
#endif
/*
ChapLowerUp(f->unit); /* Enable CHAP */
upap_lowerup(f->unit); /* Enable UPAP */
ipcp_lowerup(f->unit); /* Enable IPCP */
+ ccp_lowerup(f->unit); /* Enable CCP */
lcp_echo_lowerup(f->unit); /* Enable echo messages */
link_established(f->unit);
fsm *f;
{
lcp_echo_lowerdown(f->unit);
+ ccp_lowerdown(f->unit);
ipcp_lowerdown(f->unit);
ChapLowerDown(f->unit);
upap_lowerdown(f->unit);
*/
#ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.10 1994/05/27 00:43:34 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.11 1994/08/09 06:29:14 paulus Exp $";
#endif
#include <stdio.h>
#include "ipcp.h"
#include "upap.h"
#include "chap.h"
+#include "ccp.h"
#define FALSE 0
#define TRUE 1
static int setipcpaccr __ARGS((void));
static int setlcpechointv __ARGS((char **));
static int setlcpechofails __ARGS((char **));
+static int setbsdcomp __ARGS((char **));
+static int setnobsdcomp __ARGS((void));
static int number_option __ARGS((char *, long *, int));
static int readable __ARGS((int fd));
{"chap-interval", 1, setchapintv}, /* Set interval for rechallenge */
{"ipcp-accept-local", 0, setipcpaccl}, /* Accept peer's address for us */
{"ipcp-accept-remote", 0, setipcpaccr}, /* Accept peer's address for it */
+ {"bsdcomp", 1, setbsdcomp}, /* request BSD-Compress */
+ {"-bsdcomp", 0, setnobsdcomp}, /* don't allow BSD-Compress */
{NULL, 0, NULL}
};
{
return int_option(*argv, &chap[0].chal_interval);
}
+
+static int setbsdcomp(argv)
+ char **argv;
+{
+ int bits;
+
+ if (!int_option(*argv, &bits))
+ return 0;
+ ccp_wantoptions[0].bsd_compress = 1;
+ ccp_wantoptions[0].bsd_bits = bits;
+ return 1;
+}
+
+static int setnobsdcomp()
+{
+ ccp_allowoptions[0].bsd_compress = 0;
+}
+++ /dev/null
-/*
- * ppp.h - PPP global declarations.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id: ppp.h,v 1.1 1993/11/11 03:54:25 paulus Exp $
- */
-
-#ifndef __PPP_H__
-#define __PPP_H__
-
-#define NPPP 1 /* One PPP interface supported (per process) */
-
-/*
- * Data Link Layer header = Address, Control, Protocol.
- */
-#define ALLSTATIONS 0xff /* All-Stations Address */
-#define UI 0x03 /* Unnumbered Information */
-#define LCP 0xc021 /* Link Control Protocol */
-#define IPCP 0x8021 /* IP Control Protocol */
-#define UPAP 0xc023 /* User/Password Authentication Protocol */
-#define CHAP 0xc223 /* Crytpographic Handshake Protocol */
-#define LQR 0xc025 /* Link Quality Report protocol */
-#define IP_VJ_COMP 0x002d /* VJ TCP compressed IP packet */
-#define DLLHEADERLEN (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))
-#define MTU 1500 /* Default MTU */
-
-#endif /* __PPP_H__ */