Re: [Ryu-devel] Get the mac address of all switches

2016-09-20 Thread Iwase Yusuke
Hi, Excuse me for cutting in. According to OpenFlow Spec 1.3, there is no MAC address info in OFPT_FEATURES_REPLY message, and we can not extract the MAC address info in switch_features_handler. I recommend to put your code into port_desc_stats_reply_handler.

Re: [Ryu-devel] Get the mac address of all switches

2016-09-20 Thread Nick Sedelnikov
Hi, I think this issue can be related to that fact, that dpset consumes EventOFPSwitchFeatures event to populate it's switch table (as shown in ryu-manager output): › ryu-manager myapp --verbose loading app myapp loading app ryu.controller.ofp_handler instantiating app None of DPSet creating

Re: [Ryu-devel] Get the mac address of all switches

2016-09-17 Thread Alan Wang
Hi, Thanks for your reply kindly. I tried your code. It can run to achieve my goal. But i tried to add them to the function switch_features_handle of simple_switch_13. The result returned empty dict. Why? @set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER) def

Re: [Ryu-devel] Get the mac address of all switches

2016-09-16 Thread Nick Sedelnikov
Alan, I've checked this on simple application: """ from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.dpset import DPSet from ryu.controller.handler import MAIN_DISPATCHER, set_ev_cls from ryu.ofproto import ofproto_v1_3 class MyApp(app_manager.RyuApp):

Re: [Ryu-devel] Get the mac address of all switches

2016-09-16 Thread Alan Wang
Hi, Thanks for your reply. I tried your code and simulate it with mininet. But it returns empty list. How to solve the problem? Thanks, Alan 2016-09-16 21:46 GMT+08:00 Nick Sedelnikov : > Hi, > > To know all registered switches try: > """ > from ryu.controller.dpset

Re: [Ryu-devel] Get the mac address of all switches

2016-09-16 Thread Nick Sedelnikov
Hi, To know all registered switches try: """ from ryu.controller.dpset import DPSet class MyApp(app_manager.RyuApp): # ... _CONTEXTS = {'dpset': DPSet} def __init__(self, *args, **kwargs): super(MyApp, self).__init__(*args, **kwargs) # ... self.dpset =