Yes, you are right, that is what the patch is doing. We had no problem with 
callbacks on data reception. 

----- Mail original -----
De: "Joao Pedro Almeida Pereira" <joao.alme...@blue-tc.com> 
À: "libssh" <libssh@libssh.org> 
Envoyé: Jeudi 3 Avril 2014 12:22:11 
Objet: Re: Questions about channels 


Hello, 
Looked at the patch that is not what i want. 
I am not using the server. 
What i do is: 
1 - Create a session 
2 - create a forwarding channel 
3 - set the callback 
4 - leave this method 


After that what i need is when a packet arrives to the forwarding channel, from 
the server, i want to be awaken to do some work. 


>From what i see in the patch it will add callbacks to the server to act upon 
>an arrival of request of forward tunnel. 




BR 



On 3 April 2014 11:48, Christophe Grosjean < christophe.grosj...@wallix.com > 
wrote: 




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. 


De: "Joao Pedro Almeida Pereira" < joao.alme...@blue-tc.com > 
À: "libssh" < libssh@libssh.org > 
Envoyé: Jeudi 3 Avril 2014 10:34:15 
Objet: Questions about channels 




Hello, 
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_callbacks_init(channel_cb); 
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. 


BR 
-- 
----- 
-------- 
João Pereira 


Email: joao.alme...@blue-tc.com 
Web: http://www.bluetc.es 



-- 

-- 
----- 
-------- 
João Pereira 


Email: joao.alme...@blue-tc.com 
Web: http://www.bluetc.es

Reply via email to