OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/WINNT/afsd/cm_dns.h
00001 /* Copyright 2000, International Business Machines Corporation and others.
00002  * All Rights Reserved.
00003  *
00004  * This software has been released under the terms of the IBM Public
00005  * License.  For details, see the LICENSE file in the top-level source
00006  * directory or online at http://www.openafs.org/dl/license10.html
00007  */
00008 
00009 /* Well-known DNS port is 53 (for both TCP and UDP,
00010    although UDP is typically the only one used) */
00011 
00012 #define DNS_PORT    53
00013 
00014 /* this function will continue to return cell server
00015    names for the given cell, ending in null */
00016 int getAFSServer(const char *service, const char *protocol, const char *cellname,
00017                  unsigned short afsdbPort,
00018                  int *cellHostAddrs, char cellHostNames[][MAXHOSTCHARS],
00019                  unsigned short ports[], unsigned short ipRanks[], int *numServers, int *ttl);
00020 
00021 /* Same as above, but using cm_unichar_t.  Note that this functon will
00022    only be defined for DNSAPI_ENV. */
00023 int getAFSServerW(const cm_unichar_t *service, const cm_unichar_t *protocol, const cm_unichar_t *cellName,
00024                   unsigned short afsdbPort,
00025                   int *cellHostAddrs,
00026                   cm_unichar_t cellHostNames[][MAXHOSTCHARS],
00027                   unsigned short ports[],
00028                   unsigned short ipRanks[],
00029                   int *numServers, int *ttl);
00030 
00031 /* a supplement for the DJGPP gethostbyname ... which
00032    never bothers calling a DNS server ... so this function
00033    takes care of that. This should be called when you
00034    failed with gethostbyname (as that WILL check for
00035    dotted decimal, and local hostfile) */
00036 
00037 struct hostent *DNSgetHostByName(char *hostname);
00038 
00039 
00040 
 All Data Structures Files Functions Variables