[pox-dev] DCell riplpox 'L' format error

AMER amer7777 at hotmail.com
Thu May 21 04:14:24 PDT 2015


On May 8, 2015, at 9:49 PM, 博威张 <zbw921124 at gmail.com> wrote:

> Hi,
> 
> I have following confusions about the class of Switch (EventMixin) in l2_multi :
> 1.No instance of the class of Switch (EventMixin) has been found in component of l2_multi, so how does it work? 

Sure there are instances of it.  The l2_multi class creates instances in response to ConnectionUp events.

> 2. It doesn't listen to any components(including the core.openflow) , so how will the function of _handle_PacketIn work?

It listens to Connection objects.  Switch.connect() does this by a call to self.listenTo().  As with the creation of Switch instances, the call to Switch.connect() is made from l2_multi's ConnectionUp handler.

> 3. It doesn't raise any events and even doesn't have the _eventMixin_events set, why does it inherit from revent.EventMixin? 

It inherits from it so that it can do self.listenTo() (which comes from EventMixin).  This was briefly "the normal way" to bind events, but has been sort of deprecated for a long while.  I guess it has never been replaced here, though.  The more common/modern equivalent is calling source.addListeners(sink) rather than sink.listenTo(source).

> Thank you!
> Bowei
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20150508/5144cf5d/attachment.html>


More information about the pox-dev mailing list