diff options
author | San Mehat <san@google.com> | 2010-04-21 14:22:13 -0700 |
---|---|---|
committer | San Mehat <san@google.com> | 2010-04-21 14:22:13 -0700 |
commit | c5b66ed439aab1843d40a629347852359ba2ae70 (patch) | |
tree | 90d0cc6635f41fa16ea37b11d904c760c622463e | |
parent | b856938e2c00fefb701f906a90d545f92007ac96 (diff) | |
download | platform_external_iproute2-c5b66ed439aab1843d40a629347852359ba2ae70.tar.gz platform_external_iproute2-c5b66ed439aab1843d40a629347852359ba2ae70.tar.bz2 platform_external_iproute2-c5b66ed439aab1843d40a629347852359ba2ae70.zip |
tc: Add ingress/mirred support
Change-Id: I5c0096fee3232a6370dd4b8943fae37bffcd9973
Signed-off-by: San Mehat <san@google.com>
-rw-r--r-- | tc/Android.mk | 2 | ||||
-rw-r--r-- | tc/m_action.c | 13 | ||||
-rw-r--r-- | tc/tc.c | 3 |
3 files changed, 17 insertions, 1 deletions
diff --git a/tc/Android.mk b/tc/Android.mk index 4a63875f..9800eb5e 100644 --- a/tc/Android.mk +++ b/tc/Android.mk @@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir) 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 9f240228..7ec79d5b 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 @@ static int parse_noaopt(struct action_util *au, int *argc_p, char ***argv_p, int 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]; @@ -46,6 +46,7 @@ static struct filter_util * filter_list; #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 @@ struct qdisc_util *get_qdisc_kind(const char *str) #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; |