summaryrefslogtreecommitdiff
path: root/native/android/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'native/android/net.c')
-rw-r--r--native/android/net.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/native/android/net.c b/native/android/net.c
index 60296a7bd00c..e32b7875b4e7 100644
--- a/native/android/net.c
+++ b/native/android/net.c
@@ -83,3 +83,31 @@ int android_getaddrinfofornetwork(net_handle_t network,
return android_getaddrinfofornet(node, service, hints, netid, 0, res);
}
+
+int android_res_nquery(net_handle_t network,
+ const char *dname, int ns_class, int ns_type) {
+ unsigned netid;
+ if (!getnetidfromhandle(network, &netid)) {
+ return -ENONET;
+ }
+
+ return resNetworkQuery(netid, dname, ns_class, ns_type);
+}
+
+int android_res_nresult(int fd, int *rcode, unsigned char *answer, int anslen) {
+ return resNetworkResult(fd, rcode, answer, anslen);
+}
+
+int android_res_nsend(net_handle_t network,
+ const unsigned char *msg, int msglen) {
+ unsigned netid;
+ if (!getnetidfromhandle(network, &netid)) {
+ return -ENONET;
+ }
+
+ return resNetworkSend(netid, msg, msglen);
+}
+
+void android_res_cancel(int nsend_fd) {
+ resNetworkCancel(nsend_fd);
+}