am c5b66ed4: tc: Add ingress/mirred support

Merge commit 'c5b66ed439aab1843d40a629347852359ba2ae70' into kraken

* commit 'c5b66ed439aab1843d40a629347852359ba2ae70':
  tc: Add ingress/mirred support
diff --git a/tc/Android.mk b/tc/Android.mk
index 86dbc97..e405487 100644
--- a/tc/Android.mk
+++ b/tc/Android.mk
@@ -3,7 +3,7 @@
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES :=  tc.c tc_qdisc.c q_cbq.c tc_util.c tc_class.c tc_core.c m_action.c \
                     m_estimator.c tc_filter.c tc_monitor.c tc_stab.c tc_cbq.c \
-                    tc_estimator.c f_u32.c m_police.c
+                    tc_estimator.c f_u32.c m_police.c q_ingress.c m_mirred.c
 
 LOCAL_MODULE := tc
 
diff --git a/tc/m_action.c b/tc/m_action.c
index 9f24022..7ec79d5 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -29,6 +29,11 @@
 #include "tc_util.h"
 
 static struct action_util * action_list;
+
+#ifdef ANDROID
+extern struct action_util mirred_action_util;
+#endif
+
 #ifdef CONFIG_GACT
 int gact_ld = 0 ; //fuckin backward compatibility
 #endif
@@ -85,6 +90,14 @@
 
 struct action_util *get_action_kind(char *str)
 {
+#ifdef ANDROID
+	if (!strcmp(str, "mirred")) {
+		return &mirred_action_util;
+	} else {
+		fprintf(stderr, "Android does not support action '%s'", str);
+		return NULL;
+	}
+#endif
 	static void *aBODY;
 	void *dlh;
 	char buf[256];
diff --git a/tc/tc.c b/tc/tc.c
index 68a6a75..14ff85f 100644
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -46,6 +46,7 @@
 
 #ifdef ANDROID
 extern struct qdisc_util cbq_qdisc_util;
+extern struct qdisc_util ingress_qdisc_util;
 extern struct filter_util u32_filter_util;
 #endif
 
@@ -105,6 +106,8 @@
 #ifdef ANDROID
 	if (!strcmp(str, "cbq"))
 		return &cbq_qdisc_util;
+	else if (!strcmp(str, "ingress"))
+		return &ingress_qdisc_util;
 	else {
 		fprintf(stderr, "Android does not support '%s'\n", str);
 		return NULL;