Hi,

> Hi, I had the same problem as you, but I can't use OpenFlow1.3, I need to
> use 1.0 version because my application should work in a physical sw with
> OP1.0 support.
> I tried to use 'nw_src=ipv4_to_bin(src_ip)' too and obviously throw the same
> error, please if someone found a way to solve this answer me.

You need to unpack binary IPv4 address too, like as follows.

  src_ip = '10.0.0.1'
  nw_src = struct.unpack('!I', ipv4_to_bin(src_ip))[0]
  match = parser.OFPMatch(nw_src=nw_src, dl_type=0x0800)


In addition...
If you try to match nw_src, you should add Ethertype field (e.g. 
dl_type=0x0800).


On 2014年10月23日 02:34, marlon wrote:
> Windhya Rankothge <windyswsw@...> writes:
> 
>>
>>
>> Thank you.. Since I am using mininet, when I use OF1.3, it gives me error
> msg ev versions.. I will try to implement my network with OFsoftswitch13..
>>
>>
>>
>> On Tue, Mar 25, 2014 at 12:03 PM, FUJITA Tomonori
> <[email protected]> wrote:
>> On Tue, 25 Mar 2014 11:55:50 +0100
>> Windhya Rankothge <windyswsw <at> gmail.com> wrote:
>>> I am trying to set a match condition, I have used both of following ways..
>>>
>>> src = '10.0.0.1'
>>> match = parser.OFPMatch(ipv4_src = src) or match = parser.OFPMatch(nw_src =
>>> src)
>>>
>>> both ways give me following error,
>>>
>>> File
>>> "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
>>> line 212, in msg_pack_into
>>>     buf += struct.pack(fmt, *args)
>>> error: cannot convert argument to integer
>> Hmm, if you use OF1.3, OFPMatch(ipv4_src='10.0.0.1') should work.
> 
> 
> Hi, I had the same problem as you, but I can't use OpenFlow1.3, I need to
> use 1.0 version because my application should work in a physical sw with
> OP1.0 support.
> I tried to use 'nw_src=ipv4_to_bin(src_ip)' too and obviously throw the same
> error, please if someone found a way to solve this answer me.
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to