mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 04:16:11 +02:00
of13: make OFPHelloElemVersionBitmap's "type" and "length" to users
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
e63dc32ff2
commit
d3706ca156
@ -106,10 +106,10 @@ class OFPHelloElemVersionBitmap(StringifyMixin):
|
||||
versions list of versions of OpenFlow protocol a device supports
|
||||
========== =========================================================
|
||||
"""
|
||||
def __init__(self, versions):
|
||||
def __init__(self, versions, type_=None, length=None):
|
||||
super(OFPHelloElemVersionBitmap, self).__init__()
|
||||
self._type = ofproto_v1_3.OFPHET_VERSIONBITMAP
|
||||
self._length = None
|
||||
self.type = ofproto_v1_3.OFPHET_VERSIONBITMAP
|
||||
self.length = None
|
||||
self._bitmaps = None
|
||||
self.versions = versions
|
||||
|
||||
@ -134,7 +134,7 @@ class OFPHelloElemVersionBitmap(StringifyMixin):
|
||||
for i, bitmap in enumerate(bitmaps)
|
||||
for shift in range(31) if bitmap & (1 << shift)]
|
||||
elem = cls(versions)
|
||||
elem._length = length
|
||||
elem.length = length
|
||||
elem._bitmaps = bitmaps
|
||||
return elem
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user