diff options
author | Damien Miller <djm@mindrot.org> | 1999-10-27 13:42:43 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-10-27 13:42:43 +1000 |
commit | d4a8b7e34dd619a4debf9a206c81db26d1402ea6 (patch) | |
tree | a47d770a2f790f40d18b0982d4e55fa7cfb1fa3b /channels.h |
Initial revision
Diffstat (limited to 'channels.h')
-rw-r--r-- | channels.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/channels.h b/channels.h new file mode 100644 index 000000000..9794ef50d --- /dev/null +++ b/channels.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* RCSID("$Id: channels.h,v 1.1 1999/10/27 03:42:44 damien Exp $"); */ | ||
2 | |||
3 | #ifndef CHANNELS_H | ||
4 | #define CHANNELS_H | ||
5 | |||
6 | /* Definitions for channel types. */ | ||
7 | #define SSH_CHANNEL_FREE 0 /* This channel is free (unused). */ | ||
8 | #define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11 conn. */ | ||
9 | #define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */ | ||
10 | #define SSH_CHANNEL_OPENING 3 /* waiting for confirmation */ | ||
11 | #define SSH_CHANNEL_OPEN 4 /* normal open two-way channel */ | ||
12 | #define SSH_CHANNEL_CLOSED 5 /* waiting for close confirmation */ | ||
13 | /* SSH_CHANNEL_AUTH_FD 6 authentication fd */ | ||
14 | #define SSH_CHANNEL_AUTH_SOCKET 7 /* authentication socket */ | ||
15 | /* SSH_CHANNEL_AUTH_SOCKET_FD 8 connection to auth socket */ | ||
16 | #define SSH_CHANNEL_X11_OPEN 9 /* reading first X11 packet */ | ||
17 | #define SSH_CHANNEL_INPUT_DRAINING 10 /* sending remaining data to conn */ | ||
18 | #define SSH_CHANNEL_OUTPUT_DRAINING 11 /* sending remaining data to app */ | ||
19 | |||
20 | /* Data structure for channel data. This is iniailized in channel_allocate | ||
21 | and cleared in channel_free. */ | ||
22 | |||
23 | typedef struct Channel | ||
24 | { | ||
25 | int type; /* channel type/state */ | ||
26 | int self; /* my own channel identifier */ | ||
27 | int remote_id; /* channel identifier for remote peer */ | ||
28 | /* peer can be reached over encrypted connection, via packet-sent */ | ||
29 | int istate; | ||
30 | int ostate; | ||
31 | int x11; | ||
32 | int sock; /* data socket, linked to this channel */ | ||
33 | Buffer input; /* data read from socket, to be sent over encrypted connection */ | ||
34 | Buffer output; /* data received over encrypted connection for send on socket */ | ||
35 | char path[200]; /* path for unix domain sockets, or host name for forwards */ | ||
36 | int listening_port; /* port being listened for forwards */ | ||
37 | int host_port; /* remote port to connect for forwards */ | ||
38 | char *remote_name; /* remote hostname */ | ||
39 | } Channel; | ||
40 | |||
41 | #endif | ||