1*4f1223e8SApple OSS Distributions #include <darwintest.h> 2*4f1223e8SApple OSS Distributions #include <sys/socket.h> 3*4f1223e8SApple OSS Distributions 4*4f1223e8SApple OSS Distributions T_DECL(socket_raw_uint8_max, "create socket with borderline proto numbers", T_META_TAG_VM_PREFERRED) 5*4f1223e8SApple OSS Distributions { 6*4f1223e8SApple OSS Distributions int fd = socket(AF_INET, SOCK_RAW, 256); 7*4f1223e8SApple OSS Distributions 8*4f1223e8SApple OSS Distributions T_ASSERT_POSIX_FAILURE(fd, EINVAL, "socket(AF_INET, SOCK_RAW, 256);"); 9*4f1223e8SApple OSS Distributions 10*4f1223e8SApple OSS Distributions int fd2 = socket(AF_INET, SOCK_RAW, 255); 11*4f1223e8SApple OSS Distributions 12*4f1223e8SApple OSS Distributions T_ASSERT_POSIX_SUCCESS(fd2, "socket(AF_INET, SOCK_RAW, 255);"); 13*4f1223e8SApple OSS Distributions } 14