diff options
Diffstat (limited to 'usr/src/cmd/ssh/include')
-rw-r--r-- | usr/src/cmd/ssh/include/channels.h | 39 | ||||
-rw-r--r-- | usr/src/cmd/ssh/include/compat.h | 29 | ||||
-rw-r--r-- | usr/src/cmd/ssh/include/misc.h | 1 | ||||
-rw-r--r-- | usr/src/cmd/ssh/include/readconf.h | 14 |
4 files changed, 46 insertions, 37 deletions
diff --git a/usr/src/cmd/ssh/include/channels.h b/usr/src/cmd/ssh/include/channels.h index 449f7a6640..408f819d7f 100644 --- a/usr/src/cmd/ssh/include/channels.h +++ b/usr/src/cmd/ssh/include/channels.h @@ -1,20 +1,4 @@ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ -/* $OpenBSD: channels.h,v 1.70 2002/06/24 14:33:27 markus Exp $ */ - -#ifndef _CHANNELS_H -#define _CHANNELS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - - -/* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -48,6 +32,21 @@ extern "C" { * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ +/* $OpenBSD: channels.h,v 1.70 2002/06/24 14:33:27 markus Exp $ */ + + +#ifndef _CHANNELS_H +#define _CHANNELS_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif #include "buffer.h" @@ -216,9 +215,13 @@ void channel_clear_permitted_opens(void); void channel_input_port_forward_request(int, int); int channel_connect_to(const char *, u_short); int channel_connect_by_listen_address(u_short); -void channel_request_remote_forwarding(u_short, const char *, u_short); -int channel_setup_local_fwd_listener(u_short, const char *, u_short, int); +int channel_request_remote_forwarding(const char *, u_short, + const char *, u_short); +int channel_setup_local_fwd_listener(const char *, u_short, + const char *, u_short, int); +void channel_request_rforward_cancel(const char *host, u_short port); int channel_setup_remote_fwd_listener(const char *, u_short, int); +int channel_cancel_rport_listener(const char *, u_short); /* x11 forwarding */ diff --git a/usr/src/cmd/ssh/include/compat.h b/usr/src/cmd/ssh/include/compat.h index 930bb08956..cd5d056f94 100644 --- a/usr/src/cmd/ssh/include/compat.h +++ b/usr/src/cmd/ssh/include/compat.h @@ -1,15 +1,3 @@ -/* $OpenBSD: compat.h,v 1.33 2002/09/27 10:42:09 mickey Exp $ */ - -#ifndef _COMPAT_H -#define _COMPAT_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - - /* * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * @@ -38,6 +26,18 @@ extern "C" { * Use is subject to license terms. */ +#ifndef _COMPAT_H +#define _COMPAT_H + +/* $OpenBSD: compat.h,v 1.33 2002/09/27 10:42:09 mickey Exp $ */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + + #define SSH_PROTO_UNKNOWN 0x00 #define SSH_PROTO_1 0x01 #define SSH_PROTO_1_PREFERRED 0x02 @@ -62,6 +62,7 @@ extern "C" { #define SSH_BUG_HBSERVICE 0x00010000 #define SSH_BUG_OPENFAILURE 0x00020000 #define SSH_BUG_DERIVEKEY 0x00040000 +/*#define this is free slot 0x00080000 */ #define SSH_BUG_DUMMYCHAN 0x00100000 #define SSH_BUG_EXTEOF 0x00200000 #define SSH_BUG_K5USER 0x00400000 @@ -70,8 +71,10 @@ extern "C" { #define SSH_OLD_GSSAPI 0x02000000 #define SSH_BUG_GSSAPI_BER 0x04000000 #define SSH_BUG_FIRSTKEX 0x08000000 - +#define SSH_BUG_RFWD_ADDR 0x10000000 #define SSH_BUG_GSSKEX_HOSTKEY 0x20000000 +/* SSH_OLD_FORWARD_ADDR flag bumped up the SunSSH version to 1.2 */ +#define SSH_OLD_FORWARD_ADDR 0x40000000 void enable_compat13(void); void enable_compat20(void); diff --git a/usr/src/cmd/ssh/include/misc.h b/usr/src/cmd/ssh/include/misc.h index 205e88f697..16f2210291 100644 --- a/usr/src/cmd/ssh/include/misc.h +++ b/usr/src/cmd/ssh/include/misc.h @@ -32,6 +32,7 @@ void unset_nonblock(int); void set_nodelay(int); int a2port(const char *); char *cleanhostname(char *); +char *hpdelim(char **); char *colon(char *); long convtime(const char *); char *tohex(const void *, size_t); diff --git a/usr/src/cmd/ssh/include/readconf.h b/usr/src/cmd/ssh/include/readconf.h index c5257a2922..3d1fe7b211 100644 --- a/usr/src/cmd/ssh/include/readconf.h +++ b/usr/src/cmd/ssh/include/readconf.h @@ -38,9 +38,10 @@ extern "C" { /* Data structure for representing a forwarding request. */ typedef struct { - u_short port; /* Port to forward. */ - char *host; /* Host to connect. */ - u_short host_port; /* Port to connect on host. */ + char *listen_host; /* Host (address) to listen on. */ + u_short listen_port; /* Port to forward. */ + char *connect_host; /* Host to connect. */ + u_short connect_port; /* Port to connect on connect_host. */ } Forward; /* Data structure for representing option data. */ @@ -160,14 +161,15 @@ typedef struct { void initialize_options(Options *); void fill_default_options(Options *); int read_config_file(const char *, const char *, Options *); +int parse_forward(int, Forward *, const char *); int process_config_line(Options *, const char *, char *, const char *, int, int *); -void add_local_forward(Options *, u_short, const char *, u_short); -void add_remote_forward(Options *, u_short, const char *, u_short); +void add_local_forward(Options *, const Forward *); +void add_remote_forward(Options *, const Forward *); -void process_unknown_options(Options *options); +void process_unknown_options(Options *); #ifdef __cplusplus } |