Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3fd643d authored by Luke Huang's avatar Luke Huang Committed by android-build-merger
Browse files

Merge "Minor changes to the async DNS query API flag definitions." am: 9a22123a

am: cf5ef564

Change-Id: I957ea1410a74d92bde191a67756fae53d966b0a3
parents 62351de5 cf5ef564
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -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.