]> andersk Git - openssh.git/blobdiff - channels.h
- markus@cvs.openbsd.org 2001/05/04 23:47:34
[openssh.git] / channels.h
index bf70a8f215b6bd8691011058a205d7e8813242a7..6739b2214db22a94f7ffe45103f7b6cb3cde7328 100644 (file)
@@ -32,7 +32,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* RCSID("$OpenBSD: channels.h,v 1.31 2001/04/13 22:46:53 beck Exp $"); */
+/* RCSID("$OpenBSD: channels.h,v 1.32 2001/05/04 23:47:33 markus Exp $"); */
 
 #ifndef CHANNELS_H
 #define CHANNELS_H
@@ -40,7 +40,6 @@
 #include "buffer.h"
 
 /* Definitions for channel types. */
-#define SSH_CHANNEL_FREE               0       /* This channel is free (unused). */
 #define SSH_CHANNEL_X11_LISTENER       1       /* Listening for inet X11 conn. */
 #define SSH_CHANNEL_PORT_LISTENER      2       /* Listening on a port. */
 #define SSH_CHANNEL_OPENING            3       /* waiting for confirmation */
 #define SSH_CHANNEL_DYNAMIC            13
 #define SSH_CHANNEL_MAX_TYPE           14
 
+#define SSH_CHANNEL_PATH_LEN           30
+
 /*
- * Data structure for channel data.  This is iniailized in channel_allocate
+ * Data structure for channel data.  This is initialized in channel_new
  * and cleared in channel_free.
  */
 struct Channel;
@@ -84,8 +85,8 @@ struct Channel {
        Buffer  output;         /* data received over encrypted connection for
                                 * send on socket */
        Buffer  extended;
-       char    path[200];      /* path for unix domain sockets, or host name
-                                * for forwards */
+       char    path[SSH_CHANNEL_PATH_LEN];
+               /* path for unix domain sockets, or host name for forwards */
        int     listening_port; /* port being listened for forwards */
        int     host_port;      /* remote port to connect for forwards */
        char   *remote_name;    /* remote hostname */
@@ -132,10 +133,6 @@ void       channel_register_filter(int id, channel_filter_fn *fn);
 void   channel_cancel_cleanup(int id);
 Channel        *channel_lookup(int id);
 
-int
-channel_new(char *ctype, int type, int rfd, int wfd, int efd,
-    int window, int maxpack, int extended_usage, char *remote_name,
-    int nonblock);
 void
 channel_set_fds(int id, int rfd, int wfd, int efd,
     int extusage, int nonblock);
@@ -162,10 +159,13 @@ void    channel_set_options(int hostname_in_open);
  * must have been allocated with xmalloc; this will free it when the channel
  * is freed.
  */
-int     channel_allocate(int type, int sock, char *remote_name);
+Channel *
+channel_new(char *ctype, int type, int rfd, int wfd, int efd,
+    int window, int maxpack, int extended_usage, char *remote_name,
+    int nonblock);
 
 /* Free the channel and close its socket. */
-void    channel_free(int channel);
+void    channel_free(Channel *c);
 
 /*
  * Allocate/update select bitmasks and add any bits relevant to channels in
This page took 0.038811 seconds and 4 git commands to generate.