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

Commit daa29938 authored by Mike Yu's avatar Mike Yu Committed by Bernie Innocenti
Browse files

Move ResponseCode to libnetdutils

ResponseCode is necessary for libnetd_resolv, move it to libnetdutils
to ease the cleanup of the include path system/netd/server for
libnetd_resolv.

Bug: 128662167
Test: system/netd/tests/runtests.sh passed

Change-Id: Iae22cc6b4c642a190294fa4ce0ae406434e7ac3d
parent 0d47042d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -38,30 +38,32 @@
#include <android-base/stringprintf.h>
#include <android/multinetwork.h>  // ResNsendFlags
#include <cutils/misc.h>           // FIRST_APPLICATION_UID
#include <netdutils/InternetAddresses.h>
#include <netdutils/OperationLimiter.h>
#include <netdutils/ResponseCode.h>
#include <netdutils/Slice.h>
#include <private/android_filesystem_config.h>  // AID_SYSTEM
#include <resolv.h>
#include <statslog.h>
#include <sysutils/SocketClient.h>

// TODO: Considering moving ResponseCode.h Stopwatch.h thread_util.h to libnetdutils.
// TODO: Consider moving Stopwatch.h and thread_util.h to libnetdutils.
#include "DnsResolver.h"
#include "NetdClient.h"  // NETID_USE_LOCAL_NAMESERVERS
#include "NetdPermissions.h"
#include "ResolverEventReporter.h"
#include "ResponseCode.h"
#include "Stopwatch.h"
#include "netd_resolv/stats.h"  // RCODE_TIMEOUT
#include "netdutils/InternetAddresses.h"
#include "resolv_private.h"
#include "thread_util.h"

using aidl::android::net::metrics::INetdEventListener;

namespace android {
namespace net {

using netdutils::ResponseCode;

namespace net {
namespace {

// Limits the number of outstanding DNS queries by client UID.