OffloadUtils - move tcFilterAddDev{Ingress,Egress}Bpf from .cpp to .h

There's no reason for these simple functions to be in the cpp.

Test: build, atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieca9c259472719db06a7f4e4c75acc25420c564a
diff --git a/server/OffloadUtils.cpp b/server/OffloadUtils.cpp
index ea4341c..ae1d5d4 100644
--- a/server/OffloadUtils.cpp
+++ b/server/OffloadUtils.cpp
@@ -181,8 +181,7 @@
 
 // tc filter add dev .. in/egress prio 1 protocol ipv6/ip bpf object-pinned /sys/fs/bpf/...
 // direct-action
-static int tcFilterAddDevBpf(int fd, int ifIndex, int bpfFd, bool ethernet, bool ingress,
-                             bool ipv6) {
+int tcFilterAddDevBpf(int fd, int ifIndex, int bpfFd, bool ethernet, bool ingress, bool ipv6) {
     // The priority doesn't matter until we actually start attaching multiple
     // things to the same interface's in/egress point.
     const __u32 prio = 1;
@@ -359,16 +358,6 @@
     return processNetlinkResponse(fd);
 }
 
-// tc filter add dev .. ingress prio 1 protocol ipv6 bpf object-pinned /sys/fs/bpf/... direct-action
-int tcFilterAddDevIngressBpf(int fd, int ifIndex, int bpfFd, bool ethernet) {
-    return tcFilterAddDevBpf(fd, ifIndex, bpfFd, ethernet, /*ingress*/ true, /*ipv6*/ true);
-}
-
-// tc filter add dev .. egress prio 1 protocol ip bpf object-pinned /sys/fs/bpf/... direct-action
-int tcFilterAddDevEgressBpf(int fd, int ifIndex, int bpfFd, bool ethernet) {
-    return tcFilterAddDevBpf(fd, ifIndex, bpfFd, ethernet, /*ingress*/ false, /*ipv6*/ false);
-}
-
 // tc filter del dev .. in/egress prio .. protocol ..
 int tcFilterDelDev(int fd, int ifIndex, bool ingress, uint16_t prio, uint16_t proto) {
     struct {
diff --git a/server/OffloadUtils.h b/server/OffloadUtils.h
index 3ab1db3..022ef4b 100644
--- a/server/OffloadUtils.h
+++ b/server/OffloadUtils.h
@@ -70,8 +70,19 @@
     return doTcQdiscClsact(fd, ifIndex, RTM_DELQDISC, 0);
 }
 
-int tcFilterAddDevIngressBpf(int fd, int ifIndex, int bpfFd, bool ethernet);
-int tcFilterAddDevEgressBpf(int fd, int ifIndex, int bpfFd, bool ethernet);
+// tc filter add dev .. in/egress prio 1 protocol ipv6/ip bpf object-pinned /sys/fs/bpf/...
+// direct-action
+int tcFilterAddDevBpf(int fd, int ifIndex, int bpfFd, bool ethernet, bool ingress, bool ipv6);
+
+// tc filter add dev .. ingress prio 1 protocol ipv6 bpf object-pinned /sys/fs/bpf/... direct-action
+static inline int tcFilterAddDevIngressBpf(int fd, int ifIndex, int bpfFd, bool ethernet) {
+    return tcFilterAddDevBpf(fd, ifIndex, bpfFd, ethernet, /*ingress*/ true, /*ipv6*/ true);
+}
+
+// tc filter add dev .. egress prio 1 protocol ip bpf object-pinned /sys/fs/bpf/... direct-action
+static inline int tcFilterAddDevEgressBpf(int fd, int ifIndex, int bpfFd, bool ethernet) {
+    return tcFilterAddDevBpf(fd, ifIndex, bpfFd, ethernet, /*ingress*/ false, /*ipv6*/ false);
+}
 
 // tc filter del dev .. in/egress prio .. protocol ..
 int tcFilterDelDev(int fd, int ifIndex, bool ingress, uint16_t prio, uint16_t proto);