comparison cli-tcpfwd.c @ 1032:0da8ba489c23 fastopen

Move generic network routines to netio.c
author Matt Johnston <matt@ucc.asn.au>
date Fri, 20 Feb 2015 23:16:38 +0800
parents 02baa0b334e8
children c45d65392c1a
comparison
equal deleted inserted replaced
1031:64c0aa01e2b6 1032:0da8ba489c23
28 #include "tcpfwd.h" 28 #include "tcpfwd.h"
29 #include "channel.h" 29 #include "channel.h"
30 #include "runopts.h" 30 #include "runopts.h"
31 #include "session.h" 31 #include "session.h"
32 #include "ssh.h" 32 #include "ssh.h"
33 #include "netio.h"
33 34
34 #ifdef ENABLE_CLI_REMOTETCPFWD 35 #ifdef ENABLE_CLI_REMOTETCPFWD
35 static int newtcpforwarded(struct Channel * channel); 36 static int newtcpforwarded(struct Channel * channel);
36 37
37 const struct ChanType cli_chan_tcpremote = { 38 const struct ChanType cli_chan_tcpremote = {
213 char *origaddr = NULL; 214 char *origaddr = NULL;
214 unsigned int origport; 215 unsigned int origport;
215 m_list_elem * iter = NULL; 216 m_list_elem * iter = NULL;
216 struct TCPFwdEntry *fwd; 217 struct TCPFwdEntry *fwd;
217 char portstring[NI_MAXSERV]; 218 char portstring[NI_MAXSERV];
218 int sock;
219 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; 219 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
220 220
221 origaddr = buf_getstring(ses.payload, NULL); 221 origaddr = buf_getstring(ses.payload, NULL);
222 origport = buf_getint(ses.payload); 222 origport = buf_getint(ses.payload);
223 223