| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.5"/> |
| <title>Apache Mesos: src/linux/routing/filter/action.hpp Source File</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Apache Mesos |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.5 --> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="pages.html"><span>Related Pages</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li><a href="annotated.html"><span>Classes</span></a></li> |
| <li class="current"><a href="files.html"><span>Files</span></a></li> |
| <li><a href="examples.html"><span>Examples</span></a></li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="files.html"><span>File List</span></a></li> |
| <li><a href="globals.html"><span>File Members</span></a></li> |
| </ul> |
| </div> |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_a18918b93668b435612395bbc2e8b82b.html">linux</a></li><li class="navelem"><a class="el" href="dir_cfcc063d6e54f12d25bee1413151fa14.html">routing</a></li><li class="navelem"><a class="el" href="dir_63ee66d07d6d294d2c7a805464cff705.html">filter</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">action.hpp</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <a href="action_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed to the Apache Software Foundation (ASF) under one</span></div> |
| <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// or more contributor license agreements. See the NOTICE file</span></div> |
| <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// distributed with this work for additional information</span></div> |
| <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// regarding copyright ownership. The ASF licenses this file</span></div> |
| <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// to you under the Apache License, Version 2.0 (the</span></div> |
| <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// "License"); you may not use this file except in compliance</span></div> |
| <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// with the License. You may obtain a copy of the License at</span></div> |
| <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> |
| <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">//</span></div> |
| <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> |
| <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> |
| <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> |
| <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> |
| <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// limitations under the License.</span></div> |
| <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div> |
| <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#ifndef __LINUX_ROUTING_FILTER_ACTION_HPP__</span></div> |
| <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor"></span><span class="preprocessor">#define __LINUX_ROUTING_FILTER_ACTION_HPP__</span></div> |
| <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor"></span></div> |
| <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <set></span></div> |
| <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <string></span></div> |
| <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div> |
| <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">namespace </span>routing {</div> |
| <div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="namespacerouting_1_1action.html"> 24</a></span> <span class="keyword">namespace </span>action {</div> |
| <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> |
| <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// Base class for filter actions.</span></div> |
| <div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classrouting_1_1action_1_1Action.html"> 27</a></span> <span class="keyword">class </span><a class="code" href="classrouting_1_1action_1_1Action.html">Action</a></div> |
| <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> {</div> |
| <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">public</span>:</div> |
| <div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classrouting_1_1action_1_1Action.html#a1b8257c0bea7cdfeffd331487100d336"> 30</a></span>  <span class="keyword">virtual</span> <a class="code" href="classrouting_1_1action_1_1Action.html#a1b8257c0bea7cdfeffd331487100d336">~Action</a>() {}</div> |
| <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> |
| <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">protected</span>:</div> |
| <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="comment">// Hide the default constructor.</span></div> |
| <div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classrouting_1_1action_1_1Action.html#a88ceaa1ea2437ea132ec7266906c9f7a"> 34</a></span>  <a class="code" href="classrouting_1_1action_1_1Action.html#a88ceaa1ea2437ea132ec7266906c9f7a">Action</a>() {}</div> |
| <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> };</div> |
| <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div> |
| <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div> |
| <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// Represents an action that redirects a packet to a given link.</span></div> |
| <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// Currently, kernel only supports redirecting to the egress of a</span></div> |
| <div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// given link.</span></div> |
| <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Redirect.html"> 41</a></span> <span class="keyword">struct </span><a class="code" href="structrouting_1_1action_1_1Redirect.html">Redirect</a> : <span class="keyword">public</span> <a class="code" href="classrouting_1_1action_1_1Action.html">Action</a></div> |
| <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div> |
| <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Redirect.html#a104ef8d4084c6d195ab50a3cd01fd239"> 43</a></span>  <span class="keyword">explicit</span> <a class="code" href="structrouting_1_1action_1_1Redirect.html#a104ef8d4084c6d195ab50a3cd01fd239">Redirect</a>(<span class="keyword">const</span> std::string& _link)</div> |
| <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  : <a class="code" href="structrouting_1_1action_1_1Redirect.html#a0e300417a11c82969cd5aa5c9a336fa3">link</a>(_link) {}</div> |
| <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div> |
| <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">// The link to which the packet will be redirected.</span></div> |
| <div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Redirect.html#a0e300417a11c82969cd5aa5c9a336fa3"> 47</a></span>  std::string <a class="code" href="structrouting_1_1action_1_1Redirect.html#a0e300417a11c82969cd5aa5c9a336fa3">link</a>;</div> |
| <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> };</div> |
| <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> |
| <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div> |
| <div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// Represents an action that mirrors a packet to a set of links.</span></div> |
| <div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// Currently, kernel only supports mirroring to the egress of each</span></div> |
| <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// link.</span></div> |
| <div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Mirror.html"> 54</a></span> <span class="keyword">struct </span><a class="code" href="structrouting_1_1action_1_1Mirror.html">Mirror</a> : <span class="keyword">public</span> <a class="code" href="classrouting_1_1action_1_1Action.html">Action</a></div> |
| <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> {</div> |
| <div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Mirror.html#af91400c679a25ac1ba29a2186e8f5022"> 56</a></span>  <span class="keyword">explicit</span> <a class="code" href="structrouting_1_1action_1_1Mirror.html#af91400c679a25ac1ba29a2186e8f5022">Mirror</a>(<span class="keyword">const</span> std::set<std::string>& _links)</div> |
| <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  : <a class="code" href="structrouting_1_1action_1_1Mirror.html#a1b3c67466ff6b45287f384ae3c5b6807">links</a>(_links) {}</div> |
| <div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div> |
| <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="comment">// The set of links to which the packet will be mirrored.</span></div> |
| <div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Mirror.html#a1b3c67466ff6b45287f384ae3c5b6807"> 60</a></span>  std::set<std::string> <a class="code" href="structrouting_1_1action_1_1Mirror.html#a1b3c67466ff6b45287f384ae3c5b6807">links</a>;</div> |
| <div class="line"><a name="l00061"></a><span class="lineno"> 61</span> };</div> |
| <div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div> |
| <div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div> |
| <div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// Represents an action that stops the packet from being sent to the</span></div> |
| <div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// next filter.</span></div> |
| <div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structrouting_1_1action_1_1Terminal.html"> 66</a></span> <span class="keyword">struct </span><a class="code" href="structrouting_1_1action_1_1Terminal.html">Terminal</a> : <span class="keyword">public</span> <a class="code" href="classrouting_1_1action_1_1Action.html">Action</a> {};</div> |
| <div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div> |
| <div class="line"><a name="l00068"></a><span class="lineno"> 68</span> } <span class="comment">// namespace action {</span></div> |
| <div class="line"><a name="l00069"></a><span class="lineno"> 69</span> } <span class="comment">// namespace routing {</span></div> |
| <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div> |
| <div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor">#endif // __LINUX_ROUTING_FILTER_ACTION_HPP__</span></div> |
| <div class="ttc" id="classrouting_1_1action_1_1Action_html_a1b8257c0bea7cdfeffd331487100d336"><div class="ttname"><a href="classrouting_1_1action_1_1Action.html#a1b8257c0bea7cdfeffd331487100d336">routing::action::Action::~Action</a></div><div class="ttdeci">virtual ~Action()</div><div class="ttdef"><b>Definition:</b> action.hpp:30</div></div> |
| <div class="ttc" id="classrouting_1_1action_1_1Action_html_a88ceaa1ea2437ea132ec7266906c9f7a"><div class="ttname"><a href="classrouting_1_1action_1_1Action.html#a88ceaa1ea2437ea132ec7266906c9f7a">routing::action::Action::Action</a></div><div class="ttdeci">Action()</div><div class="ttdef"><b>Definition:</b> action.hpp:34</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Mirror_html_a1b3c67466ff6b45287f384ae3c5b6807"><div class="ttname"><a href="structrouting_1_1action_1_1Mirror.html#a1b3c67466ff6b45287f384ae3c5b6807">routing::action::Mirror::links</a></div><div class="ttdeci">std::set< std::string > links</div><div class="ttdef"><b>Definition:</b> action.hpp:60</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Terminal_html"><div class="ttname"><a href="structrouting_1_1action_1_1Terminal.html">routing::action::Terminal</a></div><div class="ttdef"><b>Definition:</b> action.hpp:66</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Redirect_html"><div class="ttname"><a href="structrouting_1_1action_1_1Redirect.html">routing::action::Redirect</a></div><div class="ttdef"><b>Definition:</b> action.hpp:41</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Mirror_html_af91400c679a25ac1ba29a2186e8f5022"><div class="ttname"><a href="structrouting_1_1action_1_1Mirror.html#af91400c679a25ac1ba29a2186e8f5022">routing::action::Mirror::Mirror</a></div><div class="ttdeci">Mirror(const std::set< std::string > &_links)</div><div class="ttdef"><b>Definition:</b> action.hpp:56</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Redirect_html_a104ef8d4084c6d195ab50a3cd01fd239"><div class="ttname"><a href="structrouting_1_1action_1_1Redirect.html#a104ef8d4084c6d195ab50a3cd01fd239">routing::action::Redirect::Redirect</a></div><div class="ttdeci">Redirect(const std::string &_link)</div><div class="ttdef"><b>Definition:</b> action.hpp:43</div></div> |
| <div class="ttc" id="classrouting_1_1action_1_1Action_html"><div class="ttname"><a href="classrouting_1_1action_1_1Action.html">routing::action::Action</a></div><div class="ttdef"><b>Definition:</b> action.hpp:27</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Mirror_html"><div class="ttname"><a href="structrouting_1_1action_1_1Mirror.html">routing::action::Mirror</a></div><div class="ttdef"><b>Definition:</b> action.hpp:54</div></div> |
| <div class="ttc" id="structrouting_1_1action_1_1Redirect_html_a0e300417a11c82969cd5aa5c9a336fa3"><div class="ttname"><a href="structrouting_1_1action_1_1Redirect.html#a0e300417a11c82969cd5aa5c9a336fa3">routing::action::Redirect::link</a></div><div class="ttdeci">std::string link</div><div class="ttdef"><b>Definition:</b> action.hpp:47</div></div> |
| </div><!-- fragment --></div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.5 |
| </small></address> |
| </body> |
| </html> |