packet lib: ipv4: fix default arguments

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: ipv6: fix default arguments

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: tcp: fix default arguments

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: udp: fix default arguments

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: sctp: fix default arguments

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: add bmp(BGP Monitoring Protocol)

implements I-D grow-bmp-07

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

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: add bmp client function

now ryu bgp can send internal information through BGP monitoring protocol

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

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

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: add parameter for site_of_origins to neighbor_add and vrf_add method

Fujita-san,
thank you for your comment and finding the bug that causes test case failure.
I fixed the second and resend the whole patch.

The first is the addition of site_of_origins parameter to neighbor_add and
vrf_add method and fixes to some import error.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: add code to handle RD 0:0 at the head of nexthop network address in MP_REACH_NLRI path attribute

The second is patch to add or skip RD 0:0 label for the next_hop address in MP_REACH_NLRI attribute.

According to RFC, next_hop address seems to be required to contain RD of 0 when advertise VPN prefix.
This is defined in RFC 4659(3.2.1.1.  BGP Speaker Requesting IPv6 Transport) for VPN-IPv6
and in RFC 4364(4.3.2.  Route Distribution Among PEs by BGP) for VPN-IPv4.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: fix conflict of PEER_NEXT_HOP and NEXT_HOP value

The third is fix to a conflict of PEER_NEXT_HOP value in neighbors.py.

There is a conflict between PEER_NEXT_HOP in neighbors.py and NEXT_HOP in api/base.py.
As a result of the conflict, the correct validator for PEER_NEXT_HOP is not used when
neighbir_add is executed.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_rest: Add support for strict matching

ofctl_rest is now enable to modify and delete with strict matching.

usage)

  URI:    /stats/flowentry/modify_strict
          /stats/flowentry/delete_strict

  method: POST

e.g. )

  curl -X POST -d '{"dpid": 1,
                    "actions":[{"port":3, "type":"OUTPUT"}],
                    "match":{"in_port":2}}'
                    http://localhost:8080/stats/flowentry/modify_strict

  curl -X POST -d '{"dpid": 1,
                    "match":{"in_port":2}}'
                    http://localhost:8080/stats/flowentry/delete_strict

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Ryu 3.12

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

this parameter will support to display like cli as follows.

    Status codes: * valid, > best
         Network                          Next Hop             Reason          Metric LocPrf Path
     *>  10.20.2.0/24                     0.0.0.0              Only Path                     i
     *>  10.20.3.0/24                     0.0.0.0              Only Path                     i
     *>  10.20.1.0/24                     0.0.0.0              Only Path                     i

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
added parameter for vrfs_get (in case of format = 'cli')

this parameter will support to display like cli as follows.

    Status codes: * valid, > best
         Network                          Next Hop             Reason          Metric LocPrf Path
    VPN: ('64511:101', 'ipv4')
     *>  10.20.2.0/24                     0.0.0.0              Only Path                     2
     *>  10.20.1.0/24                     0.0.0.0              Only Path                     2
     *>  10.20.3.0/24                     0.0.0.0              Only Path                     2

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet/bgp: add 32bit AS number support to BGPPathAttributeAsPath

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet/bmp: fix bug of BMP Peer Down Notification class

BMP Peer Down Notification packet must have a per-peer header.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app/bmpstation: fix to work with empty BMPMessage

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