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 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.7 2001/05/11 14:59:56 markus Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.8 2001/05/19 19:43:57 stevesk Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -34,6 +34,30 @@ int a2port(const char *s); | |||
34 | char *cleanhostname(char *host); | 34 | char *cleanhostname(char *host); |
35 | char *colon(char *cp); | 35 | char *colon(char *cp); |
36 | 36 | ||
37 | /* | ||
38 | * Convert a time string into seconds; format is | ||
39 | * a sequence of: | ||
40 | * time[qualifier] | ||
41 | * | ||
42 | * Valid time qualifiers are: | ||
43 | * <none> seconds | ||
44 | * s|S seconds | ||
45 | * m|M minutes | ||
46 | * h|H hours | ||
47 | * d|D days | ||
48 | * w|W weeks | ||
49 | * | ||
50 | * Examples: | ||
51 | * 90m 90 minutes | ||
52 | * 1h30m 90 minutes | ||
53 | * 2d 2 days | ||
54 | * 1w 1 week | ||
55 | * | ||
56 | * Return -1 if time string is invalid. | ||
57 | */ | ||
58 | |||
59 | long convtime(const char *s); | ||
60 | |||
37 | /* function to assist building execv() arguments */ | 61 | /* function to assist building execv() arguments */ |
38 | typedef struct arglist arglist; | 62 | typedef struct arglist arglist; |
39 | struct arglist { | 63 | struct arglist { |