comparison cli-chansession.c @ 564:fad3eb63b907

- Move netcat struct to where it stays in scope.
author Matt Johnston <matt@ucc.asn.au>
date Tue, 25 Aug 2009 05:24:18 +0000
parents 52d7301e46bd
children 6b9d12477953
comparison
equal deleted inserted replaced
561:541ebf5bf0f6 564:fad3eb63b907
379 return 0; /* Success */ 379 return 0; /* Success */
380 } 380 }
381 381
382 #ifdef ENABLE_CLI_NETCAT 382 #ifdef ENABLE_CLI_NETCAT
383 383
384 const struct ChanType cli_chan_netcat = {
385 0, /* sepfds */
386 "direct-tcpip",
387 cli_init_stdpipe_sess, /* inithandler */
388 NULL,
389 NULL,
390 cli_closechansess
391 };
392
384 void cli_send_netcat_request() { 393 void cli_send_netcat_request() {
385 394
386 const unsigned char* source_host = "127.0.0.1"; 395 const unsigned char* source_host = "127.0.0.1";
387 const int source_port = 22; 396 const int source_port = 22;
388
389 const struct ChanType cli_chan_netcat = {
390 0, /* sepfds */
391 "direct-tcpip",
392 cli_init_stdpipe_sess, /* inithandler */
393 NULL,
394 NULL,
395 cli_closechansess
396 };
397 397
398 cli_opts.wantpty = 0; 398 cli_opts.wantpty = 0;
399 399
400 if (send_msg_channel_open_init(STDIN_FILENO, &cli_chan_netcat) 400 if (send_msg_channel_open_init(STDIN_FILENO, &cli_chan_netcat)
401 == DROPBEAR_FAILURE) { 401 == DROPBEAR_FAILURE) {