clientloop.h revision 146998
1229997Sken/*	$OpenBSD: clientloop.h,v 1.12 2004/11/07 00:01:46 djm Exp $	*/
2229997Sken
3229997Sken/*
4232604Strasz * Author: Tatu Ylonen <ylo@cs.hut.fi>
5229997Sken * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6229997Sken *                    All rights reserved
7232604Strasz *
8232604Strasz * As far as I am concerned, the code I have written for this software
9232604Strasz * can be used freely for any purpose.  Any derived versions of this
10229997Sken * software must be clearly marked as such, and if the derived work is
11229997Sken * incompatible with the protocol description in the RFC file, it must be
12229997Sken * called by a name other than "ssh" or "Secure Shell".
13229997Sken */
14229997Sken/*
15229997Sken * Copyright (c) 2001 Markus Friedl.  All rights reserved.
16229997Sken *
17229997Sken * Redistribution and use in source and binary forms, with or without
18229997Sken * modification, are permitted provided that the following conditions
19229997Sken * are met:
20229997Sken * 1. Redistributions of source code must retain the above copyright
21229997Sken *    notice, this list of conditions and the following disclaimer.
22229997Sken * 2. Redistributions in binary form must reproduce the above copyright
23229997Sken *    notice, this list of conditions and the following disclaimer in the
24229997Sken *    documentation and/or other materials provided with the distribution.
25229997Sken *
26229997Sken * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27229997Sken * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28229997Sken * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29229997Sken * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30229997Sken * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31229997Sken * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32229997Sken * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33229997Sken * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34229997Sken * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35229997Sken * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36229997Sken */
37229997Sken
38229997Sken/* Client side main loop for the interactive session. */
39229997Skenint	 client_loop(int, int, int);
40229997Skenvoid	 client_global_request_reply_fwd(int, u_int32_t, void *);
41229997Skenvoid	 client_session2_setup(int, int, int, const char *, struct termios *,
42229997Sken	    int, Buffer *, char **, dispatch_fn *);
43229997Sken
44229997Sken/* Multiplexing control protocol flags */
45229997Sken#define SSHMUX_COMMAND_OPEN		1	/* Open new connection */
46229997Sken#define SSHMUX_COMMAND_ALIVE_CHECK	2	/* Check master is alive */
47229997Sken#define SSHMUX_COMMAND_TERMINATE	3	/* Ask master to exit */
48229997Sken
49229997Sken#define SSHMUX_FLAG_TTY			(1)	/* Request tty on open */
50249328Strasz#define SSHMUX_FLAG_SUBSYS		(1<<1)	/* Subsystem request on open */
51229997Sken