darling-xnu/tests/socket_raw_uint8_max.c
2023-05-16 21:41:14 -07:00

14 lines
354 B
C

#include <darwintest.h>
#include <sys/socket.h>
T_DECL(socket_raw_uint8_max, "create socket with borderline proto numbers")
{
int fd = socket(AF_INET, SOCK_RAW, 256);
T_ASSERT_POSIX_FAILURE(fd, EINVAL, "socket(AF_INET, SOCK_RAW, 256);");
int fd2 = socket(AF_INET, SOCK_RAW, 255);
T_ASSERT_POSIX_SUCCESS(fd2, "socket(AF_INET, SOCK_RAW, 255);");
}