T9: ssh_bind_accept version accepting struct sockaddr * and size_t *
Description
Originally reported by migration: https://bugs.libssh.org/T9
socket accept() optionally can be passed with struct sockaddr ** and size//t **, which will then return details about the connected client.
It would be nice to have a similar API for ssh server as well.
something like ssh//bind//accept2(ssh//bind, ssh//session, struct sockaddr **, size//t **)
This can be used for servers that want to be verbose about their connections.
Implementation should be plain simple
int ssh//bind//accept(ssh//bind sshbind, ssh//session session) { return ssh//bind//accept2(sshbind, session, NULL, NULL); }
int ssh//bind//accept(ssh//bind sshbind, ssh//session session, struct sockaddr **claddr, size//t clsize) { / ** Previous implementation of ssh//bind//accept, except for that, accept() will be passed with ** cladde and clsize **/
}
0001-New-API-ssh_bind_accept2.patch
Comments:
migration commented on 2017-06-19 06:44:20 UTC:
On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:
patch added and:
migration commented on 2017-06-19 06:48:46 UTC:
On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:
patch added and:
migration commented on 2017-06-19 06:50:31 UTC:
On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:
patch added and:
migration commented on 2017-06-19 06:52:06 UTC:
On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:
patch added and:
asn commented on 2018-09-04 18:45:27 UTC:
Wouldn't it make more sense to store this in the ssh_session and then retrieve it from there?