ClatUtils - implement getClatProgFd()

Test: atest netd_unit_test
Bug: 65674744
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I74464c2ed27ac650e3ce6c23a9301b028a9da97c
diff --git a/server/ClatUtilsTest.cpp b/server/ClatUtilsTest.cpp
index 6bd7048..6321e16 100644
--- a/server/ClatUtilsTest.cpp
+++ b/server/ClatUtilsTest.cpp
@@ -70,5 +70,19 @@
     EXPECT_LE(3, ufd);  // 0,1,2 - stdin/out/err, thus 3 <= fd
 }
 
+TEST_F(ClatUtilsTest, GetClatRawIpProgFd) {
+    SKIP_IF_BPF_NOT_SUPPORTED;
+
+    base::unique_fd ufd(getClatProgFd(false));
+    EXPECT_LE(3, ufd);
+}
+
+TEST_F(ClatUtilsTest, GetClatEtherProgFd) {
+    SKIP_IF_BPF_NOT_SUPPORTED;
+
+    base::unique_fd ufd(getClatProgFd(true));
+    EXPECT_LE(3, ufd);
+}
+
 }  // namespace net
 }  // namespace android