You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/03/10 21:52:30 UTC
mesos git commit: Added an interface to get all IP packet filters.
Repository: mesos
Updated Branches:
refs/heads/master d93906aea -> da1b7161e
Added an interface to get all IP packet filters.
Review: https://reviews.apache.org/r/31870
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/da1b7161
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/da1b7161
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/da1b7161
Branch: refs/heads/master
Commit: da1b7161e05623d968483c9ebcb85896239c2b74
Parents: d93906a
Author: Jie Yu <yu...@gmail.com>
Authored: Tue Mar 10 13:51:52 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Mar 10 13:51:53 2015 -0700
----------------------------------------------------------------------
src/linux/routing/filter/filter.hpp | 6 +++---
src/linux/routing/filter/ip.cpp | 8 ++++++++
src/linux/routing/filter/ip.hpp | 7 +++++++
3 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/da1b7161/src/linux/routing/filter/filter.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/filter/filter.hpp b/src/linux/routing/filter/filter.hpp
index 194703f..d4ea099 100644
--- a/src/linux/routing/filter/filter.hpp
+++ b/src/linux/routing/filter/filter.hpp
@@ -42,9 +42,9 @@ namespace filter {
// satisfies the conditions specified in the classifier. If the
// priority is not specified, the kernel will assign a priority to the
// filter.
-// TODO(jieyu): Currently, this data structure is not directly exposed
-// to the user because libnl does not support getting actions of a
-// filter. Expose this data structure once libnl fixes the issue.
+// TODO(jieyu): Currently, libnl does not support getting all actions
+// associated with a filter. In other words, the list of actions
+// obtained from the filter might not be the complete list.
template <typename Classifier>
class Filter
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/da1b7161/src/linux/routing/filter/ip.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/filter/ip.cpp b/src/linux/routing/filter/ip.cpp
index 9d8639b..de64071 100644
--- a/src/linux/routing/filter/ip.cpp
+++ b/src/linux/routing/filter/ip.cpp
@@ -528,6 +528,14 @@ Try<bool> remove(
}
+Result<vector<Filter<Classifier>>> filters(
+ const string& link,
+ const queueing::Handle& parent)
+{
+ return internal::filters<Classifier>(link, parent);
+}
+
+
Result<vector<Classifier>> classifiers(
const string& link,
const queueing::Handle& parent)
http://git-wip-us.apache.org/repos/asf/mesos/blob/da1b7161/src/linux/routing/filter/ip.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/filter/ip.hpp b/src/linux/routing/filter/ip.hpp
index 0d1dd50..b540602 100644
--- a/src/linux/routing/filter/ip.hpp
+++ b/src/linux/routing/filter/ip.hpp
@@ -197,6 +197,13 @@ Try<bool> remove(
const Classifier& classifier);
+// Returns all the IP packet filters attached to the given parent on
+// the link. Returns none if the link or the parent is not found.
+Result<std::vector<Filter<Classifier>>> filters(
+ const std::string& link,
+ const queueing::Handle& parent);
+
+
// Returns the classifiers of all the IP packet filters attached to
// the given parent on the link. Returns none if the link or the
// parent is not found.