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/06/08 21:27:13 UTC
[2/3] mesos git commit: Added output stream operation for handle to
use in port_mapping.cpp.
Added output stream operation for handle to use in port_mapping.cpp.
Review: https://reviews.apache.org/r/35150
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1ea1fdbf
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1ea1fdbf
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1ea1fdbf
Branch: refs/heads/master
Commit: 1ea1fdbf9770212f6b92fdeff174494c9d873d09
Parents: c12b346
Author: Paul Brett <pa...@twopensource.com>
Authored: Mon Jun 8 12:22:38 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Jun 8 12:22:38 2015 -0700
----------------------------------------------------------------------
src/linux/routing/handle.hpp | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1ea1fdbf/src/linux/routing/handle.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/handle.hpp b/src/linux/routing/handle.hpp
index c107a7e..052c7cc 100644
--- a/src/linux/routing/handle.hpp
+++ b/src/linux/routing/handle.hpp
@@ -21,6 +21,8 @@
#include <stdint.h>
+#include <ostream>
+
#include <netlink/route/tc.h>
namespace routing {
@@ -66,6 +68,13 @@ protected:
};
+inline std::ostream& operator << (std::ostream& out, const Handle& handle)
+{
+ out << std::hex << handle.primary() << ":" << handle.secondary() << std::dec;
+ return out;
+}
+
+
// Packets flowing from the device driver to the network stack are
// called ingress traffic, and packets flowing from the network stack
// to the device driver are called egress traffic (shown below).