Hi:
I want to implement DDoS attack detection algorithm using Ryu, First I collect 
flow statistics from the switch. Then, I want to access IP source and 
destination addresses from the reply message as this   def 
_flow_stats_reply_handler(self, ev):        body = ev.msg.body        for stat 
in sorted([flow for flow in body if flow.priority == 1],                        
   key=lambda flow: (stat.packet_count,                                         
    stat.byte_count)):                  self.logger.info('%016x %8d %8x %17s 
%17s %8x %8d %8d',                             
ev.msg.datapath.id,stat.duration_sec,                             
stat.match['in_port'], stat.match['eth_dst'], stat.match['eth_src'],            
                 stat.instructions[0].actions[0].port,                          
   stat.packet_count, stat.byte_count)
I  can see the destination address but it gives me this error 
   File 
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_3_parser.py", 
line 842, ingetitem return dict(self._fields2)[key] KeyError: 'eth_src'
How can I resolve it? Also I want to take "src_port", How this can be done? 
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to