1: 2: #include <stdio.h> 3: #include <netdb.h> 4: #include <sysexits.h> 5: #include <sys/param.h> 6: #include <sys/socket.h> 7: 8: main() 9: { 10: register int net; 11: 12: net = socket(PF_INET, SOCK_DGRAM, 0); 13: if (net < 0) 14: { 15: puts("NO"); 16: exit(EX_OSERR); 17: } 18: puts("YES"); 19: exit(EX_OK); 20: }