Hi,
I have modified simple_switch.py so that when we add flow there are 2 actions.
Every packet is sent to dest_port and OFPP_CONTROLLER.
I modified actions to this
actions = [datapath.ofproto_parser.OFPActionOutput(out_port), 
                   
datapath.ofproto_parser.OFPActionOutput(ofproto.OFPP_CONTROLLER)]

So that my controller also recieves every packet.

My intension for this..is that I want to inspect every incoming packet.
But this is failing right now with this error 

ryu@ryu-vm:~/ryuNew$ PYTHONPATH=. ./bin/ryu-manager --verbose 
ryu/app/simple_switch.py
loading app ryu/app/simple_switch.py
loading app ryu.controller.ofp_handler
instantiating app ryu.controller.ofp_handler of OFPHandler
instantiating app ryu/app/simple_switch.py of SimpleSwitch
BRICK SimpleSwitch
  CONSUMES EventOFPPortStatus
  CONSUMES EventOFPPacketIn
BRICK ofp_event
  PROVIDES EventOFPPortStatus TO {'SimpleSwitch': set(['main'])}
  PROVIDES EventOFPPacketIn TO {'SimpleSwitch': set(['main'])}
  CONSUMES EventOFPErrorMsg
  CONSUMES EventOFPHello
  CONSUMES EventOFPPortDescStatsReply
  CONSUMES EventOFPEchoRequest
  CONSUMES EventOFPSwitchFeatures
connected socket:<eventlet.greenio.GreenSocket object at 0x2de1290> 
address:('127.0.0.1', 57792)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x2de15d0>
move onto config mode
switch features ev version: 0x1 msg_type 0x6 xid 0xef6d2d4f 
OFPSwitchFeatures(actions=4095,capabilities=199,datapath_id=1,n_buffers=256,n_tables=254,ports={1:
 
OFPPhyPort(port_no=1,hw_addr='b6:9f:7f:1e:b8:03',name='s1-eth1',config=0,state=0,curr=192,advertised=0,supported=0,peer=0),
 2: 
OFPPhyPort(port_no=2,hw_addr='1a:da:b4:87:73:c7',name='s1-eth2',config=0,state=0,curr=192,advertised=0,supported=0,peer=0),
 3: 
OFPPhyPort(port_no=3,hw_addr='32:e8:e2:e8:9c:3d',name='s1-eth3',config=0,state=0,curr=192,advertised=0,supported=0,peer=0),
 65534: 
OFPPhyPort(port_no=65534,hw_addr='72:b7:5c:f4:12:40',name='s1',config=0,state=0,curr=0,advertised=0,supported=0,peer=0)})
move onto main mode
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 1 00:00:00:00:00:02 ff:ff:ff:ff:ff:ff 2
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 1 00:00:00:00:00:02 ff:ff:ff:ff:ff:ff 2
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
hub: uncaught exception: Traceback (most recent call last):
  File "/home/ryu/ryu/ryu/lib/hub.py", line 48, in _launch
    func(*args, **kwargs)
  File "/home/ryu/ryu/ryu/base/app_manager.py", line 198, in _event_loop
    handler(ev)
  File "/home/ryu/ryuNew/ryu/app/simple_switch.py", line 59, in 
_packet_in_handler
    dst = eth.dst
AttributeError: 'NoneType' object has no attribute 'dst'

EVENT ofp_event->SimpleSwitch EventOFPPacketIn
EVENT ofp_event->SimpleSwitch EventOFPPacketIn


I tried print the "eth" object and it is none.

Can someone please help me figure this out.
I am fairly new to RYU so any help will be appreciated

Thanks,
Tanvi Bandodkar
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to