Cuttlefish implementation for IPv6 MTU
Test: make
Bug: 146668814
Change-Id: I37faed325543e3f6cc2ec16846a64be7d6aa0fc6
diff --git a/guest/hals/ril/libril/ril.h b/guest/hals/ril/libril/ril.h
index 32d5aa0..e1137b0 100644
--- a/guest/hals/ril/libril/ril.h
+++ b/guest/hals/ril/libril/ril.h
@@ -555,6 +555,46 @@
sent an invalid value */
} RIL_Data_Call_Response_v11;
+typedef struct {
+ int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+ int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+ back-off timer value RIL wants to override the one
+ pre-configured in FW.
+ The unit is milliseconds.
+ The value < 0 means no value is suggested.
+ The value 0 means retry should be done ASAP.
+ The value of INT_MAX(0x7fffffff) means no retry. */
+ int cid; /* Context ID, uniquely identifies this call */
+ int active; /* 0=inactive, 1=active/physical link down,
+ 2=active/physical link up */
+ char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
+ For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
+ PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
+ such as "IP" or "IPV6" */
+ char * ifname; /* The network interface name */
+ char * addresses; /* A space-delimited list of addresses with optional "/" prefix
+ length, e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
+ May not be empty, typically 1 IPv4 or 1 IPv6 or
+ one of each. If the prefix length is absent the addresses
+ are assumed to be point to point with IPv4 having a prefix
+ length of 32 and IPv6 128. */
+ char * dnses; /* A space-delimited list of DNS server addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty. */
+ char * gateways; /* A space-delimited list of default gateway addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty in which case the addresses represent point
+ to point connections. */
+ char * pcscf; /* the Proxy Call State Control Function address
+ via PCO(Protocol Configuration Option) for IMS client. */
+ int mtuV4; /* MTU received from network for IPv4.
+ Value <= 0 means network has either not sent a value or
+ sent an invalid value. */
+ int mtuV6; /* MTU received from network for IPv6.
+ Value <= 0 means network has either not sent a value or
+ sent an invalid value. */
+} RIL_Data_Call_Response_v12;
+
typedef enum {
RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
diff --git a/guest/hals/ril/libril/ril_service.cpp b/guest/hals/ril/libril/ril_service.cpp
index 7349845..7f5b74d 100755
--- a/guest/hals/ril/libril/ril_service.cpp
+++ b/guest/hals/ril/libril/ril_service.cpp
@@ -119,7 +119,7 @@
void convertRilDataCallToHal(RIL_Data_Call_Response_v11 *dcResponse,
::android::hardware::radio::V1_4::SetupDataCallResult& dcResult);
-void convertRilDataCallToHal(RIL_Data_Call_Response_v11 *dcResponse,
+void convertRilDataCallToHal(RIL_Data_Call_Response_v12 *dcResponse,
::android::hardware::radio::V1_5::SetupDataCallResult& dcResult);
void convertRilDataCallListToHal(void *response, size_t responseLen,
@@ -3692,17 +3692,18 @@
}
dispatchStrings(serial, mSlotId, RIL_REQUEST_SETUP_DATA_CALL, true, 15,
std::to_string((int) RadioTechnology::UNKNOWN + 2).c_str(),
- std::to_string((int) dataProfileInfo.base.profileId).c_str(),
- dataProfileInfo.base.apn.c_str(),
- dataProfileInfo.base.user.c_str(),
- dataProfileInfo.base.password.c_str(),
- std::to_string((int) dataProfileInfo.base.authType).c_str(),
- getProtocolString(dataProfileInfo.base.protocol),
- getProtocolString(dataProfileInfo.base.roamingProtocol),
+ std::to_string((int) dataProfileInfo.profileId).c_str(),
+ dataProfileInfo.apn.c_str(),
+ dataProfileInfo.user.c_str(),
+ dataProfileInfo.password.c_str(),
+ std::to_string((int) dataProfileInfo.authType).c_str(),
+ getProtocolString(dataProfileInfo.protocol),
+ getProtocolString(dataProfileInfo.roamingProtocol),
std::to_string(dataProfileInfo.supportedApnTypesBitmap).c_str(),
- std::to_string(dataProfileInfo.base.bearerBitmap).c_str(),
- dataProfileInfo.base.persistent ? "1" : "0",
- std::to_string(dataProfileInfo.base.mtu).c_str(),
+ std::to_string(dataProfileInfo.bearerBitmap).c_str(),
+ dataProfileInfo.persistent ? "1" : "0",
+ std::to_string(dataProfileInfo.mtuV4).c_str(),
+ std::to_string(dataProfileInfo.mtuV6).c_str(),
mvnoTypeStr,
"302720x94",
roamingAllowed ? "1" : "0");
@@ -4995,7 +4996,7 @@
result.gateways = hidl_vec<hidl_string>();
result.pcscf = hidl_vec<hidl_string>();
} else {
- convertRilDataCallToHal((RIL_Data_Call_Response_v11 *) response, result);
+ convertRilDataCallToHal((RIL_Data_Call_Response_v12 *) response, result);
}
Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5->setupDataCallResponse_1_5(
@@ -8537,7 +8538,7 @@
dcResult.mtu = dcResponse->mtu;
}
-void convertRilDataCallToHal(RIL_Data_Call_Response_v11 *dcResponse,
+void convertRilDataCallToHal(RIL_Data_Call_Response_v12 *dcResponse,
::android::hardware::radio::V1_5::SetupDataCallResult& dcResult) {
dcResult.cause = (::android::hardware::radio::V1_4::DataCallFailCause) dcResponse->status;
dcResult.suggestedRetryTime = dcResponse->suggestedRetryTime;
@@ -8562,7 +8563,8 @@
dcResult.dnses = split(convertCharPtrToHidlString(dcResponse->dnses));
dcResult.gateways = split(convertCharPtrToHidlString(dcResponse->gateways));
dcResult.pcscf = split(convertCharPtrToHidlString(dcResponse->pcscf));
- dcResult.mtu = dcResponse->mtu;
+ dcResult.mtuV4 = dcResponse->mtuV4;
+ dcResult.mtuV6 = dcResponse->mtuV6;
}