networking · beginner · ~15 min
Recognise the IPv6 loopback address.
Implement int is_ipv6_loopback(const char *addr) returning 1 if addr is exactly "::1", else 0.
#include <string.h>
int is_ipv6_loopback(const char *addr) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.