diff dbutil.h @ 568:005530560594

Rearrange getaddrstring() etc
author Matt Johnston <matt@ucc.asn.au>
date Tue, 01 Sep 2009 16:38:26 +0000
parents d588e3ea557a
children 00eca37e47e8
line wrap: on
line diff
--- a/dbutil.h	Mon Aug 31 15:25:39 2009 +0000
+++ b/dbutil.h	Tue Sep 01 16:38:26 2009 +0000
@@ -46,7 +46,10 @@
 extern int debug_trace;
 #endif
 char * stripcontrol(const char * text);
-unsigned char * getaddrstring(struct sockaddr_storage* addr, int withport);
+void get_socket_address(int fd, char **local_host, char **local_port,
+		char **remote_host, char **remote_port, int host_lookup);
+void getaddrstring(struct sockaddr_storage* addr, 
+		char **ret_host, char **ret_port, int host_lookup);
 int dropbear_listen(const char* address, const char* port,
 		int *socks, unsigned int sockcount, char **errstring, int *maxfd);
 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data,
@@ -57,7 +60,6 @@
 #endif
 int connect_remote(const char* remotehost, const char* remoteport,
 		int nonblocking, char ** errstring);
-char* getaddrhostname(struct sockaddr_storage * addr);
 int buf_readfile(buffer* buf, const char* filename);
 int buf_getline(buffer * line, FILE * authfile);