aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/spppcontrol
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2001-12-27 16:52:23 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2001-12-27 16:52:23 +0000
commit979c74a0aff9c151928779e0d9a227ce20af28f6 (patch)
treea75db8e49c67f275b9a2b981111e385bb8298d9d /sbin/spppcontrol
parent41a95e09c1e2c340a304823eea17680c828b6657 (diff)
downloadsrc-979c74a0aff9c151928779e0d9a227ce20af28f6.tar.gz
src-979c74a0aff9c151928779e0d9a227ce20af28f6.zip
Implement knobs to enable/disable VJ header compression.
Submitted by: i4b (modified) MFC after: 1 month
Notes
Notes: svn path=/head/; revision=88536
Diffstat (limited to 'sbin/spppcontrol')
-rw-r--r--sbin/spppcontrol/spppcontrol.89
-rw-r--r--sbin/spppcontrol/spppcontrol.c10
2 files changed, 17 insertions, 2 deletions
diff --git a/sbin/spppcontrol/spppcontrol.8 b/sbin/spppcontrol/spppcontrol.8
index d531de9185b2..8db48bce6496 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 fa902f95232f..e1ddfffe8db9 100644
--- a/sbin/spppcontrol/spppcontrol.c
+++ b/sbin/spppcontrol/spppcontrol.c
@@ -32,10 +32,15 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/callout.h>
#include <sys/ioctl.h>
+#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/if_var.h>
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+#include <net/slcompress.h>
#include <net/if_sppp.h>
#include <err.h>
@@ -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 *