Hello, I built the latest sources from libssh2 git repo, and am trying to use/modify the subsystem_netconf example, to work with a Netconf server. As soon as the first [hello] message is exchanged , I see that the other end says "session closed". I tried to debug why this happens, I added the check if (libssh2_channel_eof(channel)) {... } But the channel isn't closed (this if check is not hit)
I also enabled the traces, libssh2_trace(session, LIBSSH2_TRACE_SOCKET|LIBSSH2_TRACE_TRANS); but its printing a lot of stuff which I am don't fully understand, but seems like the session is still on : [libssh2] 32.717473 Socket: Recved 80/16384 bytes to 0x55cd21adbf58+0 => libssh2_transport_read() raw (80 bytes) 0000: EE 48 F6 04 26 D0 69 1D 0E 06 76 25 3D C3 4E 04 : .H..&.i...v%=.N. 0010: 18 91 2B FD A8 FD 2D 89 85 80 D4 F7 30 C3 08 DE : ..+...-.....0... 0020: 83 49 46 08 3D A1 1B AB 06 84 FC 49 B4 6E 2A E2 : .IF.=......I.n*. 0030: DB 0C 97 EF 4C 8F EF B1 B8 56 C2 81 88 32 F5 F6 : ....L....V...2.. 0040: 72 FF 6F 5C 33 2C F0 EC B9 85 1B 49 C0 E3 7C F0 : r.o\3,.....I..|. => libssh2_transport_read() plain (27 bytes) 0000: 50 00 00 00 15 6B 65 65 70 61 6C 69 76 65 40 65 : P....keepalive@e 0010: 78 61 6D 70 6C 65 2E 63 6F 6D 01 : xample.com. [libssh2] 32.717525 Transport: Packet type 80 received, length=27 => libssh2_transport_write plain (1 bytes) 0000: 52 : R [libssh2] 32.717561 Socket: Sent 48/48 bytes at 0x55cd21adff98 => libssh2_transport_write send() (48 bytes) 0000: CF A4 2E 33 7F EB 86 FD 9B 7D 4A DF B1 8D D0 D9 : ...3.....}J..... 0010: 89 2D 61 B2 A3 58 64 57 4D 56 66 2E 74 96 05 EE : .-a..XdWMVf.t... 0020: 19 3F AE FF 62 1B 5F 86 15 DF 4B 86 5A 68 F7 7F : .?..b._...K.Zh.. My question is - is this concept of _subsystem_ (or creating a _process_ in general) only meant for a single message exchange ? In case of Netconf, unless I send a <rpc message-id="0"... > <close-session/> </rpc> the session should not be closed. So, should I bunch this up with my initial message? Thanks. -- Regards, Ani _______________________________________________ libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel