github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/contrib/syscall-test/raw.c (about) 1 #include <stdio.h> 2 #include <unistd.h> 3 #include <sys/socket.h> 4 #include <netinet/ip.h> 5 #include <netinet/udp.h> 6 7 int main() { 8 if (socket(PF_INET, SOCK_RAW, IPPROTO_UDP) == -1) { 9 perror("socket"); 10 return 1; 11 } 12 13 return 0; 14 }