Set correct hint when connecting to an IP address

libssh now uses a regular expression against destination
hostnames to match numerical IP addresses and set the
appropriate hint.

Patches also add init and finalize code to compile the regexp
This commit is contained in:
Aris Adamantiadis
2009-07-12 23:01:43 +02:00
parent 60c778ad7f
commit 052073c36d
3 changed files with 58 additions and 4 deletions

View File

@@ -625,7 +625,10 @@ int packet_read(SSH_SESSION *session);
int packet_translate(SSH_SESSION *session);
int packet_wait(SSH_SESSION *session,int type,int blocking);
int packet_flush(SSH_SESSION *session, int enforce_blocking);
/* connect.c */
int ssh_regex_init(void);
void ssh_regex_finalize(void);
SSH_SESSION *ssh_session_new();
socket_t ssh_connect_host(SSH_SESSION *session, const char *host,const char
*bind_addr, int port, long timeout, long usec);