version 1.9.2.1, 2016/08/06 00:18:38 |
version 1.9.2.2, 2017/01/07 08:53:42 |
|
|
/* $NetBSD$ */ |
/* $NetBSD$ */ |
/* $OpenBSD: misc.h,v 1.57 2016/07/15 00:24:30 djm Exp $ */ |
/* $OpenBSD: misc.h,v 1.61 2016/11/30 00:28:31 dtucker Exp $ */ |
|
|
/* |
/* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
|
|
#ifndef _MISC_H |
#ifndef _MISC_H |
#define _MISC_H |
#define _MISC_H |
|
|
|
#include <sys/time.h> |
|
|
/* Data structure for representing a forwarding request. */ |
/* Data structure for representing a forwarding request. */ |
struct Forward { |
struct Forward { |
char *listen_host; /* Host (address) to listen on. */ |
char *listen_host; /* Host (address) to listen on. */ |
|
|
}; |
}; |
|
|
int forward_equals(const struct Forward *, const struct Forward *); |
int forward_equals(const struct Forward *, const struct Forward *); |
|
int bind_permitted(int, uid_t); |
|
int daemonized(void); |
|
|
/* Common server and client forwarding options. */ |
/* Common server and client forwarding options. */ |
struct ForwardOptions { |
struct ForwardOptions { |
Line 146 char *read_passphrase(const char *, int) |
|
Line 150 char *read_passphrase(const char *, int) |
|
int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); |
int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); |
int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); |
int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); |
|
|
|
#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) |
|
#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) |
|
#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) |
|
|
#endif /* _MISC_H */ |
#endif /* _MISC_H */ |