15e8dbd04SDag-Erling Smørgrav /* $OpenBSD: clientloop.h,v 1.12 2004/11/07 00:01:46 djm Exp $ */ 21e8db6e2SBrian Feldman 31e8db6e2SBrian Feldman /* 41e8db6e2SBrian Feldman * Author: Tatu Ylonen <ylo@cs.hut.fi> 51e8db6e2SBrian Feldman * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 61e8db6e2SBrian Feldman * All rights reserved 71e8db6e2SBrian Feldman * 81e8db6e2SBrian Feldman * As far as I am concerned, the code I have written for this software 91e8db6e2SBrian Feldman * can be used freely for any purpose. Any derived versions of this 101e8db6e2SBrian Feldman * software must be clearly marked as such, and if the derived work is 111e8db6e2SBrian Feldman * incompatible with the protocol description in the RFC file, it must be 121e8db6e2SBrian Feldman * called by a name other than "ssh" or "Secure Shell". 131e8db6e2SBrian Feldman */ 141e8db6e2SBrian Feldman /* 151e8db6e2SBrian Feldman * Copyright (c) 2001 Markus Friedl. All rights reserved. 161e8db6e2SBrian Feldman * 171e8db6e2SBrian Feldman * Redistribution and use in source and binary forms, with or without 181e8db6e2SBrian Feldman * modification, are permitted provided that the following conditions 191e8db6e2SBrian Feldman * are met: 201e8db6e2SBrian Feldman * 1. Redistributions of source code must retain the above copyright 211e8db6e2SBrian Feldman * notice, this list of conditions and the following disclaimer. 221e8db6e2SBrian Feldman * 2. Redistributions in binary form must reproduce the above copyright 231e8db6e2SBrian Feldman * notice, this list of conditions and the following disclaimer in the 241e8db6e2SBrian Feldman * documentation and/or other materials provided with the distribution. 251e8db6e2SBrian Feldman * 261e8db6e2SBrian Feldman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 271e8db6e2SBrian Feldman * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 281e8db6e2SBrian Feldman * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 291e8db6e2SBrian Feldman * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 301e8db6e2SBrian Feldman * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 311e8db6e2SBrian Feldman * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 321e8db6e2SBrian Feldman * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 331e8db6e2SBrian Feldman * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 341e8db6e2SBrian Feldman * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 351e8db6e2SBrian Feldman * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 361e8db6e2SBrian Feldman */ 371e8db6e2SBrian Feldman 381e8db6e2SBrian Feldman /* Client side main loop for the interactive session. */ 39ae1f160dSDag-Erling Smørgrav int client_loop(int, int, int); 40efcad6b7SDag-Erling Smørgrav void client_global_request_reply_fwd(int, u_int32_t, void *); 41d74d50a8SDag-Erling Smørgrav void client_session2_setup(int, int, int, const char *, struct termios *, 42d74d50a8SDag-Erling Smørgrav int, Buffer *, char **, dispatch_fn *); 435e8dbd04SDag-Erling Smørgrav 445e8dbd04SDag-Erling Smørgrav /* Multiplexing control protocol flags */ 455e8dbd04SDag-Erling Smørgrav #define SSHMUX_COMMAND_OPEN 1 /* Open new connection */ 465e8dbd04SDag-Erling Smørgrav #define SSHMUX_COMMAND_ALIVE_CHECK 2 /* Check master is alive */ 475e8dbd04SDag-Erling Smørgrav #define SSHMUX_COMMAND_TERMINATE 3 /* Ask master to exit */ 485e8dbd04SDag-Erling Smørgrav 495e8dbd04SDag-Erling Smørgrav #define SSHMUX_FLAG_TTY (1) /* Request tty on open */ 505e8dbd04SDag-Erling Smørgrav #define SSHMUX_FLAG_SUBSYS (1<<1) /* Subsystem request on open */ 51