Mercurial > dropbear
diff localtcpfwd.c @ 7:425ed5c20157
Chantype handling is sorted
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 02 Jun 2004 04:59:49 +0000 |
parents | fe6bca95afa7 |
children |
line wrap: on
line diff
--- a/localtcpfwd.c Tue Jun 01 10:48:46 2004 +0000 +++ b/localtcpfwd.c Wed Jun 02 04:59:49 2004 +0000 @@ -1,14 +1,27 @@ #include "includes.h" #include "session.h" #include "dbutil.h" +#include "channel.h" #include "localtcpfwd.h" #ifndef DISABLE_LOCALTCPFWD +static int newtcpdirect(struct Channel * channel); static int newtcp(const char * host, int port); +const struct ChanType chan_tcpdirect = { + 0, /* sepfds */ + "direct-tcpip", + newtcpdirect, /* init */ + NULL, /* checkclose */ + NULL, /* reqhandler */ + NULL /* closehandler */ +}; + + + /* Called upon creating a new direct tcp channel (ie we connect out to an * address */ -int newtcpdirect(struct Channel * channel) { +static int newtcpdirect(struct Channel * channel) { unsigned char* desthost = NULL; unsigned int destport;