Mercurial > dropbear
comparison tcp-accept.c @ 64:efb5e0b335cf
TCP forwarding works.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 12 Aug 2004 13:48:42 +0000 |
parents | dcc43965928f |
children | 02e4a7f614f8 |
comparison
equal
deleted
inserted
replaced
63:dcc43965928f | 64:efb5e0b335cf |
---|---|
1 #include "includes.h" | 1 #include "includes.h" |
2 #include "ssh.h" | 2 #include "ssh.h" |
3 #include "tcp-accept.h" | 3 #include "tcpfwd.h" |
4 #include "dbutil.h" | 4 #include "dbutil.h" |
5 #include "session.h" | 5 #include "session.h" |
6 #include "buffer.h" | 6 #include "buffer.h" |
7 #include "packet.h" | 7 #include "packet.h" |
8 #include "listener.h" | 8 #include "listener.h" |
65 char* errstring = NULL; | 65 char* errstring = NULL; |
66 | 66 |
67 TRACE(("enter listen_tcpfwd")); | 67 TRACE(("enter listen_tcpfwd")); |
68 | 68 |
69 /* first we try to bind, so don't need to do so much cleanup on failure */ | 69 /* first we try to bind, so don't need to do so much cleanup on failure */ |
70 snprintf(portstring, sizeof(portstring), "%d", tcpinfo->sendport); | 70 snprintf(portstring, sizeof(portstring), "%d", tcpinfo->listenport); |
71 | 71 |
72 /* XXX Note: we're just listening on localhost, no matter what they tell | 72 /* XXX Note: we're just listening on localhost, no matter what they tell |
73 * us. If someone wants to make it listen otherways, then change | 73 * us. If someone wants to make it listen otherways, then change |
74 * the "" argument. but that requires UI changes too */ | 74 * the "" argument. but that requires UI changes too */ |
75 nsocks = dropbear_listen("", portstring, socks, | 75 nsocks = dropbear_listen("", portstring, socks, |