Home
last modified time | relevance | path

Searched refs:mSock (Results 1 – 10 of 10) sorted by relevance

/system/vold/
DNetlinkManager.cpp57 if ((mSock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT)) < 0) { in start()
65 if ((setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) && in start()
66 (setsockopt(mSock, SOL_SOCKET, SO_RCVBUF, &sz, sizeof(sz)) < 0)) { in start()
71 if (setsockopt(mSock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) { in start()
76 if (bind(mSock, (struct sockaddr*)&nladdr, sizeof(nladdr)) < 0) { in start()
81 mHandler = new NetlinkHandler(mSock); in start()
90 close(mSock); in start()
DNetlinkManager.h32 int mSock; variable
/system/core/libsysutils/src/
DSocketListener.cpp54 mSock = socketFd; in init()
60 if (mSocketName && mSock > -1) in ~SocketListener()
61 close(mSock); in ~SocketListener()
78 if (!mSocketName && mSock == -1) { in startListener()
83 if ((mSock = android_get_control_socket(mSocketName)) < 0) { in startListener()
88 SLOGV("got mSock = %d for %s", mSock, mSocketName); in startListener()
89 fcntl(mSock, F_SETFD, FD_CLOEXEC); in startListener()
92 if (mListen && listen(mSock, backlog) < 0) { in startListener()
96 mClients[mSock] = new SocketClient(mSock, false, mUseCmdNum); in startListener()
131 if (mSocketName && mSock > -1) { in stopListener()
[all …]
/system/netd/server/
DSockDiag.h62 SockDiag() : mSock(-1), mWriteSock(-1), mSocketsDestroyed(0) {} in SockDiag()
89 int mSock; variable
96 bool hasSocks() { return mSock != -1 && mWriteSock != -1; } in hasSocks()
97 void closeSocks() { close(mSock); close(mWriteSock); mSock = mWriteSock = -1; } in closeSocks()
DNetlinkListener.cpp61 : mEvent(std::move(event)), mSock(std::move(sock)), mThreadName(name) { in NetlinkListener()
87 ASSIGN_OR_RETURN(auto sent, sys.sendto(mSock, msg, 0, kKernelAddr)); in send()
126 const std::array<Fd, 2> fds{{{mEvent}, {mSock}}}; in run()
136 auto rx = sys.recvfrom(mSock, makeSlice(rxbuf), 0); in run()
143 mErrorHandler(((Fd) mSock).get(), err); in run()
DSockDiag.cpp93 mSock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_INET_DIAG); in open()
101 if ((connect(mSock, reinterpret_cast<sockaddr *>(&nl), sizeof(nl)) == -1) || in open()
136 if (writev(mSock, iov, iovcnt) != (ssize_t) len) { in sendDumpRequest()
140 return checkError(mSock); in sendDumpRequest()
227 return processNetlinkDump(mSock, callback); in readDiagMsg()
256 return processNetlinkDump(mSock, callback); in readDiagMsgWithTcpInfo()
DXfrmController.h60 if (mSock >= 0) { in close()
61 ::close(mSock); in close()
63 mSock = -1; in close()
77 int mSock;
DNetlinkListener.h94 const netdutils::UniqueFd mSock; variable
DXfrmController.cpp237 mSock = openNetlinkSocket(NETLINK_XFRM); in open()
238 if (mSock < 0) { in open()
240 return netdutils::statusFromErrno(-mSock, "Could not open netlink socket"); in open()
298 StatusOr<size_t> writeResult = getSyscallInstance().writev(mSock, *iovecs); in sendMessage()
312 getSyscallInstance().read(Fd(mSock), netdutils::makeSlice(response)); in sendMessage()
/system/core/libsysutils/include/sysutils/
DSocketListener.h29 int mSock; variable