networking · beginner · ~15 min
Respect the unix-socket path length limit.
sockaddr_un.sun_path is 108 bytes including the NUL. Implement int path_fits_sun(const char *path) returning 1 if strlen(path) < 108, else 0.
#include <string.h>
int path_fits_sun(const char *path) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.