client.h 2.09 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1
2
/* client.h
 *
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 *
 *
 * $Id$ */

/* lsh, an implementation of the ssh protocol
 *
 * Copyright (C) 1998 Niels Möller
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
J.H.M. Dassen's avatar
J.H.M. Dassen committed
23
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Niels Möller's avatar
Niels Möller committed
24
25
26
27
28
 */

#ifndef LSH_CLIENT_H_INCLUDED
#define LSH_CLIENT_H_INCLUDED

29
#include "channel_commands.h"
Niels Möller's avatar
Niels Möller committed
30
#include "io.h"
Niels Möller's avatar
Niels Möller committed
31
#include "keyexchange.h"
Niels Möller's avatar
Niels Möller committed
32

Niels Möller's avatar
Niels Möller committed
33
34
struct request_info;

Niels Möller's avatar
Niels Möller committed
35
36
struct fd_callback *
make_client_callback(struct io_backend *b,
37
		     const char *comment,
Niels Möller's avatar
Niels Möller committed
38
39
40
41
42
43
		     UINT32 block_size,
		     struct randomness *random,
		     struct make_kexinit *init,
		     struct packet_handler *kexinit_handler);

struct read_handler *make_client_read_line(struct ssh_connection *c);
44
struct close_callback *make_client_close_handler(void);
45

Niels Möller's avatar
Niels Möller committed
46
struct packet_handler *
47
make_accept_service_handler(UINT32 service,
48
49
			    struct command_continuation *c,
			    struct exception_handler *e);
50

Niels Möller's avatar
Niels Möller committed
51
struct command *make_request_service(int service);
52

53
54
55
struct channel_request *make_handle_exit_status(int *exit_code);
struct channel_request *make_handle_exit_signal(int *exit_code);

Niels Möller's avatar
Niels Möller committed
56
struct command *make_open_session_command(struct ssh_channel *session);
57

58
59

extern struct channel_request_command request_shell;
60
61
#define REQUEST_SHELL (&request_shell.super.super)

62
extern struct command client_io;
63
#define CLIENT_START_IO (&client_io.super)
64

65
66
67
struct ssh_channel *make_client_session(struct lsh_fd *in,
					struct lsh_fd *out,
					struct lsh_fd *err,
68
69
					UINT32 max_window,
					int *exit_status);
Niels Möller's avatar
Niels Möller committed
70
71

     
Niels Möller's avatar
Niels Möller committed
72
#endif /* LSH_CLIENT_H_INCLUDED */