networking · beginner · ~15 min
Identify the IP address families.
Implement int is_inet_family(int af) returning 1 if af is AF_INET or AF_INET6, else 0.
#include <sys/socket.h>
int is_inet_family(int af) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.