3 #include <afs/cellconfig.h>
11 #include <tests/tap/basic.h>
16 /*! Check if the current machine's hostname resolves to the loopback
20 afstest_IsLoopbackNetworkDefault(void) {
21 char hostname[MAXHOSTCHARS];
25 gethostname(hostname, sizeof(hostname));
26 host = gethostbyname(hostname);
27 memcpy(&addr, host->h_addr, sizeof(addr));
29 return(rx_IsLoopbackAddr(ntohl(addr)));
32 /*! Skips all TAP tests if the current machine's hostname resolves to the
36 afstest_SkipTestsIfLoopbackNetIsDefault(void) {
38 retval=afstest_IsLoopbackNetworkDefault();
40 skip_all("Default IP address is on the loopback network!\n");