fprintf(stderr, " check-net --interface-all\n");
fprintf(stderr, " check-net --bridge\n");
fprintf(stderr, " check-net --host-ip\n");
- exit(1);
+ return;
}
if (strcmp(argv[1], ARG_PROXY) == 0) {
get_host_proxy_os();
system("/sbin/ifconfig -a");
} else {
fprintf(stderr, "ifconfig does not exist!\n");
- exit(1);
}
}
system("/sbin/ifconfig bridge1");
} else {
fprintf(stderr, "ifconfig does not exist!\n");
- exit(1);
}
}
}
freeifaddrs(ifap);
-
- exit(0);
}
system("/sbin/ifconfig -a");
} else {
fprintf(stderr, "ifconfig does not exist!\n");
- exit(1);
}
}
system("/sbin/ifconfig bridge1");
} else {
fprintf(stderr, "ifconfig does not exist!\n");
- exit(1);
}
}
}
freeifaddrs(ifap);
-
- exit(0);
}
pAddresses = (IP_ADAPTER_ADDRESSES *) MALLOC(outBufLen);
if (pAddresses == NULL) {
fprintf(stderr, "Memory allocation failed for IP_ADAPTER_ADDRESSES struct\n");
- exit(1);
+ return;
}
dwRetAddressVal = GetAdaptersAddresses(AF_INET, flags, NULL, pAddresses, &outBufLen);
pAdapterInfo = (IP_ADAPTER_INFO *) MALLOC(sizeof (IP_ADAPTER_INFO));
if (pAdapterInfo == NULL) {
fprintf(stderr, "Error allocating memory needed to call GetAdaptersinfo\n");
- exit(1);
+ return;
}
if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW) {
FREE(pAdapterInfo);
pAdapterInfo = (IP_ADAPTER_INFO *) MALLOC(ulOutBufLen);
if (pAdapterInfo == NULL) {
fprintf(stderr, "Error allocating memory needed to call GetAdaptersinfo\n");
- exit(1);
+ return;
}
}
dwRetVal = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen);
}
} else {
fprintf(stderr, "GetAdaptersInfo failed with error: %d\n", dwRetVal);
- exit(1);
+ return;
}
if (pAdapterInfo)
FREE(pAdapterInfo);
-
- exit(0);
}
void get_host_interface_all_os(void)