diff options
author | 2005-12-08 18:34:10 +0000 | |
---|---|---|
committer | 2005-12-08 18:34:10 +0000 | |
commit | 0e3ade45df73f17ffeabbcc3b5ab978fa5b57c53 (patch) | |
tree | 1107d285006040de3f8af472d5bd884c3c7451d9 /usr.bin/ssh/misc.h | |
parent | Missing #include <limits.h> (diff) | |
download | wireguard-openbsd-0e3ade45df73f17ffeabbcc3b5ab978fa5b57c53.tar.xz wireguard-openbsd-0e3ade45df73f17ffeabbcc3b5ab978fa5b57c53.zip |
two changes to the new ssh tunnel support. this breaks compatibility
with the initial commit but is required for a portable approach.
- make the tunnel id u_int and platform friendly, use predefined types.
- support configuration of layer 2 (ethernet) or layer 3
(point-to-point, default) modes. configuration is done using the
Tunnel (yes|point-to-point|ethernet|no) option is ssh_config(5) and
restricted by the PermitTunnel (yes|point-to-point|ethernet|no) option
in sshd_config(5).
ok djm@, man page bits by jmc@
Diffstat (limited to 'usr.bin/ssh/misc.h')
-rw-r--r-- | usr.bin/ssh/misc.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/ssh/misc.h b/usr.bin/ssh/misc.h index ff2ba1b5a7a..41591068695 100644 --- a/usr.bin/ssh/misc.h +++ b/usr.bin/ssh/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.27 2005/12/06 22:38:27 reyk Exp $ */ +/* $OpenBSD: misc.h,v 1.28 2005/12/08 18:34:11 reyk Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -50,4 +50,16 @@ void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); char *read_passphrase(const char *, int); int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); -int tun_open(int); + +int tun_open(int, int); + +/* Common definitions for ssh tunnel device forwarding */ +#define SSH_TUNMODE_NO 0x00 +#define SSH_TUNMODE_POINTOPOINT 0x01 +#define SSH_TUNMODE_ETHERNET 0x02 +#define SSH_TUNMODE_DEFAULT SSH_TUNMODE_POINTOPOINT +#define SSH_TUNMODE_YES (SSH_TUNMODE_POINTOPOINT|SSH_TUNMODE_ETHERNET) + +#define SSH_TUNID_ANY 0x7fffffff +#define SSH_TUNID_ERR (SSH_TUNID_ANY - 1) +#define SSH_TUNID_MAX (SSH_TUNID_ANY - 2) |