comparison 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
comparison
equal deleted inserted replaced
6:ab00ef513e97 7:425ed5c20157
1 #include "includes.h" 1 #include "includes.h"
2 #include "session.h" 2 #include "session.h"
3 #include "dbutil.h" 3 #include "dbutil.h"
4 #include "channel.h"
4 #include "localtcpfwd.h" 5 #include "localtcpfwd.h"
5 6
6 #ifndef DISABLE_LOCALTCPFWD 7 #ifndef DISABLE_LOCALTCPFWD
8 static int newtcpdirect(struct Channel * channel);
7 static int newtcp(const char * host, int port); 9 static int newtcp(const char * host, int port);
10
11 const struct ChanType chan_tcpdirect = {
12 0, /* sepfds */
13 "direct-tcpip",
14 newtcpdirect, /* init */
15 NULL, /* checkclose */
16 NULL, /* reqhandler */
17 NULL /* closehandler */
18 };
19
20
8 21
9 /* Called upon creating a new direct tcp channel (ie we connect out to an 22 /* Called upon creating a new direct tcp channel (ie we connect out to an
10 * address */ 23 * address */
11 int newtcpdirect(struct Channel * channel) { 24 static int newtcpdirect(struct Channel * channel) {
12 25
13 unsigned char* desthost = NULL; 26 unsigned char* desthost = NULL;
14 unsigned int destport; 27 unsigned int destport;
15 unsigned char* orighost = NULL; 28 unsigned char* orighost = NULL;
16 unsigned int origport; 29 unsigned int origport;