• Home
  • Raw
  • Download

Lines Matching refs:fd

37   int fd = socket(PF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);  in ConnectFn()  local
38 if (fd < 0) { in ConnectFn()
49 if (connect(fd, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) < 0) { in ConnectFn()
53 else if (callback_fn != NULL && !callback_fn(fd)) { in ConnectFn()
57 close(fd); in ConnectFn()
63 bool (*callback_fn)(int fd), const char* sock_path) { in RunTest() argument
64 int fd = socket(PF_UNIX, SOCK_SEQPACKET, 0); in RunTest() local
65 ASSERT_NE(fd, -1) << strerror(errno); in RunTest()
73 …ASSERT_NE(-1, bind(fd, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr))) << strerror(errno… in RunTest()
75 ASSERT_NE(-1, listen(fd, 1)) << strerror(errno); in RunTest()
84 FD_SET(fd, &read_set); in RunTest()
88 ASSERT_LT(0, select(fd+1, &read_set, NULL, NULL, &tv)); in RunTest()
90 test_fn(&addr, fd); in RunTest()
96 close(fd); in RunTest()
104 static void TestAccept4(struct sockaddr_un* addr, int fd) { in TestAccept4() argument
106 int fd_acc = accept4(fd, reinterpret_cast<struct sockaddr*>(addr), &len, SOCK_CLOEXEC); in TestAccept4()
126 static bool SendMultiple(int fd) { in SendMultiple() argument
128 if (send(fd, g_RecvMsgs[i], strlen(g_RecvMsgs[i]) + 1, 0) < 0) { in SendMultiple()
137 static void TestRecvMMsg(struct sockaddr_un *addr, int fd) { in TestRecvMMsg() argument
139 int fd_acc = accept(fd, reinterpret_cast<struct sockaddr*>(addr), &len); in TestRecvMMsg()
186 static bool SendMMsg(int fd) { in SendMMsg() argument
198 if (sendmmsg(fd, msgs, NUM_SEND_MSGS, 0) < 0) { in SendMMsg()
205 static void TestSendMMsg(struct sockaddr_un *addr, int fd) { in TestSendMMsg() argument
207 int fd_acc = accept(fd, reinterpret_cast<struct sockaddr*>(addr), &len); in TestSendMMsg()