6 #include <afs/cellconfig.h>
9 #include <tests/tap/basic.h>
13 * Check if the current machine's hostname resolves to the loopback
17 afstest_IsLoopbackNetworkDefault(void)
19 char hostname[MAXHOSTCHARS];
23 gethostname(hostname, sizeof(hostname));
24 host = gethostbyname(hostname);
25 memcpy(&addr, host->h_addr, sizeof(addr));
27 return(rx_IsLoopbackAddr(ntohl(addr)));
31 * Skips all TAP tests if the current machine's hostname resolves to the
35 afstest_SkipTestsIfLoopbackNetIsDefault(void)
39 retval = afstest_IsLoopbackNetworkDefault();
41 skip_all("Default IP address is on the loopback network!\n");