callhome bind with multiple ip
hi ,
client application should bind and listen to three different ip , and should establish the callhome connection with three different netconf server.
current libnetconf2 api [nc_client_ssh_ch_add_bind_listen() api will support to listen on single ip ..
whether any other libnetconf2 api is available to bind and listen with differnt ip ?
so how we can acheive this ?
You are free to call the function repeatedly to add more listening address/port pairs.
As you mentioned we can add more listening address/port pair with nc_client_ssh_ch_add_bind_listen() api .
But how we can provide three different netconf server login details ?
struct nc_session *session = NULL;
nc_client_ssh_ch_set_auth_pref(NC_SSH_AUTH_INTERACTIVE, -1);
nc_client_ssh_ch_set_auth_pref(NC_SSH_AUTH_PUBLICKEY, -1);
nc_client_ssh_ch_set_auth_pref(NC_SSH_AUTH_PASSWORD, 4);
nc_client_ssh_ch_set_auth_hostkey_check_clb(nc_auth_hostkey_check_clb, NULL);
nc_client_ssh_ch_set_auth_password_clb(nc_auth_password_clb, NULL);
nc_client_ssh_ch_set_username(oru_gw_oru_ssh_user.c_str());
I suppose only with that callback, one of the parameters is hostname and based on that you can provide what credentials you want.