returns a list of protocols that matches to the specified protocol.
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
you can do something like:
if arp.arp in Packet(msg.data):
a = arp.arp(...)
if a in Packet(msg.data):
>>> from ryu.lib.packet import packet
>>> from ryu.lib.packet import arp
>>> a = arp.arp_ip(1, 0, 0, 0, 0)
>>> p = packet.Packet()
>>> p.protocols = [a]
>>> arp.arp in p
True
>>> a in p
True
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Make ipv4 more handy by not asking for every args. I prefer to use
more human-readble representation for src and dst but it leads to the
API change so let's do it later with another patch.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Protocols can mow be accesed as packet[n].
Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This reverts commit 6afa1c35ec0a0b2c66c22b6521be9886397aa1df.
You need this change when you use osrg's mpls-of12 repository:
https://github.com/osrg/openvswitch/tree/mpls-of12
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Use a very loose condition to determine if the address is an IPv6
address or not.
Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
instead of explicit listing of of-wire attributes, use a heuristics
to exclude internal attributes. (eg. buf, datapath, etc)
this commit changes __str__ outputs. update a test case accordingly.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
no longer necessary after the hub changes.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
vendor value is available as cls_vendor.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Because NXActionHeader is extention to OFPActionVendor.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
'pydoc gevent.event.Event' says
> Help on method wait in gevent.event.Event:
>
> gevent.event.Event.wait = wait(self, timeout=None) unbound gevent.event.Event method
> Block until the internal flag is true.
> If the internal flag is true on entry, return immediately. Otherwise,
> block until another thread calls :meth:`set` to set the flag to true,
> or until the optional timeout occurs.
>
> When the *timeout* argument is present and not ``None``, it should be a
> floating point number specifying a timeout for the operation in seconds
> (or fractions thereof).
>
> Return the value of the internal flag (``True`` or ``False``).
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
otherwise a queue grows too long and consumes much memory on load.
the size used in this commit (128) is arbitrary.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
and this time add comments to explain the intention.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
this provides gevent-like api using eventlet.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>