#include #include int sockatmark(int s) { int arg = 0; return syscall(ioctl, s, SIOCATMARK, &arg) < 0 ? -1 : arg; }