packet lib: For convenience, make packet into a sequence type

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>
packet lib: allow packet type to be specified when parsing packet

Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add config file for Travis

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix travis config file

force to use virtual env.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.2: fix OFPSetConfig default arguments

If you use initialize like the following way:

OFPSetConfig(dp, miss_send_len=1600)

You get the following assertion when it's serialized:

File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 244, in _serialize_body
  assert self.flags is not None

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmp support time exceeded type

Used mainly for traceroute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv4 default args

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>
packet lib: mpls default args

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: vlan default args

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: arp default args

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: packet class accepts protocols list argument

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: add Packet.__contains__

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>
packet lib: packet class supports get_protocol method

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>
of1.3: Fix parsing of OFP_QUEUE_GET_CONFIG_REPLY

Make parsing similar to that of OpenFlow 1.2 (message has the same format as in 1.3)

Signed-off-by: Oren Spector <oren@oliver-solutions.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: fix OFPExperimenter parser

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12 OFPGroupFeaturesStats: add missing self.length

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: add missing itertools import

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13 fix OFPGroupFeaturesStats parser

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13 fix multipart reply parsing

make the parser return specific classes like OFPGroupFeaturesStatsReply
instead of always returning OFPMultipartReply.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13 fix OFPQueueProp parsing

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>