Add control flags in asynchronous DNS query API
Test: built, flashed, booted
cts test: NativeDnsAsyncTest
Change-Id: Ief04d99b2b289d95e54899572d28576d464037b8
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user