Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 449) sorted by relevance

12345678910>>...18

/packages/modules/adb/
Dsysdeps.h87 static inline void close_on_exec(borrowed_fd fd) { in close_on_exec() argument
104 extern int adb_read(borrowed_fd fd, void* buf, int len);
105 extern int adb_pread(borrowed_fd fd, void* buf, int len, off64_t offset);
106 extern int adb_write(borrowed_fd fd, const void* buf, int len);
107 extern int adb_pwrite(borrowed_fd fd, const void* buf, int len, off64_t offset);
108 extern int64_t adb_lseek(borrowed_fd fd, int64_t pos, int where);
109 extern int adb_shutdown(borrowed_fd fd, int direction = SHUT_RDWR);
110 extern int adb_close(int fd);
112 extern HANDLE adb_get_os_handle(borrowed_fd fd);
118 static inline int unix_close(int fd) { in unix_close() argument
[all …]
Dadb_io.cpp37 bool SendProtocolString(borrowed_fd fd, std::string_view s) { in SendProtocolString() argument
47 return WriteFdExactly(fd, str); in SendProtocolString()
50 bool ReadProtocolString(borrowed_fd fd, std::string* s, std::string* error) { in ReadProtocolString() argument
52 if (!ReadFdExactly(fd, buf, 4)) { in ReadProtocolString()
60 if (!ReadFdExactly(fd, &(*s)[0], len)) { in ReadProtocolString()
68 bool SendOkay(borrowed_fd fd) { in SendOkay() argument
69 return WriteFdExactly(fd, "OKAY", 4); in SendOkay()
72 bool SendFail(borrowed_fd fd, std::string_view reason) { in SendFail() argument
73 return WriteFdExactly(fd, "FAIL", 4) && SendProtocolString(fd, reason); in SendFail()
76 bool ReadFdExactly(borrowed_fd fd, void* buf, size_t len) { in ReadFdExactly() argument
[all …]
Dadb_io_test.cpp48 ASSERT_NE(-1, tf.fd); in POSIX_TEST()
50 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
51 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); in POSIX_TEST()
55 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf) - 1)) << strerror(errno); in POSIX_TEST()
62 ASSERT_NE(-1, tf.fd); in POSIX_TEST()
64 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
65 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); in POSIX_TEST()
69 ASSERT_FALSE(ReadFdExactly(tf.fd, buf, sizeof(buf))); in POSIX_TEST()
76 ASSERT_NE(-1, tf.fd); in POSIX_TEST()
78 ASSERT_TRUE(android::base::WriteStringToFd(input, tf.fd)) << strerror(errno); in POSIX_TEST()
[all …]
Dservices.cpp47 unique_fd fd) { in service_bootstrap_func() argument
48 adb_thread_setname(android::base::StringPrintf("%s svc %d", service_name.c_str(), fd.get())); in service_bootstrap_func()
49 func(std::move(fd)); in service_bootstrap_func()
137 static void connect_service(unique_fd fd, std::string host) { in connect_service() argument
146 SendProtocolString(fd.get(), response); in connect_service()
149 static void pair_service(unique_fd fd, std::string host, std::string password) { in pair_service() argument
152 SendProtocolString(fd.get(), response); in pair_service()
155 static void wait_service(unique_fd fd, std::string serial, TransportId transport_id, in wait_service() argument
159 SendFail(fd, "short wait-for-: " + spec); in wait_service()
171 SendFail(fd, "bad wait-for- transport: " + spec); in wait_service()
[all …]
Dsysdeps_win32.cpp147 int fd = bfd.get(); in _fh_from_int() local
148 fd -= WIN32_FH_BASE; in _fh_from_int()
150 if (fd < 0 || fd >= WIN32_MAX_FHS) { in _fh_from_int()
151 D("_fh_from_int: invalid fd %d passed to %s", fd + WIN32_FH_BASE, func); in _fh_from_int()
156 f = &_win32_fhs[fd]; in _fh_from_int()
159 D("_fh_from_int: invalid fd %d passed to %s", fd + WIN32_FH_BASE, func); in _fh_from_int()
448 int adb_read(borrowed_fd fd, void* buf, int len) { in adb_read() argument
449 FH f = _fh_from_int(fd, __func__); in adb_read()
459 int adb_pread(borrowed_fd fd, void* buf, int len, off64_t offset) { in adb_pread() argument
464 if (!::ReadFile(adb_get_os_handle(fd), buf, static_cast<DWORD>(len), &bytes_read, in adb_pread()
[all …]
Dsockets.cpp124 ssize_t rc = adb_writev(s->fd, iov.data(), iov.size()); in local_socket_flush_incoming()
162 r = adb_read(s->fd, x, avail); in local_socket_flush_outgoing()
163 D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%zu", s->id, s->fd, r, in local_socket_flush_outgoing()
179 D("LS(%d): fd=%d post avail loop. r=%d is_eof=%d forced_eof=%d", s->id, s->fd, r, is_eof, in local_socket_flush_outgoing()
188 int saved_fd = s->fd; in local_socket_flush_outgoing()
256 static void deferred_close(unique_fd fd) { in deferred_close() argument
259 adb_shutdown(fd.get(), SHUT_WR); in deferred_close()
265 while ((rc = adb_read(fde->fd.get(), buf, sizeof(buf))) > 0) { in deferred_close()
291 fdevent* fde = fdevent_create(fd.release(), callback, socket_info); in deferred_close()
300 D("LS(%d): destroying fde.fd=%d", s->id, s->fd); in local_socket_destroy()
[all …]
/packages/modules/Connectivity/tests/cts/net/jni/
DNativeMultinetworkJni.cpp80 int getAsyncResponse(JNIEnv* env, int fd, int timeoutMs, int* rcode, uint8_t* buf, size_t bufLen) { in getAsyncResponse() argument
81 struct pollfd wait_fd = { .fd = fd, .events = POLLIN }; in getAsyncResponse()
85 int n = android_res_nresult(fd, rcode, buf, bufLen); in getAsyncResponse()
88 EXPECT_EQ(env, -1, read(fd, &dummy, sizeof(dummy)), "res_nresult check for closing fd"); in getAsyncResponse()
123 int expectAnswersValid(JNIEnv* env, int fd, int family, int expectedRcode) { in expectAnswersValid() argument
126 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersValid()
139 int expectAnswersNotValid(JNIEnv* env, int fd, int expectedErrno) { in expectAnswersNotValid() argument
142 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersNotValid()
156 int fd = android_res_nquery(handle, kHostname, ns_c_in, ns_t_a, 0); in Java_android_net_cts_MultinetworkApiTest_runResNqueryCheck() local
157 EXPECT_GE(env, fd, 0, "v4 res_nquery"); in Java_android_net_cts_MultinetworkApiTest_runResNqueryCheck()
[all …]
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DTcpKeepaliveController.java111 public static TcpKeepalivePacketData getTcpKeepalivePacket(@NonNull FileDescriptor fd) in getTcpKeepalivePacket() argument
114 final TcpKeepalivePacketDataParcelable tcpDetails = switchToRepairMode(fd); in getTcpKeepalivePacket()
117 switchOutOfRepairMode(fd); in getTcpKeepalivePacket()
128 private static TcpKeepalivePacketDataParcelable switchToRepairMode(FileDescriptor fd) in switchToRepairMode() argument
130 if (DBG) Log.i(TAG, "switchToRepairMode to start tcp keepalive : " + fd); in switchToRepairMode()
138 srcSockAddr = Os.getsockname(fd); in switchToRepairMode()
152 dstSockAddr = Os.getpeername(fd); in switchToRepairMode()
166 dropAllIncomingPackets(fd, true); in switchToRepairMode()
169 Os.setsockoptInt(fd, IPPROTO_TCP, TCP_REPAIR, TCP_REPAIR_ON); in switchToRepairMode()
172 if (!isSocketIdle(fd)) { in switchToRepairMode()
[all …]
/packages/modules/StatsD/statsd/src/storage/
DStorageManager.cpp127 int fd = open(file, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR); in writeFile() local
128 if (fd == -1) { in writeFile()
135 if (android::base::WriteFully(fd, buffer, numBytes)) { in writeFile()
141 int result = fchown(fd, AID_STATSD, AID_STATSD); in writeFile()
146 close(fd); in writeFile()
161 int fd = open(fileName.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR); in writeTrainInfo() local
162 if (fd == -1) { in writeTrainInfo()
169 result = write(fd, &TRAIN_INFO_FILE_MAGIC, sizeof(TRAIN_INFO_FILE_MAGIC)); in writeTrainInfo()
172 close(fd); in writeTrainInfo()
178 result = write(fd, &trainInfo.trainVersionCode, trainVersionCodeByteCount); in writeTrainInfo()
[all …]
/packages/modules/adb/client/
Dincremental_utils.cpp66 static inline int32_t read_int32(borrowed_fd fd) { in read_int32() argument
68 return ReadFdExactly(fd, &result, sizeof(result)) ? result : -1; in read_int32()
71 static inline int32_t skip_int(borrowed_fd fd) { in skip_int() argument
72 return adb_lseek(fd, 4, SEEK_CUR); in skip_int()
75 static inline void append_int(borrowed_fd fd, std::vector<char>* bytes) { in append_int() argument
76 int32_t le_val = read_int32(fd); in append_int()
82 static inline bool append_bytes_with_size(borrowed_fd fd, std::vector<char>* bytes, in append_bytes_with_size() argument
84 int32_t le_size = read_int32(fd); in append_bytes_with_size()
99 ReadFdExactly(fd, bytes->data() + old_size + sizeof(le_size), size); in append_bytes_with_size()
103 static inline int32_t skip_bytes_with_size(borrowed_fd fd) { in skip_bytes_with_size() argument
[all …]
Dadb_client.cpp76 static std::optional<TransportId> switch_socket_transport(int fd, std::string* error) { in switch_socket_transport() argument
109 if (!SendProtocolString(fd, service)) { in switch_socket_transport()
116 if (!adb_status(fd, error)) { in switch_socket_transport()
122 if (!ReadFdExactly(fd, &result, sizeof(result))) { in switch_socket_transport()
132 bool adb_status(borrowed_fd fd, std::string* error) { in adb_status() argument
134 if (!ReadFdExactly(fd, buf, 4)) { in adb_status()
149 ReadProtocolString(fd, error, error); in adb_status()
162 unique_fd fd; in _adb_connect() local
163 if (!socket_spec_connect(&fd, __adb_server_socket_spec, nullptr, nullptr, &reason)) { in _adb_connect()
170 std::optional<TransportId> transport_result = switch_socket_transport(fd.get(), error); in _adb_connect()
[all …]
Dtransport_local.cpp88 unique_fd fd; in connect_device() local
99 socket_spec_connect(&fd, prefix_addr, &port, &serial, response); in connect_device()
100 if (fd.get() == -1) { in connect_device()
105 unique_fd fd; in connect_device() local
108 socket_spec_connect(&fd, prefix_addr, &port, &serial, &response); in connect_device()
109 if (fd == -1) { in connect_device()
117 return init_socket_transport(t, std::move(fd), port, 0) >= 0 ? ReconnectResult::Success in connect_device()
122 if (!register_socket_transport(std::move(fd), serial, port, 0, std::move(reconnect), false, in connect_device()
137 unique_fd fd; in local_connect_arbitrary_ports() local
146 fd.reset(network_connect(host, adb_port, SOCK_STREAM, 0, error)); in local_connect_arbitrary_ports()
[all …]
Dusb_linux.cpp62 if (fd != -1) unix_close(fd); in ~usb_handle()
66 int fd = -1; member
160 int fd = unix_open(dev_name, O_RDONLY | O_CLOEXEC); in find_usb_device() local
161 if (fd == -1) { in find_usb_device()
165 size_t desclength = unix_read(fd, devdesc, sizeof(devdesc)); in find_usb_device()
171 unix_close(fd); in find_usb_device()
179 unix_close(fd); in find_usb_device()
192 unix_close(fd); in find_usb_device()
274 if (!fstat(fd, &st) && S_ISCHR(st.st_mode)) { in find_usb_device()
299 unix_close(fd); in find_usb_device()
[all …]
Dcommandline.cpp279 int read_and_dump(borrowed_fd fd, bool use_shell_protocol, in read_and_dump() argument
282 if (fd < 0) return exit_code; in read_and_dump()
290 protocol = std::make_unique<ShellProtocol>(fd); in read_and_dump()
322 D("read_and_dump(): pre adb_read(fd=%d)", fd.get()); in read_and_dump()
323 length = adb_read(fd, raw_buffer, sizeof(raw_buffer)); in read_and_dump()
324 D("read_and_dump(): post adb_read(fd=%d): length=%d", fd.get(), length); in read_and_dump()
417 static void send_window_size_change(int fd, std::unique_ptr<ShellProtocol>& shell) { in send_window_size_change() argument
451 if (ioctl(fd, TIOCGWINSZ, &ws) == -1) return; in send_window_size_change()
624 int fd = adb_connect(service_string, &error); in RemoteShell() local
625 if (fd < 0) { in RemoteShell()
[all …]
/packages/modules/Connectivity/tests/cts/net/native/dns/
DNativeDnsAsyncTest.cpp37 int getAsyncResponse(int fd, int timeoutMs, int* rcode, uint8_t* buf, size_t bufLen) { in getAsyncResponse() argument
39 wait_fd[0].fd = fd; in getAsyncResponse()
46 int n = android_res_nresult(fd, rcode, buf, bufLen); in getAsyncResponse()
49 EXPECT_EQ(-1, read(fd, &dummy, sizeof dummy)); in getAsyncResponse()
78 void expectAnswersValid(int fd, int ipType, int expectedRcode) { in expectAnswersValid() argument
81 int res = getAsyncResponse(fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersValid()
95 void expectAnswersNotValid(int fd, int expectedErrno) { in expectAnswersNotValid() argument
98 int res = getAsyncResponse(fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersNotValid()
195 int fd = android_res_nquery( in TEST() local
198 android_res_cancel(fd); in TEST()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/
DRedactingFileDescriptorTest.java79 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_ONLY, in testSingleByte() local
83 assertEquals(buf.length, Os.read(fd, buf, 0, buf.length)); in testSingleByte()
95 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_ONLY, in testRanges() local
99 assertEquals(buf.length, Os.pread(fd, buf, 0, 10, 90)); in testRanges()
102 assertEquals(buf.length, Os.pread(fd, buf, 0, 10, 95)); in testRanges()
105 assertEquals(buf.length, Os.pread(fd, buf, 0, 10, 100)); in testRanges()
108 assertEquals(buf.length, Os.pread(fd, buf, 0, 10, 195)); in testRanges()
111 assertEquals(buf.length, Os.pread(fd, buf, 0, 10, 395)); in testRanges()
117 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_ONLY, in testEntireFile() local
120 try (FileInputStream in = new FileInputStream(fd)) { in testEntireFile()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DIsoInterface.java118 private static int readInt(@NonNull FileDescriptor fd) in readInt() argument
121 if (Os.read(fd, buf, 0, 4) == 4) { in readInt()
128 private static @NonNull UUID readUuid(@NonNull FileDescriptor fd) in readUuid() argument
130 final long high = (((long) readInt(fd)) << 32L) | (((long) readInt(fd)) & 0xffffffffL); in readUuid()
131 final long low = (((long) readInt(fd)) << 32L) | (((long) readInt(fd)) & 0xffffffffL); in readUuid()
135 private static @Nullable Box parseNextBox(@NonNull FileDescriptor fd, long end, in parseNextBox() argument
137 final long pos = Os.lseek(fd, 0, OsConstants.SEEK_CUR); in parseNextBox()
144 long len = Integer.toUnsignedLong(readInt(fd)); in parseNextBox()
145 final int type = readInt(fd); in parseNextBox()
153 long high = readInt(fd); in parseNextBox()
[all …]
/packages/modules/Connectivity/Tethering/jni/
Dcom_android_networkstack_tethering_BpfUtils.cpp50 int fd = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE); // TODO: use unique_fd in sendAndProcessNetlinkResponse() local
51 if (fd == -1) { in sendAndProcessNetlinkResponse()
59 if (setsockopt(fd, SOL_NETLINK, NETLINK_CAP_ACK, &on, sizeof(on))) { in sendAndProcessNetlinkResponse()
62 close(fd); in sendAndProcessNetlinkResponse()
67 if (bind(fd, (const struct sockaddr*)&KERNEL_NLADDR, sizeof(KERNEL_NLADDR))) { in sendAndProcessNetlinkResponse()
70 close(fd); in sendAndProcessNetlinkResponse()
75 if (connect(fd, (const struct sockaddr*)&KERNEL_NLADDR, sizeof(KERNEL_NLADDR))) { in sendAndProcessNetlinkResponse()
78 close(fd); in sendAndProcessNetlinkResponse()
82 int rv = send(fd, req, len, 0); in sendAndProcessNetlinkResponse()
87 close(fd); in sendAndProcessNetlinkResponse()
[all …]
/packages/services/Car/cpp/evs/manager/1.1/
DEnumerator.cpp621 Return<void> Enumerator::debug(const hidl_handle& fd, in checkPermission() argument
623 if (fd.getNativeHandle() != nullptr && fd->numFds > 0) { in checkPermission()
624 cmdDump(fd->data[0], options); in checkPermission()
633 void Enumerator::cmdDump(int fd, const hidl_vec<hidl_string>& options) { in checkPermission() argument
635 WriteStringToFd("No option is given.\n", fd); in checkPermission()
636 cmdHelp(fd); in checkPermission()
642 cmdHelp(fd); in checkPermission()
644 cmdList(fd, options); in checkPermission()
646 cmdDumpDevice(fd, options); in checkPermission()
648 cmdConfigureEmulatedCamera(fd, options); in checkPermission()
[all …]
/packages/modules/NeuralNetworks/driver/cache/nnCache/
DnnCache.cpp170 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); in saveBlobCacheLocked() local
171 if (fd == -1) { in saveBlobCacheLocked()
180 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); in saveBlobCacheLocked()
182 if (fd == -1) { in saveBlobCacheLocked()
193 close(fd); in saveBlobCacheLocked()
202 close(fd); in saveBlobCacheLocked()
212 if (write(fd, buf, fileSize) == -1) { in saveBlobCacheLocked()
215 close(fd); in saveBlobCacheLocked()
221 fchmod(fd, S_IRUSR); in saveBlobCacheLocked()
222 close(fd); in saveBlobCacheLocked()
[all …]
/packages/modules/adb/daemon/
Dfile_sync_service.cpp258 static bool SendSyncFail(borrowed_fd fd, const std::string& reason) { in SendSyncFail() argument
264 return WriteFdExactly(fd, &msg.data, sizeof(msg.data)) && WriteFdExactly(fd, reason); in SendSyncFail()
267 static bool SendSyncFailErrno(borrowed_fd fd, const std::string& reason) { in SendSyncFailErrno() argument
268 return SendSyncFail(fd, StringPrintf("%s: %s", reason.c_str(), strerror(errno))); in SendSyncFailErrno()
271 static bool handle_send_file_data(borrowed_fd s, unique_fd fd, uint32_t* timestamp, in handle_send_file_data() argument
325 if (fd != -1) { in handle_send_file_data()
326 if (!WriteFdExactly(fd, output.data(), output.size())) { in handle_send_file_data()
352 unique_fd fd; in handle_send_file() local
356 fd.reset(adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, mode)); in handle_send_file()
358 if (fd < 0 && errno == ENOENT) { in handle_send_file()
[all …]
Drestart_service.cpp31 void restart_root_service(unique_fd fd) { in restart_root_service() argument
33 WriteFdExactly(fd.get(), "adbd is already running as root\n"); in restart_root_service()
37 WriteFdExactly(fd.get(), "adbd cannot run as root in production builds\n"); in restart_root_service()
43 WriteFdExactly(fd.get(), "restarting adbd as root\n"); in restart_root_service()
46 void restart_unroot_service(unique_fd fd) { in restart_unroot_service() argument
48 WriteFdExactly(fd.get(), "adbd not running as root\n"); in restart_unroot_service()
54 WriteFdExactly(fd.get(), "restarting adbd as non root\n"); in restart_unroot_service()
57 void restart_tcp_service(unique_fd fd, int port) { in restart_tcp_service() argument
59 WriteFdFmt(fd.get(), "invalid port %d\n", port); in restart_tcp_service()
65 WriteFdFmt(fd.get(), "restarting in TCP mode port: %d\n", port); in restart_tcp_service()
[all …]
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DNetlinkSocket.java61 final FileDescriptor fd = forProto(nlProto); in sendOneShotKernelMessage() local
64 connectToKernel(fd); in sendOneShotKernelMessage()
65 sendMessage(fd, msg, 0, msg.length, IO_TIMEOUT); in sendOneShotKernelMessage()
66 final ByteBuffer bytes = recvMessage(fd, DEFAULT_RECV_BUFSIZE, IO_TIMEOUT); in sendOneShotKernelMessage()
99 SocketUtils.closeSocket(fd); in sendOneShotKernelMessage()
107 final FileDescriptor fd = Os.socket(AF_NETLINK, SOCK_DGRAM, nlProto); in forProto() local
108 Os.setsockoptInt(fd, SOL_SOCKET, SO_RCVBUF, SOCKET_RECV_BUFSIZE); in forProto()
109 return fd; in forProto()
112 public static void connectToKernel(FileDescriptor fd) throws ErrnoException, SocketException { in connectToKernel() argument
113 Os.connect(fd, makeNetlinkSocketAddress(0, 0)); in connectToKernel()
[all …]
/packages/modules/adb/fdevent/
Dfdevent.cpp40 (*f)(fde->fd.get(), events, fde->arg); in invoke_fde()
59 return android::base::StringPrintf("(fdevent %" PRIu64 ": fd %d %s)", fde->id, fde->fd.get(), in dump_fde()
63 fdevent* fdevent_context::Create(unique_fd fd, std::variant<fd_func, fd_func2> func, void* arg) { in Create() argument
65 CHECK_GE(fd.get(), 0); in Create()
67 int fd_num = fd.get(); in Create()
75 fde->fd = std::move(fd); in Create()
78 if (!set_file_block_mode(fde->fd, false)) { in Create()
82 LOG(ERROR) << "failed to set non-blocking mode for fd " << fde->fd.get(); in Create()
97 unique_fd fd = std::move(fde->fd); in Destroy() local
99 auto erased = this->installed_fdevents_.erase(fd.get()); in Destroy()
[all …]
/packages/modules/Connectivity/framework/jni/
Dandroid_net_NetworkUtils.cpp67 int fd = AFileDescriptor_getFd(env, javaFd); in android_net_utils_attachDropAllBPFFilter() local
68 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)) != 0) { in android_net_utils_attachDropAllBPFFilter()
77 int fd = AFileDescriptor_getFd(env, javaFd); in android_net_utils_detachBPFFilter() local
78 if (setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, &optval_ignored, sizeof(optval_ignored)) != in android_net_utils_detachBPFFilter()
133 int fd = android_res_nquery(netHandle, queryname, ns_class, ns_type, flags); in android_net_utils_resNetworkQuery() local
135 if (fd < 0) { in android_net_utils_resNetworkQuery()
136 jniThrowErrnoException(env, "resNetworkQuery", -fd); in android_net_utils_resNetworkQuery()
140 return jniCreateFileDescriptor(env, fd); in android_net_utils_resNetworkQuery()
148 int fd = android_res_nsend(netHandle, data, msgLen, flags); in android_net_utils_resNetworkSend() local
150 if (fd < 0) { in android_net_utils_resNetworkSend()
[all …]

12345678910>>...18