Home
last modified time | relevance | path

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

/frameworks/opt/net/wifi/libwifi_system_iface/
Dinterface_tool.cpp43 bool GetIfState(const char* if_name, int sock, struct ifreq* ifr) { in GetIfState() argument
51 if (TEMP_FAILURE_RETRY(ioctl(sock, SIOCGIFFLAGS, ifr)) != 0) { in GetIfState()
63 base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in GetUpState() local
64 if (sock.get() < 0) { in GetUpState()
71 if (!GetIfState(if_name, sock.get(), &ifr)) { in GetUpState()
79 base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in SetUpState() local
80 if (sock.get() < 0) { in SetUpState()
87 if (!GetIfState(if_name, sock.get(), &ifr)) { in SetUpState()
102 if (TEMP_FAILURE_RETRY(ioctl(sock.get(), SIOCSIFFLAGS, &ifr)) != 0) { in SetUpState()
121 base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in SetMacAddress() local
[all …]
/frameworks/libs/net/common/netd/libnetdutils/include/netdutils/
DSyscalls.h50 virtual Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const = 0;
52 virtual Status getsockopt(Fd sock, int level, int optname, void *optval,
55 virtual Status setsockopt(Fd sock, int level, int optname, const void* optval,
58 virtual Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0;
60 virtual Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0;
62 virtual StatusOr<ifreq> ioctl(Fd sock, unsigned long request, ifreq* ifr) const = 0;
74 virtual StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const sockaddr* dst,
77 virtual StatusOr<Slice> recvfrom(Fd sock, const Slice dst, int flags, sockaddr* src,
117 StatusOr<SockaddrT> getsockname(Fd sock) const { in getsockname() argument
120 RETURN_IF_NOT_OK(getsockname(sock, asSockaddrPtr(&addr), &addrlen)); in getsockname()
[all …]
DMockSyscalls.h39 MOCK_CONST_METHOD3(getsockname, Status(Fd sock, sockaddr* addr, socklen_t* addrlen));
40 MOCK_CONST_METHOD5(getsockopt, Status(Fd sock, int level, int optname, void* optval,
42 MOCK_CONST_METHOD5(setsockopt, Status(Fd sock, int level, int optname, const void* optval,
45 MOCK_CONST_METHOD3(bind, Status(Fd sock, const sockaddr* addr, socklen_t addrlen));
46 MOCK_CONST_METHOD3(connect, Status(Fd sock, const sockaddr* addr, socklen_t addrlen));
47 MOCK_CONST_METHOD3(ioctl, StatusOr<ifreq>(Fd sock, unsigned long request, ifreq* ifr));
56 MOCK_CONST_METHOD5(sendto, StatusOr<size_t>(Fd sock, const Slice buf, int flags,
58 MOCK_CONST_METHOD5(recvfrom, StatusOr<Slice>(Fd sock, const Slice dst, int flags, sockaddr* src,
DSocketOption.h36 Status enableSockopt(Fd sock, int level, int optname);
55 Status enableTcpKeepAlives(Fd sock, unsigned idleTime, unsigned numProbes, unsigned probeInterval);
DNetlinkListener.h78 NetlinkListener(netdutils::UniqueFd event, netdutils::UniqueFd sock, const std::string& name);
/frameworks/libs/net/common/netd/libnetdutils/
DSocketOption.cpp29 Status enableSockopt(Fd sock, int level, int optname) { in enableSockopt() argument
32 return sys.setsockopt(sock, level, optname, &on, sizeof(on)); in enableSockopt()
35 Status enableTcpKeepAlives(Fd sock, unsigned idleTime, unsigned numProbes, unsigned probeInterval) { in enableTcpKeepAlives() argument
36 RETURN_IF_NOT_OK(enableSockopt(sock, SOL_SOCKET, SO_KEEPALIVE)); in enableTcpKeepAlives()
40 RETURN_IF_NOT_OK(sys.setsockopt(sock, SOL_TCP, TCP_KEEPIDLE, &idleTime, sizeof(idleTime))); in enableTcpKeepAlives()
43 RETURN_IF_NOT_OK(sys.setsockopt(sock, SOL_TCP, TCP_KEEPCNT, &numProbes, sizeof(numProbes))); in enableTcpKeepAlives()
46 RETURN_IF_NOT_OK(sys.setsockopt(sock, SOL_TCP, TCP_KEEPINTVL, &probeInterval, in enableTcpKeepAlives()
DSyscalls.cpp53 UniqueFd sock(::socket(domain, type, protocol)); in socket() local
54 if (!isWellFormed(sock)) { in socket()
57 return sock; in socket()
60 Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const override { in getsockname() argument
61 auto rv = ::getsockname(sock.get(), addr, addrlen); in getsockname()
68 Status getsockopt(Fd sock, int level, int optname, void* optval, in getsockopt() argument
70 auto rv = ::getsockopt(sock.get(), level, optname, optval, optlen); in getsockopt()
77 Status setsockopt(Fd sock, int level, int optname, const void* optval, in setsockopt() argument
79 auto rv = ::setsockopt(sock.get(), level, optname, optval, optlen); in setsockopt()
86 Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const override { in bind() argument
[all …]
DNetlinkListener.cpp59 NetlinkListener::NetlinkListener(UniqueFd event, UniqueFd sock, const std::string& name) in NetlinkListener() argument
60 : mEvent(std::move(event)), mSock(std::move(sock)), mThreadName(name) { in NetlinkListener()
/frameworks/base/core/java/org/apache/http/conn/ssl/
DSSLSocketFactory.java301 final Socket sock, in connectSocket() argument
317 ((sock != null) ? sock : createSocket()); in connectSocket()
378 public boolean isSecure(Socket sock) in isSecure() argument
381 if (sock == null) { in isSecure()
385 if (!(sock instanceof SSLSocket)) { in isSecure()
390 if (sock.isClosed()) { in isSecure()
/frameworks/base/core/java/org/apache/http/conn/scheme/
DSocketFactory.java101 Socket sock, in connectSocket() argument
139 boolean isSecure(Socket sock) in isSecure() argument