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