X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Foptions.c;h=d58c85022badc3e1c283a131caaf4409f03512b6;hp=ef1fc8a3c008b74494c63bc69dcddbae581dad8c;hb=045d19436a083f9c180993ff35a68597af65bc12;hpb=21befb77bf612913b9fe18e9aef6cb726ee7ae68 diff --git a/pppd/options.c b/pppd/options.c index ef1fc8a..d58c850 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #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 @@ -44,6 +44,7 @@ static char rcsid[] = "$Id: options.c,v 1.10 1994/05/27 00:43:34 paulus Exp $"; #include "ipcp.h" #include "upap.h" #include "chap.h" +#include "ccp.h" #define FALSE 0 #define TRUE 1 @@ -121,6 +122,8 @@ static int setipcpaccl __ARGS((void)); 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)); @@ -228,6 +231,8 @@ static struct cmd { {"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} }; @@ -1450,3 +1455,20 @@ static int setchapintv(argv) { 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; +}