diff options
author | green <green@FreeBSD.org> | 1999-07-22 21:42:49 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-07-22 21:42:49 +0000 |
commit | b7d77d59f2ba9fe4a56e118f28b7995b1da1c2a4 (patch) | |
tree | 1e151c262ebcaf29bcb9c0da686c44844520a6c4 /usr.sbin/inetd | |
parent | 14839d0b22c344097dd7d0d16d1653c97ead8969 (diff) | |
download | FreeBSD-src-b7d77d59f2ba9fe4a56e118f28b7995b1da1c2a4.zip FreeBSD-src-b7d77d59f2ba9fe4a56e118f28b7995b1da1c2a4.tar.gz |
"knobs are cheap". Here's a -t timeout option for the internal ident
service. It takes a number (w/ or w/out .usec) as an argument.
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r-- | usr.sbin/inetd/builtins.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c index 6259632..088cbab 100644 --- a/usr.sbin/inetd/builtins.c +++ b/usr.sbin/inetd/builtins.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: builtins.c,v 1.2 1999/07/22 21:11:40 green Exp $ * */ @@ -319,7 +319,7 @@ ident_stream(s, sep) /* Ident service */ for (av = sep->se_argv; *av; av++) argc++; if (argc) { - while ((c = getopt(argc, sep->se_argv, "fro:")) != -1) + while ((c = getopt(argc, sep->se_argv, "fro:t:")) != -1) switch (c) { case 'f': fflag = 1; @@ -330,6 +330,22 @@ ident_stream(s, sep) /* Ident service */ case 'o': osname = optarg; break; + case 't': + do { + int sec, usec; + + switch (sscanf(optarg, "%d.%d", &sec, + &usec)) { + case 1: + tv.tv_sec = sec; + break; + case 2: + tv.tv_usec = usec; + break; + default: + break; + } + } while (0); default: break; } |