diff options
author | Luke Huang <huangluke@google.com> | 2018-12-17 15:54:18 +0800 |
---|---|---|
committer | Luke Huang <huangluke@google.com> | 2018-12-17 16:47:20 +0800 |
commit | d0c47e6e1b7e249ae947b082c403d4a4f1a2488a (patch) | |
tree | acda37921f28cd2b953670efdc034ee4064b12d2 /native/android/net.c | |
parent | a4d036e98b4c93dc1155912eaf66af3df5dcacb3 (diff) |
Following commit for asynchronous DNS query API
Test: built, flashed, booted
atest CtsNativeNetDnsTestCases
Change-Id: Ia0f54ff684d2ad37ca82d94bad4e4dd582783d85
Diffstat (limited to 'native/android/net.c')
-rw-r--r-- | native/android/net.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/native/android/net.c b/native/android/net.c index e32b7875b4e7..4cac371f313b 100644 --- a/native/android/net.c +++ b/native/android/net.c @@ -84,8 +84,7 @@ 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) { unsigned netid; if (!getnetidfromhandle(network, &netid)) { return -ENONET; @@ -94,12 +93,11 @@ int android_res_nquery(net_handle_t network, return resNetworkQuery(netid, dname, ns_class, ns_type); } -int android_res_nresult(int fd, int *rcode, unsigned char *answer, int anslen) { +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 unsigned char *msg, int msglen) { +int android_res_nsend(net_handle_t network, const uint8_t *msg, size_t msglen) { unsigned netid; if (!getnetidfromhandle(network, &netid)) { return -ENONET; |