lib/packet/packet_utils: Add a function to calculate fletcher checksum

I'm resending the patches which appease pep8

fletcher checksum function for OSPF LSA checksum.
refer to RFC1008.

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

Signed-off-by: Wataru ISHIDA <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
unit test for lib.packet.ospf

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

What this patch implements:

    This patch implements a tool which performs OpenFlow conformance testing.
    The tool can:
      - install various flow entries of OpenFlow 1.3 as follows:
        * all 'action' except SET_QUEUE and GROUP
        * all 'match' except IN_PHY_PORT
      - confirm whether the datapath works correctly according to the installed flow entries.

Required test environment:

    The tool requires the test environment that includes 2 switches and 2 links as follows:

                      +-----------+
           +----------| target sw | The OpenFlow switch to be tested
           |          +-----------+
    +------------+      (1)   (2)
    | controller |       |     |
    +------------+      (1)   (2)
           |          +-----------+
           +----------| tester sw | OpenFlow Switch
                      +-----------+

      (X) : port number

How does the tool work:

    The tool will:
      - install the flow entries into the target switch.
      - transmit a packet from the tester switch to the target switch.
        * According to the installed flow entries, the target switch outputs a packet towards the tester switch.
        * The tester switch sends a PacketIn message to the tool.
      - examine the packet that is included in the PacketIn message and output the result.
        * The tool supports also the table-miss examinations.

    The tool processes test files in the specified directory sequentially.

    By forming the result, you can create the list as:
    http://osrg.github.io/ryu-certification/switch/ovs.html
    http://osrg.github.io/ryu-certification/switch/LINC.html
    http://osrg.github.io/ryu-certification/switch/ofsoftswitch13.html

Required test file format:

    [
        "test name",
        {
            test pattern #01
        },
        {
            test pattern #02
        }, ...
    ]

    Each test pattern has the following internal format:

    {
        "description": description of this test pattern,
        "prerequisite": [
            FlowMod messages used by this test pattern
        ],
        "tests": [
            "ingress": inbound packet data,
            "egress": outbound packet data,
            "PACKET-IN": packet data sent by PacketIn message,
            "table-miss": table id in which table-miss occurs
        ]
    }

    The extensions of the test files have to be '.json'.

How to run:

    Do the following command:
    ryu-manager ryu/tests/switch/tester.py

    The following options can be used:
      - --test-switch-target   (target sw dp-id)
      - --test-switch-tester   (tester sw dp-id)
      - --test-switch-dir      (test files directory)

    ex)
    ryu-manager --test-switch-target 0000000000000005 --test-switch-dir /home/ryu/tests ryu/tests/switch/tester.py

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test tool: add default test files (action without set-field)

What this patch implements:

    This patch implements the test files for the test tool.
    These test files aim to examine 'action' excluding 'set-field' of FlowMod message.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test tool: add default test files (action with set-field only)

What this patch implements:

    This patch implements the test files for the test tool.
    These test files aim to examine 'set-field action' of FlowMod message.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test tool: add default test files (match)

What this patch implements:

    This patch implements the test files for the test tool.
    These test files aim to examine 'match' of FlowMod message.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test tool: add a script to make the test environment on mininet

What this patch implements:

    This patch implements a script that provides the simple test environment that includes 2 switches and 2 links for the test tool as follows:

                      +-----------+
           +----------| target sw | The OpenFlow switch to be tested (Open vSwitch)
           |          +-----------+
    +------------+      (1)   (2)
    | controller |       |     |
    +------------+      (1)   (2)
           |          +-----------+
           +----------| tester sw | OpenFlow Switch (Open vSwitch)
                      +-----------+

      (X) : port number

How to run:

    Do the following command:
    sudo ryu/tests/switch/run_mininet.py

    And then, run the test tool at another terminal:
    ryu-manager ryu/tests/switch/tester.py

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>