<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to send the FlowMod message to Controller ！！！ in Software Defined Networking</title>
    <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6609928#M1571</link>
    <description>&lt;P&gt;&lt;SPAN class="login-bold"&gt;HI,&amp;nbsp;&lt;A target="_self" href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1449823"&gt;sdnindia&lt;/A&gt;! I found Below codes (&lt;EM&gt;see dashed&amp;nbsp;line&amp;nbsp;&lt;/EM&gt;)are userd to send FlowMode message in this forum. But codes don't work in my PC, when i called function "SendFlowMode" ,it doesn't work, and it returns &amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;null&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;to me. Below codes are My send FlowMod message codes :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DataPathId dpid=DataPathId.valueof("00:03:9c:b6:54:cb:c6:80");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ControllerService cs =new ControllerServiceAdapter();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MessageFuture mf=cs.sendFlowMod(flow,dpid); &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;// flow already created &amp;nbsp;and i'm sure it correct, created flowmod &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp; &amp;nbsp;message codes are from HP VAN SDN Controller Programming Guide.pdf on Page 27-29.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp;when i run the codes, the&amp;nbsp;statement "System.out.println(mf)" output null in Eclipse Console.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;By the way, other functions such as getAllDataPathInfo(), getDataPathInfo(DataPathId dpid); they all return &lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;null&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;.i use HP-2920 switch, and Contrlloer version is 2.0 , API document &amp;nbsp;and hp-sdn-sdk version are both 2.0!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below are the steps to send the FlowMod message&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Construct OfmMutableFlowMod&amp;nbsp;&lt;/P&gt;&lt;P&gt;OfmMutableFlowMod mod = (OfmMutableFlowMod) MessageFactory .create(pv, MessageType.FLOW_MOD);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Assemble the match fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add the values to flow mod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Convert to Immutable&lt;/P&gt;&lt;P&gt;OfmFlowMod flow = (OfmFlowMod)mod.toImmutable();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;//Call the method&lt;/P&gt;&lt;P&gt;cs.sendFlowMod(flow, dpInfo.dpid());&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;// Here dpInfo is of type DataPathInfo and cs is of type ControllerService&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------/&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2014 06:57:44 GMT</pubDate>
    <dc:creator>Yuanxiance</dc:creator>
    <dc:date>2014-09-11T06:57:44Z</dc:date>
    <item>
      <title>How to send the FlowMod message to Controller ！！！</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6609928#M1571</link>
      <description>&lt;P&gt;&lt;SPAN class="login-bold"&gt;HI,&amp;nbsp;&lt;A target="_self" href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1449823"&gt;sdnindia&lt;/A&gt;! I found Below codes (&lt;EM&gt;see dashed&amp;nbsp;line&amp;nbsp;&lt;/EM&gt;)are userd to send FlowMode message in this forum. But codes don't work in my PC, when i called function "SendFlowMode" ,it doesn't work, and it returns &amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;null&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;to me. Below codes are My send FlowMod message codes :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DataPathId dpid=DataPathId.valueof("00:03:9c:b6:54:cb:c6:80");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ControllerService cs =new ControllerServiceAdapter();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MessageFuture mf=cs.sendFlowMod(flow,dpid); &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;// flow already created &amp;nbsp;and i'm sure it correct, created flowmod &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp; &amp;nbsp;message codes are from HP VAN SDN Controller Programming Guide.pdf on Page 27-29.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp;when i run the codes, the&amp;nbsp;statement "System.out.println(mf)" output null in Eclipse Console.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="login-bold"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;By the way, other functions such as getAllDataPathInfo(), getDataPathInfo(DataPathId dpid); they all return &lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;null&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;.i use HP-2920 switch, and Contrlloer version is 2.0 , API document &amp;nbsp;and hp-sdn-sdk version are both 2.0!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below are the steps to send the FlowMod message&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Construct OfmMutableFlowMod&amp;nbsp;&lt;/P&gt;&lt;P&gt;OfmMutableFlowMod mod = (OfmMutableFlowMod) MessageFactory .create(pv, MessageType.FLOW_MOD);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Assemble the match fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add the values to flow mod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Convert to Immutable&lt;/P&gt;&lt;P&gt;OfmFlowMod flow = (OfmFlowMod)mod.toImmutable();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;//Call the method&lt;/P&gt;&lt;P&gt;cs.sendFlowMod(flow, dpInfo.dpid());&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;// Here dpInfo is of type DataPathInfo and cs is of type ControllerService&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------/&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 06:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6609928#M1571</guid>
      <dc:creator>Yuanxiance</dc:creator>
      <dc:date>2014-09-11T06:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to send the FlowMod message to Controller ！！！</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6624290#M1572</link>
      <description>&lt;P&gt;Hello Yuanxiance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since sendFlowMod() function is returning null so please check if the argument for this function i.e. flow as well as dpid have proper values.Also&amp;nbsp; getAllDataPathInfo(), getDataPathInfo(DataPathId dpid) functions are returning null so it looks like dpid is not having some proper value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per Programming guide page 31 you can use&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;private ControllerService cs = ...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can have private static ControllerService mControllerService;&amp;nbsp; in your class and initialize that member and call sendFlowMod function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you still face the issue please share the code for flow creation and for dpid initialization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;HP SDN Team&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 06:47:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6624290#M1572</guid>
      <dc:creator>sdnindia</dc:creator>
      <dc:date>2014-09-19T06:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to send the FlowMod message to Controller ！！！</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6630708#M1573</link>
      <description>&lt;P&gt;Hi,sdnindia!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I want to know this statement &lt;SPAN&gt;&amp;nbsp;"private ControllerService cs = ...;" mean. In&amp;nbsp;Programming guide page 31, How to understand "it is assumed that a reference to the controller service implementation has been stored in the field &lt;EM&gt;cs&lt;/EM&gt;" , Can you give some example codes to help me ? How to initialize it's member? In my class ,i &amp;nbsp;i&lt;SPAN&gt;nitialize &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;ControllerService by invoke&amp;nbsp;ControllerServiceAdapter constructor! i use statement &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"ControllerService cs = new ControllerServiceAdapter() "; Below codes in main function, when i run i can't get DataPathInfo,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;00:03:9c:b6:54:cb:c6:80 &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN class="login-bold"&gt;" this string i got from https://localhost:8443/sdn/ui , &amp;nbsp;The "OpenFlow Monitor" module give all switch's Data Path Id. &amp;nbsp;Hope you give some advice as soon as possible! Thanks ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;DataPathId dpid=DataPathId.valueof("00:03:9c:b6:54:cb:c6:80");&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;ControllerService cs =new ControllerServiceAdapter();&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;System.out.println(cs.getDataPathInfo(dpid)); &amp;nbsp; &amp;nbsp; //return NULL, what's the problem?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;--------------------------------------------------------&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2014 02:55:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6630708#M1573</guid>
      <dc:creator>harcy</dc:creator>
      <dc:date>2014-09-26T02:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to send the FlowMod message to Controller ！！！</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6632784#M1574</link>
      <description>&lt;P&gt;Hello harcy,&lt;BR /&gt;&lt;BR /&gt;In some class(for e.g. OfMonitorComponent as in below ) there can be a data member cs of type ControllerService&amp;nbsp;&amp;nbsp; and some function&amp;nbsp; for e.g. bindControllerService which initialize the data member cs&amp;nbsp; as below-&lt;BR /&gt;public class OfMonitorComponent implements OfMonitor {&lt;BR /&gt;…&lt;BR /&gt;private volatile ControllerService cs;&lt;BR /&gt;…&lt;BR /&gt;&lt;BR /&gt;protected void bindControllerService(ControllerService service) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cs = service;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;..&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;In your code cs.getDataPathInfo(dpid) is returning NULL so please make sure both cs and dpid have soem value.&lt;BR /&gt;&lt;BR /&gt;Please try as per above code snippets and let us know if this solve your problem or you still face the issue.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;HP SDN Team&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 06:36:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6632784#M1574</guid>
      <dc:creator>sdnindia</dc:creator>
      <dc:date>2014-09-29T06:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to send the FlowMod message to Controller ！！！</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6714846#M1575</link>
      <description>&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please note that We have also tried with&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#333399"&gt;ControllerService cs = new ControllerServiceAdapter();&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#333399"&gt;logger&lt;FONT size="2"&gt;.info(&lt;/FONT&gt;&lt;FONT size="2"&gt;"DataPath Info: {}"&lt;/FONT&gt;&lt;FONT size="2"&gt;, &lt;/FONT&gt;&lt;FONT size="2"&gt;cs&lt;/FONT&gt;&lt;FONT size="2"&gt;.getAllDataPathInfo());&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what you have suggested in the above post, but still we are getting null;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Request to please advice me on this,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Consolas" size="2" color="black"&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Consolas" size="2" color="black"&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Consolas" size="2" color="black"&gt;&lt;SPAN&gt;Chethan&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Mar 2015 14:18:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6714846#M1575</guid>
      <dc:creator>Chethan_R</dc:creator>
      <dc:date>2015-03-02T14:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to send the FlowMod message to Controller ！！！</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6764308#M1576</link>
      <description>&lt;P&gt;Try compiling and deploying the attached application. It is a very minimal application that activates and deactivates the controllerservice object. After deploying the application on the controller try to put some traffic across the network, then post the related lines from the log located at /opt/sdn/virgo/serviceability/logs/log.log. Note, you will need sudo access to get to the log.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 14:23:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-send-the-flowmod-message-to-controller/m-p/6764308#M1576</guid>
      <dc:creator>ssrirama</dc:creator>
      <dc:date>2015-07-13T14:23:56Z</dc:date>
    </item>
  </channel>
</rss>

