summaryrefslogtreecommitdiffstats
path: root/tetheroffload/config/1.0
diff options
context:
space:
mode:
authorNiranjan Pendharkar <npendhar@codeaurora.org>2017-01-26 10:31:20 -0800
committerNiranjan Pendharkar <npendhar@codeaurora.org>2017-04-27 13:43:41 -0700
commit257430b7839535341e76fecad62bf96c1b0026be (patch)
treef4a46952c235443abbcd8397d2f52f1e0becfcc3 /tetheroffload/config/1.0
parent9af336425e2172a9639480a5399ad0e55e3f43c1 (diff)
downloadandroid_hardware_interfaces-257430b7839535341e76fecad62bf96c1b0026be.tar.gz
android_hardware_interfaces-257430b7839535341e76fecad62bf96c1b0026be.tar.bz2
android_hardware_interfaces-257430b7839535341e76fecad62bf96c1b0026be.zip
Tether Offload HAL
Adds new interfaces to perform hardware optimized tethering offload. Test: as follows - built (bullhead) - flashed - booted - "runtest frameworks-net" passes Bug:34361337 Change-Id: I1ed756306e1efe98bd2703df9c9846a50a87ffcd
Diffstat (limited to 'tetheroffload/config/1.0')
-rw-r--r--tetheroffload/config/1.0/Android.bp60
-rw-r--r--tetheroffload/config/1.0/IOffloadConfig.hal36
2 files changed, 96 insertions, 0 deletions
diff --git a/tetheroffload/config/1.0/Android.bp b/tetheroffload/config/1.0/Android.bp
new file mode 100644
index 000000000..7eac6b006
--- /dev/null
+++ b/tetheroffload/config/1.0/Android.bp
@@ -0,0 +1,60 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "android.hardware.tetheroffload.config@1.0_hal",
+ srcs: [
+ "IOffloadConfig.hal",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tetheroffload.config@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
+ srcs: [
+ ":android.hardware.tetheroffload.config@1.0_hal",
+ ],
+ out: [
+ "android/hardware/tetheroffload/config/1.0/OffloadConfigAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tetheroffload.config@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
+ srcs: [
+ ":android.hardware.tetheroffload.config@1.0_hal",
+ ],
+ out: [
+ "android/hardware/tetheroffload/config/1.0/IOffloadConfig.h",
+ "android/hardware/tetheroffload/config/1.0/IHwOffloadConfig.h",
+ "android/hardware/tetheroffload/config/1.0/BnHwOffloadConfig.h",
+ "android/hardware/tetheroffload/config/1.0/BpHwOffloadConfig.h",
+ "android/hardware/tetheroffload/config/1.0/BsOffloadConfig.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tetheroffload.config@1.0",
+ generated_sources: ["android.hardware.tetheroffload.config@1.0_genc++"],
+ generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/tetheroffload/config/1.0/IOffloadConfig.hal b/tetheroffload/config/1.0/IOffloadConfig.hal
new file mode 100644
index 000000000..4d285da7c
--- /dev/null
+++ b/tetheroffload/config/1.0/IOffloadConfig.hal
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tetheroffload.config@1.0;
+
+
+/**
+ * Interface used for configuring the hardware management process
+ */
+interface IOffloadConfig {
+ /**
+ * Provides bound netlink file descriptors for use in the management process
+ *
+ * @param fd1 A file descriptor bound to the following netlink groups
+ * (NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY).
+ * @param fd2 A file descriptor bound to the following netlink groups
+ * (NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY).
+ *
+ * @return success true if successful, false otherwise
+ * @return errMsg a human readable string if eror has occured.
+ */
+ setHandles(handle fd1, handle fd2) generates (bool success, string errMsg);
+};