of1.0: use tun_id instead of tun_id_

Since there is no name conflict with tun_id, no reason to use tun_id_
instead of tun_id.
This is needed for OF message conversion from/to json later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofproto/ofproto_parser: pylint

************* Module ryu.ofproto.ofproto_parser
W:155,4:MsgBase.__init__: __init__ method from base class 'StringifyMixin' is not called
W:186,8:MsgBase.parser: Redefining name 'msg' from outer scope (line 48)
W:240,14:ofp_attrs: Redefining name 'msg' from outer scope (line 48)
W:268,17:msg_str_attr: Redefining name 'msg' from outer scope (line 48)
E:270,20:msg_str_attr: Undefined variable 'ofp_attr'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet: DHCP packet parser/serializer

Add DHCP encoder/decoder class.

Signed-off-by: TAKESHITA Noboru <takeshita.noboru@yes.nttcom.ne.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add Packet library API Reference

Add DHCP encoder/decoder class.

Signed-off-by: TAKESHITA Noboru <takeshita.noboru@yes.nttcom.ne.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: make test_packet work stand-alone

Prevent missing imports when running
  ./run_tests.sh ryu.tests.unit.packet

Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix 77effb29 regression

The following commit broke ofp_attrs():

commit 77effb29a69eeb6d320dd9a7554924b2578c3c95
Author: Isaku Yamahata <yamahata@valinux.co.jp>
Date:   Mon May 27 18:15:27 2013 +0900

    ofproto/ofproto_parser: pylint

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.3: various fixes

- OFPActionSetField
- OFPBucket parser
- OFPMeterBandStats

Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Ryu 2.0

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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>