Add user quota information into the IpSecService dump
Bug: 64093788 Test: runtest frameworks-net Change-Id: I6c5fc9e2db4ba57e0db4f6380a1251c4e444951b
This commit is contained in:
@@ -142,6 +142,17 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
}
|
}
|
||||||
mCurrent--;
|
mCurrent--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new StringBuilder()
|
||||||
|
.append("{mCurrent=")
|
||||||
|
.append(mCurrent)
|
||||||
|
.append(", mMax=")
|
||||||
|
.append(mMax)
|
||||||
|
.append("}")
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class UserQuotaTracker {
|
private static final class UserQuotaTracker {
|
||||||
@@ -159,6 +170,19 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
public final ResourceTracker socket = new ResourceTracker(MAX_NUM_ENCAP_SOCKETS);
|
public final ResourceTracker socket = new ResourceTracker(MAX_NUM_ENCAP_SOCKETS);
|
||||||
public final ResourceTracker transform = new ResourceTracker(MAX_NUM_TRANSFORMS);
|
public final ResourceTracker transform = new ResourceTracker(MAX_NUM_TRANSFORMS);
|
||||||
public final ResourceTracker spi = new ResourceTracker(MAX_NUM_SPIS);
|
public final ResourceTracker spi = new ResourceTracker(MAX_NUM_SPIS);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new StringBuilder()
|
||||||
|
.append("{socket=")
|
||||||
|
.append(socket)
|
||||||
|
.append(", transform=")
|
||||||
|
.append(transform)
|
||||||
|
.append(", spi=")
|
||||||
|
.append(spi)
|
||||||
|
.append("}")
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final SparseArray<UserRecord> mUserRecords = new SparseArray<>();
|
private final SparseArray<UserRecord> mUserRecords = new SparseArray<>();
|
||||||
@@ -172,6 +196,11 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return mUserRecords.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final UserQuotaTracker mUserQuotaTracker = new UserQuotaTracker();
|
private final UserQuotaTracker mUserQuotaTracker = new UserQuotaTracker();
|
||||||
@@ -909,6 +938,8 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
pw.println("NetdNativeService Connection: " + (isNetdAlive() ? "alive" : "dead"));
|
pw.println("NetdNativeService Connection: " + (isNetdAlive() ? "alive" : "dead"));
|
||||||
pw.println();
|
pw.println();
|
||||||
|
|
||||||
|
pw.println("mUserQuotaTracker:");
|
||||||
|
pw.println(mUserQuotaTracker);
|
||||||
pw.println("mTransformRecords:");
|
pw.println("mTransformRecords:");
|
||||||
pw.println(mTransformRecords);
|
pw.println(mTransformRecords);
|
||||||
pw.println("mUdpSocketRecords:");
|
pw.println("mUdpSocketRecords:");
|
||||||
|
|||||||
Reference in New Issue
Block a user