summaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorGlenn L McGrath2003-12-20 01:47:18 +0000
committerGlenn L McGrath2003-12-20 01:47:18 +0000
commitffccf6eb5de311a3db8c3d7f7496e2f0cad69a23 (patch)
tree859f5849c30de6cb69bf6336af6d2228402f2395 /include/libbb.h
parent03d8091859f45a6bb5e3aadc110b279e789399f2 (diff)
downloadbusybox-ffccf6eb5de311a3db8c3d7f7496e2f0cad69a23.zip
busybox-ffccf6eb5de311a3db8c3d7f7496e2f0cad69a23.tar.gz
Change interface to bb_lookup_host, dont try and set port inside this
function as there is no gracefull way of handling failures. Rename bb_getport to bb_lookup_port, allow a default port to be specified so it always returns a correct value. Modify ftpgetput/rdate/wget to use the new interface. wget/rdate now use etc/services with a falback default value.
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 1367ee6..b2592c8 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -297,8 +297,8 @@ extern struct hostent *xgethostbyname2(const char *name, int af);
extern int create_icmp_socket(void);
extern int create_icmp6_socket(void);
extern int xconnect(struct sockaddr_in *s_addr);
-extern int bb_getport(const char *port);
-extern void bb_lookup_host(struct sockaddr_in *s_in, const char *host, const char *port);
+extern unsigned short bb_lookup_port(const char *port, unsigned short default_port);
+extern void bb_lookup_host(struct sockaddr_in *s_in, const char *host);
//#warning wrap this?
char *dirname (char *path);