OffloadUtils - implement getTetherIngressProgFd()

Test: build, atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibbc655a483507624c2b340bdb7f3f0b311a90722
diff --git a/server/OffloadUtilsTest.cpp b/server/OffloadUtilsTest.cpp
index a893588..e4316a7 100644
--- a/server/OffloadUtilsTest.cpp
+++ b/server/OffloadUtilsTest.cpp
@@ -121,6 +121,26 @@
     close(fd);
 }
 
+TEST_F(OffloadUtilsTest, GetTetherIngressRawIpProgFd) {
+    // Currently only implementing downstream direction offload.
+    // RX Rawip -> TX Ether requires header adjustments and thus 4.14.
+    SKIP_IF_EXTENDED_BPF_NOT_SUPPORTED;
+
+    int fd = getTetherIngressProgFd(false);
+    ASSERT_LE(3, fd);
+    close(fd);
+}
+
+TEST_F(OffloadUtilsTest, GetTetherIngressEtherProgFd) {
+    // Currently only implementing downstream direction offload.
+    // RX Ether -> TX Ether does not require header adjustments
+    SKIP_IF_BPF_NOT_SUPPORTED;
+
+    int fd = getTetherIngressProgFd(true);
+    ASSERT_LE(3, fd);
+    close(fd);
+}
+
 TEST_F(OffloadUtilsTest, TryOpeningNetlinkSocket) {
     int fd = openNetlinkSocket();
     ASSERT_LE(3, fd);