diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-05 19:59:08 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-05 19:59:08 +0000 |
commit | 1bda4c835e2fb1c8a9088f9d1011ae404ab8cd85 (patch) | |
tree | 8324d761b353f64cc150e28c51e96b27c351c0ed /misc.h | |
parent | bd0e2de8e59b4588a45a27c168e70bba95db9969 (diff) |
- stevesk@cvs.openbsd.org 2001/05/19 19:43:57
[misc.c misc.h servconf.c sshd.8 sshd.c]
sshd command-line arguments and configuration file options that
specify time may be expressed using a sequence of the form:
time[qualifier], where time is a positive integer value and qualifier
is one of the following:
<none>,s,m,h,d,w
Examples:
600 600 seconds (10 minutes)
10m 10 minutes
1h30m 1 hour 30 minutes (90 minutes)
ok markus@
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.7 2001/05/11 14:59:56 markus Exp $ */ +/* $OpenBSD: misc.h,v 1.8 2001/05/19 19:43:57 stevesk Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -34,6 +34,30 @@ int a2port(const char *s); char *cleanhostname(char *host); char *colon(char *cp); +/* + * Convert a time string into seconds; format is + * a sequence of: + * time[qualifier] + * + * Valid time qualifiers are: + * <none> seconds + * s|S seconds + * m|M minutes + * h|H hours + * d|D days + * w|W weeks + * + * Examples: + * 90m 90 minutes + * 1h30m 90 minutes + * 2d 2 days + * 1w 1 week + * + * Return -1 if time string is invalid. + */ + +long convtime(const char *s); + /* function to assist building execv() arguments */ typedef struct arglist arglist; struct arglist { |