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 { |
@@ -139,4 +143,8 @@ char *read_passphrase(const char *, int); | |||
139 | int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); | 143 | int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); |
140 | int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); | 144 | int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); |
141 | 145 | ||
146 | #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) | ||
147 | #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) | ||
148 | #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) | ||
149 | |||
142 | #endif /* _MISC_H */ | 150 | #endif /* _MISC_H */ |