1 #include <sys/socket.h> 2 #include <sys/ioctl.h> 3 #include <unsupported_api.h> 4 sockatmark(int s)5 int sockatmark(int s) 6 { 7 int ret; 8 UNSUPPORTED_API_VOID(LITEOS_A); 9 if (ioctl(s, SIOCATMARK, &ret) < 0) 10 return -1; 11 return ret; 12 } 13