[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about channels

I believe we had the same problem as you a few weeks ago. Trouble is there is no callback called to manage forwarded-tcpip (and neither for direct-tcpip). 

Loic Michaux provided a patch to implement missing ssh_channel_open_request_forwarded_tcpip_callback and ssh_channel_open_request_direct_tcpip_callback, because they are not implemented. But it never got to the repository, looks like it has been lost in the void. If you do not find it in the ML archive, I can send it back. 

----- Mail original -----
De: "Joao Pedro Almeida Pereira" <joao.almeida@xxxxxxxxxxx> 
À: "libssh" <libssh@xxxxxxxxxx> 
Envoyé: Jeudi 3 Avril 2014 10:34:15 
Objet: Questions about channels 

I have some questions about the channels and the callbacks. 

1. How many forwarding channels can i use per SSH Connection? 
2. I am trying to use a callback from libssh to tell me when i have some data in the forwarding channel. 
I tried to use the channel_data_function to directly copy from the channels connection to another socket that i have, like in the samplesshd-tty sample. But the call back is not called. i did the following steps: 

struct ssh_channel_callbacks_struct *channel_cb = new struct ssh_channel_callbacks_struct(); 

channel_cb->channel_data_function = &Connection::copy_chan_to_fd; 

channel_cb->userdata = con; 
ssh_set_channel_callbacks(forwarding_channel, channel_cb); 

Am I missing something? 
I dont want to use polling because i am using libevent to handle the application, so i dont want to also use the polling system of libssh. 

João Pereira 

Email: joao.almeida@xxxxxxxxxxx 
Web: http://www.bluetc.es

Re: Questions about channelsJoao Pedro Almeida Pereira <joao.almeida@xxxxxxxxxxx>
Questions about channelsJoao Pedro Almeida Pereira <joao.almeida@xxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org