[Libssh] Enhancements proposals

Rodolphe Rocca rodolphe.rocca at kabira.fr
Wed Feb 27 19:12:56 CET 2008


Hello,

I've been using libssh quite intensively and I have to say that it works 
quite well, especially since release 0.2.

However I have a few concerns that I would like to see improved in this 
library.

1) It uses too many namespaces. OK, there is no namespace concept in C, 
but ideally function names should all start with the same prefix (ssh_ 
or libssh_).

2) Encryption and transport layers should be independent :
ideally it should be possible to use the encryption layer without having 
to use the transport layer, or at least libssh should provide some 
transport hooks (send/recv function pointers) that developers may use to 
set their own transport functions instead of the ones provided by libssh.

3) ssh_disconnect should not delete the SSH_SESSION : it mixes memory 
management with a connection management which is bad. It just makes 
memory management hard for developers. ssh_disconnect should only free 
SSH_SESSION local data that cannot be reused (like encryption data), but 
options especially should remain attached to the SSH_SESSION, in such a 
way that it should be possible to chain ssh_disconnect and ssh_connect 
on the same SSH_SESSION.

4) I would to see ssh_cleanup renamed to ssh_free but it's just comsmetics

Please tell what you think about that.

Regards,

Rodolphe



More information about the Libssh mailing list