rest_firewall: improve REST response

Improvement of the REST response for basing more on JSON.

example of get rules.

before:
{
  "switch_id: 0000000000000001": [
    {
      "vlan_id: 634": {
        "rule_id: 1": {
          "actions": "ALLOW",
          "dl_vlan": 634,
          "dl_type": "ARP",
          "priority": 1
        },
        "rule_id: 2": {
          "actions": "ALLOW",
          "dl_src": "12:34:56:78:9a:bc",
          "dl_vlan": 634,
          "nw_proto": "ICMP",
          "dl_type": "IPv4",
          "priority": 1
        }
      }
    }
  ]
}

after:
[
  {
    "switch_id": "0000000000000001",
    "access_control_list": [
      {
        "vlan_id": 634,
        "rules": [
          {
            "actions": "ALLOW",
            "rule_id": 1,
            "dl_vlan": 634,
            "dl_type": "ARP",
            "priority": 1
          },
          {
            "dl_src": "12:34:56:78:9a:bc",
            "actions": "ALLOW",
            "rule_id": 2,
            "dl_vlan": 634,
            "nw_proto": "ICMP",
            "dl_type": "IPv4",
            "priority": 1
          }
        ]
      }
    ]
  }
]

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: prepare to support extension headers

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support options for Hop-by-Hop Options header and destination header

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: prepare to support Hop-by-Hop Options header and destination header

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support Hop-by-Hop Options header

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support destination header

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support fragment header

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support IP Authentication header

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: add test for multi extension headers

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: correct a comment

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
import_module: deal with cases mod.__file__ is not accessible

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmp: correct parser() of TimeExceeded

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: remove unnecessary import

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: support udp

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: simplify the operations of __init__()

before applying this patch:
  - ipv6.parser() uses 'nxt' of the last extension header
  - ipv6.__init__() rewrites 'nxt' in conjunction with extension headers
  - 'nxt' of the extension headers are set automatically, i.e. they are obscure

after applying this patch:
  - ipv6.parser() does not consider 'nxt' of the extension headers
  - ipv6.__init__() does not rewrite 'nxt'
  - 'nxt' of the extension headers are set manually as an argument of __init__()

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: avoid dangerous default value [] as argument

Signed-off-by: itoyuichi <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test_addrconv: add more test

Test '0.0.0.0' ipv4 address conversion.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: implement basic part of BGP-4

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
unit test for lib.packet.bgp

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