bpf_tethering.h -> offload.h
match header file with bpf program
Locations to change found via:
https://source.corp.google.com/search?q=p:aosp-master%20(%5E%7C%5B%5E_%5D)bpf_tethering.h
Core reasoning for this will be to match the .h naming
that we'll have for netd.c and clatd.c once we get rid of bpf_shared.h
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4154659c7fb23a37f5316a5c804fb2606d842e9c
diff --git a/Tethering/jni/com_android_networkstack_tethering_BpfCoordinator.cpp b/Tethering/jni/com_android_networkstack_tethering_BpfCoordinator.cpp
index 27357f8..c8c86bc 100644
--- a/Tethering/jni/com_android_networkstack_tethering_BpfCoordinator.cpp
+++ b/Tethering/jni/com_android_networkstack_tethering_BpfCoordinator.cpp
@@ -17,7 +17,7 @@
#include <jni.h>
#include <nativehelper/JNIHelp.h>
-#include "bpf_tethering.h"
+#include "offload.h"
namespace android {
diff --git a/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java b/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
index 6a5089d..51c7c9c 100644
--- a/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
+++ b/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
@@ -126,7 +126,7 @@
private static final String DUMPSYS_RAWMAP_ARG_STATS = "--stats";
private static final String DUMPSYS_RAWMAP_ARG_UPSTREAM4 = "--upstream4";
- /** The names of all the BPF counters defined in bpf_tethering.h. */
+ /** The names of all the BPF counters defined in offload.h. */
public static final String[] sBpfCounterNames = getBpfCounterNames();
private static String makeMapPath(String which) {
diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
index 225fed7..53984a8 100644
--- a/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
+++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
@@ -2180,7 +2180,7 @@
new TetherDevValue(UPSTREAM_IFINDEX));
// dumpCounters
- // The error code is defined in packages/modules/Connectivity/bpf_progs/bpf_tethering.h.
+ // The error code is defined in packages/modules/Connectivity/bpf_progs/offload.h.
mBpfErrorMap.insertEntry(
new S32(0 /* INVALID_IPV4_VERSION */),
new S32(1000 /* count */));
diff --git a/bpf_progs/offload.c b/bpf_progs/offload.c
index e211d68..a8612df 100644
--- a/bpf_progs/offload.c
+++ b/bpf_progs/offload.c
@@ -48,7 +48,7 @@
#include "bpf_helpers.h"
#include "bpf_net_helpers.h"
-#include "bpf_tethering.h"
+#include "offload.h"
// From kernel:include/net/ip.h
#define IP_DF 0x4000 // Flag: "Don't Fragment"
diff --git a/bpf_progs/bpf_tethering.h b/bpf_progs/offload.h
similarity index 100%
rename from bpf_progs/bpf_tethering.h
rename to bpf_progs/offload.h
diff --git a/bpf_progs/test.c b/bpf_progs/test.c
index c11c358..d1f780f 100644
--- a/bpf_progs/test.c
+++ b/bpf_progs/test.c
@@ -46,7 +46,7 @@
#include "bpf_helpers.h"
#include "bpf_net_helpers.h"
-#include "bpf_tethering.h"
+#include "offload.h"
// Used only by TetheringPrivilegedTests, not by production code.
DEFINE_BPF_MAP_GRW(tether_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,