Merge "Following commit for asynchronous DNS query API"

am: a89f04a742

Change-Id: Ie45d4c6337178d8912d2f41dc9023d71c004b100
This commit is contained in:
Luke Huang
2018-12-19 01:17:05 -08:00
committed by android-build-merger

View File

@@ -84,8 +84,7 @@ int android_getaddrinfofornetwork(net_handle_t network,
return android_getaddrinfofornet(node, service, hints, netid, 0, res); return android_getaddrinfofornet(node, service, hints, netid, 0, res);
} }
int android_res_nquery(net_handle_t network, int android_res_nquery(net_handle_t network, const char *dname, int ns_class, int ns_type) {
const char *dname, int ns_class, int ns_type) {
unsigned netid; unsigned netid;
if (!getnetidfromhandle(network, &netid)) { if (!getnetidfromhandle(network, &netid)) {
return -ENONET; return -ENONET;
@@ -94,12 +93,11 @@ int android_res_nquery(net_handle_t network,
return resNetworkQuery(netid, dname, ns_class, ns_type); 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); return resNetworkResult(fd, rcode, answer, anslen);
} }
int android_res_nsend(net_handle_t network, int android_res_nsend(net_handle_t network, const uint8_t *msg, size_t msglen) {
const unsigned char *msg, int msglen) {
unsigned netid; unsigned netid;
if (!getnetidfromhandle(network, &netid)) { if (!getnetidfromhandle(network, &netid)) {
return -ENONET; return -ENONET;