Add dump info to IpSecService
Bug:38350824 Test: runtest frameworks-net Change-Id: Ifa11d55e9d337016ad865baada627db3aa8c2db3
This commit is contained in:
parent
5e623eaa02
commit
89194d6e45
1 changed files with 141 additions and 6 deletions
|
|
@ -47,9 +47,22 @@ public final class IpSecConfig implements Parcelable {
|
|||
|
||||
// Authentication Algorithm
|
||||
IpSecAlgorithm authentication;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringBuilder()
|
||||
.append("{spiResourceId=")
|
||||
.append(spiResourceId)
|
||||
.append(", encryption=")
|
||||
.append(encryption)
|
||||
.append(", authentication=")
|
||||
.append(authentication)
|
||||
.append("}")
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Flow[] flow = new Flow[] {new Flow(), new Flow()};
|
||||
final Flow[] flow = new Flow[] {new Flow(), new Flow()};
|
||||
|
||||
// For tunnel mode IPv4 UDP Encapsulation
|
||||
// IpSecTransform#ENCAP_ESP_*, such as ENCAP_ESP_OVER_UDP_IKE
|
||||
|
|
@ -166,6 +179,35 @@ public final class IpSecConfig implements Parcelable {
|
|||
encapRemotePort = in.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder strBuilder = new StringBuilder();
|
||||
strBuilder
|
||||
.append("{mode=")
|
||||
.append(mode == IpSecTransform.MODE_TUNNEL ? "TUNNEL" : "TRANSPORT")
|
||||
.append(", localAddress=")
|
||||
.append(localAddress)
|
||||
.append(", remoteAddress=")
|
||||
.append(remoteAddress)
|
||||
.append(", network=")
|
||||
.append(network)
|
||||
.append(", encapType=")
|
||||
.append(encapType)
|
||||
.append(", encapLocalPortResourceId=")
|
||||
.append(encapLocalPortResourceId)
|
||||
.append(", encapRemotePort=")
|
||||
.append(encapRemotePort)
|
||||
.append(", nattKeepaliveInterval=")
|
||||
.append(nattKeepaliveInterval)
|
||||
.append(", flow[OUT]=")
|
||||
.append(flow[IpSecTransform.DIRECTION_OUT])
|
||||
.append(", flow[IN]=")
|
||||
.append(flow[IpSecTransform.DIRECTION_IN])
|
||||
.append("}");
|
||||
|
||||
return strBuilder.toString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<IpSecConfig> CREATOR =
|
||||
new Parcelable.Creator<IpSecConfig>() {
|
||||
public IpSecConfig createFromParcel(Parcel in) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue