Modify bb_lookup_port to allow the protocol to be specified, allowing

/etc/services support for inetd, netcat and tftp.
This commit is contained in:
Glenn L McGrath
2004-01-17 05:03:31 +00:00
parent b03be7f567
commit 036dbaa082
8 changed files with 22 additions and 31 deletions

View File

@ -297,7 +297,7 @@ 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 unsigned short bb_lookup_port(const char *port, unsigned short default_port);
extern unsigned short bb_lookup_port(const char *port, const char *protocol, unsigned short default_port);
extern void bb_lookup_host(struct sockaddr_in *s_in, const char *host);
//#warning wrap this?