version 1.85, 2001/01/29 12:36:10 |
version 1.86, 2001/01/31 20:37:23 |
|
|
void |
void |
ssh_init_forwarding(void) |
ssh_init_forwarding(void) |
{ |
{ |
|
int success = 0; |
int i; |
int i; |
|
|
/* Initiate local TCP/IP port forwardings. */ |
/* Initiate local TCP/IP port forwardings. */ |
for (i = 0; i < options.num_local_forwards; i++) { |
for (i = 0; i < options.num_local_forwards; i++) { |
debug("Connections to local port %d forwarded to remote address %.200s:%d", |
debug("Connections to local port %d forwarded to remote address %.200s:%d", |
options.local_forwards[i].port, |
options.local_forwards[i].port, |
options.local_forwards[i].host, |
options.local_forwards[i].host, |
options.local_forwards[i].host_port); |
options.local_forwards[i].host_port); |
channel_request_local_forwarding( |
success += channel_request_local_forwarding( |
options.local_forwards[i].port, |
options.local_forwards[i].port, |
options.local_forwards[i].host, |
options.local_forwards[i].host, |
options.local_forwards[i].host_port, |
options.local_forwards[i].host_port, |
options.gateway_ports); |
options.gateway_ports); |
} |
} |
|
if (i > 0 && success == 0) |
|
error("Could not request local forwarding."); |
|
|
/* Initiate remote TCP/IP port forwardings. */ |
/* Initiate remote TCP/IP port forwardings. */ |
for (i = 0; i < options.num_remote_forwards; i++) { |
for (i = 0; i < options.num_remote_forwards; i++) { |