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