Mercurial > gftp.yaz
diff lib/gftp.h @ 952:a490d94a5b8e
2008-03-28 Brian Masney <masneyb@gftp.org>
* lib/Makefile.am lib/misc.c lib/socket-connect.c
lib/socket-connect-getaddrinfo.c lib/socket-connect-gethostbyname.c
lib/sockutils.c lib/gftp.h - cleaned up more of the socket functions
and split them up into their own files. Cleanups and bug fixes to the
DNS lookup code.
author | masneyb |
---|---|
date | Fri, 28 Mar 2008 11:44:36 +0000 |
parents | c7d7a081cd9c |
children | 63555c9744c2 |
line wrap: on
line diff
--- a/lib/gftp.h Sat Mar 08 11:36:14 2008 +0000 +++ b/lib/gftp.h Fri Mar 28 11:44:36 2008 +0000 @@ -385,10 +385,8 @@ int wakeup_main_thread[2]; /* FD that gets written to by the threads to wakeup the parent */ -#if defined (HAVE_GETADDRINFO) && defined (HAVE_GAI_STRERROR) void *remote_addr; size_t remote_addr_len; -#endif int ai_family; int server_type; /* The type of server we are connected to. @@ -1010,15 +1008,6 @@ void (*update_func) ( gftp_transfer * transfer )); -struct hostent *r_gethostbyname ( const char *name, - struct hostent *result_buf, - int *h_errnop ); - -struct servent *r_getservbyname ( const char *name, - const char *proto, - /*@out@*/ struct servent *result_buf, - int *h_errnop ); - int gftp_set_config_options ( gftp_request * request ); void print_file_list ( GList * list ); @@ -1094,6 +1083,29 @@ char *proxy_hostname, unsigned int proxy_port ); +/* socket-connect-getaddrinfo.c */ +struct addrinfo * lookup_host_with_getaddrinfo + ( gftp_request *request, + char *service, + char *proxy_hostname, + int proxy_port ); + +int gftp_connect_server_with_getaddrinfo + ( gftp_request * request, + char *service, + char *proxy_hostname, + unsigned int proxy_port ); + +/* socket-connect-gethostbyname.c */ +int lookup_host_with_gethostbyname ( gftp_request *request, + char *proxy_hostname, + struct hostent *hostp ); + +int gftp_connect_server_legacy ( gftp_request * request, + char *service, + char *proxy_hostname, + unsigned int proxy_port ); + /* sockutils.c */ ssize_t gftp_get_line ( gftp_request * request, /*@out@*/ gftp_getline_buffer ** rbuf, @@ -1122,3 +1134,8 @@ int fd, int non_blocking ); +struct servent * r_getservbyname ( const char *name, + const char *proto, + struct servent *result_buf, + int *h_errnop ); +