diff options
author | brian <brian@FreeBSD.org> | 2000-07-11 22:11:36 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-07-11 22:11:36 +0000 |
commit | 7bc7c104eeee992d6a92297317b9f35e89e9096c (patch) | |
tree | df8dd7356dce1ca25dbb18c53c87fd96e8dc3265 /usr.sbin/ppp/filter.c | |
parent | a3d0c189ea25a7af3dfab30112f5d8d65e214e1c (diff) | |
download | FreeBSD-src-7bc7c104eeee992d6a92297317b9f35e89e9096c.zip FreeBSD-src-7bc7c104eeee992d6a92297317b9f35e89e9096c.tar.gz |
Allow a ``timeout secs'' filter option to let specific packet types
effect the idle timer in different ways.
Submitted by: Stefan Esser <se@freebsd.org>
With adjustments by me to document the option in the man page and to
give the same semantics for outgoing traffic as incoming.
I made the style more consistent in ip.c - this should really have
been done as a separate commit.
Diffstat (limited to 'usr.sbin/ppp/filter.c')
-rw-r--r-- | usr.sbin/ppp/filter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c index bed986e..3f0293b 100644 --- a/usr.sbin/ppp/filter.c +++ b/usr.sbin/ppp/filter.c @@ -468,6 +468,11 @@ Parse(struct ipcp *ipcp, int argc, char const *const *argv, argv++; } + if (argc >= 2 && strcmp(argv[argc - 2], "timeout") == 0) { + filterdata.timeout = strtoul(argv[argc - 1], NULL, 10); + argc -= 2; + } + val = 1; filterdata.f_proto = proto; @@ -587,6 +592,8 @@ doShowFilter(struct filterent *fp, struct prompt *prompt) if (fp->f_finrst) prompt_Printf(prompt, " finrst"); } + if (fp->timeout != 0) + prompt_Printf(prompt, " timeout %u", fp->timeout); prompt_Printf(prompt, "\n"); } } |