packet.ospf: workaround a bytearray vs buffer problem

feeding bytearray to struct.unpack() crashes on some environment.
(depends on the interpreter versions?  i'm not sure.)

this fixes the following crash in the unit test.
the crash was seen on travis-ci, too.
https://travis-ci.org/osrg/ryu/jobs/15578909
https://s3.amazonaws.com/archive.travis-ci.org/jobs/15578909/log.txt

======================================================================
ERROR: test_hello (packet.test_ospf.Test_ospf)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/yamamoto/git/ryu/ryu/tests/unit/packet/test_ospf.py", line 68, in test_hello
    msg2, cls, rest = ospf.OSPFMessage.parser(binmsg)
  File "/Users/yamamoto/git/ryu/ryu/lib/packet/ospf.py", line 443, in parser
    kwargs = subcls.parser(binmsg)
  File "/Users/yamamoto/git/ryu/ryu/lib/packet/ospf.py", line 501, in parser
    n = addrconv.ipv4.bin_to_text(n)
  File "/Users/yamamoto/git/ryu/ryu/lib/addrconv.py", line 30, in bin_to_text
    return str(self._addr(self._strat.packed_to_int(bin),
  File "/Users/yamamoto/git/ryu/.venv/lib/python2.7/site-packages/netaddr/strategy/ipv4.py", line 196, in packed_to_int
    return _struct.unpack('>I', packed_int)[0]
error: unpack requires a string argument of length 4

----------------------------------------------------------------------

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

Support metadata in FlowMod instructions and match.

both a decimal number and a hexadecimal number are able to use in 'metadata' and 'metadata_mask'.
all the following examples express the same flow entry.

flow = {'match': {'metadata': '12345/4095'},
        'actions': [{'type': 'WRITE_METADATA',
                     'metadata': '12345',
                     'metadata_mask': '4095'}]}

flow = {'match': {'metadata': '12345/4095'},
        'actions': [{'type': 'WRITE_METADATA',
                     'metadata': 12345,
                     'metadata_mask': 4095}]}

flow = {'match': {'metadata': '0x3039/0xfff'},
        'actions': [{'type': 'WRITE_METADATA',
                     'metadata': '0x3039',
                     'metadata_mask': '0xfff'}]}

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

Support meter in FlowMod instructions and support MeterMod, MeterStats, MeterFeatures.

see following examples.

FlowMod with the meter instruction:

    flow = {'match': {},
            'actions': [{'type': 'METER',
                         'meter_id': 1}]
    curl -X POST -d '{"dpid": 1, "match": {}, "actions": [{"type": "METER", "meter_id": 1}]}' http://localhost:8080/stats/flowentry/add

MeterMod:

    meter = {'meter_id': 1,
             'flags': 'KBPS',
             'bands': [{'type': 'DROP',
                        'rate': 1000}]}
    curl -X POST -d '{"dpid": 1, "meter_id": 1, "flags": "KBPS", "bands": [{"type": "DROP", "rate": 1000}]}' http://localhost:8080/stats/meterentry/add

    NOTE: flags: 'KBPS', 'PKTPS', 'BURST', 'STATS'
          type: 'DROP', 'REMARK', 'EXPERIMENTER'

MeterStats:

    curl http://localhost:8080/stats/meter/1

MetetFeatures:

    curl http://localhost:8080/stats/meterfeatures/1

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology: add of13 support

Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_3: correct MeterStats and MeterFeatures

- add the insufficient handlers
- correct the using instance

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