summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index 7c76a6a72..c242f9011 100644
--- a/misc.h
+++ b/misc.h
@@ -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. */
19struct Forward { 21struct 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
30int forward_equals(const struct Forward *, const struct Forward *); 32int forward_equals(const struct Forward *, const struct Forward *);
33int bind_permitted(int, uid_t);
34int daemonized(void);
31 35
32/* Common server and client forwarding options. */ 36/* Common server and client forwarding options. */
33struct ForwardOptions { 37struct ForwardOptions {
@@ -139,4 +143,8 @@ char *read_passphrase(const char *, int);
139int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); 143int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
140int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); 144int 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 */