Lines Matching refs:fd
33 static void closeIfOpen(int* fd) { in closeIfOpen() argument
34 if (*fd != -1) { in closeIfOpen()
35 ::close(*fd); in closeIfOpen()
36 *fd = -1; in closeIfOpen()
100 fds[0].fd = mSocket; in eventLoop()
102 fds[1].fd = mControlPipe[kControlRead]; in eventLoop()
118 for (auto& fd : fds) { in eventLoop() local
119 if ((fd.revents & POLLIN) == 0) { in eventLoop()
122 if (fd.fd == mSocket) { in eventLoop()
123 readNetlinkMessage(fd.fd); in eventLoop()
124 } else if (fd.fd == mControlPipe[kControlRead]) { in eventLoop()
184 bool Netlink::readNetlinkMessage(int fd) { in readNetlinkMessage() argument
187 int bytesReceived = ::recv(fd, buffer, sizeof(buffer), 0); in readNetlinkMessage()