windows-cell-name-length-consistency-20080806
[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(char *cellname, int *cellHostAddrs, char cellHostNames[][MAXHOSTCHARS], int *numServers, int *ttl);
17
18 /* Same as above, but using cm_unichar_t.  Note that this functon will
19    only be defined for DNSAPI_ENV. */
20 int getAFSServerW(cm_unichar_t *cellName, int *cellHostAddrs,
21                   cm_unichar_t cellHostNames[][MAXHOSTCHARS], 
22                   int *numServers, int *ttl);
23
24 /* a supplement for the DJGPP gethostbyname ... which 
25    never bothers calling a DNS server ... so this function
26    takes care of that. This should be called when you
27    failed with gethostbyname (as that WILL check for
28    dotted decimal, and local hostfile) */
29
30 struct hostent *DNSgetHostByName(char *hostname);
31
32
33