bgp: add support for RFC3107

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: move _TYPE declaration of IPAddrPrefix to the appropriate place.

_IPAddrPrefix can be inherited by labeled addr prefix.
In that case, variable 'addr' is tuple and not string. so declare to
parse 'addr' in 'ascii' format in _IPAddrPrefix cause following error.
this patch fix this bug.

p = LabelledIPAddrPrefix(28, ([1], '192.168.0.0'))
p.to_jsondict()

Traceback (most recent call last):
  File "./parse_labeled_addr_prefix.py", line 11, in <module>
    p.to_jsondict()
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 210, in to_jsondict
    dict_[k] = encode(k, v)
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 208, in <lambda>
    encode = lambda k, x: self._encode_value(k, x, encode_string)
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 155, in
_encode_value
    return cls._get_encoder(k, encode_string)(v)
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 56, in encode
    return unicode(v, 'ascii')
TypeError: coercing to Unicode: need string or buffer, tuple found

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
stringify: introduce _class_suffixes for easy jsonize

class variable '_class_suffixes' can be used for the same purpose as
'_class_prefixes' but match with the suffix of the class name.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: use _class_suffixes to support various AddrPrefix

the AddrPrefix which variable 'nlri' has is not limited to
_BinAddrPrefix. this patch enables to encode to/decode from json dict
with various AddrPrefix in 'nlri'.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bgp: encode 'next_hop' in human readable format

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

reserved field must be 0. this patch add an assertion and
make reserved field invisible when stringified

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bmpstation: make configurable through environment variables

you can specify listening HOST and PORT by setting env variable
'RYU_BMP_SERVER_HOST' and 'RYU_BMP_SERVER_PORT'.

'RYU_BMP_OUTPUT_FILE' specifes the output file name
'RYU_BMP_FAILED_DUMP' specifes the file name of the error dump

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