diff options
| author | 2019-01-16 02:16:35 -0800 | |
|---|---|---|
| committer | 2019-01-16 02:16:35 -0800 | |
| commit | cf5ef56465f91436168845d582b3714512404378 (patch) | |
| tree | 3235f296e6b4745a327f98939cb10276b5292c00 | |
| parent | 04f8608ec673d8aa7ef1bf9b8a3104fa49491751 (diff) | |
| parent | 9a22123ae4e05dde32d4973beddc7f30868e89dc (diff) | |
Merge "Minor changes to the async DNS query API flag definitions."
am: 9a22123ae4
Change-Id: I29e520f21c2e5bbede69afb6ac1fe97c211cc5c8
| -rw-r--r-- | include/android/multinetwork.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/android/multinetwork.h b/include/android/multinetwork.h index 05d96ff2d1..d31d1f122f 100644 --- a/include/android/multinetwork.h +++ b/include/android/multinetwork.h @@ -112,15 +112,25 @@ int android_getaddrinfofornetwork(net_handle_t network, #if __ANDROID_API__ >= 29 +/** + * Possible values of the flags argument to android_res_nsend and android_res_nquery. + * Values are ORed together. + */ enum ResNsendFlags : uint32_t { - // Send a single request to a single resolver and fail on timeout or network errors + /** + * Send a single request to a single resolver and fail on timeout or network errors + */ ANDROID_RESOLV_NO_RETRY = 1 << 0, - // Do not cache the result of the lookup. The lookup may return a result that is already - // in the cache, unless the ANDROID_RESOLV_NO_CACHE_LOOKUP flag is also specified. + /** + * Do not cache the result of the lookup. The lookup may return a result that is already + * in the cache, unless the ANDROID_RESOLV_NO_CACHE_LOOKUP flag is also specified. + */ ANDROID_RESOLV_NO_CACHE_STORE = 1 << 1, - // Don't lookup the request in cache, do not write back the response into the cache + /** + * Don't lookup the request in cache. + */ ANDROID_RESOLV_NO_CACHE_LOOKUP = 1 << 2, }; @@ -136,8 +146,7 @@ enum ResNsendFlags : uint32_t { * POSIX error code (see errno.h) if an immediate error occurs. */ int android_res_nquery(net_handle_t network, - const char *dname, int ns_class, int ns_type, - enum ResNsendFlags flags) __INTRODUCED_IN(29); + const char *dname, int ns_class, int ns_type, uint32_t flags) __INTRODUCED_IN(29); /** * Issue the query |msg| on the given |network|. @@ -148,10 +157,11 @@ int android_res_nquery(net_handle_t network, * POSIX error code (see errno.h) if an immediate error occurs. */ int android_res_nsend(net_handle_t network, - const uint8_t *msg, size_t msglen, enum ResNsendFlags flags) __INTRODUCED_IN(29); + const uint8_t *msg, size_t msglen, uint32_t flags) __INTRODUCED_IN(29); /** * Read a result for the query associated with the |fd| descriptor. + * Closes |fd| before returning. * * Returns: * < 0: negative POSIX error code (see errno.h for possible values). |rcode| is not set. |