Mercurial > dropbear
comparison cli-chansession.c @ 565:1929bbe3fa84
merge of '0d7a9127af37d6e74efc5ec031a7001ce63d334d'
and 'e35cd321b6d4fab6ad854827249f610da3bb6878'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 25 Aug 2009 11:11:35 +0000 |
parents | fad3eb63b907 |
children | 6b9d12477953 |
comparison
equal
deleted
inserted
replaced
563:12fc5b342dc0 | 565:1929bbe3fa84 |
---|---|
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) { |