summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNathan Harold <nharold@google.com>2017-05-25 16:10:35 -0700
committerNathan Harold <nharold@google.com>2017-06-15 13:13:30 -0700
commit6942b212a92d9d05a8100306acf9ea855818eb8d (patch)
tree38bb4b9a391a6c932868bd9f7672c42475d07f9f /include
parent9d64842e19c8638d645a986dc17ce90c926de594 (diff)
downloadandroid_hardware_ril-6942b212a92d9d05a8100306acf9ea855818eb8d.tar.gz
android_hardware_ril-6942b212a92d9d05a8100306acf9ea855818eb8d.tar.bz2
android_hardware_ril-6942b212a92d9d05a8100306acf9ea855818eb8d.zip
Keepalive RIL Interface
Interface definition for requesting and managing keepalive packet offload to the modem. Bug: 33277538 Test: tbd Change-Id: Id42b8802750ca376d1d50431dec670f25c607174
Diffstat (limited to 'include')
-rw-r--r--include/telephony/ril.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 4f11788..2a5b12d 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -5538,6 +5538,43 @@ typedef struct {
*/
#define RIL_REQUEST_STOP_NETWORK_SCAN 143
+/**
+ * RIL_REQUEST_START_KEEPALIVE
+ *
+ * Start a keepalive session
+ *
+ * Request that the modem begin sending keepalive packets on a particular
+ * data call, with a specified source, destination, and format.
+ *
+ * "data" is a const RIL_RequestKeepalive
+ * "response" is RIL_KeepaliveStatus with a valid "handle"
+ *
+ * Valid errors:
+ * SUCCESS
+ * NO_RESOURCES
+ * INVALID_ARGUMENTS
+ *
+ */
+#define RIL_REQUEST_START_KEEPALIVE 144
+
+/**
+ * RIL_REQUEST_STOP_KEEPALIVE
+ *
+ * Stops an ongoing keepalive session
+ *
+ * Requests that a keepalive session with the given handle be stopped.
+ * there is no parameter for this request.
+ *
+ * "data" is an integer handle
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * INVALID_ARGUMENTS
+ *
+ */
+#define RIL_REQUEST_STOP_KEEPALIVE 145
+
/***********************************************************************/
/**
@@ -6214,6 +6251,14 @@ typedef struct {
*/
#define RIL_UNSOL_NETWORK_SCAN_RESULT 1049
+/**
+ * RIL_UNSOL_KEEPALIVE_STATUS
+ *
+ * "data" is NULL
+ * "response" is a const RIL_KeepaliveStatus *
+ */
+#define RIL_UNSOL_KEEPALIVE_STATUS 1050
+
/***********************************************************************/
@@ -6374,6 +6419,35 @@ typedef struct {
loosely defined in LTE Layer 3 spec 24.008 */
} RIL_PCO_Data;
+typedef enum {
+ NATT_IPV4 = 0, /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv4 */
+ NATT_IPV6 = 1 /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv6 */
+} RIL_KeepaliveType;
+
+#define MAX_INADDR_LEN 16
+typedef struct {
+ RIL_KeepaliveType type; /* Type of keepalive packet */
+ char sourceAddress[MAX_INADDR_LEN]; /* Source address in network-byte order */
+ int sourcePort; /* Source port if applicable, or 0x7FFFFFFF;
+ the maximum value is 65535 */
+ char destinationAddress[MAX_INADDR_LEN]; /* Destination address in network-byte order */
+ int destinationPort; /* Destination port if applicable or 0x7FFFFFFF;
+ the maximum value is 65535 */
+ int maxKeepaliveIntervalMillis; /* Maximum milliseconds between two packets */
+ int cid; /* Context ID, uniquely identifies this call */
+} RIL_KeepaliveRequest;
+
+typedef enum {
+ KEEPALIVE_ACTIVE, /* Keepalive session is active */
+ KEEPALIVE_INACTIVE, /* Keepalive session is inactive */
+ KEEPALIVE_PENDING /* Keepalive session status not available */
+} RIL_KeepaliveStatusCode;
+
+typedef struct {
+ uint32_t sessionHandle;
+ RIL_KeepaliveStatusCode code;
+} RIL_KeepaliveStatus;
+
#ifdef RIL_SHLIB
struct RIL_Env {
/**