<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>There are two aspects to intelligently handling vendor messages.</div><div><br></div><div>The first is to hook the vendor message unpacking process in libopenflow so that it can unpack your vendor message into a custom class.</div><div><br></div><div>The second is hooking how core.openflow handles vendor messages.  Usually this will mean raising a custom event type in response.</div><div><br></div><div>Presently, how you do either of the above is not particularly beautiful.  There's an example in openflow.nicira.  _init_unpacker() does the former, _init_handler() does the latter (actually, it raises an existing event -- to raise a new event, you'd have to define the Event subclass and then add it to core.openflow and Connection's _eventMixin_events).</div><div><br></div><div>You could actually skip the event generation (and even the custom unpacking if you really wanted...) and just hook the handler so that it came to your function instead of the original.  This is basically what _init_handler() does.</div><div><br></div><div>-- Murphy</div><div><br></div><div><div><div><div>On Jul 29, 2013, at 3:35 PM, adria sole wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi all,<div><br></div><div>I want to unpack a vendor message but I first have problems for handling the vendor message. </div><div><br></div><div>In my_component.py I have created an:</div><div><div>def handle_VENDOR (con, msg):</div>
<div>    <a href="http://log.info/">log.info</a>("ADRIA Vendor msg: " + str(msg))</div></div><div><br></div><div>But instead of printing the information from my_component.py it is printed by of_01.py in:</div><div>
def handle_VENDOR (con, msg):</div><div>  <a href="http://log.info/">log.info</a>("Vendor msg: " + str(msg))</div><div><br></div><div>How can I handle a vendor message? The code of my_component.py is very similiar to l2_learning.py.</div>
<div><br></div><div>Thank you in advance!</div><div><br></div><div>Adrià Solé</div></div>
</blockquote></div><br></div></div></body></html>