afs: incorrect types for AFSDB IPv4 addresses
[openafs.git] / src / WINNT / afsd / cm_dns.h
1 /* Copyright 2000, International Business Machines Corporation and others.
2  * All Rights Reserved.
3  *
4  * This software has been released under the terms of the IBM Public
5  * License.  For details, see the LICENSE file in the top-level source
6  * directory or online at http://www.openafs.org/dl/license10.html
7  */
8
9 /* Well-known DNS port is 53 (for both TCP and UDP,
10    although UDP is typically the only one used) */
11
12 #define DNS_PORT    53
13
14 /* this function will continue to return cell server
15    names for the given cell, ending in null */
16 int getAFSServer(const char *service, const char *protocol, const char *cellname,
17                  unsigned short afsdbPort,
18                  afs_uint32 *cellHostAddrs, char cellHostNames[][MAXHOSTCHARS],
19                  unsigned short ports[], unsigned short ipRanks[], int *numServers, int *ttl);
20
21 /* Same as above, but using cm_unichar_t.  Note that this functon will
22    only be defined for DNSAPI_ENV. */
23 int getAFSServerW(const cm_unichar_t *service, const cm_unichar_t *protocol, const cm_unichar_t *cellName,
24                   unsigned short afsdbPort,
25                   afs_uint32 *cellHostAddrs,
26                   cm_unichar_t cellHostNames[][MAXHOSTCHARS],
27                   unsigned short ports[],
28                   unsigned short ipRanks[],
29                   int *numServers, int *ttl);
30
31 /* a supplement for the DJGPP gethostbyname ... which
32    never bothers calling a DNS server ... so this function
33    takes care of that. This should be called when you
34    failed with gethostbyname (as that WILL check for
35    dotted decimal, and local hostfile) */
36
37 struct hostent *DNSgetHostByName(char *hostname);
38
39
40