Mercurial > ecos
changeset 1069:edfa7bed5cb2
Pure pedantry: fix some typos in comments
| author | jlarmour |
|---|---|
| date | Tue, 24 Jun 2003 05:10:56 +0000 |
| parents | 745b55b432de |
| children | 9d0f5c9517dd |
| files | packages/net/ns/dns/current/include/dns.h packages/net/ns/dns/current/src/dns.c |
| diffstat | 2 files changed, 19 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/ns/dns/current/include/dns.h +++ b/packages/net/ns/dns/current/include/dns.h @@ -57,14 +57,14 @@ #ifndef _POSIX_SOURCE /* Initialise the DNS client with the address of the server. The address should be a IPv4 or IPv6 numeric address */ -externC int cyg_dns_res_start(char * server); +__externC int cyg_dns_res_start(char * server); -/* Old interface which is depricated */ -externC int cyg_dns_res_init(struct in_addr *dns_server); +/* Old interface which is deprecated */ +__externC int cyg_dns_res_init(struct in_addr *dns_server); /* Functions to manipulate the domainname */ -externC int getdomainname(char *name, size_t len); -externC int setdomainname(const char *name, size_t len); +__externC int getdomainname(char *name, size_t len); +__externC int setdomainname(const char *name, size_t len); #endif // Host name / IP mapping @@ -77,12 +77,12 @@ struct hostent { }; #define h_addr h_addr_list[0] /* for backward compatibility */ -externC struct hostent *gethostbyname(const char *host); -externC struct hostent *gethostbyaddr(const char *addr, int len, int type); +__externC struct hostent *gethostbyname(const char *host); +__externC struct hostent *gethostbyaddr(const char *addr, int len, int type); // Error reporting -externC int h_errno; -externC const char* hstrerror(int err); +__externC int h_errno; +__externC const char* hstrerror(int err); #define DNS_SUCCESS 0 #define HOST_NOT_FOUND 1 @@ -91,12 +91,12 @@ externC const char* hstrerror(int err); #define NO_DATA 4 // Interface between the DNS client and getaddrinfo -externC int +__externC int cyg_dns_getaddrinfo(const char * hostname, struct sockaddr addrs[], int num, int family, char **canon); // Interface between the DNS client and getnameinfo -externC int +__externC int cyg_dns_getnameinfo(const struct sockaddr * sa, char * host, size_t hostlen); //-----------------------------------------------------------------------------
--- a/packages/net/ns/dns/current/src/dns.c +++ b/packages/net/ns/dns/current/src/dns.c @@ -252,8 +252,12 @@ send_recv(char * msg, int len, int msgle /* (re)Start the DNS client. This opens a socket to the DNS server who's address is passed in. This address can be either an IPv4 or - IPv6 address. This function can be called multiple times. Each - invocation will close any previous connection and make a new + IPv6 address. This function can be called multiple times. If we + are being called a second time we have to be careful to allow any + ongoing lookups to finish before we close the socket and connect to + a different DNS server. The danger here is that we may have to wait + for up to 32 seconds if the DNS server is down. + Each invocation will close any previous connection and make a new connection to the new server. Note the address of the server must be in numeric form since its not possible to do a DNS lookup! */ @@ -311,13 +315,13 @@ int cyg_dns_res_start(char * dns_server) } /* This is the old interface to start the resolver. It is only IPv4 - capable and so is now depricated in favor of cyg_dns_res_start(). + capable and so is now deprecated in favor of cyg_dns_res_start(). Initialise the resolver. Open a socket and bind it to the address of the server. return -1 if something goes wrong, otherwise 0. If we are being called a second time we have to be careful to allow any ongoing lookups to finish before we close the socket and connect to a different DNS server. The danger here is - that we may have to wait for upto 32 seconds if the DNS server is + that we may have to wait for up to 32 seconds if the DNS server is down. */ int cyg_dns_res_init(struct in_addr *dns_server)
