Home
last modified time | relevance | path

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

/packages/modules/StatsD/lib/libstatssocket/
Dstatsd_writer.c84 .sock = -EBADF,
97 i = atomic_load(&statsdLoggerWrite.sock); in statsdOpen()
106 int sock = TEMP_FAILURE_RETRY(socket(PF_UNIX, flags, 0)); in statsdOpen() local
107 if (sock < 0) { in statsdOpen()
114 setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, bufLen); in statsdOpen()
121 connect(sock, (struct sockaddr*)&un, sizeof(struct sockaddr_un))) < 0) { in statsdOpen()
127 i = atomic_exchange(&statsdLoggerWrite.sock, ret); in statsdOpen()
132 close(sock); in statsdOpen()
134 ret = atomic_exchange(&statsdLoggerWrite.sock, sock); in statsdOpen()
135 if ((ret >= 0) && (ret != sock)) { in statsdOpen()
[all …]
Dstatsd_writer.h35 atomic_int sock; member
/packages/apps/Nfc/src/com/android/nfc/handover/
DHandoverClient.java53 LlcpSocket sock = null; in connect() local
55 sock = service.createLlcpSocket(0, MIU, 1, 1024); in connect()
65 sock.connectToService(HandoverServer.HANDOVER_SERVICE_NAME); in connect()
67 if (sock != null) { in connect()
69 sock.close(); in connect()
80 mSocket = sock; in connect()
101 LlcpSocket sock = null; in sendHandoverRequest()
106 sock = mSocket; in sendHandoverRequest()
113 int remoteMiu = sock.getRemoteMiu(); in sendHandoverRequest()
119 sock.send(tmpBuffer); in sendHandoverRequest()
[all …]
/packages/apps/Nfc/src/com/android/nfc/ndefpush/
DNdefPushClient.java55 LlcpSocket sock = null; in connect() local
58 sock = service.createLlcpSocket(0, MIU, 1, 1024); in connect()
67 sock.connectToService(NdefPushServer.SERVICE_NAME); in connect()
69 if (sock != null) { in connect()
71 sock.close(); in connect()
83 mSocket = sock; in connect()
89 LlcpSocket sock = null; in push() local
95 sock = mSocket; in push()
104 remoteMiu = sock.getRemoteMiu(); in push()
110 sock.send(tmpBuffer); in push()
[all …]
DNdefPushServer.java66 ConnectionThread(LlcpSocket sock) { in ConnectionThread() argument
68 mSock = sock; in ConnectionThread()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/net/
DIkeLocalAddressGenerator.java38 FileDescriptor sock = in generateLocalAddress() local
43 network.bindSocket(sock); in generateLocalAddress()
44 Os.connect(sock, remoteAddress, serverPort); in generateLocalAddress()
45 InetSocketAddress localAddr = (InetSocketAddress) Os.getsockname(sock); in generateLocalAddress()
46 Os.close(sock); in generateLocalAddress()
/packages/modules/DnsResolver/
Dres_send.cpp156 static int connect_with_timeout(int sock, const struct sockaddr* nsap, socklen_t salen,
158 static int retrying_poll(const int sock, short events, const struct timespec* finish);
869 static int connect_with_timeout(int sock, const sockaddr* nsap, socklen_t salen, in connect_with_timeout() argument
873 origflags = fcntl(sock, F_GETFL, 0); in connect_with_timeout()
874 fcntl(sock, F_SETFL, origflags | O_NONBLOCK); in connect_with_timeout()
876 res = connect(sock, nsap, salen); in connect_with_timeout()
884 LOG(INFO) << __func__ << ": " << sock << " send_vc"; in connect_with_timeout()
885 res = retrying_poll(sock, POLLIN | POLLOUT, &finish); in connect_with_timeout()
891 fcntl(sock, F_SETFL, origflags); in connect_with_timeout()
892 LOG(INFO) << __func__ << ": " << sock << " connect_with_const timeout returning " << res; in connect_with_timeout()
[all …]
Dresolv_private.h122 for (auto& sock : nssocks) { in closeSockets()
123 sock.reset(); in closeSockets()
201 inline void resolv_tag_socket(int sock, uid_t uid, pid_t pid) { in resolv_tag_socket() argument
204 if (int err = android::net::gResNetdCallbacks.tagSocket(sock, TAG_SYSTEM_DNS, uid, pid)) { in resolv_tag_socket()
210 if (fchown(sock, (android::net::gApiLevel >= 30) ? uid : AID_DNS, -1) == -1) { in resolv_tag_socket()
Dgetaddrinfo.cpp1293 int sock; in _find_src_addr() local
1309 sock = socket(addr->sa_family, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP); in _find_src_addr()
1310 if (sock == -1) { in _find_src_addr()
1317 if (mark != MARK_UNSET && setsockopt(sock, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) < 0) { in _find_src_addr()
1318 close(sock); in _find_src_addr()
1321 if (uid > 0 && uid != NET_CONTEXT_INVALID_UID && fchown(sock, uid, (gid_t) -1) < 0) { in _find_src_addr()
1322 close(sock); in _find_src_addr()
1326 ret = connect(sock, addr, len); in _find_src_addr()
1330 close(sock); in _find_src_addr()
1334 if (src_addr && getsockname(sock, src_addr, &len) == -1) { in _find_src_addr()
[all …]
/packages/services/Car/tools/emulator/
Dvhal_emulator.py121 self.sock.sendall(msgHdr)
123 self.sock.sendall(msgStr)
146 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
147 self.sock.connect(('localhost', localPortNumber))
156 b = self.sock.recv(4)
161 b = self.sock.recv(msgLen)
/packages/modules/StatsD/statsd/src/socket/
DStatsSocketListener.cpp141 int sock = android_get_control_socket(socketName); in getLogSocket() local
143 if (sock < 0) { // statsd started up in init.sh in getLogSocket()
144 sock = socket_local_server(socketName, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_DGRAM); in getLogSocket()
147 if (setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on))) { in getLogSocket()
151 return sock; in getLogSocket()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DIkeUdp4Socket.java69 FileDescriptor sock = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in getInstance() local
70 Os.bind(sock, INADDR_ANY, 0); in getInstance()
71 applySocketConfig(sockConfig, sock, false /* isIpv6 */); in getInstance()
73 ikeSocket = new IkeUdp4Socket(sock, sockConfig, handler); in getInstance()
DIkeUdp6Socket.java82 FileDescriptor sock = Os.socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); in openUdp6Sock() local
83 Os.bind(sock, INADDR_ANY, 0); in openUdp6Sock()
84 applySocketConfig(sockConfig, sock, true /* isIpv6 */); in openUdp6Sock()
86 return sock; in openUdp6Sock()
DIkeSocket.java119 IkeSocketConfig sockConfig, FileDescriptor sock, boolean isIpv6) in applySocketConfig() argument
121 sockConfig.getNetwork().bindSocket(sock); in applySocketConfig()
126 Os.setsockoptInt(sock, IPPROTO_IPV6, IPV6_TCLASS, tClass); in applySocketConfig()
131 Os.setsockoptInt(sock, IPPROTO_IP, IP_TOS, tos); in applySocketConfig()
/packages/modules/adb/
Dtest_adb.py66 def _handle(sock): argument
67 with contextlib.closing(sock) as serversock:
316 def _reset_socket_on_close(self, sock): argument
323 sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
326 linger = sock.getsockopt(socket.SOL_SOCKET, socket.SO_LINGER, 16)
404 socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
405 sock.connect(("localhost", server_port))
407 sock.sendall(b"%04x%s" % (len(command), command))
501 with fake_adbd() as (port, sock):
513 sock.sendall(packet)
Dtest_device.py1507 sock = socket.create_connection(("localhost", local_port))
1508 with contextlib.closing(sock):
1509 bytesWritten = sock.send(b"a" * size)
1511 readBytes = sock.recv(4096)
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIpSecBaseTest.java155 protected static int getPort(FileDescriptor sock) throws Exception { in getPort() argument
156 return ((InetSocketAddress) Os.getsockname(sock)).getPort(); in getPort()
533 for (NativeUdpSocket sock : new NativeUdpSocket[] {leftSock, rightSock}) { in getNativeUdpSocketPair()
534 applyTransformBidirectionally(ism, transform, sock); in getNativeUdpSocketPair()
535 Os.bind(sock.mFd, localAddr, 0); in getNativeUdpSocketPair()
DIpSecManagerTest.java154 FileDescriptor sock = in getBoundUdpSocket() local
160 Os.bind(sock, address, port); in getBoundUdpSocket()
174 return sock; in getBoundUdpSocket()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/
DIkeSocketTestBase.java118 FileDescriptor sock = in getBoundUdpSocket() local
120 Os.bind(sock, address, IkeSocket.SERVER_PORT_UDP_ENCAPSULATED); in getBoundUdpSocket()
121 return sock; in getBoundUdpSocket()
/packages/modules/NetworkStack/src/android/net/ip/
DIpClient.java1506 FileDescriptor sock = null; in transmitPacket() local
1508 sock = Os.socket(AF_PACKET, SOCK_RAW | SOCK_NONBLOCK, 0 /* protocol */); in transmitPacket()
1509 Os.sendto(sock, packet.array(), 0 /* byteOffset */, packet.limit() /* byteCount */, in transmitPacket()
1514 NetworkStackUtils.closeSocketQuietly(sock); in transmitPacket()
/packages/inputmethods/LatinIME/dictionaries/
Den_GB_wordlist.combined.gz1dictionary=main:en_gb,locale=en_GB,description=English (UK),date ...
Den_US_wordlist.combined.gz
Den_wordlist.combined.gz1dictionary=main:en,locale=en,description=English,date=1414726273, ...