diff options
author | San Mehat <san@google.com> | 2010-04-21 15:41:27 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-04-21 15:41:27 -0700 |
commit | c688c922a1060eb0efc53d5ed4d4b59d65840c4a (patch) | |
tree | d794ddb7083ad2c46e986e7ebfb46d9b64728bfd | |
parent | 87ebb23d373dbaeafa0ede7b423fa58ce81d6551 (diff) | |
parent | c5b66ed439aab1843d40a629347852359ba2ae70 (diff) | |
download | iproute2-c688c922a1060eb0efc53d5ed4d4b59d65840c4a.tar.gz |
am c5b66ed4: tc: Add ingress/mirred support
Merge commit 'c5b66ed439aab1843d40a629347852359ba2ae70' into kraken
* commit 'c5b66ed439aab1843d40a629347852359ba2ae70':
tc: Add ingress/mirred support
-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 86dbc973..e405487e 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; |