From f3cc2b6aa56a3a3e6fa6abbca5596a9a6fd1e64f Mon Sep 17 00:00:00 2001 From: Luke Huang Date: Thu, 20 Dec 2018 14:53:29 +0800 Subject: Add control flags in asynchronous DNS query API Test: built, flashed, booted cts test: NativeDnsAsyncTest Change-Id: Ief04d99b2b289d95e54899572d28576d464037b8 --- native/android/net.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'native/android/net.c') diff --git a/native/android/net.c b/native/android/net.c index 4cac371f313b..a8104fc23041 100644 --- a/native/android/net.c +++ b/native/android/net.c @@ -84,26 +84,28 @@ 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) { +int android_res_nquery(net_handle_t network, const char *dname, + int ns_class, int ns_type, enum ResNsendFlags flags) { unsigned netid; if (!getnetidfromhandle(network, &netid)) { return -ENONET; } - return resNetworkQuery(netid, dname, ns_class, ns_type); + return resNetworkQuery(netid, dname, ns_class, ns_type, flags); } int android_res_nresult(int fd, int *rcode, uint8_t *answer, size_t anslen) { return resNetworkResult(fd, rcode, answer, anslen); } -int android_res_nsend(net_handle_t network, const uint8_t *msg, size_t msglen) { +int android_res_nsend(net_handle_t network, const uint8_t *msg, size_t msglen, + enum ResNsendFlags flags) { unsigned netid; if (!getnetidfromhandle(network, &netid)) { return -ENONET; } - return resNetworkSend(netid, msg, msglen); + return resNetworkSend(netid, msg, msglen, flags); } void android_res_cancel(int nsend_fd) { -- cgit v1.2.3-59-g8ed1b