I tried  "nw_src = ipv4_bytes_to_int(ipv4_to_bin("192.168.0.1"))".. but it
gives me an error saying "ipv4_bytes_to_int is not found"

and nw_src = ipv4_to_bin("192.168.0.1") gives me

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



On Tue, Mar 25, 2014 at 11:55 AM, Windhya Rankothge <[email protected]>wrote:

> thanks alot for the guidance..
>
> I have one more problem..
>
> 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
>
> I am running my topology in mininet..
>
>
>
> On Tue, Mar 25, 2014 at 4:08 AM, FUJITA Tomonori <
> [email protected]> wrote:
>
>> On Mon, 24 Mar 2014 16:59:09 +0100
>> Windhya Rankothge <[email protected]> wrote:
>>
>> > field = parser.OFPMatchField.make(ofproto.OXM_OF_VLAN_VID,10)
>> > actions = [datapath. ofproto_parser. OFPActionPushVlan (ETH_TYPE_8021Q),
>> > datapath.ofproto_parser. OFPActionSetField (field)]
>>
>> You can do simply like:
>>
>> actions = [dp.ofproto_parser.OFPActionPushVlan(0x8100),
>>            dp.ofproto_parser.OFPActionSetField(vlan_vid=(1|1<<12))]
>>
>
>
>
> --
> Best Regards,
>
> Windhya Rankothge,
> Universitat Pompeu Fabra,
> Barcelona.
>



-- 
Best Regards,

Windhya Rankothge,
Universitat Pompeu Fabra,
Barcelona.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to