From 82f548fd196d80b812a968821012bff7642ca42d Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 27 Dec 2001 16:52:23 +0000 Subject: Implement knobs to enable/disable VJ header compression. Submitted by: i4b (modified) MFC after: 1 month --- sbin/spppcontrol/spppcontrol.8 | 9 +++++++-- sbin/spppcontrol/spppcontrol.c | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'sbin/spppcontrol') diff --git a/sbin/spppcontrol/spppcontrol.8 b/sbin/spppcontrol/spppcontrol.8 index d531de9..8db48bc 100644 --- a/sbin/spppcontrol/spppcontrol.8 +++ b/sbin/spppcontrol/spppcontrol.8 @@ -1,4 +1,4 @@ -.\" Copyright (C) 1997 by Joerg Wunsch, Dresden +.\" Copyright (C) 1997, 2001 by Joerg Wunsch, Dresden .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 11, 1997 +.Dd December 27, 2001 .Os .Dt SPPPCONTROL 8 .Sh NAME @@ -164,6 +164,10 @@ through approximately 800 seconds.) This is the default, and will not be explicitly displayed in .Ql list mode. +.It Ar enable-vj +Enable negotiation of Van Jacobsen header compression. (Enabled by default.) +.It Ar disable-vj +Disable negotiation of Van Jacobsen header compression. .El .Sh EXAMPLES .Bd -literal @@ -171,6 +175,7 @@ mode. bppp0: phase=dead myauthproto=chap myauthname="uriah" hisauthproto=chap hisauthname="ifb-gw" norechallenge + enable-vj .Ed .Pp Display the settings for bppp0. The interface is currently in diff --git a/sbin/spppcontrol/spppcontrol.c b/sbin/spppcontrol/spppcontrol.c index fa902f9..e1ddfff 100644 --- a/sbin/spppcontrol/spppcontrol.c +++ b/sbin/spppcontrol/spppcontrol.c @@ -32,10 +32,15 @@ static const char rcsid[] = #include #include #include +#include #include #include #include +#include +#include +#include +#include #include #include @@ -160,6 +165,10 @@ main(int argc, char **argv) spr.defs.hisauth.flags |= AUTHFLAG_NORECHALLENGE; else if (strcmp(argv[0], "rechallenge") == 0) spr.defs.hisauth.flags &= ~AUTHFLAG_NORECHALLENGE; + else if (strcmp(argv[0], "enable-vj") == 0) + spr.defs.enable_vj = 1; + else if (strcmp(argv[0], "disable-vj") == 0) + spr.defs.enable_vj = 0; else errx(EX_DATAERR, "bad parameter: \"%s\"", argv[0]); @@ -202,6 +211,7 @@ print_vals(const char *ifname, struct spppreq *sp) AUTHNAMELEN, sp->defs.hisauth.name, authflags(sp->defs.hisauth.flags)); } + printf("\t%sable-vj\n", sp->defs.enable_vj? "en": "dis"); } const char * -- cgit v1.1