No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / external / bsd / openssh / dist / clientloop.h
blob3e5cfa59a5f1496fa1870921d877ccbdf3f780f8
1 /* $NetBSD$ */
2 /* $OpenBSD: clientloop.h,v 1.22 2008/06/12 15:19:17 djm Exp $ */
4 /*
5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7 * All rights reserved
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
16 * Copyright (c) 2001 Markus Friedl. All rights reserved.
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
27 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 #include <termios.h>
41 /* Client side main loop for the interactive session. */
42 int client_loop(int, int, int);
43 void client_x11_get_proto(const char *, const char *, u_int,
44 char **, char **);
45 void client_global_request_reply_fwd(int, u_int32_t, void *);
46 void client_session2_setup(int, int, int, const char *, struct termios *,
47 int, Buffer *, char **);
48 int client_request_tun_fwd(int, int, int);
50 /* Escape filter for protocol 2 sessions */
51 void *client_new_escape_filter_ctx(int);
52 void client_filter_cleanup(int, void *);
53 int client_simple_escape_filter(Channel *, char *, int);
55 /* Global request confirmation callbacks */
56 typedef void global_confirm_cb(int, u_int32_t seq, void *);
57 void client_register_global_confirm(global_confirm_cb *, void *);
59 /* Multiplexing protocol version */
60 #define SSHMUX_VER 2
62 /* Multiplexing control protocol flags */
63 #define SSHMUX_COMMAND_OPEN 1 /* Open new connection */
64 #define SSHMUX_COMMAND_ALIVE_CHECK 2 /* Check master is alive */
65 #define SSHMUX_COMMAND_TERMINATE 3 /* Ask master to exit */
67 #define SSHMUX_FLAG_TTY (1) /* Request tty on open */
68 #define SSHMUX_FLAG_SUBSYS (1<<1) /* Subsystem request on open */
69 #define SSHMUX_FLAG_X11_FWD (1<<2) /* Request X11 forwarding */
70 #define SSHMUX_FLAG_AGENT_FWD (1<<3) /* Request agent forwarding */
72 void muxserver_listen(void);
73 int muxserver_accept_control(void);
74 void muxclient(const char *);