Annotation of src/usr.bin/ssh/channels.h, Revision 1.5
1.5 ! deraadt 1: /* RCSID("$Id: channels.h,v 1.4 1999/10/28 21:26:09 markus Exp $"); */
1.2 markus 2:
1.1 markus 3: #ifndef CHANNELS_H
4: #define CHANNELS_H
5:
6: /* Definitions for channel types. */
1.5 ! deraadt 7: #define SSH_CHANNEL_FREE 0 /* This channel is free
! 8: * (unused). */
! 9: #define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11
! 10: * conn. */
! 11: #define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */
! 12: #define SSH_CHANNEL_OPENING 3 /* waiting for confirmation */
! 13: #define SSH_CHANNEL_OPEN 4 /* normal open two-way channel */
! 14: #define SSH_CHANNEL_CLOSED 5 /* waiting for close
! 15: * confirmation */
1.1 markus 16: /* SSH_CHANNEL_AUTH_FD 6 authentication fd */
1.5 ! deraadt 17: #define SSH_CHANNEL_AUTH_SOCKET 7 /* authentication socket */
1.1 markus 18: /* SSH_CHANNEL_AUTH_SOCKET_FD 8 connection to auth socket */
1.5 ! deraadt 19: #define SSH_CHANNEL_X11_OPEN 9 /* reading first X11 packet */
! 20: #define SSH_CHANNEL_INPUT_DRAINING 10 /* sending remaining data to
! 21: * conn */
! 22: #define SSH_CHANNEL_OUTPUT_DRAINING 11 /* sending remaining data to
! 23: * app */
1.1 markus 24:
25: /* Data structure for channel data. This is iniailized in channel_allocate
26: and cleared in channel_free. */
27:
1.5 ! deraadt 28: typedef struct Channel {
! 29: int type; /* channel type/state */
! 30: int self; /* my own channel identifier */
! 31: int remote_id; /* channel identifier for remote peer */
! 32: /* peer can be reached over encrypted connection, via packet-sent */
! 33: int istate; /* input from channel (state of receive half) */
! 34: int ostate; /* output to channel (state of transmit half) */
! 35: int sock; /* data socket, linked to this channel */
! 36: Buffer input; /* data read from socket, to be sent over
! 37: * encrypted connection */
! 38: Buffer output; /* data received over encrypted connection for
! 39: * send on socket */
! 40: char path[200]; /* path for unix domain sockets, or host name
! 41: * for forwards */
! 42: int listening_port; /* port being listened for forwards */
! 43: int host_port; /* remote port to connect for forwards */
! 44: char *remote_name; /* remote hostname */
! 45: } Channel;
1.1 markus 46: #endif