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

Re: missing extern "C" in libssh/socket.h


Hi,

I want to capture the event of a closed connection for a reverse tunnel and
I'm seeing in the logs this when I forcefully close the connection on the
server:

[2019/01/16 11:16:45.558937, 1]  ssh_socket_exception_callback:  Socket
exception callback: 1 (0)
[2019/01/16 11:16:45.561930, 1] ssh_socket_exception_callback:  Socket
error: disconnected

I want to capture that the tunnel connection has been terminated so I will
recreate the connection back to the server.

Since I saw ssh_socket_exception_callback in the log my idea is
using ssh_socket_set_callbacks to handle those events. I've done so but I
still don't get any callback for a close connection.

Is there any easier way to monitor the state of a reverse tunnel?

thanks

On Wed, Jan 16, 2019 at 9:45 AM Aris Adamantiadis <aris@xxxxxxxxxxxx> wrote:

> On 16/01/2019 18:41, Andreas Schneider wrote:
> > On Wednesday, January 16, 2019 6:37:39 PM CET Alberto Garcia wrote:
> >> Sorry, I didn't understand the answer. Can you clarify?
> > I don't think the "extern C" is needed at all, only in the public header
> files
> > which might be included by C++ project.
> >
> The confusion might come from the fact that there's no obvious
> difference between the "public" and "private" headers from the source
> code perspective. I don't know if it's something we should change though.
>
>
> Aris
>
>
>

-- 
Alberto García Illera

GPG Public Key <https://goo.gl/yshdwh>

References:
missing extern "C" in libssh/socket.hAlberto Garcia <agarciaillera@xxxxxxxxx>
Re: missing extern "C" in libssh/socket.hAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: missing extern "C" in libssh/socket.hAlberto Garcia <agarciaillera@xxxxxxxxx>
Re: missing extern "C" in libssh/socket.hAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: missing extern "C" in libssh/socket.hAris Adamantiadis <aris@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org