<sys/socket.h>, <netinet/{in,tcp,udp,udp_var}.h>

. add sa_len to sockaddr, sin_len to sockaddr_in
	. rename SCM_CREDENTIALS to SCM_CREDS
	. retire PF_FILE (same as PF_UNIX)

Change-Id: Id3ec63fe2556fc7ceb48de8ad4e80736df3ddfc7
This commit is contained in:
Ben Gras
2014-03-03 20:47:03 +01:00
committed by sambuc
parent dda632a24f
commit 01624e6f86
14 changed files with 365 additions and 104 deletions
+4 -3
View File
@@ -45,6 +45,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/ucred.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -306,8 +307,8 @@ void test_header(void)
test_fail("SUN_LEN(&sun) should be 5");
}
if (PF_UNIX != PF_LOCAL || PF_UNIX != PF_FILE || PF_UNIX != AF_UNIX) {
test_fail("PF_UNIX, PF_LOCAL, PF_FILE, and AF_UNIX");
if (PF_UNIX != PF_LOCAL || PF_UNIX != AF_UNIX) {
test_fail("PF_UNIX, PF_LOCAL and AF_UNIX");
}
}
@@ -2242,7 +2243,7 @@ void test_scm_credentials(void)
cmsg = CMSG_NXTHDR(&msg2, cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_CREDENTIALS) {
cmsg->cmsg_type == SCM_CREDS) {
memcpy(&cred, CMSG_DATA(cmsg), sizeof(struct uucred));
break;