fix of match from_jsondict mask bug

Match's from_jsondict() requres 'mask' in JSON even if the match
doesn't have 'mask'.

 from_jsondict
    in dict_['oxm_fields']]
  File "/Users/fujita/git/ryu/ryu/ofproto/oxm_fields.py", line 230, in from_jsondict
    mask = tlv['mask']
KeyError: 'mask'

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
of12: set default args for FlowMod

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
of13: set default args for FlowMod

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
avoid importing a module twice

due to the way utils.import_module is implemented,
"ryu-manager ryu/app/switches.py" ends up with loading
switches.py module twice.
this commit fixes that by checking if module pathnames specified
on the command line is aliases of already loaded modules.
while the check is incomplete, it should cover the most of useful cases.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rest_router: avoid assertion when ip_text is 0

Signed-off-by: Wataru ISHIDA <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rest_router: convert haddr to bin for OFPActionSetDlSrc/Dst

Signed-off-by: Wataru ISHIDA <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
add LACP application

this application provides the simple example of link aggregation using LACP.

the module "lacplib" controls exchange of LACP packets and watches the
status of the slave i/fs.  the status changes if the i/fs went into a
LAG or timeout to exchange LACP occurred.  the module sends a
"EventSlaveStateChanged" event when the status changed.

the module "simple_switch_lacp" is a variation of "simple_switch".
the switch receives the "EventPacketIn" event instead of the
"EventOFPPacketIn" event from the module "lacplib" in order to except
LACP.  when the module received "EventSlaveStateChanged" event, the
module resets flow entries.

to run:
ryu-manager ryu/app/simple_switch_lacp.py

Signed-off-by: Yuichi Ito <ito.yuichi0@gmal.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: igmp: add some constant values

Signed-off-by: Yuichi Ito <ito.yuichi0@gmal.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: add docstrings for openflow messages

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: add docstrings for openflow messages

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: llc: correct a variable name

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: igmp: add a constant value

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: bpdu: use text address

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: igmp: add some constant values

Signed-off-by: Yuichi Ito <ito.yuichi0@gmal.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fix POP_MPLS of ofctl_v1_3.to_actions() problem

POP_MPLS (class OFPActionPopMpls) requires ethertype.

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add a configuration file for tox (http://testrun.org/tox/)

Python 2.6 and 2.7 interpreters are added to PATH, you can execute the following. Each virtual environment will be made and a test will be run.

$ tox

NOTE: py33 was failure because dependence packages are not worked on Python3 (At least: Eventlet).

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Revert "packet lib: igmp: add some constant values"

This reverts commit 98998118d6f51148f9f0005165e99984e97a711a.

My bad. Somehow applied twice.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rest_router: make pep8 comfortable

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet_data_generator: move of_protocol upstream back to the origin

stop maintaining a private repo as all of our pullup requests
have been merged into the origin.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet_data_generator: be specific about versions of dependencies

to make it easier to find out which versions of libraries are used to
generate our packet_data.

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