diff options
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.57 2016/07/15 00:24:30 djm Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.61 2016/11/30 00:28:31 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -15,6 +15,8 @@ | |||
15 | #ifndef _MISC_H | 15 | #ifndef _MISC_H |
16 | #define _MISC_H | 16 | #define _MISC_H |
17 | 17 | ||
18 | #include <sys/time.h> | ||
19 | |||
18 | /* Data structure for representing a forwarding request. */ | 20 | /* Data structure for representing a forwarding request. */ |
19 | struct Forward { | 21 | struct Forward { |
20 | char *listen_host; /* Host (address) to listen on. */ | 22 | char *listen_host; /* Host (address) to listen on. */ |
@@ -28,6 +30,8 @@ struct Forward { | |||
28 | }; | 30 | }; |
29 | 31 | ||
30 | int forward_equals(const struct Forward *, const struct Forward *); | 32 | int forward_equals(const struct Forward *, const struct Forward *); |
33 | int bind_permitted(int, uid_t); | ||
34 | int daemonized(void); | ||
31 | 35 | ||
32 | /* Common server and client forwarding options. */ | 36 | /* Common server and client forwarding options. */ |
33 | struct ForwardOptions { | 37 | struct ForwardOptions { |
@@ -141,4 +145,8 @@ int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); | |||
141 | 145 | ||
142 | int secure_permissions(struct stat *st, uid_t uid); | 146 | int secure_permissions(struct stat *st, uid_t uid); |
143 | 147 | ||
148 | #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) | ||
149 | #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) | ||
150 | #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) | ||
151 | |||
144 | #endif /* _MISC_H */ | 152 | #endif /* _MISC_H */ |