mirror of
https://github.com/darlinghq/darling-xnu.git
synced 2024-11-23 12:39:55 +00:00
14 lines
354 B
C
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);");
|
|
}
|