Hi everyone,
I try to modify the fields of OFPMatch() object , but I got assignment
error. I can read and reach the value in the field of OFPMatch() object by
doing
*match['in_port']) .*
I cannot modify fields.
*example: match['in_port']=2 *
Is there any way to modify the fields of OFPMatch object?
(I use openflow 1.3)
Thanks.
----------------------------------------------------------------------
#CODE
match = parser.OFPMatch(in_port=1, eth_type=0x0800, ipv4_src="10.0.0.1",
ipv4_dst="10.0.0.2", ip_proto=17, udp_dst=5555)
self.logger.info(" MATCH ------>%s \n",match)
match['in_port']=2
self.logger.info(" EDITED_PART %s \n",match['in_port'])
self.logger.info(" EDITED_MATCH ------>%s \n",match)
----------------------------------------------------------------------
#OUTPUT
MATCH ------>OFPMatch(oxm_fields={'ipv4_dst': '10.0.0.2', 'ipv4_src':
'10.0.0.1', 'eth_type': 2048, 'ip_proto': 17, 'udp_dst': 5555, 'in_port':
1})
EDITED_PART 1
GIVEN ERROR:
* File "/home/ubuntu/PycharmProjects/696/shortest_route.py", line 556, in
_packet_in_handler match['in_port']=2TypeError: 'OFPMatch' object does
not support item assignment*
----------------------------------------------------------------------
--
Hüseyin TEMİZ
Computer Engineering
Boğazici University
http://www.ilkyar.org.tr/
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel