packet_data_generator: update of_protocol upstream

merely a clean up for a pullup request.  no functionality changes.

also, update comments.

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

Adds the very basic features for L2 switch. Kinda simple_switch_14.py
successfully works with LINC switch.

- HELLO
- FEATURES_REQUEST_REQUEST/REPLY
- GET_CONFIG_REQUEST/REPLY
- SET_CONFIG
- PACKET_IN
- MULTIPART_REQUEST/REPLY (only flow_stats)
- PACKET_OUT
- FLOW_MOD

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_2/3: fix match conditions about ARP

ofctl_v1_0 has changed nw_src/dst into ipv4_src/dst or arp_spa/tpa automatically like ovs-ofctl.
since ofctl_v1_2/3 change nw_src/dst only into ipv4_src/dst, it cannot create the match conditions which use arp_spa/tpa.
this patch fixes this problem.

before applying this patch (using ofctl_rest):

  curl -X POST -d '{"dpid": 1,
                    "match": {"dl_type": 2048,
                              "nw_src": "192.168.0.0/24"},
                    "actions": [{"type": "OUTPUT",
                                 "port": 2}]}' http://localhost:8080/stats/flowentry/add

  OFPST_FLOW reply (OF1.3) (xid=0x2):
   cookie=0x0, duration=3.602s, table=0, n_packets=0, n_bytes=0, priority=0,ip,nw_src=192.168.0.0/24 actions=output:2

  curl -X POST -d '{"dpid": 1,
                    "match": {"dl_type": 2054,
                              "nw_src": "192.168.0.0/24"},
                    "actions": [{"type": "OUTPUT",
                                 "port": 2}]}' http://localhost:8080/stats/flowentry/add

  no flow entry was installed.

after applying this patch (using ofctl_rest):

  curl -X POST -d '{"dpid": 1,
                    "match": {"dl_type": 2048,
                              "nw_src": "192.168.0.0/24"},
                    "actions": [{"type": "OUTPUT",
                                 "port": 2}]}' http://localhost:8080/stats/flowentry/add

  OFPST_FLOW reply (OF1.3) (xid=0x2):
   cookie=0x0, duration=3.602s, table=0, n_packets=0, n_bytes=0, priority=0,ip,nw_src=192.168.0.0/24 actions=output:2

  curl -X POST -d '{"dpid": 1,
                    "match": {"dl_type": 2054,
                              "nw_src": "192.168.0.0/24"},
                    "actions": [{"type": "OUTPUT",
                                 "port": 2}]}' http://localhost:8080/stats/flowentry/add

  OFPST_FLOW reply (OF1.3) (xid=0x2):
   cookie=0x0, duration=2.555s, table=0, n_packets=0, n_bytes=0, priority=0,arp,arp_spa=192.168.0.0/24 actions=output:2

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

this patch gets rest_firewall to support IPv6 match conditions.

'ipv6_src' and 'ipv6_dst' are allowed as key.
'ICMPv6' is allowed as the value of 'nw_proto'.

e.g.)

  curl -X POST -d '{"ipv6_src": "10::/64"}' http://localhost:8080/firewall/rules/0000000000000001

  curl http://localhost:8080/firewall/rules/0000000000000001

  [
    {
      "access_control_list": [
        {
          "rules": [
            {
              "priority": 1,
              "dl_type": "IPv6",
              "ipv6_src": "10::/64",
              "rule_id": 1,
              "actions": "ALLOW"
            }
          ]
        }
      ],
      "switch_id": "0000000000000001"
    }
  ]

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
safi: add a constant for route target constrain

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: add a constant for enhanced route refresh

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: implement the rest of RFC 3107

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test tool: run_mininet: support CPqD Software Switch

this patch gets run_mininet.py to support CPqD Software Switch.

usage)

  to use CPqD Software Switch:
    sudo ryu/tests/switch/run_mininet.py --switch cpqd

  to use Open vSwitch:
    sudo ryu/tests/switch/run_mininet.py --switch ovs
      or
    sudo ryu/tests/switch/run_mininet.py

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu.app.ofctl: Add a proxy application to send OF messages

This application provides functionality similar to ofctl_rest
but via Ryu synchronous events instead of REST API.

This is intended to be used by a feature version of ryu neutron agent.

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: constants for NOTIFICATION code/subcode

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

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

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

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: fix IP/MPLS_VPN addresses

i misunderstood that RDs were in-core.
actually they are on-wire.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_2/3: fix SET_FIELD action and some match fields

this patch fixes the following bugs:

  - "SET_FIELD" action caused an exception at mod_flow_entry command.
  - following match fields caused an exception at get_flow_stats command:
    * mpls_label, arp_spa, arp_tpa
  - following fields in "SET_FIELD" were displayed as classes:
    * eth_dst, eth_src, vlan_vid, mpls_label
  - "arp_spa" and "arp_tpa" were not displayed as IPv4 address

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

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix bidirectional event confusion

EventRequestBase has EventReplyBase

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
dpset: start up dpset if there are subscribers of dpset events

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