tests/integrated: Specify table_id for flow_mod modify tests

Use actual table ids rather than OFPTT_ALL for
flow_mod modify tests as OpenFlow 1.2 section A3.4.1
stipulates that OFPTT_ALL is only valid for flow_mod delete requests.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces the above stipulation.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tests/integrated: Use table_id greater than the current table for goto-table instruction

For a goto-table instruction use a table_id greater than the table in which
a flow will be inserted.  OpenFlow 1.2 section 5.6 stipulates that this is
required.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces the above stipulation.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Fix MAC addresses used in tests

IEEE 802.3-2012 (3.2.3 Address fields) says:

 b) The first bit (LSB) shall be used in the Destination Address field as an address type designation bit
    to identify the Destination Address either as an individual or as a group address. If this bit is 0, it
    shall indicate that the address field contains an individual address. If this bit is 1, it shall indicate that
    the address field contains a group address that identifies none, one or more, or all of the stations
    connected to the LAN. In the Source Address field, the first bit is reserved and set to 0.
 c) The second bit shall be used to distinguish between locally or globally administered addresses. For
    globally administered (or U, universal) addresses, the bit is set to 0. If an address is to be assigned
    locally, this bit shall be set to 1. Note that for the broadcast address, this bit is also a 1.

This patch fixes MAC addresses used in tests as follows:

 - set the first bit to 0
 - set the second bit to 1

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support Routing header (type3)

Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Modify lengths of pad fields for ARP

Wireshark may misunderstand a MAC frame (including ARP) whose length is 64 bytes or more, as a frame with the FCS field.
This patch fixes the issue by modifying lengths of pad fields for ARP.

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Add a link between switches

This change is for tests that use group_table.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for initialization of group tables

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for installation of group tables

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for confirmation of installed group entries

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Enable parsing OFPGroupMod messages in 'prerequisite'

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Enable sending packets using random values

The switch test tool is now enabled to send packets using random values as follows:

        "tests":[
            {
                "ingress":{
                    "packets":{
                        "data":[
                            "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), ethertype=2048)",
                            "ipv4(proto=6, src=netaddr.IPAddress(randint(0, 2 ** 32 - 1)))",
                            "tcp(dst_port=http://goo.gl/2gWwFs)",
                            "str(\"\\x11\" * (1500 - 54))"
                        ],
                        "pktps":1000,
                        "duration_time":30
                    }
                },
                "egress":[
                    "ethernet(ethertype=2048)",
                    "ipv4(proto=6)",
                    "tcp()",
                    "str(\"\\x11\" * (1500 - 54))"
                ]
            }
        ]

When ingress.packets.data includes 'randint', the switch test tool will send each packet using random values.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Optimize similar methods

 - _test_flow_install()
 - _test_meter_install()
 - _test_group_install()

are merged as

 - _test_msg_install()

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Remove unused codes

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: pylint

W:573,14: Access to a protected member _send_msg of a client class (protected-access)

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (group)

These test files aim to examine 'group action' of FlowMod message.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>